Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20704 Discussions

Urgent: Codes for counter design

Altera_Forum
Honored Contributor II
1,499 Views

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.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
496 Views

Ok that's pretty simple, what difficult are you having?

0 Kudos
Altera_Forum
Honored Contributor II
496 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
496 Views

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)
0 Kudos
Reply