Reference
ATtiny 0/1/2-Series Pinout
The pin reference for the 14-pin ATtiny 0/1/2-series: 12 I/O pins, a real USART, SPI and I2C, and one-wire UPDI programming, with labeled diagrams of the top and the back.
- Up to 20 MHz
- UPDI programming
- 2 to 32 KB flash
- 1.8 to 5.5 V
Overview
The ATtiny 0-, 1- and 2-series (tinyAVR) are Microchip’s modern small microcontrollers, the successors of the classic ATtiny85. They run up to 20 MHz, have a real USART, SPI and I2C instead of the shared USI of the ATtiny85, and are programmed over one wire (UPDI) instead of the 4-wire ISP. This guide uses the 14-pin SOIC package as the reference. The pins of that package are in the same place in all three series.
Which chip is this?
The name tells you the series and the size. The last digit is the pin count: 4 means 14 pins, so ATtinyx04, x14 and x24 parts are the ones in this package. The chips differ in what is inside:
| 0-series | 1-series | 2-series | |
|---|---|---|---|
| 14-pin parts in the datasheets | ATtiny804, ATtiny1604 | ATtiny214, 414, 814 | ATtiny424, 824 (and 1624, 3224) |
| Flash | 8 or 16 KB | 2, 4 or 8 KB | 4 or 8 KB (16 or 32 KB) |
| SRAM | 512 B or 1 KB | 128, 256 or 512 B | 512 B or 1 KB (2 or 3 KB) |
| EEPROM | 128 or 256 B | 64, 128 or 128 B | 128 B (256 B) |
| ADC | 10-bit, 115 ksps | 10-bit, 115 ksps | 12-bit differential, 375 ksps, with gain amplifier |
| DAC | No | 8-bit, on PA6 | No |
| Touch (PTC) | No | Only on the ATtiny814 | No |
Check which chip you have before you use a feature, the pin positions are the same but the functions behind them are not.
Source: Microchip datasheets DS40001912A (ATtiny214/414/814), DS40002311A (ATtiny424/824) and DS40002312A (ATtiny804/1604), checked 6 November 2026.
Getting started
You need a UPDI programmer. That can be a dedicated one, or a cheap USB-to-serial adapter used as a SerialUPDI programmer.
The chip needs only three wires to the programmer: VDD (pin 1), GND (pin 14) and UPDI (pin 10, PA0). See “Programming with UPDI” for the wiring.
Hello World: blink an LED
PA7 (pin 5) toggles once a second. Connect an LED with a resistor of about 330 Ω between PA7 and ground. The sketch uses the pin names of megaTinyCore, so it does not depend on the numbering of the Arduino pins.
#define LED_PIN PIN_PA7
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
}
This sketch is a minimal example and was not run on a chip for this guide.
Specifications
Common to all three series
| Package | 14-pin SOIC (SOIC150), pins at 1.27 mm pitch |
| Supply voltage | 1.8 to 5.5 V |
| Speed | 0 to 5 MHz at 1.8 to 5.5 V, 0 to 10 MHz at 2.7 to 5.5 V, 0 to 20 MHz at 4.5 to 5.5 V |
| I/O pins | 12 (PA0 to PA7 and PB0 to PB3) |
| Programming | UPDI, one wire on PA0 |
| Serial | One USART, one SPI and one TWI (I2C) |
| PWM | Timer A on six pins, WO0 to WO5 |
Temperature
The ATtiny214/414/814 are sold in a version for -40 to 105 °C and one for -40 to 125 °C. Check the ordering code of your own chip.
Source: Microchip datasheets DS40001912A (ATtiny214/414/814), DS40002311A (ATtiny424/824) and DS40002312A (ATtiny804/1604), checked 6 November 2026.
Dimensions
The 14-pin SOIC package is about 8.55 mm long and 3.8 mm wide, with 7 pins on each long side at 1.27 mm pitch. Pin 1 is at the bottom left when you look at the top with the text upright and the dot at the left.
Source: the supplied drawing of the package. The shapes are schematic.
Pinout diagram: top
Seen from the top with pin 1 at the bottom left. The pins are numbered counter-clockwise: 1 to 7 along the bottom from left to right, 8 to 14 along the top from right to left. The dot marks pin 1. The artwork of the chip has no dot, so the dot is added to show the standard orientation of an SOIC package.
Pinout diagram: back
The back is mirrored, so pin 1 is at the bottom right. Use this view when the chip is soldered upside down or when you look at the pins from below.
Pins at a glance
The 14 pins grouped by job.
Pin reference
The functions below are the ones the 14-pin package has in all three series. USART, SPI and TWI can be moved to other pins with the PORTMUX register, the table lists the default location and the alternative where it matters.
| Pin | Name | Functions |
|---|---|---|
| 1 | VDD | Power supply, 1.8 to 5.5 V |
| 2 | PA4 | AIN4, SPI SS, PWM WO4 |
| 3 | PA5 | AIN5, PWM WO5, comparator output |
| 4 | PA6 | AIN6, comparator input (1-series: also DAC output) |
| 5 | PA7 | AIN7, comparator input |
| 6 | PB3 | USART RX, TOSC1 (32 kHz crystal) |
| 7 | PB2 | USART TX, TOSC2, PWM WO2 |
| 8 | PB1 | TWI SDA, AIN10, PWM WO1 |
| 9 | PB0 | TWI SCL, AIN11, PWM WO0 |
| 10 | PA0 | UPDI (programming), can be set to reset or I/O with a fuse, AIN0 |
| 11 | PA1 | SPI MOSI, AIN1, alternative USART TX |
| 12 | PA2 | SPI MISO, AIN2, alternative USART RX, event output |
| 13 | PA3 | SPI SCK, AIN3, external clock input, PWM WO3 |
| 14 | GND | Ground |
The ATtiny814 also has touch (PTC) channels on PA4 to PA7 and PB0 and PB1. The analog comparator inputs are the AINN0 and AINP0 of the datasheet.
Source: Microchip datasheets DS40001912A (ATtiny214/414/814), DS40002311A (ATtiny424/824) and DS40002312A (ATtiny804/1604), checked 6 November 2026.
Programming with UPDI
One pin does all the programming and debugging. The classic ISP programmers (USBasp and others) do not work on these chips.
| Function | Pin | Description |
|---|---|---|
| UPDI | PA0, pin 10 | Single-wire programming and debugging |
| VDD | Pin 1 | Power the chip while you program it |
| GND | Pin 14 | Common ground with the programmer |
With a USB-to-serial adapter (SerialUPDI)
Connect the TX of the adapter through a resistor of about 4.7 kΩ to the UPDI pin, connect the RX of the adapter straight to the UPDI pin, and connect the grounds. Then choose SerialUPDI in megaTinyCore. This is the scheme that megaTinyCore describes. I did not test it for this guide.
The datasheet says that the UPDI function of PA0 is chosen with the RSTPINCFG fuse, and that a 12 V pulse on the pin can override a pin that has been set to I/O or reset. A normal programmer does not give 12 V, so do not change this fuse unless you have a programmer that can.
Source: Microchip datasheets DS40001912A (ATtiny214/414/814), DS40002311A (ATtiny424/824) and DS40002312A (ATtiny804/1604), checked 6 November 2026.
How it compares to the ATtiny85
| ATtiny85 | ATtiny 0/1/2-series | |
|---|---|---|
| Flash | 8 KB | 2 to 32 KB |
| Supply voltage | 2.7 to 5.5 V (1.8 V for the ATtiny85V) | 1.8 to 5.5 V |
| ADC | 10-bit | 10-bit, or 12-bit differential in the 2-series |
| DAC | No | 8-bit in the 1-series |
| Serial | USI, one shared block for SPI and I2C | USART, SPI and TWI |
| Programming | ISP, 4 wires | UPDI, 1 wire |
| Pins in the package | 8 (DIP-8 or SOIC-8) | 14 in the SOIC-14 of this guide |
The ATtiny85 has fewer pins and is easier to put on a breadboard. See the ATtiny85 guide for it. Use a 0/1/2-series part when you need more pins, a real USART or less power.
Real gotchas
- PA0 is the programming pin. Do not load it with a strong pull-down, a large capacitor or a circuit that holds it low, or you cannot reprogram the chip.
- The 14-pin package has no PORTC. Tutorials for the 20- and 24-pin parts use PC0 to PC5, which do not exist here.
- The features depend on the series. The DAC is only on the 1-series, the touch channels only on the ATtiny814, and the gain amplifier only on the 2-series. Check the datasheet of your own part.
- The top speed depends on the voltage. 20 MHz needs 4.5 V or more, at 3.3 V the limit is 10 MHz, and below 2.7 V it is 5 MHz.
- The serial pins can be moved. The USART is on PB2 and PB3 by default and on PA1 and PA2 as the alternative, SPI is on PA1 to PA4, and I2C is on PB1 and PB0. Check which one your library uses.
- ISP programmers do not work. You need UPDI.
- Use the pin names of megaTinyCore. PIN_PA7 and so on avoid mistakes with the numbers of the Arduino pins, which differ from the pin numbers of the package.
What to build
These chips are a good fit for small, cheap projects that need more pins than an ATtiny85 has: a sensor node with I2C, a small LED controller with PWM, or a USART-to-something bridge. The ATtiny85 OLED display project shows the same idea on the smaller chip.
Safety notes
Before you wire anything up
- Keep VDD between 1.8 and 5.5 V. A higher voltage can destroy the chip.
- Use the right voltage for the speed you need, the chip does not run at 20 MHz from 3.3 V.
- Keep a load on a pin to about 10 mA and use a transistor for more.
- PA0 is also the reset and programming pin, do not tie it hard to ground if you want to program it again.
- Do not connect mains voltage to these chips. For a project that switches mains power, use a certified module.
Conclusion
The 14-pin ATtiny 0/1/2-series gives you a modern small microcontroller with 12 I/O pins, a real USART, SPI and I2C and one-wire UPDI programming. The pins are in the same place in all three series, but the features behind them are not, so check the datasheet of your own part. Keep PA0 free for programming and remember that the top speed depends on the supply voltage.
Pin positions and specifications are from the Microchip datasheets named above. The package size is from the supplied drawing, and the pin 1 dot is added to the drawing to show the standard orientation.
More guides
Keep building.
From ESP32 HomeKit accessories to Arduino and ATtiny reference guides, there’s more where this came from.
All guides
