Forum Discussion

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

Display numbers every second on 7-seg display using Verilog HDL and altera DE1.

I want to display different numbers on the 7-segment display of the altera de1 cyclone 2 board, but it has to be every second or every 2 seconds. For example at time t0 = 0s, number 1 should be displayed on the 7-seg display, at t1 = 1s or 2s, number 2 should be displayed on the 7-seg display. I want to know how to make that time delay between the change of numbers. I have read about delays on verilog, I have used the '#' method but it doesn't work, can anyone help me?

5 Replies

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

    Generally I will use a counter with clock to introduce dealy. The "#" is normally used in test bench but not actual hardware design.

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

    --- Quote Start ---

    Generally I will use a counter with clock to introduce dealy. The "#" is normally used in test bench but not actual hardware design.

    --- Quote End ---

    Can you give me a simple example of a counter with clock?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You might want to search for "prescaler" this will generate a clock with a frequency that is lower than its input clock. If you do it right it can outputa frequency of 1 Hz. Use this to run the counter and the display part.

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

    You can try :

    1) 1 source clk

    2) make a condition to pulse-out

    3) gate the source clock with condition right (accoring recommendation)

    4) use your new clock

    So you able to manage duty cycle of new clock