Re: vhdl code for debouncing push button
- From: Jim Granville <no.spam@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Jul 2008 23:38:35 +1200
rickman wrote:
On Jul 27, 3:51 pm, Jim Granville <no.s...@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
rickman wrote:
I think whether this code works for you depends on the push button. I
have some tactile switches that initially showed *no* bouncing. After
just a week or two of use they bounce so badly that it is impossible
to debounce them.
The best switch to debounce is a double throw switch. The FF stays in
a given state until the other contact is made. Very simple, but it
requires two inputs and a more complex switch.
Yes, a SPCO switch (classic Micro-switch action) is more complex,
as it has an extra contact, but I cannot see
the 'requires two inputs' in any I have used ?
Wire one end to Vcc, one to GND, and the contact to the Pin,
and enable the Pin-Keep if you like, and you are done.
Did you mean a SET/RESET action, which needs two pins, and two
resistors (can be pin-pulldowns) ?
SPCO switches should be the default on demo-boards, as you can
also clock off them...
If you don't have the "pin-keep" (bus-hold) enabled (or available)
what state is the input in while the switch is in transition? I would
think the input would be floating which is not a good idea. In
essence, you are asking the capacitance of the input to perform the
bus-hold function.
To be honest, I had to look up a SPCO switch. It seems to be a three
position switch. Why do you need three positions? Wouldn't a SPDT
with break before make do what you are describing?
Yes, SPCO and SPDT are effectively interchangable
(change Over/Double Throw) - The venerable Microswitch has that,
as does the Digitast buttons. Digikey shows those for 28c+cap
-jg
.
- Follow-Ups:
- Re: vhdl code for debouncing push button
- From: Fred
- Re: vhdl code for debouncing push button
- References:
- vhdl code for debouncing push button
- From: Zhane
- Re: vhdl code for debouncing push button
- From: rickman
- Re: vhdl code for debouncing push button
- From: Jim Granville
- Re: vhdl code for debouncing push button
- From: rickman
- vhdl code for debouncing push button
- Prev by Date: Re: vhdl code for debouncing push button
- Next by Date: Die sizes of FPGAs (approx)
- Previous by thread: Re: vhdl code for debouncing push button
- Next by thread: Re: vhdl code for debouncing push button
- Index(es):