"symbol not previously defined" on 16F1933 - fuse issue i think


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

    Default "symbol not previously defined" on 16F1933 - fuse issue i think

    ok, i write 3 lines of code and already i get an error...

    Code:
    ERROR[113] blah.asm 328: Symbol not previously defined (_CONFIG1)
    ERROR[126] blah.asm 328: Argument out of range (not valid config register address)
    ERROR[113] blah.asm 334: Symbol not previously defined (_CONFIG2)
    ERROR[126] blah.asm 334: Argument out of range (not valid config register address)
    and my code...

    Code:
    Define  OSC				32					' Set clock speed
    @ __config __CONFIG1, _FOSC_INTOSC & _WDTE_NSLEEP & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _IESO_OFF & _FCMEN_ON
    @ __config __CONFIG2, _VCAPEN_OFF & _PLLEN_ON & _STVREN_ON & _BORV_25 & _LVP_OFF
    In P16F1933.INC in the MPASM SUITE folder it says...

    Code:
    ;==========================================================================
    ;
    ;       Configuration Bits
    ;
    ;   NAME            Address
    ;   CONFIG1           8007h
    ;   CONFIG2           8008h
    ;
    ;==========================================================================
    
    ; The following is an assignment of address values for all of the
    ; configuration registers for the purpose of table reads
    _CONFIG1         EQU  H'8007'
    _CONFIG2         EQU  H'8008'
    ok, i have no idea...
    Can someone shed some light please. Thanks

    :additional
    I checked the datasheet, the config word addresses are correct...
    Last edited by comwarrior; - 2nd January 2011 at 03:26. Reason: additional info

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    @ __config __CONFIG2, _VCAPEN_OFF & _PLLEN_ON & _STVREN_ON & _BORV_25 & _LVP_OFF
    Try getting rid of the items in red.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Get rid of the double undescores before CONFIG1 and CONFIG2.
    Code:
    @ __config _CONFIG1, _FOSC_INTOSC & _WDTE_NSLEEP & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _IESO_OFF & _FCMEN_ON
    @ __config _CONFIG2, _VCAPEN_OFF & _PLLEN_ON & _STVREN_ON & _BORV_25 & _LVP_OFF
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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