16F570 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator : EXTRC with CLKOUT function on OSC2/CLKOUT
// Watchdog Timer Enable bit : Enabled
// Code Protection bit : Code protection off
// Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
// Code Protection bit - Flash Data Memory : Code protection off
// : BOR Enabled
// : DRT Enabled
#pragma config FOSC = EXTRC_CLKOUT, WDTE = ON, CP = OFF, IOSCFS = 8MHz, CPSW = OFF, BOREN = ON, DRTEN = ON
#pragma config <setting>=<literal constant>
For example:
// Oscillator : EXTRC with CLKOUT function on OSC2/CLKOUT
// Watchdog Timer Enable bit : Enabled
// Code Protection bit : Code protection off
// Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
// Code Protection bit - Flash Data Memory : Code protection off
// : BOR Enabled
// : DRT Enabled
#pragma config FOSC = 0x7, WDTE = 0x1, CP = 0x1, IOSCFS = 0x1, CPSW = 0x1, BOREN = 0x1, DRTEN = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator : EXTRC with CLKOUT function on OSC2/CLKOUT
// Watchdog Timer Enable bit : Enabled
// Code Protection bit : Code protection off
// Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
// Code Protection bit - Flash Data Memory : Code protection off
// : BOR Enabled
// : DRT Enabled
#pragma config CONFIG = 0x3FF
For example:
// IDLOC @ 0x840
#pragma config IDLOC0 = 0x4095

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator : EXTRC with CLKOUT function on OSC2/CLKOUT
; Watchdog Timer Enable bit : Enabled
; Code Protection bit : Code protection off
; Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
; Code Protection bit - Flash Data Memory : Code protection off
; : BOR Enabled
; : DRT Enabled
config "FOSC" = "EXTRC_CLKOUT", "WDTE" = "ON", "CP" = "OFF", "IOSCFS" = "8MHz", "CPSW" = "OFF", "BOREN" = "ON", "DRTEN" = "ON"
config "<setting>"=<literal constant>
For example:
; Oscillator : EXTRC with CLKOUT function on OSC2/CLKOUT
; Watchdog Timer Enable bit : Enabled
; Code Protection bit : Code protection off
; Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
; Code Protection bit - Flash Data Memory : Code protection off
; : BOR Enabled
; : DRT Enabled
config "FOSC" = 0x7, "WDTE" = 0x1, "CP" = 0x1, "IOSCFS" = 0x1, "CPSW" = 0x1, "BOREN" = 0x1, "DRTEN" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator : EXTRC with CLKOUT function on OSC2/CLKOUT
; Watchdog Timer Enable bit : Enabled
; Code Protection bit : Code protection off
; Internal Oscillator Frequency Select : 8 MHz INTOSC Speed
; Code Protection bit - Flash Data Memory : Code protection off
; : BOR Enabled
; : DRT Enabled
config "CONFIG" = 0x3FF
For example:
; IDLOC @ 0x840
config "IDLOC0" = 0x4095

Configuration Registers & Settings

Register: CONFIG @ 0xFFF
FOSC Oscillator
LP LP oscillator and 18 ms DRT
XT XT oscillator and 18 ms DRT
HS HS oscillator and 18 ms DRT
EC EC oscillator with I/O function on OSC2/CLKOUT
INTRC_IO INTRC with I/O function on OSC2/CLKOUT
INTRC_CLKOUT INTRC with CLKOUT function on OSC2/CLKOUT
EXTRC_IO EXTRC with I/O function on OSC2/CLKOUT
EXTRC_CLKOUT EXTRC with CLKOUT function on OSC2/CLKOUT
WDTE Watchdog Timer Enable bit
ON Enabled
OFF Disabled
CP Code Protection bit
OFF Code protection off
ON Code protection on
IOSCFS Internal Oscillator Frequency Select
8MHz 8 MHz INTOSC Speed
4MHz 4 MHz INTOSC Speed
CPSW Code Protection bit - Flash Data Memory
OFF Code protection off
ON Code protection on
BOREN
ON BOR Enabled
OFF BOR Disabled
DRTEN
ON DRT Enabled
OFF DRT Disabled
Register: IDLOC0 @ 0x840
Register: IDLOC1 @ 0x841
Register: IDLOC2 @ 0x842
Register: IDLOC3 @ 0x843