Switch Interfacing & Debouncing |
|
Over here we consider ONE Switch & TWO LED connected to a microcontroller. Please check the SWITCH INTERFACING and the LED INTERFACING article to see how to connect Switches & LED’s to a microcontroller. |
|
Here is a program that will TURN ON A LED1 if a switch is debounced properly & will TOGGLE LED2 if there is some error in switch debouncing. LED1 will be ON until the switch is pressed & will turn OFF as soon as it’s released. We have taken the debounce period as 20ms. So once a LOW signal has been received from the switch the controller will again check the switch status after 20ms & if at that time the switch is high LED2 will be toggled and if the switch is LOW LED1 will be turned ON.
|
Product categories
Have You Seen
SCD40 CO₂, Temperature and Humidity Environmental Sensor Module
SCD40 CO₂, Temperature and Humidity Environmental Sensor Module SCD40 sensor module measures CO₂, te..
Rs.1,864.40 (inc GST)
Rs.1,580.00 + GST
SKU: 10908 | DAK157
Stock: 9
Elecrow Crowtail PH Sensor 2.0 (CRT14016P)
Elecrow PH Sensor 2.0 Water Quality SensorElecrow Crowtail PH Sensor 2.0 for pH testing in aqueous s..
Rs.1,911.60 (inc GST)
Rs.1,620.00 + GST



