10F322 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : EC: CLKIN function enabled
// Brown-out Reset Enable : Brown-out Reset enabled
// Watchdog Timer Enable : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// MCLR Pin Function Select bit : MCLR pin function is MCLR
// Code Protection bit : Program memory code protection is disabled
// Low-Voltage Programming Enable : Low-voltage programming enabled
// Brown-out Reset Selection bits : BOR enabled
// Brown-out Reset Voltage Selection : Brown-out Reset Voltage (Vbor), low trip point selected.
// Flash Memory Self-Write Protection : Write protection off
#pragma config FOSC = EC, BOREN = ON, WDTE = ON, PWRTE = OFF, MCLRE = ON, CP = OFF, LVP = ON, LPBOR = ON, BORV = LO, WRT = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : EC: CLKIN function enabled
// Brown-out Reset Enable : Brown-out Reset enabled
// Watchdog Timer Enable : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// MCLR Pin Function Select bit : MCLR pin function is MCLR
// Code Protection bit : Program memory code protection is disabled
// Low-Voltage Programming Enable : Low-voltage programming enabled
// Brown-out Reset Selection bits : BOR enabled
// Brown-out Reset Voltage Selection : Brown-out Reset Voltage (Vbor), low trip point selected.
// Flash Memory Self-Write Protection : Write protection off
#pragma config FOSC = 0x1, BOREN = 0x3, WDTE = 0x3, PWRTE = 0x1, MCLRE = 0x1, CP = 0x1, LVP = 0x1, LPBOR = 0x1, BORV = 0x1, WRT = 0x3
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : EC: CLKIN function enabled
// Brown-out Reset Enable : Brown-out Reset enabled
// Watchdog Timer Enable : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// MCLR Pin Function Select bit : MCLR pin function is MCLR
// Code Protection bit : Program memory code protection is disabled
// Low-Voltage Programming Enable : Low-voltage programming enabled
// Brown-out Reset Selection bits : BOR enabled
// Brown-out Reset Voltage Selection : Brown-out Reset Voltage (Vbor), low trip point selected.
// Flash Memory Self-Write Protection : Write protection off
#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 : EC: CLKIN function enabled
; Brown-out Reset Enable : Brown-out Reset enabled
; Watchdog Timer Enable : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; MCLR Pin Function Select bit : MCLR pin function is MCLR
; Code Protection bit : Program memory code protection is disabled
; Low-Voltage Programming Enable : Low-voltage programming enabled
; Brown-out Reset Selection bits : BOR enabled
; Brown-out Reset Voltage Selection : Brown-out Reset Voltage (Vbor), low trip point selected.
; Flash Memory Self-Write Protection : Write protection off
config "FOSC" = "EC", "BOREN" = "ON", "WDTE" = "ON", "PWRTE" = "OFF", "MCLRE" = "ON", "CP" = "OFF", "LVP" = "ON", "LPBOR" = "ON", "BORV" = "LO", "WRT" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : EC: CLKIN function enabled
; Brown-out Reset Enable : Brown-out Reset enabled
; Watchdog Timer Enable : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; MCLR Pin Function Select bit : MCLR pin function is MCLR
; Code Protection bit : Program memory code protection is disabled
; Low-Voltage Programming Enable : Low-voltage programming enabled
; Brown-out Reset Selection bits : BOR enabled
; Brown-out Reset Voltage Selection : Brown-out Reset Voltage (Vbor), low trip point selected.
; Flash Memory Self-Write Protection : Write protection off
config "FOSC" = 0x1, "BOREN" = 0x3, "WDTE" = 0x3, "PWRTE" = 0x1, "MCLRE" = 0x1, "CP" = 0x1, "LVP" = 0x1, "LPBOR" = 0x1, "BORV" = 0x1, "WRT" = 0x3
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : EC: CLKIN function enabled
; Brown-out Reset Enable : Brown-out Reset enabled
; Watchdog Timer Enable : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; MCLR Pin Function Select bit : MCLR pin function is MCLR
; Code Protection bit : Program memory code protection is disabled
; Low-Voltage Programming Enable : Low-voltage programming enabled
; Brown-out Reset Selection bits : BOR enabled
; Brown-out Reset Voltage Selection : Brown-out Reset Voltage (Vbor), low trip point selected.
; Flash Memory Self-Write Protection : Write protection off
config "CONFIG" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG @ 0x2007
FOSC Oscillator Selection bits
INTOSC INTOSC oscillator: CLKIN function disabled
EC EC: CLKIN function enabled
BOREN Brown-out Reset Enable
ON Brown-out Reset enabled
NSLEEP Brown-out Reset enabled while running and disabled in Sleep
SBODEN Brown-out Reset controlled by the SBOREN bit in the BORCON register
OFF Brown-out Reset disabled
WDTE Watchdog Timer Enable
ON WDT enabled
NSLEEP WDT enabled while running and disabled in Sleep
SWDTEN WDT controlled by the SWDTEN bit in the WDTCON register
OFF WDT disabled
PWRTE Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
MCLRE MCLR Pin Function Select bit
ON MCLR pin function is MCLR
OFF 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
LVP Low-Voltage Programming Enable
ON Low-voltage programming enabled
OFF High-voltage on MCLR/VPP must be used for programming
LPBOR Brown-out Reset Selection bits
ON BOR enabled
OFF BOR disabled
BORV Brown-out Reset Voltage Selection
LO Brown-out Reset Voltage (Vbor), low trip point selected.
HI Brown-out Reset Voltage (Vbor), high trip point selected.
WRT Flash Memory Self-Write Protection
OFF Write protection off
BOOT 000h to 07Fh write protected, 080h to 1FFh may be modified by PMCON control
HALF 000h to 0FFh write protected, 100h to 1FFh may be modified by PMCON control
ALL 000h to 1FFh write protected, no addresses may be modified by PMCON control
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003