The purpose of the first lab section is to get familiar with this course's infrastructure and workflow.
This is the only lab of the semester for which you may leave early if you finish early. This is also the only lab that will be completed individually. You must demonstrate the provided example code running on a PIC32 in the lab and producing a sound through Zoom.
Lab 0 tasks:
- Access Cornell's VPN
- Establish a Remote Desktop connection to a Lab PC
- Download, build, and program the PIC32 with some example code
- Join the Zoom call from the Lab PC, demonstrate audio coming from the PIC32 through Zoom
- Download and run the Python script associated with the example code
Please follow Cornell's guide for setting up and connecting to Cornell's VPN linked here. You will only need to set this up once.
There are two sets of instructions below. One for Mac users, and the other for PC users. Accessing the Lab PC's requires permission from CIT. If you are denied access, please let me know so that I can verify that your netid is on the approved list.
en-ec-lph238-
XX.ece.cornell.edu
where XX will be the number of your particular PC, different for each group. Do not log on to a PC that isn't assigned to you.en-ec-lph238-
XX.ece.cornell.edu
where XX will be the number of your particular PC, different for each group. Do not log on to a PC that isn't assigned to you.File --> New Project
..h
) files and click "Select."config_1_3_2.h
port_expander_brl4.h
pt_cornell_1_3_2_python.h
tft_gfx.h
tft_master.h
.c
) files and click "Select."glcdfont.c
port_expander_brl4.c
SECABB_python_target_v4_1_3_2.c
tft_gfx.c
tft_master.c
main
?)Note: Because of COVID-related shipping delays, it is possible that the PicoScopes oscilloscopes are not available for the first few weeks of the lab. Ask Hunter if there is a PicoScope installed at your lab bench. If there is not, you can use the sound card of your lab PC as an oscilloscope! This has certain limitations (we are limited to 100kSamples/sec, and we can only observe AC signals). Those limitations make the sound card less useful than a conventional oscilloscope for some application, but it is perfect for looking at sound coming from your DAC. Here is a guide for doing that:
As you can see on the Remote interface webpage, the output from DACA is put through a high-pass filter and into the microphone input jack of the lab PC. So, if you join the Zoom call from the lab PC and point Zoom to the microphone input, you will be able to hear the sound being generated by the PIC32 through Zoom.
# open microcontroller serial port
# For windows the device will be 'COMx'
ser = serial.Serial('/dev/ttyUSB0', 115200, timeout=0.001)
'/dev/ttyUSB0'
with the name of the COM port to which the PIC32 is attached. This will be of the form COMx
, where x
is the number of the port.config.h.
Should be 115200.python .\pic_target_4a.py
- NOTE: If this throws an error about PySimpleGUI, you may need to run
pip install PySimpleGUI
- NOTE: If this throws an error about pyserial, you may need to run
pip install pyserial
- NOTE: If this throws an error about the COM port, you may have edited the document to point to the wrong COM port. Double-check in Device Manager