T4.0 debouncing interrupts?

OhioJim

Well-known member
I have a pushbutton connected to a digital input, and have it configured as an interrupt.

The interrupt is working but it looks like I am getting some switch bounce. The interrupt service routine is being called multiple times for each push of the button.

Is it possible to use Bounce on an interrupt input? How do I do that?
 
Some more interesting problems.

The pushbutton is on a X-Box style thumb control and is mounted in a pendant box on a 5 foot coiled cable. There are also 2 toggle switches in the box. The cable itself is 8 conductors, of which only 6 are used, with one of the conductors being a shield wrapped around the other 7

Sometimes when flipping a toggle switch it triggers an interrupt. I wasn't expecting that much coupling between the lines, but it rally doesn't surprise me.

Bounce on the toggle switches themselves is not a problem since they are read only when the pushbutton is pushed.

It looks like I will have to put some relatively large capacitors on all three switches. That should take care of both the coupling and the interrupt bounce.
 
Back
Top