|
1 | 1 | [](https://www.microchip.com)
|
2 | 2 |
|
3 |
| -# Debouncing a Pushbutton on the PIC18F16Q41 |
4 |
| - In this example, a pushbutton will be debounced using the Configurable Logic Cell (CLC) and Timer 2 (TMR2) peripherals on the PIC18F16Q41. When this occurs, the UART peripheral will print a message to a serial terminal. |
| 3 | +# Debouncing a Push button on the PIC18F16Q41 |
| 4 | + In this example, a push button will be debounced using the Configurable Logic Cell (CLC) and Timer 2 (TMR2) peripherals on the PIC18F16Q41. When this occurs, the UART peripheral will print a message to a serial terminal. |
5 | 5 |
|
6 | 6 | ## Related Documentation
|
7 | 7 |
|
|
36 | 36 | + Name: “uart-button”
|
37 | 37 | + **Note: The project name cannot have any empty spaces**
|
38 | 38 |
|
39 |
| -When a pushbutton is pressed, the internal contacts in the switch will bounce momentarily, causing the digital value read to vary wildly. This can create false detections of button press and release. To remove the contact bounce from the digital input, a CLC and TMR2 are used to create a debouncer. |
| 39 | +When a push button is pressed, the internal contacts in the switch will bounce momentarily, causing the digital value read to vary wildly. This can create false detections of button press and release. To remove the contact bounce from the digital input, a CLC and TMR2 are used to create a debouncer. |
40 | 40 |
|
41 | 41 |
|
42 | 42 | **Step #2: MPLAB Code Configurator (MCC)**
|
@@ -154,16 +154,16 @@ When a pushbutton is pressed, the internal contacts in the switch will bounce mo
|
154 | 154 |
|
155 | 155 | 
|
156 | 156 |
|
157 |
| - + If everything is setup correctly, then the serial terminal should start displaying the printf statement when the pushbutton is activated. |
| 157 | + + If everything is setup correctly, then the serial terminal should start displaying the printf statement when the push button is activated. |
158 | 158 |
|
159 | 159 | 
|
160 | 160 |
|
161 |
| -The figure below shows an example of the button being debounced. The yellow signal is the pushbutton after being released and the blue signal shows the output of the CLC. |
| 161 | +The figure below shows an example of the button being debounced. The yellow signal is the push button after being released and the blue signal shows the output of the CLC. |
162 | 162 |
|
163 | 163 |
|
164 | 164 | 
|
165 | 165 |
|
166 | 166 |
|
167 | 167 | ## Summary
|
168 | 168 |
|
169 |
| -This application demonstrates how to debounce a pushbutton. |
| 169 | +This application demonstrates how to debounce a push button. |
0 commit comments