Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > debouce

Reply
Thread Tools

debouce

 
 
martstev@gmail.com
Guest
Posts: n/a
 
      08-30-2006
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

 
Reply With Quote
 
 
 
 
Mark McDougall
Guest
Posts: n/a
 
      08-30-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
David R Brooks
Guest
Posts: n/a
 
      08-30-2006
(E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments