ATTINY5-TS8R Atmel, ATTINY5-TS8R Datasheet

no-image

ATTINY5-TS8R

Manufacturer Part Number
ATTINY5-TS8R
Description
IC MCU AVR 512B FLASH SOT-23-6
Manufacturer
Atmel
Series
AVR® ATtinyr
Datasheet

Specifications of ATTINY5-TS8R

Package / Case
SOT-23-6
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Operating Temperature
-40°C ~ 125°C
Speed
12MHz
Number Of I /o
4
Core Processor
AVR
Program Memory Type
FLASH
Ram Size
32 x 8
Program Memory Size
512B (512 x 8)
Data Converters
A/D 4x8b
Oscillator Type
Internal
Peripherals
POR, PWM, WDT
Core Size
8-Bit
Processor Series
ATTINY5x
Core
AVR8
3rd Party Development Tools
EWAVR, EWAVR-BL
Development Tools By Supplier
ATAVRDRAGON, ATSTK500, ATSTK600, ATAVRISP2, ATAVRONEKIT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-
Lead Free Status / Rohs Status
 Details

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATTINY5-TS8R
Manufacturer:
Atmel
Quantity:
8 105
Features
Note:
High Performance, Low Power AVR
Advanced RISC Architecture
Non-volatile Program and Data Memories
Peripheral Features
Special Microcontroller Features
I/O and Packages
Operating Voltage:
Programming Voltage:
Speed Grade
Industrial Temperature Range
Low Power Consumption
– 54 Powerful Instructions – Most Single Clock Cycle Execution
– 16 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 12 MIPS Throughput at 12 MHz
– 512/1024 Bytes of In-System Programmable Flash Program Memory
– 32 Bytes Internal SRAM
– Flash Write/Erase Cycles: 10,000
– Data Retention: 20 Years at 85
– One 16-bit Timer/Counter with Prescaler and Two PWM Channels
– Programmable Watchdog Timer with Separate On-chip Oscillator
– 4-channel, 8-bit Analog to Digital Converter
– On-chip Analog Comparator
– In-System Programmable
– External and Internal Interrupt Sources
– Low Power Idle, ADC Noise Reduction, and Power-down Modes
– Enhanced Power-on Reset Circuit
– Programmable Supply Voltage Level Monitor with Interrupt and Reset
– Internal Calibrated Oscillator
– Four Programmable I/O Lines
– 6-pin SOT and 8-pad UDFN
– 1.8 – 5.5V
– 5V
– 0 – 4 MHz @ 1.8 – 5.5V
– 0 – 8 MHz @ 2.7 – 5.5V
– 0 – 12 MHz @ 4.5 – 5.5V
– Active Mode:
– Idle Mode:
– Power-down Mode:
• 200µA at 1MHz and 1.8V
• 25µA at 1MHz and 1.8V
• < 0.1µA at 1.8V
1. The Analog to Digital Converter (ADC) is available in ATtiny5/10, only
2. At 5V, only
(2)
o
®
C / 100 Years at 25
8-Bit Microcontroller
(1)
o
C
8-bit
Microcontroller
with 512/1024
Bytes In-System
Programmable
Flash
ATtiny4/5/9/10
Preliminary
Rev. 8127D–AVR–02/10

Related parts for ATTINY5-TS8R

ATTINY5-TS8R Summary of contents

Page 1

... Active Mode: • 200µA at 1MHz and 1.8V – Idle Mode: • 25µA at 1MHz and 1.8V – Power-down Mode: • < 0.1µA at 1.8V Note: 1. The Analog to Digital Converter (ADC) is available in ATtiny5/10, only 2. At 5V, only ® 8-Bit Microcontroller 100 Years at 25 ...

Page 2

Pin Configurations Figure 1-1. (PCINT1/TPICLK/CLKI/ICP0/OC0B/ADC1/AIN1) PB1 (PCINT1/TPICLK/CLKI/ICP0/OC0B/ADC1/AIN1) PB1 1.1 Pin Description 1.1.1 VCC Supply voltage. 1.1.2 GND Ground. 1.1.3 Port B (PB3..PB0) This is a 4-bit, bi-directional I/O port with internal pull-up resistors, individually selectable for each bit. The ...

Page 3

Overview ATtiny4/5/9/10 are low-power CMOS 8-bit microcontrollers based on the compact AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATtiny4/5/9/10 achieve throughputs approaching 1 MIPS per MHz, allowing the system designer to optimize ...

Page 4

... PWM channels, internal and external interrupts, a programmable watchdog timer with internal oscillator, an internal calibrated oscillator, and four software select- able power saving modes. ATtiny5/10 are also equipped with a four-channel, 8-bit Analog to Digital Converter (ADC). Idle mode stops the CPU while allowing the SRAM, timer/counter, ADC (ATtiny5/10, only), ana- log comparator, and interrupt system to continue functioning ...

Page 5

... General Information 3.1 Resources A comprehensive set of drivers, application notes, data sheets and descriptions on development tools are available for download at http://www.atmel.com/avr. 3.2 Code Examples This documentation contains simple code examples that briefly show how to use various parts of the device. These code examples assume that the part specific header file is included before compilation ...

Page 6

CPU Core This section discusses the AVR core architecture in general. The main function of the CPU core is to ensure correct program execution. The CPU must therefore be able to access memories, perform calculations, control peripherals, and handle ...

Page 7

Six of the 16 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 ...

Page 8

General Purpose Register File The Register File is optimized for the AVR Enhanced RISC instruction set. In order to achieve the required performance and flexibility, the following input/output schemes are supported by the Register File: • One 8-bit output ...

Page 9

Figure 4-3. X-register Y-register Z-register In different addressing modes these address registers function as automatic increment and automatic decrement (see document “AVR Instruction Set” and section mary” on page 152 4.5 Stack Pointer The Stack is mainly used for storing ...

Page 10

Figure 4-4. 1st Instruction Fetch 1st Instruction Execute 2nd Instruction Fetch 2nd Instruction Execute 3rd Instruction Fetch 3rd Instruction Execute 4th Instruction Fetch Figure 4-4 vard architecture and the fast access Register File concept. This is the basic pipelining concept ...

Page 11

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 ...

Page 12

Register Description 4.8.1 CCP – Configuration Change Protection Register Bit 0x3C Read/Write Initial Value • Bits 7:0 – CCP[7:0] – Configuration Change Protection In order to change the contents of a protected I/O register the CCP register must first ...

Page 13

Bit 6 – T: Bit Copy Storage The Bit Copy instructions BLD (Bit LoaD) and BST (Bit STore) use the T-bit as source or desti- nation for the operated bit. A bit from a register in the Register File ...

Page 14

Memories This section describes the different memories in the ATtiny4/5/9/10. Devices have two main memory areas, the program memory space and the data memory space. 5.1 In-System Re-programmable Flash Program Memory The ATtiny4/5/9/10 contain 512/1024 bytes of on-chip, in-system ...

Page 15

Figure 5-1. 5.2.1 Data Memory Access Times This section describes the general access timing concepts for internal memory access. The internal data SRAM access is performed in two clk Figure 5-2. 8127D–AVR–02/10 Data Memory Map (Byte Addressing) I/O SPACE SRAM ...

Page 16

I/O Memory The I/O space definition of the ATtiny4/5/9/10 is shown in All ATtiny4/5/9/10 I/Os and peripherals are placed in the I/O space. All I/O locations may be accessed using the LD and ST instructions, enabling data transfer between ...

Page 17

Clock System Figure 6-1 clocks need not be active at a given time. In order to reduce power consumption, the clocks to modules not being used can be halted by using different sleep modes and power reduction reg- ister ...

Page 18

... The ADC is provided with a dedicated clock domain. This allows halting the CPU and I/O clocks in order to reduce noise generated by digital circuitry. This gives more accurate ADC conversion results. The ADC is available in ATtiny5/10, only. 6.2 Clock Sources All synchronous clock signals are derived from the main clock. The device has three alternative sources for the main clock, as follows: • ...

Page 19

Internal 128 kHz Oscillator The internal 128 kHz oscillator is a low power oscillator providing a clock of 128 kHz. The fre- quency depends on supply voltage, temperature and batch variations. This clock may be select as the main ...

Page 20

... Table 6-2. Notes: 6.4.3 Starting from Idle / ADC Noise Reduction / Standby Mode When waking up from Idle, ADC Noise Reduction or Standby Mode, the oscillator is already run- ning and no oscillator start-up time is introduced. The ADC is available in ATtiny5/10, only. ATtiny4/5/9/10 20 Table 6-1 Table 6-1. ...

Page 21

Register Description 6.5.1 CLKMSR – Clock Main Settings Register Bit 0x37 Read/Write Initial Value • Bit 7:2 – Res: Reserved Bits These bits are reserved and always read zero. • Bit 1:0 – CLKMS[1:0]: Clock Main Select Bits These ...

Page 22

CLKPSR – Clock Prescale Register Bit 0x36 Read/Write Initial Value • Bits 7:4 – Res: Reserved Bits These bits are reserved and will always read as zero. • Bits 3:0 – CLKPS[3:0]: Clock Prescaler Select Bits ...

Page 23

... Active Clock Domains and Wake-up Sources in Different Sleep Modes Active Clock Domains X 1. The ADC is available in ATtiny5/10, only 2. For INT0, only level interrupt. Table 7-2 for a summary. for details. ATtiny4/5/9/10 ...

Page 24

... This mode improves the noise environment for the ADC, enabling higher resolution measure- ments. If the ADC is enabled, a conversion starts automatically when this mode is entered. This mode is available in all devices, although only ATtiny5/10 are equipped with an ADC. 7.1.3 Power-down Mode When bits SM2:0 are written to 010, the SLEEP instruction makes the MCU enter Power-down mode ...

Page 25

... When the ADC is turned off and on again, the next conversion will be an extended conversion. See details on ADC operation. The ADC is available in ATtiny5/10, only. 7.3.3 Watchdog Timer If the Watchdog Timer is not needed in the application, this module should be turned off. If the Watchdog Timer is enabled, it will be enabled in all sleep modes, and hence, always consume power ...

Page 26

... Writing a logic one to this bit shuts down the Timer/Counter0 module. When the Timer/Counter0 is enabled, operation will continue like before the shutdown. ATtiny4/5/9/10 26 Sleep Mode Select SM1 SM0 This mode is available in all devices, although only ATtiny5/10 are equipped with an ADC – – – – Table 7-2. Sleep Mode Idle (1) ADC noise reduction ...

Page 27

System Control and Reset 8.1 Resetting the AVR During reset, all I/O registers are set to their initial values, and the program starts execution from the Reset Vector. The instruction placed at the Reset Vector must be a RJMP ...

Page 28

Power-on Reset A Power-on Reset (POR) pulse is generated by an on-chip detection circuit. The detection level is defined in section whenever V Reset, as well as to detect a failure in supply voltage. A Power-on Reset (POR) circuit ...

Page 29

The VLM can also be used to improve reset characteristics at falling supply. Without VLM, the Power-On Reset (POR) does not activate before supply voltage has dropped to a level where the MCU is not necessarily functional any more. With ...

Page 30

Watchdog Timer and reset time-out. Figure 8-5. CC 8.3 Watchdog Timer The Watchdog Timer is clocked from an on-chip oscillator, which runs at 128 kHz. See 6. By controlling the Watchdog Timer prescaler, ...

Page 31

To prevent unintentional disabling of the Watchdog or unintentional change of time-out period, two different safety levels are selected by the fuse WDTON as shown in See “Procedure for Changing the Watchdog Timer Configuration” on page 31 Table 8-1. WDTON ...

Page 32

Code Examples The following code example shows how to turn off the WDT. The example assumes that inter- rupts are controlled (e.g., by disabling interrupts globally) so that no interrupts will occur during execution of these functions. Assembly Code ...

Page 33

Watchdog System Reset mode. If the interrupt is not executed before the next time-out, a Sys- tem Reset will be applied. Table 8-2. WDTON Note: • Bit 4 – Res: Reserved Bit This bit is ...

Page 34

Bits 5, 2:0 – WDP3..0: Watchdog Timer Prescaler and 0 The WDP3..0 bits determine the Watchdog Timer prescaling when the Watchdog Timer is run- ning. The different prescaling values and their corresponding time-out periods are shown ...

Page 35

Bits 2:0 – VLM2:0: Trigger Level of Voltage Level Monitor These bits set the trigger level for the voltage level monitor, as described in Table 8-4. VLM2:0 000 001 010 011 100 101 110 111 For VLM voltage levels, ...

Page 36

... PCINT0 0x0003 TIM0_CAPT 0x0004 TIM0_OVF 0x0005 TIM0_COMPA 0x0006 TIM0_COMPB 0x0007 ANA_COMP 0x0008 WDT 0x0009 VLM 0x000A ADC 1. The ADC is available in ATtiny5/10, only. rjmp RESET rjmp INT0 rjmp PCINT0 rjmp TIM0_CAPT rjmp TIM0_OVF rjmp TIM0_COMPA rjmp TIM0_COMPB rjmp ANA_COMP rjmp WDT ...

Page 37

External Interrupts External Interrupts are triggered by the INT0 pin or any of the PCINT3..0 pins. Observe that, if enabled, the interrupts will trigger even if the INT0 or PCINT3..0 pins ...

Page 38

Figure 9-1. PCINT(0) PCINT(0) pin_lat pin_sync pcint_in_(0) pcint_syn pcint_setflag PCIF 9.3 Register Description 9.3.1 EICRA – External Interrupt Control Register A The External Interrupt Control Register A contains control bits for interrupt sense control. Bit 0x15 Read/Write Initial Value • ...

Page 39

Table 9-2. ISC01 9.3.2 EIMSK – External Interrupt Mask Register Bit 0x13 Read/Write Initial Value • Bits ...

Page 40

PCICR – Pin Change Interrupt Control Register Bit 0x12 Read/Write Initial Value • Bits 7:1 – Res: Reserved Bits These bits are reserved and will always read zero. • Bit 0 – PCIE0: Pin Change Interrupt Enable 0 When ...

Page 41

I/O Ports 10.1 Overview All AVR ports have true Read-Modify-Write functionality when used as general digital I/O ports. This means that the direction of one port pin can be changed without unintentionally changing the direction of any other pin ...

Page 42

Ports as General Digital I/O The ports are bi-directional I/O ports with optional internal pull-ups. tional description of one I/O-port pin, here generically called Pxn. Figure 10-2. General Digital I/O Pxn Note: 10.2.1 Configuring the Pin Each port pin ...

Page 43

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 ...

Page 44

Figure 10-3. Switching Between Input and Output in Break-Before-Make-Mode SYSTEM CLK INSTRUCTIONS 10.2.4 Reading the Pin Value Independent of the setting of Data Direction bit DDxn, the port pin can be read through the PINxn Register bit. As shown in ...

Page 45

When reading back a software assigned pin value, a nop instruction must be inserted as indi- cated in positive edge of the clock. In this case, the delay tpd through the synchronizer is one system clock period. Figure 10-5. Synchronization ...

Page 46

Program Example The following code example shows how to set port B pin 0 high, pin 1 low, and define the port pins from input with a pull-up assigned to port pin 2. The resulting ...

Page 47

Figure 10-6. Alternate Port Functions Pxn PUOExn: PUOVxn: DDOExn: DDOVxn: PVOExn: PVOVxn: DIEOExn: DIEOVxn: SLEEP: PTOExn: Note: The illustration in the figure above serves as a generic description applicable to all port pins in the AVR microcontroller family. Some overriding ...

Page 48

Table 10-2 on page 48 indexes from signals are generated internally in the modules having the alternate function. Table 10-2. Signal Name PUOE PUOV DDOE DDOV PVOE PVOV PTOE DIEOE DIEOV DI AIO The following subsections shortly describe the alternate ...

Page 49

... ADC Input Channel 2 CLKO: System Clock Output PB2 INT0: External Interrupt 0 Source PCINT2: Pin Change Interrupt 0, Source 2 T0: Timer/Counter0 Clock Source ADC3: ADC Input Channel 3 PB3 PCINT3: Pin Change Interrupt 0, Source 3 RESET: Reset Pin ATtiny4/5/9/10 Table 10-3 on page 49. (ATtiny5/10, only) (ATtiny5/10, only) 49 ...

Page 50

... RSTDISBL + (PCINT3 • PCIE0) + ADC3D RSTDISBL • PCINT3 • PCIE0 PCINT3 Input ADC3 Input 1. RSTDISBL is 1 when the configuration bit is “0” (Programmed). 2. CKOUT is 1 when the configuration bit is “0” (Programmed). (ATtiny5/10, only) (ATtiny5/10, only) PB2/ADC2/INT0/T0/CLKO/PCINT2 (2) CKOUT 0 (2) CKOUT 1 (2) ...

Page 51

Table 10-5. Signal Name PUOE PUOV DDOE DDOV PVOE PVOV PTOE DIEOE DIEOV DI AIO Notes: 10.4 Register Description 10.4.1 PORTCR – Port Control Register Bit 0x03 Read/Write Initial Value • Bits 7:2, 0 – Reserved These bits are reserved ...

Page 52

PORTB – Port B Data Register Bit 0x02 Read/Write Initial Value 10.4.4 DDRB – Port B Data Direction Register Bit 0x01 Read/Write Initial Value 10.4.5 PINB – Port B Input Pins Bit 0x00 Read/Write Initial Value ATtiny4/5/9/ ...

Page 53

Timer/Counter0 11.1 Features • True 16-bit Design, Including 16-bit PWM • Two Independent Output Compare Units • Double Buffered Output Compare Registers • One Input Capture Unit • Input Capture Noise Canceler • Clear Timer on Compare Match ...

Page 54

A simplified block diagram of the 16-bit Timer/Counter is shown in actual placement of I/O pins, refer to 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 ...

Page 55

Clock Sources The Timer/Counter can be clocked by an internal or an external clock source. The clock source is selected by the Clock Select logic which is controlled by the Clock Select (CS02:0) bits located in the Timer/Counter control ...

Page 56

N+1 sys- tem clock cycles, where N equals the prescaler divisor (8, 64, 256, or 1024 possible to use the ...

Page 57

Figure 11-4. Counter Unit Block Diagram TCNTnH (8-bit) Signal description (internal signals): Count Direction Clear clk TOP BOTTOM The 16-bit counter is mapped into two 8-bit I/O memory locations: Counter High (TCNT0H) con- taining the upper eight bits of the ...

Page 58

Input Capture Unit The Timer/Counter incorporates an Input Capture unit that can capture external events and give them a time-stamp indicating time of occurrence. The external signal indicating an event, or mul- tiple events, can be applied via the ...

Page 59

TOP value can be written to the ICR0 Register. When writing the ICR0 Register the high byte must be written to the ICR0H I/O location before the low byte is written ...

Page 60

I/O bit location). For measuring frequency only, the clearing of the ICF0 flag is not required (if an interrupt handler is used). 11.6 Output Compare Units The 16-bit comparator continuously compares ...

Page 61

The double buffering synchronizes the update of the OCR0x Com- pare Register to either TOP or BOTTOM of the counting sequence. The synchronization prevents the occurrence of odd-length, non-symmetrical PWM pulses, thereby making the out- put ...

Page 62

Compare Match Output Unit The Compare Output Mode (COM0x1:0) bits have two functions. The Waveform Generator uses the COM0x1:0 bits for defining the Output Compare (OC0x) state at the next compare match. Secondly the COM0x1:0 bits control the OC0x ...

Page 63

Compare Output Mode and Waveform Generation The Waveform Generator uses the COM0x1:0 bits differently in normal, CTC, and PWM modes. For all modes, setting the COM0x1 tells the Waveform Generator that no action on the OC0x Register ...

Page 64

The timing diagram for the CTC mode is shown in (TCNT0) increases until a compare match occurs with either OCR0A or ICR0, and then counter (TCNT0) is cleared. Figure 11-8. CTC Mode, Timing Diagram TCNTn OCnA (Toggle) Period An interrupt ...

Page 65

PWM mode can be twice as high as the phase cor- rect and phase and frequency correct PWM modes that use dual-slope operation. This high frequency makes the fast PWM mode well suited ...

Page 66

The procedure for updating ICR0 differs from updating OCR0A when used for defining the TOP value. The ICR0 Register is not double buffered. This means that if ICR0 is changed to a low value when the counter is running with ...

Page 67

However, due to the symmetric feature of the dual-slope PWM modes, these modes are preferred for motor control applications. The PWM resolution for the phase correct PWM mode can be fixed to 8-, 9-, or 10-bit, or defined by ...

Page 68

Compare Registers, a compare match will never occur between the TCNT0 and the OCR0x. Note that when using fixed TOP values, the unused bits are masked to zero when any of the OCR0x Registers are written. As the third period ...

Page 69

OCR0A set to MAX). The PWM resolution in bits can be calculated using the following equation: In phase and frequency correct PWM mode the counter is incremented until the counter value matches either ...

Page 70

Using the ICR0 Register for defining TOP works well when using fixed TOP values. By using ICR0, the OCR0A Register is free to be used for generating a PWM output on OC0A. However, if the base PWM frequency is actively ...

Page 71

Figure 11-13 on page 71 Figure 11-13. Timer/Counter Timing Diagram, Setting of OCF0x, with Prescaler (f clk I/O clk Tn (clk /8) I/O TCNTn OCRnx OCFnx Figure 11-14 on page 71 using phase and frequency correct PWM mode the OCR0x ...

Page 72

Figure 11-15. Timer/Counter Timing Diagram, with Prescaler (f clk clk (clk TCNTn (CTC and FPWM) TCNTn (PC and PFC PWM) TOVn and ICF n as TOP) OCRnx (Update at TOP) 11.10 Accessing 16-bit Registers The TCNT0, OCR0A/B, and ICR0 are ...

Page 73

Assembly Code Example Note: The code example returns the TCNT0 value in the r17:r16 register pair important to notice that accessing 16-bit registers are atomic operations interrupt occurs between the two instructions accessing the 16-bit register, ...

Page 74

Assembly Code Example TIM16_WriteTCNT0: ; Save global interrupt flag in r18,SREG ; Disable interrupts cli ; Set TCNT0 to r17:r16 out TCNT0H,r17 out TCNT0L,r16 ; Restore global interrupt flag out SREG,r18 ret Note: The code example requires that the r17:r16 ...

Page 75

When OC0A or OC0B is connected to the pin, the function of COM0x1:0 bits depends on the WGM03:0 bits Normal or CTC (non-PWM) Mode. Table 11-2. COM0A1/ COM0B1 Table 11-3 Fast PWM Modes. Table 11-3. COM0A1/ COM0B1 1 ...

Page 76

Bits 1:0 – WGM01:0: Waveform Generation Mode Combined with WGM03:2 bits of TCCR0B, these bits control the counting sequence of the coun- ter, the source for maximum (TOP) counter value, and what type of waveform to generate. See Table ...

Page 77

When a capture is triggered according to the ICES0 setting, the counter value is copied into the Input Capture Register (ICR0). The event will also set the Input Capture Flag (ICF0), and this can be used to cause an Input ...

Page 78

The OC0A/OC0B output is changed according to its COM0x1:0 bits setting. Note that the FOC0A/FOC0B bits are implemented as strobes. Therefore it is the value present in the COM0x1:0 bits that determine the effect of the forced compare. A FOC0A/FOC0B ...

Page 79

This temporary register is shared by all the other 16- bit registers. See 11.11.7 ICR0H and ICR0L – Input Capture Register 0 Bit 0x23 0x22 Read/Write Initial Value The Input Capture is updated with ...

Page 80

TIFR0 – Timer/Counter Interrupt Flag Register 0 Bit 0x2A Read/Write Initial Value • Bits 7:6, 4:3 – Reserved Bits These bits are reserved for future use. For ensuring compatibility with future devices, these bits must be written to zero ...

Page 81

This ensures that the Timer/Counter is halted and can be configured without the risk of advanc- ing during configuration. When the TSM bit is written to zero, the PSR bit is cleared by hardware, and the Timer/Counter start counting. • ...

Page 82

Analog Comparator The Analog Comparator compares the input values on the positive pin AIN0 and negative pin AIN1. When the voltage on the positive pin AIN0 is higher than the voltage on the negative pin AIN1, the Analog Comparator ...

Page 83

Bit 4 – ACI: Analog Comparator Interrupt Flag This bit is set by hardware when a comparator output event triggers the interrupt mode defined by ACIS1 and ACIS0. The analog comparator interrupt routine is executed if the ACIE bit ...

Page 84

... Sleep Mode Noise Canceler 13.2 Overview ATtiny5/10 feature an 8-bit, successive approximation ADC. The ADC is connected to a 4-chan- nel analog multiplexer which allows four single-ended voltage inputs constructed from the pins of port B. The single-ended voltage inputs refer to 0V (GND). The ADC contains a Sample-and-Hold-circuit, which ensures that the input voltage to the ADC is held at a constant level during conversion ...

Page 85

Figure 13-1. Analog to Digital Converter Block Schematic V CC ADC3 ADC2 ADC1 ADC0 13.4 Starting a Conversion Make sure the ADC is powered by clearing the ADC Power Reduction bit, PRADC, in the Power Reduction Register, PRR (see A ...

Page 86

Figure 13-2. ADC Auto Trigger Logic Using the ADC interrupt flag as a trigger source makes the ADC start a new conversion as soon as the ongoing conversion has finished. The ADC then operates in Free Running mode, con- stantly ...

Page 87

ADEN bit in ADCSRA. The prescaler keeps running for as long as the ADEN bit is set, and is continuously reset when ADEN is low. When initiating a single ended conversion by setting the ADSC ...

Page 88

Figure 13-6. ADC Timing Diagram, Auto Triggered Conversion Cycle Number ADC Clock Trigger Source ADATE ADIF ADCL In Free Running mode (see conversion completes, while ADSC remains high. Figure 13-7. ADC Timing Diagram, Free Running Conversion For a summary of ...

Page 89

Changing Channel The MUXn bits in the ADMUX Register are single buffered through a temporary register to which the CPU has random access. This ensures that the channel selection only takes place at a safe point during the conversion. ...

Page 90

Make sure that the ADC is enabled and is not busy converting. Single Conversion mode must be selected and the ADC conversion complete interrupt must be enabled. • Enter ADC Noise Reduction mode (or Idle mode). The ADC will ...

Page 91

Noise Canceling Techniques Digital circuitry inside and outside the device generates EMI which might affect the accuracy of analog measurements. When conversion accuracy is critical, the noise level can be reduced by applying the following techniques: • Keep analog ...

Page 92

Gain Error: After adjusting for offset, the Gain Error is found as the deviation of the last transition (0xFE to 0xFF) compared to the ideal transition (at 1.5 LSB below maximum). Ideal value: 0 LSB Figure 13-10. Gain Error ...

Page 93

Differential Non-linearity (DNL): The maximum deviation of the actual code width (the interval between two adjacent transitions) from the ideal code width (1 LSB). Ideal value: 0 LSB. Figure 13-12. Differential Non-linearity (DNL) • Quantization Error: Due to the ...

Page 94

Register Description – 13.12.1 ADMUX ADC Multiplexer Selection Register Bit 0x1B Read/Write Initial Value • Bits 7:2 – Res: Reserved Bits These bits are reserved and will always read zero. • Bits 1:0 – MUX1:0: Analog Channel Selection Bits ...

Page 95

Bit 4 – ADIF: ADC Interrupt Flag This bit is set when an ADC conversion completes and the data registers are updated. The ADC Conversion Complete Interrupt is requested if the ADIE bit is set. ADIF is cleared by ...

Page 96

If ADEN in ADCSRA is set, this will start a conversion. Switching to Free Running mode (ADTS[2:0]=0) will not cause a trigger event, even if the ADC Interrupt Flag is set Table 13-4. ADTS2 – 13.12.4 ADCL ADC ...

Page 97

Programming interface 14.1 Features • Physical Layer: – Synchronous Data Transfer – Bi-directional, Half-duplex Receiver And Transmitter – Fixed Frame Format With One Start Bit, 8 Data Bits, One Parity Bit And 2 Stop Bits – Parity Error Detection, ...

Page 98

The TPI is accessed via three pins, as follows: RESET: TPICLK: TPIDATA: In addition, the V device. See Figure 14-2. Using an External Programmer for In-System Programming via TPI NVM can be programmed at 5V, only. In some designs it ...

Page 99

Disabling Provided that the NVM enable bit has been cleared, the TPI is automatically disabled if the RESET pin is released to inactive high state or, alternatively RESET pin. If the NVM enable bit is not cleared ...

Page 100

Operation The TPI physical layer operates synchronously on the TPICLK provided by the external pro- grammer. The dependency between the clock edges and data sampling or data change is shown in Figure 14-6. Data changing and Data sampling. The ...

Page 101

Collision Detection Exception The TPI physical layer uses one bi-directional data line for both data reception and transmission. A possible drive contention may occur, if the external programmer and the TPI physical layer drive the TPIDATA line simultaneously. In ...

Page 102

The TPI access layer controls the character transfer direction on the TPI physical layer. It also handles the recovery from the error state after exception. The Control and Status Space (CSS) of the Tiny Programming Interface is allocated for control ...

Page 103

Instruction Set The TPI has a compact instruction set that is used to access the TPI Control and Status Space (CSS) and the data space. The instructions allow the external programmer to access the TPI, the NVM Controller and ...

Page 104

SST - Serial STore to data space using indirect addressing The SST instruction uses indirect addressing to store into data space the byte that is shifted into the physical layer shift register. The data space location is pointed by ...

Page 105

SLDCS - Serial LoaD data from Control and Status space using direct addressing The SLDCS instruction loads data byte from the TPI Control and Status Space to the TPI physi- cal layer shift register for serial read-out. The SLDCS ...

Page 106

Control and Status Space Register Descriptions The control and status registers of the Tiny Programming Interface are mapped in the Control and Status Space (CSS) of the interface. These registers are not part of the I/O register map and ...

Page 107

Bits 2:0 – GT[2:0]: Guard Time These bits specify the number of additional IDLE bits that are inserted to the idle time when changing from reception mode to transmission mode. Additional delays are not inserted when changing from transmission ...

Page 108

Memory Programming 15.1 Features • Two Embedded Non-Volatile Memories: – Non-Volatile Memory Lock bits (NVM Lock bits) – Flash Memory • Four Separate Sections Inside Flash Memory: – Code Section (Program Memory) – Signature Section – Configuration Section – ...

Page 109

Non-Volatile Memories The ATtiny4/5/9/10 have the following, embedded NVM: • Non-Volatile Memory Lock Bits • Flash memory with four separate sections 15.3.1 Non-Volatile Memory Lock Bits The ATtiny4/5/9/10 provide two Lock Bits, as shown in Table 15-1. Lock Bit ...

Page 110

Flash Memory The embedded Flash memory of ATtiny4/5/9/10 has four separate sections, as shown in 15-3 and Table 15-3. Section Code (program memory) Configuration Signature Calibration Notes: Table 15-4. Section Code (program memory) Configuration Signature Calibration Notes: 15.3.3 Configuration ...

Page 111

... ATtiny4/5/9/10 have a three-byte signature code, which can be used to identify the device. The three bytes reside in the signature section, as shown in ATtiny4/5/9/10 is given in Table 15-8. Part ATtiny4 ATtiny5 ATtiny9 ATtiny10 15.3.5 Calibration Section ATtiny4/5/9/10 have one calibration byte. The calibration byte contains the calibration data for ...

Page 112

Latching of Calibration Value To ensure correct frequency of the calibrated internal oscillator the calibration value is automati- cally written into the OSCCAL register during reset. 15.4 Accessing the NVM NVM lock bits, and all Flash memory sections are ...

Page 113

Figure 15-1. Addressing the Flash Memory 16 ADDRESS POINTER SECTIONEND 15.4.2 Reading the Flash The Flash can be read from the data memory mapped locations one byte at a time. For read operations, the least significant bit (bit 0) is ...

Page 114

Before starting the Chip erase, the NVMCMD register must be loaded with the CHIP_ERASE command. To start the erase operation a dummy byte must be written into the high byte of a word location that resides inside the Flash code ...

Page 115

Reading NVM Lock Bits The Non-Volatile Memory Lock Byte can be read from the mapped location in data memory. 15.4.5 Writing NVM Lock Bits The algorithm for writing the Lock bits is as follows. 1. Write the WORD_WRITE command ...

Page 116

Register Description 15.7.1 NVMCSR - Non-Volatile Memory Control and Status Register Bit 0x32 Read/Write Initial Value • Bit 7 - NVMBSY: Non-Volatile Memory Busy This bit indicates the NVM memory (Flash memory and Lock Bits) is busy, being programmed. ...

Page 117

Electrical Characteristics 16.1 Absolute Maximum Ratings* Operating Temperature.................................. -55°C to +125°C Storage Temperature ..................................... -65°C to +150°C Voltage on any Pin except RESET with respect to Ground ................................-0. Voltage on RESET with respect to Ground......-0.5V to +13.0V ...

Page 118

Table 16-1. DC Characteristics. T Symbol Parameter (6) Power Supply Current I CC (7) Power-down mode Notes: 1. “Min” means the lowest value where the pin is guaranteed to be read as high. 2. “Max” means the highest value where ...

Page 119

Clock Characteristics 16.4.1 Accuracy of Calibrated Internal Oscillator It is possible to manually calibrate the internal oscillator to be more accurate than default factory calibration. Note that the oscillator frequency depends on temperature and voltage. Voltage and temperature characteristics ...

Page 120

System and Reset Characteristics Table 16-4. Symbol V RST t RST t TOUT Note: 16.5.1 Power-On Reset Table 16-5. Symbol V POR V POA SR ON Note: 16.5.2 V Level Monitor CC Table 16-6. Parameter Trigger level VLM1L Trigger ...

Page 121

... Analog Propagation Delay (large step change) t Digital Propagation Delay DPD Note: All parameters are based on simulation results. None are tested in production 16.7 ADC Characteristics (ATtiny5/10, only) Table 16-8. ADC Characteristics -40°C – 85°C. V Symbol Parameter Resolution Absolute accuracy (Including INL, DNL, and ...

Page 122

Serial Programming Characteristics Figure 16-3. Serial Programming Timing TPIDATA t IVCH TPICLK Table 16-9. Symbol 1/t CLCL t CLCL t CLCH t CHCH t IVCH t CHIX t CLOV ATtiny4/5/9/10 122 Receive Mode t CHIX t t CLCH CHCL ...

Page 123

... Additional Current Consumption (percentage) in Active and Idle mode Current consumption additional to active mode with external clock (see Figure 17-1 and Figure 2.3 % (1) 6 The ADC is available in ATtiny5/10, only ATtiny4/5/9/10 = average switching frequency of SW for details. Typical numbers 4MHz 8MHz ...

Page 124

Active Supply Current Figure 17-1. Active Supply Current vs. Low Frequency (0.1 - 1.0 MHz) Figure 17-2. Active Supply Current vs. frequency ( MHz) 4.5 3.5 2.5 1.5 0.5 ATtiny4/5/9/10 124 ACTIVE SUPPLY CURRENT vs. LOW FREQUENCY ...

Page 125

Figure 17-3. Active Supply Current vs. V Figure 17-4. Active Supply Current vs. V 8127D–AVR–02/10 ACTIVE SUPPLY CURRENT vs. V 3.5 3 2.5 2 1.5 1 0.5 0 1.5 2 2.5 3 ACTIVE SUPPLY CURRENT vs. V INTERNAL OSCILLATOR, 1 ...

Page 126

Figure 17-5. Active Supply Current vs. V Figure 17-6. Active Supply Current vs. V 0.04 0.035 0.03 0.025 0.02 0.015 0.01 0.005 ATtiny4/5/9/10 126 CC ACTIVE SUPPLY CURRENT vs. V INTERNAL OSCILLATOR, 128 KHz 0.12 0.1 0.08 0.06 0.04 0.02 ...

Page 127

Idle Supply Current Figure 17-7. Idle Supply Current vs. Low Frequency (0.1 - 1.0 MHz) 0,1 0,09 0,08 0,07 0,06 0,05 0,04 0,03 0,02 0,01 Figure 17-8. Idle Supply Current vs. Frequency ( MHz) 0,8 0,6 0,4 ...

Page 128

Figure 17-9. Idle Supply Current vs. V 0,7 0,6 0,5 0,4 0,3 0,2 0,1 0 1,5 Figure 17-10. Idle Supply Current vs. V 0,7 0,6 0,5 0,4 0,3 0,2 0,1 0 1,5 ATtiny4/5/9/10 128 (Internal Oscillator, 8 MHz) CC IDLE ...

Page 129

Power-down Supply Current Figure 17-11. Power-down Supply Current vs. V Figure 17-12. Power-down Supply Current vs 8127D–AVR–02/10 POWER-DOWN SUPPLY CURRENT vs. V 0.5 0.45 0.4 0.35 0.3 0.25 ...

Page 130

Pin Pull-up Figure 17-13. I/O pin Pull-up Resistor Current vs. Input Voltage ( Figure 17-14. I/O Pin Pull-up Resistor Current vs. input Voltage ( ...

Page 131

Figure 17-15. I/O pin Pull-up Resistor Current vs. Input Voltage (V 160 140 120 100 Figure 17-16. Reset Pull-up Resistor Current vs. Reset Pin Voltage ( ...

Page 132

Figure 17-17. Reset Pull-up Resistor Current vs. Reset Pin Voltage ( Figure 17-18. Reset Pull-up Resistor Current vs. Reset Pin Voltage (V 120 100 ATtiny4/5/9/10 132 ...

Page 133

Pin Driver Strength Figure 17-19. I/O Pin Output Voltage vs. Sink Current (V Figure 17-20. I/O Pin Output Voltage vs. Sink Current (V 8127D–AVR–02/10 I/O PIN OUTPUT VOLTAGE vs. SINK CURRENT 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 ...

Page 134

Figure 17-21. I/O pin Output Voltage vs. Sink Current (V Figure 17-22. I/O Pin Output Voltage vs. Source Current (V ATtiny4/5/9/10 134 I/O PIN OUTPUT VOLTAGE vs. SINK CURRENT 1 0.8 0.6 0.4 0 ...

Page 135

Figure 17-23. I/O Pin Output Voltage vs. Source Current (V Figure 17-24. I/O Pin output Voltage vs. Source Current (V 5.2 4.8 4.6 4.4 4.2 8127D–AVR–02/10 I/O PIN OUTPUT VOLTAGE vs. SOURCE CURRENT 3.1 2.9 2.7 2.5 2.3 2.1 1.9 ...

Page 136

Figure 17-25. Reset Pin as I/O, Output Voltage vs. Sink Current Figure 17-26. Reset Pin as I/O, Output Voltage vs. Source Current ATtiny4/5/9/10 136 OUTPUT VOLTAGE vs. SINK CURRENT 1 1.8 V 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 ...

Page 137

Pin Threshold and Hysteresis Figure 17-27. I/O Pin Input Threshold Voltage vs. V 3,5 3 2,5 2 1,5 1 0,5 0 Figure 17-28. I/O Pin Input threshold Voltage vs 2,5 2 1,5 1 0,5 0 8127D–AVR–02/10 I/O ...

Page 138

Figure 17-29. I/O Pin Input Hysteresis vs 0,9 0,8 0,7 0,6 0,5 0,4 0,3 0,2 0,1 0 1,5 Figure 17-30. Reset Pin as I/O, Input Threshold Voltage vs 2,5 2 1,5 1 0,5 0 1,5 ATtiny4/5/9/10 ...

Page 139

Figure 17-31. Reset Pin as I/O, Input Threshold Voltage vs. V 2,5 2 1,5 1 0,5 0 Figure 17-32. Reset Input Hysteresis vs 0,9 0,8 0,7 0,6 0,5 0,4 0,3 0,2 0,1 0 8127D–AVR–02/10 RESET PIN AS I/O ...

Page 140

Figure 17-33. Reset Input Threshold Voltage vs. V 2,5 2 1,5 1 0,5 0 1,5 Figure 17-34. Reset Input Threshold Voltage vs. V 2,5 2 1,5 1 0,5 0 1,5 ATtiny4/5/9/10 140 RESET INPUT THRESHOLD VOLTAGE vs. V -40 °C ...

Page 141

Figure 17-35. Reset Pin, Input Hysteresis vs 0,8 0,6 0,4 0,2 0 17.8 Analog Comparator Offset Figure 17-36. Analog Comparator Offset 8127D–AVR–02/10 RESET PIN INPUT HYSTERESIS vs. V -40 °C 25 °C 85 °C 1,5 2 2,5 3 ...

Page 142

Internal Oscillator Speed Figure 17-37. Watchdog Oscillator Frequency vs. V Figure 17-38. Watchdog Oscillator Frequency vs. Temperature ATtiny4/5/9/10 142 WATCHDOG OSCILLATOR FREQUENCY vs. OPERATING VOLTAGE 110 109 108 107 106 105 104 103 102 101 100 99 1.5 2 ...

Page 143

Figure 17-39. Calibrated Oscillator Frequency vs. V Figure 17-40. Calibrated Oscillator Frequency vs. Temperature 8127D–AVR–02/10 CALIBRATED 8.0MHz OSCILLATOR FREQUENCY vs. OPERATING VOLTAGE 8.4 8.2 8 7.8 7.6 7.4 1.5 2 2.5 3 CALIBRATED 8.0MHz OSCILLATOR FREQUENCY vs. TEMPERATURE 8.3 8.2 ...

Page 144

Figure 17-41. Calibrated Oscillator Frequency vs, OSCCAL Value 17.10 VLM Thresholds Figure 17-42. VLM1L Threshold of V 1.42 1.41 1.4 1.39 1.38 1.37 1.36 1.35 1.34 ATtiny4/5/9/10 144 CALIBRATED 8.0MHz RC OSCILLATOR FREQUENCY vs. OSCCAL VALUE ...

Page 145

Figure 17-43. VLM1H Threshold of V 1.65 1.55 1.45 Figure 17-44. VLM2 Threshold of V 8127D–AVR–02/10 Level Monitor CC VLM THRESHOLD vs. TEMPERATURE 1.7 1.6 1.5 1.4 -40 -20 0 Temperature (C) Level Monitor CC VLM THRESHOLD vs. TEMPERATURE 2.48 ...

Page 146

... Current Consumption of Peripheral Units Figure 17-46. ADC Current vs. V ATtiny4/5/9/10 146 Level Monitorr2 CC VLM THRESHOLD vs. TEMPERATURE 3.9 3.8 3.7 3.6 3.5 3.4 -40 - Temperature (C) (ATtiny5/10, only) CC ADC CURRENT vs. V 700 600 500 400 300 200 100 0 1.5 2 2.5 3 VLM2:0 = 100 40 60 ...

Page 147

Figure 17-47. Analog Comparator Current vs. V 140 120 100 Figure 17-48. V 8127D–AVR–02/10 ANALOG COMPARATOR CURRENT vs 1,5 2 2,5 3 Level Monitor Current vs VLM SUPPLY CURRENT vs. V 0.35 ...

Page 148

Figure 17-49. Temperature Dependence of VLM Current vs. V 350 300 250 200 150 100 50 Figure 17-50. Watchdog Timer Current vs ATtiny4/5/9/10 148 VLM SUPPLY CURRENT vs. V ...

Page 149

Current Consumption in Reset and Reset Pulsewidth Figure 17-51. Reset Supply Current vs. V 0,5 0,4 0,3 0,2 0,1 0 Note: Figure 17-52. Minimum Reset Pulse Width vs. V 2500 2000 1500 1000 500 0 8127D–AVR–02/10 Reset Pull-up) RESET ...

Page 150

Register Summary Address Name Bit 7 0x3F SREG I 0x3E SPH 0x3D SPL 0x3C CCP 0x3B RSTFLR – 0x3A SMCR – 0x39 OSCCAL 0x38 Reserved – 0x37 CLKMSR – 0x36 CLKPSR – 0x35 PRR – 0x34 VLMCSR VLMF 0x33 ...

Page 151

... Some of the Status Flags are cleared by writing a logical one to them. Note that, unlike most other AVRs, the CBI and SBI instructions will only operation the specified bit, and can therefore be used on registers containing such Status Flags. The CBI and SBI instructions work with registers 0x00 to 0x1F only. 4. The ADC is available in ATtiny5/10, only. 8127D–AVR–02/10 ATtiny4/5/9/10 ...

Page 152

Instruction Set Summary Mnemonics Operands ARITHMETIC AND LOGIC INSTRUCTIONS ADD Rd, Rr Add without Carry ADC Rd, Rr Add with Carry SUB Rd, Rr Subtract without Carry SUBI Rd, K Subtract Immediate SBC Rd, Rr Subtract with Carry SBCI ...

Page 153

Mnemonics Operands BCLR s Flag Clear SBI A, b Set Bit in I/O Register CBI A, b Clear Bit in I/O Register BST Rr, b Bit Store from Register to T BLD Rd, b Bit load from T to Register ...

Page 154

... Line: xx – 3rd Line: xxx 5. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities. 6. For typical and Electrical characteristics for this device please consult Appendix A, ATtiny4/5/9/10 Specification at 125°C. ...

Page 155

... Plastic Small Outline Package (SOT23) 8MA4 8-pad 0.6 mm Plastic Ultra Thin Dual Flat No Lead (UDFN) 8127D–AVR–02/10 (1) Ordering Code (3) ATtiny5-TSHR (4) ATtiny5-MAHR (3) ATtiny5-TS8R Package Type ATtiny4/5/9/10 (2) Package Operational Range 6ST1 Industrial (5) (-40°C to 85°C) 8MA4 Industrial 6ST1 (-40° ...

Page 156

... Line: xx – 3rd Line: xxx 5. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities. 6. For typical and Electrical characteristics for this device please consult Appendix A, ATtiny4/5/9/10 Specification at 125°C. ...

Page 157

... Line: xx – 3rd Line: xxx 5. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities. 6. For typical and Electrical characteristics for this device please consult Appendix A, ATtiny4/5/9/10 Specification at 125°C. ...

Page 158

... Mold Flash, protrustion or gate burrs shall not exceed 0.25 mm per end. 3. Dimension b does not include dambar protrusion. Allowable dambar protrusion shall not cause the lead width to exceed the maximum b dimension by more than 0. Die is facing down after trim/form. Package Drawing Contact: packagedrawings@atmel.com ATtiny4/5/9/10 158 ...

Page 159

... E2 C0.2 4 BOTTOM VIEW Note: 1. ALL DIMENSIONS ARE IN mm. ANGLES IN DEGREES. 2. COPLANARITY APPLIES TO THE EXPOSED PAD AS WELL AS THE TERMINALS COPLANARITY SHALL NOT EXCEED 0.05 mm. 3. WARPAGE SHALL NOT EXCEED 0.05 mm. 4. REFER JEDEC MO-236/MO-252 Package Drawing Contact: packagedrawings@atmel.com 8127D–AVR–02/ TITLE 8PAD, 2x2x0 ...

Page 160

... Problem Fix / Workaround When programming Lock Bits, make sure lock mode is not set to present, or lower levels. 22.1.3 Rev. A – C Not sampled. 22.2 ATtiny5 22.2.1 Rev. E • Programming Lock Bits 1. Programming Lock Bits Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be corrupted ...

Page 161

Rev. D • ESD HBM (ESD STM 5.1) level ±1000V • Programming Lock Bits 1. ESD HBM (ESD STM 5.1) level ±1000V The device meets ESD HBM (ESD STM 5.1) level ±1000V. Problem Fix / Workaround Always use proper ...

Page 162

Rev. A – C Not sampled. 22.4 ATtiny10 22.4.1 Rev. E • Programming Lock Bits 1. Programming Lock Bits Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be ...

Page 163

... Added topside and bottomside marking notes in page 5. Added ESD errata, see 6. Added Lock bits re-programming errata, see 23.3 Rev. 8127B – 08/09 1. Updated document template 2. Expanded document to also cover devices ATtiny4, ATtiny5 and ATtiny9 3. Added section: – 4. Updated sections: – – – ...

Page 164

Added figure: – 6. Updated figure: – 7. Added table: – 8. Updated tables: – – – – 23.4 Rev. 8127A – 04/09 1. Initial revision ATtiny4/5/9/10 164 “Register Summary” on page 150 “Ordering Information” on page ...

Page 165

... CPU Core .................................................................................................. 6 5 Memories ................................................................................................ 14 6 Clock System ......................................................................................... 17 7 Power Management and Sleep Modes ................................................. 23 8127D–AVR–02/10 1.1 Pin Description ..................................................................................................2 2.1 Comparison of ATtiny4, ATtiny5, ATtiny9 and ATtiny10 ...................................4 3.1 Resources .........................................................................................................5 3.2 Code Examples .................................................................................................5 3.3 Data Retention ...................................................................................................5 3.4 Disclaimer ..........................................................................................................5 4.1 Architectural Overview .......................................................................................6 4.2 ALU – Arithmetic Logic Unit ...............................................................................7 4 ...

Page 166

System Control and Reset .................................................................... 27 9 Interrupts ................................................................................................ 36 10 I/O Ports .................................................................................................. 41 11 16-bit Timer/Counter0 ............................................................................ 53 12 Analog Comparator ............................................................................... 82 13 Analog to Digital Converter .................................................................. 84 ATtiny4/5/9/10 ii 8.1 Resetting the AVR ...........................................................................................27 ...

Page 167

... Speed ............................................................................................................118 16.4 Clock Characteristics .....................................................................................119 16.5 System and Reset Characteristics ................................................................120 16.6 Analog Comparator Characteristics ...............................................................121 16.7 ADC Characteristics (ATtiny5/10, only) .........................................................121 16.8 Serial Programming Characteristics ..............................................................122 17.1 Supply Current of I/O Modules ......................................................................123 17.2 Active Supply Current ....................................................................................124 ATtiny4/5/9/10 iii ...

Page 168

... ATtiny9 ..........................................................................................................156 20.4 ATtiny10 ........................................................................................................157 21.1 6ST1 ..............................................................................................................158 21.2 8MA4 .............................................................................................................159 22.1 ATtiny4 ..........................................................................................................160 22.2 ATtiny5 ..........................................................................................................160 22.3 ATtiny9 ..........................................................................................................161 22.4 ATtiny10 ........................................................................................................162 23.1 Rev. 8127D – 02/10 .......................................................................................163 23.2 Rev. 8127C – 10/09 .......................................................................................163 23.3 Rev. 8127B – 08/09 .......................................................................................163 23.4 Rev. 8127A – ...

Page 169

... 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 ATMEL’S TERMS AND CONDI- TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, 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 ...

Related keywords