Hi Darrel.
Well, with 3 toddlers running around till 10.30 pm sure I will have double CLEAR commands to clear my mind!
OK I moved the IOCB/WPUB before GOTO main but still no Interrupts occur.
In fact is second or third try with different controller that I cannot make an interrupt on change to work... Not lucky I guess.
The latest test code is this:
Thanks for the efforts.Code:t1con=%00000000 '65,535ms interrupt time base IOCB=%00010000 'Enable IOC on PortB.4 WPUB=%00010000 'Enable weak pull up on PortB.4 goto main '------------- INTERRUPTS SETUP --------------------- ASM INT_LIST macro; IntSource, Label, Type, ResetFlag? INT_Handler RBC_INT, _IOC2, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM @ INT_ENABLE RBC_INT ; Enable Port B on change '------------- INTERRUPTS SETUP --------------------- IOC2: high portb.1 if portb.4 then high portb.0 else low portb.0 endif @ INT_RETURN main: while 1 toggle portb.2 pause 1000 wend
Ioannis




Bookmarks