Unformatted text preview: button connected to Port A pin 0. Initially, the rate should be one half second. When the button is pressed, the rate should change to one second. When the button is pressed again, the rate should return to one half second, and so on. Note that only one change should occur per push button press. The only function of the main program, after initializing the timer, ports, and variables, is to continuously check the push button, and set a variable to indicate whether the pattern should change every half second or every second. The interrupt service routine should keep track of elapsed time since the last LED change, and change the LED pattern when the selected delay has occurred (one half second or one second)....
View Full Document
- Summer '08
- Frequency, Interrupt, one second, Interrupt handler, Programmable Interrupt Controller, Oscillator clock