16F721 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : EC oscillator: CLKO function on RA4/CLKO pin, CLKI on RA5/CLKI
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RA3/MCLR/VPP Pin Function Select bit : RA3/MCLR/VPP pin function is MCLR; Weak pull-up enabled.
// Flash Program Memory Code Protection bit : Code protection off
// Brown-out Reset Enable bits : Brown-out Reset enabled
// INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
#pragma config FOSC = ECCLK, WDTE = ON, PWRTE = OFF, MCLRE = ON, CP = OFF, BOREN = ON, PLLEN = ON
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : EC oscillator: CLKO function on RA4/CLKO pin, CLKI on RA5/CLKI
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RA3/MCLR/VPP Pin Function Select bit : RA3/MCLR/VPP pin function is MCLR; Weak pull-up enabled.
// Flash Program Memory Code Protection bit : Code protection off
// Brown-out Reset Enable bits : Brown-out Reset enabled
// INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
#pragma config FOSC = 0x3, WDTE = 0x1, PWRTE = 0x1, MCLRE = 0x1, CP = 0x1, BOREN = 0x3, PLLEN = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : EC oscillator: CLKO function on RA4/CLKO pin, CLKI on RA5/CLKI
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RA3/MCLR/VPP Pin Function Select bit : RA3/MCLR/VPP pin function is MCLR; Weak pull-up enabled.
// Flash Program Memory Code Protection bit : Code protection off
// Brown-out Reset Enable bits : Brown-out Reset enabled
// INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
#pragma config CONFIG1 = 0x3FFF
For example:
// IDLOC @ 0x2000
#pragma config IDLOC0 = 0x127

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator Selection bits : EC oscillator: CLKO function on RA4/CLKO pin, CLKI on RA5/CLKI
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RA3/MCLR/VPP Pin Function Select bit : RA3/MCLR/VPP pin function is MCLR; Weak pull-up enabled.
; Flash Program Memory Code Protection bit : Code protection off
; Brown-out Reset Enable bits : Brown-out Reset enabled
; INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
config "FOSC" = "ECCLK", "WDTE" = "ON", "PWRTE" = "OFF", "MCLRE" = "ON", "CP" = "OFF", "BOREN" = "ON", "PLLEN" = "ON"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : EC oscillator: CLKO function on RA4/CLKO pin, CLKI on RA5/CLKI
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RA3/MCLR/VPP Pin Function Select bit : RA3/MCLR/VPP pin function is MCLR; Weak pull-up enabled.
; Flash Program Memory Code Protection bit : Code protection off
; Brown-out Reset Enable bits : Brown-out Reset enabled
; INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
config "FOSC" = 0x3, "WDTE" = 0x1, "PWRTE" = 0x1, "MCLRE" = 0x1, "CP" = 0x1, "BOREN" = 0x3, "PLLEN" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : EC oscillator: CLKO function on RA4/CLKO pin, CLKI on RA5/CLKI
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RA3/MCLR/VPP Pin Function Select bit : RA3/MCLR/VPP pin function is MCLR; Weak pull-up enabled.
; Flash Program Memory Code Protection bit : Code protection off
; Brown-out Reset Enable bits : Brown-out Reset enabled
; INTOSC PLLEN Enable Bit : INTOSC Frequency is 16 MHz (32x)
config "CONFIG1" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG1 @ 0x2007
FOSC Oscillator Selection bits
ECCLK EC oscillator: CLKO function on RA4/CLKO pin, CLKI on RA5/CLKI
ECIO EC oscillator: I/O function on RA4/CLKO pin, CLKI on RA5/CLKI
INTOSCCLK INTOSC oscillator: CLKO function on RA4/CLKO pin, I/O function on RA5/CLKI
INTOSCIO INTOSCIO oscillator: I/O function on RA4/CLKO pin, I/O function on RA5/CLKI
WDTE Watchdog Timer Enable bit
OFF WDT disabled
ON WDT enabled
PWRTE Power-up Timer Enable bit
ON PWRT enabled
OFF PWRT disabled
MCLRE RA3/MCLR/VPP Pin Function Select bit
ON RA3/MCLR/VPP pin function is MCLR; Weak pull-up enabled.
OFF RA3/MCLR/VPP pin function is digital input; MCLR internally disabled; Weak pull-up disabled
CP Flash Program Memory Code Protection bit
ON 0000h to 0FFFh code protection on
OFF Code protection off
BOREN Brown-out Reset Enable bits
OFF Brown-out Reset disabled (Preconditioned State)
NSLEEP Brown-out Reset enabled during operation and disabled in Sleep
ON Brown-out Reset enabled
PLLEN INTOSC PLLEN Enable Bit
OFF INTOSC Frequency is 500 kHz
ON INTOSC Frequency is 16 MHz (32x)
Register: CONFIG2 @ 0x2008
WRTEN Flash memory self-write protection bits
OFF Write protection off
BOOT 0h to 1FFh of flash memory write protected, 200h to FFFh may be modified
HALF 0h to 7FFh of flash memory write protected, 800h to FFFh may be modified
FULL 0h to FFFh of flash memory write protected, no address may be modified
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003