PBP3 Compile Errors


Closed Thread
Results 1 to 4 of 4
  1. #1

    Default 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

  2. #2


    Did you find this post helpful? Yes | No

    Default 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
    Attached Files Attached Files

  3. #3


    Did you find this post helpful? Yes | No

    Default 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

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default 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

Similar Threads

  1. Bizarre compile errors
    By evildrome in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th September 2014, 00:34
  2. Errors with PBP3 and Microcode 5.0.0.3
    By Ceetee in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 21st October 2013, 13:47
  3. Replies: 1
    Last Post: - 4th April 2013, 02:31
  4. How to Figure Out Compile Errors?
    By RossWaddell in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 25th February 2013, 19:54
  5. Compile errors within macro....
    By forgie in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th September 2005, 20:08

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts