Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

DE2 Quartus debounced circuit

Hello,

I am working on a senior design project and have a DE2 board connected to external circuitry. There are pushbuttons on the external circuit which control leds also on that circuit board. My design requires that I press the pushbutton and the led lights up and I press it a second time and the led goes off.

It turns out that those pushbuttons which are single-pole-double-throw (SPDT) are not debounced and give multiple outputs when I want a clean signal.

I would like to know if there is a reference design so I can build debounced circuitry for the buttons in Quartus. If not, how do I build debouncers in Quartus for SPDT pushbuttons?

Thanks.

Kofi.

15 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    am working on a design project and have a DE2-70 board.I want to control on board LEDS

    from my PC.

    How can I make dialogue based application using NIOS II IDE.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Kofinator,

    Please post your reference design when you're done if you don't mind sharing.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi, I'm actually using pushbuttons on an external circuit and not the pushbuttons on the DE2. I'm going to build debounced circuitry in Quartus to fix it. Thanks for the reply.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Actually, I believe DE2 switches are debounced with a 74HC245. You should not see multiple inputs for a single button depression. Remember that the switches (or 'key's) are active high. When you push the button it will be low for the period of time that you have it depressed (which even if you push it very quickly will be many thousands of clock cycles). But you will not see it oscillate between a one and a zero after it is depressed (you can prove this to yourself by building a simple SignalTap file and analyzing the operation in hardware). In order to ensure your circuit operates appropriately I would suggest that you watch for the switch (or key) to go from a low to a high (the switches are a logic 1 when not depressed). This will ensure that a single button press results in your code executing only once. If you post your code snippet, then I will have a look...

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Normally there are delayed timer double check circuit and state machine circuit used as debouncer.

    You will find spending a while on google.