8.4 Configuration Bit Access
Microchip devices have several locations which contain the configuration bits or fuses. These bits specify fundamental device operation, such as the oscillator mode, watchdog timer, programming mode and code protection. Failure to correctly set these bits may result in code failure or a non-running device.
Configuration Settings may be made using the preprocessor directive
#pragma config
and settings macros specified under the
docs
subdirectory of the compiler install directory.
The directive format options are:
#pragma config setting = state|value
#pragma config register = value
where setting
is a configuration setting descriptor
(e.g., WDT), state
is a descriptive value (e.g., ON) and
value
is a numerical value. The register token may represent a whole
configuration word register, e.g., CONFIG1L
.
A list of all available settings by device may be found from MPLAB X IDE, Dashboard window, Compiler Help button or from the command-line under:
<MPLAB XC16 Installation
folder>/vx.xx/docs/config_index.html