2 Robust Debouncing with CLCs

As far as is known, none of the existing solutions work as expected for the three scenarios shown in Figure 1-1. Some existing solutions rely on detecting the first input signal pulse, without checking whether it is a noise pulse or not. Or it waits for a long, fixed delayed period (slow debounce time) and rechecking if the pulse is still valid. Debouncing relying on the first pulse could result in a debounce signal at an incorrect time or even incorrect debouncing for a scenario 1 case. It often has slow debounce time while waiting for a fixed, delayed period and requires the CPU’s intervention. For scenario 3, existing solutions could result in an unpredictable debounce signal as the number of pulses varies and the pulse periods vary.

This document introduces two solutions using timer and CLCs. The first proposed solution requires one timer and two CLCs per button and is named two CLCs (2-CLCs) debouncing solution. It works, in practice, even for the extreme example with various noisy pulse occurrence. An enhanced three CLCs (3-CLCs) solution is hence introduced and will be discussed in the solution description. The user has the option to choose between these two solutions based on their requirements.