Ok, I'm home now.....here are the compile errors...
Error[116] : Address label duplicated or different in second pass (_305AfterUserRoutine)
Error[116] : Address label duplicated or different in second pass (_305NoInt)
Error[116] : Address label duplicated or different in second pass (INT_EXIT)
Error[116] : Address label duplicated or different in second pass (_290OverCREATE)
Error[116] : Address label duplicated or different in second pass (L00001)
Error[116] : Address label duplicated or different in second pass (L00002)
Error[116] : Address label duplicated or different in second pass (L00003)
.....and so on.
Like I say I think it's to do with both interupt handlers being enabled?
Which prompts me, how should two interupt handlers be coded wrt 'returns'. Should it look like this (wrt IOC Interupts, I've stripped it back to basics & removed the disabling/enabling in the interupt handler here.... just for easiness on the eye)
Code:
LED1 VAR PORTB.1
INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler RABC_INT, _Switch_Interupt, PBP, no
INT_Handler TMR1_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
T1CON = $31 ; Prescaler = 8, TMR1ON
@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts
@ INT_ENABLE RABC_INT
Main:
PAUSE 1
GOTO Main
'---[TMR1 - interrupt handler]--------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURN
'---[ioc Interupt Handler]------------------------------------------------------
Switch_Interupt:
TOGGLE LED2
@ INT_RETURN
Many thanks.
Bookmarks