12F617 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// MCLR Pin Function Select bit : MCLR pin is MCLR function and weak internal pull-up is enabled
// Code Protection bit : Program memory is not code protected
// Internal Oscillator Frequency Select : 8 MHz
// Brown-out Reset Selection bits : BOR enabled
// Flash Program Memory Self Write Enable bits : Write protection off
#pragma config FOSC = EXTRCCLK, WDTE = ON, PWRTE = OFF, MCLRE = ON, CP = OFF, IOSCFS = 8MHZ, BOREN = ON, WRT = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// MCLR Pin Function Select bit : MCLR pin is MCLR function and weak internal pull-up is enabled
// Code Protection bit : Program memory is not code protected
// Internal Oscillator Frequency Select : 8 MHz
// Brown-out Reset Selection bits : BOR enabled
// Flash Program Memory Self Write Enable bits : Write protection off
#pragma config FOSC = 0x7, WDTE = 0x1, PWRTE = 0x1, MCLRE = 0x1, CP = 0x1, IOSCFS = 0x1, BOREN = 0x3, WRT = 0x3
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// MCLR Pin Function Select bit : MCLR pin is MCLR function and weak internal pull-up is enabled
// Code Protection bit : Program memory is not code protected
// Internal Oscillator Frequency Select : 8 MHz
// Brown-out Reset Selection bits : BOR enabled
// Flash Program Memory Self Write Enable bits : 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 : EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; MCLR Pin Function Select bit : MCLR pin is MCLR function and weak internal pull-up is enabled
; Code Protection bit : Program memory is not code protected
; Internal Oscillator Frequency Select : 8 MHz
; Brown-out Reset Selection bits : BOR enabled
; Flash Program Memory Self Write Enable bits : Write protection off
config "FOSC" = "EXTRCCLK", "WDTE" = "ON", "PWRTE" = "OFF", "MCLRE" = "ON", "CP" = "OFF", "IOSCFS" = "8MHZ", "BOREN" = "ON", "WRT" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; MCLR Pin Function Select bit : MCLR pin is MCLR function and weak internal pull-up is enabled
; Code Protection bit : Program memory is not code protected
; Internal Oscillator Frequency Select : 8 MHz
; Brown-out Reset Selection bits : BOR enabled
; Flash Program Memory Self Write Enable bits : Write protection off
config "FOSC" = 0x7, "WDTE" = 0x1, "PWRTE" = 0x1, "MCLRE" = 0x1, "CP" = 0x1, "IOSCFS" = 0x1, "BOREN" = 0x3, "WRT" = 0x3
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; MCLR Pin Function Select bit : MCLR pin is MCLR function and weak internal pull-up is enabled
; Code Protection bit : Program memory is not code protected
; Internal Oscillator Frequency Select : 8 MHz
; Brown-out Reset Selection bits : BOR enabled
; Flash Program Memory Self Write Enable bits : Write protection off
config "CONFIG" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG @ 0x2007
FOSC Oscillator Selection bits
EXTRCCLK EXTRC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
EXTRCIO EXTRCIO oscillator: I/O function on RA4/AN3/T1G/OSC2/CLKOUT, RC on RA5/T1CKI/OSC1/CLKIN
INTOSCCLK INTOSC oscillator: CLKOUT function on RA4/AN3/T1G/OSC2/CLKOUT, I/O function on RA5/T1CKI/OSC1/CLKIN
INTOSCIO INTOSCIO oscillator: I/O function on RA4/AN3/T1G/OSC2/CLKOUT, I/O function on RA5/T1CKI/OSC1/CLKIN
EC EC: I/O function on RA4/AN3/T1G/OSC2/CLKOUT, CLKIN on RA5/T1CKI/OSC1/CLKIN
HS HS oscillator: High-speed crystal/resonator on RA5/T1CKI/OSC1/CLKIN and RA4/AN3/T1G/OSC2/CLKOUT
XT XT oscillator: Crystal/resonator on RA5/T1CKI/OSC1/CLKIN and RA4/AN3/T1G/OSC2/CLKOUT
LP LP oscillator: Low-power crystal on RA5/T1CKI/OSC1/CLKIN and RA4/AN3/T1G/OSC2/CLKOUT
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 MCLR Pin Function Select bit
ON MCLR pin is MCLR function and weak internal pull-up is enabled
OFF MCLR pin is alternate function, MCLR function is internally disabled
CP Code Protection bit
OFF Program memory is not code protected
ON Program memory is external read and write protected
IOSCFS Internal Oscillator Frequency Select
8MHZ 8 MHz
4MHZ 4 MHz
BOREN Brown-out Reset Selection bits
ON BOR enabled
NSLEEP BOR enabled during operation and disabled in Sleep
OFF BOR disabled
WRT Flash Program Memory Self Write Enable bits
OFF Write protection off
BOOT 000h to 1FFh write protected, 200h to 7FFh may be modified by PMCON1 control
HALF 000h to 3FFh write protected, 400h to 7FFh may be modified by PMCON1 control
ALL 000h to 7FFh write protected, entire program memory is write protected.
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003