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 agoI also would like to add a note.
This simple scheme will not work if your sensor output has glitches. If the pulse is like this: .........|*|..|****************| .........|.|..|................| **********.****................|********* you risk to measure the initial glitch and get wrong results. In this case you need a more complex circuit or some other control signal.