Re: Measure time in mS between two pulses
Rough explanation of something.
Use an interrupt to start/stop the timebase/counter. Use a fixed timebase and monitor the timer overflow. at each overflow, increment a variable.
Select a interuptable pin
Set it to rising edge
once the interrupt happen Start the Timebase/counter
At next interrupt. Stop timer and process the maths.
Overflow can be managed with an ISR.
When well done, you can have a really accurate reading in uSec precision or so. Sounds like a OlympicTimer
Last edited by mister_e; - 7th March 2011 at 08:10.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks