Turn Your Arduino to a UPDI Programmer

Turn Your Arduino to a UPDI Programmer

ATtiny series of microcontrollers have, in recent times, been on the receiving end of a renewed love from the community. The processing power and new features, packed into the tiny form factor which houses the new chips have been a major contributor to their adoption, however,  one other major contributor is the existence of tools that make the process of developing embedded hardware with the chips easy. One of such tools is the jtag2updi firmware developed by ElTangas.

The Jtag2updi firmware is designed to run on MCUs like the Atmega328p, or other AVR MCU (including experimental support for atmega1280/2560, and for Logic Green LGT8F328P/D AVR clones with 32 pins or more). It enables the microcontroller to interface with AVRdude using the jtagice Mk2 protocol via a serial link and provides a bridge that allows you upload codes to the new Attiny817 family of MCUs, that use the UPDI interface.

An illustration of the process facilitated  by the firmware is provided below:

avrdude -> HW Serial interface -> Programmer MCU (e.g. Mega328P) -> SW Serial on PD6 -> Target MCU (e.g. tiny817)

The jtag2updi relationship with avrdude facilitates the use of the Arduino IDE as a development platform for the ATtiny series of microcontrollers and the fact that the firmware works on microcontrollers like the atmega328p means it can be hosted on boards like the Arduino Uno/Nano, transforming them into programmers for the new chips. Using Arduino boards like the Uno/Nano requires a few modifications like disabling the auto-reset feature of the board using the techniques described here. https://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection.

The jtag2updi firmware has gone through several iterations and most of the flaws in the previous versions have been fixed and improvements made. One of the major challenges with the past versions is the firmware freezing while waiting for a target that wasn’t working (for example, because it was connected incorrectly) or the host (for example, if you entered a slow command, like reading a 128k flash memory when you didn’t intend to, and ctrl-c hoping to “save time”), requiring a reset to reconnect to it. This has been fixed in the current version using timeouts on communication with both the host and the target.

jtag2updi has officially only been tested on tinyAVR 0-series and 1-series and ATmega 328p/168p, but it has been used widely in the community and It is expected to work on classic megaAVR x8, x4, x1, and x0 parts, as well as megaAVR 0-series and AVR-DA parts.

All of the firmware sources, build process, documentation, list of compatible devices, and build guidelines can be found on the project’s Github repo.

Please follow and like us:
Pin Share
About Emmanuel Odunlade

Hardware Design Engineer | #IoT Consultant |All things #ML | Entrepreneur | Serial Writer | Passionate about Innovation and technology as tools for solving problems in developing countries. Spare time is spent around writing and advocacy for the growth of the Maker/DIY Culture in Africa.

view all posts by emmanuel
Notify of

1 Comment
Inline Feedbacks
View all comments
Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers