ATTINY841 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Select Clock Source : Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/16 CK + 16 ms
// Clock output on PORTC2 : CLEAR
// Divide clock by 8 internally : SET
#pragma config SUT_CKSEL = SUT_CKSEL_INTRCOSC_8MHZ_6CK_16CK_16MS, CKOUT = CLEAR, CKDIV8 = SET
#pragma config <setting>=<literal constant>
For example:
// Select Clock Source : Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/16 CK + 16 ms
// Clock output on PORTC2 : CLEAR
// Divide clock by 8 internally : SET
#pragma config SUT_CKSEL = 0x2, CKOUT = 0x1, CKDIV8 = 0x0

Configuration Registers & Settings

Register: LOW
SUT_CKSEL Select Clock Source
SUT_CKSEL_EXTCLK_6CK_16CK_16MS Ext. Clock; Start-up time PWRDWN/RESET: 6 CK/16 CK + 16 ms
SUT_CKSEL_INTRCOSC_8MHZ_6CK_16CK_16MS Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/16 CK + 16 ms
SUT_CKSEL_INTULPOSC_32KHZ_6CK_16CK_16MS Int. ULP Osc.; Start-up time PWRDWN/RESET: 6 CK/16 CK + 16 ms
SUT_CKSEL_EXTLOFXTAL_1KCK_16CK_16MS Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 1K CK/16 CK + 16 ms
SUT_CKSEL_EXTLOFXTAL_32KCK_14CK_16MS Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 32K CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_0MHZ4_0MHZ9_258CK_16CK_16MS Ext. Ceramic Res. 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 258 CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_0MHZ4_0MHZ9_1KCK_16CK_16MS Ext. Ceramic Res. 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 1K CK/16 CK + 16 ms
SUT_CKSEL_EXTXOSC_0MHZ4_0MHZ9_16KCK_16CK_16MS Ext. Crystal Osc. 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 16 K CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_0MHZ9_3MHZ_258CK_16CK_16MS Ext. Ceramic Res. 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 258 CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_0MHZ9_3MHZ_1KCK_16CK_16MS Ext. Ceramic Res. 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 1K CK/16 CK + 16 ms
SUT_CKSEL_EXTXOSC_0MHZ9_3MHZ_16KCK_16CK_16MS Ext. Crystal Osc. 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 16 K CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_3MHZ_8MHZ_258CK_16CK_16MS Ext. Ceramic Res. 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 258 CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_3MHZ_8MHZ_1KCK_16CK_16MS Ext. Ceramic Res. 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 1K CK/16 CK + 16 ms
SUT_CKSEL_EXTXOSC_3MHZ_8MHZ_16KCK_16CK_16MS Ext. Crystal Osc. 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 16 K CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_8MHZ_XX_258CK_16CK_16MS Ext. Ceramic Res. 8.0- MHz; Start-up time PWRDWN/RESET: 258 CK/16 CK + 16 ms
SUT_CKSEL_EXTCRES_8MHZ_XX_1KCK_16CK_16MS Ext. Ceramic Res. 8.0- MHz; Start-up time PWRDWN/RESET: 1K CK/16 CK + 16 ms
SUT_CKSEL_EXTXOSC_8MHZ_XX_16KCK_16CK_16MS Ext. Crystal Osc. 8.0- MHz; Start-up time PWRDWN/RESET: 16 K CK/16 CK + 16 ms
CKOUT Clock output on PORTC2
SET
CLEAR
CKDIV8 Divide clock by 8 internally
SET
CLEAR
Register: HIGH
BODLEVEL Brown-out Detector trigger level
BODLEVEL_4V3 Brown-out detection at VCC=4.3 V
BODLEVEL_2V7 Brown-out detection at VCC=2.7 V
BODLEVEL_1V8 Brown-out detection at VCC=1.8 V
EESAVE Preserve EEPROM through the Chip Erase cycle
SET
CLEAR
WDTON Watch-dog Timer always on
SET
CLEAR
SPIEN Serial program downloading (SPI) enabled
SET
CLEAR
DWEN Debug Wire enable
SET
CLEAR
RSTDISBL Reset Disabled (Enable PC2 as i/o pin)
SET
CLEAR
Register: EXTENDED
SELFPRGEN Self Programming enable
SET
CLEAR
BODACT BOD mode of operation when the device is active or idle
BODACT_BOD_SAMPLED Sampled
BODACT_BOD_ENABLED Enabled
BODACT_BOD_DISABLED Disabled
BODPD BOD mode of operation when the device is in sleep mode
BODPD_BOD_SAMPLED Sampled
BODPD_BOD_ENABLED Enabled
BODPD_BOD_DISABLED Disabled
ULPOSCSEL Frequency selection for internal ULP oscillator. The selection only affects system clock, watchdog and reset timeout always use 32 kHz clock.
ULPOSCSEL_ULPOSC_32KHZ 32 kHz
ULPOSCSEL_ULPOSC_64KHZ 64 kHz
ULPOSCSEL_ULPOSC_128KHZ 128 kHz
ULPOSCSEL_ULPOSC_256KHZ 256 kHz
ULPOSCSEL_ULPOSC_512KHZ 512 kHz
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