For reference, I found a missed line when I copied this to here:
Code:'---[CCP1 - interrupt handler]------------------------------------------ Capture: ' Enter here with PulseIN (CCP1) if CCP1CON = %10000101 then ' If rising edge capture, then toggle LED1 CCP1CON = %10000100 ' switch to falling edge goto Over_CCP ' Done, exit endif if CCP1CON = %10000100 then ' If falling edge capture, then toggle LED2 CCP1CON = %10000101 ' switch back to rising edge endif Over_CCP @ INT_RETURN
Bookmarks