PIC16F887 configuration bits The configuration words set the oscillator, the watchdog, the power-up timer, brown-out reset, low-voltage programming and code protection. Pick a setting and the word below updates; the starting values are the defaults in Microchip's device file. In XC8 each setting is a #pragma config NAME = SETTING line.
CONFIG1 · 0x2007 0x3FFF default 0x3FFF DEBUG In-Circuit Debugger Mode bit In_Circuit Debugger enabled, RB6/ICSPCLK and RB7/ICSPDAT are dedicated to the debugger In-Circuit Debugger disabled, RB6/ICSPCLK and RB7/ICSPDAT are general purpose I/O pins LVP Low Voltage Programming Enable bit RB3 pin has digital I/O, HV on MCLR must be used for programming RB3/PGM pin has PGM function, low voltage programming enabled FCMEN Fail-Safe Clock Monitor Enabled bit Fail-Safe Clock Monitor is disabled Fail-Safe Clock Monitor is enabled IESO Internal External Switchover bit Internal/External Switchover mode is disabled Internal/External Switchover mode is enabled BODEN Brown Out Reset Selection bits BOR disabled BOR controlled by SBOREN bit of the PCON register BOR enabled during operation and disabled in Sleep BOR enabled CPD Data Code Protection bit Data memory code protection is enabled Data memory code protection is disabled CP Code Protection bit Program memory code protection is enabled Program memory code protection is disabled MCLRE RE3/MCLR pin function select bit RE3/MCLR pin function is digital input, MCLR internally tied to VDD RE3/MCLR pin function is MCLR PWRTE Power-up Timer Enable bit PWRT enabled PWRT disabled WDTE Watchdog Timer Enable bit WDT disabled and can be enabled by SWDTEN bit of the WDTCON register WDT enabled OSC Oscillator Selection bits LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN EC: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN CONFIG2 · 0x2008 0x3FFF default 0x3FFF WRT Flash Program Memory Self Write Enable bits 0000h to 0FFFh write protected, 1000h to 1FFFh may be modified by EECON control 0000h to 07FFh write protected, 0800h to 1FFFh may be modified by EECON control 0000h to 00FFh write protected, 0100h to 1FFFh may be modified by EECON control Write protection off BOR4V Brown-out Reset Selection bit Brown-out Reset set to 2.1V Brown-out Reset set to 4.0V