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
15 years agoAssuming the sensor output has no glitches, it still can't drive the enable signal or the result register directly, because it's asynchronous to the system clock. It must be synchronized first, otherwise you'll get a certain amount of incorrect readings.