Well, now that I've switched from PBP2..6 to PBP3 I seem to be having trouble with DT_Interrupts in some "previously working" code. ![Frown](images/smilies/frown.gif)
I've read the manual about migrating from PBP2.6 to 3.0, and have successfully applied it to other programs, but can't seem to get it going on this one.
The chip is a 16F726. It uses DT_interrupts in a touch sensor routine.
The code worked when compiled with PBP2.6 but creates some "ASM Errors" with PBP3
Here's the errors I get:
![Name: errors.gif
Views: 630
Size: 11.4 KB](https://www.picbasic.co.uk/forum/attachment.php?attachmentid=6122&d=1321563883)
Here's my ASM code. First, some config stuff.
Used to be:
Code:
@ __config _CONFIG1, _DEBUG_OFF & _PLL_EN & _BORV_2_5 & _BOR_ON & _CP_OFF & _MCLRE_OFF & _PWRT_EN & _WDT_OFF & _INTOSCIO
@ __config _CONFIG2, _VCAP_RA0
Now looks like:
Code:
#CONFIG
__config _CONFIG1, _DEBUG_OFF & _PLL_EN & _BORV_2_5 & _BOR_ON & _CP_OFF & _MCLRE_OFF & _PWRT_EN & _WDT_OFF & _INTOSCIO
__config _CONFIG2, _VCAP_RA0
#endCONFIG
Then I set up the interrupt. Here's my OLD code for PBP2.6:
Code:
'-----Set up Interrrupts
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1GATE_INT, _CheckCount, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
@ INT_ENABLE TMR1GATE_INT ; enable Timer 2 interrupts
And the NEW code for PBP3:
Code:
'-----Set up Interrrupts
#CONFIG
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1GATE_INT, _CheckCount, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
#ENDCONFIG
#CONFIG
INT_ENABLE TMR1GATE_INT ; enable Timer 1 interrupts
#ENDCONFIG
At the end of my interrupt handler routine I had this:
Which has been changed to this:
Code:
#CONFIG
INT_RETURN
#ENDCONFIG
That'all the ASM there is.
I clearly haven't done it right... could someone point me in the right direction?
Thanks!
Bookmarks