Quote Originally Posted by gmglickman View Post
Code:
 if (pulse < 220) or (pulse > 260) then start
might be a little tight to capture the 240msec AGC pulse at the start. See below.
@ 4MHz, PULSIN has 10µs resolution.

If you need to capture 240msec, then you would have:
Code:
 if (pulse < 22) or (pulse > 26) then start
I did something similar and left PULSIN by side - I use TMR1 instead. Have a look to the "code" section here http://home.citycable.ch/flotulopex/...I_Frames_e.htm

HTH