-
PBP3 Compile Errors
Can somebody please explain to me why/how the following errors are being generated
after I compile the code shown below these errors?
[ERROR] reenterpbp.bas (95) : Syntax Error
[ERROR] reenterpbp.bas (128) : Syntax Error
[ERROR] reenterpbp.bas (128) : Redefinition of LABEL Vars_Saved
I have looked at the line numbers in the ReEnterpbp.bas file that is "Included" in the code below and I can't figure out
why they are being generated. There is something here that I'm not understanding.
The following code is for a 12F683, zero crossing detection, found and referenced in these forums.
'===12F683======
@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_ON & _FCMEN_OFF & _IESO_OFF & _PWRTE_OFF
CLEAR
OSCCON =%01110001
DEFINE OSC 8
CMCON0 =7
TRISIO =%00001000
GPIO =0
ADCON0 =0
ANSEL =0
CCP1CON=0
ZeroLine VAR GPIO.3
Out VAR GPIO.5
CountVal VAR WORD
INCLUDE "DT_INTS-14_MOD.bas" ; Base Interrupt System ; Attention ! Modified file !
INCLUDE "ReEnterPBP.bas" ; Include if using PBP interrupts
PAUSE 20
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler GPIF_INT, _KES, PBP, yes
endm
INT_CREATE
ENDASM
IOC.3 = 1
@ INT_ENABLE GPIF_INT
Begin:
CountVal=0
Start:
SELECT CASE CountVal
CASE IS > 200
CountVal=0
CASE IS > 100
Out=0
CASE IS > 50
Out=1
END SELECT
GOTO Start
KES:
IF ZeroLine THEN CountVal=CountVal + 1
@ INT_RETURN
END
Thanks!
HJ
-
1 Attachment(s)
Re: PBP3 Compile Errors
Hi
Try using the attached file in place of yours. Rename it .bas, I can't remember why but I had this one labeled as DT_INTS-683.bas. I think there are some variable names that changed
-
Re: PBP3 Compile Errors
Thank you for the file...but...it didn't work after renaming your file, placing it
in the PBP3 directory and changing the file name after the #INCLUDE statement.
Any thoughts....??
Thanks!
HJ
-
Re: PBP3 Compile Errors
please use code tags
you have not provided wsave vars
the config directive you have used will not compile in pbp3 ,its wrong
so what is INCLUDE "DT_INTS-14_MOD.bas" ; Base Interrupt System ; Attention ! Modified file ! , whats in it
GPIF_INT ??? dt ints has no such interrupt
this will compile , but will it work ?
Code:
'===12F683======
#CONFIG
__config _INTOSCIO & _WDT_ON & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOD_ON & _IESO_ON & _FCMEN_ON
#ENDCONFIG
CLEAR
OSCCON =%01110001
DEFINE OSC 8
CMCON0 =7
TRISIO =%00001000
GPIO =0
ADCON0 =0
ANSEL =0
CCP1CON=0
ZeroLine VAR GPIO.3
Out VAR GPIO.5
CountVal VAR WORD
INCLUDE "DT_INTS-14.bas" ; Base Interrupt System ; Attention ! Modified file !
INCLUDE "ReEnterPBP.bas" ; Include if using PBP interrupts
;-- Place a copy of these variables in your Main program -------------------
;-- The compiler will tell you which lines to un-comment --
;-- Do Not un-comment these lines --
;---------------------------------------------------------------------------
wsave VAR BYTE $20 SYSTEM ' location for W if in bank0
;wsave VAR BYTE $70 SYSTEM ' alternate save location for W
' if using $70, comment wsave1-3
' --- IF any of these three lines cause an error ?? ------------------------
' Comment them out to fix the problem ----
' -- Which variables are needed, depends on the Chip you are using --
wsave1 VAR BYTE $A0 SYSTEM ' location for W if in bank1
;wsave2 VAR BYTE $120 SYSTEM ' location for W if in bank2
;wsave3 VAR BYTE $1A0 SYSTEM ' location for W if in bank3
' --------------------------------------------------------------------------
PAUSE 20
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler GPC_INT, _KES, PBP, yes
endm
INT_CREATE
ENDASM
IOC.3 = 1
@ INT_ENABLE GPC_INT
Begin:
CountVal=0
Start:
SELECT CASE CountVal
CASE IS > 200
CountVal=0
CASE IS > 100
Out=0
CASE IS > 50
Out=1
END SELECT
GOTO Start
KES:
IF ZeroLine THEN CountVal=CountVal + 1
@ INT_RETURN
END