ATtiny441/ATtiny841 8-bit AVR Microcontroller with 4/8K Bytes In-System Programmable Flash DATASHEET Features High Performance, Low Power Atmel(R) AVR(R) 8-bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation Up to 16 MIPS Throughput at 16 MHz Non-volatile Program and Data Memories 4/8K Bytes of In-System Programmable Flash Program Memory Endurance: 10,000 Write/Erase Cycles 256/512 Bytes of In-System Programmable EEPROM Endurance: 100,000 Write/Erase Cycles 256/512 Bytes Internal SRAM Data Retention: 20 Years at 85oC / 100 Years at 25oC Programming Lock for Self-Programming Flash & EEPROM Data Security Peripheral Features One 8-bit and Two 16-bit Timer/Counters with Two PWM Channels, Each Programmable Ultra Low Power Watchdog Timer 10-bit Analog to Digital Converter 12 External and 5 Internal, Single-ended Input Channels 46 Differential ADC Channel Pairs with Programmable Gain (1x / 20x / 100x) Two On-chip Analog Comparators Two Full Duplex USARTs with Start Frame Detection Master/Slave SPI Serial Interface Slave I2C Serial Interface Special Microcontroller Features Low Power Idle, ADC Noise Reduction, Standby and Power-down Modes Enhanced Power-on Reset Circuit Programmable Brown-out Detection Circuit with Supply Voltage Sampling External and Internal Interrupt Sources Pin Change Interrupt on 12 Pins Calibrated 8MHz Oscillator with Temperature Calibration Option Calibrated 32kHz Ultra Low Power Oscillator High-Current Drive Capability on 2 I/O Pins I/O and Packages 14-pin SOIC, 20-pad MLF/QFN and 20-pad VQFN 12 Programmable I/O Lines Speed Grade 0 - 2 MHz @ 1.7 - 1.8V 0 - 4 MHz @ 1.8 - 5.5V 0 - 10 MHz @ 2.7 - 5.5V 0 - 16 MHz @ 4.5 - 5.5V Low Power Consumption Active Mode: 0.2 mA at 1.8V and 1MHz Idle Mode: 30 A at 1.8V and 1MHz Power-Down Mode (WDT Enabled): 1.3A at 1.8V Power-Down Mode (WDT Disabled): 150nA at 1.8V 8495F-AVR-10/2013 1. Pin Configurations Figure 1-1. Pinout in 14-pin SOIC. (PCINT8/ADC11/XTAL1/CLKI) (PCINT9/ADC10/XTAL2/INT0) (PCINT11/ADC9/RESET/dW) (PCINT10/ADC8/CLKO/TOCC7/ICP2/RXD0) (PCINT7/ADC7/TOCC6/ICP1/TXD0/SS) (PCINT6/ADC6/ACO1/TOCC5/XCK1/SDA/MOSI) VCC PB0 PB1 PB3 PB2 PA7 PA6 1 14 2 13 3 12 4 11 5 10 6 9 7 8 GND PA0 (PCINT0/ADC0/AREF/MISO) PA1 (PCINT1/ADC1/AIN00/TOCC0/TXD0/MOSI) PA2 (PCINT2/ADC2/AIN01/TOCC1/RXD0/SS) PA3 (PCINT3/ADC3/AIN10/TOCC2/T0/XCK0/SCK) PA4 (PCINT4/ADC4/AIN11/TOCC3/T1/RXD1/SCL/SCK) PA5 (PCINT5/ADC5/ACO0/TOCC4/T2/TXD1/MISO) Bottom pad should be 16 17 18 13 4 12 5 11 10 3 9 14 8 15 2 PA7 PB2 PB3 PB1 PB0 (PCINT7/ADC7/TOCC6/ICP1/TXD0/SS) (PCINT10/ADC8/CLKO/TOCC7/ICP2/RXD0) (PCINT11/ADC9/RESET/dW) (PCINT9/ADC10/XTAL2/INT0) (PCINT8/ADC11/XTAL1/CLKI) DNC DNC GND VCC DNC NOTE 19 1 7 PA4 PA3 PA2 PA1 PA0 6 (PCINT4/ADC4/AIN11/TOCC3/T1/RXD1/SCL/SCK) (PCINT3/ADC3/AIN10/TOCC2/T0/XCK0/SCK) (PCINT2/ADC2/AIN01/TOCC1/RXD0/SS) (PCINT1/ADC1/AIN00/TOCC0/TXD0/MOSI) (PCINT0/ADC0/AREF/MISO) 20 PA5 (PCINT5/ADC5/ACO0/TOCC4/T2/TXD1/MISO) DNC DNC DNC PA6 (PCINT6/ADC6/ACO1/TOCC5/XCK1/SDA/MOSI) Figure 1-2. Pinout in 20-pad VQFN/WQFN. soldered to ground. DNC: Do Not Connect 1.1 Pin Description 1.1.1 VCC Supply voltage. 1.1.2 GND Ground. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 2 1.1.3 RESET Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running and provided the reset pin has not been disabled. The minimum pulse length is given in Table 25-5 on page 240. Shorter pulses are not guaranteed to generate a reset. The reset pin can also be used as a (weak) I/O pin. 1.1.4 Port A (PA7:PA0) This is an 8-bit, bi-directional I/O port with internal pull-up resistors (selected for each bit). Output buffers have standard sink and source capability, except ports PA7 and PA5, which have high sink capability. See Table 25-1 on page 236 for port drive strength. As inputs, port pins that are externally pulled low will source current provided that pull-up resistors are activated. Port pins are tri-stated when a reset condition becomes active, even if the clock is not running. This port has alternative pin functions for pin change interrupts, the analog comparator, and ADC. See "Alternative Port Functions" on page 60. 1.1.5 Port B (PB3:PB0) This is a 4-bit, bi-directional I/O port with internal pull-up resistors (selected for each bit). Output buffers have standard sink and source capability. See Table 25-1 on page 236 for port drive strength. As inputs, port pins that are externally pulled low will source current provided that pull-up resistors are activated. Port pins are tri-stated when a reset condition becomes active, even if the clock is not running. This port has alternative pin functions for pin change interrupts, and ADC. See "Alternative Port Functions" on page 60. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 3 2. Overview ATtiny441/841 is a low-power CMOS 8-bit microcontrollers based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATtiny441/841 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed. Figure 2-1. Block Diagram VCC RESET GND DEBUG INTERFACE ON-CHIP DEBUGGER POWER SUPERVISION: POR BOD RESET EEPROM CALIBRATED ULP OSCILLATOR CALIBRATED OSCILLATOR WATCHDOG TIMER ISP INTERFACE TWO-WIRE INTERFACE USART USART 8-BIT TIMER/COUNTER 16-BIT TIMER/COUNTER TIMING AND CONTROL 16-BIT TIMER/COUNTER PROGRAM MEMORY DATA MEMORY (FLASH) (SRAM) CPU CORE TEMPERATURE SENSOR VOLTAGE REFERENCE ANALOG COMPARATOR MULTIPLEXER ANALOG COMPARATOR ADC 8-BIT DATA BUS PORT A PORT B PA[7:0] PB[3:0] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 4 The AVR core combines a rich instruction set with 32 general purpose working registers. All 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in a single instruction, executed in one clock cycle. The resulting architecture is compact and code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers. ATtiny441/841 provides the following features: 4K/8K bytes of in-system programmable Flash 256/512 bytes of SRAM data memory 256/512 bytes of EEPROM data memory 12 general purpose I/O lines 32 general purpose working registers One 8-bit timer/counter with two PWM channels Two 16-bit timer/counters with two PWM channels Internal and external interrupts One 10-bit ADC with 5 internal and 12 external channels One ultra-low power, programmable watchdog timer with internal oscillator Two programmable USARTs with start frame detection Slave Two-Wire Interface (TWI) Master/slave Serial Peripheral Interface (SPI) Calibrated 8MHz oscillator Calibrated 32kHz, ultra low power oscillator Four software selectable power saving modes. The device includes the following modes for saving power: Idle mode: stops the CPU while allowing the timer/counter, ADC, analog comparator, SPI, TWI, and interrupt system to continue functioning ADC Noise Reduction mode: minimizes switching noise during ADC conversions by stopping the CPU and all I/O modules except the ADC Power-down mode: registers keep their contents and all chip functions are disabled until the next interrupt or hardware reset Standby mode: the oscillator is running while the rest of the device is sleeping, allowing very fast start-up combined with low power consumption The device is manufactured using Atmel's high density non-volatile memory technology. The Flash program memory can be re-programmed in-system through a serial interface, by a conventional non-volatile memory programmer or by an onchip boot code, running on the AVR core. The ATtiny441/841 AVR is supported by a full suite of program and system development tools including: C compilers, macro assemblers, program debugger/simulators and evaluation kits. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 5 3. General Information 3.1 Resources A comprehensive set of drivers, application notes, data sheets and descriptions on development tools are available for download at http://www.atmel.com/avr. 3.2 Code Examples This documentation contains simple code examples that briefly show how to use various parts of the device. These code examples assume that the part specific header file is included before compilation. Be aware that not all C compiler vendors include bit definitions in the header files and interrupt handling in C is compiler dependent. Please confirm with the C compiler documentation for more details. 3.3 Data Retention Reliability Qualification results show that the projected data retention failure rate is much less than 1 PPM over 20 years at 85C or 100 years at 25C. 3.4 Disclaimer Typical values contained in this datasheet are based on simulations and characterization of other AVR microcontrollers manufactured on the same process technology. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 6 4. CPU Core This section discusses the AVR core architecture in general. The main function of the CPU core is to ensure correct program execution. The CPU must therefore be able to access memories, perform calculations, control peripherals, and handle interrupts. Architectural Overview Figure 4-1. Block Diagram of the AVR Architecture 8-BIT DATA BUS INDIRECT ADDRESSING DATA MEMORY (SRAM) PROGRAM COUNTER PROGRAM MEMORY (FLASH) INSTRUCTION REGISTER INTERRUPT UNIT STATUS AND CONTROL GENERAL PURPOSE REGISTERS DIRECT ADDRESSING 4.1 X Y Z ALU INSTRUCTION DECODER CONTROL LINES In order to maximize performance and parallelism, the AVR uses a Harvard architecture - with separate memories and buses for program and data. Instructions in the Program memory are executed with a single level pipelining. While one instruction is being executed, the next instruction is pre-fetched from the Program memory. This concept enables instructions to be executed in every clock cycle. The Program memory is In-System Reprogrammable Flash memory. The fast-access Register File contains 32 x 8-bit general purpose working registers with a single clock cycle access time. This allows single-cycle Arithmetic Logic Unit (ALU) operation. In a typical ALU operation, two operands are output from the Register File, the operation is executed, and the result is stored back in the Register File - in one clock cycle. Six of the 32 registers can be used as three 16-bit indirect address register pointers for Data Space addressing - enabling efficient address calculations. One of the these address pointers can also be used as an address pointer for look up tables in Flash Program memory. These added function registers are the 16-bit X-, Y-, and Z-register, described later in this section. The ALU supports arithmetic and logic operations between registers or between a constant and a register. Single register operations can also be executed in the ALU. After an arithmetic operation, the Status Register is updated to reflect information about the result of the operation. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 7 Program flow is provided by conditional and unconditional jump and call instructions, capable of directly addressing the whole address space. Most AVR instructions have a single 16-bit word format but 32-bit wide instructions also exist. The actual instruction set varies, as some devices only implement a part of the instruction set. During interrupts and subroutine calls, the return address Program Counter (PC) is stored on the Stack. The Stack is effectively allocated in the general data SRAM, and consequently the Stack size is only limited by the total SRAM size and the usage of the SRAM. All user programs must initialize the SP in the Reset routine (before subroutines or interrupts are executed). The Stack Pointer (SP) is read/write accessible in the I/O space. The data SRAM can easily be accessed through the five different addressing modes supported in the AVR architecture. The memory spaces in the AVR architecture are all linear and regular memory maps. A flexible interrupt module has its control registers in the I/O space with an additional Global Interrupt Enable bit in the Status Register. All interrupts have a separate Interrupt Vector in the Interrupt Vector table. The interrupts have priority in accordance with their Interrupt Vector position. The lower the Interrupt Vector address, the higher the priority. The I/O memory space contains 64 addresses for CPU peripheral functions as Control Registers, SPI, and other I/O functions. The I/O memory can be accessed directly, or as the Data Space locations following those of the Register File, 0x20 - 0x5F. In addition, the ATtiny441/841 has Extended I/O Space from 0x60 - 0xFF in SRAM where only the ST/STS/STD and LD/LDS/LDD instructions can be used. 4.2 ALU - Arithmetic Logic Unit The high-performance AVR ALU operates in direct connection with all the 32 general purpose working registers. Within a single clock cycle, arithmetic operations between general purpose registers or between a register and an immediate are executed. The ALU operations are divided into three main categories - arithmetic, logical, and bit-functions. See external document "AVR Instruction Set" and "Instruction Set Summary" on page 351 section for more information. 4.3 Status Register The Status Register contains information about the result of the most recently executed arithmetic instruction. This information can be used for altering program flow in order to perform conditional operations. Note that the Status Register is updated after all ALU operations. This will in many cases remove the need for using the dedicated compare instructions, resulting in faster and more compact code. See external document "AVR Instruction Set" and "Instruction Set Summary" on page 351 section for more information. The Status Register is neither automatically stored when entering an interrupt routine, nor restored when returning from an interrupt. This must be handled by software. 4.4 General Purpose Register File The Register File is optimized for the AVR Enhanced RISC instruction set. In order to achieve the required performance and flexibility, the following input/output schemes are supported by the Register File: One 8-bit output operand and one 8-bit result input Two 8-bit output operands and one 8-bit result input Two 8-bit output operands and one 16-bit result input One 16-bit output operand and one 16-bit result input Figure 4-2 below shows the structure of the 32 general purpose working registers in the CPU. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 8 Figure 4-2. General Purpose Working Registers 7 0 Addr. Special Function R0 0x00 R1 0x01 R2 0x02 ... ... R13 0x0D R14 0x0E R15 0x0F R16 0x10 R17 0x11 ... ... R26 0x1A X-register Low Byte R27 0x1B X-register High Byte R28 0x1C Y-register Low Byte R29 0x1D Y-register High Byte R30 0x1E Z-register Low Byte R31 0x1F Z-register High Byte Most of the instructions operating on the Register File have direct access to all registers, and most of them are single cycle instructions. As shown in Figure 4-2, each register is also assigned a Data memory address, mapping them directly into the first 32 locations of the user Data Space. Although not being physically implemented as SRAM locations, this memory organization provides great flexibility in access of the registers, as the X-, Y- and Z-pointer registers can be set to index any register in the file. 4.4.1 The X-register, Y-register, and Z-register The registers R26..R31 have added functions to their general purpose usage. These registers are 16-bit address pointers for indirect addressing of the data space. The three indirect address registers X, Y, and Z are defined as described in Figure 4-3 below. Figure 4-3. The X-, Y-, and Z-registers 15 X-register 7 0 XH 0 7 R27 XL R26 15 Y-register 7 0 YH 0 7 R29 YL 7 0 R28 15 Z-register 0 0 ZH R31 0 7 ZL 0 R30 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 9 In the different addressing modes these address registers have functions as fixed displacement, automatic increment, and automatic decrement (see the instruction set reference for details). 4.5 Stack Pointer The stack is mainly used for storing temporary data, local variables and return addresses after interrupts and subroutine calls. The Stack Pointer registers (SPH and SPL) always point to the top of the stack. Note that the stack grows from higher memory locations to lower memory locations. This means that the PUSH instructions decreases and the POP instruction increases the stack pointer value. The stack pointer points to the area of data memory where subroutine and interrupt stacks are located. This stack space must be defined by the program before any subroutine calls are executed or interrupts are enabled. The pointer is decremented by one when data is put on the stack with the PUSH instruction, and incremented by one when data is fetched with the POP instruction. It is decremented by two when the return address is put on the stack by a subroutine call or a jump to an interrupt service routine, and incremented by two when data is fetched by a return from subroutine (the RET instruction) or a return from interrupt service routine (the RETI instruction). The AVR stack pointer is typically implemented as two 8-bit registers in the I/O register file. The width of the stack pointer and the number of bits implemented is device dependent. In some AVR devices all data memory can be addressed using SPL, only. In this case, the SPH register is not implemented. The stack pointer must be set to point above the I/O register areas, the minimum value being the lowest address of SRAM. See Table 5-2 on page 16. 4.6 Instruction Execution Timing This section describes the general access timing concepts for instruction execution. The AVR CPU is driven by the CPU clock clkCPU, directly generated from the selected clock source for the chip. No internal clock division is used. Figure 4-4 shows the parallel instruction fetches and instruction executions enabled by the Harvard architecture and the fast access Register File concept. This is the basic pipelining concept to obtain up to 1 MIPS per MHz with the corresponding unique results for functions per cost, functions per clocks, and functions per power-unit. Figure 4-4. The Parallel Instruction Fetches and Instruction Executions T1 T2 T3 T4 clkCPU 1st Instruction Fetch 1st Instruction Execute 2nd Instruction Fetch 2nd Instruction Execute 3rd Instruction Fetch 3rd Instruction Execute 4th Instruction Fetch Figure 4-5 shows the internal timing concept for the Register File. In a single clock cycle an ALU operation using two register operands is executed, and the result is stored back to the destination register. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 10 Figure 4-5. Single Cycle ALU Operation T1 T2 T3 T4 clkCPU Total Execution Time Register Operands Fetch ALU Operation Execute Result Write Back 4.7 Reset and Interrupt Handling The AVR provides several different interrupt sources. These interrupts and the separate Reset Vector each have a separate Program Vector in the Program memory space. All interrupts are assigned individual enable bits which must be written logic one together with the Global Interrupt Enable bit in the Status Register in order to enable the interrupt. The lowest addresses in the Program memory space are by default defined as the Reset and Interrupt Vectors. The complete list of vectors is shown in "Interrupts" on page 49. The list also determines the priority levels of the different interrupts. The lower the address the higher is the priority level. RESET has the highest priority, and next is INT0 - the External Interrupt Request 0. When an interrupt occurs, the Global Interrupt Enable I-bit is cleared and all interrupts are disabled. The user software can write logic one to the I-bit to enable nested interrupts. All enabled interrupts can then interrupt the current interrupt routine. The I-bit is automatically set when a Return from Interrupt instruction - RETI - is executed. There are basically two types of interrupts. The first type is triggered by an event that sets the Interrupt Flag. For these interrupts, the Program Counter is vectored to the actual Interrupt Vector in order to execute the interrupt handling routine, and hardware clears the corresponding Interrupt Flag. Interrupt Flags can also be cleared by writing a logic one to the flag bit position(s) to be cleared. If an interrupt condition occurs while the corresponding interrupt enable bit is cleared, the Interrupt Flag will be set and remembered until the interrupt is enabled, or the flag is cleared by software. Similarly, if one or more interrupt conditions occur while the Global Interrupt Enable bit is cleared, the corresponding Interrupt Flag(s) will be set and remembered until the Global Interrupt Enable bit is set, and will then be executed by order of priority. The second type of interrupts will trigger as long as the interrupt condition is present. These interrupts do not necessarily have Interrupt Flags. If the interrupt condition disappears before the interrupt is enabled, the interrupt will not be triggered. When the AVR exits from an interrupt, it will always return to the main program and execute one more instruction before any pending interrupt is served. Note that the Status Register is not automatically stored when entering an interrupt routine, nor restored when returning from an interrupt routine. This must be handled by software. When using the CLI instruction to disable interrupts, the interrupts will be immediately disabled. No interrupt will be executed after the CLI instruction, even if it occurs simultaneously with the CLI instruction. The following example shows how this can be used to avoid interrupts during the timed EEPROM write sequence. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 11 Assembly Code Example in cli sbi sbi out bit) r16, SREG ; store SREG value ; disable interrupts during timed sequence EECR, EEMPE ; start EEPROM write EECR, EEPE SREG, r16 ; restore SREG value (I- C Code Example char cSREG; cSREG = SREG; /* disable interrupts during timed sequence */ _CLI(); EECR |= (1< 8MHz Crystal Oscillator / Ceramic Resonator (see page 28) Note: 1. For all fuses "1" means unprogrammed and "0" means programmed. 2. This is the default setting. The device is shipped with this fuse combination. . CKSEL fuse bits can be read by firmware (see "Reading Lock, Fuse and Signature Data from Software" on page 222), but firmware can not write to fuse bits. When the device wakes up from power-down the selected clock source is used to time the start-up, ensuring stable oscillator operation before instruction execution starts. When the CPU starts from reset, the internal 32kHz oscillator is used for generating an additional delay, allowing supply voltage to reach a stable level before normal device operation is started. System clock alternatives are discussed in the following sections. 6.2.1 External Clock To drive the device from an external clock source, CLKI should be connected as shown in Figure 6-2, below. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 26 Figure 6-2. External Clock Drive Configuration EXTERNAL CLOCK SIGNAL CLKI GND Start-up time for this clock source is determined by the SUT fuse bit, as shown in Table 6-5 on page 30. To ensure stable operation of the MCU it is required to avoid sudden changes in the external clock frequency . A variation in frequency of more than 2% from one clock cycle to the next can lead to unpredictable behavior. It is required to ensure that the MCU is kept in Reset during such changes in the clock frequency. Stable operation for large step changes in system clock frequency is guaranteed when using the system clock prescaler. See "System Clock Prescaler" on page 29. 6.2.2 Calibrated Internal 8MHz Oscillator The internal 8MHz oscillator operates with no external components and, by default, provides a clock source with an approximate frequency of 8MHz. Though voltage and temperature dependent, this clock can be very accurately calibrated by the user. See Table 25-2 on page 239 and "Internal Oscillator Speed" on page 292 for more details. During reset, hardware loads the pre-programmed calibration value into the OSCCAL0 register and thereby automatically calibrates the oscillator. The accuracy of this calibration is referred to as "Factory Calibration" in Table 25-2 on page 239. For more information on automatic loading of pre-programmed calibration value, see section "Calibration Bytes" on page 222. It is possible to reach higher accuracies than factory defaults, especially when the application allows temperature and voltage ranges to be narrowed. The firmware can reprogram the calibration data in OSCCAL0 either at start-up or during run-time. The continuous, run-time calibration method allows firmware to monitor voltage and temperature and compensate for any detected variations. See "OSCCAL0 - Oscillator Calibration Register" on page 33, "Temperature Measurement" on page 143, and Table 16-4 on page 146. The accuracy of this calibration is referred to as "User Calibration" in Table 25-2 on page 239. The oscillator temperature calibration registers, OSCTCAL0A and OSCTCAL0B, can be used for one-time temperature calibration of oscillator frequency. See "OSCTCAL0A - Oscillator Temperature Calibration Register A" on page 33 and "OSCTCAL0B - Oscillator Temperature Calibration Register B" on page 34. When this oscillator is used as the chip clock, it will still be used for the Watchdog Timer and for the Reset Time-out. Start-up time for this clock source is determined by the SUT fuse bit, as shown in Table 6-5 on page 30. 6.2.3 Internal Ultra Low Power (ULP) Oscillator The internal Ultra Low Power (ULP) oscillator is a low power oscillator that operates with no external components. It provides a clock source with an approximate frequency of 32kHz. The frequency depends on supply voltage, temperature and batch variations. See Table 25-3 on page 239 for accuracy details. During reset, hardware loads the pre-programmed calibration value into the OSCCAL1 register and thereby automatically calibrates the oscillator. The accuracy of this calibration is referred to as "Factory Calibration" in Table 25-3 on page 239. For more information on automatic loading of pre-programmed calibration value, see section "Calibration Bytes" on page 222. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 27 When the ULP oscillator is used as a system clock, the operating frequency can be programmed using ULPOSC2..0 fuses. The available frequencies are shown in Table 6-2. Note that higher frequencies are available for system clock, only. Even when a higher frequency is selected the watchdog and the reset time-out counter still use 32 kHz. Table 6-2. Selecting ULP Oscillator Frequency ULPOSCSEL[2:0] ULP Frequency 111 32 kHz 110 64 kHz 101 128 kHz 100 256 kHz 011 512 kHz 000 - 010 Reserved Start-up time for this clock source is determined by the SUT fuse bit, as shown in Table 6-5 on page 30. 6.2.4 Low-Frequency Crystal Oscillator This mode enables the device to use a 32.768 kHz watch crystal as clock source. The crystal should be connected as shown in Figure 6-3. To find suitable capacitors please consult the manufacturer's datasheet. The low-frequency crystal oscillator introduces an internal load capacitance at each XTAL pin. See Table 6-3. Table 6-3. Capacitance of Low-Frequency Crystal Oscillator Pin Capacitance XTAL1 16 pF XTAL2 6 pF Start-up time for this clock source is determined by the SUT fuse bit, as shown in Table 6-5 on page 30. 6.2.5 Crystal Oscillator / Ceramic Resonator XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which can be configured for use as an onchip oscillator, as shown in Figure 6-3. Either a quartz crystal or a ceramic resonator may be used. Figure 6-3. Crystal Oscillator Connections C2 C1 XTAL2 XTAL1 GND ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 28 Capacitors C1 and C2 should always be equal, both for crystals and resonators. The optimal value of the capacitors depends on the crystal or resonator in use, the amount of stray capacitance, and the electromagnetic noise of the environment. Some initial guidelines for choosing capacitors for use with crystals are given in Table 6-4, below. For ceramic resonators, the capacitor values given by the manufacturer should be used. Table 6-4. Crystal Oscillator Operating Modes Frequency Range Recommended C1 and C2 < 1MHz - > 1MHz 12 - 22 pF Note Crystals, only. Not ceramic resonators. The oscillator can operate in different modes, each optimized for a specific frequency range. See Table 6-1 on page 26. Start-up time for this clock source is determined by the SUT bit, as explained in "Start-Up Time" on page 30. 6.2.6 Default Clock Settings The device is shipped with following fuse settings: Calibrated Internal 8MHz Oscillator (see CKSEL fuse bits in Table 6-1 on page 26) Longest possible start-up time (see SUT fuse bits in Table 6-5 on page 30) System clock prescaler set to 8 (see CKDIV8 fuse bit in Table 23-5 on page 220) The default setting gives a 1MHz system clock and ensures all users can make their desired clock source setting using an in-system or high-voltage programmer. 6.3 System Clock Prescaler The ATtiny441/841 system clock can be divided by setting the "CLKPR - Clock Prescale Register" on page 32. This feature can be used to decrease power consumption when the requirement for processing power is low. This can be used with all clock source options, and it will affect the clock frequency of the CPU and all synchronous peripherals. clkI/O, clkADC, clkCPU, and clkFLASH are divided by a factor as shown in Table 6-6 on page 32. 6.3.1 Switching Prescaler Setting When switching between prescaler settings, the System Clock Prescaler ensures that no glitch occurs in the clock system and that no intermediate frequency is higher than neither the clock frequency corresponding to the previous setting, nor the clock frequency corresponding to the new setting. The ripple counter that implements the prescaler runs at the frequency of the undivided clock, which may be faster than the CPU's clock frequency. Hence, it is not possible to determine the state of the prescaler - even if it were readable, and the exact time it takes to switch from one clock division to another cannot be exactly predicted. From the time the CLKPS values are written, it takes between T1 + T2 and T1 + 2*T2 before the new clock frequency is active. In this interval, 2 active clock edges are produced. Here, T1 is the previous clock period, and T2 is the period corresponding to the new prescaler setting. 6.4 Clock Output Buffer The device can output the system clock on the CLKO pin. To enable the output, the CKOUT fuse has to be programmed. This mode is suitable when the chip clock is used to drive other circuits on the system. Note that the clock will not be output during reset and that the normal operation of the I/O pin will be overridden when the fuse is programmed. Any clock source, including the internal oscillators, can be selected when the clock is output on CLKO. If the System Clock Prescaler is used, it is the divided system clock that is output. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 29 6.5 Start-Up Time The CKSEL and SUT bits define the start-up time of the device, as shown in Table 6-5, below. Table 6-5. CKSEL CKSEL and SUT Fuse Bits vs. Device Start-up Time Clock From Power-Down (1)(2) From Reset (3) 0 External 6 CK 14 CK + 16ms 1 Reserved -- -- X Reserved -- -- 1 Reserved -- -- Internal (8 MHz) 6 CK 14 CK + 16ms X Reserved -- -- 0 Internal (32 - 512 kHz) 6 CK 14 CK + 16ms 1 Reserved -- -- X Reserved -- -- 0 Low-Frequency Crystal Oscillator 1K CK(5) 14 CK + 16ms 1 Low-Frequency Crystal Oscillator 32K CK(5) 14 CK + 16ms X Reserved -- -- 0 Crystal oscillator / ceramic resonator (0.4...0.9MHz) 258 CK 14 CK + 16ms 1 Crystal oscillator / ceramic resonator (0.4...0.9MHz) 1K CK 0 Crystal oscillator / ceramic resonator (0.4...0.9MHz) 16K CK 14 CK + 16ms 1 Reserved -- -- 0 Crystal oscillator / ceramic resonator (0.9...3MHz) 258 CK 14 CK + 16ms 1 Crystal oscillator / ceramic resonator (0.9...3MHz) 1K CK 14 CK + 16ms 0 Crystal oscillator / ceramic resonator (0.9...3MHz) 16K CK 14 CK + 16ms 1 Reserved -- -- 0 Crystal oscillator / ceramic resonator (3...8MHz) 258 CK 14 CK + 16ms 1 Crystal oscillator / ceramic resonator (3...8MHz) 1K CK 14 CK + 16ms 0 Crystal oscillator / ceramic resonator (3...8MHz) 16K CK 14 CK + 16ms 1 Reserved -- -- 0 Crystal oscillator / ceramic resonator (>8MHz) 258 CK 14 CK + 16ms 1 Crystal oscillator / ceramic resonator (>8MHz) 1K CK 14 CK + 16ms 0 Crystal oscillator / ceramic resonator (>8MHz) 16K CK 14 CK + 16ms 1 Reserved -- -- SUT 0000 0001 0010 (4) 0011 0 (4) 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Note: 1. Device start-up time from power-down sleep mode. 2. When BOD has been disabled by software, the wake-up time from sleep mode will be approximately 60s to ensure the BOD is working correctly before MCU continues executing code. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 30 3. Device start-up time after reset. 4. The device is shipped with this option selected. 5. These options should be used only if frequency stability at start-up is not important. 6. Recommended use: fast rising power or BOD enabled. 6.6 Register Description 6.6.1 CLKCR - Clock Control Register Bit (0x72) Read/Write Initial Value 7 OSCRDY R 0 6 CSTR W 0 5 CKOUTC R/W 0 4 SUT R/W 3 CKSEL3 R/W 2 1 CKSEL2 CKSEL1 R/W R/W See Bit Description 0 CKSEL0 R/W CLKCR Bit 7 - OSCRDY: Oscillator Ready This bit is set when oscillator time-out is complete. When OSCRDY is set the oscillator is stable and the clock source can be changed safely. Bit 6 - CSTR: Clock Select Trigger This bit triggers the clock selection. It can be used to enable the oscillator in advance and select the clock source, before the oscillator is stable. If CSTR is set at the same time as the CKSEL bits are written, the contents are directly copied to the CKSEL register and the system clock is immediately switched. If CKSEL bits are written without setting CSTR, the oscillator selected by the CKSEL bits is enabled, but the system clock is not switched yet. Bit 5 - CKOUTC: Clock Output (Copy) This bit enables the clock output buffer. The CKOUTC bit is a copy of the CKOUT fuse bit and is loaded when the device is powered up or has been reset Bit 4 - SUT: Start-Up Time The SUT and CKSEL bits define the start-up time of the device, as shown in Table 6-5. The initial value of the SUT bit is determined by the SUT fuse. The SUT fuse is loaded to the SUT bit when the device is powered up or has been reset. Bits 3:0 - CKSEL[3:0]: Clock Select Bits These bits select the clock source of the system clock and can be written at run-time. The clock system ensures glitch free switching of the clock source. CKSEL fuses determine the initial value of the CKSEL bits when the device is powered up or reset. The clock alternatives are shown in Table 6-1. To avoid unintentional switching of clock source, a protected change sequence must be followed to change the CKSEL bits, as follows: 1. Write the signature for change enable of protected I/O register to register CCP. 2. Within four instruction cycles, write the CKSEL bits with the desired value. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 31 6.6.2 CLKPR - Clock Prescale Register Bit (0x73) Read/Write Initial Value 7 - R 0 6 - R 0 5 - R 0 4 - R 0 3 CLKPS3 R/W 2 1 CLKPS2 CLKPS1 R/W R/W See Bit Description 0 CLKPS0 R/W CLKPR Bits 7:4 - Res: Reserved Bits These bits are reserved and will always read zero. Bits 3:0 - CLKPS[3:0]: Clock Prescaler Select Bits 3 - 0 These bits define the division factor between the selected clock source and the internal system clock. These bits can be written run-time to vary the clock frequency to suit the application requirements. As the divider divides the master clock input to the MCU, the speed of all synchronous peripherals is reduced when a division factor is used. The division factors are given in Table 6-6. Interrupts must be disabled when changing prescaler setting to make sure the write procedure is not interrupted. Table 6-6. Note: Clock Prescaler Select CLKPS3 CLKPS2 CLKPS1 CLKPS0 Clock Division Factor 0 0 0 0 1 (1) 0 0 0 1 2 0 0 1 0 4 0 0 1 1 8 (2) 0 1 0 0 16 0 1 0 1 32 0 1 1 0 64 0 1 1 1 128 1 0 0 0 256 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 Reserved 1. This is the initial value when CKDIV8 fuse has been unprogrammed. 2. This is the initial value when CKDIV8 fuse has been programmed. The device is shipped with the CKDIV8 Fuse programmed. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 32 The initial value of clock prescaler bits is determined by the CKDIV8 fuse (see Table 23-5 on page 220). When CKDIV8 is unprogrammed, the system clock prescaler is set to one and, when programmed, to eight. Any value can be written to the CLKPS bits regardless of the CKDIV8 fuse bit setting. When CKDIV8 is programmed the initial value of CLKPS bits give a clock division factor of eight at start up. This is useful when the selected clock source has a higher frequency than allowed under present operating conditions. See "Speed" on page 238. To avoid unintentional changes to clock frequency, the following sequence must be followed: 6.6.3 1. Write the required signature to the CCP register. See page 13. 2. Within four instruction cycles, write the desired value to CLKPS bits. OSCCAL0 - Oscillator Calibration Register Bit (0x74) Read/Write Initial Value 7 CAL07 R/W 6 CAL06 R/W 5 4 3 CAL05 CAL04 CAL03 R/W R/W R/W Device Specific Calibration Value 2 CAL02 R/W 1 CAL01 R/W 0 CAL00 R/W OSCCAL0 Bits 7:0 - CAL0[7:0]: Oscillator Calibration Value The oscillator calibration register is used to trim the internal 8MHz oscillator and to remove process variations from the oscillator frequency. A pre-programmed calibration value is automatically written to this register during chip reset, giving the factory calibrated frequency specified in Table 25-2 on page 239. The application software can write this register to change the oscillator frequency. The oscillator can be calibrated to frequencies specified in Table 25-2 on page 239. Calibration outside that range is not guaranteed. The lowest oscillator frequency is reached by programming these bits to zero. Increasing the register value increases the oscillator frequency. A typical frequency response curve is shown in Figure 26-77 on page 293. Note that this oscillator is used to time EEPROM and Flash write accesses, and write times will be affected accordingly. Do not calibrate to more than 8.8MHz if EEPROM or Flash is to be written. Otherwise, the EEPROM or Flash write may fail. To ensure stable operation of the MCU the calibration value should be changed in small steps. A step change in frequency of more than 2% from one cycle to the next can lead to unpredictable behavior. Also, the difference between two consecutive register values should not exceed 0x20. If these limits are exceeded the MCU must be kept in reset during changes to clock frequency. 6.6.4 OSCTCAL0A - Oscillator Temperature Calibration Register A Bit (0x75) Read/Write Initial Value 7 6 R/W R/W 5 4 3 2 Oscillator Temperature Calibration Data R/W R/W R/W R/W Device Specific Calibration Value 1 0 R/W R/W OSCTCAL0A Bits 7:0 - Oscillator Temperature Calibration Value The temperature calibration value can be used to trim the calibrated 8MHz oscillator and remove temperature variations from the oscillator frequency. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 33 6.6.5 OSCTCAL0B - Oscillator Temperature Calibration Register B Bit (0x76) Read/Write Initial Value 7 6 R/W R/W 5 4 3 2 Oscillator Temperature Calibration Data R/W R/W R/W R/W Device Specific Calibration Value 1 0 R/W R/W OSCTCAL0B Bits 7:0 - Oscillator Temperature Calibration Value The temperature calibration value can be used to trim the calibrated 8MHz oscillator and remove temperature variations from the oscillator frequency. 6.6.6 OSCCAL1 - Oscillator Calibration Register Bit (0x77) Read/Write Initial Value 7 - R 0 6 - R 0 5 - R 0 4 - R 0 3 - R 0 2 - R 0 1 0 CAL11 CAL10 R/W R/W Calibration Value OSCCAL1 Bits 7:0 - CAL[11:10]: Oscillator Calibration Value The oscillator calibration register is used to trim the internal 32kHz oscillator and to remove process variations from the oscillator frequency. A pre-programmed calibration value is automatically written to this register during chip reset, giving the factory calibrated frequency as specified in Table 25-2 on page 239. The application software can write this register to change the oscillator frequency. The oscillator can be calibrated to frequencies as specified in Table 25-2 on page 239. Calibration outside that range is not guaranteed. The lowest oscillator frequency is reached by programming these bits to zero. Increasing the register value increases the oscillator frequency. A typical frequency response curve is shown in Figure 26-80 on page 294. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 34 7. Power Management and Sleep Modes The high performance and industry leading code efficiency makes the AVR microcontrollers an ideal choice for low power applications. In addition, sleep modes enable the application to shut down unused modules in the MCU, thereby saving power. The AVR provides various sleep modes allowing the user to tailor the power consumption to the application's requirements. 7.1 Sleep Modes Figure 6-1 on page 25 presents the different clock systems and their distribution in ATtiny441/841. The figure is helpful in selecting an appropriate sleep mode. Table 7-1 shows the different sleep modes and the sources that may be used for wake up. ADC Noise Reduction X Standby X Power-down Note: 1. Start frame detection, only. 2. Address match interrupt, only. 3. For INT0 level interrupt, only. X X X X X X X(3) X X X X(2) X X(3) X X X X(3) X X TWI Slave (2) X Other I/O SPM/EEPROM Ready Interrupt X INT0 and Pin Change X clkIO X Watchdog Interrupt USART (1) X ADC Interrupt Idle Wake-up Sources clkADC Active Clock Domains clkFLASH Sleep Mode Source clkCPU Active Clock Domains and Wake-up Sources in Different Sleep Modes Main Clock Source Enabled Table 7-1. X To enter a sleep mode, the SE bit in MCUCR must be set and a SLEEP instruction must be executed. The SMn bits in MCUCR select which sleep mode will be activated by the SLEEP instruction. See Table 7-2 on page 38 for a summary. If an enabled interrupt occurs while the MCU is in a sleep mode, the MCU wakes up. The MCU is then halted for four cycles in addition to the start-up time, executes the interrupt routine, and resumes execution from the instruction following SLEEP. The contents of the Register File and SRAM are unaltered when the device wakes up from sleep. If a reset occurs during sleep mode, the MCU wakes up and executes from the Reset Vector. Note that if a level triggered interrupt is used for wake-up the changed level must be held for some time to wake up the MCU (and for the MCU to enter the interrupt service routine). See "External Interrupts" on page 51 for details. 7.1.1 Idle Mode This sleep mode basically halts clkCPU and clkFLASH, while allowing other clocks to run. In Idle Mode, the CPU is stopped but the following peripherals continue to operate: Watchdog and interrupt system Analog comparator, and ADC USART, TWI, and timer/counters ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 35 Idle mode allows the MCU to wake up from external triggered interrupts as well as internal ones, such as Timer Overflow. If wake-up from the analog comparator interrupt is not required, the analog comparator can be powered down by setting the ACD bit in ACSRA. See "ACSR1A - Analog Comparator 1 Control and Status Register" on page 129. This will reduce power consumption in Idle mode. If the ADC is enabled, a conversion starts automatically when this mode is entered. 7.1.2 ADC Noise Reduction Mode This sleep mode halts clkI/O, clkCPU, and clkFLASH, while allowing other clocks to run. In ADC Noise Reduction mode, the CPU is stopped but the following peripherals continue to operate: Watchdog (if enabled), and external interrupts ADC USART start frame detector, and TWI This improves the noise environment for the ADC, enabling higher resolution measurements. If the ADC is enabled, a conversion starts automatically when this mode is entered. The following events can wake up the MCU: 7.1.3 Watchdog reset, external reset, and brown-out reset External level interrupt on INT0, and pin change interrupt ADC conversion complete interrupt, and SPM/EEPROM ready interrupt USART start frame detection, and TWI slave address match Power-Down Mode This sleep mode halts all generated clocks, allowing operation of asynchronous modules, only. In Power-down Mode the oscillator is stopped, while the following peripherals continue to operate: Watchdog (if enabled), external interrupts The following events can wake up the MCU: 7.1.4 Watchdog reset, external reset, and brown-out reset External level interrupt on INT0, and pin change interrupt USART start frame detection, and TWI slave address match Standby Mode Standby Mode is identical to power-down, with the exception that the oscillator is kept running. From Standby mode, the device wakes up in six clock cycles. 7.2 Power Reduction Register The Power Reduction Register (PRR), see "PRR - Power Reduction Register" on page 38, provides a method to reduce power consumption by stopping the clock to individual peripherals. When the clock for a peripheral is stopped then: The current state of the peripheral is frozen. The associated registers can not be read or written. Resources used by the peripheral will remain occupied. The peripheral should in most cases be disabled before stopping the clock. Clearing the PRR bit wakes up the peripheral and puts it in the same state as before shutdown. Peripheral shutdown can be used in Idle mode and Active mode to significantly reduce the overall power consumption. In all other sleep modes, the clock is already stopped. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 36 7.3 Minimizing Power Consumption There are several issues to consider when trying to minimize the power consumption in an AVR controlled system. In general, sleep modes should be used as much as possible, and the sleep mode should be selected so that as few as possible of the device's functions are operating. All functions not needed should be disabled. In particular, the following modules may need special consideration when trying to achieve the lowest possible power consumption. 7.3.1 Analog to Digital Converter If enabled, the ADC will be enabled in all sleep modes. To save power, the ADC should be disabled before entering any sleep mode. When the ADC is turned off and on again, the next conversion will be an extended conversion. See "Analog to Digital Converter" on page 132 for details on ADC operation. 7.3.2 Analog Comparator When entering Idle mode, the Analog Comparator should be disabled if not used. When entering ADC Noise Reduction mode, the Analog Comparator should be disabled. In the other sleep modes, the Analog Comparator is automatically disabled. However, if the Analog Comparator is set up to use the Internal Voltage Reference as input, the Analog Comparator should be disabled in all sleep modes. Otherwise, the Internal Voltage Reference will be enabled, independent of sleep mode. See "Analog Comparator 0" on page 124 and "Analog Comparator 1" on page 128 for details on how to configure the Analog Comparator. 7.3.3 Brown-out Detector If the Brown-out Detector is not needed in the application, this module should be turned off. If the Brown-out Detector is enabled by the BODPD Fuses, it will be enabled in all sleep modes, and hence, always consume power. In the deeper sleep modes, this will contribute significantly to the total current consumption. If the Brown-out Detector is needed in the application, this module can also be set to Sampled BOD mode to save power. See "Brown-out Detection" on page 42 for details on how to configure the Brown-out Detector. 7.3.4 Internal Voltage Reference The Internal Voltage Reference will be enabled when needed by the Brown-out Detection, the Analog Comparator or the ADC. If these modules are disabled as described in the sections above, the internal voltage reference will be disabled and it will not be consuming power. When turned on again, the user must allow the reference to start up before the output is used. If the reference is kept on in sleep mode, the output can be used immediately. See Internal Bandgap Reference in Table 25-5 on page 240 for details on the start-up time. 7.3.5 Watchdog Timer If the Watchdog Timer is not needed in the application, this module should be turned off. If the Watchdog Timer is enabled, it will be enabled in all sleep modes, and hence, always consume power. In the deeper sleep modes, this will contribute to the total current consumption. See "Brown-out Detection" on page 42 for details on how to configure the Watchdog Timer. 7.3.6 Port Pins When entering a sleep mode, all port pins should be configured to use minimum power. The most important thing is then to ensure that no pins drive resistive loads. In sleep modes where both the I/O clock (clkI/O) and the ADC clock (clkADC) are stopped, the input buffers of the device will be disabled. This ensures that no power is consumed by the input logic when not needed. In some cases, the input logic is needed for detecting wake-up conditions, and it will then be enabled. See the section "Digital Input Enable and Sleep Modes" on page 59 for details on which pins are enabled. If the input buffer is enabled and the input signal is left floating or has an analog signal level close to VCC/2, the input buffer will use excessive power. For analog input pins, the digital input buffer should be disabled at all times. An analog signal level close to VCC/2 on an input pin can cause significant current even in active mode. Digital input buffers can be disabled by writing to the Digital ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 37 Input Disable Registers. See "DIDR0 - Digital Input Disable Register 0" on page 149 and "DIDR1 - Digital Input Disable Register 1" on page 150 for details. 7.4 Register Description 7.4.1 MCUCR - MCU Control Register Bit 0x35 (0x55) Read/Write Initial Value 7 - R 0 6 - R 0 5 SE R/W 0 4 SM1 R/W 0 3 SM0 R/W 0 2 - R 0 1 ISC01 R/W 0 0 ISC00 R/W 0 MCUCR Bit 7:6 - Res: Reserved Bits These bits are reserved and will always read zero. Bit 5 - SE: Sleep Enable The SE bit must be written logic one to make the MCU enter the sleep mode when the SLEEP instruction is executed. To avoid the MCU entering the sleep mode unless it is the programmer's purpose, it is recommended to write the Sleep Enable (SE) bit to one just before the execution of the SLEEP instruction and to clear it immediately after waking up. Bits 4:3 - SM[1:0]: Sleep Mode Select Bits 1 and 0 These bits select between available sleep modes, as shown in Table 7-2. Table 7-2. Note: Sleep Mode Select SM1 SM0 0 0 Idle 0 1 ADC Noise Reduction 1 0 Power-down 1 1 Standby (1) 1. Sleep Mode Only recommended with external crystal or resonator as clock source Bit 2 - Res: Reserved Bit This bit is reserved and will always read zero. 7.4.2 PRR - Power Reduction Register The Power Reduction Register provides a method to reduce power consumption by allowing peripheral clock signals to be disabled. Bit (0x70) Read/Write Initial Value 7 PRTWI R/w 0 6 PRUSART1 R 0 5 PRUSART0 R/W 0 4 PRSPI R/W 0 3 PRTIM2 R/W 0 2 PRTIM1 R/W 0 1 PRTIM0 R/W 0 0 PRADC R/W 0 PRR Bit 7 - PRTWI: Power Reduction Two-Wire Interface Writing a logic one to this bit shuts down the Two-Wire Interface module. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 38 Bit 6 - PRUSART1: Power Reduction USART1 Writing a logic one to this bit shuts down the USART1 module. When the USART is re-enabled, operation will continue like before the shutdown. Bit 5 - PRUSART0: Power Reduction USART0 Writing a logic one to this bit shuts down the USART0 module. When the USART is re-enabled, operation will continue like before the shutdown. Bit 4 - PRSPI: Power Reduction SPI Writing a logic one to this bit shuts down the SPI by stopping the clock to the module. When waking up the SPI again, the SPI should be re-initialized to ensure proper operation. Bit 3 - PRTIM2: Power Reduction Timer/Counter2 Writing a logic one to this bit shuts down the Timer/Counter2 module. When the timer/counter is re-enabled, operation will continue like before the shutdown. Bit 2 - PRTIM1: Power Reduction Timer/Counter1 Writing a logic one to this bit shuts down the Timer/Counter1 module. When the timer/counter is re-enabled, operation will continue like before the shutdown. Bit 1 - PRTIM0: Power Reduction Timer/Counter0 Writing a logic one to this bit shuts down the Timer/Counter0 module. When the timer/counter is re-enabled, operation will continue like before the shutdown. Bit 0 - PRADC: Power Reduction ADC Writing a logic one to this bit shuts down the ADC. The ADC must be disabled before shut down. The analog comparator cannot be used when the ADC is shut down. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 39 8. System Control and Reset 8.1 Resetting the AVR During reset, all I/O registers are set to their initial values, and the program starts execution from the Reset Vector. The instruction placed at the Reset Vector should be a JMP (two-word, direct jump) instruction to the reset handling routine, although other one- or two-word jump instructions can be used. If the program never enables an interrupt source, the interrupt vectors are not used, and regular program code can be placed at these locations. The circuit diagram in Figure 8-1 shows the reset logic. Electrical parameters of the reset circuitry are defined in section "System and Reset Characteristics" on page 240. Figure 8-1. Reset Logic DATA BUS PULL-UP RESISTOR RESET WDRF BROWN OUT RESET CIRCUIT VCC EXTRF BORF PORF RESET FLAG REGISTER (RSTFLR) BODLEVEL2...0 S POWER-ON RESET CIRCUIT Q COUNTER RESET TIMEOUT SPIKE FILTER EXTERNAL RESET CIRCUIT INTERNAL RESET R DELAY COUNTERS CK WATCHDOG TIMER RSTDISBL WATCHDOG OSCILLATOR CLOCK GENERATOR The I/O ports of the AVR are immediately reset to their initial state when a reset source goes active. This does not require any clock source to be running. After all reset sources have gone inactive, a delay counter is invoked, stretching the internal reset. This allows the power to reach a stable level before normal operation starts. 8.2 Reset Sources The ATtiny441/841 has four sources of reset: 8.2.1 Power-on Reset. The MCU is reset when the supply voltage is below the Power-on Reset threshold (VPOT) External Reset. The MCU is reset when a low level is present on the RESET pin for longer than the minimum pulse length Watchdog Reset. The MCU is reset when the Watchdog Timer period expires and the Watchdog is enabled Brown Out Reset. The MCU is reset when the Brown-Out Detector is enabled and supply voltage is below the brown-out threshold (VBOT) Power-on Reset A Power-on Reset (POR) pulse is generated by an on-chip detection circuit. The detection level is defined in section "System and Reset Characteristics" on page 240. The POR is activated whenever VCC is below the detection level. The POR circuit can be used to trigger the Start-up Reset, as well as to detect a failure in supply voltage. A Power-on Reset (POR) circuit ensures that the device is reset from Power-on. Reaching the Power-on Reset threshold voltage invokes the delay counter, which determines how long the device is kept in reset after VCC rise. The reset signal is activated again, without any delay, when VCC decreases below the detection level. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 40 Figure 8-2. MCU Start-up, RESET Tied to VCC V CC V POT RESET V RST TIME-OUT t TOUT INTERNAL RESET Figure 8-3. MCU Start-up, RESET Extended Externally V CC V POT > t TOUT RESET TIME-OUT V RST t TOUT INTERNAL RESET 8.2.2 External Reset An External Reset is generated by a low level on the RESET pin if enabled. Reset pulses longer than the minimum pulse width (see section "System and Reset Characteristics" on page 240) will generate a reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a reset. When the applied signal reaches the Reset Threshold Voltage - VRST - on its positive edge, the delay counter starts the MCU after the time-out period - tTOUT - has expired. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 41 Figure 8-4. External Reset During Operation CC 8.2.3 Watchdog Reset When the Watchdog times out, it will generate a short reset pulse. On the falling edge of this pulse, the delay timer starts counting the time-out period tTOUT. See page 42 for details on operation of the Watchdog Timer and Table 25-5 on page 240 for details on reset time-out. Figure 8-5. Watchdog Reset During Operation CC CK 8.2.4 Brown-out Detection The Brown-Out Detection (BOD) circuit monitors that the VCC level is kept above a configurable trigger level, VBOT. When the BOD is enabled, a BOD reset will be given when VCC falls and remains below the trigger level for the length of the detection time, tBOD. The reset is kept active until VCC again rises above the trigger level. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 42 Figure 8-6. Brown-out Reset During Operation VCC VBOT- VBOT+ RESET tTOUT TIME-OUT INTERNAL RESET The BOD circuit will not detect a drop in VCC unless the voltage stays below the trigger level for the detection time, tBOD (see "System and Reset Characteristics" on page 240). The BOD circuit has three modes of operation: Disabled: In this mode of operation VCC is not monitored and, hence, it is recommended only for applications where the power supply remains stable. Enabled: In this mode the VCC level is continuously monitored. If VCC drops below VBOT for at least tBOD a brownout reset will be generated. Sampled: In this mode the VCC level is sampled on each negative edge of a 1kHz clock that has been derived from the 32kHz ULP oscillator. Between each sample the BOD is turned off. Compared to the mode where BOD is constantly enabled this mode of operation reduces power consumption but fails to detect drops in VCC between two positive edges of the 1kHz clock. When a brown-out is detected in this mode, the BOD circuit is set to enabled mode to ensure that the device is kept in reset until VCC has risen above VBOT . The BOD will return to sampled mode after reset has been released and the fuses have been read in. The BOD mode of operation is selected using BODACT and BODPD fuse bits. The BODACT fuse bits determine how the BOD operates in active and idle mode, as shown in Table 8-1. Table 8-1. Setting BOD Mode of Operation in Active and Idle Modes BODACT1 BODACT0 Mode of Operation 0 0 Reserved 0 1 Sampled 1 0 Enabled 1 1 Disabled The BODPD fuse bits determine the mode of operation in all sleep modes except idle mode, as shown in Table 8-2. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 43 Table 8-2. Setting BOD Mode of Operation in Sleep Modes Other Than Idle BODPD1 BODPD0 Mode of Operation 0 0 Reserved 0 1 Sampled 1 0 Enabled 1 1 Disabled See "Fuse Bits" on page 219. 8.3 Internal Voltage Reference ATtiny441/841 features an internal bandgap reference. This reference is used for Brown-out Detection, and it can be used as an input to the Analog Comparator or the ADC. The bandgap voltage varies with supply voltage and temperature. 8.3.1 Voltage Reference Enable Signals and Start-up Time The voltage reference has a start-up time that may influence the way it should be used. The start-up time is given in "System and Reset Characteristics" on page 240. To save power, the reference is not always turned on. The reference is on during the following situations: 1. When the BOD is enabled (by programming the BODACT or BODPD fuses). 2. When the internal reference is connected to the Analog Comparator (by setting the ACBG bit in ACSR). 3. When the ADC is enabled. Thus, when the BOD is not enabled, after setting the ACBG bit or enabling the ADC, the user must always allow the reference to start up before the output from the Analog Comparator or ADC is used. To reduce power consumption in Power-down mode, the user can avoid the three conditions above to ensure that the reference is turned off before entering Power-down mode. 8.4 Watchdog Timer The Watchdog Timer is clocked from the internal 32kHz ultra low power oscillator (see page 27). By controlling the Watchdog Timer prescaler, the Watchdog Reset interval can be adjusted as shown in Table 8-5 on page 48. The WDR - Watchdog Reset - instruction resets the Watchdog Timer. The Watchdog Timer is also reset when it is disabled and when a Chip Reset occurs. Ten different clock cycle periods can be selected to determine the reset period. If the reset period expires without another Watchdog Reset, the ATtiny441/841 resets and executes from the Reset Vector. For timing details on the Watchdog Reset, refer to Table 8-5 on page 48. The Watchdog Timer can also be configured to generate an interrupt instead of a reset. This can be very helpful when using the Watchdog to wake-up from Power-down. To prevent unintentional disabling of the Watchdog or unintentional change of time-out period, two different safety levels are selected by the fuse WDTON as shown in Table 8-3 See "Timed Sequences for Changing the Configuration of the Watchdog Timer" on page 45 for details. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 44 Table 8-3. WDT Configuration as a Function of the Fuse Settings of WDTON WDTON Safety Level WDT Initial State How to Disable the WDT How to Change Time-out Unprogrammed 1 Disabled Timed sequence No limitations Programmed 2 Enabled Always enabled Timed sequence Figure 8-7. Watchdog Timer WDP0 WDP1 WDP2 WDP3 OSC/256K OSC/64K OSC/128K OSC/32K OSC/8K OSC/16K OSC/2K OSC/1K OSC/512 WATCHDOG RESET OSC/4K WATCHDOG PRESCALER 32 kHz ULP OSCILLATOR MUX WDE MCU RESET 8.4.1 Timed Sequences for Changing the Configuration of the Watchdog Timer The sequence for changing configuration differs slightly between the two safety levels. Separate procedures are described for each level. Safety Level 1 In this mode, the Watchdog Timer is initially disabled, but can be enabled by writing the WDE bit to one without any restriction. A timed sequence is needed when disabling an enabled Watchdog Timer. To disable an enabled Watchdog Timer, the following procedure must be followed: 1. Write the signature for change enable of protected I/O registers to register CCP 2. Within four instruction cycles, in the same operation, write WDE and WDP bits Safety Level 2 In this mode, the Watchdog Timer is always enabled, and the WDE bit will always read as one. A timed sequence is needed when changing the Watchdog Time-out period. To change the Watchdog Time-out, the following procedure must be followed: 8.4.2 1. Write the signature for change enable of protected I/O registers to register CCP 2. Within four instruction cycles, write the WDP bit. The value written to WDE is irrelevant Code Examples The following code example shows how to turn off the WDT. The example assumes that interrupts are controlled (e.g., by disabling interrupts globally) so that no interrupts will occur during execution of these functions. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 45 Assembly Code Example WDT_off: wdr ; Clear WDRF in RSTFLR in r16, RSTFLR andi r16, ~(1< ... Note: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address Address 0x0000 0x0001 0x0002 0x0003 0x0004 0x0005 0x0006 0x0007 0x0008 0x0009 0x000A 0x000B 0x000C 0x000D 0x000E 0x000F 0x0010 0x0011 0x0012 0x0013 0x0014 0x0015 0x0016 0x0017 0x0018 0x0019 0x001A 0x001B 0x001C 0x001D 0x001E ; Main program start ; Address 0x001A See "Code Examples" on page 6. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 50 In case the program never enables an interrupt source, the Interrupt Vectors will not be used and, consequently, regular program code can be placed at these locations. 9.2 External Interrupts External Interrupts are triggered by the INT0 pin, or by any of the PCINTn pins. Note that, if enabled, the interrupts will trigger even if the INTn or PCINTn pins are configured as outputs. This feature provides a way of generating software interrupts. The pin change interrupts trigger as follows: Pin Change Interrupt 0 (PCI0): triggers if any enabled PCINT[7:0] pin toggles Pin Change Interrupt 1 (PCI1): triggers if any enabled PCINT[11:8] pin toggles Registers PCMSK0 and PCMSK1 control which pins contribute to the pin change interrupts. Pin change interrupts on PCINT[11:0] are detected asynchronously, which means that these interrupts can be used for waking the part also from sleep modes other than Idle mode. External interrupt INT0 can be triggered by a falling or rising edge, or a low level. When INT0 is enabled and configured as level triggered, the interrupt will trigger as long as the pin is held low. Note that recognition of falling or rising edge interrupts on INT0 requires the presence of an I/O clock, as described in "Clock System" on page 25. 9.2.1 Pin Change Interrupt Timing A timing example of a pin change interrupt is shown in Figure 9-1. Figure 9-1. Timing of pin change interrupts pin_lat PCINT(0) LE clk D pcint_in_(0) Q pin_sync PCINT(0) in PCMSK(x) 0 pcint_syn pcint_setflag PCIF x clk clk PCINT(0) pin_lat pin_sync pcint_in_(0) pcint_syn pcint_setflag PCIF ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 51 9.2.2 Low Level Interrupt A low level interrupt on INT0 is detected asynchronously. This means that the interrupt source can be used for waking the part also from sleep modes other than Idle (the I/O clock is halted in all sleep modes except Idle). Note that if a level triggered interrupt is used for wake-up from Power-down, the required level must be held long enough for the MCU to complete the wake-up to trigger the level interrupt. If the level disappears before the end of the Start-up Time, the MCU will still wake up, but no interrupt will be generated. The start-up time is defined as described in "Clock System" on page 25. If the low level on the interrupt pin is removed before the device has woken up then program execution will not be diverted to the interrupt service routine but continue from the instruction following the SLEEP command. 9.3 Register Description 9.3.1 MCUCR - MCU Control Register Bit 0x35 (0x55) Read/Write Initial Value 7 - R 0 6 - R 0 5 SE R/W 0 4 SM1 R/W 0 3 SM0 R/W 0 2 - R 0 1 ISC01 R/W 0 0 ISC00 R/W 0 MCUCR Bits 1:0 - ISC0[1:0]: Interrupt Sense Control 0 Bit 1 and Bit 0 External Interrupt 0 is triggered by activity on pin INT0, provided that the SREG I-flag and the corresponding interrupt mask are set. The conditions required to trigger the interrupt are defined in Table 9-2. Table 9-2. ISC01 ISC00 0 0 The low level of INT0 generates an interrupt request (1) 0 1 Any logical change on INT0 generates an interrupt request (2) 1 0 The falling edge of INT0 generates an interrupt request (2) 1 1 The rising edge of INT0 generates an interrupt request (2) Note: 9.3.2 External Interrupt 0 Sense Control Description 1. If low level interrupt is selected, the low level must be held until the completion of the currently executing instruction to generate an interrupt. 2. The value on the INT0 pin is sampled before detecting edges. If edge or toggle interrupt is selected, pulses that last longer than one clock period will generate an interrupt. Shorter pulses are not guaranteed to generate an interrupt. GIMSK - General Interrupt Mask Register Bit 0x3B (0x5B) Read/Write Initial Value 7 - R 0 6 INT0 R/W 0 5 PCIE1 R/W 0 4 PCIE0 R/W 0 3 - R 0 2 - R 0 1 - R 0 0 - R 0 GIMSK Bit 7 - Res: Reserved Bit This bit is reserved and will always read zero. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 52 Bit 6 - INT0: External Interrupt Request 0 Enable The external interrupt for pin INT0 is enabled when this bit and the I-bit in the Status Register (SREG) are set. The trigger conditions are set with the ISC0n bits. Activity on the pin will cause an interrupt request even if INT0 has been configured as an output. Bit 5 - PCIE1: Pin Change Interrupt Enable 1 When this bit and the I-bit of SREG are set the Pin Change Interrupt 1 is enabled. Any change on an enabled PCINT[11:8] pin will cause a PCINT1 interrupt. See Table 9-1 on page 49. Each pin can be individually enabled. See "PCMSK1 - Pin Change Mask Register 1" on page 54. Bit 4 - PCIE0: Pin Change Interrupt Enable 0 When this bit and the I-bit of SREG are set the Pin Change Interrupt 0 is enabled. Any change on an enabled PCINT[7:0] pin will cause a PCINT0 interrupt. See Table 9-1 on page 49. Each pin can be individually enabled. See "PCMSK0 - Pin Change Mask Register 0" on page 54. Bits 3:0 - Res: Reserved Bits These bits are reserved and will always read zero. 9.3.3 GIFR - General Interrupt Flag Register Bit 0x3A (0x5A) Read/Write Initial Value 7 - R 0 6 INTF0 R/W 0 5 PCIF1 R/W 0 4 PCIF0 R/W 0 3 - R 0 2 - R 0 1 - R 0 0 - R 0 GIFR Bit 7 - Res: Reserved Bit This bit is reserved and will always read zero. Bit 6 - INTF0: External Interrupt Flag 0 This bit is set when activity on INT0 has triggered an interrupt request. Provided that the I-bit in SREG and the INT0 bit are set, the MCU will jump to the corresponding interrupt vector. The flag is cleared when the interrupt service routine is executed. Alternatively, the flag can be cleared by writing a logical one to it. This flag is always cleared when INT0 is configured as a level interrupt. Bit 1 - PCIF1: Pin Change Interrupt Flag 1 This bit is set when a logic change on any PCINT[11:8] pin has triggered an interrupt request. Provided that the I-bit in SREG and the PCIE1 bit in PCICR are set, the MCU will jump to the corresponding interrupt vector. The flag is cleared when the interrupt routine is executed. Alternatively, the flag can be cleared by writing a logical one to it. Bit 0 - PCIF0: Pin Change Interrupt Flag 0 This bit is set when a logic change on any PCINT[7:0] pin has triggered an interrupt request. Provided that the I-bit in SREG and the PCIE0 bit in PCICR are set, the MCU will jump to the corresponding interrupt vector. The flag is cleared when the interrupt routine is executed. Alternatively, the flag can be cleared by writing a logical one to it. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 53 Bits 3:0 - Res: Reserved Bits These bits are reserved and will always read zero. 9.3.4 PCMSK1 - Pin Change Mask Register 1 Bit 0x20 (0x40) Read/Write Initial Value 7 - R 0 6 - R 0 5 - R 0 4 - R 0 3 PCINT11 R/W 0 2 PCINT10 R/W 0 1 PCINT9 R/W 0 0 PCINT8 R/W 0 PCMSK1 Bits 3:0 - PCINT[11:8] : Pin Change Interrupt Mask Bits Each PCINTn bit selects if the pin change interrupt of the corresponding I/O pin is enabled. Pin change interrupt on a pin is enabled by setting the mask bit for the pin (PCINTn) and the corresponding group bit (PCIEn) in PCICR. When this bit is cleared the pin change interrupt on the corresponding pin is disabled. 9.3.5 PCMSK0 - Pin Change Mask Register 0 Bit 0x12 (0x32) Read/Write Initial Value 7 PCINT7 R/W 0 6 PCINT6 R/W 0 5 PCINT5 R/W 0 4 PCINT4 R/W 0 3 PCINT3 R/W 0 2 PCINT2 R/W 0 1 PCINT1 R/W 0 0 PCINT0 R/W 0 PCMSK0 Bits 7:0 - PCINT[7:0] : Pin Change Interrupt Mask Bits Each PCINTn bit selects if the pin change interrupt of the corresponding I/O pin is enabled. Pin change interrupt on a pin is enabled by setting the mask bit for the pin (PCINTn) and the corresponding group bit (PCIEn) in PCICR. When this bit is cleared the pin change interrupt on the corresponding pin is disabled. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 54 10. I/O Ports 10.1 Overview All AVR ports have true Read-Modify-Write functionality when used as general digital I/O ports. This means that the direction of one port pin can be changed without unintentionally changing the direction of any other pin with the SBI and CBI instructions. The same applies when changing drive value (if configured as output) or enabling/disabling of pull-up resistors. Each output buffer has sink and source capability. The pin driver is strong enough to drive LED displays directly. All port pins have individually selectable pull-up resistors with a supply-voltage invariant resistance. All I/O pins have protection diodes to both VCC and Ground as indicated in Figure 10-1 on page 55. See "Electrical Characteristics" on page 236 for a complete list of parameters. Figure 10-1. I/O Pin Equivalent Schematic Rpu Logic Pxn Cpin See Figure "General Digital I/O" for Details All registers and bit references in this section are written in general form. A lower case "x" represents the numbering letter for the port, and a lower case "n" represents the bit number. However, when using the register or bit defines in a program, the precise form must be used. For example, PORTB3 for bit no. 3 in Port B, here documented generally as PORTxn. The physical I/O Registers and bit locations are listed in "Register Description" on page 71. Four I/O memory address locations are allocated for each port, one each for the Data Register - PORTx, Data Direction Register - DDRx, Pull-up Enable Register - PUEx, and the Port Input Pins - PINx. The Port Input Pins I/O location is read only, while the Data Register, the Data Direction Register, and the Pull-up Enable Register are read/write. However, writing a logic one to a bit in the PINx Register, will result in a toggle in the corresponding bit in the Data Register. Using the I/O port as General Digital I/O is described in "Ports as General Digital I/O" on page 55. Most port pins are multiplexed with alternative functions for the peripheral features on the device. How each alternative function interferes with the port pin is described in "Alternative Port Functions" on page 60. Refer to the individual module sections for a full description of the alternative functions. Note that enabling the alternative function of some of the port pins does not affect the use of the other pins in the port as general digital I/O. 10.2 Ports as General Digital I/O The ports are bi-directional I/O ports with optional internal pull-ups. Figure 10-2 shows a functional description of one I/Oport pin, here generically called Pxn. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 55 Figure 10-2. General Digital I/O(1) REx Q D PUExn Q CLR RESET Q WEx D DDxn Q CLR WDx RESET DATA BUS RDx 1 Q Pxn D 0 PORTxn Q CLR RESET WPx WRx RRx SLEEP SYNCHRONIZER D Q L Q D RPx Q PINxn Q clk I/O SLEEP: clk I/O : Note: SLEEP CONTROL I/O CLOCK WEx: REx: WDx: RDx: WRx: RRx: RPx: WPx: WRITE PUEx READ PUEx WRITE DDRx READ DDRx WRITE PORTx READ PORTx REGISTER READ PORTx PIN WRITE PINx REGISTER 1. WEx, WRx, WPx, WDx, REx, RRx, RPx, and RDx are common to all pins within the same port. clkI/O, and SLEEP are common to all ports. 10.2.1 Configuring the Pin Each port pin consists of four register bits: DDxn, PORTxn, PUExn, and PINxn. As shown in "Register Description" on page 71, the DDxn bits are accessed at the DDRx I/O address, the PORTxn bits at the PORTx I/O address, the PUExn bits at the PUEx I/O address, and the PINxn bits at the PINx I/O address. The DDxn bit in the DDRx Register selects the direction of this pin. If DDxn is written logic one, Pxn is configured as an output pin. If DDxn is written logic zero, Pxn is configured as an input pin. If PORTxn is written logic one when the pin is configured as an output pin, the port pin is driven high (one). If PORTxn is written logic zero when the pin is configured as an output pin, the port pin is driven low (zero). ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 56 The pull-up resistor is activated, if the PUExn is written logic one. To switch the pull-up resistor off, PUExn has to be written logic zero. Table 10-1 summarizes the control signals for the pin value. Table 10-1. Port Pin Configurations DDxn PORTxn PUExn I/O Pull-up Comment 0 X 0 Input No Tri-state (hi-Z) 0 X 1 Input Yes Sources current if pulled low externally 1 0 0 Output No Output low (sink) 1 0 1 Output Yes NOT RECOMMENDED. Output low (sink) and internal pull-up active. Sources current through internal pull-up resistor and consumes power constantly 1 1 0 Output No Output high (source) 1 1 1 Output Yes Output high (source) and internal pull-up active Port pins are tri-stated when a reset condition becomes active, even when no clocks are running. 10.2.2 Toggling the Pin Writing a logic one to PINxn toggles the value of PORTxn, independent on the value of DDRxn. Note that the SBI instruction can be used to toggle one single bit in a port. 10.2.3 Break-Before-Make Switching In Break-Before-Make mode, switching the DDRxn bit from input to output introduces an immediate tri-state period lasting one system clock cycle, as indicated in Figure 10-3. For example, if the system clock is 4MHz and the DDRxn is written to make an output, an immediate tri-state period of 250 ns is introduced before the value of PORTxn is seen on the port pin. To avoid glitches it is recommended that the maximum DDRxn toggle frequency is two system clock cycles. The BreakBefore-Make mode applies to the entire port and it is activated by the BBMx bit. For more details, see "PORTCR - Port Control Register" on page 71. When switching the DDRxn bit from output to input no immediate tri-state period is introduced. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 57 Figure 10-3. Switching Between Input and Output in Break-Before-Make-Mode SYSTEM CLK r16 0x02 r17 0x01 INSTRUCTIONS out DDRx, r16 nop PORTx DDRx 0x55 0x02 0x01 Px0 Px1 out DDRx, r17 0x01 tri-state tri-state tri-state intermediate tri-state cycle intermediate tri-state cycle 10.2.4 Reading the Pin Value Independent of the setting of Data Direction bit DDxn, the port pin can be read through the PINxn Register bit. As shown in Figure 10-2 on page 56, the PINxn Register bit and the preceding latch constitute a synchronizer. This is needed to avoid metastability if the physical pin changes value near the edge of the internal clock, but it also introduces a delay. Figure 10-4 on page 58 shows a timing diagram of the synchronization when reading an externally applied pin value. The maximum and minimum propagation delays are denoted tpd,max and tpd,min respectively. Figure 10-4. Synchronization when Reading an Externally Applied Pin value SYSTEM CLK INSTRUCTIONS XXX XXX in r17, PINx SYNC LATCH PINxn r17 0x00 0xFF t pd, max t pd, min Consider the clock period starting shortly after the first falling edge of the system clock. The latch is closed when the clock is low, and goes transparent when the clock is high, as indicated by the shaded region of the "SYNC LATCH" signal. The signal value is latched when the system clock goes low. It is clocked into the PINxn Register at the succeeding positive clock edge. As indicated by the two arrows tpd,max and tpd,min, a single signal transition on the pin will be delayed between 1/2 and 11/2 system clock period depending upon the time of assertion. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 58 When reading back a software assigned pin value, a nop instruction must be inserted as indicated in Figure 10-5. The out instruction sets the "SYNC LATCH" signal at the positive edge of the clock. In this case, the delay tpd through the synchronizer is one system clock period. Figure 10-5. Synchronization when Reading a Software Assigned Pin Value SYSTEM CLK r16 INSTRUCTIONS 0xFF out PORTx, r16 nop in r17, PINx SYNC LATCH PINxn r17 0x00 0xFF t pd 10.2.5 Digital Input Enable and Sleep Modes As shown in Figure 10-2 on page 56, the digital input signal can be clamped to ground at the input of the schmitt-trigger. The signal denoted SLEEP in the figure, is set by the MCU Sleep Controller in Power-down Mode and Standby Mode (if supported) to avoid high power consumption if some input signals are left floating, or have an analog signal level close to VCC/2. SLEEP is overridden for port pins enabled as external interrupt pins. If the external interrupt request is not enabled, SLEEP is active also for these pins. SLEEP is also overridden by various other alternative functions as described in "Alternative Port Functions" on page 60. If a logic high level ("one") is present on an asynchronous external interrupt pin configured as "Interrupt on Rising Edge, Falling Edge, or Any Logic Change on Pin" while the external interrupt is not enabled, the corresponding External Interrupt Flag will be set when resuming from sleep mode above, as the clamping in these sleep mode produces the requested logic change. 10.2.6 Unconnected Pins If some pins are unused, it is recommended to ensure that these pins have a defined level. Even though most of the digital inputs are disabled in the deep sleep modes as described above, floating inputs should be avoided to reduce current consumption in all other modes where the digital inputs are enabled (Reset, Active mode and Idle mode). The simplest method to ensure a defined level of an unused pin, is to enable the internal pull-up. In this case, the pull-up will be disabled during reset. If low power consumption during reset is important, it is recommended to use an external pull-up or pull-down. Connecting unused pins directly to VCC or GND is not recommended, since this may cause excessive currents if the pin is accidentally configured as an output. 10.2.7 Program Example The following code example shows how to set port B pin 0 high, pin 1 low, and define the port pins from 2 to 3 as input with a pull-up assigned to port pin 2. The resulting pin values are read back again, but as previously discussed, a nop instruction is included to be able to read back the value recently assigned to some of the pins. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 59 Assembly Code Example ... ; Define pull-ups and set outputs high ; Define directions for port pins ldi r16,(1<>8); UBRRnL = (unsigned char)baud; /* Enable receiver and transmitter */ UCSRnB = (1<> 1) & 0x01; return ((resh << 8) | resl); } Note: 1. See "Code Examples" on page 6. The receive function example reads all the I/O registers into the register file before any computation is done. This gives an optimal receive buffer utilization since the buffer location read will be free to accept new data as early as possible. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 170 18.8.3 Receive Compete Flag and Interrupt The USART receiver has one flag that indicates the receiver state. The Receive Complete flag (RXCn) indicates if there are unread data present in the receive buffer. This flag is set when unread data exist in the receive buffer, and cleared when the receive buffer is empty (i.e., it does not contain any unread data). If the receiver is disabled (RXENn = 0), the receive buffer will be flushed and, consequently, the RXCn bit will become zero. When the Receive Complete Interrupt Enable (RXCIEn) is set, the USART Receive Complete interrupt will be executed as long as the RXCn flag is set (and provided that global interrupts are enabled). When interrupt-driven data reception is used, the receive complete routine must read the received data from UDRn in order to clear the RXCn flag, otherwise a new interrupt will occur once the interrupt routine terminates. 18.8.4 Receiver Error Flags The USART receiver has three error flags: Frame Error (FEn), Data OverRun Error (DORn) and Parity Error (UPEn). All error flags are located in the receive buffer together with the frame for which they indicate the error status. Due to the buffering of error flags, they must be read before the receive buffer (UDRn), since reading UDRn changes the buffer. Error flags can not be changed by software, however, for upward compatibility of future USART implementations all flags must be cleared when UCSRnA is written . None of the error flags can generate an interrupt. The Frame Error flag (FEn) indicates the state of the first stop bit of the next readable frame stored in the receive buffer. The flag is zero when the stop bit was correctly read (as one), and the flag is one when the stop bit was incorrect (zero). This flag can be used for detecting out-of-sync conditions, for detecting break conditions and for protocol handling. The flag is not affected by the USBSn bit, since the receiver ignores all stop bits, except the first. For compatibility with future devices, this bit must always be cleared when writing UCSRnA. The Data OverRun flag (DORn) indicates data loss due to a receiver buffer full condition. A data overrun situation occurs when the receive buffer is full (two characters), there is a new character waiting in the receive shift register, and a new start bit is detected. If the flag is set there was one or more serial frames lost between the frame last and the next frame read from UDRn. For compatibility with future devices, this bit must always be cleared when writing to UCSRnA. The flag is cleared when the frame received was successfully moved from the shift register to the receive buffer. The Parity Error flag (UPEn) indicates that the next frame in the receive buffer had a parity error. If parity check is not enabled the flag will always be zero. For compatibility with future devices, this bit must always be cleared when writing UCSRnA. For more details, see "Parity Bit Calculation" on page 165 and "Parity Checker" on page 171. 18.8.5 Parity Checker The parity checker is active when the high USART Parity Mode bit (UPMn1) is set. The type of parity check to be performed (odd or even) is selected by the UPMn0 bit. When enabled, the parity checker calculates the parity of the data bits in incoming frames and compares the result with the parity bit from the serial frame. The result of the check is stored in the receive buffer together with the received data and stop bits. The Parity Error flag (UPEn) can then be read by software to check if the frame had a parity error. If parity checking is enabled, the UPEn bit is set if the next character that can be read from the receive buffer had a parity error when received. This bit is valid until the receive buffer (UDRn) is read. 18.8.6 Disabling the Receiver Unlike the transmitter, the receiver is disabled immediately and any data from ongoing receptions will be lost. When disabled (RXENn = 0), the receiver will no longer override the normal function of the RxDn port pin and the FIFO buffer is flushed, with any remaining data in the buffer lost. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 171 18.8.7 Flushing the Receive Buffer The receiver buffer FIFO will be flushed when the receiver is disabled, i.e., the buffer will be emptied of its contents. Unread data will be lost. To flush the buffer during normal operation, due to for instance an error condition, read the UDRn until the RXCn flag is cleared. The following code example shows how to flush the receive buffer. Assembly Code Example(1) USART_Flush: sbis ret in rjmp UCSRnA, RXCn r16, UDRn USART_Flush C Code Example(1) void USART_Flush( void ) { unsigned char dummy; while ( UCSRnA & (1< 2 CPU clock cycles When fck >= 12MHz: 3 CPU clock cycles Minimum high period of serial clock: When fck < 12MHz: > 2 CPU clock cycles When fck >= 12MHz: 3 CPU clock cycles 24.3.1 Pin Mapping The pin mapping is listed in Table 24-4. Note that not all parts use the SPI pins dedicated for the internal SPI interface. Table 24-4. Pin Mapping Serial Programming Symbol Pins I/O Description MOSI PA6 I Serial Data in MISO PA5 O Serial Data out SCK PA4 I Serial Clock ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 226 24.3.2 Programming Algorithm When writing serial data to the ATtiny441/841, data is clocked on the rising edge of SCK. When reading data from the ATtiny441/841, data is clocked on the falling edge of SCK. See Figure 25-4 on page 243 and Figure 25-5 on page 244 for timing details. To program and verify the ATtiny441/841 in the serial programming mode, the following sequence is recommended (See Table 24-5 on page 228): 1. Power-up sequence: apply power between VCC and GND while RESET and SCK are set to "0" In some systems, the programmer can not guarantee that SCK is held low during power-up. In this case, RESET must be given a positive pulse after SCK has been set to '0'. The duration of the pulse must be at least tRST plus two CPU clock cycles. See Table 25-5 on page 240 for definition of minimum pulse width on RESET pin, tRST 2. Wait for at least 20 ms and then enable serial programming by sending the Programming Enable serial instruction to the MOSI pin 3. The serial programming instructions will not work if the communication is out of synchronization. When in sync, the second byte (0x53) will echo back when issuing the third byte of the Programming Enable instruction 4. 5. Regardless if the echo is correct or not, all four bytes of the instruction must be transmitted If the 0x53 did not echo back, give RESET a positive pulse and issue a new Programming Enable command The Flash is programmed one page at a time. The memory page is loaded one byte at a time by supplying the 6 LSB of the address and data together with the Load Program Memory Page instruction To ensure correct loading of the page, data low byte must be loaded before data high byte for a given address is applied The Program Memory Page is stored by loading the Write Program Memory Page instruction with the 7 MSB of the address If polling (RDY/BSY) is not used, the user must wait at least tWD_FLASH before issuing the next page (See Table 24-3 on page 225). Accessing the serial programming interface before the Flash write operation completes can result in incorrect programming. The EEPROM can be programmed one byte or one page at a time. A: Byte programming. The EEPROM array is programmed one byte at a time by supplying the address and data together with the Write instruction. EEPROM memory locations are automatically erased before new data is written. If polling (RDY/BSY) is not used, the user must wait at least tWD_EEPROM before issuing the next byte (See Table 24-3 on page 225). In a chip erased device, no 0xFFs in the data file(s) need to be programmed B: Page programming (the EEPROM array is programmed one page at a time). The memory page is loaded one byte at a time by supplying the 6 LSB of the address and data together with the Load EEPROM Memory Page instruction. The EEPROM memory page is stored by loading the Write EEPROM Memory Page Instruction with the 7 MSB of the address. When using EEPROM page access only byte locations loaded with the Load EEPROM Memory Page instruction are altered and the remaining locations remain unchanged. If polling (RDY/BSY) is not used, the user must wait at least tWD_EEPROM before issuing the next byte (See Table 24-3 on page 225). In a chip erased device, no 0xFF in the data file(s) need to be programmed 6. Any memory location can be verified by using the Read instruction, which returns the content at the selected address at the serial output pin (MISO) 7. At the end of the programming session, RESET can be set high to commence normal operation 8. Power-off sequence (if required): set RESET to "1", and turn VCC power off 24.3.3 Programming Instruction set The instruction set for serial programming is described in Table 24-5 and Figure 24-2 on page 229. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 227 Table 24-5. Serial Programming Instruction Set Instruction Format Instruction/Operation Byte 1 Byte 2 Byte 3 Byte4 Programming Enable $AC $53 $00 $00 Chip Erase (Program Memory/EEPROM) $AC $80 $00 $00 Poll RDY/BSY $F0 $00 $00 data byte out Load Extended Address byte (1) $4D $00 Extended adr $00 Load Program Memory Page, High byte $48 $00 adr LSB high data byte in Load Program Memory Page, Low byte $40 $00 adr LSB low data byte in Load EEPROM Memory Page (page access) $C1 $00 0000 000aa (2) data byte in Read Program Memory, High byte $28 adr MSB adr LSB high data byte out Read Program Memory, Low byte $20 adr MSB adr LSB low data byte out Read EEPROM Memory $A0 0000 00aa (2) aaaa aaaa (2) data byte out Read Lock bits $58 $00 $00 data byte out Read Signature Byte $30 $00 0000 000aa (2) data byte out Read Fuse bits $50 $00 $00 data byte out Read Fuse High bits $58 $08 $00 data byte out Read Fuse Extended Bits $50 $08 $00 data byte out Read Calibration Byte $38 $00 $00 data byte out Write Program Memory Page $4C adr MSB (4) adr LSB (4) $00 Write EEPROM Memory $C0 0000 00aa (2) aaaa aaaa (2) data byte in Write EEPROM Memory Page (page access) $C2 0000 00aa (2) aaaa aa00 (2) $00 Write Lock bits (5) $AC $E0 $00 data byte in Write Fuse bits (5) $AC $A0 $00 data byte in $AC $A8 $00 data byte in $AC $A4 $00 data byte in Load Instructions Read Instructions Write Instructions (3) Write Fuse High bits (5) Write Fuse Extended Bits (5) Notes: 1. Not all instructions are applicable for all parts. 2. a = address. 3. Instructions accessing program memory use a word address. This address may be random within the page range. 4. Word addressing. 5. To ensure future compatibility, unused fuses and lock bits should be unprogrammed (`1') . ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 228 If the LSB of RDY/BSY data byte out is `1', a programming operation is still pending. Wait until this bit returns `0' before the next instruction is carried out. Within the same page, the low data byte must be loaded prior to the high data byte. After data is loaded to the page buffer, program the EEPROM page, see Figure 24-2. Figure 24-2. Serial Programming Instruction example Serial Programming Instruction Load Program Memory Page (High/Low Byte)/ Load EEPROM Memory Page (page access) Byte 1 Byte 2 Adr A drr M MS MSB SB Byte 3 Write Program Memory Page/ Write EEPROM Memory Page Byte 1 Byte 4 Byte 2 Adr LSB Bit 15 B Adr MSB Bit 15 B 0 Byte 3 Byte 4 Adr A dr LS LSB SB 0 Page Buffer Page Offset Page 0 Page 1 Page 2 Page Number Page N-1 Program Memory/ EEPROM Memory 24.4 High-Voltage Serial Programming This section describes how to program and verify Flash Program memory, EEPROM Data memory, Lock bits and Fuse bits in the ATtiny441/841. Figure 24-3. High-voltage Serial Programming +11.5 - 12.5V SCI +4.5 - 5.5V PB3 (RESET) VCC PB0 PA4 SDO PA2:0 PA5 SII GND PA6 SDI ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 229 Table 24-6. Pin Name Mapping Signal Name in High-voltage Serial Programming Mode Pin Name SDI PA6 I Serial Data Input SII PA5 I Serial Instruction Input SDO PA4 O Serial Data Output SCI PB0 I Serial Clock Input (min. 220ns period) I/O Function The minimum period for the Serial Clock Input (SCI) during High-voltage Serial Programming is 220 ns. Table 24-7. Pin Values Used to Enter Programming Mode Pin Symbol Value PA4 Prog_enable[0] 0 PA5 Prog_enable[1] 0 PA6 Prog_enable[2] 0 24.4.1 High-Voltage Serial Programming Algorithm To program and verify the ATtiny441/841 in the High-voltage Serial Programming mode, the following sequence is recommended (See instruction formats in Table 24-9 on page 233): The following algorithm puts the device in High-voltage Serial Programming mode: 1. Set Prog_enable pins listed in Table 24-7 on page 230 to "000", RESET pin and VCC to 0V. 2. Apply 4.5 - 5.5V between VCC and GND. Ensure that VCC reaches at least 1.8V within the next 20 s. 3. Wait 20 - 60 s, and apply 11.5 - 12.5V to RESET. 4. Keep the Prog_enable pins unchanged for at least 10 s after the high-voltage has been applied to ensure the Prog_enable Signature has been latched. 5. Release the Prog_enable[2] pin after tHVRST has elapsed. 6. Wait at least 300 s before giving any serial instructions on SDI/SII. 7. Exit Programming mode by power the device down or by bringing RESET pin to 0V. If the rise time of the VCC is unable to fulfill the requirements listed above, the following alternative algorithm can be used: 1. Set Prog_enable pins listed in Table 24-7 on page 230 to "000", RESET pin and VCC to 0V. 2. Apply 4.5 - 5.5V between VCC and GND. 3. Monitor VCC, and as soon as VCC reaches 0.9 - 1.1V, apply 11.5 - 12.5V to RESET. 4. Keep the Prog_enable pins unchanged for at least 10 s after the high-voltage has been applied to ensure the Prog_enable Signature has been latched. 5. Release the Prog_enable[2] pin to avoid drive contention with other pin functions. 6. Wait until VCC actually reaches 4.5 - 5.5V before giving any serial instructions on SDI/SII. 7. Exit Programming mode by power the device down or by bringing RESET pin to 0V. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 230 Table 24-8. High-voltage Reset Characteristics RESET Pin High-voltage Threshold Minimum High-voltage Period for Latching Prog_enable VCC VHVRST tHVRST 4.5V 11.5V 100 ns 5.5V 11.5V 100 ns Supply Voltage 24.4.2 Considerations for Efficient Programming The loaded command and address are retained in the device during programming. For efficient programming, the following should be considered. The command needs only be loaded once when writing or reading multiple memory locations. Skip writing the data value 0xFF that is the contents of the entire EEPROM (unless the EESAVE Fuse is programmed) and Flash after a Chip Erase. Address High byte needs only be loaded before programming or reading a new 256 word window in Flash or 256 byte EEPROM. This consideration also applies to Signature bytes reading. 24.4.3 Chip Erase The Chip Erase will erase the Flash and EEPROM(1) memories plus Lock bits. The Lock bits are not reset until the Program memory has been completely erased. The Fuse bits are not changed. A Chip Erase must be performed before the Flash and/or EEPROM are re-programmed. 1. Load command "Chip Erase" (see Table 24-9 on page 233). 2. Wait after Instr. 3 until SDO goes high for the "Chip Erase" cycle to finish. 3. Load Command "No Operation". Note: 1. The EEPROM memory is preserved during Chip Erase if the EESAVE Fuse is programmed. 24.4.4 Programming the Flash The Flash is organized in pages, see "Memory Parametrics" on page 225. When programming the Flash, the program data is latched into a page buffer. This allows one page of program data to be programmed simultaneously. The following procedure describes how to program the entire Flash memory: 1. Load Command "Write Flash" (see Table 24-9 on page 233). 2. Load Flash Page Buffer. 3. Load Flash High Address and Program Page. Wait after Instr. 3 until SDO goes high for the "Page Programming" cycle to finish. 4. Repeat 2 through 3 until the entire Flash is programmed or until all data has been programmed. 5. End Page Programming by Loading Command "No Operation". When writing or reading serial data to the ATtiny441/841, data is clocked on the rising edge of the serial clock, see Figure 25-6 on page 244, Figure 24-3 on page 229 and Table 25-12 on page 245 for details. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 231 Figure 24-4. Addressing the Flash which is Organized in Pages PCMSB PAGEMSB PROGRAM COUNTER PCPAGE PCWORD PAGE ADDRESS WITHIN THE FLASH WORD ADDRESS WITHIN A PAGE PROGRAM MEMORY PAGE PAGE PCWORD[PAGEMSB:0]: 00 INSTRUCTION WORD 01 02 PAGEEND Figure 24-5. High-voltage Serial Programming Waveforms SDI PA6 MSB LSB SII PA5 MSB LSB SDO PA4 SCI PB0 MSB 0 LSB 1 2 3 4 5 6 7 8 9 10 24.4.5 Programming the EEPROM The EEPROM is organized in pages, see Table 25-11 on page 244. When programming the EEPROM, the data is latched into a page buffer. This allows one page of data to be programmed simultaneously. The programming algorithm for the EEPROM Data memory is as follows (refer to Table 24-9 on page 233): 1. Load Command "Write EEPROM". 2. Load EEPROM Page Buffer. 3. Program EEPROM Page. Wait after Instr. 2 until SDO goes high for the "Page Programming" cycle to finish. 4. Repeat 2 through 3 until the entire EEPROM is programmed or until all data has been programmed. 5. End Page Programming by Loading Command "No Operation". ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 232 24.4.6 Reading the Flash The algorithm for reading the Flash memory is as follows (refer to Table 24-9 on page 233): 1. Load Command "Read Flash". 2. Read Flash Low and High Bytes. The contents at the selected address are available at serial output SDO. 24.4.7 Reading the EEPROM The algorithm for reading the EEPROM memory is as follows (refer to Table 24-9 on page 233): 1. Load Command "Read EEPROM". 2. Read EEPROM Byte. The contents at the selected address are available at serial output SDO. 24.4.8 Programming and Reading the Fuse and Lock Bits The algorithms for programming and reading the Fuse Low/High bits and Lock bits are shown in Table 24-9 on page 233. 24.4.9 Reading the Signature Bytes and Calibration Byte The algorithms for reading the Signature bytes and Calibration byte are shown in Table 24-9 on page 233. 24.4.10 Power-off sequence Set SCI to "0". Set RESET to "1". Turn VCC power off. Table 24-9. High-voltage Serial Programming Instruction Set Instruction Format Instruction Instr.1/5 Instr.2/6 Instr.3/7 Instr.4 SDI 0_1000_0000_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0001_0000_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI 0_ bbbb_bbbb _00 0_eeee_eeee_00 0_0000_0000_00 0_0000_0000_00 SII 0_0000_1100_00 0_0010_1100_00 0_0110_1101_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_dddd_dddd_00 0_0000_0000_00 0_0000_0000_00 SII 0_0011_1100_00 0_0111_1101_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx Load Flash High Address and Program Page SDI 0_0000_000a_00 0_0000_0000_00 0_0000_0000_00 SII 0_0001_1100_00 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx Load "Read Flash" Command SDI 0_0000_0010_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx Chip Erase Load "Write Flash" Command Load Flash Page Buffer Operation Remarks Wait after Instr.3 until SDO goes high for the Chip Erase cycle to finish. Enter Flash Programming code. Repeat after Instr. 1 - 7until the entire page buffer is filled or until all data within the page is filled.(2) Instr 5-7. Wait after Instr 3 until SDO goes high. Repeat Instr. 2 - 3 for each loaded Flash Page until the entire Flash or all data is programmed. Repeat Instr. 1 for a new 256 byte page.(2) Enter Flash Read mode. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 233 Instruction Format Instruction Read Flash Low and High Bytes Load "Write EEPROM" Command Load EEPROM Page Buffer Program EEPROM Page Instr.1/5 Write Fuse High Bits Write Fuse Extended Bits Instr.4 0_bbbb_bbbb_00 0_0000_000a_00 0_0000_0000_00 0_0000_0000_00 SII 0_0000_1100_00 0_0001_1100_00 0_0110_1000_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx q_qqqq_qqqx_xx SDI 0_0000_0000_00 0_0000_0000_00 SII 0_0111_1000_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx p_pppp_pppx_xx SDI 0_0001_0001_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI 0_bbbb_bbbb_00 0_aaaa_aaaa_00 SII 0_0000_1100_00 0_0001_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0000_0000_00 SII 0_0110_1100_00 SDO x_xxxx_xxxx_xx SDI 0_0000_0000_00 0_0000_0000_00 SII 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_bbbb_bbbb_00 0_aaaa_aaaa_00 0_eeee_eeee_00 0_0000_0000_00 SII 0_0000_1100_00 0_0001_1100_00 0_0010_1100_00 0_0110_1101_00 x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx Operation Remarks Repeat Instr. 1, 3 - 6 for each new address. Repeat Instr. 2 for a new 256 byte page. Instr 5 - 6. Enter EEPROM Programming mode. 0_0000_0000_00 0_0000_0000_00 SII 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0000_0011_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI Read SII EEPROM Byte SDO Write Fuse Low Bits Instr.3/7 SDI SDO Write EEPROM Byte SDI Load "Read EEPROM" Command Instr.2/6 0_eeee_eeee_00 0_0010_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1101_00 x_xxxx_xxxx_xx Repeat Instr. 1 - 5 until the entire page buffer is filled or until all data within the page is filled.(3) Wait after Instr. 2 until SDO goes high. Repeat Instr. 1 - 2 for each loaded EEPROM page until the entire EEPROM or all data is programmed. Repeat Instr. 1 - 6 for each new address. Wait after Instr. 6 until SDO goes high.(4) Instr. 5-6 Enter EEPROM Read mode. 0_bbbb_bbbb_00 0_aaaa_aaaa_00 0_0000_0000_00 0_0000_0000_00 0_0000_1100_00 0_0001_1100_00 0_0110_1000_00 0_0110_1100_00 x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx Repeat Instr. 1, 3 - 4 for each new address. Repeat Instr. 2 q_qqqq_qqq0_00 for a new 256 byte page. SDI 0_0100_0000_00 0_A987_6543_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0010_1100_00 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0100_0000_00 0_IHGF_EDCB_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0010_1100_00 0_0111_0100_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0100_0000_00 0_0000_000J_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0010_1100_00 0_0110_0110_00 0_0110_1110_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx Wait after Instr. 4 until SDO goes high. Write A - 3 = "0" to program the Fuse bit. Wait after Instr. 4 until SDO goes high. Write F - B = "0" to program the Fuse bit. Wait after Instr. 4 until SDO goes high. Write J = "0" to program the Fuse bit. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 234 Instruction Format Instruction Instr.1/5 SDI Read Fuse High Bits Instr.3/7 Instr.4 0_0010_0000_00 0_0000_0021_00 0_0000_0000_00 0_0000_0000_00 0_0100_1100_00 0_0010_1100_00 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0000_0100_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0110_1000_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx A_9876_543x_xx SDI 0_0000_0100_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0111_1010_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx I_HGFE_DCBx_xx Write Lock Bits SII Read Fuse Low Bits Instr.2/6 Reading F - B = "0" means the Fuse bit is programmed. 0_0000_0100_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0110_1010_00 0_0110_1110_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxJx_xx 0_0000_0100_00 0_0000_0000_00 0_0000_0000_00 0_0100_1100_00 0_0111_1000_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_x21x_xx Read Signature Bytes SDI 0_0000_1000_00 0_0000_00bb_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0000_1100_00 0_0110_1000_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx q_qqqq_qqqx_xx Read Calibration Byte SDI 0_0000_1000_00 0_0000_0000_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0000_1100_00 0_0111_1000_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx p_pppp_pppx_xx Load "No Operation" Command SDI 0_0000_0000_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI Read Lock Bits SII Wait after Instr. 4 until SDO goes high. Write 2 - 1 = "0" to program the Lock Bit. Reading A - 3 = "0" means the Fuse bit is programmed. SDI Read Fuse Extended Bits Operation Remarks Reading J = "0" means the Fuse bit is programmed. Reading 2, 1 = "0" means the Lock bit is programmed. Repeats Instr 2 4 for each signature byte address. Notes: 1. a = address high bits, b = address low bits, d = data in high bits, e = data in low bits, p = data out high bits, q = data out low bits, x = don't care, 1 = Lock Bit1, 2 = Lock Bit2, 3 = CKSEL0 Fuse, 4 = CKSEL1 Fuse, 5 = CKSEL2 Fuse, 6 = CKSEL3 Fuse, 7 = SUT0 Fuse, 8 = SUT1 Fuse, 9 = CKOUT Fuse, A = CKDIV8 Fuse, B = BODLEVEL0 Fuse, C = BODLEVEL1 Fuse, D= BODLEVEL2 Fuse, E = EESAVE Fuse, F = WDTON Fuse, G = SPIEN Fuse, H = DWEN Fuse, I = RSTDISBL Fuse, J = SELFPRGEN Fuse 2. For page sizes less than 256 words, parts of the address (bbbb_bbbb) will be parts of the page address. 3. For page sizes less than 256 bytes, parts of the address (bbbb_bbbb) will be parts of the page address. 4. The EEPROM is written page-wise. But only the bytes that are loaded into the page are actually written to the EEPROM. Page-wise EEPROM access is more efficient when multiple bytes are to be written to the same page. Note that auto-erase of EEPROM is not available in High-voltage Serial Programming, only in SPI Programming. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 235 25. Electrical Characteristics 25.1 ATtiny441 25.1.1 Absolute Maximum Ratings* Operating Temperature . . . . . . . . . . . -55C to +125C Storage Temperature . . . . . . . . . . . . . -65C to +150C Voltage on any Pin except RESET with respect to Ground. . . . . . . . . . -0.5V to VCC+0.5V *Notice: Stresses beyond those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Voltage on RESET with respect to Ground-0.5V to +13.0V Maximum Operating Voltage . . . . . . . . . . . . . . . . 6.0V DC Current per I/O Pin. . . . . . . . . . . . . . . . . . 40.0 mA DC Current VCC and GND Pins . . . . . . . . . . 200.0 mA 25.1.2 DC Characteristics Table 25-1. DC Characteristics. TA = -40 to +85C Symbol Parameter Condition Min VIL Input Low Voltage(12) VCC = 1.7V - 2.4V VCC = 2.4V - 5.5V Input High-voltage Except RESET pin(12) Input High-voltage RESET pin(12) VIH Typ (1) Max Units -0.5 0.2VCC(3) 0.3VCC(3) V VCC = 1.7V - 2.4V VCC = 2.4V - 5.5V 0.7VCC(2) 0.6VCC(2) VCC +0.5 V VCC = 1.7V to 5.5V 0.9VCC(2) VCC +0.5 V ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 236 Symbol Parameter Condition VCC = 5V, IOL = 2 mA (4) Output Low Voltage RESET pin as I/O (6)(12) Output Low Voltage Standard (7) Sink I/O Output Low Voltage (4) High (8) Sink I/O Pin (5) VCC = 1.8V, IOL = 0.4mA(5) 0.4 VCC = 5V, IOL = 10 mA (5) 0.6 VCC = 3V, IOL = 5 mA (5) VOH Output High-voltage Except RESET pin(6) 0.5 VCC = 1.8V, IOL = 2mA (5) 0.4 VCC = 5V, IOL = 20 mA (5) 0.6 VCC = 3V, IOL = 10 mA(5) 0.5 V (5) 0.4 VCC = 5V, IOL = 20 mA (5) 0.6 VCC = 3V, IOL = 20 mA(5) 0.6 VCC = 1.8V, IOL = 8mA (5) 0.5 VCC = 5V, IOH = -10 mA (4) Units 0.6 0.5 VCC = 1.8V, IOL = 4mA Output Low Voltage (4) Extra High (8) Sink I/O Max VCC = 3V, IOL = 1 mA(5) (4) VOL Typ (1) Min (5) 4.3 VCC = 3V, IOH = -5 mA (5) 2.5 VCC = 1.8V, IOH = -2 mA (5) 1.4 V ILIL Input Leakage Current, I/O Pin (absolute value) VCC = 5.5V, pin low <0.05 1 A ILIH Input Leakage Current, I/O Pin (absolute value) VCC = 5.5V, pin high <0.05 1 A ILIAC Input Leakage Current, Analog Comparator VCC = 5V VIN = VCC/2 -50 50 nA RRST Reset Pull-up Resistor VCC = 5.5V, input low 30 60 k RPU I/O Pin Pull-up Resistor VCC = 5.5V, input low 20 50 k Power Supply Current(10) ICC Power-down mode(11) Active 1 MHz, VCC = 2V 0.23 0.6 mA Active 4 MHz, VCC = 3V 1.25 2 mA Active 8 MHz, VCC = 5V 4.2 6 mA Idle 1 MHz, VCC = 2V 0.03 0.2 mA Idle 4 MHz, VCC = 3V 0.22 0.6 mA Idle 8 MHz, VCC = 5V 0.94 1.5 mA WDT enabled, VCC = 3V 1.52 4 A WDT disabled, VCC = 3V 0.17 2 A Notes: 1. Typical values at 25C. 2. "Min" means the lowest value where the pin is guaranteed to be read as high. 3. "Max" means the highest value where the pin is guaranteed to be read as low. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 237 4. Under steady-state (non-transient) conditions I/O ports can sink/source more current than the test conditions, however, the sum current of PORTA and PORTB must not exceed 100mA. VOL/VOH is not guaranteed to meet specifications if pin or port currents exceed the limits given. 5. Pins are not guaranteed to sink/source currents greater than those listed at the given supply voltage. 6. The RESET pin must tolerate high voltages when entering and operating in programming modes and, as a consequence, has a weak drive strength as compared to regular I/O pins. See Figure 26-58, Figure 26-59, Figure 26-60, Figure 26-64, Figure 26-65 and Figure 26-66. 7. Ports with standard sink strength: PORTA6, PORTA[4:0], PORTB[2:0] 8. Ports with high sink strength: PORTA7, PORTA5 9. Ports with extra high sink strength: PORTA7 (when PHDEA1 set), PORTA5 (when PHDEA0 set) 10. Results obtained using external clock and methods described in "Minimizing Power Consumption" on page 37. Power reduction fully enabled (PRR = 0xFF) and with no I/O drive. 11. BOD Disabled. 12. These parameters are not tested in production. 25.1.3 Speed The maximum operating frequency of the device is dependent on supply voltage, VCC. The relationship between supply voltage and maximum operating frequency is piecewise linear, as shown in Figure 25-1. Figure 25-1. Maximum Operating Frequency vs. Supply Voltage 16 MHz 10 MHz 4 MHz 2 MHz 1.7V 1.8V 2.7V 4.5V 5.5V 25.1.4 Clock Characteristics 25.1.4.1 Accuracy of Calibrated Internal Oscillator It is possible to manually calibrate the internal oscillator to be more accurate than default factory calibration. Note that the oscillator frequency depends on temperature and voltage. Voltage and temperature characteristics can be found in "Internal Oscillator Speed" on page 292. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 238 Table 25-2. Calibration Accuracy of Internal 8MHz Oscillator Target Frequency VCC Temperature Accuracy at given Voltage & Temperature Factory Calibration 8.0 MHz 2.7V - 4.0V 0C - 85C 2% User Calibration Fixed freq. within: 7.3 - 8.1 MHz Fixed voltage within: 1.7V - 5.5V Fixed temp. within: -40C to +85C 1%(1) Calibration Method Notes: 1. Accuracy of oscillator frequency at calibration point (fixed temperature and fixed voltage). 25.1.4.2 Accuracy of Calibrated 32kHz Oscillator It is possible to manually calibrate the internal 32kHz oscillator to be more accurate than default factory calibration. Note that the oscillator frequency depends on temperature and voltage. Voltage and temperature characteristics can be found in " ULP 32kHz Oscillator" on page 293. Table 25-3. Calibration Accuracy of Internal 32kHz Oscillator Calibration Method Target Frequency VCC Temperature Accuracy 32kHz 1.7 - 5.5V -40C to +85C 30% Factory Calibration 25.1.4.3 External Clock Drive Figure 25-2. External Clock Drive Waveform V IH1 V IL1 Table 25-4. External Clock Drive Characteristics VCC = 1.8 - 5.5V VCC = 2.7 - 5.5V VCC = 4.5 - 5.5V Symbol Parameter Min Max Min Max Min Max Units 1/tCLCL Clock Frequency 0 4 0 8 0 12 MHz tCLCL Clock Period 250 125 83 ns tCHCX High Time 100 40 20 ns tCLCX Low Time 100 40 20 ns ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 239 VCC = 1.8 - 5.5V Symbol Parameter Min Max tCLCH Rise Time 2.0 tCHCL Fall Time tCLCL Change in period from one clock cycle to the next VCC = 2.7 - 5.5V Min Max VCC = 4.5 - 5.5V Min Max Units 1.6 0.5 s 2.0 1.6 0.5 s 2 2 2 % 25.1.5 System and Reset Characteristics Table 25-5. Reset and Internal Voltage Characteristics Symbol Parameter Condition VRST RESET Pin Threshold Voltage VBG Internal bandgap voltage VCC = 3.3V, TA = 25C Internal 1.1V reference voltage Min(1) Typ(1) 0.2 VCC Max(1) Units 0.9VCC V 1.0 1.1 1.2 V VCC=1.7V to 5.5V at TA=-40C to 85C 1.067 1.1 1.133 V Internal 2.2V reference voltage VCC=2.3V to 5.5V at TA=-40C to 85C 2.134 2.2 2.266 V Internal 4.096V reference voltage VCC=4.2V to 5.5V at TA=-40C to 85C 3.932 4.096 4.260 V tRST Minimum pulse width on RESET Pin VCC = 1.8V VCC = 3V VCC = 5V tTOUT Time-out after reset VREF Note: 1. 2000 700 400 ns BOD disabled 64 128 BOD enabled 128 256 Min(1) Typ(1) Max(1) Units ms Values are guidelines only. 25.1.5.1 Power-On Reset Table 25-6. Characteristics of Enhanced Power-On Reset. TA = -40 ... +85C Symbol Parameter VPOR Release threshold of power-on reset (2) 1.1 1.4 1.6 V VPOA Activation threshold of power-on reset (3) 0.6 1.3 1.6 V SRON Power-On Slope Rate 0.01 Note: V/ms 1. Values are guidelines only. 2. Threshold where device is released from reset when voltage is rising 3. The Power-on Reset will not work unless the supply voltage has been below VPOA (falling) ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 240 25.1.5.2 Brown-Out Detection Table 25-7. VBOT vs. BODLEVEL Fuse Coding BODLEVEL[2:0] Fuses Min(1) Typ(1) Max(1) 11X 1.7 1.8 2.0 101 2.5 2.7 2.9 100 4.1 4.3 4.5 0XX Note: 1. Units V Reserved VBOT may be below nominal minimum operating voltage for some devices. For devices where this is the case, the device is tested down to VCC = VBOT during the production test. This guarantees that a Brown-out Reset will occur before VCC drops to a voltage where correct operation of the microcontroller is no longer guaranteed. 25.1.6 Analog Comparator Characteristics Table 25-8. Analog Comparator Characteristics, TA = -40 ... +85C Symbol Parameter Condition VAIO Input Offset Voltage VCC = 5V, VIN = VCC / 2 ILAC Input Leakage Current VCC = 5V, VIN = VCC / 2 Analog Propagation Delay (from saturation to slight overdrive) VCC = 2.7V 750 VCC = 4.0V 500 Analog Propagation Delay (large step change) VCC = 2.7V 100 VCC = 4.0V 75 Digital Propagation Delay VCC = 1.7V - 5.5 1 tAPD tDPD Min Typ Max Units < 10 40 mV 50 nA -50 ns 2 CLK 25.1.7 ADC Characteristics Table 25-9. ADC Characteristics. TA = -40 ... +85C. VCC = 1.7 - 5.5V Symbol Parameter Condition Min Typ Resolution Absolute accuracy (Including INL, DNL, and Quantization, Gain and Offset Errors) Max Units 10 Bits VREF = VCC = 4V, ADC clock = 200 kHz 2 LSB VREF = VCC = 4V, ADC clock = 1 MHz 3 LSB VREF = VCC = 4V, ADC clock = 200 kHz Noise Reduction Mode 1.5 LSB VREF = VCC = 4V, ADC clock = 1 MHz Noise Reduction Mode 2.5 LSB ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 241 Symbol Parameter Condition Min Integral Non-Linearity (INL, accuracy after offset and gain calibration) VREF = VCC = 4V, ADC clock = 200 kHz 1 LSB Differential Non-linearity (DNL) VREF = VCC = 4V, ADC clock = 200 kHz 0.5 LSB Gain Error VREF = VCC = 4V, ADC clock = 200 kHz 2.5 LSB Offset Error VREF = VCC = 4V, ADC clock = 200 kHz 1.5 LSB Conversion Time Free Running Conversion RAIN Input Voltage Max Units 13 260 s 50 1000 kHz GND VREF V Clock Frequency VIN Typ Input Bandwidth 38.5 kHz Analog Input Resistance 100 M ADC Conversion Output 0 1023 LSB 25.1.8 Two-Wire Serial Interface Characteristics The following data is based on simulations and characterizations. Parameters listed in Table 25-10 are not tested in production. Symbols refer to Figure 25-3. Table 25-10. Two-Wire Serial Interface Characteristics Symbol Parameter VIL Input Low voltage VIH Input High voltage VHYS Hysteresis of Schmitt-trigger inputs VOL Output Low voltage fSCL SCL clock frequency (1) tSP Spikes suppressed by input filter tHD:STA Hold time (repeated) START Condition Condition Min Max Unit TWHNM = 0 -0.5 0.3 VCC V TWHNM = 1 -0.5 0.4VCC V TWHNM = 0 0.7 VCC VCC + 0.5 V TWHNM = 1 0.5VCC VCC + 0.5 V TWHNM = 0, VCC > 2.7V 0.05 VCC - V TWHNM = 0, VCC < 2.7V 0 TWHNM = 1, VCC > 2.7V 0.31 0.45 V TWHNM = 1, VCC < 2.7V 0.39 1.09 V IOL = 3mA, VCC > 2.7V 0 0.4 V IOL = 2mA, VCC < 2.7V 0 0.4 V TWHNM = 0 0 400 kHz TWHNM = 1 0 400 kHz 0 50 ns 0.6 - s V ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 242 Symbol Parameter tLOW Min Max Unit Low period of SCL clock 1.3 - s tHIGH High period of SCL clock 0.6 - s tSU:STA Set-up time for repeated START condition 0.6 - s tHD:DAT Data hold time 0 0.9 s tSU:DAT Data setup time 100 - ns tSU:STO Setup time for STOP condition 0.6 - s tBUF Bus free time between STOP and START 1.3 - s Notes: 1. Condition fCK = CPU clock frequency. Figure 25-3. Two-Wire Serial Bus Timing tOF tHIGH tLOW SCL tSU:STA tHD:STA tR tLOW tHD:DAT tSU:DAT tSU:STO SDA tBUF 25.1.9 Serial Programming Characteristics Figure 25-4. Serial Programming Timing MOSI tSHOX tOVSH SCK tSLSH tSHSL MISO ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 243 Figure 25-5. Serial Programming Waveform SERIAL DATA INPUT (MOSI) MSB LSB SERIAL DATA OUTPUT (MISO) MSB LSB SERIAL CLOCK INPUT (SCK) SAMPLE Table 25-11. Serial Programming Characteristics, TA = -40 ... +85C, VCC = 1.7 - 5.5V Symbol 1/tCLCL tCLCL Parameter Min Oscillator Frequency Typ Max Units 4 MHz 0 Oscillator Period 250 ns 1/tCLCL Oscillator Freq. (VCC = 4.5V - 5.5V) 0 tCLCL Oscillator Period (VCC = 4.5V - 5.5V) 62.5 ns tSHSL SCK Pulse Width High 2 tCLCL(1) ns tSLSH SCK Pulse Width Low 2 tCLCL(1) ns tOVSH MOSI Setup to SCK High tCLCL ns tSHOX MOSI Hold after SCK High 2 tCLCL ns Note: 1. 16 MHz 2 tCLCL for fck < 12MHz, 3 tCLCL for fck >= 12 MHz 25.1.10 High-Voltage Serial Programming Characteristics Figure 25-6. High-voltage Serial Programming Timing SDI (PA6), SII (PA5) tIVSH SCI (PB0) tSHIX tSLSH tSHSL SDO (PA4) tSHOV ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 244 Table 25-12. High-voltage Serial Programming Characteristics, TA = 25C, VCC = 5V Symbol Parameter Min Typ Max tSHSL SCI (PB0) Pulse Width High 125 ns tSLSH SCI (PB0) Pulse Width Low 125 ns tIVSH SDI (PA6), SII (PB1) Valid to SCI (PB0) High 50 ns tSHIX SDI (PA6), SII (PB1) Hold after SCI (PB0) High 50 ns tSHOV SCI (PB0) High to SDO (PA4) Valid 16 ns tWLWH_PFB Wait after Instr. 3 for Write Fuse Bits 2.5 ms ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 Units 245 25.2 ATtiny841 25.2.1 Absolute Maximum Ratings* Operating Temperature . . . . . . . . . . . -55C to +125C *Notice: Stresses beyond those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Storage Temperature . . . . . . . . . . . . . -65C to +150C Voltage on any Pin except RESET with respect to Ground. . . . . . . . . . -0.5V to VCC+0.5V Voltage on RESET with respect to Ground-0.5V to +13.0V Maximum Operating Voltage . . . . . . . . . . . . . . . . 6.0V DC Current per I/O Pin. . . . . . . . . . . . . . . . . . 40.0 mA DC Current VCC and GND Pins . . . . . . . . . . 200.0 mA 25.2.2 DC Characteristics Table 25-13. DC Characteristics. TA = -40 to +85C Symbol Parameter Condition Min VIL Input Low Voltage(12) VCC = 1.7V - 2.4V VCC = 2.4V - 5.5V Input High-voltage Except RESET pin(12) Input High-voltage RESET pin(12) VIH Max Units -0.5 0.2VCC(3) 0.3VCC(3) V VCC = 1.7V - 2.4V VCC = 2.4V - 5.5V 0.7VCC(2) 0.6VCC(2) VCC +0.5 V VCC = 1.7V to 5.5V 0.9VCC(2) VCC +0.5 V VCC = 5V, IOL = 2 mA (5) (4) Output Low Voltage RESET pin as I/O (6)(12) Output Low Voltage Standard (7) Sink I/O (4) (5) Output Low Voltage (4) High (8) Sink I/O Pin 0.5 VCC = 1.8V, IOL = 0.4mA(5) 0.4 VCC = 5V, IOL = 10 mA (5) 0.6 VCC = 3V, IOL = 5 mA (5) 0.5 (5) 0.4 VCC = 5V, IOL = 20 mA (5) 0.6 VCC = 3V, IOL = 10 mA(5) 0.5 VCC = 1.8V, IOL = 4mA (5) 0.4 (5) 0.6 VCC = 5V, IOL = 20 mA (4) Output Low Voltage Extra High (8) Sink I/O 0.6 VCC = 3V, IOL = 1 mA VCC = 1.8V, IOL = 2mA VOL Typ (1) V VCC = 3V, IOL = 20 mA(5) 0.6 VCC = 1.8V, IOL = 8mA (5) 0.5 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 246 Symbol Parameter Condition VCC = 5V, IOH = -10 mA (4) VOH Output High-voltage Except RESET pin(6) Typ (1) Min (5) Max Units 4.3 VCC = 3V, IOH = -5 mA (5) 2.5 VCC = 1.8V, IOH = -2 mA (5) 1.4 V ILIL Input Leakage Current, I/O Pin (absolute value) VCC = 5.5V, pin low <0.05 1 A ILIH Input Leakage Current, I/O Pin (absolute value) VCC = 5.5V, pin high <0.05 1 A ILIAC Input Leakage Current, Analog Comparator VCC = 5V VIN = VCC/2 -50 50 nA RRST Reset Pull-up Resistor VCC = 5.5V, input low 30 60 k RPU I/O Pin Pull-up Resistor VCC = 5.5V, input low 20 50 k Power Supply Current(10) ICC Power-down mode(11) Active 1 MHz, VCC = 2V 0.23 0.6 mA Active 4 MHz, VCC = 3V 1.25 2 mA Active 8 MHz, VCC = 5V 4.2 6 mA Idle 1 MHz, VCC = 2V 0.03 0.2 mA Idle 4 MHz, VCC = 3V 0.22 0.6 mA Idle 8 MHz, VCC = 5V 0.94 1.5 mA WDT enabled, VCC = 3V 1.52 4 A WDT disabled, VCC = 3V 0.17 2 A Notes: 1. Typical values at 25C. 2. "Min" means the lowest value where the pin is guaranteed to be read as high. 3. "Max" means the highest value where the pin is guaranteed to be read as low. 4. Under steady-state (non-transient) conditions I/O ports can sink/source more current than the test conditions, however, the sum current of PORTA and PORTB must not exceed 100mA. VOL/VOH is not guaranteed to meet specifications if pin or port currents exceed the limits given. 5. Pins are not guaranteed to sink/source currents greater than those listed at the given supply voltage. 6. The RESET pin must tolerate high voltages when entering and operating in programming modes and, as a consequence, has a weak drive strength as compared to regular I/O pins. See Figure 26-58, Figure 26-59, Figure 26-60, Figure 26-64, Figure 26-65 and Figure 26-66. 7. Ports with standard sink strength: PORTA6, PORTA[4:0], PORTB[2:0] 8. Ports with high sink strength: PORTA7, PORTA5 9. Ports with extra high sink strength: PORTA7 (when PHDEA1 set), PORTA5 (when PHDEA0 set) 10. Results obtained using external clock and methods described in "Minimizing Power Consumption" on page 37. Power reduction fully enabled (PRR = 0xFF) and with no I/O drive. 11. BOD Disabled. 12. These parameters are not tested in production. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 247 25.2.3 Speed The maximum operating frequency of the device is dependent on supply voltage, VCC. The relationship between supply voltage and maximum operating frequency is piecewise linear, as shown in Figure 25-1. Figure 25-7. Maximum Operating Frequency vs. Supply Voltage 16 MHz 10 MHz 4 MHz 2 MHz 1.7V 1.8V 2.7V 4.5V 5.5V 25.2.4 Clock Characteristics 25.2.4.1 Accuracy of Calibrated Internal Oscillator It is possible to manually calibrate the internal oscillator to be more accurate than default factory calibration. Note that the oscillator frequency depends on temperature and voltage. Voltage and temperature characteristics can be found in "Internal Oscillator Speed" on page 292. Table 25-14. Calibration Accuracy of Internal 8MHz Oscillator Target Frequency VCC Temperature Accuracy at given Voltage & Temperature Factory Calibration 8.0 MHz 2.7V - 4.0V 0C - 85C 2% User Calibration Fixed freq. within: 7.3 - 8.1 MHz Fixed voltage within: 1.7V - 5.5V Fixed temp. within: -40C to +85C 1%(1) Calibration Method Notes: 1. Accuracy of oscillator frequency at calibration point (fixed temperature and fixed voltage). 25.2.4.2 Accuracy of Calibrated 32kHz Oscillator It is possible to manually calibrate the internal 32kHz oscillator to be more accurate than default factory calibration. Note that the oscillator frequency depends on temperature and voltage. Voltage and temperature characteristics can be found in " ULP 32kHz Oscillator" on page 293. Table 25-15. Calibration Accuracy of Internal 32kHz Oscillator Calibration Method Factory Calibration Target Frequency VCC Temperature Accuracy 32kHz 1.7 - 5.5V -40C to +85C 30% ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 248 25.2.4.3 External Clock Drive Figure 25-8. External Clock Drive Waveform V IH1 V IL1 Table 25-16. External Clock Drive Characteristics VCC = 1.8 - 5.5V VCC = 2.7 - 5.5V VCC = 4.5 - 5.5V Symbol Parameter Min Max Min Max Min Max Units 1/tCLCL Clock Frequency 0 4 0 8 0 12 MHz tCLCL Clock Period 250 125 83 ns tCHCX High Time 100 40 20 ns tCLCX Low Time 100 40 20 ns tCLCH Rise Time 2.0 1.6 0.5 s tCHCL Fall Time 2.0 1.6 0.5 s tCLCL Change in period from one clock cycle to the next 2 2 2 % 25.2.5 System and Reset Characteristics Table 25-17. Reset and Internal Voltage Characteristics Symbol Parameter Condition VRST RESET Pin Threshold Voltage VBG Internal bandgap voltage VCC = 3.3V, TA = 25C Internal 1.1V reference voltage VREF Min(1) Typ(1) 0.2 VCC Max(1) Units 0.9VCC V 1.0 1.1 1.2 V VCC=1.7V to 5.5V at TA=-40C to 85C 1.067 1.1 1.133 V Internal 2.2V reference voltage VCC=2.3V to 5.5V at TA=-40C to 85C 2.134 2.2 2.266 V Internal 4.096V reference voltage VCC=4.2V to 5.5V at TA=-40C to 85C 3.932 4.096 4.260 V ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 249 Symbol Parameter Condition tRST Minimum pulse width on RESET Pin VCC = 1.8V VCC = 3V VCC = 5V tTOUT Time-out after reset Note: 1. Min(1) Typ(1) Max(1) Units 2000 700 400 ns BOD disabled 64 128 BOD enabled 128 256 Min(1) Typ(1) Max(1) Units 1.1 1.4 1.6 V 0.6 1.3 1.6 V ms Values are guidelines only. 25.2.5.1 Power-On Reset Table 25-18. Characteristics of Enhanced Power-On Reset. TA = -40 ... +85C Symbol VPOR Parameter Release threshold of power-on reset (2) VPOA Activation threshold of power-on reset SRON Power-On Slope Rate Note: 1. (3) 0.01 V/ms Values are guidelines only. 2. Threshold where device is released from reset when voltage is rising 3. The Power-on Reset will not work unless the supply voltage has been below VPOA (falling) 25.2.5.2 Brown-Out Detection Table 25-19. VBOT vs. BODLEVEL Fuse Coding BODLEVEL[2:0] Fuses Min(1) Typ(1) Max(1) 11X 1.7 1.8 2.0 101 2.5 2.7 2.9 100 4.1 4.3 4.5 0XX Note: 1. Units V Reserved VBOT may be below nominal minimum operating voltage for some devices. For devices where this is the case, the device is tested down to VCC = VBOT during the production test. This guarantees that a Brown-out Reset will occur before VCC drops to a voltage where correct operation of the microcontroller is no longer guaranteed. 25.2.6 Analog Comparator Characteristics Table 25-20. Analog Comparator Characteristics, TA = -40 ... +85C Symbol Parameter Condition VAIO Input Offset Voltage VCC = 5V, VIN = VCC / 2 ILAC Input Leakage Current VCC = 5V, VIN = VCC / 2 Min -50 Typ Max Units < 10 40 mV 50 nA ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 250 Symbol Parameter Condition Analog Propagation Delay (from saturation to slight overdrive) VCC = 2.7V 750 VCC = 4.0V 500 Analog Propagation Delay (large step change) VCC = 2.7V 100 VCC = 4.0V 75 Digital Propagation Delay VCC = 1.7V - 5.5 1 tAPD tDPD Min Typ Max Units ns 2 CLK 25.2.7 ADC Characteristics Table 25-21. ADC Characteristics. TA = -40 ... +85C. VCC = 1.7 - 5.5V Symbol Parameter Condition Min Typ Resolution Absolute accuracy (Including INL, DNL, and Quantization, Gain and Offset Errors) RAIN Units 10 Bits VREF = VCC = 4V, ADC clock = 200 kHz 2 LSB VREF = VCC = 4V, ADC clock = 1 MHz 3 LSB VREF = VCC = 4V, ADC clock = 200 kHz Noise Reduction Mode 1.5 LSB VREF = VCC = 4V, ADC clock = 1 MHz Noise Reduction Mode 2.5 LSB Integral Non-Linearity (INL, accuracy after offset and gain calibration) VREF = VCC = 4V, ADC clock = 200 kHz 1 LSB Differential Non-linearity (DNL) VREF = VCC = 4V, ADC clock = 200 kHz 0.5 LSB Gain Error VREF = VCC = 4V, ADC clock = 200 kHz 2.5 LSB Offset Error VREF = VCC = 4V, ADC clock = 200 kHz 1.5 LSB Conversion Time Free Running Conversion Clock Frequency VIN Max Input Voltage 13 260 s 50 1000 kHz GND VREF V Input Bandwidth 38.5 kHz Analog Input Resistance 100 M ADC Conversion Output 0 1023 LSB ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 251 25.2.8 Two-Wire Serial Interface Characteristics The following data is based on simulations and characterizations. Parameters listed in Table 25-10 are not tested in production. Symbols refer to Figure 25-3. Table 25-22. Two-Wire Serial Interface Characteristics Symbol Parameter VIL Input Low voltage VIH Input High voltage VHYS Hysteresis of Schmitt-trigger inputs Condition Min Max Unit TWHNM = 0 -0.5 0.3 VCC V TWHNM = 1 -0.5 0.4VCC V TWHNM = 0 0.7 VCC VCC + 0.5 V TWHNM = 1 0.5VCC VCC + 0.5 V TWHNM = 0, VCC > 2.7V 0.05 VCC - V TWHNM = 0, VCC < 2.7V 0 TWHNM = 1, VCC > 2.7V 0.31 0.45 V TWHNM = 1, VCC < 2.7V 0.39 1.09 V IOL = 3mA, VCC > 2.7V 0 0.4 V IOL = 2mA, VCC < 2.7V 0 0.4 V TWHNM = 0 0 400 kHz TWHNM = 1 0 400 kHz 0 50 ns V VOL Output Low voltage fSCL SCL clock frequency (1) tSP Spikes suppressed by input filter tHD:STA Hold time (repeated) START Condition 0.6 - s tLOW Low period of SCL clock 1.3 - s tHIGH High period of SCL clock 0.6 - s tSU:STA Set-up time for repeated START condition 0.6 - s tHD:DAT Data hold time 0 0.9 s tSU:DAT Data setup time 100 - ns tSU:STO Setup time for STOP condition 0.6 - s tBUF Bus free time between STOP and START 1.3 - s Notes: 1. fCK = CPU clock frequency. Figure 25-9. Two-Wire Serial Bus Timing tOF tHIGH tLOW SCL tSU:STA tHD:STA tR tLOW tHD:DAT tSU:DAT tSU:STO SDA tBUF ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 252 25.2.9 Serial Programming Characteristics Figure 25-10.Serial Programming Timing MOSI SCK tSLSH tSHOX tOVSH tSHSL MISO Figure 25-11.Serial Programming Waveform SERIAL DATA INPUT (MOSI) MSB LSB SERIAL DATA OUTPUT (MISO) MSB LSB SERIAL CLOCK INPUT (SCK) SAMPLE Table 25-23. Serial Programming Characteristics, TA = -40 ... +85C, VCC = 1.7 - 5.5V Symbol 1/tCLCL tCLCL Parameter Oscillator Frequency Oscillator Period Min Typ 0 Max Units 4 MHz 250 1/tCLCL Oscillator Freq. (VCC = 4.5V - 5.5V) 0 tCLCL Oscillator Period (VCC = 4.5V - 5.5V) 62.5 ns 16 MHz ns (1) ns tSHSL SCK Pulse Width High 2 tCLCL tSLSH SCK Pulse Width Low 2 tCLCL(1) ns tOVSH MOSI Setup to SCK High tCLCL ns tSHOX MOSI Hold after SCK High 2 tCLCL ns Note: 1. 2 tCLCL for fck < 12MHz, 3 tCLCL for fck >= 12 MHz ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 253 25.2.10 High-Voltage Serial Programming Characteristics Figure 25-12.High-voltage Serial Programming Timing SDI (PA6), SII (PA5) tIVSH SCI (PB0) tSHIX tSLSH tSHSL SDO (PA4) tSHOV Table 25-24. High-voltage Serial Programming Characteristics, TA = 25C, VCC = 5V Symbol Parameter Min Typ Max tSHSL SCI (PB0) Pulse Width High 125 ns tSLSH SCI (PB0) Pulse Width Low 125 ns tIVSH SDI (PA6), SII (PB1) Valid to SCI (PB0) High 50 ns tSHIX SDI (PA6), SII (PB1) Hold after SCI (PB0) High 50 ns tSHOV SCI (PB0) High to SDO (PA4) Valid 16 ns tWLWH_PFB Wait after Instr. 3 for Write Fuse Bits 2.5 ms ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 Units 254 26. Typical Characteristics 26.1 ATtiny441 26.1.1 Current Consumption 26.1.1.1 Active Mode Figure 26-1. Active Supply Current vs. Low Frequency (0.1 - 1.0MHz) 1200 1000 5.5 5.0 800 ICC [uA] 4.5 600 3.3 2.7 400 1.8 1.7 200 0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Frequency [MHz] Figure 26-2. Active Supply Current vs. Frequency (1 - 16MHz) 12 10 5.5 Icc [mA] 8 5.0 4.5 6 3.3 2.7 4 1.8 2 1.7 0 0 2 4 6 8 10 12 14 16 Frequency [MHz] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 255 Figure 26-3. Active Supply Current vs. VCC, Internal 8MHz RC Oscillator 6 5 ICC [mA] 4 105 3 85 2 25 0 1 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-4. Active Supply Current vs. VCC, Internal ULP 32kHz Oscillator 35 30 ICC [uA] 25 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 256 Figure 26-5. Active Supply Current vs. VCC, Internal ULP 64kHz Oscillator 70 60 ICC [uA] 50 40 105 30 85 20 25 0 10 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-6. Active Supply Current vs. VCC, Internal ULP 128kHz Oscillator 120 100 ICC [uA] 80 105 60 85 40 25 0 20 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 257 Figure 26-7. Active Supply Current vs. VCC, Internal ULP 256kHz Oscillator 250 ICC [uA] 200 150 105 85 100 25 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-8. Active Supply Current vs. VCC, Internal ULP 512kHz Oscillator 450 400 350 ICC [uA] 300 250 105 200 85 150 25 100 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 258 26.1.1.2 Idle Mode Figure 26-9. Idle Supply Current vs. Low Frequency, (0.1 - 1.0MHz) Icc [uA] 160 140 5.5 120 5.0 100 4.5 80 3.3 2.7 60 1.8 40 1.7 20 0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Frequency [MHz] Figure 26-10.Idle Supply Current vs. Frequency (1 - 16MHz) 3.0 2.5 5.5 ICC [mA] 2.0 5.0 4.5 1.5 3.3 1.0 2.7 1.8 0.5 1.7 0.0 0 2 4 6 8 10 12 14 16 Frequency [MHz] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 259 Figure 26-11.Idle Supply Current vs. VCC, Internal 8MHz RC Oscillator 1.4 1.2 ICC [mA] 1.0 0.8 105 0.6 85 0.4 25 0 0.2 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-12.Idle Supply Current vs. VCC, Internal ULP 32kHz Oscillator 35 30 ICC [uA] 25 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 260 Figure 26-13.Idle Supply Current vs. VCC, Internal ULP 64kHz Oscillator 14 12 ICC [uA] 10 8 105 6 85 4 25 0 2 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-14.Idle Supply Current vs. VCC, Internal ULP 128kHz Oscillator 20 18 16 ICC [uA] 14 12 10 105 8 85 6 25 4 0 2 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 261 Figure 26-15.Idle Supply Current vs. VCC, Internal ULP 256kHz Oscillator 35 30 ICC [uA] 25 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-16.Idle Supply Current vs. VCC, Internal ULP 512kHz Oscillator 70 60 ICC [uA] 50 40 105 30 85 20 25 0 10 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 262 26.1.1.3 Standby Mode Figure 26-17.Standby Supply Current vs. VCC, Watchdog Timer Disabled 300 250 ICC [uA] 200 105 150 85 100 25 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-18.IStandby Supply Current vs. VCC, Watchdog Timer Enabled 300 250 ICC [uA] 200 105 150 85 100 25 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 263 26.1.1.4 Power-down Mode Figure 26-19.Power-down Supply Current vs. VCC, Watchdog Timer Disabled 2.5 ICC [uA] 2.0 1.5 105 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 Vcc [V] Figure 26-20.Power-down Supply Current vs. VCC, Watchdog Timer Enabled 6 5 ICC [uA] 4 105 3 85 2 25 0 1 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 264 26.1.1.5 Reset and Reset Pulse Width Figure 26-21.Reset Supply Current vs. VCC, Excluding Current through the Reset Pull-up 0.9 0.8 0.7 ICC [mA] 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 Vcc [V] Figure 26-22.Minimum Reset Pulse Width vs. VCC 3000 Pulsewidth [ns] 2500 2000 105 1500 85 1000 25 0 500 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 265 26.1.1.6 BOD - Brownout Detector Figure 26-23.Brownout Detector Current vs. VCC 30 Icc [uA] 25 20 105 85 15 25 0 10 -40 5 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] 26.1.1.7 Peripheral Units Figure 26-24.Analog Comparator 0 (AC0) Current Consumption vs. VCC, Frequency = 1MHz 200 180 160 ICC [uA] 140 120 100 105 80 85 60 25 40 0 20 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 266 Figure 26-25.Analog Comparator 1 (AC1) Current Consumption vs. VCC, Frequency = 1MHz 200 180 160 ICC [uA] 140 120 100 105 80 85 60 25 40 0 20 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-26.ADC Current Consumption vs. VCC 0.450 0.400 0.350 ICC [mA] 0.300 0.250 105 0.200 85 0.150 25 0.100 0 0.050 -40 0.000 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 267 Figure 26-27.ISPI Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-28.Timer/Counter 0 (TC0) Current Consumption vs. VCC 18 16 14 ICC [uA] 12 10 105 8 85 6 25 4 0 2 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 268 Figure 26-29.Timer/Counter 1 (TC1) Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-30.Timer/Counter 2 (TC2) Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 269 Figure 26-31.Two-Wire Interface (TWI) Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-32.USART0 Current Consumption vs. VCC 25 ICC [uA] 20 15 105 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 270 Figure 26-33.USART1 Current Consumption vs. VCC 25 ICC [uA] 20 15 105 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] 26.1.2 Pull-up Resistor Current 26.1.2.1 I/O Pin Pull-Up Resistor Current Figure 26-34.I/O Pin Pull-Up Resistor Current vs. Input Voltage, VCC = 1.8V 60 50 IOP [uA] 40 105 30 85 20 25 0 10 -40 0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 VOP [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 271 Figure 26-35.I/O Pin Pull-Up Resistor Current vs. Input Voltage, VCC = 2.7V 80 70 60 IOP [uA] 50 40 105 30 85 25 20 0 10 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 VOP [V] Figure 26-36.I/O Pin Pull-Up Resistor Current vs. Input Voltage, VCC = 5.0V 160 140 120 IOP [uA] 100 80 105 60 85 25 40 0 20 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 VOP [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 272 26.1.2.2 Reset Pull-Up Resistor Current Figure 26-37.Reset Pull-Up Resistor Current vs. Reset Pin Voltage, VCC = 1.8V 40 35 IRESET [uA] 30 25 20 105 15 85 25 10 0 5 -40 0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 VRESET [V] Figure 26-38.Reset Pull-Up Resistor Current vs. Reset Pin Voltage, VCC = 2.7V 70 60 IRESET [uA] 50 40 105 30 85 20 25 0 10 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 VRESET [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 273 Figure 26-39.Reset Pull-Up Resistor Current vs. Reset Pin Voltage, VCC = 5.0V 120 100 IRESET [uA] 80 105 60 85 40 25 0 20 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 VRESET [V] 26.1.3 Input Threshold and Hysteresis 26.1.3.1 I/O Pin Figure 26-40.I/O Pin Input Threshold Voltage vs. VCC , VIH I/O Pin Read as "1" 3.5 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 274 Figure 26-41.I/O Pin Input Threshold Voltage vs. VCC , VIL I/O Pin Read as "0" 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-42.II/O Pin Input Hysteresis vs. VCC 0.7 0.6 Hysteresis [V] 0.5 0.4 105 0.3 85 0.2 25 0 0.1 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 275 26.1.3.2 Reset Pin as I/O Figure 26-43.Reset as I/O Input Threshold Voltage vs. VCC , VIH I/O Pin Read as "1" 3.5 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-44.Reset as I/O Input Threshold Voltage vs. VCC , VIL I/O Pin Read as "0" 2.5 Threshold [V] 2.0 1.5 105 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 276 Figure 26-45.Reset Pin as I/O Input Hysteresis vs. VCC 0.9 0.8 Hysteresis [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] 26.1.3.3 Reset Pin Figure 26-46.Reset Input Threshold Voltage vs. VCC , VIH I/O Pin Read as "1" 3.5 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 277 Figure 26-47.Reset Input Threshold Voltage vs. VCC , VIL I/O Pin Read as "0" 2.5 Threshold [V] 2.0 1.5 105 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-48.Reset Input Hysteresis vs. VCC 0.7 0.6 Hysteresis [V] 0.5 0.4 105 0.3 85 0.2 25 0 0.1 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 278 26.1.4 Output Driver Strength 26.1.4.1 Sink Current Figure 26-49.I/O Pin Output Voltage vs. Sink Current, Standard Sink I/O pins, VCC=1.8V 1.0 0.9 0.8 VOL [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 IOL [mA] Figure 26-50.I/O Pin Output Voltage vs. Sink Current, Standard Sink I/O pins, VCC=3.0V 1.0 0.9 0.8 VOL [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 279 Figure 26-51.I/O Pin Output Voltage vs. Sink Current, Standard Sink I/O pins, VCC=5.0V 1.0 0.9 0.8 VOL [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] Figure 26-52.I/O Pin Output Voltage vs. Sink Current, High Sink I/O pins, VCC=1.8V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 280 Figure 26-53.I/O Pin Output Voltage vs. Sink Current, High Sink I/O pins, VCC=3.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 IOL [mA] Figure 26-54.I/O Pin Output Voltage vs. Sink Current, High Sink I/O pins, VCC=5.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 281 Figure 26-55.I/O Pin Output Voltage vs. Sink Current, Extra High Sink I/O pins, VCC=1.8V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOL [mA] Figure 26-56.I/O Pin Output Voltage vs. Sink Current, Extra High Sink I/O pins, VCC=3.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 282 Figure 26-57.I/O Pin Output Voltage vs. Sink Current, Extra High Sink I/O pins, VCC=5.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] Figure 26-58.Reset as I/O Pin Output Voltage vs. Sink Current, VCC=1.8V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 283 Figure 26-59.Reset as I/O Pin Output Voltage vs. Sink Current, VCC=3.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 IOL [mA] Figure 26-60.Reset as I/O Pin Output Voltage vs. Sink Current, VCC=5.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 284 26.1.4.2 Source Current Figure 26-61.I/O Pin Output Voltage vs. Source Current, VCC=1.8V 2.0 1.8 1.6 VOH [V] 1.4 1.2 1.0 105 0.8 85 0.6 25 0.4 0 0.2 -40 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 IOH [mA] Figure 26-62.I/O Pin Output Voltage vs. Source Current, VCC=3.0V 3.5 3.0 VOH [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOH [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 285 Figure 26-63.I/O Pin Output Voltage vs. Source Current, VCC=5.0V 5.1 5.0 4.9 VOH [V] 4.8 4.7 4.6 105 4.5 85 4.4 25 4.3 0 4.2 -40 4.1 0 2 4 6 8 10 12 14 16 18 20 IOH [mA] Figure 26-64.Reset as I/O Pin Output Voltage vs. Source Current, VCC=1.8V 1.6 1.4 1.2 VOH [V] 1.0 0.8 105 0.6 85 25 0.4 0 0.2 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 IOH [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 286 Figure 26-65.Reset as I/O Pin Output Voltage vs. Source Current, VCC=3.0V 3.0 2.5 VOH [V] 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 IOH [mA] Figure 26-66.Reset as I/O Pin Output Voltage vs. Source Current, VCC=5.0V 4.5 4.0 3.5 VOH [V] 3.0 2.5 105 2.0 85 1.5 25 1.0 0 0.5 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 IOH [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 287 26.1.5 BOD - Brown-out Detector Figure 26-67.BOD Threshold vs. Temperature, BOD Level = 1.8V 1.90 Threshold [V] 1.89 1.88 1.87 1 1.86 0 1.85 1.84 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-68.BOD Threshold vs. Temperature, BOD Level BOD= 2.7V 2.7V 2.80 Threshold [V] 2.78 2.76 2.74 1 2.72 0 2.70 2.68 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 288 Figure 26-69.BOD Threshold vs. Temperature, BOD Level = 4.3V 4.36 4.34 Threshold [V] 4.32 4.3 4.28 1 4.26 0 4.24 4.22 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] 26.1.6 Bandgap Voltage Figure 26-70.Bandgap Voltage vs. Operating Voltage, Internal Voltage Reference = 1.1V 1.115 Vref [V] 1.110 1.105 105 85 1.100 25 0 1.095 -40 1.090 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 Vcc [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 289 Figure 26-71.Bandgap Voltage vs. Operating Voltage, Internal Voltage Reference = 2.2V 2.206 2.204 2.202 Vref [V] 2.200 2.198 105 2.196 85 25 2.194 0 2.192 -40 2.190 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 Vcc [V] Figure 26-72.Bandgap Voltage vs. Operating Voltage, Internal Voltage Reference = 4.096V 4.095 Vref [V] 4.090 4.085 105 85 4.080 25 0 4.075 -40 4.070 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 5.1 5.2 5.3 5.4 5.5 Vcc [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 290 26.1.7 Analog Comparator Offset Figure 26-73.Analog Comparator Offset vs. Input Pin Voltage, Offset -, VCC = 5.0V 0 -2 Offset- [mV] -4 -6 105 -8 85 -10 25 0 -12 -40 -14 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 Vin [V] Figure 26-74.Analog Comparator Offset vs. Input Pin Voltage, Offset +, VCC = 5.0V 11 10 Offset [mV] 9 8 105 7 85 6 25 5 0 -40 4 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 Vin [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 291 26.1.8 Internal Oscillator Speed 26.1.8.1 Internal 8MHz RC Oscillator Figure 26-75. Calibrated Internal 8MHz RC Oscillator, Frequency vs. Operating Voltage 8.5 8.4 Frequency [MHz] 8.3 8.2 8.1 105 8.0 85 25 7.9 0 7.8 -40 7.7 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] Figure 26-76. Calibrated Internal 8MHz RC Oscillator, Frequency vs. Operating Temperature Frequency [MHz] 8.5 8.4 5.5 8.3 5.0 4.5 8.2 3.3 8.1 2.7 8.0 1.8 7.9 1.7 7.8 7.7 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 292 Figure 26-77. Internal 8MHz RC Oscillator Frequency vs. OSCCAL0 18 16 Frequency [MHz] 14 12 10 105 8 85 6 25 4 0 2 -40 0 0 15 30 45 60 75 90 105 120 135 150 165 180 195 210 225 240 255 OSCCAL 26.1.8.2 ULP 32kHz Oscillator Figure 26-78. ULP 32kHz Oscillator, Frequency vs. Operating Voltage 32 Frequency [KHz] 31 105 30 85 29 25 0 28 -40 27 26 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 293 Figure 26-79. ULP 32kHz Oscillator, Frequency vs. Operating Temperature 30.5 30.0 Frequency [KHz] 29.5 29.0 5.5 28.5 5.0 28.0 4.5 27.5 3.3 2.7 27.0 1.8 26.5 1.7 26.0 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-80. ULP 32kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 50 45 Frequency [KHz] 40 35 105 30 85 25 25 0 20 -40 15 0 1 2 3 OSCCAL ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 294 26.1.8.3 ULP 64kHz Oscillator Figure 26-81. ULP 64kHz Oscillator, Frequency vs. Operating Voltage 60 58 Frequency [KHz] 105 56 85 25 54 0 52 -40 50 48 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] Figure 26-82. ULP 64kHz Oscillator, Frequency vs. Operating Temperature 58 57 Frequency [KHz] 56 55 5.5 54 5.0 53 4.5 52 3.3 51 2.7 1.8 50 1.7 49 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 295 Figure 26-83. ULP 64kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 90 80 Frequency [KHz] 70 60 50 105 40 85 30 25 20 0 10 -40 0 0 1 2 3 OSCCAL 26.1.8.4 ULP 128kHz Oscillator Figure 26-84. ULP 128kHz Oscillator, Frequency vs. Operating Voltage 115 110 Frequency [KHz] 105 105 85 100 25 0 95 -40 90 85 80 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 296 Figure 26-85. ULP 128kHz Oscillator, Frequency vs. Operating Temperature 108 106 Frequency [KHz] 104 102 5.5 100 5.0 98 4.5 96 3.3 94 2.7 92 1.8 1.7 90 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-86. ULP 128kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 160 140 Frequency [KHz] 120 100 80 105 60 85 25 40 0 20 -40 0 0 1 2 3 OSCCAL ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 297 26.1.8.5 ULP 256kHz Oscillator Figure 26-87. ULP 256kHz Oscillator, Frequency vs. Operating Voltage 210 Frequency [KHz] 205 200 105 195 85 190 25 0 185 -40 180 175 170 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] Figure 26-88. ULP 256kHz Oscillator, Frequency vs. Operating Temperature 210 205 Frequency [KHz] 200 5.5 5.0 195 4.5 190 3.3 185 2.7 180 1.8 1.7 175 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 298 Figure 26-89. ULP 256kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 300 Frequency [KHz] 250 200 105 150 85 100 25 0 50 -40 0 0 1 2 3 OSCCAL 26.1.8.6 ULP 512kHz Oscillator Figure 26-90. ULP 512kHz Oscillator, Frequency vs. Operating Voltage 420 Frequency [KHz] 410 400 105 85 390 25 380 0 -40 370 360 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 299 Figure 26-91. ULP 512kHz Oscillator, Frequency vs. Operating Temperature 420 Frequency [KHz] 410 5.5 400 5.0 390 4.5 3.3 380 2.7 1.8 370 1.7 360 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-92. ULP 512kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 600 550 Frequency [KHz] 500 450 400 105 350 85 25 300 0 250 -40 200 0 1 2 3 OSCCAL ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 300 26.2 ATtiny841 26.2.1 Current Consumption 26.2.1.1 Active Mode Figure 26-93.Active Supply Current vs. Low Frequency (0.1 - 1.0MHz) 1200 1000 5.5 5.0 800 ICC [uA] 4.5 600 3.3 2.7 400 1.8 1.7 200 0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Frequency [MHz] Figure 26-94.Active Supply Current vs. Frequency (1 - 16MHz) 12 10 5.5 Icc [mA] 8 5.0 4.5 6 3.3 2.7 4 1.8 2 1.7 0 0 2 4 6 8 10 12 14 16 Frequency [MHz] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 301 Figure 26-95.Active Supply Current vs. VCC, Internal 8MHz RC Oscillator 6 5 ICC [mA] 4 105 3 85 2 25 0 1 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-96.Active Supply Current vs. VCC, Internal ULP 32kHz Oscillator 35 30 ICC [uA] 25 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 302 Figure 26-97.Active Supply Current vs. VCC, Internal ULP 64kHz Oscillator 70 60 ICC [uA] 50 40 105 30 85 20 25 0 10 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-98.Active Supply Current vs. VCC, Internal ULP 128kHz Oscillator 120 100 ICC [uA] 80 105 60 85 40 25 0 20 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 303 Figure 26-99.Active Supply Current vs. VCC, Internal ULP 256kHz Oscillator 250 ICC [uA] 200 150 105 85 100 25 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-100.Active Supply Current vs. VCC, Internal ULP 512kHz Oscillator 450 400 350 ICC [uA] 300 250 105 200 85 150 25 100 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 304 26.2.1.2 Idle Mode Figure 26-101.Idle Supply Current vs. Low Frequency, (0.1 - 1.0MHz) Icc [uA] 160 140 5.5 120 5.0 100 4.5 80 3.3 2.7 60 1.8 40 1.7 20 0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Frequency [MHz] Figure 26-102.Idle Supply Current vs. Frequency (1 - 16MHz) 3.0 2.5 5.5 ICC [mA] 2.0 5.0 4.5 1.5 3.3 1.0 2.7 1.8 0.5 1.7 0.0 0 2 4 6 8 10 12 14 16 Frequency [MHz] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 305 Figure 26-103.Idle Supply Current vs. VCC, Internal 8MHz RC Oscillator 1.4 1.2 ICC [mA] 1.0 0.8 105 0.6 85 0.4 25 0 0.2 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-104.Idle Supply Current vs. VCC, Internal ULP 32kHz Oscillator 35 30 ICC [uA] 25 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 306 Figure 26-105.Idle Supply Current vs. VCC, Internal ULP 64kHz Oscillator 14 12 ICC [uA] 10 8 105 6 85 4 25 0 2 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-106.Idle Supply Current vs. VCC, Internal ULP 128kHz Oscillator 20 18 16 ICC [uA] 14 12 10 105 8 85 6 25 4 0 2 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 307 Figure 26-107.Idle Supply Current vs. VCC, Internal ULP 256kHz Oscillator 35 30 ICC [uA] 25 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-108.Idle Supply Current vs. VCC, Internal ULP 512kHz Oscillator 70 60 ICC [uA] 50 40 105 30 85 20 25 0 10 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 308 26.2.1.3 Standby Mode Figure 26-109.Standby Supply Current vs. VCC, Watchdog Timer Disabled 300 250 ICC [uA] 200 105 150 85 100 25 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-110.IStandby Supply Current vs. VCC, Watchdog Timer Enabled 300 250 ICC [uA] 200 105 150 85 100 25 0 50 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 309 26.2.1.4 Power-down Mode Figure 26-111.Power-down Supply Current vs. VCC, Watchdog Timer Disabled 2.5 ICC [uA] 2.0 1.5 105 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 Vcc [V] Figure 26-112.Power-down Supply Current vs. VCC, Watchdog Timer Enabled 6 5 ICC [uA] 4 105 3 85 2 25 0 1 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 310 26.2.1.5 Reset and Reset Pulse Width Figure 26-113.Reset Supply Current vs. VCC, Excluding Current through the Reset Pull-up 0.9 0.8 0.7 ICC [mA] 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 Vcc [V] Figure 26-114.Minimum Reset Pulse Width vs. VCC 3000 Pulsewidth [ns] 2500 2000 105 1500 85 1000 25 0 500 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 311 26.2.1.6 BOD - Brownout Detector Figure 26-115.Brownout Detector Current vs. VCC 30 Icc [uA] 25 20 105 85 15 25 0 10 -40 5 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] 26.2.1.7 Peripheral Units Figure 26-116.Analog Comparator 0 (AC0) Current Consumption vs. VCC, Frequency = 1MHz 200 180 160 ICC [uA] 140 120 100 105 80 85 60 25 40 0 20 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 312 Figure 26-117.Analog Comparator 1 (AC1) Current Consumption vs. VCC, Frequency = 1MHz 200 180 160 ICC [uA] 140 120 100 105 80 85 60 25 40 0 20 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-118.ADC Current Consumption vs. VCC 0.450 0.400 0.350 ICC [mA] 0.300 0.250 105 0.200 85 0.150 25 0.100 0 0.050 -40 0.000 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 313 Figure 26-119.ISPI Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-120.Timer/Counter 0 (TC0) Current Consumption vs. VCC 18 16 14 ICC [uA] 12 10 105 8 85 6 25 4 0 2 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 314 Figure 26-121.Timer/Counter 1 (TC1) Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-122.Timer/Counter 2 (TC2) Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 315 Figure 26-123.Two-Wire Interface (TWI) Current Consumption vs. VCC 30 25 ICC [uA] 20 105 15 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-124.USART0 Current Consumption vs. VCC 25 ICC [uA] 20 15 105 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 316 Figure 26-125.USART1 Current Consumption vs. VCC 25 ICC [uA] 20 15 105 85 10 25 0 5 -40 0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] 26.2.2 Pull-up Resistor Current 26.2.2.1 I/O Pin Pull-Up Resistor Current Figure 26-126.I/O Pin Pull-Up Resistor Current vs. Input Voltage, VCC = 1.8V 60 50 IOP [uA] 40 105 30 85 20 25 0 10 -40 0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 VOP [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 317 Figure 26-127.I/O Pin Pull-Up Resistor Current vs. Input Voltage, VCC = 2.7V 80 70 60 IOP [uA] 50 40 105 30 85 25 20 0 10 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 VOP [V] Figure 26-128.I/O Pin Pull-Up Resistor Current vs. Input Voltage, VCC = 5.0V 160 140 120 IOP [uA] 100 80 105 60 85 25 40 0 20 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 VOP [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 318 26.2.2.2 Reset Pull-Up Resistor Current Figure 26-129.Reset Pull-Up Resistor Current vs. Reset Pin Voltage, VCC = 1.8V 40 35 IRESET [uA] 30 25 20 105 15 85 25 10 0 5 -40 0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 VRESET [V] Figure 26-130.Reset Pull-Up Resistor Current vs. Reset Pin Voltage, VCC = 2.7V 70 60 IRESET [uA] 50 40 105 30 85 20 25 0 10 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 VRESET [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 319 Figure 26-131.Reset Pull-Up Resistor Current vs. Reset Pin Voltage, VCC = 5.0V 120 100 IRESET [uA] 80 105 60 85 40 25 0 20 -40 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 VRESET [V] 26.2.3 Input Threshold and Hysteresis 26.2.3.1 I/O Pin Figure 26-132.I/O Pin Input Threshold Voltage vs. VCC , VIH I/O Pin Read as "1" 3.5 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 320 Figure 26-133.I/O Pin Input Threshold Voltage vs. VCC , VIL I/O Pin Read as "0" 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-134.II/O Pin Input Hysteresis vs. VCC 0.7 0.6 Hysteresis [V] 0.5 0.4 105 0.3 85 0.2 25 0 0.1 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 321 26.2.3.2 Reset Pin as I/O Figure 26-135.Reset as I/O Input Threshold Voltage vs. VCC , VIH I/O Pin Read as "1" 3.5 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-136.Reset as I/O Input Threshold Voltage vs. VCC , VIL I/O Pin Read as "0" 2.5 Threshold [V] 2.0 1.5 105 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 322 Figure 26-137.Reset Pin as I/O Input Hysteresis vs. VCC 0.9 0.8 Hysteresis [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] 26.2.3.3 Reset Pin Figure 26-138.Reset Input Threshold Voltage vs. VCC , VIH I/O Pin Read as "1" 3.5 3.0 Threshold [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 323 Figure 26-139.Reset Input Threshold Voltage vs. VCC , VIL I/O Pin Read as "0" 2.5 Threshold [V] 2.0 1.5 105 85 1.0 25 0 0.5 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] Figure 26-140.Reset Input Hysteresis vs. VCC 0.7 0.6 Hysteresis [V] 0.5 0.4 105 0.3 85 0.2 25 0 0.1 -40 0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 324 26.2.4 Output Driver Strength 26.2.4.1 Sink Current Figure 26-141.I/O Pin Output Voltage vs. Sink Current, Standard Sink I/O pins, VCC=1.8V 1.0 0.9 0.8 VOL [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 IOL [mA] Figure 26-142.I/O Pin Output Voltage vs. Sink Current, Standard Sink I/O pins, VCC=3.0V 1.0 0.9 0.8 VOL [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 325 Figure 26-143.I/O Pin Output Voltage vs. Sink Current, Standard Sink I/O pins, VCC=5.0V 1.0 0.9 0.8 VOL [V] 0.7 0.6 0.5 105 0.4 85 0.3 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] Figure 26-144.I/O Pin Output Voltage vs. Sink Current, High Sink I/O pins, VCC=1.8V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 326 Figure 26-145.I/O Pin Output Voltage vs. Sink Current, High Sink I/O pins, VCC=3.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 IOL [mA] Figure 26-146.I/O Pin Output Voltage vs. Sink Current, High Sink I/O pins, VCC=5.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 327 Figure 26-147.I/O Pin Output Voltage vs. Sink Current, Extra High Sink I/O pins, VCC=1.8V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOL [mA] Figure 26-148.I/O Pin Output Voltage vs. Sink Current, Extra High Sink I/O pins, VCC=3.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 328 Figure 26-149.I/O Pin Output Voltage vs. Sink Current, Extra High Sink I/O pins, VCC=5.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0 2 4 6 8 10 12 14 16 18 20 IOL [mA] Figure 26-150.Reset as I/O Pin Output Voltage vs. Sink Current, VCC=1.8V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 329 Figure 26-151.Reset as I/O Pin Output Voltage vs. Sink Current, VCC=3.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 IOL [mA] Figure 26-152.Reset as I/O Pin Output Voltage vs. Sink Current, VCC=5.0V 0.8 0.7 0.6 VOL [V] 0.5 0.4 105 0.3 85 25 0.2 0 0.1 -40 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 IOL [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 330 26.2.4.2 Source Current Figure 26-153.I/O Pin Output Voltage vs. Source Current, VCC=1.8V 2.0 1.8 1.6 VOH [V] 1.4 1.2 1.0 105 0.8 85 0.6 25 0.4 0 0.2 -40 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 IOH [mA] Figure 26-154.I/O Pin Output Voltage vs. Source Current, VCC=3.0V 3.5 3.0 VOH [V] 2.5 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 0 1 2 3 4 5 6 7 8 9 10 IOH [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 331 Figure 26-155.I/O Pin Output Voltage vs. Source Current, VCC=5.0V 5.1 5.0 4.9 VOH [V] 4.8 4.7 4.6 105 4.5 85 4.4 25 4.3 0 4.2 -40 4.1 0 2 4 6 8 10 12 14 16 18 20 IOH [mA] Figure 26-156.Reset as I/O Pin Output Voltage vs. Source Current, VCC=1.8V 1.6 1.4 1.2 VOH [V] 1.0 0.8 105 0.6 85 25 0.4 0 0.2 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 IOH [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 332 Figure 26-157.Reset as I/O Pin Output Voltage vs. Source Current, VCC=3.0V 3.0 2.5 VOH [V] 2.0 105 1.5 85 1.0 25 0 0.5 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 IOH [mA] Figure 26-158.Reset as I/O Pin Output Voltage vs. Source Current, VCC=5.0V 4.5 4.0 3.5 VOH [V] 3.0 2.5 105 2.0 85 1.5 25 1.0 0 0.5 -40 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 IOH [mA] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 333 26.2.5 BOD - Brown-out Detector Figure 26-159.BOD Threshold vs. Temperature, BOD Level = 1.8V 1.90 Threshold [V] 1.89 1.88 1.87 1 1.86 0 1.85 1.84 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-160.BOD Threshold vs. Temperature, BOD Level 2.7V BOD =2.7V 2.80 Threshold [V] 2.78 2.76 2.74 1 2.72 0 2.70 2.68 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 334 Figure 26-161.BOD Threshold vs. Temperature, BOD Level = 4.3V 4.36 4.34 Threshold [V] 4.32 4.3 4.28 1 4.26 0 4.24 4.22 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] 26.2.6 Bandgap Voltage Figure 26-162.Bandgap Voltage vs. Operating Voltage, Internal Voltage Reference = 1.1V 1.115 Vref [V] 1.110 1.105 105 85 1.100 25 0 1.095 -40 1.090 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 Vcc [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 335 Figure 26-163.Bandgap Voltage vs. Operating Voltage, Internal Voltage Reference = 2.2V 2.206 2.204 2.202 Vref [V] 2.200 2.198 105 2.196 85 25 2.194 0 2.192 -40 2.190 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 Vcc [V] Figure 26-164.Bandgap Voltage vs. Operating Voltage, Internal Voltage Reference = 4.096V 4.095 Vref [V] 4.090 4.085 105 85 4.080 25 0 4.075 -40 4.070 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 5.1 5.2 5.3 5.4 5.5 Vcc [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 336 26.2.7 Analog Comparator Offset Figure 26-165.Analog Comparator Offset vs. Input Pin Voltage, Offset -, VCC = 5.0V 0 -2 Offset- [mV] -4 -6 105 -8 85 -10 25 0 -12 -40 -14 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 Vin [V] Figure 26-166.Analog Comparator Offset vs. Input Pin Voltage, Offset +, VCC = 5.0V 11 10 Offset [mV] 9 8 105 7 85 6 25 5 0 -40 4 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 Vin [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 337 26.2.8 Internal Oscillator Speed 26.2.8.1 Internal 8MHz RC Oscillator Figure 26-167. Calibrated Internal 8MHz RC Oscillator, Frequency vs. Operating Voltage 8.5 8.4 Frequency [MHz] 8.3 8.2 8.1 105 8.0 85 25 7.9 0 7.8 -40 7.7 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] Figure 26-168. Calibrated Internal 8MHz RC Oscillator, Frequency vs. Operating Temperature Frequency [MHz] 8.5 8.4 5.5 8.3 5.0 4.5 8.2 3.3 8.1 2.7 8.0 1.8 7.9 1.7 7.8 7.7 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 338 Figure 26-169. Internal 8MHz RC Oscillator Frequency vs. OSCCAL0 18 16 Frequency [MHz] 14 12 10 105 8 85 6 25 4 0 2 -40 0 0 15 30 45 60 75 90 105 120 135 150 165 180 195 210 225 240 255 OSCCAL 26.2.8.2 ULP 32kHz Oscillator Figure 26-170. ULP 32kHz Oscillator, Frequency vs. Operating Voltage 32 Frequency [KHz] 31 105 30 85 29 25 0 28 -40 27 26 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 339 Figure 26-171. ULP 32kHz Oscillator, Frequency vs. Operating Temperature 30.5 30.0 Frequency [KHz] 29.5 29.0 5.5 28.5 5.0 28.0 4.5 27.5 3.3 2.7 27.0 1.8 26.5 1.7 26.0 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-172. ULP 32kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 50 45 Frequency [KHz] 40 35 105 30 85 25 25 0 20 -40 15 0 1 2 3 OSCCAL ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 340 26.2.8.3 ULP 64kHz Oscillator Figure 26-173. ULP 64kHz Oscillator, Frequency vs. Operating Voltage 60 58 Frequency [KHz] 105 56 85 25 54 0 52 -40 50 48 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] Figure 26-174. ULP 64kHz Oscillator, Frequency vs. Operating Temperature 58 57 Frequency [KHz] 56 55 5.5 54 5.0 53 4.5 52 3.3 51 2.7 1.8 50 1.7 49 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 341 Figure 26-175. ULP 64kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 90 80 Frequency [KHz] 70 60 50 105 40 85 30 25 20 0 10 -40 0 0 1 2 3 OSCCAL 26.2.8.4 ULP 128kHz Oscillator Figure 26-176. ULP 128kHz Oscillator, Frequency vs. Operating Voltage 115 110 Frequency [KHz] 105 105 85 100 25 0 95 -40 90 85 80 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 342 Figure 26-177. ULP 128kHz Oscillator, Frequency vs. Operating Temperature 108 106 Frequency [KHz] 104 102 5.5 100 5.0 98 4.5 96 3.3 94 2.7 92 1.8 1.7 90 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-178. ULP 128kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 160 140 Frequency [KHz] 120 100 80 105 60 85 25 40 0 20 -40 0 0 1 2 3 OSCCAL ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 343 26.2.8.5 ULP 256kHz Oscillator Figure 26-179. ULP 256kHz Oscillator, Frequency vs. Operating Voltage 210 Frequency [KHz] 205 200 105 195 85 190 25 0 185 -40 180 175 170 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] Figure 26-180. ULP 256kHz Oscillator, Frequency vs. Operating Temperature 210 205 Frequency [KHz] 200 5.5 5.0 195 4.5 190 3.3 185 2.7 180 1.8 1.7 175 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 344 Figure 26-181. ULP 256kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 300 Frequency [KHz] 250 200 105 150 85 100 25 0 50 -40 0 0 1 2 3 OSCCAL 26.2.8.6 ULP 512kHz Oscillator Figure 26-182. ULP 512kHz Oscillator, Frequency vs. Operating Voltage 420 Frequency [KHz] 410 400 105 85 390 25 380 0 -40 370 360 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3 4.5 4.7 4.9 5.1 5.3 5.5 VCC [V] ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 345 Figure 26-183. ULP 512kHz Oscillator, Frequency vs. Operating Temperature 420 Frequency [KHz] 410 5.5 400 5.0 390 4.5 3.3 380 2.7 1.8 370 1.7 360 -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 105 Temperature [C] Figure 26-184. ULP 512kHz Calibrated Oscillator Frequency vs. OSCCAL1 Value 600 550 Frequency [KHz] 500 450 400 105 350 85 25 300 0 250 -40 200 0 1 2 3 OSCCAL ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 346 27. Register Summary Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 (0xFF) Reserved - - - - - - - - (0xFE) Reserved - - - - - - - - (0xFD) Reserved - - - - - - - - (0xFC) Reserved - - - - - - - - (0xFB) Reserved - - - - - - - - (0xFA) Reserved - - - - - - - - (0xF9) Reserved - - - - - - - - (0xF8) Reserved - - - - - - - - (0xF7) Reserved - - - - - - - - (0xF6) Reserved - - - - - - - - (0xF5) Reserved - - - - - - - - (0xF4) Reserved - - - - - - - - (0xF3) Reserved - - - - - - - - (0xF2) Reserved - - - - - - - - (0xF1) Reserved - - - - - - - - (0xF0) Reserved - - - - - - - - (0xEF) Reserved - - - - - - - - Page(s) (0xEE) Reserved - - - - - - - - (0xED) Reserved - - - - - - - - (0xEC) Reserved - - - - - - - - (0xEB) Reserved - - - - - - - - (0xEA) Reserved - - - - - - - - (0xE9) Reserved - - - - - - - - (0xE8) Reserved - - - - - - - - (0xE7) Reserved - - - - - - - - (0xE6) Reserved - - - - - - - - (0xE5) Reserved - - - - - - - - (0xE4) Reserved - - - - - - - - (0xE3) Reserved - - - - - - - - (0xE2) Reserved - - - - - - - - (0xE1) Reserved - - - - - - - - (0xE0) Reserved - - - - - - - - (0xDF) Reserved - - - - - - - - (0xDE) Reserved - - - - - - - - (0xDD) Reserved - - - - - - - - (0xDC) Reserved - - - - - - - - (0xDB) Reserved - - - - - - - - (0xDA) Reserved - - - - - - - - (0xD9) Reserved - - - - - - - - (0xD8) Reserved - - - - - - - - (0xD7) Reserved - - - - - - - - (0xD6) Reserved - - - - - - - - (0xD5) Reserved - - - - - - - - (0xD4) Reserved - - - - - - - - (0xD3) Reserved - - - - - - - - (0xD2) Reserved - - - - - - - - (0xD1) Reserved - - - - - - - - (0xD0) Reserved - - - - - - - - (0xCF) Reserved - - - - - - - - (0xCE) Reserved - - - - - - - - (0xCD) Reserved - - - - - - - - (0xCC) Reserved - - - - - - - - (0xCB) Reserved - - - - - - - - (0xCA) TCCR2A COM2A1 COM2A0 COM2B1 COM2B0 - - WGM21 WGM20 Page 111 (0xC9) TCCR2B ICNC2 ICES2 - WGM23 WGM22 CS22 CS21 CS20 Page 114 (0xC8) TCCR2C FOC2A FOC2B - - - - - - (0xC7) TCNT2H Timer/Counter2 - Counter Register High Byte Page 115 Page 116 (0xC6) TCNT2L Timer/Counter2 - Counter Register Low Byte Page 116 (0xC5) OCR2AH Timer/Counter2 - Output Compare Register A High Byte Page 117 (0xC4) OCR2AL Timer/Counter2 - Output Compare Register A Low Byte Page 117 (0xC3) OCR2BH Timer/Counter2 - Output Compare Register B High Byte Page 117 (0xC2) OCR2BL Timer/Counter2 - Output Compare Register B Low Byte Page 117 (0xC1) ICR2H Timer/Counter1 - Input Capture Register High Byte Page 118 (0xC0) ICR2L (0xBF) Reserved Timer/Counter1 - Input Capture Register Low Byte - - - - - - Page 118 - - ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 347 Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 (0xBE) Reserved - - - - - - - - (0xBD) Reserved - - - - - - - - (0xBC) Reserved - - - - - - - - (0xBB) Reserved - - - - - - - - (0xBA) Reserved - - - - - - - - (0xB9) Reserved - - - - - - - - (0xB8) Reserved - - - - - - - - (0xB7) Reserved - - - - - - - - (0xB6) Reserved - - - - - - - - (0xB5) Reserved - - - - - - - - (0xB4) Reserved - - - - - - - - (0xB3) Reserved - - - - - - - - (0xB2) SPCR SPIE SPE DORD MSTR CPOL CPHA SPR1 SPR0 Page 157 (0xB1) SPSR SPIF WCOL - - - - - SPI2X Page 158 (0xB0) SPDR (0xAF) Reserved - - - SPI Data Register - - - - Page(s) Page 159 - (0xAE) Reserved - - - - - - - - (0xAD) Reserved - - - - - - - - (0xAC) Reserved - - - - - - - - (0xAB) Reserved - - - - - - - - (0xAA) Reserved - - - - - - - - (0xA9) Reserved - - - - - - - - (0xA8) Reserved - - - - - - - - (0xA7) Reserved - - - - - - - - (0xA6) Reserved - - - - - - - - (0xA5) TWSCRA TWSHE - TWDIE TWASIE TWEN TWSIE TWPME TWSME Page 205 (0xA4) TWSCRB - - - - TWHNM TWAA TWCMD1 TWCMD0 Page 205 (0xA3) TWSSRA TWDIF TWASIF TWCH TWRA TWC TWBE TWDIR TWAS Page 207 (0xA2) TWSA (0xA1) TWSAM (0xA0) TWSD (0x9F) Reserved (0x9E) Reserved - - - - - - - - (0x9D) Reserved - - - - - - - - (0x9C) Reserved - - - - - - - - (0x9B) Reserved - - - - - - - - (0x9A) Reserved - - - - - - - - (0x99) Reserved - - - - - - - - (0x98) Reserved - - - - - - - - (0x97) Reserved - - - - - - - - (0x96) UCSR1A RXC1 TXC1 UDRE1 FE1 DOR1 UPE1 U2X1 MPCM1 (0x95) UCSR1B RXCIE1 TXCIE1 UDRIE1 RXEN1 TXEN1 UCSZ12 RXB81 TXB81 Page 182, 194 (0x94) UCSR1C UMSEL11 UMSEL10 UPM11 UPM10 USBS1 UCSZ11 UCSZ10 UCPOL1 Page 183, 195 (0x93) UCSR1D RXSIE1 RXS1 SFDE1 - - - - - (0x92) UBRR1H USART1 Baud Register High Byte (0x91) UBRR1L USART1 Baud Rate Register Low Byte Page 186, 196 (0x90) UDR1 USART1 Data Register Pages 180, 192 TWI Slave Address Register Page 208 TWI Slave Address Mask Register TWAE TWI Slave Data Register - - - - Page 208 Page 209 - - - - Page 181, 193 Page 185 Page 186, 196 (0x8F) Reserved - - - - - - - - (0x8E) Reserved - - - - - - - - (0x8D) Reserved - - - - - - - - (0x8C) Reserved - - - - - - - - (0x8B) Reserved - - - - - - - - (0x8A) Reserved - - - - - - - - (0x89) Reserved - - - - - - - - (0x88) Reserved - - - - - - - - (0x87) Reserved - - - - - - - - (0x86) UCSR0A RXC0 TXC0 UDRE0 FE0 DOR0 UPE0 U2X0 MPCM0 (0x85) UCSR0B RXCIE0 TXCIE0 UDRIE0 RXEN0 TXEN0 UCSZ02 RXB80 TXB80 Page 182, 194 (0x84) UCSR0C UMSEL01 UMSEL00 UPM01 UPM00 USBS0 UCSZ01 UCSZ00 UCPOL0 Page 183, 195 (0x83) UCSR0D RXSIE0 RXS0 SFDE0 - - - - - (0x82) UBRR0H USART0 Baud Register High Byte (0x81) UBRR0L USART0 Baud Rate Register Low Byte Page 186, 196 (0x80) UDR0 USART0 Data Register Pages 180, 192 Page 181, 193 Page 185 Page 186, 196 (0x7F) Reserved - - - - - - - - (0x7E) Reserved - - - - - - - - (0x7D) Reserved - - - - - - - - (0x7C) Reserved - - - - - - - - (0x7B) Reserved - - - - - - - - ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 348 Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 (0x7A) Reserved - - - - - - - - (0x79) Reserved - - - - - - - - (0x78) Reserved - - - - - - - - (0x77) OSCCAL1 - - - - - - CAL11 CAL10 (0x76) OSCTCAL0B Oscillator Temperature Compensation Register B (0x75) OSCTCAL0A Oscillator Temperature Compensation Register A (0x74) OSCCAL0 CAL07 CAL06 CAL05 CAL04 CAL03 Page(s) Page 34 Page 34 Page 33 CAL02 CAL01 CAL00 Page 33 (0x73) CLKPR - - - - CLKPS3 CLKPS2 CLKPS1 CLKPS0 Page 32 (0x72) CLKCR OSCRDY CSTR CKOUTC SUT CKSEL3 CKSEL2 CKSEL1 CKSEL0 Page 31 PRTWI PRUSART1 PRUSART0 PRTIM1 PRTIM0 PRADC Page 38 (0x71) CCP (0x70) PRR CPU Change Protection Register PRSPI Page 13 PRTIM2 (0x6F) Reserved - - - - - - - - (0x6E) Reserved - - - - - - - - (0x6D) Reserved - - - - - - - - (0x6C) Reserved - - - - - - - - (0x6B) Reserved - - - - - - - - (0x6A) PHDE - - - - - - PHDEA1 PHDEA0 (0x69) Reserved - - - - - - - - (0x68) TOCPMSA1 TOCC7S1 TOCC7S0 TOCC6S1 TOCC6S0 TOCC5S1 TOCC5S0 TOCC4S1 TOCC4S0 Page 115 (0x67) TOCPMSA0 TOCC3S1 TOCC3S0 TOCC2S1 TOCC2S0 TOCC1S1 TOCC1S0 TOCC0S1 TOCC0S0 Page 115 (0x66) TOCPMCOE TOCC7OE TOCC6OE TOCC5OE TOCC4OE TOCC3OE TOCC2OE TOCC1OE TOCC0OE Page 116 (0x65) REMAP - - - - - - SPIMAP U0MAP Pages 159, 186 (0x64) PORTCR - - - - - - BBMB BBMA Page 71 (0x63) PUEA PUEA7 PUEA6 PUEA5 PUEA4 PUEA3 PUEA2 PUEA1 PUEA0 Page 73 Page 71 (0x62) PUEB - - - - PUEB3 PUEB2 PUEB1 PUEB0 Page 71 (0x61) DIDR1 - - - - ADC9D ADC8D ADC10D ADC11D Page 150 Pages 127, 131, 149 (0x60) DIDR0 ADC7D ADC6D ADC5D ADC4D ADC3D ADC2D ADC1D ADC0D 0x3F (0x5F) SREG I T H S V N Z C Page 14 0x3E (0x5E) SPH - - - - - - SP9 SP8 Page 13 0x3D (0x5D) SPL SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0 Page 13 0x3C (0x5C) OCR0B 0x3B (0x5B) GIMSK - INT0 PCIE1 PCIE0 - - - Page 52 0x3A (0x5A) GIFR - INTF0 PCIF1 PCIF0 - - - - Page 53 0x39 (0x59) TIMSK0 - - - - - OCIE0B OCIE0A TOIE0 Page 90 0x38 (0x58) TIFR0 - - - - - OCF0B OCF0A TOV0 Page 90 0x37 (0x57) SPMCSR - - RSIG CTPB RFLB PGWRT PGERS SPMEN Page 217 0x36 (0x56) OCR0A 0x35 (0x55) MCUCR Page 38, 52 Timer/Counter0 - Output Compare Register B Page 89 - Timer/Counter0 - Output Compare Register A - - SE SM1 Page 89 SM0 - ISC01 ISC00 0x34 (0x54) MCUSR - - - - WDRF BORF EXTRF PORF Page 46 0x33 (0x53) TCCR0B FOC0A FOC0B - - WGM02 CS02 CS01 CS00 Page 88 - - - - - - 0x32 (0x52) TCNT0 0x31 (0x51) Reserved Timer/Counter0 - Counter Register - Page 89 - 0x30 (0x50) TCCR0A COM0A1 COM0A0 COM0B1 COM0B0 - - WGM01 WGM00 Page 85 0x2F (0x4F) TCCR1A COM1A1 COM1A0 COM1B1 COM1B0 - - WGM11 WGM10 Page 111 ICNC1 ICES1 - WGM13 WGM12 CS12 CS11 CS10 Page 114 0x2E (0x4E) TCCR1B 0x2D (0x4D) TCNT1H Timer/Counter1 - Counter Register High Byte Page 116 0x2C (0x4C) TCNT1L Timer/Counter1 - Counter Register Low Byte Page 116 0x2B (0x4B) OCR1AH Timer/Counter1 - Output Compare Register A High Byte Page 117 0x2A (0x4A) OCR1AL Timer/Counter1 - Output Compare Register A Low Byte Page 117 0x29 (0x49) OCR1BH Timer/Counter1 - Output Compare Register B High Byte Page 117 0x28 (0x48) OCR1BL Timer/Counter1 - Output Compare Register B Low Byte Page 117 0x27 (0x47) DWDR debugWire Data Register Page 211 0x26 (0x46) Reserved 0x25 (0x45) ICR1H Timer/Counter1 - Input Capture Register High Byte Page 118 0x24 (0x44) ICR1L Timer/Counter1 - Input Capture Register Low Byte Page 118 - - - - - - - - 0x23 (0x43) GTCCR TSM - - - - - - PSR Page 122 0x22 (0x42) TCCR1C FOC1A FOC1B - - - - - - Page 115 0x21 (0x41) WDTCSR WDIF WDIE WDP3 - WDE WDP2 WDP1 WDP0 Page 47 0x20 (0x40) PCMSK1 - - - - PCINT11 PCINT10 PCINT9 PCINT8 Page 54 0x1F (0x3F) EEARH EEPROM Address Register High Byte Page 21 0x1E (0x3E) EEARL EEPROM Address Register Low Byte Page 22 0x1D (0x3D) EEDR 0x1C (0x3C) EECR - - EEPM1 EEPM0 EERIE EEMPE EEPE EERE 0x1B (0x3B) PORTA PORTA7 PORTA6 PORTA5 PORTA4 PORTA3 PORTA2 PORTA1 PORTA0 Page 73 0x1A (0x3A) DDRA DDA7 DDA6 DDA5 DDA4 DDA3 DDA2 DDA1 DDA0 Page 73 0x19 (0x39) PINA PINA7 PINA6 PINA5 PINA4 PINA3 PINA2 PINA1 PINA0 Page 73 0x18 (0x38) PORTB - - - - PORTB3 PORTB2 PORTB1 PORTB0 Page 72 0x17 (0x37) DDRB - - - - DDB3 DDB2 DDB1 DDB0 Page 72 EEPROM Data Register Page 22 Page 22 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 349 Note: Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page(s) 0x16 (0x36) PINB - - - - PINB3 PINB2 PINB1 PINB0 Page 72 0x15 (0x35) GPIOR2 General Purpose I/O Register 2 Page 24 0x14 (0x34) GPIOR1 General Purpose I/O Register 1 Page 24 0x13 (0x33) GPIOR0 General Purpose I/O register 0 0x12 (0x32) PCMSK0 PCINT7 PCINT6 PCINT5 PCINT4 Page 24 PCINT3 PCINT2 PCINT1 PCINT0 Page 54 0x11 (0x31) TIMSK2 - - ICIE2 - - OCIE2B OCIE2A TOIE2 Page 118 0x10 (0x30) TIFR2 - - ICF2 - - OCF2B OCF2A TOV2 Page 119 0x0F (0x2F) TIMSK1 - - ICIE1 - - OCIE1B OCIE1A TOIE1 Page 118 0x0E (0x2E) TIFR1 - - ICF1 - - OCF1B OCF1A TOV1 Page 119 0x0D (0x2D) ACSR1B HSEL1 HLEV1 - ACOE1 - ACME1 - - Page 130 0x0C (0x2C) ACSR1A ACD1 ACBG1 ACO1 ACI1 ACIE1 ACIC1 ACIS11 ACIS10 Page 129 0x0B (0x2B) ACSR0B HSEL0 HLEV0 - ACOE0 ACNMUX01 ACNMUX00 ACPMUX01 ACPMUX00 Page 126 0x0A (0x2A) ACSR0A ACD0 ACPMUX02 ACO0 ACI0 ACIE0 ACIC0 ACIS01 ACIS00 Page 125 0x09 (0x29) ADMUXA - - MUX5 MUX4 MUX3 MUX2 MUX1 MUX0 Page 143 0x08 (0x28) ADMUXB REFS2 REFS1 REFS0 - - - GSEL1 GSEL0 0x07 (0x27) ADCH ADC - Conversion Result High Byte Page 146 Page 147 0x06 (0x26) ADCL 0x05 (0x25) ADCSRA ADEN ADSC ADATE ADC - Conversion Result Low Byte ADIF ADIE ADPS2 ADPS1 ADPS0 Page 148 Page 147 0x04 (0x24) ADCSRB - - - - ADLAR ADTS2 ADT1 ADTS0 Page 149 0x03 (0x23) Reserved - - - - - - - - 0x02 (0x22) Reserved - - - - - - - - 0x01 (0x21) Reserved - - - - - - - - 0x00 (0x20) Reserved - - - - - - - - 1. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addresses should never be written. 2. I/O Registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and CBI instructions. In these registers, the value of single bits can be checked by using the SBIS and SBIC instructions. 3. Some of the Status Flags are cleared by writing a logical one to them. Note that, unlike most other AVRs, the CBI and SBI instructions will only operation the specified bit, and can therefore be used on registers containing such Status Flags. The CBI and SBI instructions work with registers 0x00 to 0x1F only. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 350 28. Instruction Set Summary Mnemonics Operands Description Operation Flags #Clocks 1 ARITHMETIC AND LOGIC INSTRUCTIONS ADD Rd, Rr Add two Registers Rd Rd + Rr Z,C,N,V,H ADC Rd, Rr Add with Carry two Registers Rd Rd + Rr + C Z,C,N,V,H 1 ADIW Rdl,K Add Immediate to Word Rdh:Rdl Rdh:Rdl + K Z,C,N,V,S 2 SUB Rd, Rr Subtract two Registers Rd Rd - Rr Z,C,N,V,H 1 SUBI Rd, K Subtract Constant from Register Rd Rd - K Z,C,N,V,H 1 SBC Rd, Rr Subtract with Carry two Registers Rd Rd - Rr - C Z,C,N,V,H 1 SBCI Rd, K Subtract with Carry Constant from Reg. Rd Rd - K - C Z,C,N,V,H 1 SBIW Rdl,K Subtract Immediate from Word Rdh:Rdl Rdh:Rdl - K Z,C,N,V,S 2 1 AND Rd, Rr Logical AND Registers Rd Rd Rr Z,N,V ANDI Rd, K Logical AND Register and Constant Rd Rd K Z,N,V 1 OR Rd, Rr Logical OR Registers Rd Rd v Rr Z,N,V 1 ORI Rd, K Logical OR Register and Constant Rd Rd v K Z,N,V 1 EOR Rd, Rr Exclusive OR Registers Rd Rd Rr Z,N,V 1 COM Rd One's Complement Rd 0xFF Rd Z,C,N,V 1 NEG Rd Two's Complement Rd 0x00 Rd Z,C,N,V,H 1 SBR Rd,K Set Bit(s) in Register Rd Rd v K Z,N,V 1 CBR Rd,K Clear Bit(s) in Register Rd Rd (0xFF - K) Z,N,V 1 INC Rd Increment Rd Rd + 1 Z,N,V 1 DEC Rd Decrement Rd Rd 1 Z,N,V 1 1 TST Rd Test for Zero or Minus Rd Rd Rd Z,N,V CLR Rd Clear Register Rd Rd Rd Z,N,V 1 SER Rd Set Register Rd 0xFF None 1 Relative Jump PC PC + k + 1 None 2 Indirect Jump to (Z) PC Z None 2 Relative Subroutine Call PC PC + k + 1 None 3 ICALL Indirect Call to (Z) PC Z None 3 RET Subroutine Return PC STACK None 4 BRANCH INSTRUCTIONS RJMP k IJMP RCALL k Interrupt Return PC STACK I 4 Rd,Rr Compare, Skip if Equal if (Rd = Rr) PC PC + 2 or 3 None 1/2/3 CP Rd,Rr Compare Rd Rr Z, N,V,C,H 1 CPC Rd,Rr Compare with Carry Rd Rr C Z, N,V,C,H 1 CPI Rd,K Compare Register with Immediate Rd K Z, N,V,C,H 1 SBRC Rr, b Skip if Bit in Register Cleared if (Rr(b)=0) PC PC + 2 or 3 None 1/2/3 SBRS Rr, b Skip if Bit in Register is Set if (Rr(b)=1) PC PC + 2 or 3 None 1/2/3 SBIC P, b Skip if Bit in I/O Register Cleared if (P(b)=0) PC PC + 2 or 3 None 1/2/3 SBIS P, b Skip if Bit in I/O Register is Set if (P(b)=1) PC PC + 2 or 3 None 1/2/3 BRBS s, k Branch if Status Flag Set if (SREG(s) = 1) then PCPC+k + 1 None 1/2 BRBC s, k Branch if Status Flag Cleared if (SREG(s) = 0) then PCPC+k + 1 None 1/2 BREQ k Branch if Equal if (Z = 1) then PC PC + k + 1 None 1/2 BRNE k Branch if Not Equal if (Z = 0) then PC PC + k + 1 None 1/2 BRCS k Branch if Carry Set if (C = 1) then PC PC + k + 1 None 1/2 BRCC k Branch if Carry Cleared if (C = 0) then PC PC + k + 1 None 1/2 BRSH k Branch if Same or Higher if (C = 0) then PC PC + k + 1 None 1/2 BRLO k Branch if Lower if (C = 1) then PC PC + k + 1 None 1/2 BRMI k Branch if Minus if (N = 1) then PC PC + k + 1 None 1/2 BRPL k Branch if Plus if (N = 0) then PC PC + k + 1 None 1/2 BRGE k Branch if Greater or Equal, Signed if (N V= 0) then PC PC + k + 1 None 1/2 BRLT k Branch if Less Than Zero, Signed if (N V= 1) then PC PC + k + 1 None 1/2 BRHS k Branch if Half Carry Flag Set if (H = 1) then PC PC + k + 1 None 1/2 BRHC k Branch if Half Carry Flag Cleared if (H = 0) then PC PC + k + 1 None 1/2 BRTS k Branch if T Flag Set if (T = 1) then PC PC + k + 1 None 1/2 BRTC k Branch if T Flag Cleared if (T = 0) then PC PC + k + 1 None 1/2 RETI CPSE BRVS k Branch if Overflow Flag is Set if (V = 1) then PC PC + k + 1 None 1/2 BRVC k Branch if Overflow Flag is Cleared if (V = 0) then PC PC + k + 1 None 1/2 BRIE k Branch if Interrupt Enabled if ( I = 1) then PC PC + k + 1 None 1/2 BRID k Branch if Interrupt Disabled if ( I = 0) then PC PC + k + 1 None 1/2 BIT AND BIT-TEST INSTRUCTIONS SBI P,b Set Bit in I/O Register I/O(P,b) 1 None 2 CBI P,b Clear Bit in I/O Register I/O(P,b) 0 None 2 LSL Rd Logical Shift Left Rd(n+1) Rd(n), Rd(0) 0 Z,C,N,V 1 LSR Rd Logical Shift Right Rd(n) Rd(n+1), Rd(7) 0 Z,C,N,V 1 ROL Rd Rotate Left Through Carry Rd(0)C,Rd(n+1) Rd(n),CRd(7) Z,C,N,V 1 ROR Rd Rotate Right Through Carry Rd(7)C,Rd(n) Rd(n+1),CRd(0) Z,C,N,V 1 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 351 Mnemonics Operands Description Operation Flags ASR Rd Arithmetic Shift Right Rd(n) Rd(n+1), n=0..6 Z,C,N,V #Clocks 1 SWAP Rd Swap Nibbles Rd(3..0)Rd(7..4),Rd(7..4)Rd(3..0) None 1 BSET s Flag Set SREG(s) 1 SREG(s) 1 BCLR s Flag Clear SREG(s) 0 SREG(s) 1 BST Rr, b Bit Store from Register to T T Rr(b) T 1 BLD Rd, b Bit load from T to Register Rd(b) T None 1 SEC Set Carry C1 C 1 CLC Clear Carry C0 C 1 SEN Set Negative Flag N1 N 1 CLN Clear Negative Flag N0 N 1 SEZ Set Zero Flag Z1 Z 1 CLZ Clear Zero Flag Z0 Z 1 SEI Global Interrupt Enable I1 I 1 CLI Global Interrupt Disable I 0 I 1 SES Set Signed Test Flag S1 S 1 CLS Clear Signed Test Flag S0 S 1 SEV Set Twos Complement Overflow. V1 V 1 CLV Clear Twos Complement Overflow V0 V 1 SET Set T in SREG T1 T 1 CLT Clear T in SREG T0 T 1 SEH Set Half Carry Flag in SREG H1 H 1 CLH Clear Half Carry Flag in SREG H0 H 1 DATA TRANSFER INSTRUCTIONS MOV Rd, Rr Move Between Registers Rd Rr None 1 MOVW Rd, Rr Copy Register Word Rd+1:Rd Rr+1:Rr None 1 LDI Rd, K Load Immediate Rd K None 1 LD Rd, X Load Indirect Rd (X) None 2 LD Rd, X+ Load Indirect and Post-Inc. Rd (X), X X + 1 None 2 LD Rd, - X Load Indirect and Pre-Dec. X X - 1, Rd (X) None 2 2 LD Rd, Y Load Indirect Rd (Y) None LD Rd, Y+ Load Indirect and Post-Inc. Rd (Y), Y Y + 1 None 2 LD Rd, - Y Load Indirect and Pre-Dec. Y Y - 1, Rd (Y) None 2 LDD Rd,Y+q Load Indirect with Displacement Rd (Y + q) None 2 LD Rd, Z Load Indirect Rd (Z) None 2 2 LD Rd, Z+ Load Indirect and Post-Inc. Rd (Z), Z Z+1 None LD Rd, -Z Load Indirect and Pre-Dec. Z Z - 1, Rd (Z) None 2 LDD Rd, Z+q Load Indirect with Displacement Rd (Z + q) None 2 LDS Rd, k Load Direct from SRAM Rd (k) None 2 ST X, Rr Store Indirect (X) Rr None 2 ST X+, Rr Store Indirect and Post-Inc. (X) Rr, X X + 1 None 2 2 ST - X, Rr Store Indirect and Pre-Dec. X X - 1, (X) Rr None ST Y, Rr Store Indirect (Y) Rr None 2 ST Y+, Rr Store Indirect and Post-Inc. (Y) Rr, Y Y + 1 None 2 ST - Y, Rr Store Indirect and Pre-Dec. Y Y - 1, (Y) Rr None 2 STD Y+q,Rr Store Indirect with Displacement (Y + q) Rr None 2 ST Z, Rr Store Indirect (Z) Rr None 2 ST Z+, Rr Store Indirect and Post-Inc. (Z) Rr, Z Z + 1 None 2 ST -Z, Rr Store Indirect and Pre-Dec. Z Z - 1, (Z) Rr None 2 STD Z+q,Rr Store Indirect with Displacement (Z + q) Rr None 2 STS k, Rr LPM Store Direct to SRAM (k) Rr None 2 Load Program Memory R0 (Z) None 3 3 LPM Rd, Z Load Program Memory Rd (Z) None LPM Rd, Z+ Load Program Memory and Post-Inc Rd (Z), Z Z+1 None 3 Store Program Memory (Z) R1:R0 None 1 SPM IN Rd, P In Port Rd P None OUT P, Rr Out Port P Rr None 1 PUSH Rr Push Register on Stack STACK Rr None 2 POP Rd Pop Register from Stack Rd STACK None 2 None 1 MCU CONTROL INSTRUCTIONS NOP No Operation SLEEP Sleep (see specific descr. for Sleep function) None 1 WDR Watchdog Reset (see specific descr. for WDR/timer) None 1 BREAK Break For On-chip Debug Only None N/A ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 352 29. Ordering Information 29.1 ATtiny441 Speed Supply Voltage Temperature Range Package(1) Ordering Code ATtiny441-SSU 14S1 ATtiny441-SSUR 16 MHz 1.7 - 5.5V Industrial (-40C to +85C)(2) ATtiny441-MU 20M1 ATtiny441-MUR ATtiny441-MMH 20M2 ATtiny441-MMHR Notes: 1. 2. All packages are Pb-free, halide-free and fully green and they comply with the European directive for Restriction of Hazardous Substances (RoHS). These devices can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities. Package Type 14S1 14-lead, 0.150" Wide Body, Plastic Gull Wing Small Outline Package (SOIC) 20M1 20-pad, 4 x 4 x 0.8 mm Body, Quad Flat No-Lead / Micro Lead Frame Package (QFN/MLF) 20M2 20-pad, 3 x 3 x 0.85 mm Body, Very Thin Quad Flat No Lead Package (VQFN) ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 353 29.2 ATtiny841 Speed Supply Voltage Temperature Range Package(1) Ordering Code ATtiny841-SSU 14S1 ATtiny841-SSUR 16 MHz 1.7 - 5.5V Industrial (-40C to +85C)(2) ATtiny841-MU 20M1 ATtiny841-MUR ATtiny841-MMH 20M2 ATtiny841-MMHR Notes: 1. 2. All packages are Pb-free, halide-free and fully green and they comply with the European directive for Restriction of Hazardous Substances (RoHS). These devices can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities. Package Type 14S1 14-lead, 0.150" Wide Body, Plastic Gull Wing Small Outline Package (SOIC) 20M1 20-pad, 4 x 4 x 0.8 mm Body, Quad Flat No-Lead / Micro Lead Frame Package (QFN/MLF) 20M2 20-pad, 3 x 3 x 0.85 mm Body, Very Thin Quad Flat No Lead Package (VQFN) ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 354 30. Packaging Information 30.1 14S1 1 E H E N L Top View End View e COMMON DIMENSIONS (Unit of Measure = mm/inches) b SYMBOL A1 A D Side View NOM MAX NOTE A 1.35/0.0532 - 1.75/0.0688 A1 0.1/.0040 - 0.25/0.0098 b 0.33/0.0130 - 0.5/0.0200 5 D 8.55/0.3367 - 8.74/0.3444 2 E 3.8/0.1497 - 3.99/0.1574 3 H 5.8/0.2284 - 6.19/0.2440 L 0.41/0.0160 - 1.27/0.0500 e Notes: MIN 4 1.27/0.050 BSC 1. This drawing is for general information only; refer to JEDEC Drawing MS-012, Variation AB for additional information. 2. Dimension D does not include mold Flash, protrusions or gate burrs. Mold Flash, protrusion and gate burrs shall not exceed 0.15 mm (0.006") per side. 3. Dimension E does not include inter-lead Flash or protrusion. Inter-lead flash and protrusions shall not exceed 0.25 mm (0.010") per side. 4. L is the length of the terminal for soldering to a substrate. 5. The lead width B, as measured 0.36 mm (0.014") or greater above the seating plane, shall not exceed a maximum value of 0.61 mm (0.024") per side. 2/5/02 TITLE R 2325 Orchard Parkway San Jose, CA 95131 DRAWING NO. 14S1, 14-lead, 0.150" Wide Body, Plastic Gull Wing Small Outline Package (SOIC) 14S1 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 REV. A 355 30.2 20M1 D 1 Pin 1 ID 2 SIDE VIEW E 3 TOP VIEW A2 D2 A1 A 0.08 1 2 Pin #1 Notch (0.20 R) 3 COMMON DIMENSIONS (Unit of Measure = mm) E2 b L e BOTTOM VIEW SYMBOL MIN NOM MAX A 0.70 0.75 0.80 A1 - 0.01 0.05 A2 b 0.18 D D2 E2 L 0.23 0.30 4.00 BSC 2.45 2.60 2.75 4.00 BSC 2.45 e Reference JEDEC Standard MO-220, Fig. 1 (SAW Singulation) WGGD-5. NOTE 0.20 REF E Note: C 2.60 2.75 0.50 BSC 0.35 0.40 0.55 10/27/04 R 2325 Orchard Parkway San Jose, CA 95131 TITLE 20M1, 20-pad, 4 x 4 x 0.8 mm Body, Lead Pitch 0.50 mm, 2.6 mm Exposed Pad, Micro Lead Frame Package (MLF) DRAWING NO. 20M1 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 REV. B 356 30.3 20M2 D C y Pin 1 ID E SIDE VIEW TOP VIEW A1 A D2 16 17 18 19 20 COMMON DIMENSIONS (Unit of Measure = mm) C0.18 (8X) 15 SYMBOL 1 Pin #1 Chamfer (C 0.3) 14 2 e E2 13 3 MIN NOM MAX A 0.75 0.80 0.85 A1 0.00 0.02 0.05 b 0.17 0.22 0.27 C 12 4 11 5 D b 10 9 8 7 6 K L BOTTOM VIEW 0.3 Ref (4x) NOTE 0.152 2.90 3.00 3.10 D2 1.40 1.55 1.70 E 2.90 3.00 3.10 E2 1.40 1.55 1.70 e - 0.45 - L 0.35 0.40 0.45 K 0.20 - - y 0.00 - 0.08 10/24/08 Package Drawing Contact: packagedrawings@atmel.com GPC TITLE 20M2, 20-pad, 3 x 3 x 0.85 mm Body, Lead Pitch 0.45 mm, ZFC 1.55 x 1.55 mm Exposed Pad, Thermally Enhanced Plastic Very Thin Quad Flat No Lead Package (VQFN) DRAWING NO. REV. 20M2 B ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 357 31. Errata 31.1 ATtiny441 31.1.1 Rev. D No known erratas. 31.1.2 Rev. C Not sampled 31.1.3 Rev. B Not sampled. 31.1.4 Rev. A Not sampled 31.2 ATtiny841 31.2.1 Rev. C No known erratas. 31.2.2 Rev. B Issue: Non-volatile Memories Should Not Be Written at High Temperatures And Low Voltages Reliability issues have been detected when Flash, EEPROM or Fuse Bytes are programmed at voltages below 3V AND temperatures above 55C. Workaround: Do not write to Flash, EEPROM or Fuse bytes when supply voltage is below 3V AND device temperature is above 55C. 31.2.3 Rev. A Issue: Non-volatile Memories Should Not Be Written at High Temperatures And Low Voltages Reliability issues have been detected when Flash, EEPROM or Fuse Bytes are programmed at voltages below 3V AND temperatures above 55C. Workaround: Do not write to Flash, EEPROM or Fuse bytes when supply voltage is below 3V AND device temperature is above 55C. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 358 32. Datasheet Revision History Doc. Rev. Date Comments 8495A 09/2012 Initial revision 8495B 12/2012 Updated Figure 1-1 on page 2, Figure 1-2 on page 2, and REMAP register on pages 159, 186 and 347. Added ATtiny241. 8495C 03/2013 Updated "Ordering Information" : All -SU and SUR updated to -SSU and -SSUR. 8495D 07/2013 Removed references to ATtiny241 which will not be offered. 8495E 08/2013 Updated "Device Signature Imprint Table" on page 220. 8495F 10/2013 Added Typical Characterization plots. ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 359 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 360 Table of Contents Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1. Pin Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1 Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1 3.2 3.3 3.4 Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Retention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 6 6 4. CPU Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 Architectural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 ALU - Arithmetic Logic Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 General Purpose Register File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Stack Pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Instruction Execution Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Reset and Interrupt Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5. Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1 5.2 5.3 5.4 Program Memory (Flash) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Memory (SRAM) and Register Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Memory (EEPROM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 16 18 21 6. Clock System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6.1 6.2 6.3 6.4 6.5 6.6 Clock Subsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clock Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Clock Prescaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clock Output Buffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Start-Up Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 26 29 29 30 31 7. Power Management and Sleep Modes . . . . . . . . . . . . . . . . . . . . . . 35 7.1 7.2 7.3 7.4 Sleep Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power Reduction Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Minimizing Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 36 37 38 8. System Control and Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 8.1 8.2 8.3 8.4 8.5 Resetting the AVR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reset Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Internal Voltage Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 40 44 44 46 9. Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 1 9.1 9.2 9.3 Interrupt Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 External Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 10. I/O Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 10.1 10.2 10.3 10.4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ports as General Digital I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Alternative Port Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 55 60 71 11. 8-bit Timer/Counter0 with PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clock Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output Compare Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compare Match Output Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer/Counter Timing Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 74 75 75 76 78 79 83 84 12. 16-bit Timer/Counters (Timer/Counter 1 & Timer/Counter 2) . . . . . 92 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 12.9 12.10 12.11 12.12 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Timer/Counter 1 and Timer/Counter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Timer/Counter Clock Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Counter Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Input Capture Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Output Compare Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Compare Match Output Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Timer/Counter Timing Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Accessing 16-bit Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 13. Timer/Counter Prescaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 13.1 13.2 13.3 Prescaler Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 External Clock Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 14. Analog Comparator 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 14.1 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 15. Analog Comparator 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 15.1 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 16. Analog to Digital Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 16.1 16.2 16.3 16.4 16.5 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting a Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prescaling and Conversion Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 132 132 134 134 135 2 16.6 16.7 16.8 16.9 16.10 16.11 16.12 16.13 Changing Channel, Gain, and Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . ADC Noise Canceler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analog Input Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Noise Canceling Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ADC Accuracy Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ADC Conversion Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Temperature Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 139 139 140 140 142 143 143 17. SPI - Serial Peripheral Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 151 17.1 17.2 17.3 17.4 17.5 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SS Pin Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 151 155 156 157 18. USART (USART0 & USART1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 18.1 18.2 18.3 18.4 18.5 18.6 18.7 18.8 18.9 18.10 18.11 18.12 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . USART0 and USART1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clock Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Frame Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . USART Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Transmission - The USART Transmitter . . . . . . . . . . . . . . . . . . . . . . . Data Reception - The USART Receiver. . . . . . . . . . . . . . . . . . . . . . . . . . . . Asynchronous Data Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Multi-processor Communication Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples of Baud Rate Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 160 160 162 164 165 166 169 172 176 177 180 19. USART in SPI Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 19.1 19.2 19.3 19.4 19.5 19.6 19.7 19.8 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clock Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SPI Data Modes and Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Frame Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compatibility with AVR SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 187 187 188 188 190 192 192 20. I2C Compatible, Two-Wire Slave Interface . . . . . . . . . . . . . . . . . . 197 20.1 20.2 20.3 20.4 20.5 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General TWI Bus Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TWI Slave Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 197 197 203 205 21. debugWIRE On-chip Debug System . . . . . . . . . . . . . . . . . . . . . . . 210 21.1 21.2 21.3 21.4 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Physical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Software Break Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 210 210 210 211 3 21.5 21.6 Limitations of debugWIRE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 22. Self-Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 22.1 22.2 22.3 22.4 22.5 22.6 22.7 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lock Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Self-Programming the Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preventing Flash Corruption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Programming Time for Flash when Using SPM . . . . . . . . . . . . . . . . . . . . . . Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 212 212 212 216 216 217 23. Lock Bits, Fuse Bits and Device Signature . . . . . . . . . . . . . . . . . . 218 23.1 23.2 23.3 23.4 Lock Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fuse Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Device Signature Imprint Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reading Lock, Fuse and Signature Data from Software. . . . . . . . . . . . . . . . 218 219 220 222 24. External Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 24.1 24.2 24.3 24.4 Memory Parametrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Programming Time for Flash and EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . Serial Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . High-Voltage Serial Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 225 225 229 25. Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 25.1 25.2 ATtiny441 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 ATtiny841 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 26. Typical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 26.1 26.2 ATtiny441 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 ATtiny841 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 27. Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 28. Instruction Set Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 29. Ordering Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 29.1 29.2 ATtiny441 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 ATtiny841 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 30. Packaging Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 30.1 30.2 30.3 14S1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 20M1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 20M2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 31. Errata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 31.1 31.2 ATtiny441 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 ATtiny841 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 32. Datasheet Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 4 ATtiny441/841 [DATASHEET] 8495F-AVR-10/2013 5 Atmel Corporation 1600 Technology Drive Atmel Asia Limited Unit 01-5 & 16, 19F Atmel Munich GmbH Business Campus Atmel Japan G.K. 16F Shin-Osaki Kangyo Bldg San Jose, CA 95110 BEA Tower, Millennium City 5 Parkring 4 1-6-4 Osaki, Shinagawa-ku USA 418 Kwun Tong Roa D-85748 Garching b. Munich Tokyo 141-0032 Tel: (+1) (408) 441-0311 Kwun Tong, Kowloon GERMANY JAPAN Fax: (+1) (408) 487-2600 HONG KONG Tel: (+49) 89-31970-0 Tel: (+81) (3) 6417-0300 www.atmel.com Tel: (+852) 2245-6100 Fax: (+49) 89-3194621 Fax: (+81) (3) 6417-0370 Fax: (+852) 2722-1369 (c) 2013 Atmel Corporation. All rights reserved. / Rev.: 8495F-AVR-10/2013 Atmel(R), Atmel logo and combinations thereof, Enabling Unlimited Possibilities(R),AVR(R), and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.