16F19185 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// External Oscillator mode selection bits : EC above 8MHz; PFM set to high power
// Power-up default value for COSC bits : EXTOSC operating per FEXTOSC bits
// Clock Out Enable bit : CLKOUT function is disabled; i/o or oscillator function on OSC2
// VBAT Pin Enable bit : VBAT functionality is disabled
// LCD Charge Pump Mode bit : LCD Charge Pump is enabled
// Clock Switch Enable bit : Writing to NOSC and NDIV is allowed
// Fail-Safe Clock Monitor Enable bit : FSCM timer enabled
#pragma config FEXTOSC = ECH, RSTOSC = EXT1X, CLKOUTEN = OFF, VBATEN = OFF, LCDPEN = ON, CSWEN = ON, FCMEN = ON
#pragma config <setting>=<literal constant>
For example:
// External Oscillator mode selection bits : EC above 8MHz; PFM set to high power
// Power-up default value for COSC bits : EXTOSC operating per FEXTOSC bits
// Clock Out Enable bit : CLKOUT function is disabled; i/o or oscillator function on OSC2
// VBAT Pin Enable bit : VBAT functionality is disabled
// LCD Charge Pump Mode bit : LCD Charge Pump is enabled
// Clock Switch Enable bit : Writing to NOSC and NDIV is allowed
// Fail-Safe Clock Monitor Enable bit : FSCM timer enabled
#pragma config FEXTOSC = 0x7, RSTOSC = 0x7, CLKOUTEN = 0x1, VBATEN = 0x1, LCDPEN = 0x1, CSWEN = 0x1, FCMEN = 0x1
#pragma config <register>=<literal constant>
For example:
// External Oscillator mode selection bits : EC above 8MHz; PFM set to high power
// Power-up default value for COSC bits : EXTOSC operating per FEXTOSC bits
// Clock Out Enable bit : CLKOUT function is disabled; i/o or oscillator function on OSC2
// VBAT Pin Enable bit : VBAT functionality is disabled
// LCD Charge Pump Mode bit : LCD Charge Pump is enabled
// Clock Switch Enable bit : Writing to NOSC and NDIV is allowed
// Fail-Safe Clock Monitor Enable bit : FSCM timer enabled
#pragma config CONFIG1 = 0x3FFF
For example:
// IDLOC @ 0x8000
#pragma config IDLOC0 = 0x16383

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; External Oscillator mode selection bits : EC above 8MHz; PFM set to high power
; Power-up default value for COSC bits : EXTOSC operating per FEXTOSC bits
; Clock Out Enable bit : CLKOUT function is disabled; i/o or oscillator function on OSC2
; VBAT Pin Enable bit : VBAT functionality is disabled
; LCD Charge Pump Mode bit : LCD Charge Pump is enabled
; Clock Switch Enable bit : Writing to NOSC and NDIV is allowed
; Fail-Safe Clock Monitor Enable bit : FSCM timer enabled
config "FEXTOSC" = "ECH", "RSTOSC" = "EXT1X", "CLKOUTEN" = "OFF", "VBATEN" = "OFF", "LCDPEN" = "ON", "CSWEN" = "ON", "FCMEN" = "ON"
config "<setting>"=<literal constant>
For example:
; External Oscillator mode selection bits : EC above 8MHz; PFM set to high power
; Power-up default value for COSC bits : EXTOSC operating per FEXTOSC bits
; Clock Out Enable bit : CLKOUT function is disabled; i/o or oscillator function on OSC2
; VBAT Pin Enable bit : VBAT functionality is disabled
; LCD Charge Pump Mode bit : LCD Charge Pump is enabled
; Clock Switch Enable bit : Writing to NOSC and NDIV is allowed
; Fail-Safe Clock Monitor Enable bit : FSCM timer enabled
config "FEXTOSC" = 0x7, "RSTOSC" = 0x7, "CLKOUTEN" = 0x1, "VBATEN" = 0x1, "LCDPEN" = 0x1, "CSWEN" = 0x1, "FCMEN" = 0x1
config "<register>"=<literal constant>
For example:
; External Oscillator mode selection bits : EC above 8MHz; PFM set to high power
; Power-up default value for COSC bits : EXTOSC operating per FEXTOSC bits
; Clock Out Enable bit : CLKOUT function is disabled; i/o or oscillator function on OSC2
; VBAT Pin Enable bit : VBAT functionality is disabled
; LCD Charge Pump Mode bit : LCD Charge Pump is enabled
; Clock Switch Enable bit : Writing to NOSC and NDIV is allowed
; Fail-Safe Clock Monitor Enable bit : FSCM timer enabled
config "CONFIG1" = 0x3FFF
For example:
; IDLOC @ 0x8000
config "IDLOC0" = 0x16383

Configuration Registers & Settings

Register: CONFIG1 @ 0x8007
FEXTOSC External Oscillator mode selection bits
ECH EC above 8MHz; PFM set to high power
ECM EC for 500kHz to 8MHz; PFM set to medium power
ECL EC below 500kHz; PFM set to low power
OFF Oscillator not enabled
RSTOSC Power-up default value for COSC bits
EXT1X EXTOSC operating per FEXTOSC bits
HFINT1 HFINTOSC (1MHz)
LFINT LFINTOSC
SOSC SOSC
EXT4X EXTOSC with 4x PLL, with EXTOSC operating per FEXTOSC bits
HFINTPLL HFINTOSC with 2x PLL, with OSCFRQ = 16 MHz and CDIV = 1:1 (FOSC = 32 MHz)
HFINT32 HFINTOSC with OSCFRQ= 32 MHz and CDIV = 1:1
CLKOUTEN Clock Out Enable bit
OFF CLKOUT function is disabled; i/o or oscillator function on OSC2
ON CLKOUT function is enabled; FOSC/4 clock appears at OSC2
VBATEN VBAT Pin Enable bit
ON VBAT functionality is enabled
OFF VBAT functionality is disabled
LCDPEN LCD Charge Pump Mode bit
OFF LCD Charge Pump is disabled.
ON LCD Charge Pump is enabled
CSWEN Clock Switch Enable bit
ON Writing to NOSC and NDIV is allowed
OFF The NOSC and NDIV bits cannot be changed by user software
FCMEN Fail-Safe Clock Monitor Enable bit
ON FSCM timer enabled
OFF FSCM timer disabled
Register: CONFIG2 @ 0x8008
MCLRE Master Clear Enable bit
ON MCLR pin is Master Clear function
OFF MCLR pin function is port defined function
PWRTS Power-up Timer selection bits
OFF PWRT disable
PWRT_64 PWRT set at 64 ms
PWRT_16 PWRT set at 16 ms
PWRT_1 PWRT set at 1 ms
LPBOREN Low-Power BOR enable bit
OFF ULPBOR disabled
ON ULPBOR enabled
BOREN Brown-out reset enable bits
ON Brown-out Reset Enabled, SBOREN bit is ignored
NSLEEP Brown-out Reset enabled while running, disabled in sleep; SBOREN is ignored
SBOREN Brown-out reset enabled according to SBOREN bit
OFF Brown-out reset disabled
BORV Brown-out Reset Voltage Selection
LO Brown-out Reset Voltage (VBOR) set to 1.9V on LF, and 2.45V on F Devices
HI Brown-out Reset Voltage (VBOR) is set to 2.7V
ZCD Zero-cross detect disable
OFF Zero-cross detect circuit is disabled at POR.
ON Zero-cross detect circuit is always enabled
PPS1WAY Peripheral Pin Select one-way control
ON The PPSLOCK bit can be cleared and set only once in software
OFF The PPSLOCK bit can be set and cleared repeatedly by software
STVREN Stack Overflow/Underflow Reset Enable bit
ON Stack Overflow or Underflow will cause a reset
OFF Stack Overflow or Underflow will not cause a reset
DEBUG Background Debugger
OFF Background Debugger disabled
ON background debugger enabled
Register: CONFIG3 @ 0x8009
WDTCPS WDT Period Select bits
WDTCPS_0 Divider ratio 1:32
WDTCPS_1 Divider ratio 1:64
WDTCPS_2 Divider ratio 1:128
WDTCPS_3 Divider ratio 1:256
WDTCPS_4 Divider ratio 1:512
WDTCPS_5 Divider ratio 1:1024
WDTCPS_6 Divider ratio 1:2048
WDTCPS_7 Divider ratio 1:4096
WDTCPS_8 Divider ratio 1:8192
WDTCPS_9 Divider ratio 1:16384
WDTCPS_10 Divider ratio 1:32768
WDTCPS_11 Divider ratio 1:65536
WDTCPS_12 Divider ratio 1:131072
WDTCPS_13 Divider ratio 1:262144
WDTCPS_14 Divider ratio 1:524299
WDTCPS_15 Divider ratio 1:1048576
WDTCPS_16 Divider ratio 1:2097152
WDTCPS_17 Divider ratio 1:4194304
WDTCPS_18 Divider ratio 1:8388608
WDTCPS_19 Divider ratio 1:32
WDTCPS_20 Divider ratio 1:32
WDTCPS_21 Divider ratio 1:32
WDTCPS_22 Divider ratio 1:32
WDTCPS_23 Divider ratio 1:32
WDTCPS_24 Divider ratio 1:32
WDTCPS_25 Divider ratio 1:32
WDTCPS_26 Divider ratio 1:32
WDTCPS_27 Divider ratio 1:32
WDTCPS_28 Divider ratio 1:32
WDTCPS_29 Divider ratio 1:32
WDTCPS_30 Divider ratio 1:32
WDTCPS_31 Divider ratio 1:65536; software control of WDTPS
WDTE WDT operating mode
OFF WDT Disabled, SWDTEN is ignored
SWDTEN WDT enabled/disabled by SWDTEN bit in WDTCON0
NSLEEP WDT enabled while sleep=0, suspended when sleep=1; SWDTEN ignored
ON WDT enabled regardless of sleep; SWDTEN ignored
WDTCWS WDT Window Select bits
WDTCWS_0 window delay = 87.5 percent of time; no software control; keyed access required
WDTCWS_1 window delay = 75 percent of time; no software control; keyed access required
WDTCWS_2 window delay = 62.5 percent of time; no software control; keyed access required
WDTCWS_3 window delay = 50 percent of time; no software control; keyed access required
WDTCWS_4 window delay = 37.5 percent of time; no software control; keyed access required
WDTCWS_5 window delay = 25 percent of time; no software control; keyed access required
WDTCWS_6 window always open (100%); no software control; keyed access required
WDTCWS_7 window always open (100%); software control; keyed access not required
WDTCCS WDT input clock selector
LFINTOSC WDT reference clock is the 31.0kHz LFINTOSC output
HFINTOSC WDT reference clock is the 31.25 kHz HFINTOSC
SOSC WDT reference clock is the SOSC
SC Software Control
Register: CONFIG4 @ 0x800A
BBSIZE Boot Block Size Selection bits
65536 Boot Block Size (Words) 65536
32768 Boot Block Size (Words) 32768
16384 Boot Block Size (Words) 16384
8192 Boot Block Size (Words) 8192
4096 Boot Block Size (Words) 4069
2048 Boot Block Size (Words) 2048
1024 Boot Block Size (Words) 1024
512 Boot Block Size (Words) 512
BBEN Boot Block Enable bit
OFF Boot Block disabled
ON Boot Block enabled
SAFEN SAF Enable bit
OFF SAF disabled
ON SAF enabled
WRTAPP Application Block Write Protection bit
OFF Application Block NOT write-protected
ON Application Block write-protected
WRTB Boot Block Write Protection bit
OFF Boot Block NOT write-protected
ON Boot Block write-protected
WRTC Configuration Register Write Protection bit
OFF Configuration Words NOT write-protected
ON Configuration Word write-protected
WRTD Data EEPROM Write Protection bit
OFF Data EEPROM NOT write-protected
ON Data EEPROM write-protected
WRTSAF Storage Area Flash Write Protection bit
OFF SAF NOT write-protected
ON SAF write-protected
LVP Low Voltage Programming Enable bit
ON Low Voltage programming enabled. MCLR/Vpp pin function is MCLR.
OFF High Voltage on MCLR/Vpp must be used for programming
Register: CONFIG5 @ 0x800B
CP UserNVM Program memory code protection bit
OFF UserNVM code protection disabled
ON UserNVM code protection enabled
Register: IDLOC0 @ 0x8000
Register: IDLOC1 @ 0x8001
Register: IDLOC2 @ 0x8002
Register: IDLOC3 @ 0x8003