Forum Discussion

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

Urgent: Codes for counter design

I need help on how to design a counter that can count from 0 to 9 and back to 0. and this counter must be modified to reset, start and stop.

also, codes for 7 segment decoder to display the numbers on fpga board.

Thanks Altera peeps.

3 Replies

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

    just the codes for the counter to count from 0 to 9 and back to zero, and it must have reset .

    Also 7-segment decoder to display 0 to 9. thanks.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    well you have a reset

    then when reset is at 1 (or 0) you are going to intiialize all your registers.

    when the reset changes you are going to start the counter, if the counter hits your max value you start to decrease it, if it hits 0 it increases again.

    then you are going to do a BCD : http://en.wikipedia.org/wiki/binary-coded_decimal

    to display your values in your 7-seg decoder.. (also see the datasheet to see how your 7-seg decoder works)