It won't work the way you want it to work... Not all of those CONFIG options are location in CONFIG1, some are located CONFIG2L, CONFIG2H, and so on and so on...
And since I'm not 100% sure which PIC you're using, I can't tell you which option goes where.
This is one of my old config setups for a PIC18F4620.
Code:
@ __CONFIG _CONFIG1H, _OSC_HSPLL_1H & _FCMEN_ON_1H & _IESO_ON_1H
;_HSC_1H=HS, HSPLL_1H=PLL '4xPLL on, failsafe/switch-over on
@ __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOREN_OFF_2L & _BORV_3_2L
;powerup timer on, brown out off
@ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32768_2H
;'wdt off
@ __CONFIG _CONFIG3H, _MCLRE_OFF_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_PORTC_3H
;mclr is i/o, t1osc off, porta digital
@ __CONFIG _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
;stack overflow , lvp off, xinst off, debug off
@ __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
;all code protection, eeprom write protection off
@ __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
@ __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
@ __CONFIG _CONFIG6H, _WRTB_OFF_6H & _WRTC_OFF_6H & _WRTD_OFF_6H
@ __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
@ __CONFIG _CONFIG7H, _EBTRB_OFF_7H
EDIT: Just noticed the 'Overwriting.....(2007) error... So, yes, it is a 16F... Kinda hard to get that error with an 18F...
Bookmarks