In order to complete the first lab checkout on time, the following reading and problems should be completed before the start of the first lab section for this lab.
- The lab webpage. - It is extremely critical that you read the entire webpage for this lab before the start of the first lab section.
- The Keypad webpage
- Direct Digital Synthesis
- I/O Ports (Reference Manual Section 12
- Timers (Reference Manual Section 14)
- SPI (Reference Manual Section 23)
- PLIB Manual (Sections 10, 11, 14, and 16)
- ProtoThreads on PIC32
- Class overview and policy - Contains information about grading!
From the PIC32 datasheet:
What MCU hardware is used by ProtoThreads? Can you use timer2 for your own code? How about timer3 and timer5?
We will use a standard audio rate of 44 KHz. The CPU runs at 40 MHz (see the config.h file).
- The first line of code should open a timer (turns it on, turns on interrupts for the timer, configures it to use the internal clock, sets the prescalar to 1, and sets the toggle rate to the value that you found in the previous question).
- The second line of code should set up the timer interrupt with a priority of 2.
- The third line of code should clear the interrupt flag.
Our audio sample rate is 44 KHz. If you use an
int (32 bits) for your DDS accumulator what is the resolution (in Hz) of your synthesizer?
In this lab, it is recommended that you use a linear ramp to modulate your synthesized sounds. A linear ramp is not the only option. What are some other options, and what are their advantages and disadvantages?