ATMEGA16HVB Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator select : Default
// Select start-up time : Start-up time 14 CK + 512 ms
// Serial program downloading (SPI) enabled : SET
// Preserve EEPROM through the Chip Erase cycle : CLEAR
// Watch-dog Timer always on : CLEAR
#pragma config OSCSEL = OSCSEL_DEFAULT, SUT = SUT_14CK_512MS, SPIEN = SET, EESAVE = CLEAR, WDTON = CLEAR
#pragma config <setting>=<literal constant>
For example:
// Oscillator select : Default
// Select start-up time : Start-up time 14 CK + 512 ms
// Serial program downloading (SPI) enabled : SET
// Preserve EEPROM through the Chip Erase cycle : CLEAR
// Watch-dog Timer always on : CLEAR
#pragma config OSCSEL = 0x1, SUT = 0x7, SPIEN = 0x0, EESAVE = 0x1, WDTON = 0x1

Configuration Registers & Settings

Register: LOW
OSCSEL Oscillator select
OSCSEL_DEFAULT Default
SUT Select start-up time
SUT_14CK_4MS Start-up time 14 CK + 4 ms
SUT_14CK_8MS Start-up time 14 CK + 8 ms
SUT_14CK_16MS Start-up time 14 CK + 16 ms
SUT_14CK_32MS Start-up time 14 CK + 32 ms
SUT_14CK_64MS Start-up time 14 CK + 64 ms
SUT_14CK_128MS Start-up time 14 CK + 128 ms
SUT_14CK_256MS Start-up time 14 CK + 256 ms
SUT_14CK_512MS Start-up time 14 CK + 512 ms
SPIEN Serial program downloading (SPI) enabled
SET
CLEAR
EESAVE Preserve EEPROM through the Chip Erase cycle
SET
CLEAR
WDTON Watch-dog Timer always on
SET
CLEAR
Register: HIGH
BOOTRST Boot Reset vector Enabled
SET
CLEAR
BOOTSZ Select Boot Size
BOOTSZ_256W_1F00 Boot Flash size=256 words Boot address=$1F00
BOOTSZ_512W_1E00 Boot Flash size=512 words Boot address=$1E00
BOOTSZ_1024W_1C00 Boot Flash size=1024 words Boot address=$1C00
BOOTSZ_2048W_1800 Boot Flash size=2048 words Boot address=$1800
DWEN Debug Wire enable
SET
CLEAR
CKDIV8 Clock Divide mode
SET
CLEAR
Register: LOCKBIT
LB Memory Lock
LB_PROG_VER_DISABLED Further programming and verification disabled
LB_PROG_DISABLED Further programming disabled
LB_NO_LOCK No memory lock features enabled
BLB0 Boot Loader Protection Mode
BLB0_LPM_SPM_DISABLE LPM and SPM prohibited in Application Section
BLB0_LPM_DISABLE LPM prohibited in Application Section
BLB0_SPM_DISABLE SPM prohibited in Application Section
BLB0_NO_LOCK No lock on SPM and LPM in Application Section
BLB1 Boot Loader Protection Mode
BLB1_LPM_SPM_DISABLE LPM and SPM prohibited in Boot Section
BLB1_LPM_DISABLE LPM prohibited in Boot Section
BLB1_SPM_DISABLE SPM prohibited in Boot Section
BLB1_NO_LOCK No lock on SPM and LPM in Boot Section