English
Language : 

AN921 Datasheet, PDF (9/24 Pages) Silicon Laboratories – Configurable Logic Unit
AN921: Configurable Logic Unit
Button Debounce
The CLU2 LUT implements an XOR function, which allows Timer 2 to run only when there is a difference in logic between the BUTTON
state and the BUTTON_DEBOUNCED state. When the debounce timer expires and BUTTON_DEBOUNCED is updated, Timer 2 Re-
load Force goes to logic high, continuously resetting Timer 2 and effectively stopping it.
4.3 Firmware Example
The button debounce firmware example can be found in Simplicity Studio under [Software Examples]>[Kit: EFM8LB1/EFM8BB3
Starter Kit]>[Configurable Logic]>[Button Debounce]. The example uses CLU1, CLU2, Timer 2, and the previously-discussed con-
figuration to implement the button debounce.
The scope capture for the button press and release events are shown below in below, where the button signal (pressed = 0) is shown
on CH2 and the debounced button state (pressed = 1) is shown on CH3.
Figure 4.4. Scope Capture of Button Press Event
Figure 4.5. Scope Capture of Button Release Event
silabs.com | Smart. Connected. Energy-friendly.
Rev. 0.1 | 8