The original design was based around this article pub. in Electronic Design but Capture and Interrupt added, also LCD display.Hi Max,
I have used capture mode (Not on a PIC18 but on a PIC16F628 ) to measure RPM. If the time of a revolution is less than about 0.5 seconds (120 RPM) then it waits for the next revolution after 0.5 second has elapsed and divides the elapsed time by the number of revolutions thus averaging over between 0.5 and 1 second. The source code is here.
Les.
Max.