
Switch Debouncing
When the contacts close in any mechanical switch or push button, they tend to
bounce open before settling in closed position. In normal life, this is not notice-
able or significant, but in microsystems it is liable to cause circuit misbehaviour
if ignored. The effect generally lasts a few milliseconds, but if the switch is sam-
pled at high speed, it can appear that it has been operated several times.
On the other hand, the sequence of the program may be such that the switch
bounce does not adversely affect the correct operation of the system. For ex-
ample, if the program does not recheck the input until the bouncing has fin-
ished ...