Hi John, Which column does the "__CONFIG(" statement start on - it cannot be the first one, it should be the second or another one. Three other things to be aware of: 1. Where did you get the constants in the config statement? Looking at my copy of pic16f6x.h, I see: /*watchdog*/ #define WDTEN 0xFFFF // enable watchdog timer #define WDTDIS 0xFFFB // disable watchdog timer /*power up timer*/ #define PWRTEN 0xFFF7 // enable power up timer #define PWRTDIS 0xFFFF // disable power up timer /*MCLRE section*/ #define MCLREN 0xFFFF // memory clear enable #define MCLRDIS 0xFFDF // disable memory clear //alternately #define MCLRIO 0xFFDF // use MCLRDIS /*brown out reset*/ #define BOREN 0xFFFF // enable brown out reset #define BORDIS 0xFFBF // disable brown out reset /*low voltage programming*/ #define LVPEN 0xFFFF // low voltage programming enable #define LVPDIS 0xFF7F // low voltage programming disabled /*data code protection*/ #define DP 0xFEFF // protect the data code // alternative definitions #define DATPROT 0xFEFF // use DP #define DATUNPROT 0xFFFF // use UNPROTECT /*code protection*/ #define UNPROTECT 0xFFFF // do not protect the code #define PROTECT 0xC3FF // protect the program code /* Code protection for 2K program memory */ #ifdef _16F628 #define PROTECT75 0xD7FF /* Protects from 0200h-07ffh */ #define PROTECT50 0xEBFF /* Protects from 0400h-07ffh */ #else /* Code protection for 1K program memory */ #define PROTECT50 0xD7FF /* Protects from 0200h-03ffh */ #endif /*osc configurations*/ #define ER 0xFFFF /* external resistor, CLKOUT on CLKOUT pin, R on CLKIN */ #define ERIO 0xFFFE /* external resistor, IO fn on CLKOUT pin, R on CLKIN */ #define INT 0xFFFD /* internal resistor/capacitor, CLKOUT on CLKOUT pin, IO on CLKIN */ #define INTIO 0xFFFC /* internal resistor/capacitor, IO fn on CLKOUT pin, IO on CLKIN */ #define EC 0xFFEF /* external clock in, IO fn on CLKOUT pin, CLKIN on CLKIN */ #define HS 0xFFEE /* high speed crystal */ #define XT 0xFFED /* crystal/resonator */ #define LP 0xFFEC /* low power crystal */ From this, I would be expecting that you would want to be using: PWRTEN, MCLREN and UNPROTECT. Only the last one matches what I have. 2. You must AND the values in the __CONFIG statement together, not OR them. If you OR them (see the values above), you will get the 0x03FFF that you're seeing now. 3. You should always define *EVERY* configuration fuse, even if you're not using them. For the PS+, I would recommend something like: __CONFIG(WDTDIS & PWRTEN & MCLREN & BORDIS & LVPDIS & DATUNPROT & UNPROTECT & XT) In this, I have defined the WDT, PWRTE, _MCLR Enabled (comments in pic16F627.h are wrong), Brown out Reset Disabled, Low Voltage Programming Disabled, No protection for Data EEPROM, No Code Protection and XT oscillator. Hopefully this helps. Good luck, myke ----- Original Message ----- From: "John Walshe" To: Sent: Friday, August 23, 2002 10:22 AM Subject: Re: [PIC]: PS+ problem programming a 16F628 > Hi Olin, > As you suspect I don't have the config directive - I usually use the > picstart dialog box. So seeing your comment I went to the PICC manual and > got the format. I tried this in my code just to see > #include > __CONFIG( PWRTE|MCLRE|UNPROTECT ); > > and it won't compile! saying I'm missing a ) > I can't for the life of me see where it is missing! > any ideas? > > John > > oh btw, I'm using HiTech PICC v7.86PL3 so the pipe symbol is correct in the > command I believe > *************************************************************** > John.Walshe@inpactmicro.com > > INPACT MICROELECTRONICS (Irl) Ltd > 21A Pouladuff Road, > Cork, > Ireland, > > Tel: +353 21 4318296 > Fax: +353 21 4318980 > > WWW.INPACTMICRO.COM > *************************************************************** > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body