David VanHorn wrote: >> >>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. As long as all are stable for the debounce time interval... I'm sure this approach is just fine for handling normal keypads. It certainly is efficient to have just one timer for N-switches. However, imagine you had one switch (or relay or whatever) that is constantly changing states. This unstable input prevents the debounce timer from ever terminating, which in turn means the other switches can not be read! Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist