Electrical – Hardware buttons debouncing crosstalk

buttoncrosstalkdebounce

I'm using a hardware-based debouncing circuit to trigger an interrupt on a Particle Photon development board.

debounce circuit

I use a similar circuit with two buttons:

schematic

Sometimes when a button is pressed, the interrupt linked to the other button is also triggered.
What is the reason for this behaviour? How to solve this issue?

Best Answer

It due to the charge in the capacitor.You connected the switch to VCC at time you pressed. Capacitor charged and after you released the capacitor discharged through the resistor.so the capacitor should discharged below VIL before you pressing another button. Better you follow the switching the Ground. For that you need to use pull up resistor.