Re: vhdl code for debouncing push button



glen herrmannsfeldt wrote:
Peter Alfke wrote:

If you have a single-pole double-throw switch with break before make
(or a three-position switch) just connect the center to a pin,and the
two terminals to Vcc and ground. Then, inside the chip make the input
drive the active, non-inverted output on the same pin. That creates a
latch, that you can force either way, and it will respond within about
a nanosecond, and will ignore all bounce. Use the lowest drive
strength setting.


I was about to comment on the current surge before it switches,
but I suppose at low drive setting it should be fine. I might
wonder, though, on outputs with only high drive current.

That's not a bug, it's a feature!: It does Contact cleaning!! ;)

-jg

.


Quantcast