Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21615 讨论

Urgent: Codes for counter design

Altera_Forum
名誉分销商 II
1,964 次查看

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 项奖励
3 回复数
Altera_Forum
名誉分销商 II
961 次查看

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

0 项奖励
Altera_Forum
名誉分销商 II
961 次查看

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 项奖励
Altera_Forum
名誉分销商 II
961 次查看

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 项奖励
回复