General Features * Atmel(R) AVR(R) Microcontroller and RF Transmitter PLL in a Single QFN24 5mm x 5mm * * * * * * * * * * * * * * * * Package (Pitch 0.65 mm) - Operating Frequency Ranges 310MHz to 350MHz, 429MHz to 439MHz and 868MHz to 928MHz Temperature Range -40C to +85C Supply Voltage 2.0V to 3.6V Allowing usage of Single Li-cell Power Supply Low Power Consumption - Active Mode: Typical 9.8mA at 3.0V and 4MHz Microcontroller-clock - Power-down Mode: Typical 200nA at 3.0V Modulation Scheme ASK/FSK Integrated PLL Loop Filter Output Power of 8dBm at 315MHz / 7.5dBm at 433.92 MHz / 5.5dBm at 868.3MHz Easy to Design-in Due to Excellent Isolation of the PLL from the PA and Power Supply Single-ended Antenna Output with High Efficient Power Amplifier Very Robust ESD Protection: HBM 2500V, MM100V, CDM 1000V High Performance, Low Power AVR 8-bit Microcontroller Advanced RISC Architecture Non-volatile Program and Data Memories - 4KBytes of In-system Programmable Program Memory Flash - 256Bytes In-system Programmable EEPROM - 256Bytes Internal SRAM Programming Lock for Self-programming Flash Program and EEPROM Data Security Peripheral Features - Two Timer/Counter, 8- and 16-bit Counters with Two PWM Channels on Both - 10-bit ADC - On-chip Analog Comparator - Programmable Watchdog Timer with Separate On-chip Oscillator - Universal Serial Interface (USI) Special Microcontroller Features - debugWIRE On-chip Debug System - In-system Programmable via SPI Port - External and Internal Interrupt Sources - Pin Change Interrupt on 12 Pins - Enhanced Power-on Reset Circuit - Programmable Brown-out Detection Circuit - Internal Calibrated Oscillator - On-chip Temperature Sensor 12 Programmable I/O Lines UHF ASK/FSK Transmitter with the Atmel AVR Microcontroller Atmel ATA5771/73/74 9137F-RKE-05/11 1. General Description The Atmel(R) ATA5771/73/74 is a highly flexible programmable transmitter containing the Atmel AVR (R) microcontroller Atmel ATtiny44V and the UHF PLL transmitters in a small QFN24 5mm x 5mm package. This device is a member of a transmitter family covering several operating frequency ranges, which has been specifically developed for the demands of RF low-cost data transmission systems with data rates up to 32kBit/s using ASK or FSK modulation. Its primary applications are in the application of Remote Keyless-Entry (RKE), Passive Entry Go (PEG) System and Remote Start. The ATA5771 is designed for 868MHz application, whereas ATA5773 for 315MHZ application and ATA5774 for 434MHz application. Figure 1-1. ASK System Block Diagram UHF ASK/FSK Remote Control Transmitter Atmel ATA577x S1 PXY VDD S1 PXY GND S1 PXY PXY PXY PXY PXY PXY PXY PXY PXY PXY Power up/down CLK f/4 PLL VS ENABLE UHF ASK/FSK Remote Control Receiver GND_RF 1 to 6 Demod XTO VCO VCC_RF Control Microcontroller VS Antenna PA_ENABLE PLL XTO ANT2 PA Loop Antenna LNA ANT1 VCO VS 2 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 1-2. FSK System Block Diagram UHF ASK/FSK Remote Control Transmitter Atmel ATA577x S1 PXY VDD S1 PXY GND S1 PXY PXY PXY PXY PXY PXY PXY PXY PXY PXY Power up/down CLK f/4 PLL VS ENABLE UHF ASK/FSK Remote Control Receiver GND_RF 1 to 6 Demod XTO VCO VCC_RF Control Microcontroller VS Antenna PA_ENABLE PLL XTO ANT2 PA Loop Antenna LNA ANT1 VCO VS 3 9137F-RKE-05/11 2. Pin Configuration ENABLE GND_RF VS_RF XTAL GND Pinning QFN24 5mm x 5mm GND 24 23 22 21 20 19 18 2 17 PA1 PB1 3 16 PA2 PB3/RESET 4 15 PA3/T0 PB2 5 14 PA4/USCK PA7 6 PA5/MISO PA6/MOSI 7 Table 2-1. 4 8 9 10 11 13 12 GND PB0 ANT1 PA0 ANT2 1 CLK VCC PA_ENABLE Figure 2-1. Pin Description Pin Symbol Function 1 VCC Microcontroller supply voltage 2 PB0 Port B is a 4-bit bi-directional I/O port with internal pull-up resistor 3 PB1 4 PB3/RESET Port B is a 4-bit bi-directional I/O port with internal pull-up resistor 5 PB2 Port B is a 4-bit bi-directional I/O port with internal pull-up resistor 6 PA7 Port A is an 8-bit bi-directional I/O port with internal pull-up resistor 7 PA6 / MOSI Port A is an 8-bit bi-directional I/O port with internal pull-up resistor 8 CLK Port B is a 4-bit bi-directional I/O port with internal pull-up resistor/reset input Clock output signal for microcontroller. The clock output frequency is set by the crystal to fXTAL/4 9 PA_ENABLE 10 ANT2 Switches on power amplifier. Used for ASK modulation 11 ANT1 Open collector antenna output 12 GND Ground 13 PA5/MISO Port A is an 8-bit bi-directional I/O port with internal pull-up resistor 14 PA4/SCK Port A is an 8-bit bi-directional I/O port with internal pull-up resistor 15 PA3/T0 Port A is an 8-bit bi-directional I/O port with internal pull-up resistor 16 PA2 Port A is an 8-bit bi-directional I/O port with internal pull-up resistor 17 PA1 Port A is an 8-bit bi-directional I/O port with internal pull-up resistor 18 PA0 Port A is an 8-bit bi-directional I/O port with internal pull-up resistor Emitter of antenna output stage 19 GND Microcontroller ground 20 XTAL Connection for crystal 21 VS_RF 22 GND_RF Transmitter ground Transmitter supply voltage 23 ENABLE Enable input 24 GND Ground GND Ground/backplane (exposed die pad) Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 2.1 Pin Configuration of RF Pins Table 2-2. Pin Description Pin Symbol Function Configuration VS 8 CLK Clock output signal for microcontroller. The clock output frequency is set by the crystal to fXTAL/4. 100 CLK 100 PA_ENABLE 9 PA_ENABLE 50 k UREF = 1.1V Switches on power amplifier. Used for ASK modulation. 20 A ANT1 10 ANT2 Emitter of antenna output stage. 11 ANT1 Open collector antenna output. ANT2 VS 1.5 k 20 XTAL VS 1.2 k Connection for crystal. XTAL 182 A 5 9137F-RKE-05/11 Table 2-2. Pin Description (Continued) Pin Symbol 21 VS 22 GND 23 ENABLE Function Configuration Supply voltage See ESD protection circuitry (see Figure 5-1 on page 182). Ground See ESD protection circuitry (see Figure 5-1 on page 182). ENABLE 6 200 k Enable input Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 3. Functional Description Figure 1-1 on page 2 and Figure 1-2 on page 3 show the interconnections between the microcontroller and the RF part for a typical application. In the recommended application circuits the clock output of the RF transmitter is connected to the microcontroller in order to be able to generate data rate with tolerance lower than 3%. The transmitter's crystal oscillator (XTO), Phase Locked Loop (PLL) and clock generation are started using pin ENABLE. The Power amplifier (PA) is activated using the connection to the pin PA_ENABLE. The FSK modulation is performed due to pulling of the crystal load capacitance for this purpose the microcontroller out put port together with an external switch applies this modulation technique. For the ASK modulation the power amplifier will be switched on and of by modulating the PA_ENABLE pin due to the data. To wake up the system from standby mode at least one event is required, which will be performed by pushing tone button. After this event the microcontroller starts up with the internal RC oscillator. For the TX operation the user software must additionally control just 2 pins, the pin ENABLE and pin PA_ENABLE. In case of the FSK modulation one additional connection from microcontroller is necessary to perform the pulling of the crystal load capacitance. If ENABLE and PA_ENABLE are set to LOW the transmitter is in standby mode with the suitable mode setting of the microcontroller (MCU) the power consumption will be reduced. If ENABLE is set to HIGH and PA_ENABLE to LOW, the XTO, PLL, and the Clock driver of the RF transmitter are activated and the VCO frequency is 32 times the XTO frequency. The Atmel ATA5771 and Atmel ATA5774 require typically shorter than 1 ms until the PLL is locked and the transmitter's clock output is stable, while the Atmel ATA5773 requires time shorter than 3 ms for this progress. If both ENABLE and PA_ENABLE are set to HIGH the whole RF transmitter (XTO, PLL, Clock driver and power Amplifier) is activated. The ASK modulation is achieved by switching on and off the power amplifier via pin PA_ENABLE. The FSK modulation is performed by pulling the crystal load capacitor which will change the reference frequency of the PLL due to the data. The microcontroller modulates the load capacitance of the crystal using an external switch. A MOS transistor with a low parasitic capacitance is recommended to be used for this purpose. During the FSK modulation is the PA_ENABLE pin set to HIGH. To generate the data for the telegram the internal RC oscillator of the microcontroller is not accurate enough because this will be affected by ambient temperature and operating voltage. To reduce the variation of the data rate lower than 3% the clock frequency generated by the RF transmitter should be used as a reference. The MCU has to wait at least longer than 3 ms for ATA5773 after setting ENABLE to HIGH, before the clock output from the RF transmitter can be used. For ATA5771 and ATA5774 the MCU must wait longer than 1 ms until the clock output is stable. The clock output with the crystal tolerance is connected to the timer0 of the MCU. This timer clocks the USI to generate the data rate. In the Two serial synchronous data transfer modes will be provided by USI. This will be pass out with different physical I/O ports, two wire mode is used for ASK and the three wire mode for FSK. 7 9137F-RKE-05/11 3.1 Frequency Generation In Atmel ATA5773 and Atmel ATA5774 the VCO is locked to 32 times crystal frequency hence the following crystal is needed * 9.8438MHz for 315MHz application * 13.56MHz for 433.92MHz application The VCO of ATA5771 is locked to 64 times crystal frequency therefore the necessary crystal frequency is * 13.5672MHz for 868.3MHz application * 14.2969MHz for 915MHz application Due to the high integration the PLL and VCO peripheral elements are integrated. The XTO is a series resonance oscillator that only one capacitor together with a crystal connected in series to GND are needed as external elements. Until the PLL and clock output is stable the following time can be expected * 3ms for ATA5773 * 1ms for ATA5771 and ATA5774 Therefore, a time delay of 3 ms for ATA5773 and 1 ms for ATA5771/74 between activation of pin ENABLE and switching on the pin PA_ENABLE must be implemented in the software. 3.2 ASK Transmission The ASK modulation will performed by switching the power amplifier on and of due to the data to be transmitted. The transmitter's XTO and PLL are activated by setting the pin ENABLE to HIGH. Between the activation of the pin ENABLE and the pin PA_ENABLE minimum 3 ms time delay must be taken into account for the application with ATA5773, whereas a minimum 1 ms time delay for an application using ATA5771 or ATA5774. After the mentioned time delay the generated clock frequency by the RF transmitter can be used as reference for the data generation of the microcontroller block. 3.3 FSK Transmission The transmitter's XTO and PLL are activated by setting the pin ENABLE to HIGH. Like the ASK transmission a defined time delay must be taken into account between the activation of the pin ENABLE and the pin PA_ENABLE. After this time delay the clock frequency can be used as reference for the data rate generation and the data transmission using FSK modulation is ready. For this purpose an additional capacitor to the crystal's load capacitor will be switched between the high impedance and ground due to the data rate. Thus the reference frequency, which is crystal frequency, of the RF transmitter will be modulated. This results also in the transmitted spectrum. It is important that the switching element must have a defined low parasitic capacitance. The accuracy of the frequency deviation with XTAL pulling method is about 25% when the following tolerances are considered. 8 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 3-1. Tolerances of Frequency Modulation VS CStray1 CStray2 LM C4 XTAL CM RS C0 Crystal equivalent circuit C5 CSwitch Using C4 = 8.2 pF 5%, C5 = 10 pF 5%, a switch port with CSwitch = 3 pF 10%, stray capacitances on each side of the crystal of CStray1 = CStray2 = 1 pF 10%, a parallel capacitance of the crystal of C0 = 3.2 pF 10% and a crystal with CM = 13 fF 10%, results in a typical FSK deviation of 21.5 kHz with worst case tolerances of 16.25 kHz to 28.01 kHz. 3.4 CLK Output RF transmitter generated clock signal based on the devided crystal frequency. This will be available for the microcontroller as reference. The delivered signal is CMOS compatible if the load capacitance is lower than 10pF. 3.4.1 Clock Pulse Take-over The clock of the crystal oscillator can be used for clocking the microcontroller, which starts with an integrated RC-oscillator. After the generated clock signal of the RF transmitter is stable, the microcontroller will take over the clock signal and use it as reference generating the data rate, so that the message can be transmitted with crystal accuracy. 3.4.2 Output Matching and Power Setting The power amplifier is an open-collector output delivering a current pulse, which is nearly independent from the load impedance. Thus the delivered output power can be tuned via the load impedance of the antenna and the matching elements. This output configuration enables simple matching to any kind of antenna or to 50 which results in a high power efficiency {= Pout/(IS,PA VS) }. The maximum output power can be achieved at 3V supply voltage when the load impedance is optimized to * ZLoad = (255 + j192) for the Atmel ATA5773 with the power efficiency of 40% - Background: The current pulse of the power amplifier is 9mA and the maximum output power is delivered to a resistive load of 400 if the 1.0pF output capacitance of the power amplifier is compensated by the load impedance. And thus the load impedance of ZLoad = 400 || j/(2 x x f x 1.0 pF) = (255 + j192) is achieved for the maximum output power of 8dBm. * ZLoad = (166 + j223) for the Atmel ATA5774 with the power efficiency of 36% - Background: The current pulse of the power amplifier is 9mA and the maximum output power is delivered to a resistive load of 465 if the 1.0pF output capacitance of the power amplifier is compensated by the load impedance. And thus the load impedance of ZLoad = 465 || j/(2 x x f x 1.0 pF) = (166 + j223) is achieved for the maximum output power of 7.5dBm. 9 9137F-RKE-05/11 * ZLoad = (166 + j226) for the Atmel ATA5771 with the power efficiency of 24% - Background: The current pulse of the power amplifier is 7.7mA and the maximum output power is delivered to a resistive load of 475 if the 0.53pF output capacitance of the power amplifier is compensated by the load impedance. And thus the load impedance of ZLoad = 475 || j/(2 x x f x 0.53 pF) = (166 + j226) is achieved for the maximum output power of 5.5dBm. The load impedance is defined as the impedance seen from the power amplifier (pin ANT1 and pin ANT2) into the matching network. This large signal load impedance should not be mixed up with the small signal input impedance delivered as input characteristic of RF amplifiers and measured from the application into the IC, instead of from the IC into the application. Please take note that there must be a low resistive path between the VS and the collector output of the PA to deliver the DC current. Reduced output power will be achieved by lowering the real parallel part of the load impedance where the parallel imaginary part should be kept constant. Output power measurement can be performed using the circuit shown in Figure 3-2. Note that the component values must be changed to compensate for the individual board parasitics until the RF power amplifier has the right load impedance. In addition, the damping of the cable used to measure the output power must be calibrated out. Figure 3-2. Output Power Measurement Atmel ATA5771/73/74 VS C1 = 1 nF L1 = 47 nH ANT1 Z = 50 ZLopt ANT2 10 Power meter C2 = 3.3 pF Rin 50 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4. Microcontroller Block These data are referred to the data base of microcontroller Atmel ATtiny44V. 4.1 Overview The ATtiny44V is a low-power CMOS 8-bit microcontroller based on the Atmel AVR (R) enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATtiny44V achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed. 4.2 Block Diagram Figure 4-1. Block Diagram VCC 8-BIT DATABUS INTERNAL OSCILLATOR INTERNAL CALIBRATED OSCILLATOR TIMING AND CONTROL GND PROGRAM COUNTER STACK POINTER WATCHDOG TIMER PROGRAM FLASH SRAM MCU CONTROL REGISTER INSTRUCTION REGISTER MCU STATUS REGISTER GENERAL PURPOSE REGISTERS TIMER/ COUNTER0 X Y Z INSTRUCTION DECODER TIMER/ COUNTER1 CONTROL LINES ALU STATUS REGISTER INTERRUPT UNIT ANALOG COMPARATOR + - PROGRAMMING LOGIC EEPROM ISP INTERFACE DATA REGISTER PORT A DATA DIR. REG.PORT A PORT A DRIVERS PA7-PA0 ADC OSCILLATORS DATA REGISTER PORT B DATA DIR. REG.PORT B PORT B DRIVERS PB3-PB0 11 9137F-RKE-05/11 The Atmel AVR(R) core combines a rich instruction set with 32 general purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers. The Atmel ATtiny44V provides the following features: 4K byte of In-System Programmable Flash, 256 bytes EEPROM, 256 bytes SRAM, 12 general purpose I/O lines, 32 general purpose working registers, a 8-bit Timer/Counter with two PWM channels, a 16-bit timer/counter with two PWM channels, Internal and External Interrupts, a 8-channel 10-bit ADC, programmable gain stage (1x, 20x) for 12 differential ADC channel pairs, a programmable Watchdog Timer with internal Oscillator, internal calibrated oscillator, and three software selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counter, ADC, Analog Comparator, and Interrupt system to continue functioning. The Power-down mode saves the register contents, disabling all chip functions until the next Interrupt or Hardware Reset. The ADC Noise Reduction mode stops the CPU and all I/O modules except ADC, to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low power consumption. The device is manufactured using the Atmel high density non-volatile memory technology. The On-chip ISP Flash allows the Program memory to be re-programmed In-System through an SPI serial interface, by a conventional non-volatile memory programmer or by an On-chip boot code running on the AVR core. The ATtiny44V AVR is supported with a full suite of program and system development tools including: C Compilers, Macro Assemblers, Program Debugger/Simulators, In-Circuit Emulators, and Evaluation kits. 4.3 Automotive Quality Grade The ATtiny44V have been developed and manufactured according to the most stringent requirements of the international standard ISO-TS-16949 grade 1. This datasheet contains limit values extracted from the results of extensive characterization (Temperature and Voltage). The quality and reliability of the ATtiny44V have been verified during regular product qualification as per AEC-Q100. As indicated in the ordering information paragraph, the product is available in only one temperature grade. Table 4-1. Temperature Temperature Grade Identification for Automotive Products Temperature Identifier -40 ; +125 12 Z Comments Full Automotive Temperature Range Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.4 4.4.1 Pin Descriptions VCC Supply voltage. 4.4.2 GND Ground. 4.4.3 Port B (PB3...PB0) Port B is a 4-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability except PB3 which has the RESET capability. To use pin PB3 as an I/O pin, instead of RESET pin, program (`0') RSTDISBL fuse. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port B also serves the functions of various special features of the Atmel ATtiny44V as listed on Section 4.14.3 "Alternate Port Functions" on page 67. 4.4.4 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. The minimum pulse length is given in Figure 4-13 on page 47. Shorter pulses are not guaranteed to generate a reset. 4.4.5 Port A (PA7...PA0) Port A is a 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port A pins that are externally pulled low will source current if the pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port A has an alternate functions as analog inputs for the ADC, analog comparator, timer/counter, SPI and pin change interrupt as described in Section 4.14.3 "Alternate Port Functions" on page 67. 4.5 Resources A comprehensive set of development tools, drivers and application notes, and datasheets are available for download on http://www.atmel.com/avr. 4.6 About 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. For I/O Registers located in extended I/O map, "IN", "OUT", "SBIS", "SBIC", "CBI", and "SBI" instructions must be replaced with instructions that allow access to extended I/O. Typically "LDS" and "STS" combined with "SBRS", "SBRC", "SBR", and "CBR". 13 9137F-RKE-05/11 4.7 4.7.1 CPU Core Overview This section discusses the Atmel AVR(R) 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. 4.7.2 Architectural Overview Figure 4-2. Block Diagram of the Atmel AVR Architecture Data Bus 8-bit Flash Program Memory Program Counter Status and Control 32 x 8 General Purpose Registrers Control Lines Direct Addressing Instruction Decoder Indirect Addressing Instruction Register Interrupt Unit Watchdog Timer ALU Analog Comparator Timer/Counter 0 Data SRAM Timer/Counter 1 Universal Serial Interface EEPROM I/O 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. 14 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 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. Program flow is provided by conditional and unconditional jump and call instructions, able to directly address the whole address space. Most Atmel AVR(R) instructions have a single 16-bit word format. Every Program memory address contains a 16- or 32-bit instruction. 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. 4.7.3 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. Some implementations of the architecture also provide a powerful multiplier supporting both signed/unsigned multiplication and fractional format. See the "Instruction Set" section for a detailed description. 4.7.4 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, as specified in the Instruction Set Reference. This will in many cases remove the need for using the dedicated compare instructions, resulting in faster and more compact code. The Status Register is not automatically stored when entering an interrupt routine and restored when returning from an interrupt. This must be handled by software. 15 9137F-RKE-05/11 4.7.4.1 SREG - AVR Status Register Bit 7 6 5 4 3 2 1 0 0x3F (0xSF) I T H S V N Z C Read/Write R/W R/W R/W R/W R/W R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0 SREG * Bit 7 - I: Global Interrupt Enable The Global Interrupt Enable bit must be set for the interrupts to be enabled. The individual interrupt enable control is then performed in separate control registers. If the Global Interrupt Enable Register is cleared, none of the interrupts are enabled independent of the individual interrupt enable settings. The I-bit is cleared by hardware after an interrupt has occurred, and is set by the RETI instruction to enable subsequent interrupts. The I-bit can also be set and cleared by the application with the SEI and CLI instructions, as described in the instruction set reference. * Bit 6 - T: Bit Copy Storage The Bit Copy instructions BLD (Bit LoaD) and BST (Bit STore) use the T-bit as source or destination for the operated bit. A bit from a register in the Register File can be copied into T by the BST instruction, and a bit in T can be copied into a bit in a register in the Register File by the BLD instruction. * Bit 5 - H: Half Carry Flag The Half Carry Flag H indicates a Half Carry in some arithmetic operations. Half Carry is useful in BCD arithmetic. See the "Instruction Set Description" for detailed information. * Bit 4 - S: Sign Bit, S = N V The S-bit is always an exclusive or between the Negative Flag N and the Two's Complement Overflow Flag V. See the "Instruction Set Description" for detailed information. * Bit 3 - V: Two's Complement Overflow Flag The Two's Complement Overflow Flag V supports two's complement arithmetics. See the "Instruction Set Description" for detailed information. * Bit 2 - N: Negative Flag The Negative Flag N indicates a negative result in an arithmetic or logic operation. See the "Instruction Set Description" for detailed information. * Bit 1 - Z: Zero Flag The Zero Flag Z indicates a zero result in an arithmetic or logic operation. See the "Instruction Set Description" for detailed information. * Bit 0 - C: Carry Flag The Carry Flag C indicates a carry in an arithmetic or logic operation. See the "Instruction Set Description" for detailed information. 16 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.7.5 General Purpose Register File The Register File is optimized for the Atmel(R) AVR(R) 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-3 shows the structure of the 32 general purpose working registers in the CPU. Figure 4-3. Atmel AVR CPU General Purpose Working Registers 7 0 Addr. R0 0x00 R1 0x01 R2 0x02 ... R13 0x0D General R14 0x0E Purpose R15 0x0F Working R16 0x10 Registers 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-3, 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.7.5.1 The X-register, Y-register, and Z-register The registers R26..R31 have some 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-4 on page 18. 17 9137F-RKE-05/11 Figure 4-4. The X-, Y-, and Z-registers 15 XH XL 7 X-register 0 R27 (0x1B) YH YL 7 0 R29 (0x1D) Z-register 0 R26 (0x1A) 15 Y-register 0 7 0 7 0 R28 (0x1C) 15 ZH 7 0 ZL 7 R31 (0x1F) 0 0 R30 (0x1E) 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.7.6 Stack Pointer The Stack is mainly used for storing temporary data, for storing local variables and for storing return addresses after interrupts and subroutine calls. The Stack Pointer Register always points to the top of the Stack. Note that the Stack is implemented as growing from higher memory locations to lower memory locations. This implies that a Stack PUSH command decreases the Stack Pointer. The Stack Pointer points to the data SRAM Stack area where the Subroutine and Interrupt Stacks are located. This Stack space in the data SRAM must be defined by the program before any subroutine calls are executed or interrupts are enabled. The Stack Pointer must be set to point above 0x60. The Stack Pointer is decremented by one when data is pushed onto the Stack with the PUSH instruction, and it is decremented by two when the return address is pushed onto the Stack with subroutine call or interrupt. The Stack Pointer is incremented by one when data is popped from the Stack with the POP instruction, and it is incremented by two when data is popped from the Stack with return from subroutine RET or return from interrupt RETI. The Atmel AVR(R) Stack Pointer is implemented as two 8-bit registers in the I/O space. The number of bits actually used is implementation dependent. Note that the data space in some implementations of the AVR architecture is so small that only SPL is needed. In this case, the SPH Register will not be present. 4.7.6.1 SPH and SPL - Stack Pointer High and Low Bit 15 14 13 12 11 10 9 8 0x3E (0x5E) SP15 SP14 SP13 SP12 SP11 SP10 SP9 SP8 SPH 0x3D (0x5D) SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0 SPL 7 6 5 4 3 2 1 0 Read/Write Initial Value 18 R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.7.7 Instruction Execution Timing This section describes the general access timing concepts for instruction execution. The Atmel(R) AVR(R) 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-5 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 1MIPS per MHz with the corresponding unique results for functions per cost, functions per clocks, and functions per power-unit. Figure 4-5. 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-6 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. Figure 4-6. Single Cycle ALU Operation T1 T2 T3 T4 clkCPU Total Execution Time Register Operands Fetch ALU Operation Execute Result Write Back 4.7.8 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 Section 4.12 "Interrupts" on page 56. 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. 19 9137F-RKE-05/11 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 Atmel AVR(R) 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. Assembly Code Example in r16, SREG cli ; store SREG value ; disable interrupts during timed sequence sbi EECR, EEMPE ; start EEPROM write sbi EECR, EEPE out SREG, r16 ; restore SREG value (I-bit) C Code Example char cSREG; cSREG = SREG; /* store SREG value */ /* disable interrupts during timed sequence */ _CLI(); EECR |= (1<>EEPM0) /* Set up address and data registers */ EEARL = ucAddress; EEDR = ucData; /* Write logical one to EEMPE */ EECR |= (1< ... ; Set Stack Pointer to top of RAM ; Enable interrupts xxx ... ... 57 9137F-RKE-05/11 4.13 External Interrupts The External Interrupts are triggered by the INT0 pin or any of the PCINT11..0 pins. Observe that, if enabled, the interrupts will trigger even if the INT0 or PCINT11..0 pins are configured as outputs. This feature provides a way of generating a software interrupt. Pin change 0 interrupts PCI0 will trigger if any enabled PCINT7..0 pin toggles. Pin change 1 interrupts PCI1 will trigger if any enabled PCINT11..8 pin toggles. The PCMSK0 and PCMSK1 Registers control which pins contribute to the pin change interrupts. Pin change interrupts on PCINT11..0 are detected asynchronously. This implies that these interrupts can be used for waking the part also from sleep modes other than Idle mode. The INT0 interrupts can be triggered by a falling or rising edge or a low level. This is set up as indicated in the specification for the MCU Control Register - MCUCR. When the INT0 interrupt is enabled and is 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, described in Section 4.9.1 "Clock Systems and their Distribution" on page 32. Low level interrupt on INT0 is detected asynchronously. This implies that this interrupt can be used for waking the part also from sleep modes other than Idle mode. The I/O clock is halted in all sleep modes except Idle mode. 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 by the SUT and CKSEL Fuses as described in Section 4.9 "System Clock and Clock Options" on page 32. 4.13.1 Pin Change Interrupt Timing An example of timing of a pin change interrupt is shown in Figure 4-20. Figure 4-20. 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 58 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.13.2 4.13.2.1 Register Description MCUCR - MCU Control Register The External Interrupt Control Register A contains control bits for interrupt sense control. Bit 7 6 5 4 3 2 1 0 BODS PUD SE SM1 SM0 BODSE ISC01 ISC00 Read/Write R/W R/W R/W R/W R/W R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0 MCUCR Bits 1, 0 - ISC01, ISC00: Interrupt Sense Control 0 Bit 1 and Bit 0 The External Interrupt 0 is activated by the external pin INT0 if the SREG I-flag and the corresponding interrupt mask are set. The level and edges on the external INT0 pin that activate the interrupt are defined in Table 4-20. 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. If low level interrupt is selected, the low level must be held until the completion of the currently executing instruction to generate an interrupt. Table 4-20. 4.13.2.2 Interrupt 0 Sense Control ISC01 ISC00 Description 0 0 The low level of INT0 generates an interrupt request. 0 1 Any logical change on INT0 generates an interrupt request. 1 0 The falling edge of INT0 generates an interrupt request. 1 1 The rising edge of INT0 generates an interrupt request. GIMSK - General Interrupt Mask Register Bit 7 6 5 4 3 2 1 0x3B (0x5B) - INT0 PCIE1 PCIE0 - - - 0 - Read/Write R R/W R/W R/w R R R R Initial Value 0 0 0 0 0 0 0 0 GIMSK * Bits 7, 3..0 - Res: Reserved Bits These bits are reserved bits in the ATtiny44V and will always read as zero. * Bit 6 - INT0: External Interrupt Request 0 Enable When the INT0 bit is set (one) and the I-bit in the Status Register (SREG) is set (one), the external pin interrupt is enabled. The Interrupt Sense Control0 bits 1/0 (ISC01 and ISC00) in the External Interrupt Control Register A (EICRA) define whether the external interrupt is activated on rising and/or falling edge of the INT0 pin or level sensed. Activity on the pin will cause an interrupt request even if INT0 is configured as an output. The corresponding interrupt of External Interrupt Request 0 is executed from the INT0 Interrupt Vector. * Bit 5 - PCIE1: Pin Change Interrupt Enable 1 When the PCIE1 bit is set (one) and the I-bit in the Status Register (SREG) is set (one), pin change interrupt 1 is enabled. Any change on any enabled PCINT11..8 pin will cause an interrupt. The corresponding interrupt of Pin Change Interrupt Request is executed from the PCI1 Interrupt Vector. PCINT11..8 pins are enabled individually by the PCMSK1 Register. 59 9137F-RKE-05/11 * Bit 4- PCIE0: Pin Change Interrupt Enable 0 When the PCIE0 bit is set (one) and the I-bit in the Status Register (SREG) is set (one), pin change interrupt 0 is enabled. Any change on any enabled PCINT7..0 pin will cause an interrupt. The corresponding interrupt of Pin Change Interrupt Request is executed from the PCI0 Interrupt Vector. PCINT7..0 pins are enabled individually by the PCMSK0 Register. 4.13.2.3 GIFR - General Interrupt Flag Register Bit 7 6 5 4 3 2 1 0 0x3A (0x5A) - INTF0 PCIF1 PCIF0 - - - - Read/Write R R/W R/W R/W R R R R Initial Value 0 0 0 0 0 0 0 0 GIFR * Bits 7, 3..0 - Res: Reserved Bits These bits are reserved bits in the ATtiny44V and will always read as zero. * Bit 6 - INTF0: External Interrupt Flag 0 When an edge or logic change on the INT0 pin triggers an interrupt request, INTF0 becomes set (one). If the I-bit in SREG and the INT0 bit in GIMSK are set (one), 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. This flag is always cleared when INT0 is configured as a level interrupt. * Bit 5 - PCIF1: Pin Change Interrupt Flag 1 When a logic change on any PCINT11..8 pin triggers an interrupt request, PCIF1 becomes set (one). If the I-bit in SREG and the PCIE1 bit in GIMSK are set (one), 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 4- PCIF0: Pin Change Interrupt Flag 0 When a logic change on any PCINT7..0 pin triggers an interrupt request, PCIF becomes set (one). If the I-bit in SREG and the PCIE0 bit in GIMSK are set (one), 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. 4.13.2.4 PCMSK1 - Pin Change Mask Register 1 Bit 7 6 5 4 3 2 1 0 0x20 (0x40) - - - - PCINT11 PCINT10 PCINT9 PCINT8 Read/Write R R R R R/W R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0 PCMSK1 * Bits 7, 4- Res: Reserved Bits These bits are reserved bits in the ATtiny44V and will always read as zero. * Bits 3..0 - PCINT11..8: Pin Change Enable Mask 11..8 Each PCINT11..8 bit selects whether pin change interrupt is enabled on the corresponding I/O pin. If PCINT11..8 is set and the PCIE1 bit in GIMSK is set, pin change interrupt is enabled on the corresponding I/O pin. If PCINT11..8 is cleared, pin change interrupt on the corresponding I/O pin is disabled. 60 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.13.2.5 PCMSK0 - Pin Change Mask Register 0 Bit 7 6 5 4 3 2 1 0 0x12 (0x32) PCINT7 PCINT6 PCINT5 PCINT4 PCINT3 PCINT2 PCINT1 PCINT0 Read/Write R/W R/W R/W R/W R/W R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0 PCMSK0 * Bits 7..0 - PCINT7..0: Pin Change Enable Mask 7..0 Each PCINT7..0 bit selects whether pin change interrupt is enabled on the corresponding I/O pin. If PCINT7..0 is set and the PCIE0 bit in GIMSK is set, pin change interrupt is enabled on the corresponding I/O pin. If PCINT7..0 is cleared, pin change interrupt on the corresponding I/O pin is disabled. 4.14 4.14.1 I/O Ports Overview All AVR(R) 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 (if configured as input). Each output buffer has symmetrical drive characteristics with both high 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 4-21. See Section 8. "Electrical Characteristics" on page 187 for a complete list of parameters. Figure 4-21. 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 Table 4-29. 61 9137F-RKE-05/11 Three I/O memory address locations are allocated for each port, one each for the Data Register - PORTx, Data Direction Register - DDRx, and the Port Input Pins - PINx. The Port Input Pins I/O location is read only, while the Data Register and the Data Direction 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. In addition, the Pull-up Disable - PUD bit in MCUCR disables the pull-up function for all pins in all ports when set. Using the I/O port as General Digital I/O is described in Section 4.14.2 "Ports as General Digital I/O" on page 62. Most port pins are multiplexed with alternate functions for the peripheral features on the device. How each alternate function interferes with the port pin is described in Section 4.14.3 "Alternate Port Functions" on page 67. Refer to the individual module sections for a full description of the alternate functions. Note that enabling the alternate function of some of the port pins does not affect the use of the other pins in the port as general digital I/O. 4.14.2 Ports as General Digital I/O The ports are bi-directional I/O ports with optional internal pull-ups. Figure 4-22 shows a functional description of one I/O-port pin, here generically called Pxn. Figure 4-22. General Digital I/O(1) PUD Q D DDxn Q CLR WDx RESET DATA BUS RDx 1 Q Pxn D 0 PORTxn Q CLR RESET WRx WPx RRx SLEEP SYNCHRONIZER D Q L Q D RPx Q PINxn Q clk I/O PUD: SLEEP: clkI/O: Note: 62 PULLUP DISABLE SLEEP CONTROL I/O CLOCK WDx: RDx: WRx: RRx: RPx: WPx: WRITE DDRx READ DDRx WRITE PORTx READ PORTx REGISTER READ PORTx PIN WRITE PINx REGISTER 1. WRx, WPx, WDx, RRx, RPx, and RDx are common to all pins within the same port. clkI/O, SLEEP, and PUD are common to all ports. Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.14.2.1 Configuring the Pin Each port pin consists of three register bits: DDxn, PORTxn, and PINxn. As shown in Table 4-29 on page 75, the DDxn bits are accessed at the DDRx I/O address, the PORTxn bits at the PORTx 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 input pin, the pull-up resistor is activated. To switch the pull-up resistor off, PORTxn has to be written logic zero or the pin has to be configured as an output pin. The port pins are tri-stated when reset condition becomes active, even if no clocks are running. 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). 4.14.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. 4.14.2.3 Switching Between Input and Output When switching between tri-state ({DDxn, PORTxn} = 0b00) and output high ({DDxn, PORTxn} = 0b11), an intermediate state with either pull-up enabled {DDxn, PORTxn} = 0b01) or output low ({DDxn, PORTxn} = 0b10) must occur. Normally, the pull-up enabled state is fully acceptable, as a high-impedant environment will not notice the difference between a strong high driver and a pull-up. If this is not the case, the PUD bit in the MCUCR Register can be set to disable all pull-ups in all ports. Switching between input with pull-up and output low generates the same problem. The user must use either the tri-state ({DDxn, PORTxn} = 0b00) or the output high state ({DDxn, PORTxn} = 0b10) as an intermediate step. Table 4-21 summarizes the control signals for the pin value. Table 4-21. Port Pin Configurations DDxn PORTxn PUD (in MCUCR) I/O Pull-up 0 0 X Input No Tri-state (Hi-Z) 0 1 0 Input Yes Pxn will source current if ext. pulled low. 0 1 1 Input No Tri-state (Hi-Z) 1 0 X Output No Output Low (Sink) 1 1 X Output No Output High (Source) Comment 63 9137F-RKE-05/11 4.14.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 4-22 on page 62, 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 4-23 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 4-23. 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. When reading back a software assigned pin value, a nop instruction must be inserted as indicated in Figure 4-24 on page 65. 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. 64 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 4-24. 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 The following code example shows how to set port A pins 0 and 1 high, 2 and 3 low, and define the port pins from 4 to 5 as input with a pull-up assigned to port pin 4. 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. Assembly Code Example(1) ... ; Define pull-ups and set outputs high ; Define directions for port pins ldi r16,(1< CSn2:0 > 1). The number of system clock cycles from when the timer is enabled to the first count occurs can be from 1 to N+1 system clock cycles, where N equals the prescaler divisor (8, 64, 256, or 1024). It is possible to use the Prescaler Reset for synchronizing the Timer/Counter to program execution. 4.17.1.1 External Clock Source An external clock source applied to the Tn pin can be used as Timer/Counter clock (clkTn). The Tn pin is sampled once every system clock cycle by the pin synchronization logic. The synchronized (sampled) signal is then passed through the edge detector. Figure 4-50 shows a functional equivalent block diagram of the Tn synchronization and edge detector logic. The registers are clocked at the positive edge of the internal system clock (clkI/O). The latch is transparent in the high period of the internal system clock. The edge detector generates one clk T 0 pulse for each positive (CSn2:0 = 7) or negative (CSn2:0 = 6) edge it detects. Figure 4-50. T0 Pin Sampling Tn D Q D Q D Tn_sync (To Clock Select Logic) Q LE clk I/O Synchronization Edge Detector The synchronization and edge detector logic introduces a delay of 2.5 to 3.5 system clock cycles from an edge has been applied to the Tn pin to the counter is updated. Enabling and disabling of the clock input must be done when Tn has been stable for at least one system clock cycle, otherwise it is a risk that a false Timer/Counter clock pulse is generated. 124 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Each half period of the external clock applied must be longer than one system clock cycle to ensure correct sampling. The external clock must be guaranteed to have less than half the system clock frequency (fExtClk < fclk_I/O/2) given a 50/50% duty cycle. Since the edge detector uses sampling, the maximum frequency of an external clock it can detect is half the sampling frequency (Nyquist sampling theorem). However, due to variation of the system clock frequency and duty cycle caused by Oscillator source (crystal, resonator, and capacitors) tolerances, it is recommended that maximum frequency of an external clock source is less than fclk_I/O/2.5. An external clock source can not be prescaled. Figure 4-51. Prescaler for Timer/Counter0 clk I/O Clear PSR10 T0 Synchronization clkT0 Note: 4.17.2 4.17.2.1 1. The synchronization logic on the input pins (T0) is shown in Figure 4-50 on page 124. Register Description GTCCR - General Timer/Counter Control Register Bit 7 6 5 4 3 2 1 0 0x23 (0x43) TSM - - - - - - PSR10 Read/Write R/W R R R R R R R/W Initial Value 0 0 0 0 0 0 0 0 GTCCR * Bit 7 - TSM: Timer/Counter Synchronization Mode Writing the TSM bit to one activates the Timer/Counter Synchronization mode. In this mode, the value that is written to the PSR10 bit is kept, hence keeping the Prescaler Reset signal asserted. This ensures that the Timer/Counter is halted and can be configured without the risk of advancing during configuration. When the TSM bit is written to zero, the PSR10 bit is cleared by hardware, and the Timer/Counter start counting. * Bit 0 - PSR10: Prescaler 0 Reset Timer/Counter n When this bit is one, the Timer/Countern prescaler will be Reset. This bit is normally cleared immediately by hardware, except if the TSM bit is set. 125 9137F-RKE-05/11 4.18 4.18.1 USI - Universal Serial Interface Features * * * * * * 4.18.2 Two-wire Synchronous Data Transfer (Master or Slave) Three-wire Synchronous Data Transfer (Master or Slave) Data Received Interrupt Wakeup from Idle Mode In Two-wire Mode: Wake-up from All Sleep Modes, Including Power-down Mode Two-wire Start Condition Detector with Interrupt Capability Overview The Universal Serial Interface (USI), provides the basic hardware resources needed for serial communication. Combined with a minimum of control software, the USI allows significantly higher transfer rates and uses less code space than solutions based on software only. Interrupts are included to minimize the processor load. A simplified block diagram of the USI is shown in Figure 4-52. For the actual placement of I/O pins. CPU accessible I/O Registers, including I/O bits and I/O pins, are shown in bold. The device-specific I/O Register and bit locations are listed in the Section 4.9.10 "Register Description" on page 39. Figure 4-52. Universal Serial Interface, Block Diagram USIPF 1 0 4-bit Counter USIDC USIOIF USISIF (Output only) DI/SDA (Input/Open Drain) USCK/SCL (Input/Open Drain) 3 2 USIDR DATA BUS DO Bit0 Bit7 D Q LE TIM0 COMP 3 2 0 1 1 0 CLOCK HOLD [1] Two-wire Clock Control Unit USISR USITC USICLK USICS0 USICS1 USIWM0 USIWM1 USISIE USIOIE 2 USICR The 8-bit Shift Register is directly accessible via the data bus and contains the incoming and outgoing data. The register has no buffering so the data must be read as quickly as possible to ensure that no data is lost. The most significant bit is connected to one of two output pins depending of the wire mode configuration. A transparent latch is inserted between the Serial Register Output and output pin, which delays the change of data output to the opposite clock edge of the data input sampling. The serial input is always sampled from the Data Input (DI) pin independent of the configuration. 126 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 The 4-bit counter can be both read and written via the data bus, and can generate an overflow interrupt. Both the Serial Register and the counter are clocked simultaneously by the same clock source. This allows the counter to count the number of bits received or transmitted and generate an interrupt when the transfer is complete. Note that when an external clock source is selected the counter counts both clock edges. In this case the counter counts the number of edges, and not the number of bits. The clock can be selected from three different sources: The USCK pin, Timer/Counter0 Compare Match or from software. The Two-wire clock control unit can generate an interrupt when a start condition is detected on the Two-wire bus. It can also generate wait states by holding the clock pin low after a start condition is detected, or after the counter overflows. 4.18.3 4.18.3.1 Functional Descriptions Three-wire Mode The USI Three-wire mode is compliant to the Serial Peripheral Interface (SPI) mode 0 and 1, but does not have the slave select (SS) pin functionality. However, this feature can be implemented in software if necessary. Pin names used by this mode are: DI, DO, and USCK. Figure 4-53. Three-wire Mode Operation, Simplified Diagram DO Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 DI Bit0 USCK SLAVE DO Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 DI Bit0 USCK PORTxn MASTER Figure 4-53 shows two USI units operating in Three-wire mode, one as Master and one as Slave. The two Shift Registers are interconnected in such way that after eight USCK clocks, the data in each register are interchanged. The same clock also increments the USI's 4-bit counter. The Counter Overflow (interrupt) Flag, or USIOIF, can therefore be used to determine when a transfer is completed. The clock is generated by the Master device software by toggling the USCK pin via the PORT Register or by writing a one to the USITC bit in USICR. 127 9137F-RKE-05/11 Figure 4-54. Three-wire Mode, Timing Diagram CYCLE ( Reference ) 1 2 3 4 5 6 7 8 USCK USCK DO MSB DI MSB A B C 6 5 4 3 2 1 LSB 6 5 4 3 2 1 LSB D E The Three-wire mode timing is shown in Figure 4-54. At the top of the figure is a USCK cycle reference. One bit is shifted into the USI Shift Register (USIDR) for each of these cycles. The USCK timing is shown for both external clock modes. In External Clock mode 0 (USICS0 = 0), DI is sampled at positive edges, and DO is changed (Data Register is shifted by one) at negative edges. External Clock mode 1 (USICS0 = 1) uses the opposite edges versus mode 0, i.e., samples data at negative and changes the output at positive edges. The USI clock modes corresponds to the SPI data mode 0 and 1. Referring to the timing diagram (Figure 4-54), a bus transfer involves the following steps: 1. The Slave device and Master device sets up its data output and, depending on the protocol used, enables its output driver (mark A and B). The output is set up by writing the data to be transmitted to the Serial Data Register. Enabling of the output is done by setting the corresponding bit in the port Data Direction Register. Note that point A and B does not have any specific order, but both must be at least one half USCK cycle before point C where the data is sampled. This must be done to ensure that the data setup requirement is satisfied. The 4-bit counter is reset to zero. 2. The Master generates a clock pulse by software toggling the USCK line twice (C and D). The bit value on the slave and master's data input (DI) pin is sampled by the USI on the first edge (C), and the data output is changed on the opposite edge (D). The 4-bit counter will count both edges. 3. Step 2 is repeated eight times for a complete register (byte) transfer. 4. After eight clock pulses (i.e., 16 clock edges) the counter will overflow and indicate that the transfer is completed. The data bytes transferred must now be processed before a new transfer can be initiated. The overflow interrupt will wake up the processor if it is set to Idle mode. Depending of the protocol used the slave device can now set its output to high impedance. 128 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.18.3.2 SPI Master Operation Example The following code demonstrates how to use the USI module as a SPI Master: SPITransfer: out USIDR,r16 ldi r16,(1< 2 CPU clock cycles for fck < 12 MHz, 3 CPU clock cycles for fck >= 12MHz High: > 2 CPU clock cycles for fck < 12 MHz, 3 CPU clock cycles for fck >= 12MHz 4.23.6.1 Serial Programming Algorithm When writing serial data to the Atmel(R) ATtiny44V, data is clocked on the rising edge of SCK. When reading data from the ATtiny44V, data is clocked on the falling edge of SCK. See Figure 8-3 on page 194 and Figure 8-4 on page 194 for timing details. To program and verify the ATtiny44V in the Serial Programming mode, the following sequence is recommended (see four byte instruction formats in Table 4-66 on page 173): 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 of at least two CPU clock cycles duration after SCK has been set to "0". 2. Wait for at least 20 ms and enable serial programming by sending the Programming Enable serial instruction to pin MOSI. 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. Whether 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. 4. The Flash is programmed one page at a time. The memory page is loaded one byte at a time by supplying the 5 LSB of the address and data together with the Load Program memory Page instruction. To ensure correct loading of the page, the data low byte must be loaded before data high byte is applied for a given address. The Program memory Page is stored by loading the Write Program memory Page instruction with the 3 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 4-65 on page 172.) Accessing the serial programming interface before the Flash write operation completes can result in incorrect programming. 171 9137F-RKE-05/11 5. A: The EEPROM array is programmed one byte at a time by supplying the address and data together with the appropriate Write instruction. An EEPROM memory location is first 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 4-65 on page 172.) In a chip erased device, no 0xFFs in the data file(s) need to be programmed. B: The EEPROM array is programmed one page at a time. The Memory page is loaded one byte at a time by supplying the 2 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 4 MSB of the address. When using EEPROM page access only byte locations loaded with the Load EEPROM Memory Page instruction is altered. The remaining locations remain unchanged. If polling (RDY/BSY) is not used, the used must wait at least tWD_EEPROM before issuing the next page (See Table 4-65 on page 172). 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 serial output MISO. 7. At the end of the programming session, RESET can be set high to commence normal operation. 8. Power-off sequence (if needed): Set RESET to "1". Turn VCC power off. Table 4-65. 172 Minimum Wait Delay Before Writing the Next Flash or EEPROM Location Symbol Minimum Wait Delay tWD_FLASH 4.5 ms tWD_EEPROM 4.0 ms tWD_ERASE 4.0 ms tWD_FUSE 4.5 ms Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.23.6.2 Serial Programming Instruction set Table 4-66 and Figure 4-74 on page 174 describes the Instruction set. Table 4-66. Serial Programming Instruction Set Instruction Format (1) 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 $4D $00 Extended adr $00 Load Instructions Load Extended Address byte Load Program Memory Page, High byte $48 adr MSB adr LSB high data byte in Load Program Memory Page, Low byte $40 adr MSB adr LSB low data byte in Load EEPROM Memory Page (page access) $C1 $00 adr LSB 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 $00 adr LSB data byte out Read Lock bits $58 $00 $00 data byte out Read Signature Byte $30 $00 adr LSB data byte out Read Fuse bits $50 $00 $00 data byte out Read Fuse High bits $58 $08 $00 data byte out Read Extended Fuse Bits $50 $08 $00 data byte out Read Calibration Byte $38 $00 $00 data byte out Write Program Memory Page $4C adr MSB adr LSB $00 Write EEPROM Memory $C0 $00 adr LSB data byte in Read Instructions Write Instructions(6) Write EEPROM Memory Page (page access) $C2 $00 adr LSB $00 Write Lock bits $AC $E0 $00 data byte in Write Fuse bits $AC $A0 $00 data byte in Write Fuse High bits $AC $A8 $00 data byte in Write Extended Fuse Bits $AC $A4 $00 data byte in Notes: 1. Not all instructions are applicable for all parts. 2. a = address 3. Bits are programmed `0', unprogrammed `1'. 4. To ensure future compatibility, unused Fuses and Lock bits should be unprogrammed (`1') . 5. Refer to the correspondig section for Fuse and Lock bits, Calibration and Signature bytes and Page size. 6. Instructions accessing program memory use a word address. This address may be random within the page range. 7. See htt://www.atmel.com/avr for Application Notes regarding programming and programmers. 173 9137F-RKE-05/11 If the LSB in 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 4-74 on page 174. Figure 4-74. 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 MSB A Bit 15 B Byte 3 Write Program Memory Page/ Write EEPROM Memory Page Byte 1 Byte 4 Byte 2 Adr LSB Adr MSB Bit 15 B 0 Byte 3 Byte 4 Adrr LSB B 0 Page Buffer Page Offset Page 0 Page 1 Page 2 Page Number Page N-1 Program Memory/ EEPROM Memory 174 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.23.7 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 Atmel(R) ATtiny44V. Figure 4-75. High-voltage Serial Programming +11.5 - 12.5V SCI +1.8 - 5.5V PB3 (RESET) VCC PB0 PA4 SDO PA5 SII PA6 SDI GND Table 4-67. Pin Name Mapping Signal Name in High-voltage Serial Programming Mode Pin Name I/O Function 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) The minimum period for the Serial Clock Input (SCI) during High-voltage Serial Programming is 220 ns. Table 4-68. Pin Values Used to Enter Programming Mode Pin Symbol Value PA0 Prog_enable[0] 0 PA1 Prog_enable[1] 0 PA2 Prog_enable[2] 0 175 9137F-RKE-05/11 4.23.8 4.23.8.1 High-voltage Serial Programming Algorithm To program and verify the Atmel(R) ATtiny44V in the High-voltage Serial Programming mode, the following sequence is recommended (See instruction formats in Table 4-70 on page 179): Enter High-voltage Serial Programming Mode The following algorithm puts the device in High-voltage Serial Programming mode: 1. Apply 4.5 - 5.5V between VCC and GND. 2. Set RESET pin to "0" and toggle SCI at least six times. 3. Set the Prog_enable pins listed in Table 4-68 on page 175 to "000" and wait at least 100 ns. 4. Apply VHVRST - 5.5V to RESET. Keep the Prog_enable pins unchanged for at least tHVRST after the High-voltage has been applied to ensure the Prog_enable signature has been latched. 5. Shortly after latching the Prog_enable signature, the device will activly output data on the Prog_enable[2]/SDO pin, and the resulting drive contention may increase the power consumption. To minimize this drive contention, release the Prog_enable[2] pin after tHVRST has elapsed. 6. Wait at least 50 s before giving any serial instructions on SDI/SII. Table 4-69. 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 4.23.8.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. 4.23.8.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. Note: 1. The EEPROM memory is preserved during Chip Erase if the EESAVE Fuse is programmed. 1. Load command "Chip Erase" (see Table 4-70 on page 179). 2. Wait after Instr. 3 until SDO goes high for the "Chip Erase" cycle to finish. 3. Load Command "No Operation". 176 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 4.23.8.4 Programming the Flash The Flash is organized in pages, see Section 4.23.5 "Page Size" on page 170. 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 4-70 on page 179). 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 ATtiny44V, data is clocked on the rising edge of the serial clock, see Figure 8-5 on page 195, Figure 4-75 on page 175 and Table 8-8 on page 195 for details. Figure 4-76. Addressing the Flash which is Organized in Pages PCMSB PROGRAM COUNTER PAGEMSB 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 4-77. High-voltage Serial Programming Waveforms SDI PB0 MSB LSB SII PB1 MSB LSB SDO PB2 SCI PB3 MSB 0 LSB 1 2 3 4 5 6 7 8 9 10 177 9137F-RKE-05/11 4.23.8.5 Programming the EEPROM The EEPROM is organized in pages, see Table 8-7 on page 194. 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 4-70 on page 179): 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". 4.23.8.6 Reading the Flash The algorithm for reading the Flash memory is as follows (refer to Table 4-70 on page 179): 1. Load Command "Read Flash". 2. Read Flash Low and High Bytes. The contents at the selected address are available at serial output SDO. 4.23.8.7 Reading the EEPROM The algorithm for reading the EEPROM memory is as follows (refer to Table 4-70 on page 179): 1. Load Command "Read EEPROM". 2. Read EEPROM Byte. The contents at the selected address are available at serial output SDO. 4.23.8.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 4-70 on page 179. 4.23.8.9 Reading the Signature Bytes and Calibration Byte The algorithms for reading the Signature bytes and Calibration byte are shown in Table 4-70 on page 179. 4.23.8.10 Power-off sequence Set SCI to "0". Set RESET to "1". Turn VCC power off. 178 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Table 4-70. High-voltage Serial Programming Instruction Set for Atmel(R) ATtiny44V 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 Chip Erase 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 Load "Write Flash" Command 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 x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx Load Flash Page SDO Buffer SDI Load "Read Flash" Command 0_dddd_dddd_00 0_0000_0000_00 0_0000_0000_00 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 0_0000_000a_00 0_0000_0000_00 0_0000_0000_00 0_0001_1100_00 0_0110_0100_00 0_0110_1100_00 x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx Load EEPROM Page Buffer Repeat after Instr. 1 - 7until the entire page buffer is filled or until all data within the page is filled. See Note 1. 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. See Note 1. SDI 0_0000_0010_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI 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 x_xxxx_xxxx_xx q_qqqq_qqqx_xx Read Flash Low SDO and High Bytes SDI Load "Write EEPROM" Command Wait after Instr.3 until SDO goes high for the Chip Erase cycle to finish. Enter Flash Programming code. SII Load Flash High SDI Address and SII Program Page SDO Operation Remarks Enter Flash Read mode. x_xxxx_xxxx_xx x_xxxx_xxxx_xx 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 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_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. See Note 2. Note: 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 = CKDIV8 Fuse, A = CKOUT 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 Notes: 1. For page sizes less than 256 words, parts of the address (bbbb_bbbb) will be parts of the page address. 2. For page sizes less than 256 bytes, parts of the address (bbbb_bbbb) will be parts of the page address. 3. 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. 179 9137F-RKE-05/11 Table 4-70. High-voltage Serial Programming Instruction Set for Atmel(R) ATtiny44V (Continued) Instruction Format Instruction Program EEPROM Page Write EEPROM Byte Load "Read EEPROM" Command Read EEPROM Byte Write Fuse Low Bits Instr.1/5 Write Lock Bits Read Fuse Low Bits Instr.4 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 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx 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_0000_0011_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI 0_bbbb_bbbb_00 0_aaaa_aaaa_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 Enter EEPROM Read mode. SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx q_qqqq_qqq0_00 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 0_0100_0000_00 0_IHGF_EDCB_00 0_0000_0000_00 0_0000_0000_00 0_0100_1100_00 0_0010_1100_00 0_0111_0100_00 0_0111_1100_00 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 x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0010_0000_00 0_0000_0021_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 x_xxxx_xxxx_xx SDO 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 0_0000_0100_00 0_0000_0000_00 0_0000_0000_00 0_0100_1100_00 0_0111_1010_00 0_0111_1100_00 x_xxxx_xxxx_xx x_xxxx_xxxx_xx I_HGFE_DCBx_xx SDI 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 x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxJx_xx SDO Repeat Instr. 1 - 6 for each new address. Wait after Instr. 6 until SDO goes high. See Note 3. Instr. 5-6 SDI SDO Operation Remarks 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. 0_0000_0000_00 SDI Read Fuse High SII Bits SDO Read Fuse Extended Bits Instr.3/7 SDI SDI Write Fuse High SII Bits SDO Write Fuse Extended Bits Instr.2/6 Repeat Instr. 1, 3 - 4 for each new address. Repeat Instr. 2 for a new 256 byte page. 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. 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. Reading F - B = "0" means the Fuse bit is programmed. Reading J = "0" means the Fuse bit is programmed. Note: 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 = CKDIV8 Fuse, A = CKOUT 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 Notes: 1. For page sizes less than 256 words, parts of the address (bbbb_bbbb) will be parts of the page address. 2. For page sizes less than 256 bytes, parts of the address (bbbb_bbbb) will be parts of the page address. 3. 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. 180 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Table 4-70. High-voltage Serial Programming Instruction Set for Atmel(R) ATtiny44V (Continued) Instruction Format Instruction Read Lock Bits Read Signature Bytes Instr.1/5 Instr.3/7 Instr.4 SDI 0_0000_0100_00 0_0000_0000_00 0_0000_0000_00 SII 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 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 0_0000_1000_00 0_0000_0000_00 0_0000_0000_00 0_0000_0000_00 0_0100_1100_00 0_0000_1100_00 0_0111_1000_00 0_0111_1100_00 x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx p_pppp_pppx_xx SDI Read Calibration SII Byte SDO Load "No Operation" Command Instr.2/6 SDI 0_0000_0000_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx Operation Remarks Reading 2, 1 = "0" means the Lock bit is programmed. Repeats Instr 2 4 for each signature byte address. Note: 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 = CKDIV8 Fuse, A = CKOUT 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 Notes: 1. For page sizes less than 256 words, parts of the address (bbbb_bbbb) will be parts of the page address. 2. For page sizes less than 256 bytes, parts of the address (bbbb_bbbb) will be parts of the page address. 3. 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. 181 9137F-RKE-05/11 5. Application Figure 5-1 illustrates a principle application circuit using loop antenna. For the blocking measure of the power supply voltage, a capacitor value of C3 = 68 nF/X7R is recommended. C1 and C2 are used to match the loop antenna to the power amplifier. Two capacitors in series should be used to achieve a better tolerance value for C2 and allowing the possibility of realizing the ZLoad,opt using standard valued capacitors. Figure 5-1. The Principle Application Circuit Using a Loop Antenna for ASK Modulation ATA5771/73/74 S1 PXY VDD S1 PXY GND S1 PXY PXY PXY PXY PXY PXY PXY PXY PXY PXY VS Power up / down ENABLE GND_RF CLK f/4 PLL C3 VCC_RF XTO VCO VS C4 PA_ENABLE C2 ANT2 PA ANT1 Loop Antenna C1 VS Together with the pins and the PCB board wires C1 forms a series resonance loop that suppress the 1st harmonic. Therefore the position of C1 on the PCB is important. Generally the best suppression is achieved when C1 is placed as close as possible to the pins ANT1 and ANT2. The loop antenna should not exceed a width of 1.5 mm, otherwise the Q-factor of the loop antenna is too high. The capacitor C4 should be selected that the XTO runs on the load resonance frequency of the crystal. 182 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 5-2. Typical ASK Application Atmel(R) ATA577x VCC C8 C5 VCC Q1 VDD SW1 GND XTAL VCC_RF GND_RF ENABLE GND 23 PA0/ADC0 SW2 C7 R3 PA1/ADC1 PB0/XTAL1 C6 SW3 PA2/ADC2 PB1/XTAL2 ATA577x PA4/ADC4 GND ANT1 PA5/ADC5 ANT2 PA7 ADC7 PA_ENABLE PB2 CLK PA3/ADC3 PA6 ADC6 PB3/RESET C1 VCC R1 R2 L1 L2 C2 Table 5-1. C3 C4 Bill of Material Component Type/ Manufacturer Note Value 315 MHz 433.92MHz 868.3MHz L1 100nH 82nH 22nH LL1608-FSL/ TOKO L2 39nH 27nH 2.2nH LL1608-FSL/ TOKO C1 1nF 1nF 1nF GRM1885C/ Murata C2 3.9pF 2.7pF 1.5pF GRM1885C/ Murata This cap must be placed as close as possible to the pin Ant1 and Ant2 C3 27pF 16pF 4.3pF GRM1885C/ Murata On the demo board 2 capacitors in series are used to reduce the tolerance C4 3.9pF 1.6pF 0.3pF GRM1885C/ Murata On the demo board 2 capacitors in series are used to reduce the tolerance C5 68nF 68nF 68nF GRM188R71C/ This cap must placed as close as possible to the Murata VCC_RF 183 9137F-RKE-05/11 Table 5-1. Bill of Material (Continued) Component Type/ Manufacturer Note Value C6 100nF 100nF 100nF GRM188R71C / This cap must placed as close as possible to the Murata VDD C7 100nF 100nF 100nF GRM188R71C / Murata C8 10pF 12pF 12pF GRM1885C/ Murata Q1 9.843750MHz 13.56MHz 13.567187MHz DSX530GK/ KDS R1 100k 100k 100k R2 100k 100k 100k R3 10k 10k 10k Figure 5-3. Typical FSK Application Atmel(R) ATA577x C8 VCC T1 C5 Q1 C9 GND XTAL VCC_RF SW1 PA0/ADC0 SW2 C7 R3 GND_RF VDD ENABLE GND VCC PA1/ADC1 PB0/XTAL1 C6 PB1/XTAL2 SW3 PA2/ADC2 ATA577x PB2 PA4/ADC4 GND ANT1 PA5/ADC5 ANT2 PA6 ADC6 PA7 ADC7 PA_ENABLE PA3/ADC3 CLK PB3/RESET C1 VCC L1 R2 R1 L2 C2 Note: 184 C3 C4 FSK Modulation is achieved by switching on and off an additional capacitor between the XTAL load capacitor and GND. This is done using a MOS switch controlled by a microcontroller output. Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Table 5-2. Bill of Material Component Type/ Manufacturer Note Value 315MHz 433.92MHz 868.3MHz L1 100nH 82nH 22nH LL1608-FSL/ TOKO L2 39nH 27nH 2.2nH LL1608-FSL/ TOKO C1 1nF 1nF 1nF GRM1885C/ Murata C2 3.9pF 2.7pF 1.5pF GRM1885C/ Murata This cap must be placed as close as possible to the pin Ant1 and Ant2 C3 27pF 16pF 4.3pF GRM1885C/ Murata On the demo board 2 capacitors in series are used to reduce the tolerance C4 3.9pF 1.6pF 0.3pF GRM1885C/ Murata On the demo board 2 capacitors in series are used to reduce the tolerance C5 68nF 68nF 68nF GRM188R71C/ This cap must placed as close as possible to the Murata VCC_RF C6 100nF 100nF 100nF GRM188R71C / This cap must placed as close as possible to the Murata VDD C7 100nF 100nF 100nF GRM188R71C / Murata C8 3.9pF 4.7pF 5.6pF GRM1885C/ Murata Frequency deviation of 16 kHz will be performed using the combination of C8 and C9 C9 18pF 8.2pF 5.6pF GRM1885C/ Murata Frequency deviation of 16 kHz will be performed using the combination of C8 and C9 T1 BSS83 Q1 9.843750MHz 13.56MHz 13.567187MHz R1 100k 100k 100k R2 100k 100k 100k R3 10k 10k 10k DSX530GK/ KDS 185 9137F-RKE-05/11 6. Absolute Maximum Ratings 6.1 RF Transmitter Block 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 any 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. Parameters Maximum Unit Supply voltage Symbol VS 5 V Power dissipation Ptot 100 mW Junction temperature Minimum Tj Storage temperature Tstg -55 Ambient temperature Tamb -55 Input voltage Note: -0.3 VmaxPA_ENABLE 150 C +125 C +125 C (1) (VS + 0.3) V 1. If VS + 0.3 is higher than 3.7V, the maximum voltage will be reduced to 3.7V Figure 6-1. ESD Protection Circuit of the Transmitter VS ANT1 CLK PA_ENABLE ANT2 XTAL ENABLE GND 6.2 Microcontroller Block (Atmel ATtiny44V) Operating Temperature ................................... -40C to +85C Storage Temperature..................................... -65C to +175C Voltage on any Pin except RESET with respect to Ground ............................... -0.5V to VCC+0.5V Maximum operating voltage .............................................6.0V Voltage on RESET with respect to Ground .... -0.5V to +13.0V Note: 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 VCC with respect to Ground ............ -0.5V to +6.0V DC Current per I/O Pin .................................................30.0mA DC Current VCC and GND Pins ..................................200.0mA Injection Current at VCC = 0V to 5V(2) ........................5.0mA(1) Notes: 1. Maximum current per port = 30mA 2. Functional corruption may occur. 186 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 7. Thermal Resistance Parameters Junction ambient Symbol Value Unit RthJA 35 K/W 8. Electrical Characteristics 8.1 The General Current Consumption Characteristic for Key Fob Application VS = 2.0V to 3.6V, Tamb = -40C to +85C unless otherwise specified. Typical values are given at VS = 3.0V and Tamb = 25C. Transmitter (T5750/3/4) ATtiny44V WDT Disabled Total Typ. < 10nA Typ. 0.2A Typ. < 0.21A Max. 350nA Max. 3A Max. 3.35A Typ. 9mA Typ. 0.8mA Typ. 9.8mA Max. 11.6mA Max. 2.5mA Max. 14.1mA Power down Active (VS = 3V; RC = 4MHz) 315MHz / 434MHz 868MHz Typ. 8.5mA Typ. 0.8mA Typ. 9.3mA Max. 11mA Max. 2.5mA Max. 13.5mA Note: These values are based on the DC electrical values in Section 8.2 "RF Transmitter Block" on page 187 and Section 8.3 "Microcontroller Block" on page 189. 8.2 RF Transmitter Block VS = 2.0V to 3.6V, Tamb = -40C to +85C unless otherwise specified. Typical values are given at VS = 3.0V and Tamb = 25C. All parameters are referred to GND (pin 7) Parameters Supply current of RF transmitter block (* please take account an additional current consumption of the microcontroller block) Test Conditions Power down, VENABLE < 0.25 V, -40C to +85C VPA-ENABLE < 0.25V, 25C IS_Off Power up, PA off, VS = 3V, VENABLE > 1.7V, VPA-ENABLE < 0.25V 315 MHz / 434 MHz 868 MHz IS Power up, VS = 3.0V, VENABLE > 1.7V, VPA-ENABLE> 1.7V 315 MHz / 434 MHz 868 MHz Output power VS = 3.0V, Tamb = 25C, f = 315 MHz, ZLoad = (255 + j192) f = 433.92 MHz, ZLoad = (166 + j233) f = 868.3 MHz, ZLoad = (166 + j226) Output power variation for the full temperature range Tamb = -40C to +85C, VS = 3.0V VS = 2.0V POut = PRef + PRef Note: Symbol Min. Typ. Max. Unit 350 nA nA < 10 IS_Transmit PRef PRef PRef 6.0 5.5 3.5 3.7 3.6 4.8 4.6 mA 9 8.5 11.6 11 mA 8.0 7.5 5.5 10.5 10 8 -1.5 -4.0 dBm dB dB 1. If VS is higher than 3.6V, the maximum voltage will be reduced to 3.6V. 187 9137F-RKE-05/11 8.2 RF Transmitter Block (Continued) VS = 2.0V to 3.6V, Tamb = -40C to +85C unless otherwise specified. Typical values are given at VS = 3.0V and Tamb = 25C. All parameters are referred to GND (pin 7) Parameters Test Conditions Symbol Achievable output-power range Selectable by load impedance 315MHz 434MHz 868MHz POut_typ Spurious emission fCLK = f0/128 (ATA5773 / ATA5774) fCLK = f0/256 (ATA5771) Load capacitance at pin CLK = 10 pF fO 1 x fCLK (ATA5773 / ATA5774) fO 1 x fCLK (ATA5771) fO 4 x fCLK other spurious are lower Oscillator frequency XTO (= phase comparator frequency) fXTO = f0/32 (ATA5773 / ATA5774) fXTO = f0/64 (ATA5771) fXTAL = resonant frequency of the XTAL, CM 10 fF, load capacitance selected accordingly Tamb = -40C to +85C Min. Typ. 0 0 -3 Max. 8.0 7.5 +5.5 -55 -52 -52 Unit dBm dBc dBc dBc fXTO -30 PLL loop bandwidth fXTAL +30 250 ppm kHz Phase noise of phase comparator Referred to fPC = fXT0, 25kHz distance to carrier -116 -110 dBc/Hz In-loop phase noise PLL 25kHz distance to carrier -86 -80 dBc/Hz Phase noise VCO at 1MHz at 36MHz -94 -125 -90 -121 dBc/Hz dBc/Hz Frequency range of VCO ATA5773 ATA5774 ATA5771 350 439 928 MHz Clock output frequency (CMOS microcontroller compatible) ATA5773 / ATA5774 ATA5771 Voltage swing at pin CLK CLoad 10pF Series resonance R of the crystal fVCO 310 429 868 f0/128 f0/256 V0h V0l VS x 0.8 Rs Capacitive load at pin XT0 FSK modulation frequency rate Duty cycle of the modulation signal = 50% 0 ASK modulation frequency rate Duty cycle of the modulation signal = 50% 0 ENABLE input PA_ENABLE input Note: 188 Low level input voltage High level input voltage Input current high VIl VIh IIn 1.7 Low level input voltage High level input voltage Input current high VIl VIh IIn 1.7 MHz VS x 0.2 V V 110 7 pF 32 kHz 32 kHz 0.25 20 V V A 0.25 VS(1) 5 V V A 1. If VS is higher than 3.6V, the maximum voltage will be reduced to 3.6V. Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 8.3 Microcontroller Block 8.3.1 DC Characteristics TA = -40C to +85C, VCC = 2.0V to 3.6V (unless otherwise noted)(1) Symbol Parameter Condition VIL Input Low Voltage except XTAL1 and RESET pin VCC = 1.8V to 3.6V = -40C to +85C VIL1 Input low voltage, XTAL1 pin VIH Max. Unit -0.5 +0.2VCC(1) V VCC = 1.8V to 3.6V TA = -40C to +85C -0.5 +0.2VCC(1) V Input high voltage, except XTAL1 and RESET pins VCC = 1.8V to 3.6V TA = -40C to +85C 0.7VCC(1) VCC + 0.5 V VIH1 Input high voltage, XTAL1 pin VCC = 1.8V to 3.6V TA = -40C to +85C 0.9VCC(1) VCC + 0.5 V VIL2 Input low voltage, RESET pin VCC = 1.8V to 3.6V TA = -40C to +85C -0.5 +0.2VCC(1) V VIH2 Input high voltage, RESET pin VCC = 1.8V to 3.6V TA = -40C to +85C 0.9VCC(1) VCC + 0.5 V VOL Output low voltage(2), I/O pin except RESET IOL = 2mA, VCC = 1.8V 0.2 V VOH Output high voltage(3), I/O pin except RESET IOH = -2mA, VCC = 1.8V RRST Reset Pull-up Resistor 30 60 k Rpu I/O Pin Pull-up Resistor 20 50 k Power Supply Current ICC Power-down mode TA Typ. 1.2 V Active 4MHz, VCC = 3V TA = -40C to +85C 0.8 2.5 mA Idle 4MHz, VCC = 3V TA = -40C to +85C 0.2 0.5 mA WDT enabled, VCC = 3V 4 18 A WDT disabled, VCC = 3V 0.2 3 A < 10 40 mV +50 nA VACIO Analog comparator Input offset voltage VCC = 2.7V Vin = VCC/2 TA = -40C to +85C IACLK Analog comparator Input leakage current VCC = 2.7V Vin = VCC/2 TA = -40C to +85C = 1.8V to 3.6V Notes: Min. VCC -50 1. "Max" means the highest value where the pin is guaranteed to be read as low. 2. "Min" means the lowest value where the pin is guaranteed to be read as high. 3. Although each I/O port can sink more than the test conditions (10mA at VCC = 5V, 5mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed: 1] The sum of all IOL, for all ports, should not exceed 60mA. If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition. 4. Although each I/O port can source more than the test conditions (10mA at VCC = 5V, 5mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed: 1] The sum of all IOH, for all ports, should not exceed 60mA. If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition. Pull up driving strenght of the PB3 RESET pad is weak. 189 9137F-RKE-05/11 8.3.2 Maximum Speed versus VCC Maximum frequency is dependent on VCC. As shown in Figure 8-1, the Maximum Frequency versus VCC curve is linear between 1.8V < VCC < 3.6V Figure 8-1. Maximum Frequency versus VCC 8 MHz 4 MHz Safe Operating Area 1.8V 8.3.3 2.7V 3.6V Clock Characterizations 8.3.3.1 Calibrated Internal RC Oscillator Accuracy Table 8-1. Calibration Accuracy of Internal RC Oscillator User Calibration 8.3.3.2 Frequency VCC Temperature Accuracy 7.3MHz to 8.1MHz 1.8V to 3.6V -40 C to +85 C 25% External Clock Drive Waveforms Figure 8-2. External Clock Drive Waveforms V IH1 V IL1 190 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 8.3.3.3 External Clock Drive Table 8-2. External Clock Drive VCC = 2.7 - 3.6V 8.3.4 Symbol Parameter Min. Max. Unit 0 10 MHz 1/tCLCL Clock Frequency tCLCL Clock Period 100 ns tCHCX High Time 40 ns tCLCX Low Time 40 ns tCLCH Rise Time 1.6 s tCHCL Fall Time 1.6 s tCLCL Change in period from one clock cycle to the next 2 % System and Reset Characterizations Reset, Brown-out and Internal Voltage Reference Characteristics(1) Table 8-3. Symbol Parameter Condition Min Brown-out Detector Hysteresis VHYST VRAM(2) RAM Retention Voltage (1) Typ Max Unit 100 250 mV 50 tBOD Min Pulse Width on Brown-out Reset VBG Bandgap reference voltage VC C = 2.7V, TA = 25C tBG Bandgap reference start-up time mV 2 1.0 ns 1.1 1.2 V VC C = 2.7V, TA = 25C 40 70 s Bandgap reference current consumption VC C = 2.7V, TA = 25C IBG Notes: 1. Values are guidelines only. 2. This is the limit to which VDD can be lowered without losing RAM data 10 A BODLEVEL Fuse Coding(1) Table 8-4. BODLEVEL Min VBOT Typ VBOT 111 Max VBOT Unit Type* BOD Disabled 110 1.7 1.8 2.0 A 001 1.7 1.9 2.1 C 000 1.8 2.0 2.2 C V 010 2.0 2.2 2.4 C 011 2.1 2.3 2.5 C 101 2.5 2.7 2.9 A *) Type means: A = 100% tested, C = Characterized on samples Note: 1. 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 191 9137F-RKE-05/11 8.3.5 ADC Characteristics - Preliminary Data Table 8-5. ADC Characteristics, Single Ended Channels. -40C to +85C, unless otherwise noted Symbol Parameter Resolution TUE Absolute accuracy (Including INL, DNL, quantization error, gain and offset error) Condition Min Typ Max Unit Single Ended Conversion 10 VCC = 1.8V, VRef = 1.8V, ADC clock = 200kHz TA = -40C to +85C Bits 2 4.0 LSB VCC = 1.8V, VRef = 1.8V, ADC clock = 200kHz Noise Reduction Mode TA = -40C to +85C 2 4.0 LSB INL Integral Non-linearity (INL) VCC = 1.8V, VRef = 1.8V, ADC clock = 200kHz TA = -40C to +85C 0.5 1.5 LSB DNL Differential Non-linearity (DNL) VCC = 1.8V, VRef = 1.8V, ADC clock = 200kHz TA = -40C to +85C 0.2 0.7 LSB Gain Error VCC = 1.8V, VRef = 1.8V, ADC clock = 200kHz TA = -40C to +85C -7.0 -3.0 +5.0 LSB Offset Error VCC = 1.8V, VRef = 1.8V, ADC clock = 200kHz TA = -40C to +85C -3.5 +1.5 +3.5 LSB Conversion Time Free Running Conversion Clock Frequency Vref VIN External Voltage Reference Input Voltage VINT Internal Voltage Reference RAIN Analog Input Resistance 192 TA = -40C to +85C 65 260 s 50 200 kHz 1.8 AVCC V GND 1.0 1.1 100 VREF V 1.2 V M Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Table 8-6. ADC Characteristics, Differential Channels, TA = -40C to +85C, unless otherwise noted Symbol Parameter Resolution TUE Absolute accuracy (Including INL, DNL, quantization error, gain and offset error) INL DNL Integral Non-Linearity (INL) Differential Non-linearity (DNL) Condition VDIFF Max Units 8 Gain = 1x, VCC = 1.8V, VRef = 1.3V, ADC clock = 125kHz TA = -40C to +85C, 1.6 5.0 LSB Gain = 1x, VCC = 1.8V, VRef = 1.3V, ADC clock = 125kHz TA = -40C to +85C, 0.7 2.5 LSB Gain = 1x, VCC = 1.8V, VRef = 1.3V, ADC clock = 125kHz TA = -40C to +85C, 0.3 1.0 LSB Bits Gain Error Gain = 1x, VCC = 1.8V, VRef = 1.3V, ADC clock = 125kHz TA = -40C to +85C -7.0 +1.50 +7.0 LSB Offset Error Gain = 1x, VCC = 1.8V. VRef = 1.3V, ADC clock = 125kHz TA = -40C to +85C -4.0 0.0 +4.0 LSB 50 200 kHz 65 260 s 1.30 AVCC - 0.5 V GND AVCC V -VREF/Gain VREF/Gain V Conversion Time VIN Typ Differential conversion, gain = 1x BIPOLAR mode only TA = -40C to +85C, VCC = 1.8V to 3.6V Clock Frequency VREF Min Reference Voltage Input Voltage Input Differential Voltage TA = -40C to +85C, VCC = 1.8V to 3.6V 193 9137F-RKE-05/11 8.3.6 Serial Programming Characteristics Figure 8-3. Serial Programming Timing MOSI tSHOX tOVSH SCK tSLSH tSHSL MISO tSLIV Figure 8-4. Serial Programming Waveforms SERIAL DATA INPUT (MOSI) MSB LSB SERIAL DATA OUTPUT (MISO) MSB LSB SERIAL CLOCK INPUT (SCK) SAMPLE Table 8-7. Symbol 1/tCLCL Parameter Oscillator Frequency (Atmel ATtiny44VV) tCLCL Oscillator Period (Atmel ATtiny44VV) tSHSL Min Typ 0 Max Units 4 MHz 250 ns SCK Pulse Width High 2 tCLCL* ns 2 tCLCL* ns tCLCL ns 2 tCLCL ns tSLSH SCK Pulse Width Low tOVSH MOSI Setup to SCK High tSHOX MOSI Hold after SCK High tSLIV SCK Low to MISO Valid Note: 194 Serial Programming Characteristics, TA = -40C to +85C, VCC = 2V - 3.6V (Unless Otherwise Noted) TBD TBD TBD ns 1. 2 tCLCL for fck < 12MHz, 3 tCLCL for fck >= 12MHz Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 8.3.7 High-voltage Serial Programming Characteristics Figure 8-5. High-voltage Serial Programming Timing CC CK Table 8-8. Symbol High-voltage Serial Programming Characteristics TA = 25C 10%, VCC = 5.0V 10% (Unless otherwise noted) Parameter Min tSHSL SCI (PB0) Pulse Width High 110 ns tSLSH SCI (PB0) Pulse Width Low 110 ns tIVSH SDI (PA6), SII (PB1) Valid to SCI (PB0) High 50 ns tSHIX SDI (PA6), SII (PB1) Hold after SCI (PB0) High 50 tSHOV SCI (PB0) High to SDO (PA4) Valid 16 ns Wait after Instr. 3 for Write Fuse Bits 2.5 ms tWLWH_PFB Typ Max Units ns 195 9137F-RKE-05/11 8.3.8 Typical Characteristics - Preliminary Data The data contained in this section is largely based on simulations and characterization of similar devices in the same process and design methods. Thus, the data should be treated as indications of how the part will behave. The following charts show typical behavior. These figures are not tested during manufacturing. All current consumption measurements are performed with all I/O pins configured as inputs and with internal pull-ups enabled. A sine wave generator with rail-to-rail output is used as clock source. The power consumption in Power-down mode is independent of clock selection. The current consumption is a function of several factors such as: operating voltage, operating frequency, loading of I/O pins, switching rate of I/O pins, code executed and ambient temperature. The dominating factors are operating voltage and frequency. The current drawn from capacitive loaded pins may be estimated (for one pin) as CL*VCC*f where CL = load capacitance, VCC = operating voltage and f = average switching frequency of I/O pin. The parts are characterized at frequencies higher than test limits. Parts are not guaranteed to function properly at frequencies higher than the ordering code indicates. The difference between current consumption in Power-down mode with Watchdog Timer enabled and Power-down mode with Watchdog Timer disabled represents the differential current drawn by the Watchdog Timer. 8.3.8.1 Active Supply Current Figure 8-6. Active Supply Current vs. Low Frequency (0.1 - 1.0MHz) - Temp. = 25C ACTIVE S UP P LY CURRENT vs . LOW FREQUENCY 0.1 - 1.0 MHz - Temperature = 25C 1.2 5.5 V 1 5.0 V 4.5 V ICC (mA) 0.8 3.3 V 3.0 V 2.7 V 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Frequency (MHz) 196 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 8-7. Active Supply Current vs. frequency (1 - 20MHz) - Temp. = 25C ACTIVE S UP P LY CURRENT vs . FREQUENCY 1 - 20 MHz - Temperature = 25C 25 ICC (mA) 20 15 5.5 V 5.0 V 4.5 V 10 3.3 V 3.0 V 2.7 V 5 0 0 2 4 6 8 10 12 14 16 18 20 Frequency (MHz) Figure 8-8. Active Supply Current vs. VCC (Internal RC Oscillator, 8MHz) ACTIVE S UP P LY CURRENT vs . VC C INTERNAL RC OSCILLATOR, 8 MHz 7 125 85 25 -45 6 ICC (mA) 5 C C C C 4 3 2 1 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 197 9137F-RKE-05/11 Figure 8-9. Active Supply Current vs. VCC (Internal RC Oscillator, 1MHz) ACTIVE S UP P LY CURRENT vs . VC C INTERNAL RC OSCILLATOR, 1MHz 1.4 125 85 25 -40 1.2 ICC (mA) 1 C C C C 0.8 0.6 0.4 0.2 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-10. Active Supply Current vs. VCC (Internal RC Oscillator, 128kHz) ACTIVE S UP P LY CURRENT vs . V CC INTERNAL RC OSCILLATOR, 128 KHz 0.2 ICC (mA) 0.16 -40 C 25 C 85 C 125 C 0.12 0.08 0.04 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 198 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 8.3.8.2 Idle Supply Current Figure 8-11. Idle Supply Current vs. VCC (Internal RC Oscillator, 8MHz) IDLE S UP P LY CURRENT vs . VC C INTERNAL RC OSCILLATOR, 8 MHz 2 1.8 1.6 ICC (mA) 1.4 125 85 25 -40 C C C C 125 85 25 -40 C C C C 1.2 1 0.8 0.6 0.4 0.2 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-12. Idle Supply Current vs. VCC (Internal RC Oscillator, 1MHz) IDLE S UP P LY CURRENT vs . VC C INTERNAL RC OSCILLATOR, 1 MHz 0.35 0.3 ICC (mA) 0.25 0.2 0.15 0.1 0.05 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 199 9137F-RKE-05/11 Figure 8-13. Idle Supply Current vs. VCC (Internal RC Oscillator, 8MHz) IDLE S UP P LY CURRENT vs . VCC INTERNAL RC OSCILLATOR, 128 KHz 0.035 125 85 25 -40 0.03 ICC (mA) 0.025 C C C C 0.02 0.015 0.01 0.005 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 8.3.8.3 Supply Current of IO modules The tables and formulas below can be used to calculate the additional current consumption for the different I/O modules in Active and Idle mode. The enabling or disabling of the I/O modules are controlled by the Power Reduction Register. See Section 4.10.7 "Power Reduction Register" on page 43 for details. Table 8-9. Additional Current Consumption for the Different I/O Modules (Absolute Values) PRR Bit 200 Typical Numbers VCC = 2V, F = 1 MHz VCC = 3V, F = 4 MHz PRTIM1 6.6 uA 26 uA PRTIM0 8.7 uA 35 uA PRUSI 5.5 uA 22 uA PRADC 22 uA 87 uA Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 8.3.8.4 Power-down Supply Current Figure 8-14. Power-down Supply Current vs. VCC (Watchdog Timer Disabled) P OWER-DOWN S UP P LY CURRENT vs . VC C WATCHDOG TIMER DISABLED 5 4.5 4 ICC (uA) 3.5 125 C 3 2.5 2 1.5 85 C 1 0.5 25 C -45 C 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-15. Power-down Supply Current vs. VCC (Watchdog Timer Enabled) P OWER-DOWN S UP P LY CURRENT vs . VC C WATCHDOG TIMER ENABLED 10 9 8 ICC (uA) 7 6 5 4 125 -45 85 25 3 2 1 C C C C 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 201 9137F-RKE-05/11 8.3.8.5 Pin Pull-up Figure 8-16. I/O Pin Pull-up Resistor Current vs. input Voltage (VCC = 2.7V) I/O P IN P ULL-UP RES IS TOR CURRENT vs . INP UT VOLTAGE V CC = 2.7V 90 80 70 IOP (uA) 60 50 40 30 20 -45 25 85 125 10 0 0 0.5 1 1.5 2 2.5 C C C C 3 V OP (V) Figure 8-17. Reset Pull-up Resistor Current vs. Reset Pin Voltage (VCC = 2.7V) RES ET P ULL-UP RES IS TOR CURRENT vs . RES ET P IN VOLTAGE Vc c = 2.7V 60 -40 C 50 125 C IRE S E T (uA) 40 30 20 10 0 0 0.5 1 1.5 2 2.5 3 V RE S E T (V) 202 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 8.3.8.6 Pin Driver Strength Figure 8-18. I/O Pin Output Voltage vs. Sink Current (VCC = 3V) I/O P IN OUTP UT VOLTAGE vs . S INK CURRENT LOW POWER PINS @ Vcc = 3V 0.06 125 C 0.05 V OL (V) 0.04 85 C 25 C -40 C 0.03 0.02 0.01 0 0 2 4 6 8 10 12 14 16 18 20 IOL (mA) Figure 8-19. I/O Pin Output Voltage vs. Source Current (VCC = 3V) I/O P IN OUTP UT VOLTAGE vs . S OURCE CURRENT LOW POWER PINS @ vcc = 3V 3.5 V OH (V) 3 2.5 -45 C 25 C 85 C 125 C 2 1.5 0 2 4 6 8 10 12 14 16 18 20 IOH (mA) 203 9137F-RKE-05/11 8.3.8.7 Pin Threshold and Hysteresis Figure 8-20. I/O Pin Input Threshold Voltage vs. VCC (VIH, IO Pin Read as `1') I/O P IN INP UT THRES HOLD VOLTAGE vs . V CC VIH, IO PIN READ AS '1' 3.5 3 Thre s hold (V) 2.5 125 85 25 -40 C C C C 125 85 25 -40 C C C C 2 1.5 1 0.5 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-21. I/O Pin Input threshold Voltage vs. VCC (VIL, IO Pin Read as `0') I/O P IN INP UT THRES HOLD VOLTAGE vs . V C C VIL, IO PIN READ AS '0' 2.5 Thre s hold (V) 2 1.5 1 0.5 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 204 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 8-22. I/O Pin Input Hysteresis vs. VCC I/O P IN INP UT HYS TERES IS vs . V CC 0.5 0.45 Input Hys te re s is (mV) 0.4 125 85 -20 -40 C C C C 125 85 25 -40 C C C C 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-23. Reset Input Threshold Voltage vs. VCC (VIH, IO Pin Threshold as `1') RES ET P IN AS I/O THRES HOLD VOLTAGE vs . VCC VIH, RESET READ AS '1' 3 Thre s hold (V) 2.5 2 1.5 1 0.5 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 205 9137F-RKE-05/11 Figure 8-24. Reset Input Threshold Voltage vs. VCC (VIL, IO pin Read as `0') RES ET P IN AS I/O THRES HOLD VOLTAGE vs . V C C VIL, RESET READ AS '0' 3 125 85 25 -45 Thre s hold (V) 2.5 2 C C C C 1.5 1 0.5 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-25. Reset Pin Input Hysteresis vs. VCC RES ET P IN INP UT HYS TERES IS vs . V C C 1 0.9 Input Hys te re s is (mV) 0.8 0.7 0.6 -40 C 0.5 0.4 25 C 0.3 0.2 85 C 0.1 125 C 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 206 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 8.3.8.8 BOD Threshold and Analog Comparator Offset Figure 8-26. BOD Threshold vs, Temperature (BODLEVEL is 2.7V) BANDGAP VOLTAGE vs . TEMP ERATURE BOD = 2.7V 2.78 1 2.76 Thre s hold (V) 2.74 2.72 2.7 0 2.68 2.66 2.64 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 Temperature (C) Figure 8-27. BOD Threshold vs. Temperature (BODLEVEL is 1.8V) BANDGAP VOLTAGE vs . TEMP ERATURE BOD = 1.8V 1.85 1.84 1 Thre s hold (V) 1.83 1.82 1.81 0 1.8 1.79 1.78 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 Temperature (C) 207 9137F-RKE-05/11 8.3.8.9 Internal Oscillator Speed Figure 8-28. Watchdog Oscillator Frequency vs. VCC WATCHDOG OS CILLATOR FREQUENCY vs . OP ERATING VOLTAGE 124 122 -40 C 120 FRC (kHz ) 118 25 C 116 114 112 85 C 110 108 125 C 106 104 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-29. Calibrated 8 MHz RC Oscillator Frequency vs. VCC CALIBRATED 8.0MHz RC OS CILLATOR FREQUENCY vs . OP ERATING VOLTAGE 9 8.5 -40 25 85 125 FRC (MHz ) 8 C C C C 7.5 7 6.5 6 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 208 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 8-30. Calibrated 8 MHz RC oscillator Frequency vs. Temperature CALIBRATED 8.0MHz RC OS CILLATOR FREQUENCY vs . TEMP ERATURE 8.4 8.3 5.0 V 3.0 V FRC (MHz ) 8.2 8.1 8 7.9 7.8 7.7 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 Temperature Figure 8-31. Calibrated 8 MHz RC Oscillator Frequency vs, OSCCAL Value CALIBRATED 8.0MHz RC OS CILLATOR FREQUENCY vs . OS CCAL VALUE (Vcc=3V) 16 125 85 25 -40 14 FRC (MHz ) 12 C C C C 10 8 6 4 2 0 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 OSCCAL (X1) 209 9137F-RKE-05/11 8.3.8.10 Current Consumption of Peripheral Units Figure 8-32. ADC Current vs. VCC ADC CURRENT vs . VC C 4.0 MHZ FREQUENCY 125 85 25 -40 C C C C -40 25 85 125 C C C C 700 600 ICC (uA) 500 400 300 200 100 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) Figure 8-33. Analog Comparator Current vs. VCC ADC CURRENT vs . VC C 4.0 MHZ FREQUENCY 100 90 80 ICC (uA) 70 60 50 40 30 20 10 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 210 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 8-34. Programming Current vs. VCC I/O MODULE CURRENT vs . VCC 4.0 MHZ FREQUENCY 12000 25 C 10000 ICC (uA) 8000 6000 4000 2000 0 2.5 3.5 4.5 5.5 V CC (V) Figure 8-35. Brownout Detector Current vs. VCC BROWNOUT DETECTOR CURRENT vs . VC C BOD level = 1.8V 16 14 12 125 C ICC (uA) 10 8 25 C 6 4 85 C 2 -40 C 0 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 V CC (V) 211 9137F-RKE-05/11 Figure 8-36. Watchdog Timer Current vs. VCC WATCHDOG TIMER CURRENT vs V C C 30 -40 25 85 125 25 C C C C ICC (uA) 20 15 10 5 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 8.3.8.11 Current Consumption in Reset and Reset Pulse width Figure 8-37. Reset Supply Current vs. VCC (0.1 - 1.0MHz, excluding Current Through the Reset Pull-up) RES ET S UP P LY CURRENT vs . VC C EXCLUDING CURRENT THROUGH THE RESET PULLUP 0.2 5.5 V 0.18 5.0 V 0.16 4.5 V ICC (mA) 0.14 0.12 3.3 V 3.0 V 2.7 V 0.1 0.08 0.06 0.04 0.02 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Frequency (MHz) 212 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 Figure 8-38. Reset Supply Current vs. VCC (1 - 20MHz, Excluding Current Through the Reset Pull-up) RES ET S UP P LY CURRENT vs . V C C EXCLUDING CURRENT THROUGH THE RESET PULLUP 3 2.5 5.5 V 5.0 V 2 ICC (mA) 4.5 V 1.5 3.6 3.3 3.0 2.7 1 V V V V 0.5 0 0 2 4 6 8 10 12 14 16 18 20 Frequency (MHz) Figure 8-39. Minimum Reset Pulse Width vs. VCC MINIMUM RES ET P ULS E WIDTH vs . V CC 1200 Puls e width (ns ) 1000 800 600 125 85 25 -40 400 C C C C 200 0 2.5 3 3.5 4 4.5 5 5.5 V CC (V) 213 9137F-RKE-05/11 9. Appendix 9.1 Register Summary Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page 0x3F (0x5F) SREG I T H S V N Z C Page 16 - - - - SP9 SP8 Page 18 SP1 SP0 0x3E (0x5E) SPH - - 0x3D (0x5D) SPL SP7 SP6 0x3C (0x5C) OCR0B 0x3B (0x5B) GIMSK - INT0 PCIE1 PCIE0 - - - - Page 59 0x3A (0x5A GIFR - INTF0 PCIF1 PCIF0 - - - - Page 60 0x39 (0x59) TIMSK0 - - - - - OCIE0B OCIE0A TOIE0 Page 94 0x38 (0x58) TIFR0 - - - - OCF0B OCF0A TOV0 Page 94 0x37 (0x57) SPMCSR - - - CTPB RFLB PGWRT Timer/Counter0 - Output Compare Register A PGERS SPMEN Page 165 SP5 SP4 SP3 SP2 Timer/Counter0 - Output Compare Register B Page 18 Page 93 0x36 (0x56) OCR0A 0x35 (0x55) MCUCR BODS PUD SE SM1 SM0 BODSE ISC01 ISC00 Page 93 Page 59 0x34 (0x54) MCUSR - - - - WDRF BORF EXTRF PORF Page 52 0x33 (0x53) TCCR0B FOC0A FOC0B - - WGM02 CS02 CS01 CS00 Page 92 0x32 (0x52) TCNT0 0x31 (0x51) OSCCAL CAL2 CAL1 CAL0 Page 39 Timer/Counter0 CAL7 CAL6 CAL5 CAL4 CAL3 Page 93 0x30 (0x50) TCCR0A COM0A1 COM0A0 COM0B1 COM0B0 - WGM01 WGM00 Page 89 0x2F (0x4F) TCCR1A COM1A1 COM1A0 COM1B1 COM1B0 - WGM11 WGM10 Page 117 ICNC1 ICES1 - WGM13 WGM12 CS11 CS10 Page 119 CS12 0x2E (0x4E) TCCR1B 0x2D (0x4D) TCNT1H Timer/Counter1 - Counter Register High Byte Page 121 0x2C (0x4C) TCNT1L Timer/Counter1 - Counter Register Low Byte Page 121 0x2B (0x4B) OCR1AH Timer/Counter1 - Compare Register A High Byte Page 121 0x2A (0x4A) OCR1AL Timer/Counter1 - Compare Register A Low Byte Page 121 0x29 (0x49) OCR1BH Timer/Counter1 - Compare Register B High Byte Page 121 Page 121 0x28 (0x48) OCR1BL Timer/Counter1 - Compare Register B Low Byte 0x27 (0x47) DWDR DWDR[7:0] 0x26 (0x46) CLKPR 0x25 (0x45) ICR1H CLKPCE - - - Page 161 CLKPS3 CLKPS2 CLKPS1 CLKPS0 Timer/Counter1 - Input Capture Register High Byte Page 39 Page 122 Timer/Counter1 - Input Capture Register Low Byte 0x24 (0x44) ICR1L 0x23 (0x43) GTCCR TSM - - - - - - PSR10 Page 122 Page 125 0x22 (0x42) TCCR1C FOC1A FOC1B - - - - - - Page 120 0x21 (0x41) WDTCSR WDIF WDIE WDP3 WDCE WDE WDP2 WDP1 WDP0 Page 53 0x20 (0x40) PCMSK1 - - - - PCINT11 PCINT10 PCINT9 PCINT8 Page 60 Page 29 0x1F (0x3F) EEARH - - - - - - - EEAR8 0x1E (0x3E) EEARL EEAR7 EEAR6 EEAR5 EEAR4 EEAR3 EEAR2 EEAR1 EEAR0 0x1D (0x3D) EEDR EEPROM Data Register Page 29 Page 29 0x1C (0x3C) EECR - - EEPM1 EEPM0 EERIE EEMPE EEPE EERE Page 29 0x1B (0x3B) PORTA PORTA7 PORTA6 PORTA5 PORTA4 PORTA3 PORTA2 PORTA1 PORTA0 Page 75 0x1A (0x3A) DDRA DDA7 DDA6 DDA5 DDA4 DDA3 DDA2 DDA1 DDA0 Page 76 0x19 (0x39) PINA PINA7 PINA6 PINA5 PINA4 PINA3 PINA2 PINA1 PINA0 Page 76 0x18 (0x38) PORTB - - - - PORTB3 PORTB2 PORTB1 PORTB0 Page 76 0x17 (0x37) DDRB - - - - DDB3 DDB2 DDB1 DDB0 Page 76 0x16 (0x36) PINB - - - - PINB3 PINB2 PINB1 PINB0 0x15 (0x35) GPIOR2 General Purpose I/O Register 2 Page 31 0x14 (0x34) GPIOR1 General Purpose I/O Register 1 Page 31 0x13 (0x33) GPIOR0 General Purpose I/O Register 0 0x12 (0x32) PCMSK0 0x11 (0x31)) Reserved - 0x10 (0x30) USIBR USI Buffer Register Page 134 0x0F (0x2F) USIDR USI Data Register Page 134 PCINT7 PCINT6 PCINT5 PCINT4 PCINT3 Page 76 Page 31 PCINT2 PCINT1 PCINT0 Page 61 0x0E (0x2E) USISR USISIF USIOIF USIPF USIDC USICNT3 USICNT2 USICNT1 USICNT0 0x0D (0x2D) USICR USISIE USIOIE USIWM1 USIWM0 USICS1 USICS0 USICLK USITC Page 135 0x0C (0x2C) TIMSK1 - - ICIE1 - - OCIE1B OCIE1A TOIE1 Page 122 Notes: Page 134 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 AVR(R)s, 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 214 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 9.1 Register Summary (Continued) Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page 0x0B (0x2B) TIFR1 - - ICF1 - - OCF1B OCF1A TOV1 Page 123 0x0A (0x2A) Reserved 0x09 (0x29) Reserved 0x08 (0x28) ACSR ACD ACBG ACO ACI ACIE ACIC ACIS1 ACIS0 Page 139 0x07 (0x27) ADMUX REFS1 REFS0 MUX5 MUX4 MUX3 MUX2 MUX1 MUX0 Page 153 0x06 (0x26) ADCSRA ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0 0x05 (0x25) ADCH 0x04 (0x24) ADCL 0x03 (0x23) ADCSRB 0x02 (0x22) Reserved 0x01 (0x21) 0x00 (0x20) Notes: - - Page 156 ADC Data Register High Byte Page 157 ADC Data Register Low Byte BIN ACME - ADLAR DIDR0 ADC7D ADC6D ADC5D ADC4D PRR - - - - Page 157 - ADTS2 ADTS1 ADTS0 Page 139 ADC3D ADC2D PRTIM1 PRTIM0 ADC1D ADC0D Page 140,Page 159 PRUSI PRADC Page 45 - 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 AVR(R)s, 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 9.2 Instruction Set Summary Mnemonics Operands Description Operation Flags #Clocks 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 AND Rd, Rr Logical AND Registers Rd Rd * Rr Z,N,V 1 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 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 RETI Interrupt Return PC STACK I Compare, Skip if Equal if (Rd = Rr) PC PC + 2 or 3 None BRANCH INSTRUCTIONS RJMP k IJMP RCALL CPSE k Rd,Rr 4 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 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 1 215 9137F-RKE-05/11 9.2 Instruction Set Summary (Continued) Mnemonics Operands Description Operation Flags #Clocks 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 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 ASR Rd Arithmetic Shift Right Rd(n) Rd(n+1), n=0..6 Z,C,N,V 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 C 1 C 1 CLC Clear Carry C 0 C 1 SEN Set Negative Flag N 1 N 1 CLN Clear Negative Flag N 0 N 1 SEZ Set Zero Flag Z 1 Z 1 CLZ Clear Zero Flag Z 0 Z 1 SEI Global Interrupt Enable I 1 I 1 CLI Global Interrupt Disable I 0 I 1 SES Set Signed Test Flag S 1 S 1 CLS Clear Signed Test Flag S 0 S 1 SEV Set Twos Complement Overflow. V 1 V 1 CLV Clear Twos Complement Overflow V 0 V 1 SET Set T in SREG T 1 T 1 CLT Clear T in SREG T 0 T 1 SEH CLH Set Half Carry Flag in SREG Clear Half Carry Flag in SREG H 1 H 0 H H 1 None 1 None 1 1 1 DATA TRANSFER INSTRUCTIONS MOV Rd, Rr Move Between Registers MOVW Rd, Rr Copy Register Word Rd Rr Rd+1:Rd Rr+1:Rr LDI Rd, K Load Immediate Rd K None 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 LD Rd, Y Load Indirect Rd (Y) None 2 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 LD Rd, Z+ Load Indirect and Post-Inc. Rd (Z), Z Z+1 None 2 LD Rd, -Z Load Indirect and Pre-Dec. Z Z - 1, Rd (Z) None 2 216 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 9.2 Instruction Set Summary (Continued) Mnemonics Operands Description Operation Flags #Clocks 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 ST - X, Rr Store Indirect and Pre-Dec. X X - 1, (X) Rr None 2 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 Store Direct to SRAM (k) Rr None 2 Load Program Memory R0 (Z) None 3 LPM LPM Rd, Z Load Program Memory Rd (Z) None 3 LPM Rd, Z+ Load Program Memory and Post-Inc Rd (Z), Z Z+1 None 3 Store Program Memory (z) R1:R0 None 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 1 MCU CONTROL INSTRUCTIONS NOP No Operation SLEEP Sleep (see specific descr. for Sleep function) None 1 WDR BREAK Watchdog Reset Break (see specific descr. for WDR/Timer) For On-chip Debug Only None None 1 N/A 217 9137F-RKE-05/11 10. Ordering Information Extended Type Number Package Remarks ATA5771-PXQW QFN24 5mm x 5mm Microcontroller with UHF Tx for 868MHz to 928MHz, taped and reeled ATA5773-PXQW QFN24 5mm x 5mm Microcontroller with UHF Tx for 310MHz to 350MHz, taped and reeled ATA5774-PXQW QFN24 5mm x 5mm Microcontroller with UHF Tx for 429MHz to 439MHz, taped and reeled 11. Package Information Package: QFN 24 - 5 x 5 Exposed pad 3.6 x 3.6 (acc. JEDEC OUTLINE No. MO-220) Dimensions in mm Not indicated tolerances 0.05 5 0.90.1 +0 3.6 0.05-0.05 24 19 1 24 0.4 18 0.3 6 1 technical drawings according to DIN specifications 13 6 12 7 0.65 nom. Drawing-No.: 6.543-5122.01-4 Issue: 1; 15.11.05 218 3.25 Atmel ATA5771/73/74 9137F-RKE-05/11 Atmel ATA5771/73/74 12. Revision History Please note that the following page numbers referred to in this section refer to the specific revision mentioned, not to this document. Revision No. 9137F-RKE-05/11 9137E-RKE-12/10 9137D-RKE-09/10 History * * * * Table 2-1 "Pin Description" on page 4 changed Section 4.10.6 "Software BOD Disable" on page 42 added Section 4.10.8.3 "Brown-out Detector" on page 43 changed Section 4.10.9.1 "MCUCR - MCU Control Register" on pages 44 to 45 changed * Section 8.1 "The General Current Consumption Characteristics for Key Fob Application" on page 186 changed * Section 8.2 "RF Transmitter Block" on pages 186 to 187 changed * Section 8.3 "Microcontroller Block" on pages 188 to 212 changed * * * * * All pages: ATtiny24 and ATtiny84 deleted All pages: Flash size 2k and 8k deleted Figures 4-7 and 4-8 changed Text under headings 4.2, 4.8.1, 4.8.2, 4.8.3, 4.8.5.1 and 4.8.5.2 changed Section 8.1 "The General Current Consumption Characteristics for Key Fob Application" on page 186 changed * Table 8-1 "Calibration Accuracy of Internal RC Oscillator" on page 189 changed * Table 8-4 "BODLEVEL Fuse Coding" on page 190 changed 219 9137F-RKE-05/11 Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: (+1)(408) 441-0311 Fax: (+1)(408) 487-2600 Atmel Asia Limited Unit 01-5 & 16, 19/F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon HONG KONG Tel: (+852) 2245-6100 Fax: (+852) 2722-1369 Atmel Munich GmbH Business Campus Parkring 4 D-85748 Garching b. Munich GERMANY Tel: (+49) 89-31970-0 Fax: (+49) 89-3194621 Atmel Japan 9F, Tonetsu Shinkawa Bldg. 1-24-8 Shinkawa Chuo-ku, Tokyo 104-0033 JAPAN Tel: (+81) (3) 3523-3551 Fax: (+81) (3) 3523-7581 (c) 2011 Atmel Corporation. All rights reserved. / Rev.: 9137F-RKE-05/11 Atmel(R), Atmel logo and combinations thereof, AVR(R), AVR Studio(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.