debouce

Discussion in 'VHDL' started by martstev@gmail.com, Aug 30, 2006.

  1. 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
     
    , Aug 30, 2006
    #1
    1. Advertising

  2. 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
     
    Mark McDougall, Aug 30, 2006
    #2
    1. Advertising

  3. 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.
     
    David R Brooks, Aug 30, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page