Project tutorial
Create Your Own UPDI Programmer

Create Your Own UPDI Programmer © GPL3+

A cheap $10 UPDI programmer for Mircochip's new avrTiny processors.

  • 499 views
  • 2 comments
  • 3 respects

Components and supplies

Ard nano
Arduino Nano R3
×1
2x3 right angle pin header
×1
95w7697 40
Through Hole Resistor, 4.7 kohm
×1
Capacitor 10uF 16V 1206 SMD
×1
1 inch wide Heatshrink cable (2 inches long)
×1

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

You may be familiar with the ATtiny series of microprocessors from Microchip such as the ATtiny85 or ATtiny2313. These chips powered small systems like the Digispark series. Unfortunately, they had limited Flash (usually no more than 8K) and even more limited RAM (usually less than 1K).

Now a new series of ATtiny chips are available with more memory and functionality. They even compete with the more expensive and larger ATmega range of chips.

One of the biggest changes in these processors is the way they are programmed. They use a system called Unified Program and Debug Interface (UPDI for short). In this build you can create a UPDI programmer for under $10 rather than having to fork out many hundreds of dollars for a commercial one.

The Schematic

The components

A Nano, resistor and capacitor are all the basic components required. To save on a case, a piece of 1 inch transparent heatshrink and a 6 pin header are used to complete the build.

Step 1 - Program the Arduino Nano

Unzip the attached "SpenceKonde - jtag2updi.zip" file into your Arduino program folder and program the Arduino Nano. Note: It's OK that the jtag2updi.ino file is empty as the actual code resides in the other files.

Step 2 - Modify and solder on the pin header

Step 3 - Add the other components

The 4K7 resistor goes between pin D6 on the Arduino Nano and the top center pin on the header. Use some insulation material to ensure the lead doesn't short with other components.

The 10uF capacitor is soldered between the GND and RST pins. Make sure the positive end (usually marked with a line or + symbol) of the capacitor is soldered to the RST pin.

Finally slide on the heat-shrink sleeve and apply heat evenly along the sleeve. Being transparent, you can still see the lights and you should still be able to press the reset button on the Arduino Nano.

Add a bit of red paint or nail varnish to the +5V side of the pin header since the pin header is not polarized and you don't want to accidentally plug the lead in upside-down.

Step 4 - Make up a lead

Create a simple lead. I choose to use female pin headers on both ends (a 1x3 female header at one end and three 1x1 female header at the other end). You may want to use test hooks instead. Just make sure the wire colors used make it obvious which wire is +5V, which wire is GND and which wire is UPDI.

Using the programmer

To use the programmer, you must first install the megaTinyCore into the Arduino IDE via the board manager.

  • File -> Preferences, enter the following URL in "Additional Boards Manager URLs"

http://drazzy.com/package_drazzy.com_index.json

  • Tools -> Boards -> Boards Manager...
  • Select "megaTinyCore by Spence Konde" and click "Install".

Once the board has been installed in the IDE, select it from the Tools menu.

Make sure you select the Chip that you are about to program. Also libraries such as the Adafruit Neopixel Library won't work on a 20 MHz clock so you may need to wind the clock speed back to 16 MHz or 8 MHz if you are running the chip from a 3V3 supply.

The Programmer needs to be set to jtag2updi (megaTinyCore).

Pin mapping and the Arduino IDE





To access the physical IO pins in the Arduino IDE using digitalRead, digitalWrite, analogRead or analogWrite, use the pin map above to determine the pin number to use. Note: Unlike the ATmega328, the new ATtiny processors don't have separate analog pins. Whether a pin is analog or digital depends on which function you use to access it.

Conclusion

I suggest you read my tutorial for some demonstration code samples. The datasheet is worth reviewing as these chips have more timers, a built in DAC, an analog comparator and configurable custom logic.

Code

SpenceKonde - jtag2updi.zipC/C++
Ardunio Sketch for ATMEGA328 system such as a UNO, NANO or MINI
No preview (download only).

Schematics

ATtiny1614 Datasheet

Comments

Similar projects you might like

AVR High Voltage Programmer 2

Project tutorial by Dilshan Jayakody

  • 3,283 views
  • 2 comments
  • 15 respects

Programming Atmel AT89 Series Via Arduino

Project tutorial by Patel Darshil

  • 14,798 views
  • 4 comments
  • 21 respects

Breadboard Computer Programmer

Project tutorial by David Hansel

  • 9,721 views
  • 32 comments
  • 23 respects

UltrasonicEyes

Project tutorial by Unexpected Maker

  • 25,839 views
  • 55 comments
  • 153 respects

RTC Based Clock

Project tutorial by shivakumarj1995

  • 15,753 views
  • 15 comments
  • 18 respects

Portable Range Detection Device

Project tutorial by Viktor S

  • 10,380 views
  • 6 comments
  • 25 respects
Add projectSign up / Login