On Sat, 2005-12-31 at 19:20 +0100, Wouter van Ooijen wrote: > > > There's no need to debounce switches unless you poll them faster > > > than the bounce time. And the only reason you'd need to poll them > > > that fast is if you need low latency, like with a trigger. I > > > generally poll 20 times per second and that works just fine. > > > > 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? Olin is correct. While I've never seem "membrane" type switches bounce while pressed (that's not to say they don't, just that I've never seen it), normal more mechanical type switches can bounce while depressed, especially when they're a little dirty or corroded. By "more mechanical" I mean those cheap push button switches that are basically just two pieces of spring metal coming together. As the button is pressed, movements in the button back and forth (no person can hold 100% still) move the two pieces of metal back a forth, causing a possible bounce. Personally I always debounce. Whether it's software or hardware debouncing (or both) depends on what I've got. TTYL ----------------------------- Herbert's PIC Stuff: http://repatch.dyndns.org:8383/pic_stuff/ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist