18F8527 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : External RC oscillator, port function on RA6
// Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor disabled
// Internal/External Oscillator Switchover bit : Two-Speed Start-up disabled
#pragma config OSC = RCIO6, FCMEN = OFF, IESO = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : External RC oscillator, port function on RA6
// Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor disabled
// Internal/External Oscillator Switchover bit : Two-Speed Start-up disabled
#pragma config OSC = 0x7, FCMEN = 0x0, IESO = 0x0
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : External RC oscillator, port function on RA6
// Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor disabled
// Internal/External Oscillator Switchover bit : Two-Speed Start-up disabled
#pragma config CONFIG1H = 0x7
For example:
// IDLOC @ 0x200000
#pragma config IDLOC0 = 0x255

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator Selection bits : External RC oscillator, port function on RA6
; Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor disabled
; Internal/External Oscillator Switchover bit : Two-Speed Start-up disabled
config "OSC" = "RCIO6", "FCMEN" = "OFF", "IESO" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : External RC oscillator, port function on RA6
; Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor disabled
; Internal/External Oscillator Switchover bit : Two-Speed Start-up disabled
config "OSC" = 0x7, "FCMEN" = 0x0, "IESO" = 0x0
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : External RC oscillator, port function on RA6
; Fail-Safe Clock Monitor Enable bit : Fail-Safe Clock Monitor disabled
; Internal/External Oscillator Switchover bit : Two-Speed Start-up disabled
config "CONFIG1H" = 0x7
For example:
; IDLOC @ 0x200000
config "IDLOC0" = 0x255

Configuration Registers & Settings

Register: CONFIG1H @ 0x300001
OSC Oscillator Selection bits
INTIO7 Internal oscillator block, CLKO function on RA6, port function on RA7
INTIO67 Internal oscillator block, port function on RA6 and RA7
RCIO6 External RC oscillator, port function on RA6
HSPLL HS oscillator, PLL enabled (Clock Frequency = 4 x FOSC1)
ECIO6 EC oscillator, port function on RA6
EC EC oscillator, CLKO function on RA6
RC External RC oscillator, CLKO function on RA6
HS HS oscillator
XT XT oscillator
LP LP oscillator
FCMEN Fail-Safe Clock Monitor Enable bit
OFF Fail-Safe Clock Monitor disabled
ON Fail-Safe Clock Monitor enabled
IESO Internal/External Oscillator Switchover bit
OFF Two-Speed Start-up disabled
ON Two-Speed Start-up enabled
Register: CONFIG2L @ 0x300002
PWRT Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
BOREN Brown-out Reset Enable bits
SBORDIS Brown-out Reset enabled in hardware only (SBOREN is disabled)
NOSLP Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled)
ON Brown-out Reset enabled and controlled by software (SBOREN is enabled)
OFF Brown-out Reset disabled in hardware and software
BORV Brown-out Voltage bits
3 Minimum setting
2
1
0 Maximum setting
Register: CONFIG2H @ 0x300003
WDT Watchdog Timer
ON WDT enabled
OFF WDT disabled (control is placed on the SWDTEN bit)
WDTPS Watchdog Timer Postscale Select bits
32768 1:32768
16384 1:16384
8192 1:8192
4096 1:4096
2048 1:2048
1024 1:1024
512 1:512
256 1:256
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: CONFIG3L @ 0x300004
MODE Processor Data Memory Mode Select bits
MC Microcontroller mode
MP Microprocessor mode
MPB Microprocessor with Boot Block mode
EM Extended Microcontroller mode
ADDRBW Address Bus Width Select bits
ADDR20BIT 20-bit Address Bus
ADDR16BIT 16-bit Address Bus
ADDR12BIT 12-bit Address Bus
ADDR8BIT 8-bit Address Bus
DATABW Data Bus Width Select bit
DATA16BIT 16-bit External Bus mode
DATA8BIT 8-bit External Bus mode
WAIT External Bus Data Wait Enable bit
OFF Wait selections are unavailable for table reads and table writes
ON Wait selections for table reads and table writes are determined by the WAIT1:WAIT0 bits
Register: CONFIG3H @ 0x300005
CCP2MX CCP2 MUX bit
PORTC ECCP2 input/output is multiplexed with RC1
PORTBE ECCP2 is multiplexed with RB3 in Extended Microcontroller, Microprocessor or Microprocessor with Boot Block mode. Or with RE7 in Microcontroller mode.
ECCPMX ECCP MUX bit
PORTE ECCP1/3 (P1B/P1C/P3B/P3C) are multiplexed onto RE6, RE5, RE4 and RE3 respectively
PORTH ECCP1/3 (P1B/P1C/P3B/P3C) are multiplexed onto RH7, RH6, RH5 and RH4 respectively
LPT1OSC Low-Power Timer1 Oscillator Enable bit
ON Timer1 configured for low-power operation
OFF Timer1 configured for higher power operation
MCLRE MCLR Pin Enable bit
ON MCLR pin enabled; RG5 input pin disabled
OFF RG5 input pin enabled; MCLR disabled
Register: CONFIG4L @ 0x300006
STVREN Stack Full/Underflow Reset Enable bit
ON Stack full/underflow will cause Reset
OFF Stack full/underflow will not cause Reset
LVP Single-Supply ICSP Enable bit
ON Single-Supply ICSP enabled
OFF Single-Supply ICSP disabled
BBSIZ Boot Block Size Select bits
BB8K 4K words (8 Kbytes) Boot Block size
BB4K 2K words (4 Kbytes) Boot Block size
BB2K 1K word (2 Kbytes) Boot Block size
XINST Extended Instruction Set Enable bit
ON Instruction set extension and Indexed Addressing mode enabled
OFF Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
DEBUG Background Debugger Enable bit
OFF Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
ON Background debugger enabled, RB6 and RB7 are dedicated to In-Circuit Debug
Register: CONFIG5L @ 0x300008
CP0 Code Protection bit Block 0
OFF Block 0 (000800, 001000 or 002000-003FFFh) not code-protected
ON Block 0 (000800, 001000 or 002000-003FFFh) code-protected
CP1 Code Protection bit Block 1
OFF Block 1 (004000-007FFFh) not code-protected
ON Block 1 (004000-007FFFh) code-protected
CP2 Code Protection bit Block 2
OFF Block 2 (008000-00BFFFh) not code-protected
ON Block 2 (008000-00BFFFh) code-protected
Register: CONFIG5H @ 0x300009
CPB Boot Block Code Protection bit
OFF Boot Block (000000-0007FFh) not code-protected
ON Boot Block (000000-0007FFh) code-protected
CPD Data EEPROM Code Protection bit
OFF Data EEPROM not code-protected
ON Data EEPROM code-protected
Register: CONFIG6L @ 0x30000A
WRT0 Write Protection bit Block 0
OFF Block 0 (000800, 001000 or 002000-003FFFh) not write-protected
ON Block 0 (000800, 001000 or 002000-003FFFh) write-protected
WRT1 Write Protection bit Block 1
OFF Block 1 (004000-007FFFh) not write-protected
ON Block 1 (004000-007FFFh) write-protected
WRT2 Write Protection bit Block 2
OFF Block 2 (008000-00BFFFh) not write-protected
ON Block 2 (008000-00BFFFh) write-protected
Register: CONFIG6H @ 0x30000B
WRTC Configuration Register Write Protection bit
OFF Configuration registers (300000-3000FFh) not write-protected
ON Configuration registers (300000-3000FFh) write-protected
WRTB Boot Block Write Protection bit
OFF Boot Block (000000-007FFF, 000FFF or 001FFFh) not write-protected
ON Boot Block (000000-007FFF, 000FFF or 001FFFh) write-protected
WRTD Data EEPROM Write Protection bit
OFF Data EEPROM not write-protected
ON Data EEPROM write-protected
Register: CONFIG7L @ 0x30000C
EBTR0 Table Read Protection bit Block 0
OFF Block 0 (000800, 001000 or 002000-003FFFh) not protected from table reads executed in other blocks
ON Block 0 (000800, 001000 or 002000-003FFFh) protected from table reads executed in other blocks
EBTR1 Table Read Protection bit Block 1
OFF Block 1 (004000-007FFFh) not protected from table reads executed in other blocks
ON Block 1 (004000-007FFFh) protected from table reads executed in other blocks
EBTR2 Table Read Protection bit Block 2
OFF Block 2 (008000-00BFFFh) not protected from table reads executed in other blocks
ON Block 2 (008000-00BFFFh) protected from table reads executed in other blocks
Register: CONFIG7H @ 0x30000D
EBTRB Boot Block Table Read Protection bit
OFF Boot Block (000000-007FFF, 000FFF or 001FFFh) not protected from table reads executed in other blocks
ON Boot Block (000000-007FFF, 000FFF or 001FFFh) protected from table reads executed in other blocks
Register: IDLOC0 @ 0x200000
Register: IDLOC1 @ 0x200001
Register: IDLOC2 @ 0x200002
Register: IDLOC3 @ 0x200003
Register: IDLOC4 @ 0x200004
Register: IDLOC5 @ 0x200005
Register: IDLOC6 @ 0x200006
Register: IDLOC7 @ 0x200007