How to resolve assembler error 306?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: How to resolve assembler error 306?

    You have to read the error messages, they will tell you what to comment. then when you open the file, it is also well commented and says stuff like Comment this line if you get error such and such
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: How to resolve assembler error 306?

    Here is a list of my error messages. I don't see what they are telling me that I have to comment out. Are you saying that the well commented lines are in the .lst file after assembly? I am confused as to what file I need to open to read where the lines that need to be commented out are listed.

    Code:
    Error[113]   C:\PBP26\PBPPIC14.LIB 1181 : Symbol not previously defined (wsave)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 476 : ERROR: (wsave variable not found,)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 440 : ERROR: ("                     Add:"       wsave VAR BYTE $70 SYSTEM)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 497 : ERROR: (Chip has RAM in BANK1, but wsave1 was not found.)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 447 : ERROR: ("   Add:"       wsave1 VAR BYTE $A0 SYSTEM, Or change to   wsave BYTE $70 SYSTEM)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 513 : ERROR: (Chip has RAM in BANK2, but wsave2 was not found.)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 454 : ERROR: ("   Add:"       wsave2 VAR BYTE $120 SYSTEM, Or change to   wsave BYTE $70 SYSTEM)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 523 : ERROR: (Chip has RAM in BANK3, but wsave3 was not found.)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 461 : ERROR: ("   Add:"       wsave3 VAR BYTE $1A0 SYSTEM, Or change to   wsave BYTE $70 SYSTEM)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 800 : ERROR: ("INT_Handler" -  Interrupt Flag ( PIR2,LVDIF ) not found.)
    Error[113]   C:\PBP26\PBPPIC14.LIB 449 : Symbol not previously defined (ADCON2)
    Error[113]   C:\PBP26\PBPPIC14.LIB 463 : Symbol not previously defined (ADCON2)
    Error[113]   C:\PBP26\PBPPIC14.LIB 477 : Symbol not previously defined (ADCON2)
    Error[113]   C:\PBP26\PBPPIC14.LIB 491 : Symbol not previously defined (ADCON2)
    Error[113]   C:\PBP26\PBPPIC14.LIB 899 : Symbol not previously defined (ADCON2)
    Error[101]   C:\PBP26\ELLIS_CODES\WIFI\16F886\0DS1337CLOCKEDTEMPWIFI.ASM 800 : ERROR: ("INT_ENABLE" -  Interrupt Flag ( PIR2,LVDIF ) not found.)

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: How to resolve assembler error 306?

    Since version 1.00 of DT_INTS-14, it is best if you DO NOT comment or un-comment lines in the include file.
    Changing the include file can affect compiling with other chips that have different BANK configurations.

    Instead, copy the wsave variables block from the file into your source code, and un-comment the lines that the compiler refers to in the errors.
    Code:
    ;-- 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
    ' --------------------------------------------------------------------------
    The errors you posted indicated to ADD wsave, wsave1, wsave2 and wsave3.
    It also indicated "OR" change to wsave VAR BYTE $70. If you add that line, you don't need the other wsaves.

    So a simple ...
    Code:
    wsave   VAR BYTE    $70     SYSTEM
    in your code will suffice.

    Also, the 16F886 doesn't have a Low Voltage Detect circuit (LVD). So LVD_INT cannot be used.
    DT

  4. #4
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: How to resolve assembler error 306?

    Thanks, Darrel. That solved the problem.
    However, I might suggest that you flag this info on the DT_INTS-14 web site for others that may be having this problem. I checked there first to see if I could find anything related to these errors.
    John Ellis

  5. #5
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: How to resolve assembler error 306?

    Quote Originally Posted by Darrel Taylor View Post
    Also, the 16F886 doesn't have a Low Voltage Detect circuit (LVD). So LVD_INT cannot be used.
    Thanks for pointing that out, Darrel. I see now that I have to find another way to detect low battery voltage. In that regard, I am wondering if their is some way to hook the battery output on my PCB to one of the comparator inputs and comparing it somehow to an internally generated reference voltage. I tried to study the Comparator section of the 16F886 data sheet to see if this was possible, but I got lost in the complexity of the comparator circuits and how to generate a CVref into it from internal circuitry.
    Can you point me to any posts or tutorial that might explain how to do this?

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Not sure, but maybe this thread will help.
    It might look familiar.

    http://www.picbasic.co.uk/forum/showthread.php?t=11489
    DT

  7. #7
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: How to resolve assembler error 306?

    Thanks, Darrel. I am embarassed to say I had forgotten all about this thread

Members who have read this thread : 0

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