debouce

M

martstev

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
 
M

Mark McDougall

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,
 
D

David R Brooks

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top