12F635 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/T1G/OSC2/CLKOUT pin, 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
// Data Code Protection bit : Data memory is not code protected
// Brown-out Reset Selection bits : BOD enabled and SBOdEN bit disabled
// Internal-External Switchover bit : Internal External Switchover mode enabled
// Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor enabled
// Wake-Up Reset Enable bit : Standard wake-up and continue enabled
#pragma config FOSC = EXTRCCLK, WDTE = ON, PWRTE = OFF, MCLRE = ON, CP = OFF, CPD = OFF, BOREN = ON, IESO = ON, FCMEN = ON, WURE = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/T1G/OSC2/CLKOUT pin, 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
// Data Code Protection bit : Data memory is not code protected
// Brown-out Reset Selection bits : BOD enabled and SBOdEN bit disabled
// Internal-External Switchover bit : Internal External Switchover mode enabled
// Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor enabled
// Wake-Up Reset Enable bit : Standard wake-up and continue enabled
#pragma config FOSC = 0x7, WDTE = 0x1, PWRTE = 0x1, MCLRE = 0x1, CP = 0x1, CPD = 0x1, BOREN = 0x3, IESO = 0x1, FCMEN = 0x1, WURE = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/T1G/OSC2/CLKOUT pin, 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
// Data Code Protection bit : Data memory is not code protected
// Brown-out Reset Selection bits : BOD enabled and SBOdEN bit disabled
// Internal-External Switchover bit : Internal External Switchover mode enabled
// Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor enabled
// Wake-Up Reset Enable bit : Standard wake-up and continue enabled
#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 RA4/T1G/OSC2/CLKOUT pin, 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
; Data Code Protection bit : Data memory is not code protected
; Brown-out Reset Selection bits : BOD enabled and SBOdEN bit disabled
; Internal-External Switchover bit : Internal External Switchover mode enabled
; Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor enabled
; Wake-Up Reset Enable bit : Standard wake-up and continue enabled
config "FOSC" = "EXTRCCLK", "WDTE" = "ON", "PWRTE" = "OFF", "MCLRE" = "ON", "CP" = "OFF", "CPD" = "OFF", "BOREN" = "ON", "IESO" = "ON", "FCMEN" = "ON", "WURE" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/T1G/OSC2/CLKOUT pin, 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
; Data Code Protection bit : Data memory is not code protected
; Brown-out Reset Selection bits : BOD enabled and SBOdEN bit disabled
; Internal-External Switchover bit : Internal External Switchover mode enabled
; Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor enabled
; Wake-Up Reset Enable bit : Standard wake-up and continue enabled
config "FOSC" = 0x7, "WDTE" = 0x1, "PWRTE" = 0x1, "MCLRE" = 0x1, "CP" = 0x1, "CPD" = 0x1, "BOREN" = 0x3, "IESO" = 0x1, "FCMEN" = 0x1, "WURE" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/T1G/OSC2/CLKOUT pin, 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
; Data Code Protection bit : Data memory is not code protected
; Brown-out Reset Selection bits : BOD enabled and SBOdEN bit disabled
; Internal-External Switchover bit : Internal External Switchover mode enabled
; Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor enabled
; Wake-Up Reset Enable bit : Standard wake-up and continue enabled
config "CONFIG" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG @ 0x2007
FOSC Oscillator Selection bits
EXTRCCLK RC oscillator: CLKOUT function on RA4/T1G/OSC2/CLKOUT pin, RC on RA5/T1CKI/OSC1/CLKIN
EXTRCIO RCIO oscillator: I/O function on RA4/T1G/OSC2/CLKOUT pin, RC on RA5/T1CKI/OSC1/CLKIN
INTOSCCLK INTOSC oscillator: CLKOUT function on RA4/T1G/OSC2/CLKOUT pin, I/O function on RA5/T1CKI/OSC1/CLKIN
INTOSCIO INTOSCIO oscillator: I/O function on RA4/T1G/OSC2/CLKOUT pin, I/O function on RA5/T1CKI/OSC1/CLKIN
EC EC: I/O function on RA4/T1G/OSC2/CLKOUT, CLKIN on RA5/T1CKI/OSC1/CLKIN
HS HS oscillator: High-speed crystal/resonator on RA5/T1CKI/OSC1/CLKIN and RA4/T1G/OSC2/CLKOUT
XT XT oscillator: Crystal/resonator on RA5/T1CKI/OSC1/CLKIN and RA4/T1G/OSC2/CLKOUT
LP LP oscillator: Low-power crystal on RA5/T1CKI/OSC1/CLKIN and RA4/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 function 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
CPD Data Code Protection bit
OFF Data memory is not code protected
ON Data memory is external read protected
BOREN Brown-out Reset Selection bits
ON BOD enabled and SBOdEN bit disabled
NSLEEP BOD enabled while running and disabled in Sleep. SBODEN bit disabled.
SBODEN SBODEN controls BOD function
OFF BOD and SBODEN disabled
IESO Internal-External Switchover bit
ON Internal External Switchover mode enabled
OFF Internal External Switchover mode disabled
FCMEN Fail-Safe Clock Monitor Enable bit
ON Fail-Safe Clock Monitor enabled
OFF Fail-Safe Clock Monitor disabled
WURE Wake-Up Reset Enable bit
OFF Standard wake-up and continue enabled
ON Wake-up and Reset enabled
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003