There's a real easy test for down-state bouncing. What's nice about that algorithm is that it will only trigger once. I've used it in many projects and it never misses a key press, never triggers more than once, and best of all, doesn't require any timers (h/w or s/w). It just loops through, and after it pushes the 1 through, you get your key press. On 12/31/05, Wouter van Ooijen wrote: > > > Best article I've ever read about Debouncing, and it has the > > best algorithm I've ever seen as well. > > http://ganssle.com/debouncing.pdf > > How is it better than just check every 50 ms? > > > > > This is fine if you're only worried about bouncing on > > > > transitions. If you > > > > are doing filtering or the switch could bounce in one of the > > > > states (like a > > > > momentary pushbutton), then you need to sample faster and > > > > apply debouncing > > > > or filtering logic. > > > > > > This is new to me. You say a pushbutton (lika an ordinary > > keyboard key) > > > could bounce *while being pressed down*? And if so, how would you > > > recognise such a bounce? > > The ganssle document is nice, but it does not mention down-state > bouncing. > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Shawn Wilton (b9 Systems) http://black9.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist