Quote Originally Posted by CluckShot View Post
It is fairly simple to produce a disk which provides a pulse which is say 5 degrees wide of a rotation. This pulse can be measured relative to the width of the pulse in time. The resulting time will tell by calculation the RPM of the disk. I am wanting to do such a thing and wondered if anyone out there knew the best way to measure this pulse width. The RPM may vary greatly and as such the time probably needs to be a 14 or 16 bit time value. I have an PIC18F4620 chip I am working on.

Ideas Please!
So, what's your hardware actually going to look like? How are you wanting to drive the pulse input from the wheel? IR? Beam-breaker? Hall effect?

When you can get a good pulse coming from the disk, you can time the difference between the pulses, 1st pulse starts the timer, 2nd pulse stops the timer, saves the value, code resets the timer/counter and awaits the 3rd (actually back to the 1st) pulse.
Use any 16 bit timer with a pre- and/or post -scaler.
Just as an example here...if the rpm gets too great, the pulses get too close together, less than 256 counts, you could turn down the prescaler (down to a point anyways) to make the timer 'more accurate' for those speeds.
If the rpm falls off, and you get close to maxing out the timer/counter, say above 50,000, and you could turn up the prescaler to make the timer 'less accurate'. The accuracy won't be changing, but the method in which you calculate the rpm will.