MCV18E Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : RC oscillator
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Brown-out Reset Enable bit : BOR enabled
// Brown-out Reset Voltage bit : VBOR set to 4.0V
// Code Protect : Program memory code protection is disabled
#pragma config FOSC = RC, WDTE = ON, PWRTE = OFF, BOREN = ON, BODENV = 40, CP = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Brown-out Reset Enable bit : BOR enabled
// Brown-out Reset Voltage bit : VBOR set to 4.0V
// Code Protect : Program memory code protection is disabled
#pragma config FOSC = 0x3, WDTE = 0x1, PWRTE = 0x1, BOREN = 0x1, BODENV = 0x1, CP = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// Brown-out Reset Enable bit : BOR enabled
// Brown-out Reset Voltage bit : VBOR set to 4.0V
// Code Protect : Program memory code protection is disabled
#pragma config CONFIG = 0x3FFF
For example:
// IDLOC @ 0x2000
#pragma config IDLOC0 = 0x127

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator Selection bits : RC oscillator
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Brown-out Reset Enable bit : BOR enabled
; Brown-out Reset Voltage bit : VBOR set to 4.0V
; Code Protect : Program memory code protection is disabled
config "FOSC" = "RC", "WDTE" = "ON", "PWRTE" = "OFF", "BOREN" = "ON", "BODENV" = "40", "CP" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Brown-out Reset Enable bit : BOR enabled
; Brown-out Reset Voltage bit : VBOR set to 4.0V
; Code Protect : Program memory code protection is disabled
config "FOSC" = 0x3, "WDTE" = 0x1, "PWRTE" = 0x1, "BOREN" = 0x1, "BODENV" = 0x1, "CP" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; Brown-out Reset Enable bit : BOR enabled
; Brown-out Reset Voltage bit : VBOR set to 4.0V
; Code Protect : Program memory code protection is disabled
config "CONFIG" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG @ 0x2007
FOSC Oscillator Selection bits
RC RC oscillator
HS HS oscillator
XT XT oscillator
LP LP oscillator
WDTE Watchdog Timer Enable bit
ON WDT enabled
OFF WDT disabled and can be enabled by SWDTEN bit of the WDTCON register
PWRTE Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
BOREN Brown-out Reset Enable bit
ON BOR enabled
OFF BOR disabled
BODENV Brown-out Reset Voltage bit
40 VBOR set to 4.0V
25 VBOR set to 2.5V
CP Code Protect
OFF Program memory code protection is disabled
ON Program memory code protection is enabled
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003