12f683 CPU configuration

Each attribute in the configuration table below has two or more possible values associated with it.

e.g. the watchdog attribute (labelled field H ) has the possible values

one and only one of these values must be specified when configuring the CPU

The 12f683 CPU has 9 configuration attributes (labelled field A to I in the table below). The attributes specific to the 12f683 CPU are defined in the file hwreg-p12f683.h To correctly configure the 12f683 CPU each attribute must be set to a valid value. This is done by using one "pragma cpu_config" statement per attribute. A valid configuration for 12f683 would look like:

e.g.
	include "hwreg-p12f683.h"

	pragma cpu_config CFG_FCMEN_ON
	pragma cpu_config CFG_IESO_ON
	pragma cpu_config CFG_BOD_ON
	pragma cpu_config CFG_CPD_ON
	pragma cpu_config CFG_CP_ON
	pragma cpu_config CFG_MCLRE_ON
	pragma cpu_config CFG_PWRTE_ON
	pragma cpu_config CFG_WDT_ON
	pragma cpu_config CFG_EXTRC

NOTE: All attributes for a given processor must be specified, attributes for different processors may not be mixed.

Field
Attribute
XCSB value
Description
A
  CFG_FCMEN_ON Fail-Safe Clock Monitor is enabled
CFG_FCMEN_OFF Fail-Safe Clock Monitor is disabled
B
  CFG_IESO_ON Internal External Switchover mode is enabled
CFG_IESO_OFF Internal External Switchover mode is disabled
C
  CFG_BOD_ON BOD enabled
CFG_BOD_NSLEEP BOD enabled during operation and disabled in Sleep
CFG_BOD_SBODEN BOD controlled by SBODEN bit (PCON bit 4)
CFG_BOD_OFF BOD disabled
D
Data EEPROM code protect CFG_CPD_ON Data EEPROM is code protected
CFG_CPD_OFF Data EEPROM is not protected
E
Program Memory Code Protect CFG_CP_ON code protect all program memory
CFG_CP_OFF do not code protect any program memory
F
  CFG_MCLRE_ON GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD
CFG_MCLRE_OFF GP3/MCLR pin function is MCLR
G
Power-Up Timer CFG_PWRTE_ON power-up timer enable
CFG_PWRTE_OFF power-up timer disable
H
Watchdog timer CFG_WDT_ON watchdog timer enable
CFG_WDT_OFF watchdog timer disable
I
Oscillator CFG_EXTRC RC oscillator: CLKOUT function on GP4/OSC2/CLKOUT pin, RC on GP5/OSC1/CLKIN
CFG_EXTRCIO RCIO oscillator: I/O function on GP4/OSC2/CLKOUT pin, RC on GP5/OSC1/CLKIN
CFG_INTOSC INTOSC oscillator: CLKOUT function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN
CFG_INTOSCIO INTOSCIO oscillator: I/O function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN
CFG_EC_OSC external clock on GP5/OSC1/CLKIN and I/O function on GP4/OSC2/CLKOUT pin
CFG_HS_OSC High Speed Crystal / Resonator (HS) oscillator on GP4/OSC2/CLKOUT and GP5/OSC1/CLKIN
CFG_XT_OSC Crystal / Resonator (XT) oscillator on GP4/OSC2/CLKOUT and GP5/OSC1/CLKIN
CFG_LP_OSC Low Power Crystal (LP) oscillator on GP4/OSC2/CLKOUT and GP5/OSC1/CLKIN