The world of microcontrollers is constantly evolving, and one of the significant shifts in recent years has been the introduction of new ATtiny microcontrollers by Microchip (formerly Atmel). These new chips bring enhanced features, better performance, and, notably, a new programming interface: UPDI. Gone are the days of bulky 6-pin ISP headers for these specific ATtiny chips, replaced by a streamlined, single-wire solution.
In this post, I'll walk you through what the UPDI protocol is, how it's wired, which new ATtiny microcontrollers use it, and introduce a fantastic open-source solution for programming them: the NanoUPDI.
What is the UPDI Protocol?
UPDI stands for Unified Program and Debug Interface. It's a single-wire, half-duplex interface designed by Microchip for programming and on-chip debugging of their newer microcontrollers. Unlike the older ISP (In-System Programming) or JTAG protocols which required multiple pins, UPDI simplifies the hardware interface significantly.
The primary advantages of UPDI are:
- Minimal Pins: It uses only one dedicated pin for communication, freeing up other valuable I/O pins for your application.
- Speed: It's generally faster than older programming interfaces.
- Simplicity: The reduced pin count and straightforward protocol make both the target device and the programmer hardware simpler.
- Debugging Capabilities: Beyond programming, UPDI also supports full on-chip debugging, allowing you to step through code, inspect variables, and set breakpoints.
UPDI Wiring
The wiring for UPDI is remarkably simple, requiring just three connections from your programmer to the target ATtiny microcontroller:
- GND (Ground): Connects to the ground pin of your ATtiny.
- VCC (Power): Connects to the power supply pin of your ATtiny (e.g., 3.3V or 5V, matching the target's operating voltage).
- UPDI (Data Line): This is the single, bidirectional data line. It connects to the dedicated UPDI pin on your ATtiny. On many new ATtiny devices, this pin is also the Reset pin, which is reconfigured by the chip to function as UPDI when programming is initiated.
It's crucial to ensure your programmer's voltage matches the target ATtiny's operating voltage to prevent damage. A series resistor is often recommended between the programmer's UPDI pin and the target ATtiny's UPDI pin to limit current and protect the microcontroller, especially during initial setup or if there are voltage mismatches. Usually many programmers already have a series resistor, like in the case of the NanoUPDI.
New ATtiny Microcontrollers Using UPDI
Microchip has embraced UPDI for a wide range of its modern ATtiny microcontrollers, particularly the 0-series and 1-series families. These new parts offer improved core performance, more Flash and RAM, better peripherals, and lower power consumption compared to their predecessors.
Examples of popular ATtiny microcontrollers that use the UPDI protocol include: ATtiny202, ATtiny402, ATtiny804, ATtiny1604, ATtiny212, ATtiny412, ATtiny414, ATtiny814, ATtiny1614, ATtiny1616... and many other parts in the ATtiny x0x and ATtiny x1x series.
If you're looking at a datasheet for a new ATtiny and see "UPDI" listed as the programming interface, you'll need a UPDI programmer.
Programming with NanoUPDI
While dedicated UPDI programmers exist, an excellent and cost-effective solution for hobbyists and makers is the NanoUPDI.


Here's why NanoUPDI is a fantastic choice:
- Affordable: Fairly priced, considering it is fully hand-soldered and assembled in Italy.
- Plug&Play: No drivers required, since the CH340x chip is a commonly used USB-to-serial converter.
- Versatile: It can flash a wide range of UPDI-enabled ATtiny microcontrollers.
- Compact Form Factor: At only 10 x 22 mm (excluding header pins), it is the smallest serial UPDI programmer on the market.
- VCC Voltage Selector: Easily switch between 3.3V (3V3) and 5V logic voltages with a simple flick of a switch.
- USB Type-C: Compatible with any USB Type-C cable that supports both power and data (USB 2.0 or greater).
- Open Source: The project is well-documented and supported by the community.
- Integration: It integrates seamlessly with popular development tools like Arduino IDE and the command-line utility
avrdude, allowing you to use familiar workflows for compiling and uploading code.
You can find the NanoUPDI project and detailed instructions on how to set it up and use it on GitHub: https://github.com/umbertoragone/nanoupdi
To use NanoUPDI serial UPDI programmer, you'll typically connect it's UPDI pin to the ATtiny's UPDI pin, ensure common GND, and connect power (check the selected voltage first). Once wired, you can then upload your compiled code to the ATtiny directly from your IDE or command line.
Are you looking for a prebuilt NanoUPDI? Check it out on:
Conclusion
The shift to UPDI with the new ATtiny microcontrollers represents a move towards simpler hardware and more efficient programming. With tools like NanoUPDI, embracing these modern chips and their capabilities is more accessible than ever. Happy programming!