25000 rpm is 417rps(econd). Since the resultant count over a 1 second period is 8.5 x the actual head speed in rps, you can count input pulses for 118mS (1/8.5 second) to get the head speed value, which would result in a number between 0 and 49 revolutions. Multiply this by 60, and you'll get your result in head RPM to output to your display (a surplus Hitachi-44780 LCD display may be much easier to implement).Originally Posted by zipphreak
You could use timer1 configured as a counter with an external clock signal, which should happily continue to count with hardware while you execute a time delay with PAUSE 118. When the time delay is over, you could stop the timer, read and clear it, do the math on the result, and send to your display.
--------------------Picster-------------------
Bookmarks