# Adafruit UPDI Friend

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/127/231/medium800/components_5879-05.jpg?1706284145)

 **UPDI** stands for [Unified Program and Debug Interface](http://onlinedocs.microchip.com/pr/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B-en-US-4/index.html?GUID-9B349315-2842-4189-B88C-49F4E1055D7F), but this board is so smol and cute that we will call it the **Unusually Playful Device Interfacer** and pat its head when it does a good job. It's designed to make programming modern ATtiny chips very easy because it has 3V or 5V power and logic select, power and transmit indicator LEDs, and a quick cable for poking into a breadboard.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/233/medium800/components_5879-01.jpg?1706284277)

We have been working a lot with [ATtiny816, ATtiny817&nbsp;and ATtiny1616 chips](http://www.adafruit.com/search?q=attiny) lately for our seesaw boards. And we're often needing to program them with a [CP2102-based breakout](https://www.adafruit.com/product/5335) with a [1K resistor soldered between the RX and TX pins](https://learn.adafruit.com/adafruit-attiny817-seesaw/advanced-reprogramming-with-updi). But we were hankering for a nicer programmer!

![](https://cdn-learn.adafruit.com/assets/assets/000/127/232/medium800/components_5879-03.jpg?1706284216)

This UPDI Friend makes programming such chips very easy:

- **Select between 3V or 5V power and logic** - the 3V regulator can source up to 500mA so it can run even big projects.
- **CH340E USB Serial** converter chip with cross-platform drivers.
- **1K Loop-back Resistor** between RX and TX.
- **USB Type C** for data and power connection to any computer.
- **JST SH cable** included for quick plugging into a breadboard - you can get another [JST SH 3-pin cable with sockets](https://www.adafruit.com/product/5765) or with [pin header](https://www.adafruit.com/product/5755) here.
- **0.1" spaced breakout holes** for custom connections.
- **Green power OK LED**
- **Red serial activity LED**
- Inspired by this [open-source hardware design](https://github.com/wagiminator/AVR-Programmer/tree/master/SerialUPDI_Programmer) from [Stefan Wagner](https://github.com/wagiminator)!

We use Arduino IDE with the [megaTinyCore board support package](https://github.com/SpenceKonde/megaTinyCore) installed, simply select "Serial UPDI" as the programmer type. We use 230Kbps but 56Kbps is also good.

# Adafruit UPDI Friend

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/127/234/medium800/components_5879-03.jpg?1706284766)

## Power Pins

- **PWR** - this is the power output pin from the USB-C port. It can output 3V or 5V depending on the position of the voltage selector switch.
- **GND** - common ground for power and logic.

## UPDI Pin

- **UPDI** - This is the logic output from the UPDI Friend. Connect it to the UPDI data pin on the board you are programming. Its logic level is determined by the position of the voltage selector switch (3V or 5V).

## JST SH Port

The **JST SH port** is located above the **UPDI** , **PWR** and **GND** pin. It lets you connect to those same pins without any soldering using a 3 pin JST SH cable. A [male pin connector cable](https://www.adafruit.com/product/5755) is included with the UPDI Friend. Optionally, a [socket pin connector](https://www.adafruit.com/product/5765) version is available.

The red wire is connected to **PWR** , the black wire is connected to **GND** and the white wire is connected to **UPDI**.

## Voltage Selector Switch

In the middle of the board is the voltage selector switch. You can use this switch to change the power and logic level to **3V** or **5V**. The 3V regulator can source up to 500mA.

## LEDs

- **Power LED** - Below the voltage switch is the power LED, labeled **PWR**. It is the green LED.
- **Serial activity LED** - To the right of the voltage switch is the serial activity LED, labeled **TX**. It is the red LED. It will light up anytime data is transferred to the UPDI pin.

# Adafruit UPDI Friend

## Pinouts - High Voltage

![](https://cdn-learn.adafruit.com/assets/assets/000/130/892/medium800/components_5893-04.jpg?1719334568)

## Power Pins

- **PWR** - this is the power output pin from the USB-C port. It can output 3V or 5V depending on the position of the voltage selector switch.
- **GND** - common ground for power and logic.

## UPDI Pin

- **UPDI** - This is the logic output from the UPDI Friend. Connect it to the UPDI data pin on the board you are programming. Its logic level is determined by the position of the voltage selector switch (3V or 5V).

Unlike [our simple UPDI version](http://www.adafruit.com/product/5879), this board is **HV** for **High Voltage** because it will let you send a quick 12V pulse to the UPDI right before programming. This is required for when the chip is configured to use the UPDI pin as a reset or GPIO. This board will also let you 'unbrick' any chip configured for HV usage, you can use it to reset the fuses for Low Voltage programming.

## JST SH Port

The **JST SH port** is located above the **UPDI** , **PWR** and **GND** pin. It lets you connect to those same pins without any soldering using a 3 pin JST SH cable. A [male pin connector cable](https://www.adafruit.com/product/5755) is included with the UPDI Friend. Optionally, a [socket pin connector](https://www.adafruit.com/product/5765) version is available.

The red wire is connected to **PWR** , the black wire is connected to **GND** and the white wire is connected to **UPDI**.

## Voltage Selector Switch

In the middle of the board is the voltage selector switch. You can use this switch to change the power and logic level to **3V** or **5V**. The 3V regulator can source up to 500mA.

## LEDs

- **Power LED** - Below the voltage switch is the power LED, labeled **PWR**. It is the green LED.
- **Serial activity LED** - To the right of the voltage switch is the serial activity LED, labeled **TX**. It is the red LED. It will light up anytime data is transferred to the UPDI pin.

# Adafruit UPDI Friend

## Enabling Settings for the High Voltage UPDI Friend

Warning: This page is only for use with the High Voltage UPDI Friend. The simple UPDI Friend does not need these steps.

Before you upload code to your board with the High Voltage UPDI Friend, you'll need to edit the **boards.txt** file in the megaTinyCore board support package. This will enable the high-voltage fuses settings.

## Install megaTinyCore

You can compile code for the ATtiny using the [megaTinyCore](https://github.com/SpenceKonde/megaTinyCore) board support package in the Arduino IDE. There are detailed [installation instructions](https://github.com/SpenceKonde/megaTinyCore/blob/master/Installation.md) in the megaTinyCore GitHub repository. The following steps outline how to install it using the Boards Manager.

In the Arduino IDE, go to **Preferences** and add the megaTinyCore boards manager URL to the **Additional Boards Manager URLs list** :

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

![boards](https://cdn-learn.adafruit.com/assets/assets/000/118/913/original/adafruit_products_boardsManager.png?1677510959 )

 **Tools** - **Board** - **Boards Manager** and&nbsp;search for&nbsp; **megaTinyCore**. Click **Install** to install the board support package.

![megatinycore](https://cdn-learn.adafruit.com/assets/assets/000/118/915/original/adafruit_products_installMegaTinyCore.png?1677511207 )

## Edit **boards.txt**
Navigate to the megaTinyCore board support package folder on your computer. This is usually located in the Arduino15 folder. For example, this is the file path for Windows:&nbsp;

```auto
C:\Users\name\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.10
```

![](https://cdn-learn.adafruit.com/assets/assets/000/130/893/medium800/components_megatiny.png?1719335631)

Open the **boards.txt** file in the folder with your preferred text editor.

![](https://cdn-learn.adafruit.com/assets/assets/000/130/894/medium800/components_megaTinyBoards.png?1719335706)

Navigate to the " **UPDI/RESET PIN CONFIGURATION**" section in **boards.txt** :

![](https://cdn-learn.adafruit.com/assets/assets/000/130/895/medium800/components_updi_pins_before.png?1719335795)

 **Uncomment** the last four lines in this section and save **boards.txt**. With these lines uncommented, you will brick chips that do not have a high voltage programmer, so proceed with caution.

![](https://cdn-learn.adafruit.com/assets/assets/000/130/896/medium800/components_updi_pins_after.png?1719335880)

Danger: If you uncomment these lines in <b>boards.txt</b> you will brick chips without the high voltage UPDI programmer.

Now you can proceed to upload the code to your board by following the steps on the [Using the UPDI Friend](https://learn.adafruit.com/admin/guides/3940/editor/28016) page.

# Adafruit UPDI Friend

## Using the UPDI Friend

Warning: 

You can reprogram these ATtiny breakouts to run your own firmware. However, the boards do not come with a bootloader. If you want to do development on seesaw (e.g. changing the configuration) you need a separate UPDI programming setup! You can build this setup with a 1K resistor and a USB to Serial cable or with the UPDI Friend board.

### Adafruit UPDI Friend - USB Serial UPDI Programmer

[Adafruit UPDI Friend - USB Serial UPDI Programmer](https://www.adafruit.com/product/5879)
 **UPDI** &nbsp;stands for [Unified Program and Debug Interface](http://onlinedocs.microchip.com/pr/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B-en-US-4/index.html?GUID-9B349315-2842-4189-B88C-49F4E1055D7F), but this board is so smol and cute that we&nbsp;will call it the...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5879)
[Related Guides to the Product](https://learn.adafruit.com/products/5879/guides)
![Overhead shot of a half-size breadboard connected to a UPDI board and an AtTiny breakout board. the LEDs light up green on both boards.](https://cdn-shop.adafruit.com/640x480/5879-05.jpg)

### USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi

[USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi](https://www.adafruit.com/product/954)
The cable is easiest way ever to connect to your microcontroller/Raspberry Pi/WiFi router serial console port. Inside the big USB plug is a USB\<-\>Serial conversion chip and at the end of the 36" cable are four wire - red power, black ground, white RX into USB port, and green TX out...

In Stock
[Buy Now](https://www.adafruit.com/product/954)
[Related Guides to the Product](https://learn.adafruit.com/products/954/guides)
![USB to TTL Serial Cable With Type A plug and 4 wire sockets](https://cdn-shop.adafruit.com/640x480/954-02.jpg)

### Through-Hole Resistors - 1.0K ohm 5% 1/4W - Pack of 25

[Through-Hole Resistors - 1.0K ohm 5% 1/4W - Pack of 25](https://www.adafruit.com/product/4294)
ΩMG! You're not going to be able to resist these handy resistor packs!&nbsp;Well, axially, they&nbsp;do all of the resisting for you!

This is a **25 Pack of 1.0KΩ Resistors.** More specifically, they are **carbon film** , through-hole...

In Stock
[Buy Now](https://www.adafruit.com/product/4294)
[Related Guides to the Product](https://learn.adafruit.com/products/4294/guides)
![Angled shot of 25 Through-Hole Resistors - 1.0K ohm 5% 1/4W.](https://cdn-shop.adafruit.com/640x480/4294-00.jpg)

## Building a UPDI Programmer
- **USB to Serial cable power** to **ATtiny VIN (red wire)**
- **USB to Serial cable ground** to **ATtiny G (black wire)**
- **USB to Serial cable RX** to **1K resistor (white wire)**
- **USB to Serial cable TX** to **1K resistor (green wire)**
- **1K resistor** to **ATtiny UPDI pin (white wire)**

![adafruit_products_programmingFritz_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/118/909/medium640/adafruit_products_programmingFritz_bb.jpg?1677510461)

## Wiring with the UPDI Friend
- **UPDI Friend PWR** to **ATtiny VIN (red wire)**
- **UPDI Friend GND** to **ATtiny G (black wire)**
- **UPDI Friend UPDI** to **ATtiny UPDI pin (white wire)**

![adafruit_products_updiFriendFritz_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/464/medium640/adafruit_products_updiFriendFritz_bb.jpg?1707140183)

## Install megaTinyCore

You can compile code for the ATtiny using the [megaTinyCore](https://github.com/SpenceKonde/megaTinyCore) board support package in the Arduino IDE. There are detailed [installation instructions](https://github.com/SpenceKonde/megaTinyCore/blob/master/Installation.md) in the megaTinyCore GitHub repository. The following steps outline how to install it using the Boards Manager.

In the Arduino IDE, go to **Preferences** and add the megaTinyCore boards manager URL to the **Additional Boards Manager URLs list** :

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

![](https://cdn-learn.adafruit.com/assets/assets/000/118/913/medium800/adafruit_products_boardsManager.png?1677510959)

Go to **Tools** - **Board** - **Boards Manager...**

![](https://cdn-learn.adafruit.com/assets/assets/000/118/914/medium800/adafruit_products_boardsTools.png?1677511154)

In the **Boards Manager** , search for **megaTinyCore**. Click **Install** to install the board support package.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/915/medium800/adafruit_products_installMegaTinyCore.png?1677511207)

## Program the ATtiny
After the megaTinyCore finishes installing, go to **Tools - Board - megaTinyCore** and **select the board list** that includes your ATtiny.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/916/medium800/adafruit_products_chooseBoard.png?1677511313)

Then, **select the chip** of your ATtiny.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/917/medium800/adafruit_products_selectChip.png?1677511367)

Next, **set clock** if needed. The default 20 MHz clock option is only valid if powering with 5V. If powering with 3.3V, select 10 MHz for the clock.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/194/medium800/adafruit_products_set_clock.png?1709075761)

Under **Programmer** , select **SerialUPDI - SLOW: 57600 baud**.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/918/medium800/adafruit_products_uploader.png?1677511409)

Warning: 

Finally, go to **Preferences** and **check ON Show verbose output during upload**. This will give you the upload details and progress in the monitor at the bottom of the Arduino IDE, which is very useful for debugging.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/919/medium800/adafruit_products_verboseUpload.png?1677511503)

Now you can compile code with the megaTinyCore to upload to the ATtiny with the UPDI programmer by going to **Sketch \> Upload Using Programmer**.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/367/medium800/adafruit_products_Screenshot_2024-04-15_at_12.01.47_PM.jpg?1713207762)

## Blink Test
This simple example blinks the ATTiny816 onboard red indicator LED on pin 10.

```cpp
void setup() {
  pinMode(10, OUTPUT);
}

void loop() {
  digitalWrite(10, HIGH);
  delay(1000);
  digitalWrite(10, LOW);
  delay(1000);
}
```

If using this with the ATTiny817, you'll want to update the pin to 5, as shown below.

```cpp
void setup() {
  pinMode(5, OUTPUT);
}

void loop() {
  digitalWrite(5, HIGH);
  delay(1000);
  digitalWrite(5, LOW);
  delay(1000);
}
```

Upload the sketch using the UPDI programmer. You should see this output in the monitor after the upload has completed successfully:

![](https://cdn-learn.adafruit.com/assets/assets/000/118/920/medium800/adafruit_products_verboseProgramming.png?1677511806)

The red LED on the ATtiny should be blinking!

# Adafruit UPDI Friend

## megaTinyCore Docs

# Adafruit UPDI Friend

## Downloads

## Files

- [Window and Mac driver download](https://www.wch-ic.com/downloads/CH341SER_ZIP.html)
- [CH340E Datasheet](https://cdn-learn.adafruit.com/assets/assets/000/127/236/original/CH340DS1.pdf?1706287579)
- [UPDI Interface Docs](https://onlinedocs.microchip.com/pr/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B-en-US-4/index.html?GUID-9B349315-2842-4189-B88C-49F4E1055D7F)
- [EagleCAD PCB files on GitHub - UPDI Friend](https://github.com/adafruit/Adafruit-UPDI-Friend-PCB)
- [EagleCAD PCB files on GitHub - High Voltage UPDI Friend](https://github.com/adafruit/Adafruit-High-Voltage-UPDI-Friend-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20UPDI%20Friend.fzpz)

## Schematic and Fab Print - UPDI Friend
![](https://cdn-learn.adafruit.com/assets/assets/000/127/237/medium800/components_schem.png?1706289014)

![](https://cdn-learn.adafruit.com/assets/assets/000/127/238/medium800/components_fab.png?1706289020 dimensions are in inches)

## Schematic and Fab Print - High Voltage UPDI Friend
![](https://cdn-learn.adafruit.com/assets/assets/000/130/899/medium800/components_schem_hv.png?1719336238)

![](https://cdn-learn.adafruit.com/assets/assets/000/130/900/medium800/components_fab_hv.png?1719336246 dimensions are in inches)


## Primary Products

### Adafruit UPDI Friend - USB Serial UPDI Programmer

[Adafruit UPDI Friend - USB Serial UPDI Programmer](https://www.adafruit.com/product/5879)
 **UPDI** &nbsp;stands for [Unified Program and Debug Interface](http://onlinedocs.microchip.com/pr/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B-en-US-4/index.html?GUID-9B349315-2842-4189-B88C-49F4E1055D7F), but this board is so smol and cute that we&nbsp;will call it the...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5879)
[Related Guides to the Product](https://learn.adafruit.com/products/5879/guides)

## Featured Products

### Adafruit High Voltage UPDI Friend - USB Serial UPDI Programmer

[Adafruit High Voltage UPDI Friend - USB Serial UPDI Programmer](https://www.adafruit.com/product/5893)
 **UPDI** &nbsp;stands for [Unified Program and Debug Interface](http://onlinedocs.microchip.com/pr/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B-en-US-4/index.html?GUID-9B349315-2842-4189-B88C-49F4E1055D7F), but this board is so smol and cute that we&nbsp;will call it the...

In Stock
[Buy Now](https://www.adafruit.com/product/5893)
[Related Guides to the Product](https://learn.adafruit.com/products/5893/guides)
### JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable

[JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable](https://www.adafruit.com/product/5755)
If you fancy connecting to&nbsp;anything else with a JST SH compatible 3-pin connector, this cable will do the trick. For example, our [NeoPixel JST Breakout boards](https://www.adafruit.com/product/5975), or [UPDI Friend](https://www.adafruit.com/product/5879), or <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/5755)
[Related Guides to the Product](https://learn.adafruit.com/products/5755/guides)
### JST SH 1mm Pitch 3 Pin to Socket Headers Cable - 100mm long

[JST SH 1mm Pitch 3 Pin to Socket Headers Cable - 100mm long](https://www.adafruit.com/product/5765)
If you fancy connecting to&nbsp;anything else with a JST SH compatible 3-pin connector, this cable will do the trick. For example, our [NeoPixel JST Breakout boards](https://www.adafruit.com/product/5975), or [UPDI Friend](https://www.adafruit.com/product/5879), or <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5765)
[Related Guides to the Product](https://learn.adafruit.com/products/5765/guides)
### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5153)
[Related Guides to the Product](https://learn.adafruit.com/products/5153/guides)
### Adafruit ATtiny816 Breakout with seesaw - STEMMA QT / Qwiic

[Adafruit ATtiny816 Breakout with seesaw - STEMMA QT / Qwiic](https://www.adafruit.com/product/5681)
This breakout board is a "three in one" product:

1. The ATtiny816 is part of the 'next gen' of AVR microcontrollers, and now we have a cute development/breakout board for it, with just enough hardware to get the chip up and running.
2. It's also an Adafruit...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5681)
[Related Guides to the Product](https://learn.adafruit.com/products/5681/guides)
### Adafruit ATtiny1616 Breakout with seesaw - STEMMA QT / Qwiic

[Adafruit ATtiny1616 Breakout with seesaw - STEMMA QT / Qwiic](https://www.adafruit.com/product/5690)
This breakout board is a "three in one" product:

1. The ATtiny1616 is part of the 'next gen' of AVR microcontrollers, and now we have a cute development/breakout board for it, with just enough hardware to get the chip up and running.
2. It's also an Adafruit...

In Stock
[Buy Now](https://www.adafruit.com/product/5690)
[Related Guides to the Product](https://learn.adafruit.com/products/5690/guides)

## Related Guides

- [Adafruit ATtiny Breakouts with seesaw](https://learn.adafruit.com/adafruit-attiny817-seesaw.md)
- [Adafruit TRRS Jack Breakout Board](https://learn.adafruit.com/trrs-jack-breakout.md)
- [Adafruit Trinkey QT2040](https://learn.adafruit.com/adafruit-trinkey-qt2040.md)
- [Adafruit Sparkle Motion Stick](https://learn.adafruit.com/adafruit-sparkle-motion-stick.md)
- [Adafruit STEMMA & STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt.md)
- [Adafruit ADXL375](https://learn.adafruit.com/adafruit-adxl375.md)
- [Adafruit BME280 Humidity + Barometric Pressure + Temperature Sensor Breakout](https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout.md)
- [Piezo Ring Tones with Raspberry Pi](https://learn.adafruit.com/piezo-ring-tones-with-raspberry-pi.md)
- [Adafruit VS1053 MP3/AAC/Ogg/MIDI/WAV Codec Breakout Tutorial](https://learn.adafruit.com/adafruit-vs1053-mp3-aac-ogg-midi-wav-play-and-record-codec-tutorial.md)
- [Adafruit USB Host FeatherWing with MAX3421E](https://learn.adafruit.com/adafruit-usb-host-featherwing-with-max3421e.md)
- [iBook iPad Case](https://learn.adafruit.com/ibook-ipad-case.md)
- [Adafruit IoT Button with NeoPixel BFF](https://learn.adafruit.com/adafruit-iot-button-with-neopixel-bff.md)
- [Adafruit 8x16 LED Matrix FeatherWing](https://learn.adafruit.com/adafruit-8x16-led-matrix-featherwing.md)
- [USB Rechargeable Mini Solder Fume Extractor](https://learn.adafruit.com/usb-rechargeable-mini-solder-fume-extractor.md)
- [ Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board](https://learn.adafruit.com/adafruit-drv8833-dc-stepper-motor-driver-breakout-board.md)
