PDA

View Full Version : 16F88 and MPLAB fuse setting problem



RFsolution
- 11th February 2012, 21:04
Hi

I try to use a 16F88 with mplab as compiler, i want to use mclr as I/O and the internal oscilator

but i'm getting an error:

error 118 ..... overwriting previous address contents (2007)


; Set fuses:;=========================================== ===============================================@ __config _CONFIG1, _INTRC_IO & _WDT_OFF & _PWRTE_OFF & _MCLR_ON & _LVP_OFF & _CP_OFF@ __config _CONFIG2, _FCMEN_OFF & _IESO_OFF

HenrikOlsson
- 11th February 2012, 22:07
Hi,
If this is with a version prior to PBP3 you must, if you want to have the CONFIG in your code, comment them out in the .inc file located in your PBP folder.
An laternative options is to edit the default CONFIG in the .inc file instead of commenting it out and putting it in your code.

For the 16F88.inc it looks like this

NOLIST
ifdef PM_USED
LIST
include 'M16F88.INC' ; PM header
device pic16F88, hs_osc, wdt_on, lvp_off, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F88, r = dec, w = -302
INCLUDE "P16F88.INC" ; MPASM Header
__config _CONFIG1, _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST
So either put the CONFIGs you want in there, or comment that line out and put them in your code.

If you're using PBP3 then open the manual and have a look at #CONFIG / #ENDCONFIG

/Henrik.