??? 02/05/06 00:01 Read: times |
#109210 - Alternatively Responding to: ???'s previous message |
Neil Kurzman said:
Interupts will be better especially if you want to power down.
Andy is right you do not need to debounce. Clear and disable the int and clear and enable the other with each press. Do not update the LCDs in the timer int. Set a flag and do it in main. Alternatively you can use the timer interrupt to both keep time and debounce the keys as I mentioned before. For power down then your main looks like: main: sleep update display jmp main The processor wakes up after each interrupt has finished, updates the display then goes right back to sleep again. Ian |