Hmm...I don't think so. As the velocity increases the time between any two pulses (ie the time it takes to travel 15.68") decreases so your calculated mph value will decrease as the speed increase....If I measure the time it takes to travel 15.68" and multiply it by 4040.82, I should have the mph.
You can easily count pulses for a set period using one of the timers as a counter and another as a timebase. This would not lock up the processor. To determine the most suitable aproach (or possibly if two different aproaches is needed as outlines earlier) it would be nice to know the answers to the following:
1) What's your desired min/max velocity, and please don't say 0?
2) What kind of resolution do you need?
3) How often must the display update?
/Henrik.




Bookmarks