I hadd the same problem and here is what I did to remedy it (sorry I used = assembly). It is set up for a specific aplication, but you could change = the bit to meet your needs ;************************************************************ LIST P=3D18F452 #include =09 ; This file has been hacked to be compatible with our programmer, ; There was a problem with the way that the header has the control = registers set up,=20 ; It had them inverted from the values that were actually to be programmed = in. =20 ; Our work around was to set one of the variables to the actual value that = we wanted=20 ; to be in the whole register, and just use that variable, thus, the = variables that=20 ; you see below bear no relation to the actual configuration of the = control registers ; They are now simply dummy names for the assembler. ; The most up-to-date copy of the PIC.INC is going to be kept in the = directory ; Y:\Users\Radar\Programming\PIC Microcontroller\PIC.INC __CONFIG _CONFIG1H, _HS_OSC_1H ;***** NOTE ****** __CONFIG _CONFIG2L, _PWRT_ON_2L ;* If you want * __CONFIG _CONFIG2H, _WDT_OFF_2H ;* to change a * __CONFIG _CONFIG3H, _CCP2MX_ON_3H ;* Configuration * __CONFIG _CONFIG4L, _LVP_OFF_4L ;* Register, * __CONFIG _CONFIG5L, _CP0_OFF_5L ;* do so in the * __CONFIG _CONFIG5H, _CPB_ON_5H ;* PIC.INC file * __CONFIG _CONFIG6L, _WRT0_OFF_6L ;* or in the * __CONFIG _CONFIG6H, _WRTC_OFF_6H ;* Device config * __CONFIG _CONFIG7L, _EBTR0_OFF_7L ;* on the * __CONFIG _CONFIG7H, _EBTRB_OFF_7H ;* Programmer * ;***************** -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu