3 ms·
> For most devices it is enough to just probe the switch periodically. Often you want to use interrupts instead of polling - well again, you can just ignore su
by pantalaimon 7y ago
> For most devices it is enough to just probe the switch periodically.
Often you want to use interrupts instead of polling - well again, you can just ignore subsequent interrupts if they are within too short of an interval.
Fortunately on many MCUs you can just enable hardware debounce.
- baybal2 7y ago> Often you want to use interrupts instead of polling - well again, you can just ignore subsequent interrupts if they are within too short of an interval. And you are really screwed if you have to do it with an extremely simple, and cheap IC, like 4 bit micros, because their CPU power may well be not enough for that, especially if they are to control something real time. This is exactly why super cheap electronics uses conductive rubber buttons. Conductive rubber buttons don't bounce.
- ksangeelee 7y agoConductive rubber buttons absolutely do bounce (though I presume that was a joke).
- baybal2 7y ago??? for as long as I remember, all and everybody was using them exactly for that reason. Slow raising edge can be considered a bounce by some logic, but that is easily fixable by Schmitt triggers
- ksangeelee 7y agoThanks, that's interesting. I suppose they specifically choose contacts with a high resistance.