Capture is not reliable with Timer1 in asynchronous counter mode. You're also
stopping & clearing Timer1 in your interrupt handler which would cause
problems with capture.
I would change to the 18F4431. This one has a Motion Feedback Module with
capture that uses Timer5, measures pulse widths or frequency, and it's really
easy to use.
The 18F4431 has everything you need.
Bookmarks