16C770 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator selection bits : ER CLKOUT
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Master Clear Enable : External
// Brown-out Reset Enable bit : BOR enabled
// Code Protecton bit : Code protection off
// Brown Out Voltage : VBOR set to 2.5V
#pragma config FOSC = ER_CLKOUT, WDTE = ON, PWRTE = OFF, MCLRE = ON, BOREN = ON, CP = OFF, BODENV = 25
#pragma config <setting>=<literal constant>
For example:
// Oscillator selection bits : ER CLKOUT
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Master Clear Enable : External
// Brown-out Reset Enable bit : BOR enabled
// Code Protecton bit : Code protection off
// Brown Out Voltage : VBOR set to 2.5V
#pragma config FOSC = 0x7, WDTE = 0x1, PWRTE = 0x1, MCLRE = 0x1, BOREN = 0x1, CP = 0x33, BODENV = 0x3
#pragma config <register>=<literal constant>
For example:
// Oscillator selection bits : ER CLKOUT
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Master Clear Enable : External
// Brown-out Reset Enable bit : BOR enabled
// Code Protecton bit : Code protection off
// Brown Out Voltage : VBOR set to 2.5V
#pragma config CONFIG1 = 0x3FFF
For example:
// IDLOC @ 0x2000
#pragma config IDLOC0 = 0x127

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator selection bits : ER CLKOUT
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Master Clear Enable : External
; Brown-out Reset Enable bit : BOR enabled
; Code Protecton bit : Code protection off
; Brown Out Voltage : VBOR set to 2.5V
config "FOSC" = "ER_CLKOUT", "WDTE" = "ON", "PWRTE" = "OFF", "MCLRE" = "ON", "BOREN" = "ON", "CP" = "OFF", "BODENV" = "25"
config "<setting>"=<literal constant>
For example:
; Oscillator selection bits : ER CLKOUT
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Master Clear Enable : External
; Brown-out Reset Enable bit : BOR enabled
; Code Protecton bit : Code protection off
; Brown Out Voltage : VBOR set to 2.5V
config "FOSC" = 0x7, "WDTE" = 0x1, "PWRTE" = 0x1, "MCLRE" = 0x1, "BOREN" = 0x1, "CP" = 0x33, "BODENV" = 0x3
config "<register>"=<literal constant>
For example:
; Oscillator selection bits : ER CLKOUT
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Master Clear Enable : External
; Brown-out Reset Enable bit : BOR enabled
; Code Protecton bit : Code protection off
; Brown Out Voltage : VBOR set to 2.5V
config "CONFIG1" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG1 @ 0x2007
FOSC Oscillator selection bits
ER_CLKOUT ER CLKOUT
ER_NOCLKOUT ER I/O
INTRCCLK INTRC, clockout on OSC2
INTRCIO INTRC, OSC2 is I/O
EXTCLK EC I/O
HS HS oscillator
XT XT oscillator
LP LP oscillator
WDTE Watchdog Timer Enable bit
ON WDT enabled
OFF WDT disabled
PWRTE Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
MCLRE Master Clear Enable
ON External
OFF Internal
BOREN Brown-out Reset Enable bit
ON BOR enabled
OFF BOR disabled
CP Code Protecton bit
OFF Code protection off
ALL All memory is code protected
BODENV Brown Out Voltage
25 VBOR set to 2.5V
27 VBOR set to 2.7V
42 VBOR set to 4.2V
45 VBOR set to 4.5V
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003