16F527 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection : EXTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
// Watchdog Timer Enable : WDT Enabled
// Code Protection - User Program Memory : Code protection off
// Master Clear Enable : MCLR pin functions as MCLR
// Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
// Code Protection - Self Writable Memory : Code protection off
// Brown-out Reset Enable : BOR Enabled
// Device Reset Timer Enable : DRT Enabled (18 ms)
#pragma config FOSC = EXTRC_CLKOUT, WDTE = ON, CP = OFF, MCLRE = ON, IOSCFS = 8MHz, CPSW = OFF, BOREN = ON, DRTEN = ON
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection : EXTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
// Watchdog Timer Enable : WDT Enabled
// Code Protection - User Program Memory : Code protection off
// Master Clear Enable : MCLR pin functions as MCLR
// Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
// Code Protection - Self Writable Memory : Code protection off
// Brown-out Reset Enable : BOR Enabled
// Device Reset Timer Enable : DRT Enabled (18 ms)
#pragma config FOSC = 0x7, WDTE = 0x1, CP = 0x1, MCLRE = 0x1, IOSCFS = 0x1, CPSW = 0x1, BOREN = 0x1, DRTEN = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection : EXTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
// Watchdog Timer Enable : WDT Enabled
// Code Protection - User Program Memory : Code protection off
// Master Clear Enable : MCLR pin functions as MCLR
// Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
// Code Protection - Self Writable Memory : Code protection off
// Brown-out Reset Enable : BOR Enabled
// Device Reset Timer Enable : DRT Enabled (18 ms)
#pragma config CONFIG = 0x3FF
For example:
// IDLOC @ 0x440
#pragma config IDLOC0 = 0x4095

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator Selection : EXTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
; Watchdog Timer Enable : WDT Enabled
; Code Protection - User Program Memory : Code protection off
; Master Clear Enable : MCLR pin functions as MCLR
; Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
; Code Protection - Self Writable Memory : Code protection off
; Brown-out Reset Enable : BOR Enabled
; Device Reset Timer Enable : DRT Enabled (18 ms)
config "FOSC" = "EXTRC_CLKOUT", "WDTE" = "ON", "CP" = "OFF", "MCLRE" = "ON", "IOSCFS" = "8MHz", "CPSW" = "OFF", "BOREN" = "ON", "DRTEN" = "ON"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection : EXTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
; Watchdog Timer Enable : WDT Enabled
; Code Protection - User Program Memory : Code protection off
; Master Clear Enable : MCLR pin functions as MCLR
; Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
; Code Protection - Self Writable Memory : Code protection off
; Brown-out Reset Enable : BOR Enabled
; Device Reset Timer Enable : DRT Enabled (18 ms)
config "FOSC" = 0x7, "WDTE" = 0x1, "CP" = 0x1, "MCLRE" = 0x1, "IOSCFS" = 0x1, "CPSW" = 0x1, "BOREN" = 0x1, "DRTEN" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator Selection : EXTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
; Watchdog Timer Enable : WDT Enabled
; Code Protection - User Program Memory : Code protection off
; Master Clear Enable : MCLR pin functions as MCLR
; Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
; Code Protection - Self Writable Memory : Code protection off
; Brown-out Reset Enable : BOR Enabled
; Device Reset Timer Enable : DRT Enabled (18 ms)
config "CONFIG" = 0x3FF
For example:
; IDLOC @ 0x440
config "IDLOC0" = 0x4095

Configuration Registers & Settings

Register: CONFIG @ 0xFFF
FOSC Oscillator Selection
LP LP oscillator and automatic 18 ms DRT (DRTEN ignored)
XT XT oscillator and automatic 18 ms DRT (DRTEN ignored)
HS HS oscillator and automatic 18 ms DRT (DRTEN ignored)
EC EC oscillator with I/O function on OSC2/CLKOUT and 10 us startup time
INTRC_IO INTRC with I/O function on OSC2/CLKOUT and 10 us startup time
INTRC_CLKOUT INTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
EXTRC_IO EXTRC with I/O function on OSC2/CLKOUT and 10 us startup time
EXTRC_CLKOUT EXTRC with CLKOUT function on OSC2/CLKOUT and 10 us startup time
WDTE Watchdog Timer Enable
ON WDT Enabled
OFF WDT Disabled
CP Code Protection - User Program Memory
OFF Code protection off
ON Code protection on
MCLRE Master Clear Enable
ON MCLR pin functions as MCLR
OFF MCLR pin functions as I/O, MCLR internally tied to Vdd
IOSCFS Internal Oscillator Frequency Select
8MHz 8 MHz INTOSC Speed
4MHz 4 MHz INTOSC Speed
CPSW Code Protection - Self Writable Memory
OFF Code protection off
ON Code protection on
BOREN Brown-out Reset Enable
ON BOR Enabled
OFF BOR Disabled
DRTEN Device Reset Timer Enable
ON DRT Enabled (18 ms)
OFF DRT Disabled
Register: IDLOC0 @ 0x440
Register: IDLOC1 @ 0x441
Register: IDLOC2 @ 0x442
Register: IDLOC3 @ 0x443