I have a breadboard kit for my Pico Pi. On this breadboard kit there are four switches with pull-up resistors, four LEDs with current limit resistors, a buzzer, and terminal boards for 5V, 3V3 and ground. Every Pico Pi pin is brought out to a new set of pins that are easily accessible.
On my breadboard, I found that the switch pins were improperly wires to the extent that I couldn't get a change of state with them no mater what I did. So I rewired my switch buttons, adding a button for RESET.
When I started testing the new wiring, I figured I would have to write some de-bounce coding The package of tactile switches I got from eBay has specs that said contact bounce <20 ms.
To my amazement, and confirmed with a logic analyzer, the trace for button actuation for these new buttons is actually a perfect square wave in both actuation and de-actuation.
Does this seem reasonable? ... For a box of 25 tactile switches at less that $7.00?
Switch debounching
Re: Switch debounching
I tried searching for <logic analyzer switch bounce> as I didn't even know if a logic analyzer could capture sharp transitions. I suggest that you are not looking close enough, ie nanoSeconds. Try a 100MHz DSO.
https://www.tek.com/ko/documents/primer ... ndamentals
https://www.tek.com/ko/documents/primer ... ndamentals
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Switch debounching
See this doc. A decent LA can capture bouncing, but there are other subtleties described in the doc.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.