debouce

Guest
I did see some debounce VHDL code but I need something for rotary
switch. It has 15 positions and when I go from 1 position to say
position # 5, I think there is going to be some bounce (more than one
bit is going to be low for a few microsecond). I have a vector with all
15 inputs (by concatenating all 15 inputs). how can I implement
debounce code in VHDL? Any help will be appreciated!

Martin
 
martstev@gmail.com wrote:

how can I implement
debounce code in VHDL? Any help will be appreciated!
Use a counter that resets whenever the input changes. Only when the
counter reaches terminal count do you latch the new input value.

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266
 
martstev@gmail.com wrote:
I did see some debounce VHDL code but I need something for rotary
switch. It has 15 positions and when I go from 1 position to say
position # 5, I think there is going to be some bounce (more than one
bit is going to be low for a few microsecond). I have a vector with all
15 inputs (by concatenating all 15 inputs). how can I implement
debounce code in VHDL? Any help will be appreciated!

Remember that a rotary switch will touch its wiper to every intermediate
contact as you sweep from 1 to 5. It may dwell on those intermediate
points for a v-e-r-y long time (in electronic terms).
Further, rotary switches come in two flavours: break-before-make, &
make-before-break. If you use the second type, the wiper will actually
bridge every adjacent pair of contacts as it moves, so you must cater
for the case when two inputs are active together.
 

Welcome to EDABoard.com

Sponsor

Back
Top