O.K. This is ask really often. Worth to be discussed NOW!
What to do if i get "overwriting previous address content" error message?Where can i find the configuration fuse for my PIC ?
This error is return by PBP because your configuration fuse overwrite 'PBP default'. If you open with notepad, in PBP directory, the .INC file of your PIC, let's say 16F628, the file will look like this
So if you try to define HS oscillator, wich is already define, you'll overwrite the previous content of the PBP setting.Code:;************************************************************** ;* 16F628.INC * ;* * ;* By : Leonard Zerman, Jeff Schmoyer * ;* Notice : Copyright (c) 2002 microEngineering Labs, Inc. * ;* All Rights Reserved * ;* Date : 09/27/02 * ;* Version : 2.43 * ;* Notes : * ;************************************************************** NOLIST ifdef PM_USED LIST include 'M16F62x.INC' ; PM header device pic16F628, xt_osc, wdt_on, pwrt_on, mclr_on, lvp_off, protect_off XALL NOLIST else LIST LIST p = 16F628, r = dec, w = -302 INCLUDE "P16F628.INC" ; MPASM Header __config _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF NOLIST endif LIST
To fix it, just comment those lines :ORCode:;device pic16F628, xt_osc, wdt_on, pwrt_on, mclr_on, lvp_off, protect_offdepending what you are using to compile your code, MPASM or PM.Code:;__config _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
OR some will prefer to edit those line directly... as you wish...
All the configuration fuse are in the according .INC file located in the MPLAB directory. In MPLAB 7.01, the default directory, i suppose, is C:\Program Files\Microchip\MPASM Suite.
If you open the appropriate .INC file, you will find all the configuration fuse for your PIC at the end of the file.
looks like this for a 16F628...only the endCode:;========================================================================== ; ; Configuration Bits ; ;========================================================================== _BODEN_ON EQU H'3FFF' _BODEN_OFF EQU H'3FBF' _CP_ALL EQU H'03FF' _CP_75 EQU H'17FF' _CP_50 EQU H'2BFF' _CP_OFF EQU H'3FFF' _DATA_CP_ON EQU H'3EFF' _DATA_CP_OFF EQU H'3FFF' _PWRTE_OFF EQU H'3FFF' _PWRTE_ON EQU H'3FF7' _WDT_ON EQU H'3FFF' _WDT_OFF EQU H'3FFB' _LVP_ON EQU H'3FFF' _LVP_OFF EQU H'3F7F' _MCLRE_ON EQU H'3FFF' _MCLRE_OFF EQU H'3FDF' _ER_OSC_CLKOUT EQU H'3FFF' _ER_OSC_NOCLKOUT EQU H'3FFE' _INTRC_OSC_CLKOUT EQU H'3FFD' _INTRC_OSC_NOCLKOUT EQU H'3FFC' _EXTCLK_OSC EQU H'3FEF' _LP_OSC EQU H'3FEC' _XT_OSC EQU H'3FED' _HS_OSC EQU H'3FEE' LIST


Reply With Quote

Bookmarks