New ATtiny Chip Series

In 2016, Microchip/Atmel announced an entirely new series of chips designed to replace the old ATmega and ATtiny series.The new ATtiny chips started with the 1 series ATtiny417 and ATtiny817, followed by a lower-cost series called the 0 series in 2018.The series now consists of a total of 25 pieces.

attiny

New ATtiny chips, respectively: SOIC ATtiny412, ATTiny1614 and ATtiny3216;
QFN ATtiny1616 and ATtiny3217.

Until recently, Arduino IDE users could not access these new chips because there was no Arduino kernel written for developers and we could not program them using existing ISP programmers.That changed a few months ago when Spence Konde released a megaTinyCore for the new series, taking advantage of Arduino's work to support its new ATmega4809-based cards.

The library developed by Spence Konde provides an introduction to new ATtiny tracks and explains how you can now program them from the Arduino IDE.

Part Numbering

The new parts are numbered in a slightly eccentric way with the serial number in the middle:

attiny

This makes it quite problematic to search for them in an alphabetical list of tracks, since they are confused with the old ATtiny series.However, in addition to this complaint, the systematic naming convention makes it easy to choose a part you want with a certain combination of abilities.

ATtiny 0 Series and 1 Series Summary

The new ATtiny chips mark a departure from the philosophy of the previous Attinys; Although they still use the AVR processor core, their peripherals are quite different from the peripherals in Atmel's XMEGA series.

Although the new ATtiny chips create a consistent device matrix, they are described in several separate datasheets that allow you to read a lot if you want to get an overview of their capabilities and differences.Therefore, we tried to summarize the main features and differences in the following tables:

32K
(2K)
ATtiny3216
$1.03/NA
ATtiny3217
$1.01
16K
(1K/*2K)
ATtiny1604
$0.66
ATtiny1614*
$0.75
ATtiny1606
$0.90/NA
ATtiny1616*
$0.94/$0.77
ATtiny1607
$0.88
ATtiny1617*
$0.97
8K
(512)
ATtiny804
$0.64
ATtiny814
$0.66
ATtiny806
$0.83/NA
ATtiny816
$0.90/$0.71
ATtiny807
$0.83
ATtiny817
$0.92
4K
(256)
ATtiny402
$0.41
ATtiny412
$0.46
ATtiny404
$0.52
ATtiny414
$0.56
ATtiny406
$0.77/$0.62
ATtiny416
$0.85/$0.63
ATtiny417
$0.81
2K
(128)
ATtiny202
$0.41
ATtiny212
£0.43
ATtiny204
$0.52
ATtiny214
$0.54
FLASH
(RAM)
8 pin SOIC
5 I/O line
14 pin SOIC
11 I/O line
20 pin SOIC/QFN
17 I/O line
24 pin QFN
21 I/O line

Each cell in the table above shows the part number, which is classified by flash size and number of pins.We've set up each shard number to redirect to the appropriate Microchip datasheet (note that some datasheets cover more than one shard).Shows the cheapest and most up-to-date price available for both SOIC and QFN packages for each part, as applicable. (Last Updated: 26/09/2021)

All parts have the same set of basic peripherals.In addition, 1 series parts have several extra peripherals, and 16K and 32K 1 series parts have multiple examples of some peripherals, as shown in the table above with background colors:

HOMETCATCBTCDRTCUSARTSpiI2CCCLACADCDACCRCWDTPTC
311111111111
6†1111111111111
6†1111‡1111111111
6†1211‡1111323111

These peripherals are described in the following table:

HOMEEvent System with 3 († 6) channels, 2 († 4) asynchronous and 1 († 2) synchronous
TCA16-bit Timer/Counter Type A, special period recording, 3 comparison channels
TCB16-bit Timer/Counter Type B with input capture
TCD12-bit Timer/Counter Type D optimized for control applications
RTC16-bit Real-Time Counter running from built-in RC oscitor (← or external crystal or clock)
USARTFractional baud rate generator, automatic baud and frame start detection USART
SpiMaster/slave Serial Peripheral Interface
I2CMaster/slave TWI with Dual Address Matching, Standard mode, Quick mode and Quick mode plus
CCLConfigurable Custom Logic with 2 programmable Lookup Tables
ACAnalog Comparator
ADC10-bit 115 ksps Analog to Digital Converter
DAC8-bit Digital-Analog Converter
CRCAutomatic CRC memory scan
WDTWatchdog Scheduler with window mode with oscillator on separate chip
PTCPeripheral Touch Controller for use with QTouch Library (at least 8K flash parts only)

Advantages of ATtiny 0 Series and 1 Series

As a fan of the old ATtiny series, we were initially a little concerned about a complete overhaul of our favorite microcontroller series, but we noticed that this new series definitely has many advantages over the old ATtinys.

First of all, it is a great plus that the entire product range basically has the same peripherals.The peripherals in the old ATtiny series would vary from piece to piece; for example, ATtiny85 has two 8-bit timers, while ATtiny84 has one 8-bit timer and one 16-bit timer.Each part now has at least two 16-bit timers: USART, I2C, SPI, and ADC.Several peripherals that were never available in older ATtinys, such as RTC, DACs, custom logic, event system and peripheral touch controller, have also been added.

Secondly, the new chips offer flash sizes up to 32K; the old ATtinys usually supported up to 8K, the largest were ATtiny167 and ATtiny1634 were 16K.

Finally, the new chips are twice as cheap as the old ATtiny chips.For example, when comparing 8-pin devices with roughly equivalent 4K flash: the old ATtiny45 is $1.06, while the new ATtiny402 is only $0.41.

Disadvantages of ATtiny 0 Series and 1 Series

Compared to the old ATtiny chips that we know and love, there are a few small shortcomings in the new 0 series and 1 series ATtiny chips.

None of the parts are available in a circuit board-friendly DIP package, and none of the parts can be clocked from an external crystal, but this is partially compensated by the fact that the built-in oscilator has better accuracy than 2%.

Programming peripherals directly tends to be more complex than the old ATtiny range, but this will not affect you if you are using Arduino functions.

The maximum number of I/O lines on the new chips was 21, while the old ATtiny48, ATtiny88 and ATtiny828 had 27 I/O lines.For more pins, you now need to go to the new ATmega 0 series.

Features found in some older ATtiny chips, such as the lucrative differential ADC in ATtiny85 and ATtiny861, are not available.This will be fixed by the upcoming 2 series ATtiny chips.

Programming New ATtiny Devices with Arduino IDE

Thanks to the work of Spence Konde and his collaborators, there is now an Arduino core for 0 series and 1 series parts, and GitHub user ElTangas has written a UPDI programmer that you can run on Arduino Uno or an equivalent development card.So you can use Arduino functions with new ATtiny chips and program them from Arduino IDE without the need for Atmel Studio.

None of the new ATtiny devices are available in DIP packages, so if you want to create a project on a prototyping card, that is, breadboard, you first need to solder them to a PCB.

The procedure for programming new ATtiny chips is as follows:

  • Make ElTangas a UPDI programmer by installing the jtag2updi program on an Arduino Uno or other ATmega328P-based card as described in the Make UPDI Programmer.
  • Install Spence Konde's megaTinyCore on the Arduino IDE as described in the megaTinyCore Setup.
  • In arduino IDE, choose the appropriate family from the megaTinyCore section of the Boards menu and the appropriate part from the Chip menu.
  • Choose jtag2updi (megaTinyCore) from the Programmer menu.
  • Connect Arduino Uno (or equivalent) to the chip you are programmed to, select the USB port from the Port menu and press the Upload button.

For example, here we used an Arduino Nano as a UPDI programmer to program an ATtiny412 on a mini breadboard with the Arduino Blink sample program:

attiny

Programming an ATtiny412 with the Blink sample program using Arduino Nano as a UPDI programmer.