18LF27J53 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Watchdog Timer : Enabled
// PLL Prescaler Selection : No prescale (4 MHz oscillator input drives PLL directly)
// PLL Enable Configuration Bit : PLL Disabled
// Stack Overflow/Underflow Reset : Enabled
// Extended Instruction Set : Enabled
#pragma config WDTEN = ON, PLLDIV = 1, CFGPLLEN = OFF, STVREN = ON, XINST = ON
#pragma config <setting>=<literal constant>
For example:
// Watchdog Timer : Enabled
// PLL Prescaler Selection : No prescale (4 MHz oscillator input drives PLL directly)
// PLL Enable Configuration Bit : PLL Disabled
// Stack Overflow/Underflow Reset : Enabled
// Extended Instruction Set : Enabled
#pragma config WDTEN = 0x1, PLLDIV = 0x7, CFGPLLEN = 0x1, STVREN = 0x1, XINST = 0x1
#pragma config <register>=<literal constant>
For example:
// Watchdog Timer : Enabled
// PLL Prescaler Selection : No prescale (4 MHz oscillator input drives PLL directly)
// PLL Enable Configuration Bit : PLL Disabled
// Stack Overflow/Underflow Reset : Enabled
// Extended Instruction Set : Enabled
#pragma config CONFIG1L = 0xFF

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Watchdog Timer : Enabled
; PLL Prescaler Selection : No prescale (4 MHz oscillator input drives PLL directly)
; PLL Enable Configuration Bit : PLL Disabled
; Stack Overflow/Underflow Reset : Enabled
; Extended Instruction Set : Enabled
config "WDTEN" = "ON", "PLLDIV" = "1", "CFGPLLEN" = "OFF", "STVREN" = "ON", "XINST" = "ON"
config "<setting>"=<literal constant>
For example:
; Watchdog Timer : Enabled
; PLL Prescaler Selection : No prescale (4 MHz oscillator input drives PLL directly)
; PLL Enable Configuration Bit : PLL Disabled
; Stack Overflow/Underflow Reset : Enabled
; Extended Instruction Set : Enabled
config "WDTEN" = 0x1, "PLLDIV" = 0x7, "CFGPLLEN" = 0x1, "STVREN" = 0x1, "XINST" = 0x1
config "<register>"=<literal constant>
For example:
; Watchdog Timer : Enabled
; PLL Prescaler Selection : No prescale (4 MHz oscillator input drives PLL directly)
; PLL Enable Configuration Bit : PLL Disabled
; Stack Overflow/Underflow Reset : Enabled
; Extended Instruction Set : Enabled
config "CONFIG1L" = 0xFF

Configuration Registers & Settings

Register: CONFIG1L @ 0x1FFF8
WDTEN Watchdog Timer
ON Enabled
OFF Disabled - Controlled by SWDTEN bit
PLLDIV PLL Prescaler Selection
1 No prescale (4 MHz oscillator input drives PLL directly)
2 Divide by 2 (8 MHz oscillator input)
3 Divide by 3 (12 MHz oscillator input)
4 Divide by 4 (16 MHz oscillator input)
5 Divide by 5 (20 MHz oscillator input)
6 Divide by 6 (24 MHz oscillator input)
10 Divide by 10 (40 MHz oscillator input)
12 Divide by 12 (48 MHz oscillator input)
CFGPLLEN PLL Enable Configuration Bit
OFF PLL Disabled
ON PLL Enabled
STVREN Stack Overflow/Underflow Reset
ON Enabled
OFF Disabled
XINST Extended Instruction Set
ON Enabled
OFF Disabled
Register: CONFIG1H @ 0x1FFF9
CPUDIV CPU System Clock Postscaler
OSC1 No CPU system clock divide
OSC2_PLL2 CPU system clock divide by 2
OSC3_PLL3 CPU system clock divide by 3
OSC4_PLL6 CPU system clock divide by 6
CP0 Code Protect
OFF Program memory is not code-protected
ON Program memory is code-protected
Register: CONFIG2L @ 0x1FFFA
OSC Oscillator
ECPLL EC+PLL (CLKO-RA6), USB-EC+PLL
EC EC (CLKO-RA6), USB-EC
HSPLL HS+PLL, USB-HS+PLL
HS HS, USB-HS
INTOSCPLLO INTOSCPLLO (CLKO-RA6)
INTOSCPLL INTOSCPLL
INTOSCO INTOSCO (CLKO-RA6)
INTOSC INTOSC
SOSCSEL T1OSC/SOSC Power Selection Bits
HIGH High Power T1OSC/SOSC circuit selected
DIG Digital (SCLKI) mode selected
LOW Low Power T1OSC/SOSC circuit selected
CLKOEC EC Clock Out Enable Bit
ON CLKO output enabled on the RA6 pin
OFF CLKO output disabled on the RA6 pin
FCMEN Fail-Safe Clock Monitor
OFF Disabled
ON Enabled
IESO Internal External Oscillator Switch Over Mode
OFF Disabled
ON Enabled
Register: CONFIG2H @ 0x1FFFB
WDTPS Watchdog Postscaler
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 @ 0x1FFFC
DSWDTOSC DSWDT Clock Select
INTOSCREF DSWDT uses INTRC
T1OSCREF DSWDT uses T1OSC/T1CKI
RTCOSC RTCC Clock Select
T1OSCREF RTCC uses T1OSC/T1CKI
INTOSCREF RTCC uses INTRC
DSBOREN Deep Sleep BOR
ON Enabled
OFF Disabled
DSWDTEN Deep Sleep Watchdog Timer
ON Enabled
OFF Disabled
DSWDTPS Deep Sleep Watchdog Postscaler
G2 1:2,147,483,648 (25.7 days)
M536 1:536,870,912 (6.4 days)
M134 1:134,217,728 (38.5 hours)
M33 1:33,554,432 (9.6 hours)
M8 1:8,388,608 (2.4 hours)
M2 1:2,097,152 (36 minutes)
K524 1:524,288 (9 minutes)
K131 1:131,072 (135 seconds)
K32 1:32,768 (34 seconds)
8192 1:8,192 (8.5 seconds)
2048 1:2,048 (2.1 seconds)
512 1:512 (528 ms)
128 1:128 (132 ms)
32 1:32 (33 ms)
8 1:8 (8.3 ms)
2 1:2 (2.1 ms)
Register: CONFIG3H @ 0x1FFFD
IOL1WAY IOLOCK One-Way Set Enable bit
ON The IOLOCK bit (PPSCON<0>) can be set once
OFF The IOLOCK bit (PPSCON<0>) can be set and cleared as needed
ADCSEL ADC 10 or 12 Bit Select
BIT10 10 - Bit ADC Enabled
BIT12 12 - Bit ADC Enabled
MSSP7B_EN MSSP address masking
MSK7 7 Bit address masking mode
MSK5 5 Bit address masking mode
Register: CONFIG4L @ 0x1FFFE
WPFP Write/Erase Protect Page Start/End Location
PAGE_0 Write Protect Program Flash Page 0
PAGE_1 Write Protect Program Flash Page 1
PAGE_2 Write Protect Program Flash Page 2
PAGE_3 Write Protect Program Flash Page 3
PAGE_4 Write Protect Program Flash Page 4
PAGE_5 Write Protect Program Flash Page 5
PAGE_6 Write Protect Program Flash Page 6
PAGE_7 Write Protect Program Flash Page 7
PAGE_8 Write Protect Program Flash Page 8
PAGE_9 Write Protect Program Flash Page 9
PAGE_10 Write Protect Program Flash Page 10
PAGE_11 Write Protect Program Flash Page 11
PAGE_12 Write Protect Program Flash Page 12
PAGE_13 Write Protect Program Flash Page 13
PAGE_14 Write Protect Program Flash Page 14
PAGE_15 Write Protect Program Flash Page 15
PAGE_16 Write Protect Program Flash Page 16
PAGE_17 Write Protect Program Flash Page 17
PAGE_18 Write Protect Program Flash Page 18
PAGE_19 Write Protect Program Flash Page 19
PAGE_20 Write Protect Program Flash Page 20
PAGE_21 Write Protect Program Flash Page 21
PAGE_22 Write Protect Program Flash Page 22
PAGE_23 Write Protect Program Flash Page 23
PAGE_24 Write Protect Program Flash Page 24
PAGE_25 Write Protect Program Flash Page 25
PAGE_26 Write Protect Program Flash Page 26
PAGE_27 Write Protect Program Flash Page 27
PAGE_28 Write Protect Program Flash Page 28
PAGE_29 Write Protect Program Flash Page 29
PAGE_30 Write Protect Program Flash Page 30
PAGE_31 Write Protect Program Flash Page 31
PAGE_32 Write Protect Program Flash Page 32
PAGE_33 Write Protect Program Flash Page 33
PAGE_34 Write Protect Program Flash Page 34
PAGE_35 Write Protect Program Flash Page 35
PAGE_36 Write Protect Program Flash Page 36
PAGE_37 Write Protect Program Flash Page 37
PAGE_38 Write Protect Program Flash Page 38
PAGE_39 Write Protect Program Flash Page 39
PAGE_40 Write Protect Program Flash Page 40
PAGE_41 Write Protect Program Flash Page 41
PAGE_42 Write Protect Program Flash Page 42
PAGE_43 Write Protect Program Flash Page 43
PAGE_44 Write Protect Program Flash Page 44
PAGE_45 Write Protect Program Flash Page 45
PAGE_46 Write Protect Program Flash Page 46
PAGE_47 Write Protect Program Flash Page 47
PAGE_48 Write Protect Program Flash Page 48
PAGE_49 Write Protect Program Flash Page 49
PAGE_50 Write Protect Program Flash Page 50
PAGE_51 Write Protect Program Flash Page 51
PAGE_52 Write Protect Program Flash Page 52
PAGE_53 Write Protect Program Flash Page 53
PAGE_54 Write Protect Program Flash Page 54
PAGE_55 Write Protect Program Flash Page 55
PAGE_56 Write Protect Program Flash Page 56
PAGE_57 Write Protect Program Flash Page 57
PAGE_58 Write Protect Program Flash Page 58
PAGE_59 Write Protect Program Flash Page 59
PAGE_60 Write Protect Program Flash Page 60
PAGE_61 Write Protect Program Flash Page 61
PAGE_62 Write Protect Program Flash Page 62
PAGE_63 Write Protect Program Flash Page 63
PAGE_64 Write Protect Program Flash Page 64
PAGE_65 Write Protect Program Flash Page 65
PAGE_66 Write Protect Program Flash Page 66
PAGE_67 Write Protect Program Flash Page 67
PAGE_68 Write Protect Program Flash Page 68
PAGE_69 Write Protect Program Flash Page 69
PAGE_70 Write Protect Program Flash Page 70
PAGE_71 Write Protect Program Flash Page 71
PAGE_72 Write Protect Program Flash Page 72
PAGE_73 Write Protect Program Flash Page 73
PAGE_74 Write Protect Program Flash Page 74
PAGE_75 Write Protect Program Flash Page 75
PAGE_76 Write Protect Program Flash Page 76
PAGE_77 Write Protect Program Flash Page 77
PAGE_78 Write Protect Program Flash Page 78
PAGE_79 Write Protect Program Flash Page 79
PAGE_80 Write Protect Program Flash Page 80
PAGE_81 Write Protect Program Flash Page 81
PAGE_82 Write Protect Program Flash Page 82
PAGE_83 Write Protect Program Flash Page 83
PAGE_84 Write Protect Program Flash Page 84
PAGE_85 Write Protect Program Flash Page 85
PAGE_86 Write Protect Program Flash Page 86
PAGE_87 Write Protect Program Flash Page 87
PAGE_88 Write Protect Program Flash Page 88
PAGE_89 Write Protect Program Flash Page 89
PAGE_90 Write Protect Program Flash Page 90
PAGE_91 Write Protect Program Flash Page 91
PAGE_92 Write Protect Program Flash Page 92
PAGE_93 Write Protect Program Flash Page 93
PAGE_94 Write Protect Program Flash Page 94
PAGE_95 Write Protect Program Flash Page 95
PAGE_96 Write Protect Program Flash Page 96
PAGE_97 Write Protect Program Flash Page 97
PAGE_98 Write Protect Program Flash Page 98
PAGE_99 Write Protect Program Flash Page 99
PAGE_100 Write Protect Program Flash Page 100
PAGE_101 Write Protect Program Flash Page 101
PAGE_102 Write Protect Program Flash Page 102
PAGE_103 Write Protect Program Flash Page 103
PAGE_104 Write Protect Program Flash Page 104
PAGE_105 Write Protect Program Flash Page 105
PAGE_106 Write Protect Program Flash Page 106
PAGE_107 Write Protect Program Flash Page 107
PAGE_108 Write Protect Program Flash Page 108
PAGE_109 Write Protect Program Flash Page 109
PAGE_110 Write Protect Program Flash Page 110
PAGE_111 Write Protect Program Flash Page 111
PAGE_112 Write Protect Program Flash Page 112
PAGE_113 Write Protect Program Flash Page 113
PAGE_114 Write Protect Program Flash Page 114
PAGE_115 Write Protect Program Flash Page 115
PAGE_116 Write Protect Program Flash Page 116
PAGE_117 Write Protect Program Flash Page 117
PAGE_118 Write Protect Program Flash Page 118
PAGE_119 Write Protect Program Flash Page 119
PAGE_120 Write Protect Program Flash Page 120
PAGE_121 Write Protect Program Flash Page 121
PAGE_122 Write Protect Program Flash Page 122
PAGE_123 Write Protect Program Flash Page 123
PAGE_124 Write Protect Program Flash Page 124
PAGE_125 Write Protect Program Flash Page 125
PAGE_126 Write Protect Program Flash Page 126
PAGE_127 Write Protect Program Flash Page 127
WPCFG Write/Erase Protect Configuration Region
OFF Configuration Words page not erase/write-protected
ON Configuration Words page erase/write-protected
Register: CONFIG4H @ 0x1FFFF
WPDIS Write Protect Disable bit
OFF WPFP<6:0>/WPEND region ignored
ON WPFP<6:0>/WPEND region erase/write protected
WPEND Write/Erase Protect Region Select bit (valid when WPDIS = 0)
PAGE_WPFP Pages WPFP<6:0> through Configuration Words erase/write protected
PAGE_0 Pages 0 through WPFP<6:0> erase/write protected
LS48MHZ Low Speed USB mode with 48 MHz system clock bit
SYS24X4 System clock at 24 MHz USB CLKEN divide-by is set to 4
SYS48X8 System clock at 48 MHz USB CLKEN divide-by is set to 8