??? 02/05/06 11:02 Read: times |
#109227 - No pb isr as such. Responding to: ???'s previous message |
According to what Ian wrote, the timer isr reads the pushbuttons and sets flags for the main code to interpret.
The timer interrupt will wake the cpu every 20mS, read the pushbutton status, copy this into some flags. The main line code will execute after the timer interrupt has completed. The main code will interpret the pushbutton flags, update the displays etc then sleep. Another 20mS, it will do the same thing again. As such, you don't need to put the cpu to sleep unless you want to save power (especially if its run off a battery). Otherwise a dead loop waiting on a flag set by the timer tick would suffice. |