In software, when the edge is detected, then just wait for the time it takes a switch to finish bouncing before you ever re-check the state of the switch. Use a delay or whatever. I prefer hardware debouncing (just a low pass RC filter, and a schmitt trigger inverter), that way I do not waste processor time needlessly. One hex inverter will work for 3 or 6 depending on the logic output you need. 3 switches if you need to uninvert the inverted signal, 6 if you do not. The actual software debouncing implementation is trivial, and left as an exercise for the reader. If you need to trigger an interrupt on both rising and falling edges, it can get more complicated SR latches and stuff will work. There is a ton of stuff on the internet when you look under switch and debounce. -Tony --- In AVR-Chat@yahoogroups.com, Venkat Nagappan <venkatnagappan@y...> wrote: > Dear Friends kindly send me codes to debounce a switch > > assembly language avr program is needed..., > > kindly help m eout friends > > > venkattttttttttttttt > > > > > > > __________________________________________________________ > Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com
Message
Re: How To Debounce a Switch 10 ms edge triggered....
2005-09-03 by arhodes19044
Attachments
- No local attachments were found for this message.