David Nock wrote: > I'm currently having a problem trying to set the config bits of a 16F84. > The setup is as follows : DT001 + TM4 + MPLAB 4.12 + Win95. > MPLAB will program the program memory ok but will always fail when > trying to set the config bits. I've set the config in code using __CONFIG > and also tried setting them in MPLAB. It only seems to be accepting > RC, CP off, PWRT off WDT on. Is there something I'm overlooking or > is it likely that the chip is stuffed? What other bits are you trying to set? Looking at the data sheet the 14 bit configuration word for the 'F84 has the following bits available: Bits 0 & 1 set the Oscillator mode (RC, LP,XT, HS) Bit 2 sets the WatchDog Timer enabled or disabled Bit 3 sets the PoWeR up TimEr enabled or disabled Bit 4 - 13 set Code Protect (all or nothing) I haven't used the 'F84 but it may only be necessary to change Bit 4 rather than all the CP bits as per the 'C84. It may be stating the obvious but if you are using text substitutes for setting the bits e.g. LP, XT etc then they must be defined before you can use them with __CONFIG. e.g. _WDT_ON EQU H'3FFF'. The __CONFIG directive just does a logical AND of your definitions on the CONFIG word to set or clear the required bits. Although you can call these bits what you like, check the standard textual definitions in your 16F84.inc file if you are using one. Dave B