Your pulses seem slow enough that you could do that with a PBP interrupt.
Look at Darrel Taylor's Instant Interrupts.
You could set up a 65mSec (or so) TMR0 interrrupt, and in the ISR, read the state of the input pin, XOR it with the last value you read from that pin (something like "oldpinvalue"), if the XOR value is "1", increment a counter. Then copy the pin's state to oldpinvalue in preparation for the next interrupt.
Since you have a (more or less) precision timer going with the interrupt, you will know exactly how many changes (pulses X 2) you got in any given time interval.
Bookmarks