not sure your ioc solution will work
the ioc interrupt flag pir0.4 is not being cleared . you only clear the ioc pin flag, its not enough.
not sure your ioc solution will work
the ioc interrupt flag pir0.4 is not being cleared . you only clear the ioc pin flag, its not enough.
Warning I'm not a teacher
The IOC may not work. I had those in DT_INTS when I was trying to use that instead of CCP. I will have to go back and address that.
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