next up previous
Next: In-lab Tasks: Up: Tasks Previous: Tasks

Pre-lab Tasks:

  1. Explain how the OC4 interrupt handler presented in section 3.5 works.
  2. Rewrite the OC4 interrupt handler so it generates a PWM signal on PA4 that has approximately a 2 msec period (2048 time tick period) and a duty cycle that is controlled by a single global variable.
  3. Write a new kernel function named set_pwm() that can be called from main to reset the duty cycle of the PWM signal.
  4. Write a program that reads a commanded duty cycle from the PC's terminal and then generates a 2 msec PWM signal on pin PA4 with the specified duty cycle.



Michael Lemmon 2009-02-01