# FTDI Friend

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/126/582/medium800/adafruit_products_284-09.jpg?1702068277)

Long gone are the days of parallel ports and serial ports. Now the USB port reigns supreme! But USB is hard, and you just want to transfer your every-day serial data from a microcontroller to computer. What now? Enter the FTDI Friend!

![](https://cdn-learn.adafruit.com/assets/assets/000/126/583/medium800/adafruit_products_284-12.jpg?1702068303)

The FTDI Friend is a tweaked out FTDI FT232RL chip adapter. Sure, like the well-known FTDI cable, it can provide power to your project and there are 4 signal lines for sending data back and forth. But the Friend can do much more! For example, you can change the signal and power lines to be either 3.3V or 5V. Arduino-derivatives and XBees use the RTS line for programming but what if you need that DTR line? It's there for you.

![](https://cdn-learn.adafruit.com/assets/assets/000/126/584/medium800/adafruit_products_284-13.jpg?1702068319)

By default, we've set it up so that it matches our FTDI cables. The 6th pin is RTS (as of Arduino IDE v1.8 this will work perfectly for uploading to 'inos), the power wire is +5V and the signal levels are 3.3V (they are 5V compliant, and should work in the vast majority of 3.3V and 5V signal systems).

And of course, we include&nbsp; **a little extra** &nbsp;- in this case its the extra-long headers that you can use to plug it into a breadboard. There are also blinkies, 2 red & green LEDs&nbsp; **already on the board** &nbsp;that pulse when serial is sent or received. The USB port on the breakout is a Micro-B type, by the way.

![](https://cdn-learn.adafruit.com/assets/assets/000/126/585/medium800/adafruit_products_284-07.jpg?1702068344)

You can also purchase [a 6-pin extension cable](https://www.adafruit.com/products/206) from us, which will let you rearrange the wire order.

In a pinch, [you can even use it to program AVRs](https://learn.adafruit.com/ftdi-friend) (its a bit slow but works!)

[We have a full tutorial page about the FTDI friend](https://learn.adafruit.com/ftdi-friend) and you can peruse the [FTDI cable datasheet](https://www.adafruit.com/datasheets/DS_TTL-232R_CABLES_V201.pdf), [FTDI FT232RL chip datasheet](https://www.adafruit.com/datasheets/DS_FT232R.pdf) or the [schematic/layout files at GitHub](http://github.com/adafruit/FTDI-Friend)

Note: These use genuine FTDI chips, either we purchase them or they are manufactured to our specifications with the requirement of genuine FTDI chips 10/22/14 - [read more.](http://www.adafruit.com/blog/2014/10/22/ftdi-drivers-brick-counterfeit-chips-with-latest-windows-update/)

![](https://cdn-learn.adafruit.com/assets/assets/000/126/586/medium800/adafruit_products_284-03.jpg?1702068415)

 **Revision History:**

- **As of December 5, 2023** &nbsp;- We've updated this board with a micro USB-B connector as well as&nbsp;used&nbsp;[**Adafruit Pinguin**](https://github.com/adafruit/Adafruit_Pinguin)&nbsp;to make a lovely silkscreen.

# FTDI Friend

## Installing FTDI Drivers

Step #1 is to plug in your FTDI adapter and install the driver (in case it isnt on there already). If you have an FTDI cable proper, there is already a USB A connector on the end. If you have an FTDI adapter, you'll need a standard mini-B cable, pretty much everything uses these so steal your camera's or cell phone's data cable.![](https://cdn-learn.adafruit.com/assets/assets/000/003/747/medium800/adafruit_products_minibftdi.jpg?1396801310)

If you are using **Windows or Mac OS** , [you may need to need to download the FTDI driver](http://www.ftdichip.com/Drivers/VCP.htm) if you haven't already installed it for another project. **If you are using Linux, the driver is already built in to the operating system (handy!)**

Next up, plug it into your computer! If you are using Windows you may hear a sound from the computer and a little popup bubble in the bottom right corner of the screen that says **Found New Hardware FT232R USB UART.**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/748/medium800/adafruit_products_foundft232ruart.jpg?1396801315)

After a few seconds, the new hardware wizard will start. Select **"No not this time"** and click **Next\>**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/749/medium800/adafruit_products_foundnewhardware.jpg?1396801323)

At the next screen, select **Install from a list or specific location**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/750/medium800/adafruit_products_specificloc.jpg?1396801331)

At the next screen make sure **Include this location** is selected and browse to the folder that contains the driver you downloaded. Select the folder and click **OK**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/751/medium800/adafruit_products_browsedriver.jpg?1396801340)

It should copy some files and then come up with this window. Click **Finish**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/752/medium800/adafruit_products_foundserialconv.jpg?1396801347)

Almost immediately, another window will pop up, this time it will say **USB Serial Port**. As before, click **Install from a list or specific location**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/753/medium800/adafruit_products_foundserialport.jpg?1396801356)

Browse to the same folder again…![](https://cdn-learn.adafruit.com/assets/assets/000/003/754/medium800/adafruit_products_browsedriver_%281%29.jpg?1396801363)

And it should complete successfully!![](https://cdn-learn.adafruit.com/assets/assets/000/003/755/medium800/adafruit_products_usbserialportfinished.jpg?1396801372)

You may need to reboot the computer.![](https://cdn-learn.adafruit.com/assets/assets/000/003/756/medium800/adafruit_products_rebootdriver.jpg?1396801378)

# FTDI Friend

## COM / Serial Port Name

OK now we will verify that the driver installed properly.

Under Mac, in the **Terminal** window, type in **ls /dev/cu.** \* which should give the following responses or so

![](https://cdn-learn.adafruit.com/assets/assets/000/003/757/medium800/adafruit_products_lscu.jpg?1396801386)

The name we are looking for is **/dev/cu.usbserial-XXXX** where the X's are going to be unique for each cable. Copy and paste the name into a text file so you'll remember it for later.

For Linux/Unix type **ls /dev/ttyUSB** \* into a terminal window, you should see a device file called something like ttyUSB0

![](https://cdn-learn.adafruit.com/assets/assets/000/003/758/medium800/adafruit_products_lstty.png?1396801402)

If you are using Windows, go to the **Device Manager** (From the **Start Menu** , select Settings→Control Panel. Double click on **System** and select the **Hardware** tab. Then click on the **Device Manager** button)

![](https://cdn-learn.adafruit.com/assets/assets/000/003/759/medium800/adafruit_products_devicemanager.jpg?1396801409)

Look for an entry under **Ports (COM & LPT)** that says **USB Serial Port (COM)** the COM number may vary but it should be something like **COM3** or **COM4** the COM number may be as high as **COM99** so just look for the USB serial port. The COM stands for "communication", and each one has a unique number, known as the **COM Port number**. In this case the COM Port number is **COM3**. If you don't see the COM port verify the cable is plugged in, and check that you installed the VCP FTDI driver.

Then right click and select **Properties**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/760/medium800/adafruit_products_portsettings.jpg?1396801419)

Click on the **Port Settings** tab, and click on **Advanced…**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/761/medium800/adafruit_products_norts.gif?1448059281)

Make sure **Set RTS On Close** used to be required for people using the Arduino IDE before like version 18 or so. Now you dont need it so make sure its not selected!

# FTDI Friend

## FTDI vs. AVR Programmer

## Whats the difference between an FTDI cable/adapter & AVR programmer?
There are two ways to program an AVR microcontroller. One is to reprogram the entire chip using an AVR programmer. The other is to use a **bootloader** that is pre-programmed onto the chip that allows the chip to re-program itself. An AVR programmer is more powerful: you can really mess with anything on the chip and the entire 32K of memory is available. Using the bootloader is safer: there's no way to mess with the fuse settings (which could brick the chip) but you only get 30K of memory since 2K is used by the bootloader. Not a big deal, but if you are working on a big project which requires tons of flash space, you may need it

[For a lot more information about AVR programmers and bootloaders, I strongly recommend reading this short article](http://www.ladyada.net/learn/avr/programmers.html "Link: http://www.ladyada.net/learn/avr/programmers.html")

Note that to program an AVR you need an AVR programmer (like a [USBtinyISP](http://www.ladyada.net/learn/avr/programmers.html) ), but to upload using the bootloader you need a computer-serial connection (such as an FTDI cable). Unfortunately, they are not the same device! If you're not a microcontroller wiz, I suggest going with the bootloader (FTDI) method. Its as fast (or faster), allows you to debug as well, and theres virtually no way to damage/brick the chip by messing with the fuses. If you're familiar with microcontroller programming, and you have a programmer, then feel free to go that direction.

**SO!**

- **AVR programmers** are more powerful in that you can program any AVR, even blank ones from the factory. But that also means you have a pretty good chance of 'bricking' the chip!
- **FTDI adapters** can send any serial data back and forth including updating AVRs with a bootloader on them. But you need to get that bootloader on there first, which basically requires an AVR programmer.

If you use an AVR programmer to write to chip with a bootloader on it, you'll overwrite the bootloader so just be aware of that!

# FTDI Friend

## Programming Blank AVRs

So even though I said FTDI adapters are not for programming 'raw' AVRs, it turns out you can 'convince' the chip to do it with a bit of manipulation. One [way that is documented so far doesnt require soldering but it does require updating the AVRDUDE software and installing a different driver](http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html) . ([see also this post](http://www.kerrywong.com/2010/04/02/on-atmega328-bootloading-with-ftdi-bitbang-method/) and [this link for using an FTDI adapter instead of an Arduino](http://doswa.com/blog/2010/08/24/avrdude-5-10-with-ftdi-bitbang/) )

If you have an FTDI friend or other breakout where you can get to the DTR line, I found a way to do it that requires soldering a wire but no AVRDUDE/driver messing. The trade off is that it is **really** slow - good for maybe burning a bootloader on, not good for day-to-day AVR development

Turn over the FTDI friend, and solder a dot of solder onto the DTR pin on the bottom left.

![](https://cdn-learn.adafruit.com/assets/assets/000/003/764/medium800/adafruit_products_friendvise.jpg?1396801454)

Solder a wire onto it, making sure you dont short it to the gold square just to the right. We'll use a **white** wire.

![](https://cdn-learn.adafruit.com/assets/assets/000/003/765/medium800/adafruit_products_dtrsolder.jpg?1396801464)

Plug in wires into the FTDI breakout, **black** is ground, **blue** is CTS, **red** is VCC, **orange** is TX and **green** is RTS.

![](https://cdn-learn.adafruit.com/assets/assets/000/003/766/medium800/adafruit_products_ftdisquidtop.jpg?1396801475)

![](https://cdn-learn.adafruit.com/assets/assets/000/003/767/medium800/adafruit_products_ftdisquid.jpg?1396801480)

Now you have to make a text edit to your **avrdude.conf**.

If you've installed **[WinAVR](http://www.ladyada.net/learn/avr/setup-win.html)** or similar (say [for Mac](http://www.ladyada.net/learn/avr/setup-mac.html) or [Linux](http://www.ladyada.net/learn/avr/setup-unix.html) ) , it'll be in something like **C:\WinAVR\bin\avrdude.conf** or **C:\WinAVR\etc\avrdude.conf** if you aren't sure where it is, but you have **avrdude** installed, you can run **avrdude -c xyz** which will dump the programmer list, if you look to the right, the name of the conf file will be printed

![](https://cdn-learn.adafruit.com/assets/assets/000/003/768/medium800/adafruit_products_avrdudeconf.gif?1448059276)

A common reason for wanting to program an AVR is to put the Arduino bootloader on there, in which case, you may not have WinAVR installed. Luckily, avrdude is there, its just 'hidden' in the IDE package (for Mac users,you need to actually "explore" the App) if you're running windows, go to the folder where you have the IDE installed and go into the **hardware\tools\avr\etc** folder to open up **avrdude.conf**

OK! Now that you have **avrdude.conf** open, find the string **ponyser** , then add the following bold text right before hand so the **avrdude.conf** looks like this:

```auto
# some ultra cheap programmers use bitbanging on the 
# serialport.
#
# PC - DB9 - Pins for RS232:
#
# GND   5   -- |O
#              |   O| <-   9   RI
# DTR   4   <- |O   |
#              |   O| <-   8   CTS
# TXD   3   <- |O   |
#              |   O| ->   7   RTS
# RXD   2   -> |O   |
#              |   O| <-   6   DSR
# DCD   1   -> |O
#
# Using RXD is currently not supported.
# Using RI is not supported under Win32 but is supported under Posix.
 
# serial ponyprog design (dasa2 in uisp)
# reset=!txd sck=rts mosi=dtr miso=cts
programmer
  id    = "ftdifriend";
  desc  = "design ftdi adatper, reset=dtr sck=tx mosi=rts miso=cts";
  type  = serbb;
  reset = ~4;
  sck   = ~3;
  mosi  = ~7;
  miso  = ~8;
;
# serial ponyprog design (dasa2 in uisp)
# reset=!txd sck=rts mosi=dtr miso=cts
 
programmer
  id    = "ponyser";
  desc  = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
  type  = "serbb";
  reset = ~3;
  sck   = 7;
  mosi  = 4;
  miso  = 8;
;
```

Save the file.# FTDI Friend

## Programming the Arduino Bootloader

Don't forget, if you have two 'duinos, you can turn one into an ISP programmer, [check out this tutorial which runs much faster than the below.](http://arduino.cc/en/Tutorial/ArduinoISP)

You can burn chips right from the Arduin IDE with one more edit, open up the **programmers.txt** file (its in **hardware\arduino** in the IDE installation) and add the following text to the bottom.

```auto
ftdifriend.name=FTDI Friend bitbang
ftdifriend.communication=serial
ftdifriend.protocol=ftdifriend
```

Save **programmers.txt**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/769/medium800/adafruit_products_bitbang.jpg?1396801502)

Its time to wire it up!

- Connect the Black (Ground) wire to the ground of your chip
- Connect the Red (VCC) wire to the power/VCC/5V pin of your chip
- Connect the White (DTR) wire to the Reset pin
- Connect the Orange (TX) wire to SCK pin (Arduino pin 13)
- Connect the Blue (CTS) wire to the MISO pin (Arduino pin 12)
- Connect the Green (RTS) wire to MOSI pin (Arduino pin 11)

Start up the IDE and select the COM port of the FTDI friend

![](https://cdn-learn.adafruit.com/assets/assets/000/003/770/medium800/adafruit_products_bitbangserial.gif?1448059270)

Make sure you have the right **Board** selected, for whatever you want to burn. Then select **Burn Bootloader→FTDI Friend**

![](https://cdn-learn.adafruit.com/assets/assets/000/003/771/medium800/adafruit_products_bitbangprog.gif?1448059265)

 **It will take a really really long time to program the chip, about two hours!**

Its taking forever because its programming very inefficiently. It takes 4 bytes to program one byte of the AVR, and data is sent as a single bit in two USB packet, each packet takes 3 milliseconds and an AVR has 32768 bytes = 262144 bits. 262144 bits \* 2 packet/bit \* 3 ms/packet \* 4 bytes/byte = 6291456 ms = 6300 seconds = 104 minutes! If you used a real AVR programmer, it would take maybe 15 seconds so thats why its nice to have one.

Do this before you go to bed or watch a movie! The **L** (pin 13) LED will be on 'solid' while its programming. When it goes out you're done. Its very slow but if you're in a pinch, it may come in handy!

## Using the Command Line AVRdude
Now if you open up a terminal and try running **avrdude -c ftdifriend** If you are using the avrdude installation thats inside the Arduino IDE, you can open up a **cmd** terminal and **cd** to the directory where you have the IDE installed and then go to **hardware\tools\avr**. Then you can run **bin\avrdude.exe -C etc\avrdude.conf -c ftdifriend** so for example, my installation is in **C:\arduino-0018\** I **cd** to **C:\arduino-0018\hardware\tools**** \avr.**  
![](https://cdn-learn.adafruit.com/assets/assets/000/003/772/medium800/adafruit_products_avrdudefriendtest.gif?1448059261)

You should get a note that **No AVR part has been specified** (not that it **Can't find programmer id "ftdifriend"** )

Great, now its time to program!

- Connect the Black (Ground) wire to the ground of your chip
- Connect the Red (VCC) wire to the power/VCC/5V pin of your chip
- Connect the White (DTR) wire to the Reset pin
- Connect the Orange (TX) wire to SCK pin
- Connect the Green (RTS) wire to MOSI pin
- Connect the Blue (CTS) wire to the MISO pin We suggest verifying the wiring! We'll verify the connection by running **avrdude -c ftdifriend**  **-P \\.\COMxx -p atmega328p** Replace the **\\.\COMxx** with the COM port you found in the earlier part of this tutorial via the Device Manager. If you're using linux or mac, the COM port should be **/dev/cu.usbserialXXX** or **/dev/ttyUSBx** to match the name. For the device, we're testing with an **Atmega328p** chip which is found in the latest Arduinos. If you're using some other chip, substitute the name right after the **-p**

If you are using the avrdude in the Arduino IDE, you'll need to use **bin\avrdude -C etc\avrdude.conf -c ftdifriend**  **-P \\.\COMxx -p atmega328p** etc.

![](https://cdn-learn.adafruit.com/assets/assets/000/003/773/medium800/adafruit_products_hashes.gif?1448059256)

Once you have the hashbar show up nicely, that means you are talking to the chip all right. Yay! You can now program the chip using the **-U flash:w:** command.

Press the up arrow to get back the command you wrote and tack onto the end a **-U flash:w:firmware.hex** (where **firmware.hex** is the hex file you want to burn in) For example, if you want to burn a bootloader on, make it easy on yourself by copying the file from use:

**bin\avrdude.exe -C etc\avrdude.conf -c ftdifriend -P \\.\COM46 -p atmega328p -U flash:w:..\..\arduino\bootloaders\atmega\ATmegaBOOT\_168\_atmega328.hex**

(you can also copy your file to C:\ so its not so long to type. Hit return and grab a beer, it'll take about 5 minutes per byte of data you want to write&verify)

![](https://cdn-learn.adafruit.com/assets/assets/000/003/774/medium800/adafruit_products_bangard.gif?1448059250)

# FTDI Friend

## Downloads

## Files

- [FT232RL datasheet](https://cdn-shop.adafruit.com/datasheets/DS_FT232R.pdf)
- [EagleCAD PCB files on GitHub](http://github.com/adafruit/FTDI-Friend)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library)

## Schematic and Fab Print

### Rev B
![](https://cdn-learn.adafruit.com/assets/assets/000/126/576/medium800/adafruit_products_schem_revB.png?1702067852)

![](https://cdn-learn.adafruit.com/assets/assets/000/126/577/medium800/adafruit_products_fab_rebB.png?1702067870 dimensions are in inches)

### Rev A
![](https://cdn-learn.adafruit.com/assets/assets/000/126/571/medium800/adafruit_products_schem.png?1702067624)

![](https://cdn-learn.adafruit.com/assets/assets/000/126/572/medium800/adafruit_products_fab.png?1702067632 dimensions are in inches)


## Related Guides

- [Piper Make With the Raspberry Pi Pico](https://learn.adafruit.com/piper-make-with-the-raspberry-pi-pico.md)
- [LoRa and LoRaWAN Radio for Raspberry Pi](https://learn.adafruit.com/lora-and-lorawan-radio-for-raspberry-pi.md)
- [Quickstart - Raspberry Pi RP2040 with BLE and CircuitPython](https://learn.adafruit.com/quickstart-raspberry-pi-rp2040-with-ble-and-circuitpython.md)
- [CircuitPython Libraries on Linux and Raspberry Pi](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux.md)
- [CircuitPython Libraries on Linux and Google Coral](https://learn.adafruit.com/circuitpython-on-google-coral-linux-blinka.md)
- [Adafruit Feather HUZZAH ESP8266](https://learn.adafruit.com/adafruit-feather-huzzah-esp8266.md)
- [Using LoraWAN and The Things Network with CircuitPython](https://learn.adafruit.com/using-lorawan-and-the-things-network-with-circuitpython.md)
- [CircuitPython Libraries on Linux and ODROID C2](https://learn.adafruit.com/circuitpython-libaries-linux-odroid-c2.md)
- [CircuitPython Libraries on Linux and Orange Pi](https://learn.adafruit.com/circuitpython-on-orangepi-linux.md)
- [Using LoraWAN and The Things Network with Feather](https://learn.adafruit.com/the-things-network-for-feather.md)
- [MagicLight Bulb Color Mixer with Circuit Playground Bluefruit](https://learn.adafruit.com/magiclight-bulb-mixer.md)
- [Quickstart IoT - Raspberry Pi Pico RP2040 with WiFi ](https://learn.adafruit.com/quickstart-rp2040-pico-with-wifi-and-circuitpython.md)
- [CircuitPython Libraries with the Binho Nova Multi-Protocol USB Host Adapter](https://learn.adafruit.com/circuitpython-with-binho-nova-multi-protocol-usb-host-adapter.md)
- [Adafruit IO Basics: Color](https://learn.adafruit.com/adafruit-io-basics-color.md)
- [CircuitPython Libraries on Linux and the NVIDIA Jetson Nano](https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano.md)
