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.
- Phenomenological PID introduction
- Analytical PID introduction
- ADC (Reference Manual Section 17)
- Output Compare (Reference Manual Section 16)
- PLIB Manual (Section 13)
- PLIB Manual (Section 18)
Explain in detail why there is a diode across the motor in lab 3. Include the direction of inductive current flow during each part of the PWM cycle.
What MCU hardware is used by ProtoThreads? Can you use Timer 2 for your own code? How about Timer 3 or Timer 5?
Write the code to setup a Timer 2 ISR running at 1000Hz, assuming a CPU clock cycle of 40MHz.