9.9 KiB
ATtiny 1616 Development Board
ATtiny 1616 Development Board is a small and handy development board built around the new generation of the ATiny series. It is pin and size compatible with Arduino Nano board and can be used as its direct replacement (with certain limitations). It can be programmed using both Arduino IDE and Platformio IDE, as well as vanilla console tools.
Motivation
I'm a big fan of early ATtiny series chips, I even made my own ATtiny Flasher tool for productive development and a few educational kits based on ubiquitous ATtiny85. The time has come to extend my horizons and look into the modern line of ATtiny chips, specifically so called 1-series and 2-series line of MCUs.
No need to mention that they went far ahead old series, and have resources comparable with the old ATmega series. This gave me the idea to make an Arduino Nano pin-compatible development board, so I can start using it the projects, where I'd normally pick Arduino Nano. In my practice, the best way to get familiar with new hardware is to start using it in the actual projects.
Features
- ATTINY1616 8-bit MCU in a 20-pin package
- Up to 20 MHz guaranteed by the manufacturer, up to 32 MHz reported by community in normal conditions
- 16 KB Flash
- 2 KB SRAM
- 128B of EEPROM
- UPDI interface for flashing and debugging
- Onboard 5V LDO (disconnected for low-power applications)
- Flash using Arduino IDE, Platformio, or the IDE of your choice
- Onboard USB-Serial bridge (CH340E) connected to hardware Serial port
- One RGB LED (WS2812B)
- One Push button
ATtiny1616
ATiny1616 is a mid-range chip in new ATtiny 1-Series line. Generally, they offer considerably more than older Tiny-series chips, and are comparable with classic ATmega AVRs, offering at the same time new MCU features, not available in older series.
ATTINY88 | ATTINY1616 | ATmega168P | ATmega328P | |
---|---|---|---|---|
Max Frequency | 20 Mhz | 16Mhz | 16Mhz | |
Flash | 8KB | 16KB | 16KB | 32KB |
SRAM | 512B | 2KB | 1KB | 2KB |
EEPROM | 64B | 128B | 512B | 1024B |
GPIO count | 28 | 18 | 23 | 23 |
UART | No | Yes | Yes | Yes |
I2C | Yes | Yes | Yes | Yes |
SPI | Yes | Yes | Yes | Yes |
Timers | 2 | 4 | 3 | 3 |
PWM channels | 2 | 4 | 6 | 6 |
ADC pins | 8 | 12 | 8 | 8 |
Board Pinout
Note: Revision A and B have backside pin labels rotated, big 🤦 for me. It will be fixed in the next revisions.
MCU Pinout
Arduino Core
Spence Konde created and maintained Arduino Core. This is a great place to start to get to know new chips better and understand what is supported and what isn't.
How to flash
Spence Konde created another great writeup on the flashing routines for the new chips. Short summary below
- (a) Legacy way is to take any Arduino Nano board and use jtag2updi project to make yourself a programmer.
- (b) A better (read recommended) way is to use SerialUPDI tooling with hardware-modified serial programmer
- (c) Alternative is to use Optiboot bootloader and Serial programmer interface like on Arduino boards
Method (c) is disqualified on 1-Series chip because of RESET/UPDI pin collision, and both (a) and (b) work equally well. The difference is what is easier for you: (a) dedicate Arduino Nano board for programming or (b) do a solder job on your USB-serial adapter.
Revision A (Discontinued)
Method | Connection |
---|---|
jtag2updi | ![]() |
SerialUPDI (recommended) |
![]() |
Revision B (Current latest)
Starting from revision B diode between TX and RX pins is included on the board, so you can use an unmodified USB-Serial adapter.
Method | Connection |
---|---|
jtag2updi | ![]() |
SerialUPDI (recommended) |
![]() |
Revision C (co-exists with rev B)
While working on one of the projects, it came to me, hey, there is already a USB-Serial adapter on the board, serving Serial communication. Why not use it for flashing? So revision C came, no external programmer needed, plug-n-play. The drawback is that you lose Serial communication via built-in USB.
Arduino IDE
Use Arduino 1.8.x, Core doesn't work with 2.X versions of Arduino at the moment of writing.
Add http://drazzy.com/package_drazzy.com_index.json to board manager
After that, you should install megaTinyCore from Board Manager
Select ATtiny1616 as the target and other necessary settings in the board settings after
Platformio IDE
After installing Plarformio IDE, open sample project. Run the Build
command to install the necessary tools and libraries.
Next, run the Upload: tiny1616-jtag2updi
task if you're using the jtag2updi programmer, or the Upload: tiny1616-serialupdi
task if using the modified Serial adapter method. In both cases, you can use the Upload and Monitor
task.
Digital Safe firmware
Weekend project I did for my 6-year-old son. Based on Electronic Safe with Arduino project, mostly rewritten in order to add support for async execution.
Hardware
ATTINY1616 MCU
CH340E USB-Serial Adapter connected to Hardware Serial
WS2812B RGB LED
UPDI Programming and Debug header
Hardware Push button
VIN disconnect - cut this line to disconnect LDO chip and power-on LED, recommended for low-power applications
RES disconnect - short this line to enable auto-RESET functionality with Optiboot bootloader (read below)
Auto reset with Optiboot
As explained in many details by Spence, 1-Series chips cannot provide Arduino-like one-click-upload with Optiboot behavior without some sacrifice. The reason for that is pin collision: UPDI and RESET are the same pins, so you need to decide which you'd prefer. If you use auto-reset, you lose UPDI, specifically the possibility to change fuses easily (this is important in my opinion). If you use UPDI you need 2 connections to your MCU - one via the programming interface, and another one for Serial communication.
Personally, I prefer to keep UPDI and use direct programming without a custom bootloader, having extra wire is a minor inconvenience for me, but losing fuses permanently is not an option.
Where to buy
In limited quantities possible to buy at Tindie and Elecrow