Rolling Number Display

Thread Starter

gaff38

Joined Sep 2, 2008
2
I have been trying to conjure up VHDL code to display 10 digits on a 4 digit seven segment display i.e. 0123456789 would roll across the 4 digit display repeatedly
Then using a slider switch another number could be chosen
I would be extremely grateful for any help with this problem
 

Papabravo

Joined Feb 24, 2006
21,225
Well I think that if you make a shift register out of the BCD digits and connect the last one back to the first one, that will get you your rolling display. Of course you can pick any 4 to display.

Every ten clocks you could allow the contents of the digits to change, including the ones which are displayed. What is magic about ten clocks? Every ten clocks you know that the circular shift register returns to its initial condition.
 

Thread Starter

gaff38

Joined Sep 2, 2008
2
Thanks for that but honestly I don't know how to do that. Only started to use VHDL last week and can't get my head around it. I have tried and implmeted small blocks of code and they seem to be fine but have been stuck on this for a few days. If anyone has the code for this I would really appreciate it
 

Papabravo

Joined Feb 24, 2006
21,225
Nobody has this code lying around. You have to start someplace.

You start with the definition of a 4-bit register, to hold one BCD (Binary Coded Decimal) Digit. Then you make ten copies of it. Then you hook the outputs of one of them to the inputs of the next one in line. When you get to the last one you hook the outputs back to the inputs of the first one. Each time the clock comes in you move the digit one position around the loop.
 
Top