Bruce,
Thanks for the info on the 18F2431, I just order some today, I like the idea of having less code. My application is where I have a device that puts out two frequencies, and I need to know the frequency difference very accurately between the two of them, such that I am getting on the order the effectiveness of a 20 bit A/D process. I have your code up and running perfectly from the thread you listed earlier (the first code example), it works much better than mine. But I when tried changing the mode for the 2nd capture event from a falling edge to the 16th edge mode, I had odd values, acting like I had captured the 9th edge rather than the 16th, very strange. The only change to your code was going from:
CCP1CON.0 = 0 ' Configure capture for falling edge now
to
CCP1CON = %00000111 ' Capture mode, capture on 16th rising edge
Have you tried this capture mode, or is there something wrong with this simple change.
Cheers,
Terry




Bookmarks