16LF707 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RE3/MCLR Pin Function Select bit : RE3/MCLR pin function is MCLR
// Code Protection bit : Program memory code protection is disabled
// Brown-out Reset Selection bits : BOR enabled
// Brown-out Reset Voltage Selection bit : Brown-out Reset Voltage (VBOR) set to 1.9 V nominal
// INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
#pragma config FOSC = EXTRC, WDTE = ON, PWRTE = OFF, MCLRE = ON, CP = OFF, BOREN = ON, BORV = 19, PLLEN = ON
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RE3/MCLR Pin Function Select bit : RE3/MCLR pin function is MCLR
// Code Protection bit : Program memory code protection is disabled
// Brown-out Reset Selection bits : BOR enabled
// Brown-out Reset Voltage Selection bit : Brown-out Reset Voltage (VBOR) set to 1.9 V nominal
// INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
#pragma config FOSC = 0x7, WDTE = 0x1, PWRTE = 0x1, MCLRE = 0x1, CP = 0x1, BOREN = 0x3, BORV = 0x1, PLLEN = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RE3/MCLR Pin Function Select bit : RE3/MCLR pin function is MCLR
// Code Protection bit : Program memory code protection is disabled
// Brown-out Reset Selection bits : BOR enabled
// Brown-out Reset Voltage Selection bit : Brown-out Reset Voltage (VBOR) set to 1.9 V nominal
// INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
#pragma config CONFIG = 0x3FFF
For example:
// IDLOC @ 0x2000
#pragma config IDLOC0 = 0x127

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RE3/MCLR Pin Function Select bit : RE3/MCLR pin function is MCLR
; Code Protection bit : Program memory code protection is disabled
; Brown-out Reset Selection bits : BOR enabled
; Brown-out Reset Voltage Selection bit : Brown-out Reset Voltage (VBOR) set to 1.9 V nominal
; INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
config "FOSC" = "EXTRC", "WDTE" = "ON", "PWRTE" = "OFF", "MCLRE" = "ON", "CP" = "OFF", "BOREN" = "ON", "BORV" = "19", "PLLEN" = "ON"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RE3/MCLR Pin Function Select bit : RE3/MCLR pin function is MCLR
; Code Protection bit : Program memory code protection is disabled
; Brown-out Reset Selection bits : BOR enabled
; Brown-out Reset Voltage Selection bit : Brown-out Reset Voltage (VBOR) set to 1.9 V nominal
; INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
config "FOSC" = 0x7, "WDTE" = 0x1, "PWRTE" = 0x1, "MCLRE" = 0x1, "CP" = 0x1, "BOREN" = 0x3, "BORV" = 0x1, "PLLEN" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RE3/MCLR Pin Function Select bit : RE3/MCLR pin function is MCLR
; Code Protection bit : Program memory code protection is disabled
; Brown-out Reset Selection bits : BOR enabled
; Brown-out Reset Voltage Selection bit : Brown-out Reset Voltage (VBOR) set to 1.9 V nominal
; INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
config "CONFIG" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG @ 0x2007
FOSC Oscillator Selection bits
EXTRC RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
EXTRCIO RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN
INTOSC INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN
INTOSCIO INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN pins
EC_OSC EC oscillator: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN
HS_OSC HS oscillator: High Speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
XT_OSC XT oscillator: Crystal/resonator on RA6/OSC2/CLKIN and RA7/OSC1/CLKIN
LP_OSC LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
WDTE Watchdog Timer Enable bit
ON WDT enabled
OFF WDT disabled and can be enabled by SWDTEN bit of the WDTCON register
PWRTE Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
MCLRE RE3/MCLR Pin Function Select bit
ON RE3/MCLR pin function is MCLR
OFF RE3/MCLR pin function is digital input, MCLR internally tied to VDD
CP Code Protection bit
OFF Program memory code protection is disabled
ON Program memory code protection is enabled
BOREN Brown-out Reset Selection bits
ON BOR enabled
NSLEEP BOR enabled during operation and disabled in Sleep
OFF BOR disabled (Preconditioned State)
BORV Brown-out Reset Voltage Selection bit
19 Brown-out Reset Voltage (VBOR) set to 1.9 V nominal
25 Brown-out Reset Voltage (VBOR) set to 2.5 V nominal
PLLEN INTOSC PLLEN Enable Bit
ON INTOSC Frequency is 16 MHz (32x)
OFF INTOSC Frequency is 500 kHz
Register: CONFIG2 @ 0x2008
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003