> > > David, > > Your routine appears to handle only 1 switch press at a time. If you > want to handle multiple presses and still use debouncing, then here's an > AVR version of my debounce routine: It does as many as you'd like. There's a non-int part that compares the old switch image to the current switches, and if different, restarts the timer. In the ISR, the timer is dec'd to 0, and on rolling to 0 we update the debounced image in ram, and set a flag to say that the switches have changed state. Usually I have one task that needs to be woken up when something changed, and others that just look at the current state of the debounced image. -- > Feel the power of the dark side! Atmel AVR -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist