line

Jake's Electronics

a place to document

line

Configuration Word for PIC16F882/883/884/886/887

Select Device:

   PIC16F882

   PIC16F883

   PIC16F884

   PIC16F886

   PIC16F887

Configuration Word Register 1 (ADDRESS 2007h)
DEBUG
LVP
FCMEN
IESO
BOREN1
BOREN0
CPD
CP
MCLRE
PWRTE
WDTE
FOSC2
FOSC1
FOSC0
bit 13
bit 0

bit 15-14:

Unimplemented: Read as '1'

bit 13:

DEBUG: In-Circuit Debugger Mode bit

   1 = In-Circuit Debugger disabled, RB6/ICSPCLK and RB7/ICSPDAT are general purpose I/O pins

   0 = In-Circuit Debugger enabled, RB6/ICSPCLK and RB7/ICSPDAT are dedicated to the debugger

bit 12:

LVP: Low Voltage Programming Enable bit

   1 = RB3/PGM pin has PGM function, low voltage programming enabled

   0 = RB3 pin is digital I/O, HV on MCLR must be used for programming

bit 11:

FCMEN: Fail-Safe Clock Monitor Enabled bit

   1 = Fail-Safe Clock Monitor is enabled

   0 = Fail-Safe Clock Monitor is disabled

bit 10:

IESO: Internal External Switchover bit

   1 = Internal/External Switchover mode is enabled

   0 = Internal/External Switchover mode is disabled

bit 9-8:

BOREN<1:0>: Brown-out Reset Selection bits (1)

   11 = BOR enabled

   10 = BOR enabled during operation and disabled in Sleep

   01 = BOR controlled by SBOREN bit of the PCON register

   00 = BOR disabled

bit 7:

CPD: Data Code Protection bit (2)

   1 = Data memory code protection is disabled

   0 = Data memory code protection is enabled

bit 6:

CP: Code Protection bit (3)

   1 = Program memory code protection is disabled

   0 = Program memory code protection is enabled

bit 5:

MCLRE: RE3/MCLR pin function select bit(4)

   1 = RE3/MCLR pin function is MCLR

   0 = RE3/MCLR pin function is digital input, MCLR internally tied to VDD

bit 4:

PWRTE: Power-up Timer Enable bit

   1 = PWRT disabled

   0 = PWRT enabled

bit 3:

WDTE: Watchdog Timer Enable bit

   1 = WDT enabled

   0 = WDT disabled and can be enabled by SWDTEN bit of the WDTCON register

bit 2-0:

FOSC<2:0>: Oscillator Selection bits

   111 = RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN

   110 = RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN

   101 = INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN

   100 = INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN

   011 = EC: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN

   010 = HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN

   001 = XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN

   000 = LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN

Notes
1:
Enabling Brown-out Reset does not automatically enable Power-up Timer.
 
2:
The entire data EEPROM will be erased when the code protection is turned off.
 
3:
The entire program memory will be erased when the code protection is turned off.
 
4:
When MCLR is asserted in INTOSC or RC mode, the internal clock oscillator is disabled.

Configuration Word Register 2 (ADDRESS 2008h)
_
_
_
WRT1
WRT0
BOR4V
_
_
_
_
_
_
_
_
bit 13
bit 0

bit 15-11:

Unimplemented: Read as '1'

bit 10-9:

WRT<1:0>: Flash Program Memory Self Write Enable bits

PIC16F883/PIC16F884

   00 = 0000h to 07FFh write protected, 0800h to 0FFFh may be modified by EECON control

   01 = 0000h to 03FFh write protected, 0400h to 0FFFh may be modified by EECON control

   10 = 0000h to 00FFh write protected, 0100h to 0FFFh may be modified by EECON control

   11 = Write protection off

PIC16F886/PIC16F887

   00 = 0000h to 0FFFh write protected, 1000h to 1FFFh may be modified by EECON control

   01 = 0000h to 07FFh write protected, 0800h to 1FFFh may be modified by EECON control

   10 = 0000h to 00FFh write protected, 0100h to 1FFFh may be modified by EECON control

   11 = Write protection off

PIC16F882

   00 = 0000h to 03FFh write protected, 0400h to 07FFh may be modified by EECON control

   01 = 0000h to 00FFh write protected, 0100h to 07FFh may be modified by EECON control

   10 = Not Used, (this generator will default to 11 to prevent build error with this device)

   11 = Write protection off

bit 8:

BOR4V: Brown-out Reset Selection bit

   0 = Brown-out Reset set to 2.1V

   1 = Brown-out Reset set to 4.0V

bit 7-0:

Unimplemented: Read as '1'

Complete Header with Configuration Word and Pin Diagram:

line