ATA8741 Microcontroller with UHF ASK/FSK Transmitter DATASHEET General Features Transmitter with microcontroller consisting of an AVR(R) microcontroller and RF transmitter PLL in a single QFN24 5mm x 5mm package (pitch 0.65mm) f0 = 310MHz to 350MHz Temperature range -40C to +85C Supply voltage 2.0V to 4.0V 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 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, similar to popular Atmel ATtiny44 Well known and market-accepted 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) 9140E-INDCO-09/14 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 2 ATA8741 [DATASHEET] 9140E-INDCO-09/14 1. General Description The Atmel(R) ATA8741 is a highly flexible programmable transmitter containing the 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 of up to 32kBit/s. Its primary applications are in the areas of industrial/aftermarket remote keyless-entry (RKE) systems, alarm, telemetering, energy metering systems, home automotion/entertainment and toys. The Atmel ATA8741 can be used in the frequency band of f0 = 315MHz for ASK or FSK data transmission. Figure 1-1. ASK System Block Diagram UHF ASK/FSK Remote Control Transmitter ATA8741 S1 PXY S1 PXY GND S1 PXY PXY PXY PXY PXY PXY PXY PXY PXY PXY ATtiny44V ATA8401 ATA8404 CLK f/4 VDD Power up/down PLL VS ENABLE UHF ASK/FSK Remote Control Receiver ATA8201 ATA8203 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 ATA8741 [DATASHEET] 9140E-INDCO-09/14 3 Figure 1-2. FSK System Block Diagram UHF ASK/FSK Remote Control Transmitter ATA8741 S1 PXY S1 PXY GND S1 PXY PXY PXY PXY PXY PXY PXY PXY PXY PXY ATtiny44V ATA8401 ATA8404 CLK f/4 VDD Power up/down PLL VS ENABLE UHF ASK/FSK Remote Control Receiver ATA8201 ATA8203 GND_RF 1 to 6 Demod XTO VCO VCC_RF Control VS Antenna PA_ENABLE PLL ANT2 PA Loop Antenna LNA ANT1 VS 4 ATA8741 [DATASHEET] 9140E-INDCO-09/14 VCO XTO Microcontroller Pin Configuration Table 2-1. GND ENABLE GND_RF VS_RF XTAL GND Figure 2-1. Pinning QFN24 5mm x 5mm 24 23 22 21 20 19 18 17 PA1 3 16 PA2 PB3/RESET 4 15 PA3/T0 PB2 5 14 PA4/USCK PA7 6 PA5/MISO 7 8 9 10 11 13 12 GND 2 PB1 ANT1 PB0 ANT2 PA0 PA_ENABLE 1 CLK VCC PA6/MOSI 2. Pin Description Pin Symbol 1 VCC Microcontroller supply voltage 2 PB0 Port B is a 4-bit bi-directional I/O port with internal pull-up resistor PB1 Port B is a 4-bit bi-directional I/O port with internal pull-up resistor 3 4 Function PB3/RESET Port B is a 4-bit bi-directional I/O port with internal pull-up resistor/reset input 5 PB2 Port B is a 4-bit bi-directional I/O port with internal pull-up resistor 6 PA7 Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 7 PA6 / MOSI Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 8 CLK 9 Clock output signal for microcontroller. The clock output frequency is set by the crystal to fXTAL/4 PA_ENABLE Switches on power amplifier. Used for ASK modulation 10 ANT2 Emitter of antenna output stage 11 ANT1 Open collector antenna output 12 GND Ground 13 PA5/MISO Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 14 PA4/SCK Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 15 PA3/T0 Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 16 PA2 Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 17 PA1 Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 18 PA0 Port A is a 4-bit bi-directional I/O port with internal pull-up resistor 19 GND Microcontroller ground 20 XTAL Connection for crystal 21 VS_RF 22 GND_RF Transmitter supply voltage Transmitter ground 23 ENABLE Enable input 24 GND Ground GND Ground/backplane (exposed die pad) ATA8741 [DATASHEET] 9140E-INDCO-09/14 5 2.1 Pin Configuration of RF Pins Table 2-2. Pin Pin Description Symbol Function Configuration VS 8 9 CLK Clock output signal for microcontroller. The clock output frequency is set by the crystal to fXTAL/4. PA_ENABLE Switches on power amplifier. 100 CLK 100 PA_ENABLE 50k UREF = 1.1V Used for ASK modulation. 20A ANT1 10 ANT2 Emitter of antenna output stage. 11 ANT1 Open collector antenna output. ANT2 VS 1.5k 20 XTAL Connection for crystal. XTAL 182A 6 ATA8741 [DATASHEET] 9140E-INDCO-09/14 VS 1.2k Table 2-2. Pin Pin Description (Continued) Symbol Function Configuration 21 VS Supply voltage See ESD protection circuitry (see Figure 8-1 on page 12). 22 GND Ground See ESD protection circuitry (see Figure 8-1 on page 12). 23 ENABLE Enable input ENABLE 200k ATA8741 [DATASHEET] 9140E-INDCO-09/14 7 3. Functional Description For a typical application 3 to 4 interconnections between the AVR(R) and the transmitter are required (see Figure 1-1 on page 3 and Figure 1-2 on page 4). The CLK line is used to allow the microcontroller to generate an XTALbased transmitter signal. The ENABLE line is used to start the transmitter's XTO, PLL, and clock. The PA_ENABLE line is used to enable the power amplifier in ASK and FSK mode. In FSK mode a fourth line is necessary to modulate the load capacity of the XTAL. To wake up the system from standby mode at least one key input is required. After pressing the key, the microcontroller starts up with the internal RC oscillator. For TX operation user software must control ENABLE, PA_ENABLE, and XTAL load capacity as described in the following section. If ENABLE = L and PA_ENABLE = L the transmitter and the microcontroller (MCU) are in standby mode, reducing the power consumption so that a lithium cell can be used as power supply for several years. If ENABLE = H and PA_ENABLE = L, the XTO, PLL, and the CLK driver from the transmitter are activated. The crystal oscillator together with the PLL from the RF transmitter typically require < 3ms until the PLL is locked and the clock output (Pin 8) is stable. If ENABLE = H and PA_ENABLE = H, the XTO, PLL, CLK driver, and the power amplifier (PA) are switched on. ASK modulation is achieved by switching on and off the power amplifier via PA_ENABLE. FSK modulation is achieved by switching on and off an additional capacitor between the XTAL load capacitor and GND, thus changing the reference frequency of the PLL. This is done using a MOS switch controlled by a microcontroller output. The power amplifier is switched on via PA_ENABLE = H. The MCU has to wait at least > 3ms after setting ENABLE = H, before the external clock can be used. The external clock is connected via the timer0 input pin that clocks the USI from the MCU to achieve an accurate data transfer. The frequency of the internal RC oscillator is affected by ambient temperature and operating voltage. The USI provides two serial synchronous data transfer modes, with different physical I/O ports for the data output. The two wire mode is used for ASK and the three wire mode is used for FSK. If ENABLE = L and the PA_ENABLE = L, the circuit is in standby mode consuming only a very small amount of current so that a lithium cell used as power supply can work for several years. With ENABLE = H the XTO, PLL, and the CLK driver are switched on. If PA_ENABLE remains L only the PLL and the XTO are running and the CLK signal is delivered to the microcontroller. The VCO locks to 32 times the XTO frequency. With ENABLE = H and PA_ENABLE = H the PLL, XTO, CLK driver, and the power amplifier are on. With PA_ENABLE the power amplifier can be switched on and off, which is used to perform the ASK modulation. 3.1 Description of RF Transmitter The integrated PLL transmitter is particularly suitable for simple, low-cost RF applications. The VCO is locked to 32 fXTAL hence a 9.8438MHz crystal is needed for a 315MHz transmitter. All other PLL and VCO peripheral elements are integrated. The XTO is a series resonance oscillator so that only one capacitor together with a crystal connected in series to GND are needed as external elements. The crystal oscillator together with the PLL typically need < 3ms until the PLL is locked and the CLK output is stable. There is a wait time of 3ms until the CLK is used for the microcontroller and the PA is switched on. 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 is controllable via the connected load impedance. This output configuration enables simple matching to any kind of antenna or to 50. This results in a high power efficiency of = Pout/(IS,PA VS) of 40% for the power amplifier when an optimized load impedance of ZLoad = (255 + j192) is used at 3V supply voltage. 3.2 ASK Transmission The RF TX block is activated by ENABLE = H. PA_ENABLE must remain L for typically 3ms, then the CLK signal is taken to clock the AVR and the output power can be modulated by means of pin PA_ENABLE. After transmission, PA_ENABLE is switched to L and the microcontroller switches back to internal clocking. The RF TX is switched back to standby mode with ENABLE = L. 8 ATA8741 [DATASHEET] 9140E-INDCO-09/14 3.3 FSK Transmission The RF TX is activated by ENABLE = H. PA_ENABLE must remain L for typically 3ms, then the CLK signal is taken to clock the AVR(R) and the power amplifier is switched on with PA_ENABLE = H. The chip is then ready for FSK modulation. The AVR starts to switch on and off the capacitor between the XTAL load capacitor and GND with an open-drain output port, thus changing the reference frequency of the PLL. When the switch is closed, the output frequency is lower than when the switch is open. After transmission, PA_ENABLE is switched to L and the microcontroller switches back to internal clocking. The RF TX is switched back to standby mode with ENABLE = L. The accuracy of the frequency deviation with XTAL pulling method is about 25% when the following tolerances are considered. Figure 3-1. Tolerances of Frequency Modulation VS CStray1 CStray2 LM C4 XTAL CM RS C0 Crystal equivalent circuit C5 CSwitch Using C4 = 8.2pF 5%, C5 = 10pF 5%, a switch port with CSwitch = 3pF 10%, stray capacitances on each side of the crystal of CStray1 = CStray2 = 1pF 10%, a parallel capacitance of the crystal of C0 = 3.2pF 10% and a crystal with CM = 13fF 10%, results in a typical FSK deviation of 21.5kHz with worst case tolerances of 16.25kHz to 28.01kHz. 3.4 CLK Output An output CLK signal is provided for the integrated AVR. 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. Atmel(R)'s AVR microcontroller starts with an integrated RC-oscillator to switch on the RF TX with ENABLE = H, and after 3ms assumes the clock signal of the transmission IC, so that the message can be sent with crystal accuracy. 3.4.2 Output Matching and Power Setting The output power is set by the load impedance of the antenna. The maximum output power is achieved with a load impedance of ZLoad,opt = (255 + j192). There must be a low resistive path to VS to deliver the DC current. The delivered 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. An optimum load impedance of: ZLoad = 400 || j/(2 x 1.0pF) = (255 + j192) is achieved for the maximum output power of 8dBm. The load impedance is defined as the impedance seen from the RF TX's ANT1, ANT2 into the matching network. This large signal load impedance should not be confused 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 for a power amplifier. Less output power is achieved by lowering the real parallel part of 400 where the parallel imaginary part should be kept constant. Output power measurement can be done using the circuit shown in Figure 8-4 on page 15. Note that the component values must be changed to compensate for the individual board parasitics until the RF TX has the right load impedance ZLoad,opt = (255 + j192). In addition, the damping of the cable used to measure the output power must be calibrated out. ATA8741 [DATASHEET] 9140E-INDCO-09/14 9 4. Microcontroller Block More detailed information about the microcontroller block can be found in the appendix. 5. Absolute Maximum Ratings 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 Tj 150 C C Junction temperature Minimum Storage temperature Tstg -55 125 Ambient temperature Tamb -55 125 Input voltage VmaxPA_ENABLE -0.3 Notes: 1. If VS + 0.3 is higher than 3.7V, the maximum voltage will be reduced to 3.7V. 6. (VS + 0.3) V Thermal Resistance Parameters Junction ambient 7. C (1) Symbol Value Unit RthJA 35 K/W Electrical Characteristics VS = 2.0V to 4.0V, Tamb = 25C 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 Supply current Power down, microcontroller Watchdog timer disabled IS_Off Supply current Power up, 4MHz internal RC oscillator IS_Transmit Output power VS = 3.0V, Tamb = 25C, f = 315MHz, ZLoad = (255 + j192) Output power variation for the full temperature range Tamb = 25C, VS = 3.0V VS = 2.0V Output power variation for the full temperature range Tamb = 25C, VS = 3.0V VS = 2.0V, POut = PRef + PRef Achievable output-power range Selectable by load impedance PRef ATA8741 [DATASHEET] 9140E-INDCO-09/14 Typ. Max. Unit 24.35 nA A 210 9.8 dBm PRef PRef -1.5 -4.0 dB dB PRef PRef -2.0 -4.5 dB dB 8.0 dBm POut_typ 6.0 8.0 mA 10.5 fCLK = f0/128 Load capacitance at pin CLK = 10pF Spurious emission fO 1 x fCLK fO 4 x fCLK other spurious are lower Notes: 1. If VS is higher than 3.6V, the maximum voltage will be reduced to 3.6V. 10 Min. 0 -55 -52 dBc dBc 7. Electrical Characteristics (Continued) VS = 2.0V to 4.0V, Tamb = 25C 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 Oscillator frequency XTO (= phase comparator frequency) fXTO = f0/32 fXTAL = resonant frequency of the XTAL, CM 10fF, load capacitance selected accordingly Tamb = 25C Symbol Min. Typ. Max. Unit -30 fXTAL +30 ppm fXTO PLL loop bandwidth 250 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 350 MHz Frequency range of VCO fVCO 310 Clock output frequency (CMOS microcontroller compatible) Voltage swing at pin CLK f0/128 CLoad 10pF Series resonance R of the crystal V0h V0l VS x 0.8 Rs Capacitive load at pin XT0 MHz VS x 0.2 V V 110 7 pF FSK modulation frequency rate Duty cycle of the modulation signal = 50% 0 32 kHz ASK modulation frequency rate Duty cycle of the modulation signal = 50% 0 32 kHz Low level input voltage High level input voltage Input current high 0.25 ENABLE input 20 V V A 0.25 VS(1) 5 V V A VIl VIh IIn Low level input voltage VIl PA_ENABLE input VIh High level input voltage IIn Input current high Notes: 1. If VS is higher than 3.6V, the maximum voltage will be reduced to 3.6V. 1.7 1.7 ATA8741 [DATASHEET] 9140E-INDCO-09/14 11 8. Application For the blocking of the supply voltage, a capacitor value of C3 = 68nF/X7R is recommended. C1 and C2 are used to match the loop antenna to the power amplifier, where C1 typically is 22pF/NP0 and C2 is 10.8pF/NP0 (18pF + 27pF in series); for C2 two capacitors in series should be used to achieve a better tolerance value and to have the possibility of realizing the ZLoad,opt using standard valued capacitors. Together with the pins and the PCB board wires C1 forms a series resonance loop that suppresses the 1st harmonic, hence the position of C1 on the PCB is important. Normally 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.5mm, otherwise the Q-factor of the loop antenna is too high. L1 (50nH to 100nH) can be printed on PCB. C4 should be selected that the XTO runs on the load resonance frequency of the crystal. Normally, a value of 12pF results for a 15pF load-capacitance crystal. Figure 8-1. ESD Protection Circuit VS ANT1 CLK PA_ENABLE ANT2 XTAL ENABLE GND Figure 8-2. Typical ASK Application ATA8741 VCC C8 C5 VDD C7 20 19 SW1 GND 21 XTAL 22 VCC_RF 1 23 GND_RF GND 24 ENABLE VCC Q1 18 PA0 2 C6 R3 SW2 17 PB0/XTAL1 PA1 PB1/XTAL2 PA2 3 16 ATA874x 4 SW3 15 PB3/RESET PA3/T0 5 14 PB2 13 GND ANT1 PA5/MISO ANT2 CLK PA7 ADC7 PA6 ADC6 6 PA_ENABLE PA4/SCK R2 7 8 9 10 11 12 C1 R4 VCC R1 L1 L2 C2 12 ATA8741 [DATASHEET] 9140E-INDCO-09/14 C3 C4 Table 8-1. Bill of Material Component Type/ Manufacturer Value Note 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 Murata possible to the VCC_RF C6 100nF 100nF 100nF GRM188R71C / This cap must placed as close as Murata possible to the VDD C7 100nF 100nF 100nF GRM188R71C/ Murata C8 10pF 12pF 12pF GRM1885C/ Murata Q1 9.843750MHz 13.56MHz 13.567187 MHz DSX530GK/ KDS R1 100k 100k 100k R2 100k 100k 100k R3 10k 10k 10k R4 1.8k 1.8k 1.8k This resistor can be resigned if the ASK modulation is performed using PA5 (MISO). ATA8741 [DATASHEET] 9140E-INDCO-09/14 13 Figure 8-3. Typical FSK Application ATA8741 C8 VCC T1 C5 VDD 21 20 19 SW1 GND XTAL GND 1 22 VCC_RF 23 ENABLE 24 GND_RF VCC C9 Q1 18 PA0 2 C7 C6 R3 SW2 17 PB0/XTAL1 PA1 PB1/XTAL2 PA2 3 16 ATA874x 4 SW3 15 PA3/T0 PB3/RESET 5 14 PA4/SCK 13 PA5/MISO GND ANT1 PA6 ADC6 PA7 ADC7 CLK 6 ANT2 PA_ENABLE PB2 R2 7 8 9 10 11 12 C1 VCC R1 L1 L2 C2 C4 Note: 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. Table 8-2. Bill of Material Component 14 C3 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 Murata the VCC_RF C6 100nF 100nF 100nF GRM188R71C / This cap must placed as close as possible to Murata the VDD C7 100nF 100nF 100nF GRM188R71C / Murata ATA8741 [DATASHEET] 9140E-INDCO-09/14 Table 8-2. Bill of Material (Continued) Component Type/ Manufacturer Note Value C8 3.9pF 4.7pF 5.6pF GRM1885C/ Murata Frequency deviation of 16kHz will be performed using the combination of C8 and C9 C9 18pF 8.2pF 5.6pF GRM1885C/ Murata Frequency deviation of 16kHz will be performed using the combination of C8 and C9 T1 Q1 9.843750MH z 13.56MHz 13.567187M Hz R1 100k 100k 100k R2 100k 100k 100k R3 10k 10k 10k R4 1.8k 1.8k 1.8k Table 8-3. Note: BSS83 DSX530GK/ KDS Transmitter Pin Cross Reference List Pin Name Pin Number ATA8401/02/03 Pin Number ATA8741/42/43 CLK 1 8 PA_ENABLE 2 9 ANT2 3 10 ANT1 4 11 XTAL 5 20 VS 6 21 GND 7 22 ENABLE 8 For the ATA8741, the following points differs in the data sheets: - The temperature range is limited to -40C to +85C - ESD protection: HBM 2500V, MM 100V, CDM 1000V - Figure 8-4: Two output power measurement - For FSK modulation, an additional MOS switch is required 23 Figure 8-4. Output Power Measurement ATA8741 VS C1 = 1nF L1 = 47nH Z = 50 ANT1 ZLopt ANT2 Power meter C2 = 3.3pF Rin 50 ATA8741 [DATASHEET] 9140E-INDCO-09/14 15 Table 8-4. Note: 16 Microcontroller Cross Reference List Pin Name Pin Number ATtiny44V Pin Number ATA8741/ATA8742/ATA8743 VCC 1 1 PB0 2 2 PB1 3 3 PB3/NRESET 4 4 PB2 5 5 PA7 6 6 PA6/MOSI 7 7 PA5/MISO 8 13 PA4/USCK 9 14 PA3/T0 10 15 PA2 11 16 PA1 12 17 PA0 13 18 GND 14 19 For the ATA8741/ATA8742/ATA8743, the following points differs from the Atmel(R) ATtiny44V datasheet: - The temperature range is limited to -40C to +85C - The supply voltage range is limited from 2.0V to 4.0V ATA8741 [DATASHEET] 9140E-INDCO-09/14 Appendix 1: Microcontroller ATtiny24/44/84 ATA8741 [DATASHEET] 9140E-INDCO-09/14 17 9. Overview The Atmel(R) ATtiny24/44/84 is a low-power CMOS 8-bit microcontroller based on the AVR(R) enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the Atmel ATtiny24/44/84 achieves throughputs approaching 1MIPS per MHz allowing the system designer to optimize power consumption versus processing speed. 9.1 Block Diagram Figure 9-1. Block Diagram VCC 8-bit Databus GND Internal Oscillator Internal Calibrated Oscillator Timing and Control Program Counter Stack Pointer Watchdog Timer Program Flash SRAM MCU Control Register Instruction Register MCU Status Register General Purpose Registers Timer/ Counter 0 X Y Z Instruction Decoder Timer/ Counter 1 Control Lines ALU Status Register Interrupt Unit + - 18 Analog Comparator Programming Logic ATA8741 [DATASHEET] 9140E-INDCO-09/14 ISP Interface Data Register Port A Data Dir. Register Port A EEPROM ADC Oscillators Data Register Port B Data Dir. Register Port B Port A Drivers Port B Drivers PA7-PA0 PB3-PB0 The 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(R)ATtiny24/44/84 provides the following features: 2/4/8K byte of in-system programmable flash, 128/256/512 bytes EEPROM, 128/256/512 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 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 ATtiny24/44/84 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. 9.2 Automotive Quality Grade The Atmel ATtiny24/44/84 have been developed and manufactured according to the most stringent requirements of the international standard ISO-TS-16949 grade 1. This data sheet contains limit values extracted from the results of extensive characterization (Temperature and Voltage). The quality and reliability of the ATtiny24/44/84 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 9-1. Temperature Grade Identification for Automotive Products Temperature Temperature Identifier Comments -40; +125 Z Full automotive temperature range 9.3 Pin Descriptions 9.3.1 VCC Supply voltage. 9.3.2 GND Ground. 9.3.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 ATtiny24/44/84 as listed on Section 19.3 "Alternate Port Functions" on page 68. 9.3.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 16-1 on page 50. Shorter pulses are not guaranteed to generate a reset. ATA8741 [DATASHEET] 9140E-INDCO-09/14 19 9.3.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 19.3 "Alternate Port Functions" on page 68 10. Resources A comprehensive set of development tools, drivers and application notes, and datasheets are available for download on http://www.atmel.com/avr. 11. 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". 20 ATA8741 [DATASHEET] 9140E-INDCO-09/14 12. CPU Core 12.1 Overview This section discusses the AVR core architecture in general. The main function of the CPU core is to ensure correct program execution. The CPU must therefore be able to access memories, perform calculations, control peripherals, and handle interrupts. Architectural Overview Figure 12-1. Block Diagram of the AVR Architecture Data Bus 8-bit Flash Program Memory Program Counter Status and Control 32 x 8 General Purpose Registers Instruction Decoder Control Lines Indirect Addressing Instruction Register Direct Addressing 12.2 ALU Interrupt Unit Watchdog Timer Analog Comparator Timer/Counter 0 Data SRAM Timer/Counter 1 EEPROM Universal Serial Interface I/O Lines In order to maximize performance and parallelism, the AVR(R) uses a harvard architecture - with separate memories and buses for program and data. Instructions in the Program memory are executed with a single level pipelining. While one instruction is being executed, the next instruction is pre-fetched from the program memory. This concept enables instructions to be executed in every clock cycle. The program memory is in-system reprogrammable flash memory. The fast-access register file contains 32 x 8-bit general purpose working registers with a single clock cycle access time. This allows single-cycle arithmetic logic unit (ALU) operation. In a typical ALU operation, two operands are output from the register file, the operation is executed, and the result is stored back in the register file - in one clock cycle. ATA8741 [DATASHEET] 9140E-INDCO-09/14 21 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 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. 12.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. 12.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. 12.4.1 SREG - AVR Status Register Bit 7 6 5 4 3 2 1 0 0x3F (0x5F) 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. 22 ATA8741 [DATASHEET] 9140E-INDCO-09/14 * 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 23 12.5 General Purpose Register File The register file is optimized for the 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 12-2 shows the structure of the 32 general purpose working registers in the CPU. Figure 12-2. 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 12-2 on page 24, 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. 24 ATA8741 [DATASHEET] 9140E-INDCO-09/14 12.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 12-3 on page 25. Figure 12-3. The X-, Y-, and Z-registers 15 XH XL 0 7 0 7 0 X-register R27 (0x1B) R26 (0x1A) 15 YH YL 0 7 0 7 0 Y-register R29 (0x1D) R28 (0x1C) 15 ZH ZL 0 7 0 7 0 Z-register R31 (0x1F) 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). 12.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 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. 12.6.1 SPH and SPL - Stack Pointer High and Low Bit 15 14 13 12 11 10 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 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 Read/Write Initial Value 9 8 ATA8741 [DATASHEET] 9140E-INDCO-09/14 25 12.7 Instruction Execution Timing This section describes the general access timing concepts for instruction execution. The AVR CPU is driven by the CPU clock clkCPU, directly generated from the selected clock source for the chip. No internal clock division is used. Figure 12-4 shows the parallel instruction fetches and instruction executions enabled by the harvard architecture and the fast access register file concept. This is the basic pipelining concept to obtain up to 1MIPS per MHz with the corresponding unique results for functions per cost, functions per clocks, and functions per power-unit. Figure 12-4. The Parallel Instruction Fetches and Instruction Executions T1 T2 T3 T4 clkCPU 1st Instruction Fetch 1st Instruction Execute 2nd Instruction Fetch 2nd Instruction Execute 3rd Instruction Fetch 3rd Instruction Execute 4th Instruction Fetch Figure 12-5 shows the internal timing concept for the register file. In a single clock cycle an ALU operation using two register operands is executed, and the result is stored back to the destination register. Figure 12-5. Single Cycle ALU Operation T1 clkCPU Total Execution Time Register Operands Fetch ALU Operation Execute Result Write Back 26 ATA8741 [DATASHEET] 9140E-INDCO-09/14 T2 T3 T4 12.8 Reset and Interrupt Handling The AVR(R) 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 17. "Interrupts" on page 59. The list also determines the priority levels of the different interrupts. The lower the address the higher is the priority level. RESET has the highest priority, and next is INT0 - the external interrupt request 0. When an interrupt occurs, the global interrupt enable I-bit is cleared and all interrupts are disabled. The user software can write logic one to the I-bit to enable nested interrupts. All enabled interrupts can then interrupt the current interrupt routine. The I-bit is automatically set when a return from interrupt instruction - RETI - is executed. There are basically two types of interrupts. The first type is triggered by an event that sets the interrupt flag. For these interrupts, the program counter is vectored to the actual interrupt vector in order to execute the interrupt handling routine, and hardware clears the corresponding interrupt flag. Interrupt flags can also be cleared by writing a logic one to the flag bit position(s) to be cleared. If an interrupt condition occurs while the corresponding interrupt enable bit is cleared, the interrupt flag will be set and remembered until the interrupt is enabled, or the flag is cleared by software. Similarly, if one or more interrupt conditions occur while the global interrupt enable bit is cleared, the corresponding interrupt flag(s) will be set and remembered until the global Interrupt enable bit is set, and will then be executed by order of priority. The second type of interrupts will trigger as long as the interrupt condition is present. These interrupts do not necessarily have interrupt flags. If the interrupt condition disappears before the interrupt is enabled, the interrupt will not be triggered. When the AVR exits from an interrupt, it will always return to the main program and execute one more instruction before any pending interrupt is served. Note that the status register is not automatically stored when entering an interrupt routine, nor restored when returning from an interrupt routine. This must be handled by software. ATA8741 [DATASHEET] 9140E-INDCO-09/14 27 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 cli sbi sbi out r16, SREG ; store SREG value ; disable interrupts during timed sequence EECR, EEMPE ; start EEPROM write EECR, EEPE 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< xxx ... ... ... ... 60 ATA8741 [DATASHEET] 9140E-INDCO-09/14 18. 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 14.1 "Clock Systems and their Distribution" on page 37. 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 14. "System Clock and Clock Options" on page 37. 18.1 Pin Change Interrupt Timing An example of timing of a pin change interrupt is shown in Figure 18-1. Figure 18-1. Timing of Pin Change Interrupts PCINT(0) D Q pin_lat D Q pcint_in_(0) 0 pin_sync pcint_sync pcint_setflag PCIF LE x PCINT(0) in PCMSK(x) clk clk clk PCINT(0) pin_lat pin_sync PCINT(0) pcint_syn pcint_setflag PCIF ATA8741 [DATASHEET] 9140E-INDCO-09/14 61 18.2 Register Description 18.2.1 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 0x35 (0x55) - PUD SE SM1 SM0 - ISC01 ISC00 Read/Write R R/W R/W R/W R/W R 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 18-1. 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 18-1. Interrupt 0 Sense Control ISC01 ISC00 0 0 Description 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. 18.2.2 GIMSK - General Interrupt Mask Register Bit 7 6 5 4 3 2 1 0 0x3B (0x5B) - INT0 PCIE1 PCIE0 - - - - 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 Atmel(R) ATtiny24/44/84 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. * 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. 62 ATA8741 [DATASHEET] 9140E-INDCO-09/14 18.2.3 GIFR - General Interrupt Flag Register Bit 7 6 5 4 3 2 1 0x3A (0x5A - INTF0 PCIF1 PCIF0 - - - 0 - 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 Atmel(R) ATtiny24/44/84 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. 18.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 ATtiny24/44/84 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. 18.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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 63 19. I/O Ports 19.1 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 19-1. See Section 29. "Electrical Characteristics" on page 175 for a complete list of parameters. Figure 19-1. I/O Pin Equivalent Schematic Rpu Pxn Logic 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 Section 2 "EXT_CLOCK = external clock is selected as system clock." on page 76. 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 19.2 "Ports as General Digital I/O" on page 65. 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 19.3 "Alternate Port Functions" on page 68. 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. 64 ATA8741 [DATASHEET] 9140E-INDCO-09/14 19.2 Ports as General Digital I/O The ports are bi-directional I/O ports with optional internal pull-ups. Figure 19-2 shows a functional description of one I/Oport pin, here generically called Pxn. Figure 19-2. General Digital I/O(1) PUD Q D DDxn Q CLR RESET WDx RDx D 0 PORTxn Q CLR RESET SLEEP DATA BUS 1 Q Pxn WRx WPx RRx Synchronizer RPx D Q D Q PINxn L Q Q CLKI/O PUD: SLEEP: CLKI/O: Note: 1. 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 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. 19.2.1 Configuring the Pin Each port pin consists of three register bits: DDxn, PORTxn, and PINxn. As shown in Section 2 "EXT_CLOCK = external clock is selected as system clock." on page 76, 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 pullup resistor off, PORTxn has to be written logic zero or the pin has to be configured as an output pin. The port pins are tristated 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). ATA8741 [DATASHEET] 9140E-INDCO-09/14 65 19.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. 19.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 19-1 summarizes the control signals for the pin value. Table 19-1. Port Pin Configurations DDxn PORTxn PUD (in MCUCR) I/O 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) Pull-up Comment 19.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 19-2 on page 65, 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 19-3 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 19-3. Synchronization when Reading an Externally Applied Pin value System CLK Instructions XXX XXX in r17, PINx SYNC Latch PINxn r17 0x00 0xFF tpd, max tpd, 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. 66 ATA8741 [DATASHEET] 9140E-INDCO-09/14 When reading back a software assigned pin value, a nop instruction must be inserted as indicated in Figure 19-4. The out instruction sets the "SYNC LATCH" signal at the positive edge of the clock. In this case, the delay tpd through the synchronizer is one system clock period. Figure 19-4. 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 tpd 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. 22.2 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 22-1 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 clkT0 pulse for each positive (CSn2:0 = 7) or negative (CSn2:0 = 6) edge it detects. Figure 22-1. T0 Pin Sampling Tn D Q D Q D Tn_sync (to Clock Select Logic) Q LE clkI/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. 120 ATA8741 [DATASHEET] 9140E-INDCO-09/14 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 22-2. Prescaler for Timer/Counter0 10-bit T/C Prescaler PSR10 CK/1024 CK/64 CK/8 Clear CK/256 clkI/O Synchronization T0 0 CS00 CS01 CS02 Timer/Counter 0 Clock Source clkT0 Note: 22.3 1. The synchronization logic on the input pins (T0) is shown in Figure 22-1 on page 120. Register Description 22.3.1 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/counter n prescaler will be reset. This bit is normally cleared immediately by hardware, except if the TSM bit is set. ATA8741 [DATASHEET] 9140E-INDCO-09/14 121 23. USI - Universal Serial Interface 23.1 Features 23.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 23-1. 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 23.5 "Register Descriptions" on page 128. Figure 23-1. Universal Serial Interface, Block Diagram D DO Q (Output only) LE 3 2 1 0 4-bit Counter USIDC USIPF USIOIF USIDR USISIF (Input/ Open Drain)) Bit0 Bit7 DI/SDA TIM0 COMP 3 2 0 1 1 0 [1] USISR USCK/SCL (Input/ Open Drain)) CLOCK HOLD Two-wire Clock Control Unit USITC USICLK USICS0 USICS1 USIWM0 USIWM1 USIOIE USISIE 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. 122 ATA8741 [DATASHEET] 9140E-INDCO-09/14 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. 23.3 Functional Descriptions 23.3.1 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 23-2. Three-wire Mode Operation, Simplified Diagram DO DI Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 USCK SLAVE DO DI Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 USCK PORTxn MASTER Figure 23-2 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 123 Figure 23-3. Three-wire Mode, Timing Diagram CYCLE 1 (Reference) 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 23-3. 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 23-3 on page 124), 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. 23.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< 2CPU clock cycles for fck < 12MHz, 3CPU clock cycles for fck 12MHz High: > 2CPU clock cycles for fck < 12MHz, 3CPU clock cycles for fck 12MHz 28.6.1 Serial Programming Algorithm When writing serial data to the Atmel(R) ATtiny24/44/84, data is clocked on the rising edge of SCK. When reading data from the Atmel ATtiny24/44/84, data is clocked on the falling edge of SCK. See Figure 29-3 on page 181 and Figure 29-4 on page 181 for timing details. To program and verify the Atmel ATtiny24/44/84 in the serial programming mode, the following sequence is recommended (see four byte instruction formats in Table 28-11 on page 166): 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 3MSB 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 28-10 on page 166.) Accessing the serial programming interface before the flash write operation completes can result in incorrect programming. 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 28-10 on page 166.) 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 2LSB 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 4MSB 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 28-10 on page 166). 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 165 Table 28-10. Minimum Wait Delay Before Writing the Next Flash or EEPROM Location Symbol Minimum Wait Delay tWD_FLASH 4.5ms tWD_EEPROM 4.0ms tWD_ERASE 4.0ms tWD_FUSE 4.5ms 28.6.2 Serial Programming Instruction set Table 28-11 on page 166 and Figure 28-2 on page 167 describes the Instruction set . Table 28-11. 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 Load instructions Load extended address byte $4D $00 Extended adr $00 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 $00 adr LSB $00 Read instructions Write instructions (6) Write EEPROM memory Page (page $C2 access) Notes: 1. Not all instructions are applicable for all parts. 166 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 corresponding 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 http://www.atmel.com/avr for application notes regarding programming and programmers. ATA8741 [DATASHEET] 9140E-INDCO-09/14 Table 28-11. Serial Programming Instruction Set (Continued) Instruction Format (1) Instruction/Operation Byte 1 Byte 2 Byte 3 Byte4 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 $A4 $00 data byte in Write extended fuse bits $AC 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 corresponding 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 http://www.atmel.com/avr for application notes regarding programming and programmers. 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 28-2. Figure 28-2. Serial Programming Instruction example Serial Programming Instruction Load Program Memory Page (High/Low Byte)/ Load EEPROM Memory Page (page access) Byte 1 Bit 15 B Byte 2 Byte 3 Adr MBS Adr LBS Write Program Memory Page/ Write EEPROM Memory Page Byte 4 Byte 1 0 Byte 2 Byte 3 Adr MBS Adr LBS Bit 15 B Byte 4 0 Page Buffer Page Offset Page 0 Page 1 Page 2 Page Number Page N-1 Program Memory/ EEPROM Memory ATA8741 [DATASHEET] 9140E-INDCO-09/14 167 28.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) ATtiny24/44/84. Figure 28-3. High-voltage Serial Programming + 1.8 to 5.5V + 11.5 to 12.5V SCI PB3 (RESET) VCC PB0 PA4 SDO PA5 SII PA6 SDI GND Table 28-12. Pin Name Mapping Signal Name in High-voltage Serial Programming Mode Pin Name I/O 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) Function The minimum period for the serial clock input (SCI) during high-voltage serial programming is 220ns. Table 28-13. Pin Values Used to Enter Programming Mode 168 Pin Symbol Value PA0 Prog_enable[0] 0 PA1 Prog_enable[1] 0 PA2 Prog_enable[2] 0 ATA8741 [DATASHEET] 9140E-INDCO-09/14 28.8 High-voltage Serial Programming Algorithm To program and verify the Atmel(R) ATtiny24/44/84 in the high-voltage serial programming mode, the following sequence is recommended (See instruction formats in Table 28-15 on page 172): 28.8.1 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 28-13 on page 168 to "000" and wait at least 100ns. 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 actively 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 50s before giving any serial instructions on SDI/SII. Table 28-14. High-voltage Reset Characteristics Supply Voltage RESET Pin High-voltage Threshold Minimum High-voltage Period for Latching Prog_enable VCC VHVRST tHVRST 4.5V 11.5V 100ns 5.5V 11.5V 100ns 28.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. 28.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. Notes: 1. The EEPROM memory is preserved during chip erase if the EESAVE fuse is programmed. 1. Load command "chip erase" (see Table 28-15 on page 172). 2. Wait after Instr. 3 until SDO goes high for the "chip erase" cycle to finish. 3. Load command "no operation". ATA8741 [DATASHEET] 9140E-INDCO-09/14 169 28.8.4 Programming the Flash The flash is organized in pages, see Section 28.5 "Page Size" on page 164. 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 28-15 on page 172). 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 Atmel(R) ATtiny24/44/84, data is clocked on the rising edge of the serial clock, see Figure 29-5 on page 182, Figure 28-3 on page 168 and Table 29-8 on page 182 for details. Figure 28-4. Addressing the Flash which is Organized in Pages PCMSB PAGEMSB Program Counter PCPAGE PCWORD Page Address within the Flash Word Address within a Page Program Memory Page Page Instruction Word PCWORD[PAGEMSB:0] 00 01 02 PAGEEND Figure 28-5. High-voltage Serial Programming Waveforms SDI MSB LSB SII MSB LSB SDO SCI 170 MSB 0 ATA8741 [DATASHEET] 9140E-INDCO-09/14 LSB 1 2 3 4 5 6 7 8 9 10 28.8.5 Programming the EEPROM The EEPROM is organized in pages, see Table 29-7 on page 181. 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 28-15 on page 172): 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". 28.8.6 Reading the Flash The algorithm for reading the flash memory is as follows (refer to Table 28-15 on page 172): 1. Load Command "read flash". 2. Read flash low and high bytes. The contents at the selected address are available at serial output SDO. 28.8.7 Reading the EEPROM The algorithm for reading the EEPROM memory is as follows (refer to Table 28-15 on page 172): 1. Load command "read EEPROM". 2. Read EEPROM byte. The contents at the selected address are available at serial output SDO. 28.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 28-15 on page 172. 28.8.9 Reading the Signature Bytes and Calibration Byte The algorithms for reading the signature bytes and calibration byte are shown in Table 28-15 on page 172. 28.8.10 Power-off sequence Set SCI to "0". Set RESET to "1". Turn VCC power off. ATA8741 [DATASHEET] 9140E-INDCO-09/14 171 Table 28-15. High-voltage Serial Programming Instruction Set for ATtiny24/44/84 Instruction Format Instruction Chip Erase Load "Write Flash" Command Load Flash Page Buffer Load Flash High Address and Program Page Load "Read Flash" Command Read Flash Low and High Bytes Load "Write EEPROM" Command Load EEPROM Page Buffer Instr.1/5 Instr.2/6 Instr.3/7 SDI 0_1000_0000_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0001_0000_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI 0_ bbbb_bbbb _00 0_eeee_eeee_00 0_0000_0000_00 Instr.4 Operation Remarks Wait after Instr.3 until SDO goes high for the Chip Erase cycle to finish. Enter Flash Programming code. SII 0_0000_1100_00 0_0010_1100_00 0_0110_1101_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_dddd_dddd_00 0_0000_0000_00 0_0000_0000_00 SII 0_0011_1100_00 0_0111_1101_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx 0_0000_0000_00 Repeat after Instr. 1 - 7until the entire page buffer is filled or 0_0110_1100_00 until all data within the page is x_xxxx_xxxx_xx 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_000a_00 0_0000_0000_00 0_0000_0000_00 SII 0_0001_1100_00 0_0110_0100_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx 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 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx q_qqqq_qqqx_xx SDI 0_0000_0000_00 0_0000_0000_00 SII 0_0111_1000_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx p_pppp_pppx_xx SDI 0_0001_0001_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI 0_bbbb_bbbb_00 0_aaaa_aaaa_00 0_eeee_eeee_00 0_0000_0000_00 Enter Flash Read mode. 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. 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 SII 0_0110_1100_00 SDO 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. 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: 172 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 Table 28-15. High-voltage Serial Programming Instruction Set for ATtiny24/44/84 (Continued) Instruction Format Instruction Program EEPROM Page Write EEPROM Byte Load "Read EEPROM" Command Read EEPROM Byte Write Fuse Low Bits Write Fuse High Bits Write Fuse Extended Bits Write Lock Bits Read Fuse Low Bits Read Fuse High Bits Instr.1/5 Instr.2/6 SDI 0_0000_0000_00 0_0000_0000_00 Instr.3/7 SII 0_0110_0100_00 0_0110_1100_00 x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_bbbb_bbbb_00 0_aaaa_aaaa_00 0_eeee_eeee_00 SII 0_0000_1100_00 0_0001_1100_00 0_0010_1100_00 SDO 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 x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0000_0011_00 Repeat Instr. 1 - 6 for each new address. Wait after Instr. 6 0_0110_1101_00 until SDO goes high. See Note x_xxxx_xxxx_xx 3. 0_0000_0000_00 Instr. 5-6 Enter EEPROM Read mode. SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx SDI 0_bbbb_bbbb_00 0_aaaa_aaaa_00 0_0000_0000_00 SII 0_0000_1100_00 0_0001_1100_00 0_0110_1000_00 0_0000_0000_00 Repeat Instr. 1, 3 - 4 for each new address. Repeat Instr. 2 for a new 256 byte page. q_qqqq_qqq0_00 0_0110_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0100_0000_00 0_A987_6543_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0010_1100_00 0_0110_0100_00 0_0110_1100_00 x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDO x_xxxx_xxxx_xx SDI 0_0100_0000_00 SII 0_0100_1100_00 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. SDO SDO Instr.4 0_IHGF_EDCB_00 0_0000_0000_00 0_0010_1100_00 0_0111_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx SDI 0_0100_0000_00 0_0000_000J_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0010_1100_00 0_0110_0110_00 0_0110_1110_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx 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 SDI 0_0000_0100_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0111_1010_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx I_HGFE_DCBx_xx 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. 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 173 Table 28-15. High-voltage Serial Programming Instruction Set for ATtiny24/44/84 (Continued) Instruction Format Instruction Read Fuse Extended Bits Read Lock Bits Read Signature Bytes Read Calibration Byte Load "No Operation" Command Instr.1/5 Instr.2/6 Instr.3/7 Instr.4 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 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxJx_xx 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 SDI 0_0000_1000_00 0_0000_0000_00 0_0000_0000_00 0_0000_0000_00 SII 0_0100_1100_00 0_0000_1100_00 0_0111_1000_00 0_0111_1100_00 SDO x_xxxx_xxxx_xx x_xxxx_xxxx_xx x_xxxx_xxxx_xx p_pppp_pppx_xx SDI 0_0000_0000_00 SII 0_0100_1100_00 SDO x_xxxx_xxxx_xx Operation Remarks Reading J = "0" means the Fuse bit is programmed. Reading 2, 1 = "0" means the Lock bit is programmed. Repeats Instr 2 4 for each signature byte address. 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: 174 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 29. Electrical Characteristics 29.1 Absolute Maximum Ratings 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 Min. Automotive operating temperature Typ. Max. Unit - 40 +125 C Storage temperature - 65 +150 C Voltage on any pin except RESET with respect to ground - 0.5 VCC + 0.5 V Voltage on RESET with respect to ground - 0.5 +13.0 V Voltage on VCC with respect to ground - 0.5 +6.0 DC current per I/O pin DC current VCC and GND pins (2) Injection current at VCC = 0V to 5V Notes: 1. Maximum current per port = 30mA 2. 29.2 V 40.0 mA 200.0 mA 5.0 mA(1) Functional corruption may occur. DC Characteristics TA = -40C to 125C, VCC = 2.7V to 5.5V (unless otherwise noted)(1) Parameter Condition Symbol Min. Max. Unit Input low voltage VCC = 2.4V - 5.5V VIL -0.5 0.3VCC V Input high-voltage Except RESET pin VCC = 2.4V - 5.5V VIH -0.6VCC(3) VCC + 0.5(2) V VIH2 -0.9VCC(3) VCC + 0.5(2) V 0.8 0.5 V V Input high-voltage RESET pin Output low voltage(4) (port B,PORTA) IOL = 10mA, VCC = 5V IOL = 5mA, VCC = 3V VOL Output high-voltage(5) (Port B2:0,PORTA) IOH = -10mA, VCC = 5V IOH = -5mA, VCC = 3V VOH Typ. -4.3 -2.5 V V Input leakage Vcc = 5.5V, pin low IILPORTA 50 nA current I/O pin (absolute value) Notes: 1. All DC characteristics contained in this data sheet are based on actual silicon characterization of Atmel ATtiny24/44/84 AVR microcontrollers manufactured in corner run process technology. These values are preliminary values representing design targets, and will be updated after characterization of actual Automotive silicon. 2. "Max" means the highest value where the pin is guaranteed to be read as low. 3. "Min" means the lowest value where the pin is guaranteed to be read as high. 4. 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. 5. 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 strength of the PB3 RESET pad is weak. ATA8741 [DATASHEET] 9140E-INDCO-09/14 175 29.2 DC Characteristics (Continued) TA = -40C to 125C, VCC = 2.7V to 5.5V (unless otherwise noted)(1) Parameter Condition Symbol Input leakage current I/O pin Vcc = 5.5V, pin high (absolute value) IIHPORTA Input leakage current I/O pin Vcc = 5.5V, pin low (absolute value) IIHPORTB Input leakage current I/O lin Vcc = 5.5V, pin high (absolute value) IILPORTB Min. Typ. Max. Unit 50 nA <0.05 1 A <0.05 1 A Reset pull-up resistor RRST 30 60 kW I/O pin pull-up resistor Rpu 20 50 kW Power supply current Active 1MHz, VCC = 3V 0.4 1.5 mA Active 4MHz, VCC = 3V 1.8 3.0 mA Active 8MHz, VCC = 5V 5.0 10.0 mA Idle 1MHz, VCC = 3V 0.075 0.2 mA 0.3 0.5 mA 1.2 2.5 mA WDT enabled, VCC = 3V 5.0 30 A WDT enabled, VCC = 5V 9.0 50 A WDT disabled, VCC = 3V 2.5 24 A WDT disabled, VCC = 5V 4.3 36 A Idle 4MHz, VCC = 3V Idle 8MHz, VCC = 5V Power-down mode ICC Analog comparator input VCC = 5V IACLK -50 50 nA leakage current Vin = VCC/2 Notes: 1. All DC characteristics contained in this data sheet are based on actual silicon characterization of Atmel ATtiny24/44/84 AVR microcontrollers manufactured in corner run process technology. These values are preliminary values representing design targets, and will be updated after characterization of actual Automotive silicon. 176 2. "Max" means the highest value where the pin is guaranteed to be read as low. 3. "Min" means the lowest value where the pin is guaranteed to be read as high. 4. 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. 5. 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 strength of the PB3 RESET pad is weak. ATA8741 [DATASHEET] 9140E-INDCO-09/14 29.3 Speed Grades Figure 29-1. Maximum Frequency versus VCC 16MHz 8MHz Safe Operating Area 2.7V 29.4 4.5V 5.5V Clock Characterizations 29.4.1 Calibrated Internal RC Oscillator Accuracy Table 29-1. Calibration Accuracy of Internal RC Oscillator Frequency VCC Temperature Accuracy Factory calibration 8.0MHz 3V 25C 2% User calibration 7.3 - 8.1MHz 2.7V - 5.5V -40C - 125C 20% -40C - 125 Standard deviation 0.4ns(1) Oscillator jitter 8.0MHz 2.7V - 5.5V Note: 1. The overall jitter increase proportionally to the divider ratio Example: with oscillator divided by 32, jitter standard deviation will be 32 x 0.4ns = 12.8ns. 29.4.2 External Clock Drive Waveforms Figure 29-2. External Clock Drive Waveforms tCHCX tCLCH tCHCX tCHCL VIH1 VIL1 tCLCX tCLCL ATA8741 [DATASHEET] 9140E-INDCO-09/14 177 29.4.3 External Clock Drive Table 29-2. External Clock Drive VCC = 2.7 - 5.5V Parameter Symbol Clock frequency Min. Max. 10 VCC = 4.5 - 5.5V Min. Max. Unit 0 20 MHz 1/tCLCL 0 Clock period tCLCL 100 50 ns High time tCHCX 40 20 ns Low time tCLCX 40 20 ns Rise time tCLCH 1.6 0.5 s Fall time tCHCL 1.6 0.5 s Change in period from one clock cycle to the next tCLCL 2 2 % 29.5 System and Reset Characterizations Table 29-3. Reset, Brown-out and Internal Voltage Reference Characteristics(1) Parameter Symbol Brown-out detector hysteresis VHYST RAM retention voltage(1) VRAM2. Condition Min Max Unit 100 250 mV 50 Min Pulse width on brown-out reset tBOD Bandgap reference voltage VBG VC C= 2.7V, TA = 25C Bandgap reference start-up time tBG Bandgap reference current consumption Notes: 1. Values are guidelines only. IBG 2. Typ mV 2 1.0 ns 1.1 1.2 VC C= 2.7V, TA = 25C 40 70 VC C= 2.7V, TA = 25C 10 V s A This is the limit to which VDD can be lowered without losing RAM data Table 29-4. BODLEVEL Fuse Coding(1) BODLEVEL [2..0] Fuses 111 Min VBOT Typ VBOT Max VBOT Unit BOD Disabled 110 1.8 101 2.7 100 4.3 011 2.3 010 2.2 001 1.9 V 000 2.0 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. Note: 1. 178 ATA8741 [DATASHEET] 9140E-INDCO-09/14 29.6 ADC Characteristics - Preliminary Data Table 29-5. ADC Characteristics, Single Ended Channels. -40C - 125C Parameter Resolution Absolute accuracy (including INL, DNL, quantization error, gain and offset error) Condition Symbol Min Typ Max Unit Single ended conversion 10 Single ended conversion VREF = 4V, VCC = 4V, ADC clock = 200kHz 2.0 4.0 LSB 2.0 4.0 LSB INL 0.5 1.5 LSB DNL 0.3 0.7 LSB Single ended conversion VREF = 4V, VCC = 4V, ADC clock = 200kHz Bits TUE Noise reduction mode Integral non-linearity (INL) Single ended conversion VREF = 4V, VCC = 4V, ADC clock = 200kHz Single ended conversion Differential non-linearity (DNL) VREF = 4V, VCC = 4V, ADC clock = 200kHz Gain error Single ended conversion VREF = 4V, VCC = 4V, ADC clock = 200kHz -5.0 -3.0 5.0 LSB Offset error Single ended conversion VREF = 4V, VCC = 4V, ADC clock = 200kHz -3.5 1.5 3.5 LSB Conversion time Free running conversion 65 260 s Clock frequency 50 200 kHz External voltage reference Vref 2.56 AVCC V Input voltage VIN GND VREF V Internal voltage reference VINT 1.0 1.2 V Analog input resistance RAIN 1.1 100 M ATA8741 [DATASHEET] 9140E-INDCO-09/14 179 Table 29-6. ADC Characteristics, Differential Channels, TA = -40C to 125C Parameter Resolution Absolute accuracy Condition Symbol Min Differential non-linearity (DNL) Max Unit Gain = 1x 8 Bits Gain = 20x 8 Bits Gain = 1x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz 2.5 5.0 LSB 3.0 6.0 LSB 0.5 2.5 LSB 0.5 3.0 LSB Unipolar - Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz 1.5 5.0 LSB Gain = 1x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz 0.4 1.0 LSB 0.4 1.0 LSB 0.7 2.0 LSB -5.0 2.3 5.0 LSB -5.0 -2.8 5.0 LSB -7.0 2.2 7.0 LSB -7.0 -1.8 7.0 LSB Gain = 1x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz -5.0 2.0 5.0 LSB Bipolar - Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz -5.0 2.0 5.0 LSB Unipolar - Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz -6.5 2.0 6.5 LSB Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz TUE Gain = 1x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz Integral non-linearity (INL) Typ Bipolar - Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz Bipolar - Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz INL DNL Unipolar - Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz Bipolar -Gain = 1x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz Unipolar -Gain = 1x Gain error VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz Bipolar -Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz Unipolar -Gain = 20x VREF = 4V, VCC = 5V ADC clock = 50 - 200kHz Offset error 180 ATA8741 [DATASHEET] 9140E-INDCO-09/14 Table 29-6. ADC Characteristics, Differential Channels, TA = -40C to 125C (Continued) Parameter Condition Symbol Min Typ Max Unit Clock frequency 50 200 kHz Conversion time 65 260 s VREF 2.56 AVCC - 0.5 V VIN GND AVCC V VDIFF -VREF/gain VREF/gain V Reference voltage Input voltage Input differential voltage 29.7 Serial Programming Characteristics Figure 29-3. Serial Programming Timing MOSI tOVSH SCK tSHOX tSLSH tSHSL MISO tSLIV Figure 29-4. Serial Programming Waveforms Serial Data Input (MOSI) MSB LSB Serial Data Output (MISO) MSB LSB Serial Clock Input (SCK) Sample Table 29-7. Serial Programming Characteristics, TA = -40C to 125C, VCC = 2.7 to 5.5V (Unless Otherwise Noted) Parameter Symbol Min Oscillator frequency (ATtiny24/44/84V) 1/tCLCL 0 tCLCL 250 1/tCLCL 0 Oscillator period (ATtiny24/44/84V) Oscillator frequency (ATtiny24/44/84, VCC = 4.5V - 5.5V) Typ Max Unit 4 MHz ns 20 MHz Oscillator period (ATtiny24/44/84, VCC = 4.5V - 5.5V) tCLCL 50 ns SCK pulse width high tSHSL 2 tCLCL* ns SCK pulse width low tSLSH 2 tCLCL* ns MOSI setup to SCK high tOVSH tCLCL ns MOSI hold after SCK high tSHOX 2 tCLCL SCK low to MISO valid Note: 1. 2 tCLCL for fck < 12MHz, 3 tCLCL for fck 12MHz tSLIV TBD ns TBD TBD ATA8741 [DATASHEET] 9140E-INDCO-09/14 ns 181 29.8 High-voltage Serial Programming Characteristics Figure 29-5. High-voltage Serial Programming Timing VCC RESET 1 CK Cycle WDT Time-out RESET Time-out tTOUT Internal Reset Table 29-8. High-voltage Serial Programming Characteristics TA = 25C 10%, VCC = 5.0V 10% (Unless otherwise noted) Parameter Symbol Min SCI (PB0) pulse width high tSHSL 110 ns SCI (PB0) pulse width low tSLSH 110 ns SDI (PA6), SII (PB1) valid to SCI (PB0) high tIVSH 50 ns SDI (PA6), SII (PB1) hold after SCI (PB0) high tSHIX 50 ns SCI (PB0) high to SDO (PA4) valid tSHOV 16 ns Wait after Instr. 3 for write fuse bits tWLWH_PFB 2.5 ms 182 ATA8741 [DATASHEET] 9140E-INDCO-09/14 Typ Max Unit 30. 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 x VCC x 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. Active Supply Current Figure 30-1. Active Supply Current versus Low Frequency (0.1 to 1.0MHz) - Temp. = 25C 1.2 5.5V 1 5.0V 4.5V 0.8 ICC (mA) 30.1 3.3V 3.0V 2.7V 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) ATA8741 [DATASHEET] 9140E-INDCO-09/14 183 Figure 30-2. Active Supply Current versus Low Frequency (0.1 to 1.0MHz) - Temp. = 125C 1.2 5.5V 1 5.0V ICC (mA) 0.8 4.5V 0.6 3.3V 3.0V 2.7V 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) Figure 30-3. Active Supply Current versus frequency (1 to 20MHz) - Temp. = 25C 25 ICC (mA) 20 15 5.5V 5.0V 4.5V 10 3.3V 3.0V 2.7V 5 0 0 2 4 6 8 10 12 14 16 18 20 Frequency (MHz) Figure 30-4. Active Supply Current versus frequency (1 to20MHz) - Temp. = 125C 25 ICC (mA) 20 15 5.5V 5.0V 4.5V 10 3.3V 3.0V 2.7V 5 0 0 2 4 6 8 10 12 Frequency (MHz) 184 ATA8741 [DATASHEET] 9140E-INDCO-09/14 14 16 18 20 Figure 30-5. Active Supply Current versus VCC (Internal RC Oscillator, 8MHz) 7 125C 85C 25C -45C 6 ICC (mA) 5 4 3 2 1 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-6. Active Supply Current versus VCC (Internal RC Oscillator, 1MHz) 1.4 125C 85C 25C -40C 1.2 ICC (mA) 1 0.8 0.6 0.4 0.2 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-7. Active Supply Current versus VCC (Internal RC Oscillator, 128kHz) 0.2 ICC (mA) 0.16 -40C 25C 85C 125C 0.12 0.08 0.04 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) ATA8741 [DATASHEET] 9140E-INDCO-09/14 185 30.2 Idle Supply Current Figure 30-8. Idle Supply Current versus Low Frequency (0.1 to 1.0MHz) 0.012 5.5V 0.01 ICC (mA) 5.0V 0.008 4.5V 0.006 3.3V 3.0V 2.7V 0.004 0.002 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Frequency (MHz) Figure 30-9. Idle Supply Current versus Frequency (1 to 20MHz) 4 ICC (mA) 3.5 5.5V 3 5.0V 2.5 4.5V 2 3.3V 3.0V 2.7V 1.5 1 0.5 0 0 2 4 6 8 10 12 Frequency (MHz) 186 ATA8741 [DATASHEET] 9140E-INDCO-09/14 14 16 18 20 Figure 30-10. Idle Supply Current versus VCC (Internal RC Oscillator, 8MHz) 2 1.8 125C 85C 25C -40C 1.6 ICC (mA) 1.4 1.2 1 0.8 0.6 0.4 0.2 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-11. Idle Supply Current versus VCC (Internal RC Oscillator, 1MHz) 0.35 125C 85C 25C -40C 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 VCC (V) Figure 30-12. Idle Supply Current versus VCC (Internal RC Oscillator, 8MHz) 0.035 0.03 125C 85C 25C -40C ICC (mA) 0.025 0.02 0.015 0.01 0.005 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) ATA8741 [DATASHEET] 9140E-INDCO-09/14 187 30.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 15.6 "Power Reduction Register" on page 46 for details. Table 30-1. Additional Current Consumption for the Different I/O Modules (Absolute Values) PRR bit 30.4 Typical numbers VCC = 2V, F = 1MHz VCC = 3V, F = 4MHz VCC = 5V, F = 8MHz PRTIM1 6.6A 26A 106A PRTIM0 8.7A 35A 140A PRUSI 5.5A 22A 87A PRADC 22A 87A 340A Power-down Supply Current Figure 30-13. Power-down Supply Current versus VCC (Watchdog Timer Disabled) 5 4.5 4 ICC (A) 3.5 125C 3 2.5 2 1.5 85C 1 0.5 25C -45C 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-14. Power-down Supply Current versus VCC (Watchdog Timer Enabled) 10 9 8 ICC (A) 7 6 5 4 125C -45C 85C 25C 3 2 1 0 2.5 3 3.5 4 VCC (V) 188 ATA8741 [DATASHEET] 9140E-INDCO-09/14 4.5 5 5.5 Pin Pull-up Figure 30-15. I/O Pin Pull-up Resistor Current versus input Voltage (VCC = 2.7V) 90 80 70 IOP (A) 60 50 40 30 20 -45C 25C 85C 125C 10 0 0 0.5 1 1.5 2 2.5 3 VOP (V) Figure 30-16. I/O pin Pull-up Resistor Current versus Input Voltage (VCC = 5V) 160 140 120 100 IOP (A) 30.5 80 60 40 -45C 25C 85C 125C 20 0 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 VOP (V) ATA8741 [DATASHEET] 9140E-INDCO-09/14 189 Figure 30-17. Reset Pull-up Resistor Current versus Reset Pin Voltage (VCC = 2.7V) 60 -40C 50 125C IRESET (A) 40 30 20 10 0 0 0.5 1 1.5 2 2.5 3 VRESET (V) Figure 30-18. Reset Pull-up Resistor Current versus Reset Pin Voltage (VCC = 5V) 120 -40C 100 125C IRESET (A) 80 60 40 20 0 0 0.5 1 1.5 2 2.5 VRESET (V) 190 ATA8741 [DATASHEET] 9140E-INDCO-09/14 3 3.5 4 4.5 5 Pin Driver Strength Figure 30-19. I/O Pin Output Voltage versus Sink Current (VCC = 3V) 0.06 125C VOL (V) 0.05 0.04 85C 0.03 25C -40C 0.02 0.01 0 0 2 4 6 8 10 12 14 16 18 20 IOL (mA) Figure 30-20. I/O Pin Output Voltage versus Sink Current (VCC = 5V) 0.7 125C 0.6 85C 0.5 25C VOL (V) 30.6 0.4 -45C 0.3 0.2 0.1 0 0 2 4 6 8 10 12 14 16 18 20 IOL (mA) ATA8741 [DATASHEET] 9140E-INDCO-09/14 191 Figure 30-21. I/O Pin Output Voltage versus Source Current (VCC = 3V) 3.5 VOH (V) 3 2.5 -45C 25C 85C 125C 2 1.5 0 2 4 6 8 10 12 14 16 18 20 IOH (mA) Figure 30-22. I/O Pin output Voltage versus Source Current (VCC = 5V) 5.1 5 4.9 VOH (V) 4.8 4.7 4.6 -45C 4.5 25C 85C 4.4 125C 4.3 0 2 4 6 8 10 IOH (mA) 192 ATA8741 [DATASHEET] 9140E-INDCO-09/14 12 14 16 18 20 Pin Threshold and Hysteresis Figure 30-23. I/O Pin Input Threshold Voltage versus VCC (VIH, IO Pin Read as `1') 3.5 125C 85C 25C -40C 3 Threshold (V) 2.5 2 1.5 1 0.5 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-24. I/O Pin Input threshold Voltage versus VCC (VIL, IO Pin Read as `0') 2.5 125C 85C 25C -40C 2 Threshold (V) 30.7 1.5 1 0.5 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) ATA8741 [DATASHEET] 9140E-INDCO-09/14 193 Figure 30-25. I/O Pin Input Hysteresis versus VCC 0.5 125C 85C -20C -40C 0.45 Input Hysteresis (mV) 0.4 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 VCC (V) Figure 30-26. Reset Input Threshold Voltage versus VCC (VIH, IO Pin Threshold as `1') 3 125C 85C 25C -40C Threshold (V) 2.5 2 1.5 1 0.5 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-27. Reset Input Threshold Voltage versus VCC (VIL, IO Pin Read as `0') 3 Threshold (V) 2.5 125C 85C 25C -45C 2 1.5 1 0.5 0 2.5 3 3.5 4 VCC (V) 194 ATA8741 [DATASHEET] 9140E-INDCO-09/14 4.5 5 5.5 Figure 30-28. Reset Pin Input Hysteresis versus VCC 1 0.9 Input Hysteresis (mV) 0.8 0.7 0.6 -40C 0.5 0.4 25C 0.3 0.2 85C 0.1 125C 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) BOD Threshold and Analog Comparator Offset Figure 30-29. BOD Threshold versus Temperature (BODLEVEL is 4.3V) 4.4 1 4.35 Threshold (V) 30.8 4.3 0 4.25 4.2 4.15 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 Temperature (C) ATA8741 [DATASHEET] 9140E-INDCO-09/14 195 Figure 30-30. BOD Threshold versus Temperature (BODLEVEL is 2.7V) 2.78 1 2.76 Threshold (V) 2.74 2.72 2.70 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 30-31. BOD Threshold versus Temperature (BODLEVEL is 1.8V) 1.85 1.84 1 Threshold (V) 1.83 1.82 1.81 0 1.80 1.79 1.78 -40 -30 -20 -10 0 10 20 30 40 50 Temperature (C) 196 ATA8741 [DATASHEET] 9140E-INDCO-09/14 60 70 80 90 100 110 120 Internal Oscillator Speed Figure 30-32. Watchdog Oscillator Frequency versus VCC 124 122 -40C 120 FRC (kHz) 118 25C 116 114 112 85C 110 108 125C 106 104 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-33. Calibrated 8MHz RC Oscillator Frequency versus VCC 9 8.5 -40C 25C 85C 125C 8 FRC (MHz) 30.9 7.5 7 6.5 6 2.5 3 3.5 4 4.5 5 5.5 VCC (V) ATA8741 [DATASHEET] 9140E-INDCO-09/14 197 Figure 30-34. Calibrated 8MHz RC oscillator Frequency versus Temperature 8.4 8.3 5.0V 3.0V 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 (C) Figure 30-35. Calibrated 8MHz RC Oscillator Frequency versus OSCCAL Value 16 125C 85C 25C -40C 14 FRC (MHz) 12 10 8 6 4 2 0 0 16 32 48 64 80 96 112 128 144 OSCCAL (X1) 198 ATA8741 [DATASHEET] 9140E-INDCO-09/14 160 176 192 208 224 240 256 30.10 Current Consumption of Peripheral Units Figure 30-36. ADC Current versus VCC 700 125C 85C 25C -40C 600 ICC (A) 500 400 300 200 100 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-37. AREF External Reference Current versus VCC 14 25C AREF Pin Current (A) 12 10 8 6 4 2 0 1.5 2 2.5 3 3.5 4 4.5 5 5.5 AREF (V) ATA8741 [DATASHEET] 9140E-INDCO-09/14 199 Figure 30-38. Analog Comparator Current versus VCC 100 -40C 25C 85C 125C 90 80 ICC (A) 70 60 50 40 30 20 10 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) Figure 30-39. Programming Current versus VCC 12000 25C 10000 ICC (A) 8000 6000 4000 2000 0 2.5 3.5 4.5 5.5 VCC (V) Figure 30-40. Brownout Detector Current versus VCC 16 14 12 125C ICC (A) 10 8 6 25C 4 85C 2 -40C 0 1.5 1.6 1.7 1.8 1.9 2 VCC (V) 200 ATA8741 [DATASHEET] 9140E-INDCO-09/14 2.1 2.2 2.3 2.4 2.5 Figure 30-41. Watchdog Timer Current versus VCC 30 -40C 25C 85C 125C 25 ICC (A) 20 15 10 5 0 2.5 3 3.5 4 4.5 5 5.5 VCC (V) 30.11 Current Consumption in Reset and Reset Pulse Width Figure 30-42. Reset Supply Current versus VCC (0.1 to 1.0MHz, excluding Current Through the Reset Pull-up) 0.2 5.5V 0.18 5.0V 0.16 4.5V ICC (mA) 0.14 0.12 3.3V 3.0V 2.7V 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) ATA8741 [DATASHEET] 9140E-INDCO-09/14 201 Figure 30-43. Reset Supply Current versus VCC (1 to 20MHz, Excluding Current Through the Reset Pull-up) 3 2.5 5.5V 5.0V ICC (mA) 2 4.5V 1.5 3.6V 3.3V 3.0V 2.7V 1 0.5 0 0 2 4 6 8 10 12 14 16 18 20 Frequency (MHz) Figure 30-44. Minimum Reset Pulse Width versus VCC 1200 Pulse width (ns) 1000 800 600 125C 85C 25C -40C 400 200 0 2.5 3 3.5 4 VCC (V) 202 ATA8741 [DATASHEET] 9140E-INDCO-09/14 4.5 5 5.5 31. 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 22 0x3E (0x5E) SPH - - - - - - SP9 SP8 25 0x3D (0x5D) SPL SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0 25 0x3C (0x5C) OCR0B 0x3B (0x5B) GIMSK - INT0 PCIE1 PCIE0 - - - 62 Timer/Counter0 - Output Compare Register B 92 - 0x3A (0x5A GIFR - INTF0 PCIF1 PCIF0 - - - - 63 0x39 (0x59) TIMSK0 - - - - - OCIE0B OCIE0A TOIE0 92 0x38 (0x58) TIFR0 - - - - - OCF0B OCF0A TOV0 93 0x37 (0x57) SPMCSR - - - CTPB RFLB PGWRT PGERS SPMEN 160 - PUD SE SM1 0x36 (0x56) OCR0A 0x35 (0x55) MCUCR Timer/Counter0 - Output Compare Register A 92 SM0 - ISC01 ISC00 62 0x34 (0x54) MCUSR - - - - WDRF BORF EXTRF PORF 55 0x33 (0x53) TCCR0B FOC0A FOC0B - - WGM02 CS02 CS01 CS00 91 0x32 (0x52) TCNT0 0x31 (0x51) OSCCAL CAL7 CAL6 CAL5 CAL4 Timer/Counter0 CAL3 CAL2 CAL1 CAL0 92 43 0x30 (0x50) TCCR0A COM0A1 COM0A0 COM0B1 COM0B0 - - WGM01 WGM00 88 0x2F (0x4F) TCCR1A COM1A1 COM1A0 COM1B1 COM1B0 - - WGM11 WGM10 114 ICNC1 ICES1 - WGM13 WGM12 CS12 CS11 CS10 116 0x2E (0x4E) TCCR1B 0x2D (0x4D) TCNT1H Timer/Counter1 - Counter Register High Byte 117 0x2C (0x4C) TCNT1L Timer/Counter1 - Counter Register Low Byte 117 0x2B (0x4B) OCR1AH Timer/Counter1 - Compare Register A High Byte 117 0x2A (0x4A) OCR1AL Timer/Counter1 - Compare Register A Low Byte 117 0x29 (0x49) OCR1BH Timer/Counter1 - Compare Register B High Byte 118 0x28 (0x48) OCR1BL Timer/Counter1 - Compare Register B Low Byte 118 0x27 (0x47) DWDR DWDR[7:0] 156 0x26 (0x46) CLKPR 0x25 (0x45) ICR1H CLKPCE - - - CLKPS3 CLKPS2 CLKPS1 CLKPS0 Timer/Counter1 - Input Capture Register High Byte 0x24 (0x44) ICR1L 0x23 (0x43) GTCCR TSM - Timer/Counter1 - Input Capture Register Low Byte - - - - 43 118 118 - PSR10 121 0x22 (0x42) TCCR1C FOC1A FOC1B - - - - - - 117 0x21 (0x41) WDTCSR WDIF WDIE WDP3 WDCE WDE WDP2 WDP1 WDP0 56 0x20 (0x40) PCMSK1 - - - - PCINT11 PCINT10 PCINT9 PCINT8 63 0x1F (0x3F) EEARH - - - - - - - EEAR8 34 EEAR7 EEAR6 EEAR5 EEAR4 EEAR3 EEAR2 EEAR1 EEAR0 34 0x1E (0x3E) EEARL 0x1D (0x3D) EEDR 0x1C (0x3C) EECR - - EEPM1 EEPM0 EERIE EEMPE EEPE EERE 35 0x1B (0x3B) PORTA PORTA7 PORTA6 PORTA5 PORTA4 PORTA3 PORTA2 PORTA1 PORTA0 76 0x1A (0x3A) DDRA DDA7 DDA6 DDA5 DDA4 DDA3 DDA2 DDA1 DDA0 77 0x19 (0x39) PINA PINA7 PINA6 PINA5 PINA4 PINA3 PINA2 PINA1 PINA0 77 0x18 (0x38) PORTB - - - - PORTB3 PORTB2 PORTB1 PORTB0 77 0x17 (0x37) DDRB - - - - DDB3 DDB2 DDB1 DDB0 77 PINB - - - - PINB3 PINB2 PINB1 PINB0 77 0x16 (0x36) Note: EEPROM Data Register 35 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), 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 203 31. Register Summary (Continued) Address Name 0x15 (0x35) GPIOR2 Bit 7 General Purpose I/O Register 2 36 0x14 (0x34) GPIOR1 General Purpose I/O Register 1 36 0x13 (0x33) GPIOR0 General Purpose I/O Register 0 36 PCINT7 Bit 6 PCINT6 Bit 5 Bit 4 PCINT5 Bit 3 PCINT4 PCINT3 Bit 2 PCINT2 Bit 1 PCINT1 Bit 0 PCINT0 Page 0x12 (0x32) PCMSK0 0x11 (0x31)) Reserved - 0x10 (0x30) USIBR USI Buffer Register 128 0x0F (0x2F) USIDR USI Data Register 128 USICNT3 USICNT2 USICNT1 USICNT0 63 0x0E (0x2E) USISR USISIF USIOIF USIPF USIDC 0x0D (0x2D) USICR USISIE USIOIE USIWM1 USIWM0 USICS1 USICS0 USICLK USITC 129 130 0x0C (0x2C) TIMSK1 - - ICIE1 - - OCIE1B OCIE1A TOIE1 118 0x0B (0x2B) TIFR1 - - ICF1 - - OCF1B OCF1A TOV1 119 - 0x0A (0x2A) Reserved 0x09 (0x29) Reserved 0x08 (0x28) ACSR ACD ACBG ACO ACI ACIE ACIC ACIS1 ACIS0 134 0x07 (0x27) ADMUX REFS1 REFS0 MUX5 MUX4 MUX3 MUX2 MUX1 MUX0 149 0x06 (0x26) ADCSRA ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0 152 0x05 (0x25) ADCH ADC Data Register High Byte 0x04 (0x24) ADCL ADC Data Register Low Byte 0x03 (0x23) ADCSRB - BIN ACME - ADLAR - 153 153 ADTS2 ADTS1 ADTS0 153 - 0x02 (0x22) Reserved 0x01 (0x21) DIDR0 ADC7D ADC6D ADC5D ADC4D ADC3D ADC2D ADC1D ADC0D 135,154 0x00 (0x20) PRR - - - - PRTIM1 PRTIM0 PRUSI PRADC 46 Note: 204 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), 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 32. Instruction Set Summary Mnemonics Operands Description Operation Flags #Clocks Rd Rd + Rr Z,C,N,V,H 1 Arithmetic and Logic Instructions ADD Rd, Rr Add two registers 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 x Rr Z,N,V 1 ANDI Rd, K Logical AND register and constant Rd Rd x 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 x (0xFF - K) Z,N,V 1 INC Rd Increment Rd Rd + 1 Z,N,V 1 DEC Rd Decrement Rd Rd - 1 Z,N,V 1 TST Rd Test for zero or minus Rd Rd x Rd Z,N,V 1 CLR Rd Clear register Rd Rd Rd Z,N,V 1 SER Rd Set register Rd 0xFF None 1 Branch Instructions RJMP k IJMP 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 4 RCALL k CPSE Rd,Rr Compare, skip if equal if (Rd = Rr) PC PC + 2 or 3 None 1/2/3 CP Rd,Rr Compare Rd - Rr Z, N,V,C,H 1 CPC Rd,Rr Compare with carry Rd - Rr - C Z, N,V,C,H 1 CPI Rd,K Compare register with immediate Rd - K Z, N,V,C,H 1 SBRC Rr, b Skip if bit in register cleared if (Rr(b)=0) PC PC + 2 or 3 None 1/2/3 SBRS Rr, b Skip if bit in register is set if (Rr(b)=1) PC PC + 2 or 3 None 1/2/3 SBIC P, b Skip if bit in I/O register cleared if (P(b)=0) PC PC + 2 or 3 None 1/2/3 SBIS P, b Skip if bit in I/O register is set if (P(b)=1) PC PC + 2 or 3 None 1/2/3 BRBS s, k Branch if status flag set if (SREG(s) = 1) then PCPC+k + 1 None 1/2 BRBC s, k Branch if status flag cleared if (SREG(s) = 0) then PCPC+k + 1 None 1/2 BREQ k Branch if equal if (Z = 1) then PC PC + k + 1 None 1/2 BRNE k Branch if not equal if (Z = 0) then PC PC + k + 1 None 1/2 BRCS k Branch if carry set if (C = 1) then PC PC + k + 1 None 1/2 BRCC k Branch if carry cleared if (C = 0) then PC PC + k + 1 None 1/2 ATA8741 [DATASHEET] 9140E-INDCO-09/14 205 32. Instruction Set Summary (Continued) Mnemonics Operands Description Operation Flags #Clocks 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 None 1 SWAP Rd Swap nibbles Rd(3..0)Rd(7..4),Rd(7..4) Rd(3..0) 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 Set carry C1 C 1 SEC 206 CLC Clear carry C0 C 1 SEN Set negative flag N1 N 1 CLN Clear negative flag N0 N 1 SEZ Set zero flag Z1 Z 1 CLZ Clear zero flag Z0 Z 1 SEI Global interrupt enable I1 I 1 CLI Global interrupt disable I0 I 1 SES Set signed test flag S1 S 1 CLS Clear signed test flag S0 S 1 SEV Set twos complement overflow. V1 V 1 CLV Clear twos complement overflow V0 V 1 SET Set T in SREG T1 T 1 CLT Clear T in SREG T0 T 1 SEH Set half carry flag in SREG H1 H 1 CLH Clear half carry flag in SREG H0 H 1 ATA8741 [DATASHEET] 9140E-INDCO-09/14 32. Instruction Set Summary (Continued) Mnemonics Operands Description Operation Flags #Clocks Data Transfer Instructions MOV Rd, Rr Move between registers Rd Rr None 1 MOVW Rd, Rr Copy register word Rd+1:Rd Rr+1:Rr None 1 LDI Rd, K Load immediate Rd K None 1 LD Rd, X Load indirect Rd (X) None 2 LD Rd, X+ Load indirect and post-inc. Rd (X), X X + 1 None 2 LD Rd, - X Load indirect and pre-dec. X X - 1, Rd (X) None 2 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 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 In port Rd P None 1 SPM IN Rd, P 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 MCU Control Instructions NOP No operation None 1 None 1 SLEEP Sleep (see specific descr. for sleep function) WDR Watchdog reset (see specific descr. for WDR/timer) None 1 BREAK Break For on-chip debug only None N/A ATA8741 [DATASHEET] 9140E-INDCO-09/14 207 Appendix 2: Appendix B - ATA8741/ATA8742/ATA8743 Automotive Specification at 1.8V 208 ATA8741 [DATASHEET] 9140E-INDCO-09/14 33. Description This document contains information specific to devices operating at voltage between 1.8V and 3.6V. Only deviations with standard operating characteristics are covered in this appendix, all other information can be found in the complete Automotive datasheet. The complete Atmel(R) ATtiny24/ATtiny44/ATtiny84 automotive datasheet can be found on http://www.atmel.com. ATA8741 [DATASHEET] 9140E-INDCO-09/14 209 34. Electrical Characteristics 34.1 Absolute Maximum Ratings 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 Operating temperature Storage temperature Value Unit -40 to +85 C -65 to +175 C -0.5 to VCC + 0.5 V Maximum operating voltage 6.0 V DC current per I/O pin 30.0 mA DC current VCC and GND pins 200.0 mA Voltage on any pin except RESET with respect to ground 34.2 DC Characteristics TA = -40C to +85C, VCC = 1.8V to 3.6V (unless otherwise noted) Parameters Condition Symbol Min. Input low voltage, except XTAL1 and RESET pin VCC = 1.8V to 3.6V VIL Input high voltage, except XTAL1 and RESET pins VCC = 1.8V to 3.6V Input low voltage, XTAL1 pin VCC = 1.8V to 3.6V Typ. Max. Unit -0.5 +0.2VCC(1) V VIH 0.7VCC(2) VCC + 0.5 V VIL1 -0.5 +0.2VCC(1) V Input high voltage, XTAL1 pin VCC = 1.8V to 3.6V VIH1 0.9VCC(2) VCC + 0.5 V Input low voltage, RESET pin VCC = 1.8V to 3.6V VIL2 -0.5 +0.2VCC(1) V VCC = 1.8V to 3.6V VIH2 0.9VCC(2) VCC + 0.5 V Output low voltage , I/O pin except RESET IOL = 2mA, VCC = 1.8V VOL 0.2 V Output high voltage(4), I/O pin except RESET IOH = -2mA, VCC = 1.8V VOH Input high voltage, RESET pin (3) Power supply current 1.2 Active 4MHz, VCC = 3V Idle 4MHz, VCC = 3V Power-down mode WDT disabled, VCC = 3V WDT enabled, VCC = 3V Analog comparator input offset voltage VCC = 2.7V Vin = VCC/2 ICC VACIO Analog comparator VCC = 2.7V IACLK -50 input leakage current Vin = VCC/2 Notes: 1. "Max" means the highest value where the pin is guaranteed to be read as low 210 V 0.8 2.5 mA 0.2 0.5 mA 0.2 4 24 30 A <10 40 mV +50 nA 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 (2mA at VCC = 1.8V) under steady state conditions (nontransient), the following must be observed: (1) The sum of all IOL, for all ports, should not exceed 50mA. 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 (0.5mA at VCC = 1.8V) under steady state conditions (nontransient), the following must be observed: (1) The sum of all IOL, for ports B0 to B5, should not exceed 50mA. 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. ATA8741 [DATASHEET] 9140E-INDCO-09/14 34.3 Maximum Speed versus VCC Maximum frequency is dependent on VCC. As shown in Figure 34-1, the maximum frequency versus VCC curve is linear between 1.8V < VCC < 3.6V. Figure 34-1. Maximum Frequency versus VCC 8MHz 4MHz Safe Operating Area 1.8V 34.4 2.7V 3.6V Clock Characterizations Table 34-1. Calibration Accuracy of Internal RC Oscillator User calibration 34.5 Frequency VCC Temperature Accuracy 7.3MHz to 8.1MHz 1.8V to 3.6V -40C to +85C 25% ADC Characteristics TA = -40C to +85C, VCC = 1.8V to 3.6V (unless otherwise noted) Parameters Test Conditions Resolution Single ended conversion 10 VCC = 1.8V, VRef = 1.8V, ADC clock = 200 kHz 2 4.0 LSB VCC = 1.8V, VRef = 1.8V, ADC clock = 200 kHz Noise Reduction Mode 2 4.0 LSB Integral non-linearity (INL) VCC = 1.8V, VRef = 1.8V, ADC clock = 200 kHz 0.5 1.5 LSB Differential non-linearity (DNL) VCC = 1.8V, VRef = 1.8V, ADC clock = 200 kHz 0.2 0.7 LSB Gain error VCC = 1.8V, VRef = 1.8V, ADC clock = 200 kHz -7.0 -3.0 +5.0 LSB Offset error VCC = 1.8V, VRef = 1.8V, ADC clock = 200 kHz -3.5 +1.5 +3.5 LSB AVCC V Absolute accuracy (Including INL, DNL, quantization error, gain and offset error) Reference voltage Symbol VREF Min. 1.8 Typ. Max. Unit Bits ATA8741 [DATASHEET] 9140E-INDCO-09/14 211 34.6 ADC Characteristics TA = -40C to +85C, VCC = 1.8V to 3.6V (unless otherwise noted) Parameters Test Conditions Resolution Differential conversion, gain = 1x BIPOLAR mode only Symbol Min. Typ. Max. 8 Absolute accuracy (Including INL, Gain = 1x, VCC = 1.8V, VRef = 1.3V, DNL, quantization error, gain and ADC clock = 125kHz offset error) Unit Bits 1.6 5.0 LSB Integral non-linearity (INL) Gain = 1x, VCC = 1.8V, VRef = 1.3V, ADC clock = 125kHz 0.7 2.5 LSB Differential non-linearity (DNL) Gain = 1x, VCC = 1.8V, VRef = 1.3V, ADC clock = 125kHz 0.3 1.0 LSB Gain error Gain = 1x, VCC = 1.8V, VRef = 1.3V, ADC clock = 125kHz -7.0 +1.50 +7.0 LSB Offset error Gain = 1x, VCC = 1.8V. VRef = 1.3V, ADC clock = 125kHz -4.0 0.0 +4.0 LSB AVCC - 0.5 V Reference voltage 212 ATA8741 [DATASHEET] 9140E-INDCO-09/14 VREF 1.30 Extended Type Number Package Remarks ATA8741C-PXQW-1 QFN24 5mm x 5mm Microcontroller with UHF Tx for 310MHz to 350MHz, MOQ 6000 Package Information Top View D 24 1 E PIN 1 ID technical drawings according to DIN specifications 6 A Side View A3 A1 Dimensions in mm Bottom View D2 7 12 13 6 COMMON DIMENSIONS E2 36. Ordering Information 1 Z 18 24 19 e Z 10:1 L 35. b (Unit of Measure = mm) Symbol MIN NOM MAX A 0.8 0.85 0.9 A1 A3 0.0 0.16 0.035 0.21 0.05 0.26 D 4.9 5 5.1 D2 3.5 3.6 3.7 E 4.9 5 5.1 E2 3.5 3.6 3.7 L 0.35 0.4 0.45 b e 0.2 0.25 0.65 0.3 NOTE 10/18/13 TITLE Package Drawing Contact: packagedrawings@atmel.com Package: VQFN_5x5_24L Exposed pad 3.6x3.6 GPC DRAWING NO. REV. 6.543-5132.02-4 1 ATA8741 [DATASHEET] 9140E-INDCO-09/14 213 37. 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. 9140E-INDCO-09/14 214 History * Section 35 "Ordering Information" on page 214 updated * Section 36 "Package Information" on page 214 updated 9140D-INDCO-05/14 * Put datasheet in the latest template 9140C-INDCO-02/10 * Section 35 "Ordering Information" on page 237 changed ATA8741 [DATASHEET] 9140E-INDCO-09/14 XXXXXX Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 | www.atmel.com (c) 2014 Atmel Corporation. / Rev.: Rev.: 9140E-INDCO-09/14 Atmel(R), Atmel logo and combinations thereof, Enabling Unlimited Possibilities(R), AVR(R), AVR Studio(R), and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. 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. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death ("Safety-Critical Applications") without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade. Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Atmel: ATA8741C- PXQW ATA8741C-PXQW-1