Altera_Forum
Honored Contributor
13 years agoVHDL for a Digital rev counter
I am trying to constructed a digital rev couter from a previous project ( a digital read but analogue displayed rev counter in VHDL) the number of pulses are counter in a location that is defined as an integer (0 to 65536)
I will be outputting the value that's in this integer on 4 7 segment displays. As i understand i can just devide the amount in the integer by 1000 to get thousand's and then the remainder by devied 100 to get the hundered's and the then the remainder of that divided by 10 to get the 10's but i have no idea on what to do next, would some one be able to suggest some code to make this alot easier. I was thinking if you replaced the integer with a (0 to 15) std_logic_vector then i might be able to just split the (0 to 15) in to (0 to 3)(4 to 7)(8 to 11) & (12 to 15) convert the binary to BCD in to the 4 7 segments. Would this work? Many thanks http://www.alteraforum.com/forum//images/icons/icon7.gif