This tutorial is to demonstrate all five methods for debouncing switches using single pole-single throw, or single pole-double throw switches. The guide includes the two methods for single pole-double throw (SPDT) switches which require no output delay and the two best methods for interfacing with the more simple single pole-single throw (SPST) switches.
Read MoreIf you can spare two pins, this is the way to go. Using a SPDT switch, Pin 1 Low indicates the switch is inactive, and Pin 2 Low indicates it is activated.
Read MoreThe cross-coupled nand gate method is ideal for projects where two processor pins are not available for use with one switch.
Read MoreUsing the internal cross-coupled nand gating of a D-Type Flip flop provides an excellent Method 3 Debounce identical to Method 2. Note the Q output is normally high and goes low when the switch is activated.
Read MoreWhenever a single pole-single throw (SPST) switch is used for input into high-speed digital devices, the only thing you can do is to wait out the bounce interval with either hardware or software delays (see Waveform 2 below).
Read MoreThere are numerous examples online for software debounce routines for every computer language known to mankind. They all amount to simply waiting out the estimated bounce period.
Read MoreNote the immediate Q output. Methods 1 and 2 change the output state with no delay both on actuation and release.
Read MoreNote the delayed Q output for these methods. The Hardware Debounce circuit of Method 4 and Software Debounce of Method 5 require delaying action until the bounce time is through.
Read More