I've been learning about interrupts thanks to the fabulous work of Darrel. I've been able to get INT_INT, RX_INT, and RBC_INT working with no problems. But I can't figure out how to get CCP1_INT working. I've looked at others examples and still I am missing something. Will someone please show me how big of an idiot I really am?
I've tried different configuration with TMR1...starting it, stopping it, leaving it out altogether with no luck.
It doesn't get much easier than this....
Code:
'16f628A
DEFINE OSC 20
CMCON = 7
VRCON = 0
TRISB = %00011011
TRISA = %00010000
CCP1CON = %00000101
INCLUDE "DT_INTS-14.bas"
INCLUDE "ReEnterPBP.bas"
clear
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler CCP1_INT, _ToggleLED, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
@ INT_ENABLE CCP1_INT
Mainloop:
pause 1
goto Mainloop
ToggleLED:
TOGGLE PORTA.0
@ INT_RETURN
Bookmarks