628Views2Replies

Author Options:

How well can you debounce a switch with a cap? Answered

2 Replies

user
DavidRobertson (author)2010-01-26

 Seeing as you have tagged this question with "AVR" and "Microcontroller" I will assume you are going to use an avr. It may be easier just to debounce in software  by checking the value of the input pin, waiting (Experiment with the timing. A starting point could be around 100 milliseconds), and then checking the value again. If they are the same both time, assume that the button has been pressed. 



Select as Best AnswerUndo Best Answer

user

 Small error in last sentence, should say "If both readings are logic high(Or low, depending on wether you use a pull up or pull down resistor on the input) then assume that the button is pressed." 

Select as Best AnswerUndo Best Answer