Friday, November 6, 2026
HomeIoTLoading Firmware Onto an ATtiny with a Selfmade UPDI Programmer

Loading Firmware Onto an ATtiny with a Selfmade UPDI Programmer

[ad_1]

Shrinking down initiatives

Stemming partly from the continuing chip scarcity, makers have been looking for methods during which they’ll “shrinkify” their initiatives by switching from bigger microcontrollers to tinier, extra becoming ones. By doing so, they’ll unencumber their extra beneficial parts, cut back general value, and have their gadgets eat much less energy — all concurrently. And as a result of latest launch of the brand new lineup of ATtiny chips, embedding an inexpensive but succesful microcontroller right into a venture has by no means been simpler to perform.

For Clem Mayer’s venture, he needed to swap out his present MCU for an ATtiny but additionally keep away from programming it by way of the ICSP protocol as a result of additional pins and prices. Due to this fact, he determined to check out the UPDI interface by constructing his personal home made programmer.

What’s UPDI?

The acronym UPDI stands for Unified Program and Debug Interface. It’s a successor to PDI, each of that are proprietary interfaces invented by Microchip. UPDI allows sure microcontrollers to be each programmed and debugged over a single wire. The sign it carries is half-duplex, that means bidirectional communication, and in addition asynchronous, that means it does not have an exterior clock supply. This enables for fewer connections and a smaller programming header.

Parts

Fairly than spending a fortune on an costly programmer, Mayer was in a position to supply the cheap Arduino Nano, which is predicated across the ATmega328P. When it comes to passive parts, a 4.7k ohm resistor is required to take a seat between the programmer’s output pin (D6 on this case) and the goal’s UPDI pin. A 10uF capacitor was additionally positioned between the RESET and GND pins of the Arduino Nano.

Changing USB to UDPI

Having to program your individual bit-banged firmware that takes in serial knowledge from the USB port and converts it to a UPDI sign can be very robust, so as a substitute, Mayer went with a venture referred to as jtag2updi from GitHub person ElTangas. This program, as soon as flashed onto the Nano, does all the heavy lifting by speaking with the Arduino IDE and outputting the proper alerts as wanted.

Fabricating the programmer

Placing collectively the board was fairly simple, as Mayer soldered a bit of perfboard beneath the Nano, connected the capacitor and resistor, added a programming header, and positioned a jumper to the facet that lets the person choose both 5V or 3.3V output to guard delicate circuitry on the opposite facet. From right here, he designed and 3D printed a trendy case that hides the Nano whereas solely exposing the required header pins. And eventually, the goal ATtiny212 was soldered to a breakout board of its personal together with an LED to view the consequence.

Utilizing it from the Arduino IDE

By putting in the megaTinyCore Arduino board bundle, Clem may simply choose his ATtiny212 from the drop-down menu in addition to the clock supply, enabled timers, and most significantly, his customized programmer. Clicking the “Flash with programmer” button instantly induced the Nano to start sending the UPDI sign to the goal, and after a fast reset, the ATtiny212’s LED started to blink.

To see extra about this venture, you possibly can watch Mayer’s video right here on YouTube or examine it on element14’s group web page.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments