ATtiny461 Automotive Atmel Corporation, ATtiny461 Automotive Datasheet

no-image

ATtiny461 Automotive

Manufacturer Part Number
ATtiny461 Automotive
Description
Manufacturer
Atmel Corporation

Specifications of ATtiny461 Automotive

Flash (kbytes)
4 Kbytes
Pin Count
20
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
8
Hardware Qtouch Acquisition
No
Max I/o Pins
16
Ext Interrupts
16
Usb Speed
No
Usb Interface
No
Spi
1
Twi (i2c)
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
11
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
0.25
Eeprom (bytes)
256
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 150
I/o Supply Class
2.7 to 5.5
Operating Voltage (vcc)
2.7 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
2
Output Compare Channels
6
Input Capture Channels
1
Pwm Channels
6
32khz Rtc
No
Calibrated Rc Oscillator
Yes
Features
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:
Speed Grade:
Low Power Consumption
– 123 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– 2/4/8K Byte of In-System Programmable Program Memory Flash
– 128/256/512 Bytes In-System Programmable EEPROM (ATtiny261/461/861)
– 128/256/512 Bytes Internal SRAM (ATtiny261/461/861)
– Programming Lock for Self-Programming Flash Program and EEPROM Data
– 8/16-bit Timer/Counter with Prescaler
– 8/10-bit High Speed Timer/Counter with Separate Prescaler
– Universal Serial Interface with Start Condition Detector
– 10-bit ADC
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– debugWIRE On-chip Debug System
– In-System Programmable via SPI Port
– External and Internal Interrupt Sources
– Low Power Idle, ADC Noise Reduction, and Power-down Modes
– Enhanced Power-on Reset Circuit
– Programmable Brown-out Detection Circuit
– Internal Calibrated Oscillator
– 16 Programmable I/O Lines
– 20-pin SOIC, 32-pad MLF and 20-lead TSSOP
– 2.7 - 5.5V for ATtiny261/461/861
– ATtiny261/461/861: 0 - 8MHz at 2.7 - 5.5V, 0 - 16MHz at 4.5 - 5.5V
– Operating temperature: Automotive (–40°C to +125°C)
– Active Mode ATD On: 1MHz, 2.7V, 25°C: 300µA
– Power-down Mode no Watchdog: 2.7V, 25°C: 0.12µA
(ATtiny261/461/861)
Security
Endurance: 10,000 Write/Erase Cycles
Endurance: 100,000 Write/Erase Cycles
3 High Frequency PWM Outputs with Separate Output Compare Registers
Programmable Dead Time Generator
11 Single Ended Channels
16 Differential ADC Channel Pairs
15 Differential ADC Channel Pairs with Programmable Gain (1x, 8x, 20x, 32x)
®
8-Bit Microcontroller
8-bit
Microcontroller
with 2/4/8K
Bytes In-System
Programmable
Flash
ATtiny261
ATtiny461
ATtiny861
Automotive
7753F–AVR–01/11

Related parts for ATtiny461 Automotive

ATtiny461 Automotive Summary of contents

Page 1

Features • High Performance, Low Power AVR • Advanced RISC Architecture – 123 Powerful Instructions – Most Single Clock Cycle Execution – General Purpose Working Registers – Fully Static Operation • Non-volatile Program and Data Memories – ...

Page 2

Pin Configurations Figure 1-1. Pinout ATtiny261/461/861 (MOSI/DI/SDA/OC1A/PCINT8) PB0 (MISO/DO/OC1A/PCINT9) PB1 (SCK/USCK/SCL/OC1B/PCINT10) PB2 (OC1B/PCINT11) PB3 VCC GND (ADC7/OC1D/CLKI/XTAL1/PCINT12) PB4 (ADC8/OC1D/CLKO/XTAL2/PCINT13) PB5 (ADC9/INT0/T0/PCINT14) PB6 (ADC10/RESET/PCINT15) PB7 NC 1 (OC1B/PCINT11) PB3 VCC 4 GND (ADC7/OC1D/CLKI/XTAL1/PCINT12) PB4 ...

Page 3

Disclaimer Typical values contained in this data sheet are based on simulations and characterization of other AVR microcontrollers manufactured on the same process technology. Min and Max values will be available after the device is characterized. 1.2 Automotive Quality ...

Page 4

Overview The ATtiny261/461/861 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATtiny261/461/861 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to ...

Page 5

The ATtiny261/461/861 provides the following features: 2/4/8K byte of In-System Programmable Flash, 128/256/512 bytes EEPROM, 128/256/512 bytes SRAM, 6 general purpose I/O lines, 32 general purpose working registers, one 8-bit Timer/Counter with compare modes, one 8-bit high speed Timer/Counter, Universal ...

Page 6

Port B (PB7..PB0) Port 8-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. As inputs, Port B ...

Page 7

Resources A comprehensive set of development tools, application notes and datasheets are available for download on http://www.atmel.com/avr. 7753F–AVR–01/11 ATtiny261/ATtiny461/ATtiny861 7 ...

Page 8

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

Page 9

AVR CPU Core 5.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 ...

Page 10

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 typ- ical ALU operation, two operands are output from the Register ...

Page 11

Status Register The Status Register contains information about the result of the most recently executed arithme- tic instruction. This information can be used for altering program flow in order to perform conditional operations. Note that the Status Register is ...

Page 12

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

Page 13

The X-register, Y-register, and Z-register The registers R26..R31 have some added functions to their general purpose usage. These reg- isters are 16-bit address pointers for indirect addressing of the data space. The three indirect address registers X, Y, and ...

Page 14

SPH and SPL – Stack Pointer Register Bit 0x3E (0x5E) 0x3D (0x5D) Read/Write Initial Value 5.6 Instruction Execution Timing This section describes the general access timing concepts for instruction execution. The AVR CPU is driven by the CPU clock ...

Page 15

Reset and Interrupt Handling The AVR provides several different interrupt sources. These interrupts and the separate Reset Vector each have a separate Program Vector in the Program memory space. All interrupts are assigned individual enable bits which must be ...

Page 16

Assembly Code Example in r16, SREG cli sbi EECR, EEMPE sbi EECR, EEPE out SREG, r16 C Code Example char cSREG; cSREG = SREG; /* store SREG value */ /* disable interrupts during timed sequence */ _CLI(); EECR |= (1<<EEMPE); ...

Page 17

AVR Memories This section describes the different memories in the ATtiny261/461/861. The AVR architecture has two main memory spaces, the Data memory and the Program memory space. In addition, the ATtiny261/461/861 features an EEPROM Memory for data storage. All ...

Page 18

When using register indirect addressing modes with automatic pre-decrement and post-incre- ment, the address registers X, Y, and Z are decremented or incremented. The 32 general purpose working registers, 64 I/O Registers, and the 128/256/512 bytes of inter- nal data ...

Page 19

EEPROM Read/Write Access The EEPROM Access Registers are accessible in the I/O space. The write access times for the EEPROM are given in lets the user software detect when the next byte can be written. If the user code ...

Page 20

The calibrated Oscillator is used to time the EEPROM accesses. Make sure the Oscillator fre- quency is within the requirements described in page 32. The following code examples show one assembly and one C function for erase, write, or atomic ...

Page 21

The next code examples show assembly and C functions for reading the EEPROM. The exam- ples assume that interrupts are controlled so that no interrupts will occur during execution of these functions. Assembly Code Example EEPROM_read: C Code Example unsigned ...

Page 22

I/O Memory The I/O space definition of the ATtiny261/461/861 is shown in All ATtiny261/461/861 I/Os and peripherals are placed in the I/O space. All I/O locations may be accessed by the LD/LDS/LDD and ST/STS/STD instructions, transferring data between the ...

Page 23

EEDR – EEPROM Data Register Bit 0x1D (0x3D) Read/Write Initial Value • Bits 7:0 – EEDR7:0: EEPROM Data For the EEPROM write operation the EEDR Register contains the data to be written to the EEPROM in the address given ...

Page 24

Bit 2 – EEMPE: EEPROM Master Program Enable The EEMPE bit determines whether writing EEPE to one will have effect or not. When EEMPE is set, setting EEPE within four clock cycles will program the EEPROM at the selected ...

Page 25

System Clock and Clock Options 7.1 Clock Systems and their Distribution Figure 7-1 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 ...

Page 26

Internal PLL for Fast Peripheral Clock Generation - clk The internal PLL in ATtiny261/461/861 generates a clock frequency that is 8x multiplied from a source input. By default, the PLL uses the output of the internal 8.0 MHz RC ...

Page 27

Clock Sources The device has the following clock source options, selectable by Flash Fuse bits as shown below. The clock from the selected source is input to the AVR clock generator, and routed to the appropriate modules. Table 7-1. ...

Page 28

Figure 7-3. When this clock source is selected, start-up times are determined by the SUT Fuses as shown in Table 7-3. Table 7-3. SUT1.. Note that the System Clock Prescaler can be used to implement run-time ...

Page 29

Calibrated Internal RC Oscillator By default, the Internal RC Oscillator provides an approximate 8.0 MHz clock. Though voltage and temperature dependent, this clock can be very accurately calibrated by the user. See 23-1 on page 189 shipped with the ...

Page 30

Internal Oscillator The 128 kHz internal Oscillator is a low power Oscillator providing a clock of 128 kHz. The fre- quency is nominal at 3V and 25°C. This clock may be select as the system clock by ...

Page 31

Figure 7-4. The Oscillator can operate in three different modes, each optimized for a specific frequency range. The operating mode is selected by the fuses CKSEL3..1 as shown in Table 7-10. CKSEL3..1 100 101 110 111 Notes: The CKSEL0 Fuse ...

Page 32

Clock Output Buffer The device can output the system clock on the CLKO pin. To enable the output, the CKOUT Fuse has to be programmed. This mode is suitable when the chip clock is used to drive other cir- ...

Page 33

The CAL7 bit determines the range of operation for the oscillator. Setting this bit to 0 gives the lowest frequency range, setting this bit to 1 gives the highest frequency range. The two fre- quency ranges are overlapping, in other ...

Page 34

Table 7-12. CLKPS3 ATtiny261/ATtiny461/ATtiny861 34 Clock Prescaler Select CLKPS2 CLKPS1 ...

Page 35

Power Management and Sleep Modes The high performance and industry leading code efficiency makes the AVR microcontrollers an ideal choice for low power applications. Sleep modes enable the application to shut down unused modules in the MCU, thereby saving ...

Page 36

ADC Noise Reduction Mode When the SM1..0 bits are written to 01, the SLEEP instruction makes the MCU enter ADC Noise Reduction mode, stopping the CPU but allowing the ADC, the external interrupts, and the Watchdog to continue operating ...

Page 37

Analog to Digital Converter If enabled, the ADC will be enabled in all sleep modes. To save power, the ADC should be dis- abled before entering any sleep mode. When the ADC is turned off and on again, the ...

Page 38

For analog input pins, the digital input buffer should be disabled at all times. An analog signal level close to V input buffers can be disabled by writing to the Digital Input Disable Registers (DIDR0, DIDR1). Refer to able Register ...

Page 39

Bit 3- PRTIM1: Power Reduction Timer/Counter1 Writing a logic one to this bit shuts down the Timer/Counter1 module. When the Timer/Counter1 is enabled, operation will continue like before the shutdown. • Bit 2- PRTIM0: Power Reduction Timer/Counter0 Writing a ...

Page 40

System Control and Reset 9.0.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 41

Figure 9-1. 9.0.3 Power-on Reset A Power-on Reset (POR) pulse is generated by an On-chip detection circuit. The detection level is defined below the detection level. The POR circuit can be used to trigger the Start-up Reset, ...

Page 42

Figure 9-3. TIME-OUT INTERNAL Table 9-1. Symbol V POT V PORMAX V PORMIN V CCRR V RST Note: 9.0.4 External Reset An External Reset is generated by a low level on the RESET pin if enabled. Reset pulses longer than ...

Page 43

Brown-out Detection ATtiny261/461/861 has an On-chip Brown-out Detection (BOD) circuit for monitoring the V level during operation by comparing fixed trigger level. The trigger level for the BOD can be selected by the BODLEVEL Fuses. The ...

Page 44

Internal Voltage Reference ATtiny261/461/861 features an internal bandgap reference. This reference is used for Brown-out Detection, and it can be used as an input to the Analog Comparator or the ADC. 9.1.1 Voltage Reference Enable Signals and Start-up Time ...

Page 45

Figure 9-7. 9.3 Timed Sequences for Changing the Configuration of the Watchdog Timer The sequence for changing configuration differs slightly between the two safety levels. Separate procedures are described for each level. 9.3.1 Safety Level 1 In this mode, the ...

Page 46

Bits 7:4 – Res: Reserved Bits These bits are reserved bits in the ATtiny261/461/861 and will always read as zero. • Bit 3 – WDRF: Watchdog Reset Flag This bit is set if a Watchdog Reset occurs. The bit ...

Page 47

Table 9-3. WDE • Bit 4 – WDCE: Watchdog Change Enable This bit must be set when the WDE bit is written to logic zero. Otherwise, the Watchdog will not be disabled. Once written to one, ...

Page 48

Table 9-4. WDP3 Notes: ATtiny261/ATtiny461/ATtiny861 48 Watchdog Timer Prescale Select Number of WDT Oscillator WDP2 WDP1 WDP0 ...

Page 49

The following code example shows one assembly and one C function for turning off the WDT. The example assumes that interrupts are controlled (e.g., by disabling interrupts globally) so that no interrupts will occur during execution of these functions. Assembly ...

Page 50

Interrupts This section describes the specifics of the interrupt handling as performed in ATtiny261/461/861. For a general explanation of the AVR interrupt handling, refer to on page 10.1 Interrupt Vectors in ATtiny261/461/861 Table 10-1. Vector No ...

Page 51

Address Labels Code 0x0000 0x0001 0x0002 0x0003 0x0004 0x0005 0x0006 0x0007 0x0008 0x0009 0x000A 0x000B 0x000C 0x000D 0x000E 0x000F 0x0010 0x0011 0x0012 0x0013 0x0014 0x0015 0x0016 0x0017 0x0018 ... 7753F–AVR–01/11 ATtiny261/ATtiny461/ATtiny861 rjmp RESET rjmp EXT_INT0 rjmp PCINT rjmp TIM1_COMPA rjmp ...

Page 52

External Interrupts The External Interrupts are triggered by the INT0 or INT1 pin or any of the PCINT15..0 pins. Observe that, if enabled, the interrupts will trigger even if the INT0, INT1 or PCINT15..0 pins are configured as outputs. ...

Page 53

GIMSK – General Interrupt Mask Register Bit 0x3B (0x5B) Read/Write Initial Value • Bit 7 – INT1: External Interrupt Request 1 Enable When the INT1 bit is set (one) and the I-bit in the Status Register (SREG) is set ...

Page 54

Alternatively, the flag can be cleared by writing a logical one to it. This flag is always cleared when INT1 is configured as a level interrupt. • Bit 6 – INTF0: External Interrupt Flag 0 When an edge or logic ...

Page 55

I/O Ports 12.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 56

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. 12.2 Ports as General Digital I/O The ports are bi-directional I/O ports ...

Page 57

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

Page 58

Figure 12-3. Synchronization when Reading an Externally Applied Pin value INSTRUCTIONS 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 ...

Page 59

Assembly Code Example C Code Example unsigned char i; Note: 12.2.5 Digital Input Enable and Sleep Modes As shown in schmitt-trigger. The signal denoted SLEEP in the figure, is set by the MCU Sleep Controller in Power-down mode, Power-save mode, ...

Page 60

Unconnected Pins If some pins are unused recommended to ensure that these pins have a defined level. Even though most of the digital inputs are disabled in the deep sleep modes as described above, float- ing inputs ...

Page 61

Figure 12-5. Alternate Port Functions Pxn PUOExn: PUOVxn: DDOExn: DDOVxn: PVOExn: PVOVxn: DIEOExn: Pxn DIGITAL INPUT-ENABLE OVERRIDE ENABLE DIEOVxn: Pxn DIGITAL INPUT-ENABLE OVERRIDE VALUE SLEEP: PTOExn: Note: 7753F–AVR–01/11 ATtiny261/ATtiny461/ATtiny861 (1) PUOExn PUOVxn 1 0 DDOExn DDOVxn 1 0 PVOExn PVOVxn ...

Page 62

Table 12-2 ure 12-5 in the modules having the alternate function. Table 12-2. Signal Name PUOE PUOV DDOE DDOV PVOE PVOV PTOE DIEOE DIEOV DI AIO The following subsections shortly describe the alternate functions for each port, and relate the ...

Page 63

Alternate Functions of Port B The Port B pins with alternate function are shown in Table 12-3. The alternate pin configuration is as follows: • Port B, Bit 7 - RESET/ dW/ ADC10/ PCINT15 RESET, Reset pin: When the ...

Page 64

ADC8: ADC input Channel 8. Note that ADC input channel 8 uses analog power. PCINT13: Pin Change Interrupt source 13. • Port B, Bit 4 - XTAL1/ CLKI/ OC1B/ ADC7/ PCINT12 XTAL1/CLKI: Chip clock Oscillator pin 1. Used for all ...

Page 65

Port B, Bit 0 - MOSI/ DI/ SDA/ OC1A/ PCINT8 MOSI: SPI Master Data output, Slave Data input for SPI channel. When the SPI is enabled as a Slave, this pin is configured as an input regardless of the ...

Page 66

Table 12-5. Signal Name PUOE PUOV DDOE DDOV PVOE PVOV PTOE DIEOE PCINT11 • PCIE DIEOV 0 DI AIO Note: 12.3.2 Alternate Functions of Port A The Port A pins with alternate function are shown in Table 12-6. The alternate ...

Page 67

Port A, Bit 6 - ADC5/AIN1/PCINT6 ADC5: Analog to Digital Converter, Channel 5. AIN1: Analog Comparator Input. Configure the port pin as input with the internal pull-up switched off to avoid the digital port function from interfering with the ...

Page 68

DI: Data Input in USI Three-wire mode. USI Three-wire mode does not override normal port functions, so pin must be configure as an input for DI function. SDA: Two-wire mode Serial Interface Data. PCINT0: Pin Change Interrupt source 0. Table ...

Page 69

Register Description 12.4.1 MCUCR – MCU Control Register Bit 0x35 (0x55) Read/Write Initial Value • Bit 6 – PUD: Pull-up Disable When this bit is written to one, the pull-ups in the I/O ports are disabled even if the ...

Page 70

Timer/Counter0 Prescaler The Timer/Counter can be clocked directly by the system clock (by setting the CSn2:0 = 1). This provides the fastest operation, with a maximum Timer/Counter clock frequency equal to system clock frequency (f clock source. The prescaled ...

Page 71

However, due to variation of the system clock frequency and duty cycle caused by Oscillator source (crystal, resonator, and capacitors) tolerances recommended that maximum fre- quency of an external clock source is less than f An external clock ...

Page 72

Table 13-1. CS02 external pin modes are used for the Timer/Counter0, transitions on the T0 pin will clock the counter even if the pin is configured as an output. This feature ...

Page 73

Timer/Counter0 14.1 Features • Clear Timer on Compare Match (Auto Reload) • Input Capture unit • Four Independent Interrupt Sources (TOV0, OCF0A, OCF0B, ICF0) • 8-bit Mode with Two Independent Output Compare Units • 16-bit Mode with One Independent ...

Page 74

OCR0A contains the low byte of the word and OCR0B contains the high byte of the word. When accessing 16-bit registers, special procedures described in section 16-bit Mode” on page 81 14.2.2 Definitions Many register and bit references in this ...

Page 75

The counter is incremented at each timer clock (clk restarts from BOTTOM. The counting sequence is determined by the setting of the CTC0 bit located in the Timer/Counter Control Register (TCCR0A). For more details about counting sequences, see internal clock ...

Page 76

Figure 14-2. CTC Mode, Timing Diagram TCNTn Period An interrupt can be generated each time the counter value reaches the TOP value by using the OCF0A Flag. If the interrupt is enabled, the interrupt handler routine can be used for ...

Page 77

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 78

Input Capture Trigger Source The default trigger source for the Input Capture unit is the Input Capture pin (ICP0). Timer/Counter0 can alternatively use the Analog Comparator output as trigger source for the Input Capture unit. The Analog Comparator is ...

Page 79

Alternatively, the flag can be cleared by software by writing a logical one to its I/O bit location. Figure 14-4 Figure 14-4. Output Compare Unit, Block Diagram 14.7.1 Compare Match Blocking by TCNT0 Write All CPU write operations to the ...

Page 80

Figure 14-6. Timer/Counter Timing Diagram, with Prescaler (f clk clk (clk TCNTn TOVn Figure 14-7 Figure 14-7. Timer/Counter Timing Diagram, Setting of OCF0x, with Prescaler (f clk clk (clk TCNTn OCRnx OCFnx shows the setting of OCF0A and the clearing ...

Page 81

Accessing Registers in 16-bit Mode In 16-bit mode (the TCW0 bit is set to one) the TCNT0H/L and OCR0A/B or TCNT0L/H and OCR0B/A are 16-bit registers that can be accessed by the AVR CPU via the 8-bit data bus. ...

Page 82

The following code examples show how to access the 16-bit timer registers assuming that no interrupts updates the temporary register. The same principle can be used directly for accessing the OCR0A/B registers. Assembly Code Example C Code Example unsigned int ...

Page 83

The following code examples show how atomic read of the TCNT0 register contents. Reading any of the OCR0 register can be done by using the same principle. Assembly Code Example TIM0_ReadTCNT0: C Code Example unsigned int TIM0_ReadTCNT0( ...

Page 84

The following code examples show how atomic write of the TCNT0H/L register con- tents. Writing any of the OCR0A/B registers can be done by using the same principle. Assembly Code Example TIM0_WriteTCNT0: C Code Example void TIM0_WriteTCNT0( ...

Page 85

Register Description 14.10.1 TCCR0A – Timer/Counter0 Control Register A Bit 0x15 (0x35) Read/Write Initial Value • Bit 7– TCW0: Timer/Counter0 Width When this bit is written to one 16-bit mode is selected as described Timer/Counter0 width is set to ...

Page 86

Modes of operation supported by the Timer/Counter unit are: Normal mode (counter) and Clear Timer on Compare Match (CTC) mode (see 14.10.2 TCNT0L – Timer/Counter0 Register Low Byte Bit 0x32 (0x52) Read/Write Initial Value The Timer/Counter0 Register Low Byte, TCNT0L, ...

Page 87

In 16-bit mode the OCR0B register contains the high byte of the 16-bit Output Compare Regis- ter. To ensure that both the high and the low bytes are written simultaneously when the CPU writes to these registers, the access is ...

Page 88

TIFR – Timer/Counter0 Interrupt Flag Register Bit 0x38 (0x58) Read/Write Initial Value • Bit 4– OCF0A: Output Compare Flag 0 A The OCF0A bit is set when a Compare Match occurs between the Timer/Counter0 and the data in OCR0A ...

Page 89

Timer/Counter1 Prescaler Figure 15-1 nous clocking mode and an asynchronous clocking mode. The synchronous clocking mode uses the system clock (CK clock timebase and asynchronous mode uses the fast peripheral clock (PCK clock time base. ...

Page 90

Register Description 15.1.1 PLLCSR – PLL Control and Status Register Bit 0x29 (0x49) Read/Write Initial value • Bit 7- LSM: Low Speed Mode The Low Speed mode is set, if the LSM bit is written to one. Then the ...

Page 91

When this bit is set (one), the Timer/Counter prescaler (TCNT1 is unaffected) will be reset. The bit will be cleared by hardware after the operation is performed. Writing a zero to this bit will have no effect. This bit will ...

Page 92

Timer/Counter1 16.1 Features • 10/8-Bit Accuracy • Three Independent Output Compare Units • Clear Timer on Compare Match (Auto Reload) • Glitch Free, Phase and Frequency Correct Pulse Width Modulator (PWM) • Variable PWM Period • Independent Dead Time ...

Page 93

Figure 16-1. Timer/Counter1 Block Diagram TOV1 T/C INT. MASK REGISTER (TIMSK) TIMER/COUNTER1 16.2.1 Speed The maximum speed of the Timer/Counter1 is 64 MHz. However supply voltage below 2.7 volts is used recommended to use the Low ...

Page 94

Registers The Timer/Counter (TCNT1) and Output Compare Registers (OCR1A, OCR1B, OCR1C and OCR1D) are 8-bit registers that are used as a data source to be compared with the TCNT1 con- tents. The OCR1A, OCR1B and OCR1D registers determine the ...

Page 95

Figure 16-2. Timer/Counter1 Synchronization Register Block Diagram. PCKE CK PCK SYNC MODE ASYNC MODE 16.2.5 Definitions Many register and bit references in this section are written in general form. A lower case “n” replaces the Timer/Counter number, in this case ...

Page 96

Counter Unit The main part of the Timer/Counter1 is the programmable bi-directional counter unit. shows a block diagram of the counter and its surroundings. Figure 16-3. Counter Unit Block Diagram Signal description (internal signals): count direction clear clk top ...

Page 97

Output Compare Unit The comparator continuously compares TCNT1 with the Output Compare Registers (OCR1A, OCR1B, OCR1C and OCR1D). Whenever TCNT1 equals to the Output Compare Register, the comparator signals a match. A match will set the Output Compare Flag ...

Page 98

Figure 16-5. Effects of Unsynchronized OCR Latching 16.4.1 Force Output Compare In non-PWM waveform generation modes, the match output of the comparator can be forced by writing a one to the Force Output Compare (FOC1x) bit. Forcing Compare Match will ...

Page 99

Dead Time Generator The Dead Time Generator is provided for the Timer/Counter1 PWM output pairs to allow driving external power control switches safely. The Dead Time Generator is a separate block that can be used to insert dead times ...

Page 100

The length of the counting period is user adjustable by selecting the dead time prescaler setting by using the DTPS11:10 control bits, and selecting then the dead time value in I/O register DT1. The DT1 register consists of two 4-bit ...

Page 101

The design of the Output Compare Pin Configuration logic allows initialization of the OC1x state before the output is enabled. Note that some COM1x1:0 bit settings are reserved for certain modes of operation. For Output Compare Pin Configurations refer to ...

Page 102

Compare Output Mode and Waveform Generation The Waveform Generator uses the COM1x1:0 bits differently in Normal mode and PWM modes. For all modes, setting the COM1x1 tells the Waveform Generator that no action on the OCW1x Output ...

Page 103

The Timer/Counter Overflow Flag (TOV1) is set in the same clock cycle as the TCNT1 becomes zero. The TOV1 Flag in this case behaves like a 11th bit, except that it is only set, not cleared. However, combined with the ...

Page 104

The diagram includes the Waveform Output in non-inverted and inverted Compare Output modes. The small horizontal line marks on the TCNT1 slopes represent Compare Matches between OCR1x and TCNT1. Figure 16-11. Fast PWM Mode, Timing Diagram TCNTn OCWnx (COMnx1:0 = ...

Page 105

The general I/O port function is overridden by the Output Compare value (OC1x / OC1x) from the Dead Time Generator, if either of the COM1x1:0 bits are set and the Data Direction Register bits for the OC1X and OC1X pins ...

Page 106

Figure 16-12. Phase and Frequency Correct PWM Mode, Timing Diagram TCNTn OCWnx (COMnx = 2) OCWnx (COMnx = 3) Period The Timer/Counter Overflow Flag (TOV1) is set each time the counter reaches BOTTOM. The Interrupt Flag can be used to ...

Page 107

Table 16-4. COM1x1 16.7.4 PWM6 Mode The PWM6 Mode (PWM1A = 1, WGM11 = 1 and WGM10 = x) provide PWM waveform genera- tion option e.g. for controlling Brushless DC (BLDC) motors. In the PWM6 Mode ...

Page 108

Figure 16-13. PWM6 Mode, Single-slope Operation, Timing Diagram TCNT1 OCW1A OC1OE0 OC1A Pin OC1OE1 OC1A Pin OC1OE2 OC1B Pin OC1OE3 OC1B Pin OC1OE4 OC1D Pin OC1OE5 OC1D Pin The general I/O port function is overridden by the Output Compare value ...

Page 109

Table 16-5. COM1A1 COM1B1 COM1D1 16.8 Timer/Counter Timing Diagrams The Timer/Counter is a synchronous design and the timer clock (clk clock enable signal in the following figures. The ...

Page 110

Figure 16-15. Timer/Counter Timing Diagram, with Prescaler (f clk PCK clk Tn (clk /8) PCK TCNTn TOVn Figure 16-16. Timer/Counter Timing Diagram, Setting of OCF1x, with Prescaler (f clk PCK clk Tn (clk /8) PCK TCNTn OCRnx OCFnx Figure 16-17. ...

Page 111

Fault Protection Unit The Timer/Counter1 incorporates a Fault Protection unit that can disable the PWM output pins external event is triggered. The external signal indicating an event can be applied via the external interrupt INT0 pin or ...

Page 112

Accessing 10-Bit Registers If 10-bit values are written to the TCNT1 and OCR1A/B/C/D registers, the 10-bit registers can be byte accessed by the AVR CPU via the 8-bit data bus using two read or write operations. The 10-bit registers ...

Page 113

It is important to notice that accessing 10-bit registers are atomic operations interrupt occurs between the two instructions accessing the 10-bit register, and the interrupt code updates the TC1H register by accessing the same or any other of ...

Page 114

The following code examples show how atomic write of the TCNT1 register contents. Writing any of the OCR1A/B/C/D registers can be done by using the same principle. Assembly Code Example TIM1_WriteTCNT1: C Code Example void TIM1_WriteTCNT1( unsigned ...

Page 115

Register Description 16.11.1 TCCR1A – Timer/Counter1 Control Register A Bit 0x30 (0x50) Read/Write Initial value • Bits 7,6 - COM1A1, COM1A0: Comparator A Output Mode, Bits 1 and 0 These bits control the behavior of the Waveform Output (OCW1A) ...

Page 116

Table 16-8 are set to Phase and Frequency Correct PWM Mode. Table 16-8. COM1A1.. Table 16-9 are set to single-slope PWM6 Mode. In the PWM6 Mode the same Waveform Output (OCW1A) is used for generating all ...

Page 117

Note that the Data Direction Register (DDR) bit corresponding to the OC1B pin must be set in order to enable the output driver. The function of the COM1B1:0 bits depends on the PWM1B and WGM10 bit settings. 16-11 (non-PWM). Table ...

Page 118

The automatic action programmed in COM1A1 and COM1A0 takes place compare match had occurred, but no interrupt is generated. The FOC1A bit is always read as zero. • Bit 2 - FOC1B: Force Output Compare Match 1B ...

Page 119

Table 16-14. Division factors of the Dead Time prescaler DTPS11 • Bits 3 CS13, CS12, CS11, CS10: Clock Select Bits and 0 The Clock Select bits and 0 ...

Page 120

Bits 5,4 - COM1B1S, COM1B0S: Comparator B Output Mode, Bits 1 and 0 These bits are the shadow bits of the COM1A1 and COM1A0 bits that are described in the sec- tion “TCCR1A – Timer/Counter1 Control Register A” on ...

Page 121

Table 16-18. Compare Output Mode, Phase and Frequency Correct PWM Mode COM1D1.. • Bit 1 - FOC1D: Force Output Compare Match 1D The FOC1D bit is only active when the PWM1D bit specify a non-PWM mode. ...

Page 122

Bit 3 - FPAC1: Fault Protection Analog Comparator Enable When written logic one, this bit enables the Fault Protection function in Timer/Counter1 to be triggered by the Analog Comparator. The comparator output is in this case directly connected to ...

Page 123

The actual value from the port register will be visible on the port pin, when the Output Compare Override Enable Bit is cleared. and their corresponding Output Compare pins. Table 16-20. Output Compare Override Enable Bits vs. Output Compare Pins ...

Page 124

OCR1A – Timer/Counter1 Output Compare Register A Bit 0x2D (0x4D) Read/Write Initial value The output compare register 8-bit read/write register. The Timer/Counter Output Compare Register A contains data to be continuously compared with Timer/Counter1. Actions on ...

Page 125

Note that smaller value than three is written to the Output Compare Register C, the value is automatically replaced by three minimum value allowed to be written to this register. Note that, if 10-bit ...

Page 126

Bit 2 - TOIE1: Timer/Counter1 Overflow Interrupt Enable When the TOIE1 bit is set (one) and the I-bit in the Status Register is set (one), the Timer/Counter1 Overflow interrupt is enabled. The corresponding interrupt (at vector $004) is executed ...

Page 127

DT1 – Timer/Counter1 Dead Time Value Bit 0x24 (0x44) Read/Write Initial value The dead time value register is an 8-bit read/write register. The dead time delay of all Timer/Counter1 channels are adjusted by the dead time value regis- ter, ...

Page 128

USI – Universal Serial Interface 17.1 Features • 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 ...

Page 129

The 4-bit counter can be both read and written via the data bus, and can generate an overflow interrupt. Both the USI Data Register and the counter are clocked simultaneously by the same clock source. This allows the counter to ...

Page 130

Figure 17-3. Three-wire Mode, Timing Diagram CYCLE USCK USCK The Three-wire mode timing is shown in Figure 17-3. At the top of the figure is a USCK cycle ref- erence. One bit is shifted into the USI Data Register (USIDR) ...

Page 131

The code is size optimized using only eight instructions (+ ret). The code example assumes that the DO and USCK pins are enabled as output in the DDRA or DDRB Register. The value stored in register r16 prior to the ...

Page 132

SPI Slave Operation Example The following code demonstrates how to use the USI module as a SPI Slave: init: ... SlaveSPITransfer: SlaveSPITransfer_loop: The code is size optimized using only eight instructions (+ ret). The code example assumes that the ...

Page 133

Figure 17-4. Two-wire Mode Operation, Simplified Diagram Figure 17 only the physical layer that is shown since the system operation is highly dependent of the communication scheme used. The main differences between the Master and Slave operation at ...

Page 134

Referring to the timing diagram (Figure 17-5.), a bus transfer involves the following steps: 1. The a start condition is generated by the Master by forcing the SDA low line while the SCL line is high (A). SDA can be ...

Page 135

Alternative USI Usage When the USI unit is not used for serial communication, it can be set alternative tasks due to its flexible design. 17.4.1 Half-duplex Asynchronous Data Transfer By utilizing the USI Data Register in ...

Page 136

USIBR – USI Buffer Register Bit 0x10 (0x30) Read/Write Initial Value The content of the Serial Register is loaded to the USI Buffer Register when the transfer is com- pleted, and instead of accessing the USI Data Register (the ...

Page 137

The 4-bit counter increments by one for each clock generated either by the external clock edge detector Timer/Counter0 Compare Match software using USICLK or USITC strobe bits. The clock source depends of the setting of the ...

Page 138

Table 17-1. USIWM1 Note: • Bit 3:2 – USICS1:0: Clock Source Select These bits set the clock source for the USI Data Register and counter. The data output latch ensures that the output is changed at ...

Page 139

Table 17-2. USICS1 • Bit 1 – USICLK: Clock Strobe Writing a one to this bit location strobes the USI Data Register to shift one step and the counter to increment by one, ...

Page 140

AC – Analog Comparator The Analog Comparator compares the input values on the selectable positive pin (AIN0, AIN1 or AIN2) and selectable negative pin (AIN0, AIN1 or AIN2). When the voltage on the positive pin is higher than the ...

Page 141

Bit 5 – ACO: Analog Comparator Output The output of the Analog Comparator is synchronized and then directly connected to ACO. The synchronization introduces a delay clock cycles. • Bit 4 – ACI: Analog Comparator ...

Page 142

Table 18-2. ACME ...

Page 143

ACSRB – Analog Comparator Control and Status Register B Bit 0x09 (0x29) Read/Write Initial Value • Bit 7 – HSEL: Hysteresis Select When this bit is written logic one, the hysteresis of the Analog Comparator is switched on. The ...

Page 144

ADC – Analog to Digital Converter 19.1 Features • 10-bit Resolution • 1.0 LSB Integral Non-linearity • ± 2 LSB Absolute Accuracy • 260 µs Conversion Time • kSPS at Maximum Resolution • 11 ...

Page 145

Figure 19-1. Analog to Digital Converter Block Schematic 19.3 Operation The ADC converts an analog input voltage to a 10-bit digital value through successive approxi- mation. The minimum value represents GND and the maximum value represents the voltage on V ...

Page 146

If the same ADC input pin is selected as both the positive and negative input to the differential gain amplifier, the remaining offset in the gain stage and conversion circuitry can be measured directly as the result of the conversion. ...

Page 147

Figure 19-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 148

The prescaler starts counting from the moment the ADC is switched on by setting the 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. ...

Page 149

Figure 19-6. ADC Timing Diagram, Auto Triggered Conversion Cycle Number ADC Clock Trigger Source ADATE ADIF ADCH ADCL Figure 19-7. ADC Timing Diagram, Free Running Conversion Table 19-1. Condition First conversion Normal conversions Auto Triggered conversions 19.6 Changing Channel or ...

Page 150

Note that the conversion starts on the following rising ADC clock edge after ADSC is written. The user is thus advised not to write new channel or reference selection values to ADMUX until one ADC clock cycle after ADSC is ...

Page 151

ADC Noise Canceler The ADC features a noise canceler that enables conversion during sleep mode to reduce noise induced from the CPU core and other I/O peripherals. The noise canceler can be used with ADC Noise Reduction and Idle ...

Page 152

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

Page 153

Figure 19-10. Gain Error • Integral Non-linearity (INL): After adjusting for offset and gain error, the INL is the maximum deviation of an actual transition compared to an ideal transition for any code. Ideal value: 0 LSB. Figure 19-11. Integral ...

Page 154

Figure 19-12. Differential Non-linearity (DNL) • Quantization Error: Due to the quantization of the input voltage into a finite number of codes, a range of input voltages (1 LSB wide) will code to the same value. Always ± 0.5 LSB. ...

Page 155

Bipolar Differential Conversion As default the ADC converter operates in the unipolar input mode, but the bipolar input mode can be selected by writing the BIN bit in the ADCSRB to one. In the bipolar input mode two-sided voltage ...

Page 156

Manufacturing Calibration Calibration values determined during test are available in the signature row. The temperature in degrees Celsius can be calculated using the formula --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Where: a. ADCH & ADCL are the ADC data registers, b. ...

Page 157

Register Description 19.10.1 ADMUX – ADC Multiplexer Selection Register Bit 0x07 (0x27) Read/Write Initial Value • Bit 7:6 – REFS1:REFS0: Voltage Reference Selection Bits These bits and the REFS2 bit from the ADC Control and Status Register B (ADCSRB) ...

Page 158

Table 19-5. MUX5..0 000000 000001 000010 000011 000100 000101 000110 000111 001000 001001 001010 001011 001100 001101 001110 001111 010000 010001 010010 010011 010100 010101 010110 010111 011000 011001 011010 011011 011100 011101 011110 011111 ATtiny261/ATtiny461/ATtiny861 158 Input Channel Selections ...

Page 159

Table 19-5. MUX5..0 100000 100001 100010 100011 100100 100101 100110 100111 101000 101001 101010 101011 101100 101101 101110 101111 110000 110001 110010 110011 110100 110101 110110 110111 111000 111001 111010 111011 111100 111101 111110 111111 1. 7753F–AVR–01/11 ATtiny261/ATtiny461/ATtiny861 Input Channel ...

Page 160

ADCSRA – ADC Control and Status Register A Bit 0x06 (0x26) Read/Write Initial Value • Bit 7 – ADEN: ADC Enable Writing this bit to one enables the ADC. By writing it to zero, the ADC is turned off. ...

Page 161

Table 19-6. ADPS2 19.10.3 ADCL and ADCH – The ADC Data Register 19.10.3.1 ADLAR = 0 Bit 0x05 (0x25) 0x04 (0x24) Read/Write Initial Value 19.10.3.2 ADLAR = 1 Bit 0x05 (0x25) 0x04 (0x24) Read/Write Initial Value When an ADC conversion ...

Page 162

ADCSRB – ADC Control and Status Register B Bit 0x03 (0x23) Read/Write Initial Value • Bit 7– BIN: Bipolar Input Mode The gain stage is working in the unipolar mode as default, but the bipolar mode can be selected ...

Page 163

Table 19-7. ADTS2 19.10.5 DIDR0 – Digital Input Disable Register 0 Bit 0x01 (0x21) Read/Write Initial Value • Bits 7:4,2:0 – ADC6D:ADC0D: ADC6:0 Digital Input Disable When this bit is written logic one, the digital input buffer on the corresponding ...

Page 164

On-chip Debug System 20.1 Features • Complete Program Flow Control • Emulates All On-chip Functions, Both Digital and Analog, except RESET Pin • Real-time Operation • Symbolic Debugging Support (Both at C and Assembler Source Level, or for ...

Page 165

When designing a system where debugWIRE will be used, the following observations must be made for correct operation: • Pull-Up resistor on the dW/(RESET) line must be in the range of 10k However, the pull-up resistor ...

Page 166

Self-Programming the Flash The device provides a Self-Programming mechanism for downloading and uploading program code by the MCU itself. The Self-Programming can use any available data interface and associ- ated protocol to read code and write (program) that code ...

Page 167

Performing a Page Write To execute Page Write, set up the address in the Z-pointer, write “00000101” to SPMCSR and execute SPM within four clock cycles after writing SPMCSR. The data in R1 and R0 is ignored. The page ...

Page 168

EEPROM Write Prevents Writing to SPMCSR Note that an EEPROM write operation will block all software programming to Flash. Reading the Fuses and Lock bits from software will also be prevented during the EEPROM write operation recommended ...

Page 169

Flash corruption can easily be avoided by following these design recommendations (one is sufficient): 1. Keep the AVR RESET active (low) during periods of insufficient power supply voltage. This can be done by enabling the internal Brown-out Detector (BOD) if ...

Page 170

Bit 2 – PGWRT: Page Write If this bit is written to one at the same time as SPMEN, the next SPM instruction within four clock cycles executes Page Write, with the data stored in the temporary buffer. The ...

Page 171

Memory Programming This section describes the different methods for Programming the ATtiny261/461/861 memories. 22.1 Program And Data Memory Lock Bits The ATtiny261/461/861 provides two Lock bits which can be left unprogrammed (“1”) or can be programmed (“0”) to obtain ...

Page 172

Fuse Bytes The ATtiny261/461/861 has three Fuse bytes. briefly the functionality of all the fuses and how they are mapped into the Fuse bytes. Note that the fuses are read as logical zero, “0”, if they are programmed. Table ...

Page 173

Table 22-5. Fuse Low Byte CKDIV8 CKOUT SUT1 SUT0 CKSEL3 CKSEL2 CKSEL1 CKSEL0 Notes: The status of the Fuse bits is not affected by Chip Erase. Note that the Fuse bits are locked if Lock bit1 (LB1) is programmed. Program ...

Page 174

Reading the Signature Row from Software To read the Signature Row from software, load the Z-pointer with the signature byte address given in LPM instruction is executed within three CPU cycles after the SIGRD and SPMEN bits are set ...

Page 175

Figure 22-1. Parallel Programming Table 22-9. Signal Name in Programming Mode PAGEL/BS1 RDY/BSY Table 22-10. Pin Values Used to Enter Programming Mode Table 22-11. XA1 and XA0 Coding XA1 7753F–AVR–01/11 ATtiny261/ATtiny461/ATtiny861 WR XA0 XA1/BS2 PAGEL/BS1 OE ...

Page 176

Table 22-12. Command Byte Bit Coding Command Byte 22.8 Parallel Programming 22.8.1 Enter Programming Mode The following algorithm puts the device in parallel programming mode: 1. Apply 4.5 - 5.5V between V 2. Set RESET to “0” and toggle XTAL1 ...

Page 177

Load Command “Chip Erase” 1. Set XA1, XA0 to “10”. This enables command loading. 2. Set BS1 to “0”. 3. Set DATA to “1000 0000”. This is the command for Chip Erase. 4. Give XTAL1 a positive pulse. This loads ...

Page 178

While the lower bits in the address are mapped to words within the page, the higher bits address the pages within the FLASH. This is illustrated in eight bits are required to address words in the page (pagesize < 256), ...

Page 179

Figure 22-3. Programming the Flash Waveforms PAGEL/BS1 RDY/BSY RESET +12V Note: 22.8.5 Programming the EEPROM The EEPROM is organized in pages, see EEPROM, the program data is latched into a page buffer. This allows one page of data to be ...

Page 180

Figure 22-4. Programming the EEPROM Waveforms PAGEL/BS1 RDY/BSY RESET +12V 22.8.6 Reading the Flash The algorithm for reading the Flash memory is as follows (refer to page 177 1. A: Load Command “0000 0010” Load Address High Byte ...

Page 181

Programming the Fuse High Bits The algorithm for programming the Fuse High bits is as follows (refer to Flash” on page 177 1. A: Load Command “0100 0000” Load Data Low Byte. Bit n = “0” programs ...

Page 182

Reading the Fuse and Lock Bits The algorithm for reading the Fuse and Lock bits is as follows (refer to on page 177 1. A: Load Command “0000 0100”. 2. Set OE to “0”, BS2 to “0” and BS1 ...

Page 183

Serial Downloading Both the Flash and EEPROM memory arrays can be programmed using the serial SPI bus while RESET is pulled to GND. The serial interface consists of pins SCK, MOSI (input) and MISO (out- put). After RESET is ...

Page 184

Serial Programming Algorithm When writing serial data to the ATtiny261/461/861, data is clocked on the rising edge of SCK. When reading data from the ATtiny261/461/861, data is clocked on the falling edge of SCK. See Figure 23-6 To program ...

Page 185

Table 22-14. Minimum Wait Delay Before Writing the Next Flash or EEPROM Location Symbol t WD_FLASH t WD_EEPROM t WD_ERASE t WD_FUSE 22.9.2 Serial Programming Instruction set Table 22-15 on page 185 Table 22-15. Serial Programming Instruction Set Instruction/Operation Programming ...

Page 186

Table 22-15. Serial Programming Instruction Set (Continued) Instruction/Operation Write Fuse bits Write Fuse High bits Write Extended Fuse Bits Notes: 1. Not all instructions are applicable for all parts address 3. Bits are programmed ‘0’, unprogrammed ‘1’. ...

Page 187

Electrical Characteristics 23.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 Maximum ...

Page 188

T = –40°C to +125° 2.7V to 5.5V (unless otherwise noted Symbol Parameter Power Supply Current I CC Power-down mode Analog Comparator V ACIO Input Offset Voltage Analog Comparator I ACLK Input Leakage Current Notes: 1. ...

Page 189

Speed Grades Figure 23-1. Maximum Frequency vs MHz 8 MHz 2.7V 23.4 Clock Characteristics 23.4.1 Calibrated Internal RC Oscillator Accuracy Table 23-1. Calibration Accuracy of Internal RC Oscillator Frequency Factory 8.0 MHz Calibration Notes: 1. Voltage range ...

Page 190

External Clock Drive Table 23-2. External Clock Drive Symbol Parameter 1/t Clock Frequency CLCL t Clock Period CLCL t High Time CHCX t Low Time CLCX t Rise Time CLCH t Fall Time CHCL t Change in period from ...

Page 191

ADC Characteristics Table 23-5. ADC Characteristics, Single Ended Channels, -40°C +125°C Symbol Parameter Resolution TUE Absolute accuracy INL Integral Non-linearity DNL Differential Non-linearity (DNL) Gain Error Offset Error V External Reference Voltage REF Clock Frequency AVCC Analog Supply Frequency ...

Page 192

Table 23-6. ADC Characteristics, Differential Channels, -40°C +125°C Symbol Parameter Resolution TUE Absolute accuracy INL Integral Non-linearity DNL Differential Non-linearity ATtiny261/ATtiny461/ATtiny861 192 Condition Min Differential conversion, gain = Differential conversion, gain = 20x or 32x Gain = ...

Page 193

Table 23-6. ADC Characteristics, Differential Channels, -40°C +125°C (Continued) Symbol Parameter Gain error Offset error V External Reference voltage REF 7753F–AVR–01/11 ATtiny261/ATtiny461/ATtiny861 Condition Min Gain = 1x / 8x, BIPOLAR 5V 4V, -4.0 CC REF ADC ...

Page 194

Parallel Programming Characteristics Figure 23-3. Parallel Programming Timing, Including some General Timing Requirements (DATA, XA0, XA1/BS2, PAGEL/BS1) Figure 23-4. Parallel Programming Timing, Loading Sequence with Timing Requirements PAGEL/BS1 XA1/BS2 Note: ATtiny261/ATtiny461/ATtiny861 194 XTAL1 t DVXH Data & Contol t ...

Page 195

Figure 23-5. Parallel Programming Timing, Reading Sequence (within the Same Page) with PAGEL/BS1 Note: Table 23-7. Symbol DVXH t XLXH t XHXL t XLDX t XLWL t BVPH t PHPL t PLBX t WLBX t ...

Page 196

Serial Programming Characteristics Figure 23-6. Serial Programming Waveforms SERIAL DATA OUTPUT SERIAL CLOCK INPUT Figure 23-7. Serial Programming Timing Table 23-8. Symbol 1/t CLCL t CLCL 1/t CLCL t CLCL 1/t CLCL t CLCL t SHSL t SLSH t ...

Page 197

Typical Characteristics The data contained in this section is largely based on simulations and characterization of similar devices in the same process and design methods. design targets, and will be updated after characterization of actual Automotive silicon. Thus, the ...

Page 198

Figure 24-2. Active Supply Current vs. Frequency ( MHz) 24.2 Idle Supply Current Figure 24-3. Idle Supply Current vs. Frequency ( MHz) ATtiny261/ATtiny461/ATtiny861 198 7753F–AVR–01/11 ...

Page 199

Supply Current of I/O 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 ...

Page 200

Power-down Supply Current Figure 24-4. Power-down Supply Current vs. V Figure 24-5. Power-down Supply Current vs. V ATtiny261/ATtiny461/ATtiny861 200 (Watchdog Timer Disabled) CC (Watchdog Timer Enabled) CC 7753F–AVR–01/11 ...

Related keywords