_config set change for pic12f683


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Location
    Colorado, USA
    Posts
    10

    Default _config set change for pic12f683

    Admit I am novice. Using MpLab IDE, PicBasic Pro, Pic12f683, pickit2 programmer. Need 5 I/O pins for project and trying to use GPIO.3 as input but need to set MCLRE off. So using __config directive as stated in www.melabs.com/support/config_defaults.htm

    @__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF

    Placed directive at start of Source program and my understanding is this would override any .inc header default cmds. Doesn't. Won't compile and recieve error massage

    Error Unable to execute mpasmwin. Warning [205] c:\PBP|Buttoncmd.asm 94: Found directive in column 1. (__config)
    Error [118] c:\PBP|Buttoncmd.asm 94: Overwriting previous address contects (2007)

    Understand error 108 that my program is trying to write into address with default bit already set ... but I thougt assembly line _config directive should override. Not sure what warning [205] is saying.

    Did homework in your FAQ and commented out _config in .inc header for the Pic12f683 MPASM assembler as suggested but made no difference.

    Can overcome by switching to pic chip with more I/O ports so avoid pin with MCLRE and use general I/O pin set for input to allow for button. BUT really trying to understand what is going on. So any input or direction to iinput that could help would be appreciated.

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


    Did you find this post helpful? Yes | No

    Default

    Try adding a space
    Not this...
    @__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF

    This...
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2009
    Location
    Colorado, USA
    Posts
    10


    Did you find this post helpful? Yes | No

    Default _config set change

    Thanks, I place space between @ _config and that cleared up the warning [205] but the critical error [118] remains.

    Error [118] c:\PBP\Buttoncmd.asm 94: overwriting prvious address contects (2007)

    Apparently writing via _config directive doesn't override existing code at 2007h address. I have tried in vain to comment out existing config settings in .inc file but that also seems to not to help.

    Any further help appreciated ... any other way to change configuration bit settings via MPLAB IDE v8.46 ...

    Thanks for any help

  4. #4
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default

    I too, am fairly new at this.

    I also use the PICKIT2... You can change the configuration bits manually just before programming.

    (now, this may not work with your existing work flow. If you are set up to compile and burn the chip you will need to figure out how to just compile and then manually load the .hex file in the pickit2 program window)

    Then after you load the hex file BUT before you click the "write" button... look up and find the link labeled "Configuration". (just under the HELP dropdown) By clicking this link you can then change bit 5 from 1 to a 0 and then burn you chip. (you must do this each and every time you burn the chip. This way you have manual control of all the configuration bits (fuses) until you figure out how to include the correct statement in your program. (see page 84 of the 12F683 .pdf)

    Hope this helps
    Dwight

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


    Did you find this post helpful? Yes | No

    Default

    When setting the configs in program space you will need to open the PICs *.inc file in the PBP directory and comment out the config lines there.

    This thread explains it
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Dave
    Always wear safety glasses while programming.

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