16C765 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator selection bits : External clock with 4x PLL enabled. CLKOUT on OSC2 pin
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Code Protection bits : Code protection off
#pragma config FOSC = E4, WDTE = ON, PWRTE = OFF, CP = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator selection bits : External clock with 4x PLL enabled. CLKOUT on OSC2 pin
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Code Protection bits : Code protection off
#pragma config FOSC = 0x3, WDTE = 0x1, PWRTE = 0x1, CP = 0x3F3
#pragma config <register>=<literal constant>
For example:
// Oscillator selection bits : External clock with 4x PLL enabled. CLKOUT on OSC2 pin
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Code Protection bits : Code protection off
#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 : External clock with 4x PLL enabled. CLKOUT on OSC2 pin
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Code Protection bits : Code protection off
config "FOSC" = "E4", "WDTE" = "ON", "PWRTE" = "OFF", "CP" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator selection bits : External clock with 4x PLL enabled. CLKOUT on OSC2 pin
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Code Protection bits : Code protection off
config "FOSC" = 0x3, "WDTE" = 0x1, "PWRTE" = 0x1, "CP" = 0x3F3
config "<register>"=<literal constant>
For example:
; Oscillator selection bits : External clock with 4x PLL enabled. CLKOUT on OSC2 pin
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Code Protection bits : Code protection off
config "CONFIG1" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG1 @ 0x2007
FOSC Oscillator selection bits
E4 External clock with 4x PLL enabled. CLKOUT on OSC2 pin
HS HS oscillator
EC External clock. CLKOUT on OSC2 pin
H4 HS osc with 4x PLL enabled
WDTE Watchdog Timer Enable bit
ON WDT enabled
OFF WDT disabled
PWRTE Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
CP Code Protection bits
OFF Code protection off
50 1000h-1FFFh code protected
75 0800h-1FFFh code protected
ALL All memory is code protected
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003