18C442 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : RC oscillator w/OSC2 configured as RA6
// Oscillator System Clock Switch Enable bit : Oscillator system clock switch option is disabled (main oscillator is source)
#pragma config OSC = RCIO, OSCS = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator w/OSC2 configured as RA6
// Oscillator System Clock Switch Enable bit : Oscillator system clock switch option is disabled (main oscillator is source)
#pragma config OSC = 0x7, OSCS = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator w/OSC2 configured as RA6
// Oscillator System Clock Switch Enable bit : Oscillator system clock switch option is disabled (main oscillator is source)
#pragma config CONFIG1H = 0xE7
For example:
// IDLOC @ 0x200000
#pragma config IDLOC0 = 0x255

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator Selection bits : RC oscillator w/OSC2 configured as RA6
; Oscillator System Clock Switch Enable bit : Oscillator system clock switch option is disabled (main oscillator is source)
config "OSC" = "RCIO", "OSCS" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator w/OSC2 configured as RA6
; Oscillator System Clock Switch Enable bit : Oscillator system clock switch option is disabled (main oscillator is source)
config "OSC" = 0x7, "OSCS" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator w/OSC2 configured as RA6
; Oscillator System Clock Switch Enable bit : Oscillator system clock switch option is disabled (main oscillator is source)
config "CONFIG1H" = 0xE7
For example:
; IDLOC @ 0x200000
config "IDLOC0" = 0x255

Configuration Registers & Settings

Register: CONFIG1L @ 0x300000
CP Code Protection bits
OFF Program memory code protection off
ON All of program memory code protected
Register: CONFIG1H @ 0x300001
OSC Oscillator Selection bits
RCIO RC oscillator w/OSC2 configured as RA6
HSPLL HS oscillator with PLL enabled/Clock frequency = (4 x FOSC)
ECIO EC oscillator w/OSC2 configured as RA6
EC EC oscillator w/OSC2 configured as divide-by-4 clock output
RC RC oscillator
HS HS oscillator
XT XT oscillator
LP LP oscillator
OSCS Oscillator System Clock Switch Enable bit
OFF Oscillator system clock switch option is disabled (main oscillator is source)
ON Oscillator system clock switch option is enabled (oscillator switching is enabled)
Register: CONFIG2L @ 0x300002
PWRT Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
BOR Brown-out Reset Enable bit
ON Brown-out Reset enabled
OFF Brown-out Reset disabled
BORV Brown-out Reset Voltage bits
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: CONFIG2H @ 0x300003
WDT Watchdog Timer Enable bit
ON WDT enabled
OFF WDT disabled (control is placed on the SWDTEN bit)
WDTPS Watchdog Timer Postscale Select bits
128 1:128
64 1:64
32 1:32
16 1:16
8 1:8
4 1:4
2 1:2
1 1:1
Register: CONFIG3H @ 0x300005
CCP2MUX CCP2 Mux bit
ON CCP2 input/output is multiplexed with RC1
OFF CCP2 input/output is multiplexed with RB3
Register: CONFIG4L @ 0x300006
STVR Stack Full/Underflow Reset Enable bit
ON Stack Full/Underflow will cause RESET
OFF Stack Full/Underflow will not cause RESET
Register: IDLOC0 @ 0x200000
Register: IDLOC1 @ 0x200001
Register: IDLOC2 @ 0x200002
Register: IDLOC3 @ 0x200003
Register: IDLOC4 @ 0x200004
Register: IDLOC5 @ 0x200005
Register: IDLOC6 @ 0x200006
Register: IDLOC7 @ 0x200007