From: Michael Park >As I prepare to try my hand at debouncing a switch input, I'm curious to >know if anyone has characterized mechanical bounce in terms of typical >frequencies and durations. If that information is not directly >available, my question then becomes one of pragmatics: What sampling >frequency have you successfully used, and how many samples did you need >before declaring a switch settled? >Scott Dattalo, on his amazing debounce technique[1], talks about the >"vague terms" surrounding debouncing in general. I'd like to get a feel >for the numbers that real-world practitioners use. I have used a number of ways to debounce switches. The best is to buy switches that don't bounce. The do make them. The next best is to do it in hardware. It take a lot less processor time. I have used a couple of software solutions that work farily well. The simplest is just to tie up the processor with a for loop after it detects a change. The best performing is to sample the switch a number of times and judge it high if 80% of the sample are high. This handles noise spikes as well. Good luck Gordon Gordon Couger gcouger@rfdata.net 624 Cheyenne Stillwater, OK 74075 405 624-2855 GMT -6:00