I managed to write a small program to count up or down depending on the push button that is pressed. The delay for de-bouncing, is this more for when running the simulation than actual practice? I already have a small delay in the program so that the count does not go crazy when clicking the button with the mouse.
Bob
Flowcode Demo Switch debounce
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Flowcode Demo Switch debounce
When I use a delay for switch debounce, I place delay so that there is only a delay after switch press has been detected.
That way, rest of program is not slowed down if no switches are pressed.
Change the delay to suit.
I believe it would be best to keep a delay of some value in practice, since as switches get older, bounce gets worse.
That way, rest of program is not slowed down if no switches are pressed.
Change the delay to suit.
I believe it would be best to keep a delay of some value in practice, since as switches get older, bounce gets worse.
- Attachments
-
- Switch_Debounce FCV4.fcf
- (7 KiB) Downloaded 732 times
Martin