PIC16F87X
REGISTER 12-1: CONFIGURATION WORD
CP1 CP0 DEBUG
bit13
—
WRT CPD LVP BODEN CP1 CP0 PWRTE WDTE F0SC1 F0SC0
bit0
Register: CONFIG
Address 2007h
bit 13-12:
(2)
bit 5-4: CP1:CP0: Flash Program Memory Code Protection bits
11= Code protection off
10= 1F00h to 1FFFh code protected (PIC16F877, 876)
10= 0F00h to 0FFFh code protected (PIC16F874, 873)
01= 1000h to 1FFFh code protected (PIC16F877, 876)
01= 0800h to 0FFFh code protected (PIC16F874, 873)
00= 0000h to 1FFFh code protected (PIC16F877, 876)
00= 0000h to 0FFFh code protected (PIC16F874, 873)
bit 11:
DEBUG: In-Circuit Debugger Mode
1= In-Circuit Debugger disabled, RB6 and RB7 are general purpose I/O pins.
0= In-Circuit Debugger enabled, RB6 and RB7 are dedicated to the debugger.
bit 10:
bit 9:
Unimplemented: Read as ‘1’
WRT: Flash Program Memory Write Enable
1= Unprotected program memory may be written to by EECON control
0= Unprotected program memory may not be written to by EECON control
bit 8:
bit 7:
bit 6:
bit 3:
bit 2:
CPD: Data EE Memory Code Protection
1= Code protection off
0= Data EEPROM memory code protected
LVP: Low Voltage In-Circuit Serial Programming Enable bit
1= RB3/PGM pin has PGM function, low voltage programming enabled
0= RB3 is digital I/O, HV on MCLR must be used for programming
(1)
BODEN: Brown-out Reset Enable bit
1= BOR enabled
0= BOR disabled
(1)
PWRTE: Power-up Timer Enable bit
1= PWRT disabled
0= PWRT enabled
WDTE: Watchdog Timer Enable bit
1= WDT enabled
0= WDT disabled
bit 1-0: FOSC1:FOSC0: Oscillator Selection bits
11= RC oscillator
10= HS oscillator
01= XT oscillator
00= LP oscillator
Note 1: Enabling Brown-out Reset automatically enables Power-up Timer (PWRT), regardless of the value of bit PWRTE. Ensure the
Power-up Timer is enabled anytime Brown-out Reset is enabled.
2: All of the CP1:CP0 pairs have to be given the same value to enable the code protection scheme listed.
DS30292B-page 122
1999 Microchip Technology Inc.