Forum Discussion
Altera_Forum
Honored Contributor
15 years agoVHDL timer
hi, how can I write a program for a timer which Measures a pulse width that represents of range.i'm using un ultrasonic sensor, The distance can be calculated using the scale factor of 147u...
Altera_Forum
Honored Contributor
13 years agoThe code logic and structure by itself is the same so, you can almost just take each line and change it to it's VHDL equivalent. Why don't you try it and show us what you wrote, if you have more questions? It is really basic VHDL.
The only big difference in VHDL is that you will have to put everything in a process, and specify that you want it executed on the rising edge of clk.