I'm a big fan of debouncing in hardware with the MAX3218 chip. It will debounce by waiting 40ms for the signal to "settle" before passing it on. This saves your microprocessor interrupts for other things. It also will work with 12 or 24 volt inputs and happily output 3.3 or 5v logic to the microprocessor. It is pricey though at $6-10 each.
aidenn0|1 year ago
Certified|1 year ago
[1] https://www.analog.com/media/en/technical-documentation/data...
the__alchemist|1 year ago
Also, (Again, depends on the use), there is a good chance you're handling button pushes using interrupts regardless of debouncing.
Certified|1 year ago
theamk|1 year ago
If you want slow and reliable input for industrial automation, it seems much safer to make one yourself - an input resistor, hefty diode/zener, voltage divider, maybe a schmitt trigger/debouncer made from opamp if you want to get real fancy.
Certified|1 year ago
Certified|1 year ago