Academic Program

Processing an Interrupt

Processing an Interrupt

This example uses a Timer2 interrupt to toggle a pattern on two LEDs. To accomplish this task the application does the following:

  • Initialize I/O ports
  • Initialize Timer2 to generate a periodic interrupt
  • Write an interrupt service routine to toggle the LEDs
  • Enable Timer2 interrupts


single-interrupt-todo.png
single-interrupt-code.png