the easiest way, and the most accurate one, will be to use internal timer. Start the timer with a rising or falling edge of your first signal, stop it at the next falling or rising edge, place the result of the counter into a variable, thennn switch to your next signal and do the same test. at the end compare both results
At :
4MHZ you'll have a accuracy of 1uSec
8MHZ you'll have a accuracy of .5uSec
and such
Which PIC are you using ??? at which speed?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks