Bus Pirate as FTDI Cable

One of the things I wanted to do with my Bus Pirate was figure out how to apply it like an FTDI cable for the purposes of uploading sketches to an Arduino.  It took me a little stuffing around to do it, but here’s the condensed version of how to make it work;

First, the “black” wire on the proper FTDI cable is pin 1, and the “green” wire is pin 6.  Now, you wire up your Bus Pirate to the FTDI 6-pin header like so;

Pin 1 – Brown (GND)
Pin 2 – Not connected
Pin 3 – Orange (+5V)
Pin 4 – Grey (MOSI)
Pin 5 – Black (MISO)
Pin 6 – Purple (CLK)

Now that’s done, we’ll use the BusPirate in UART mode to get it emulating an FTDI cable.  There’s something important to understand here – the BusPirate cannot switch serial speeds after you put it into transparent mode.  Fortunately we want to program at 115200 baud, and the BusPirate is already connected at that speed by default, so it’ll be all fine.

  1. Open up your terminal emulator, connect to the BusPirate at 115200 baud.  If you use a different speed, connect at that speed, and then press “b” in order to swap to 115200 baud.
  2. Change to UART mode (type “m” and then “3”)
  3. Select serial port speed of 115200 baud (type “9”)
  4. Select 8 data bits, no parity (type “1”)
  5. Select 1 stop bit (type “1”)
  6. Select receive polarity of idle 1 (type “1”)
  7. Select output type of Normal (H=3.3v, L=GND) (type “2”)
  8. Activate the power supplies (skip this step if the circuit is externally powered!) (type “W”)
  9. Type “i” for info.  The pullup resistors should be off.
  10. Type “(3)” including brackets, no quotes.  This will put the BusPirate into transparent bridge mode with flow control.  Once this is done, you’ll have to reset the BP to get a prompt back again.
  11. Close your terminal emulator.
  12. Fire up the Arduino IDE, and upload firmware like you usually would, selecting the BusPirate as the serial port.  It’ll work just like an FTDI cable will, only it can’t change speeds.

All works as expected, and the upload speed is very similar to a real FTDI cable.  It can even auto-reset a Uno for doing the upload.

6 thoughts on “Bus Pirate as FTDI Cable”

  1. “Once this is done, you’ll have to reset the BP to get a prompt back again.”

    I got this on the prompt:

    UART bridge
    Reset to exit
    Are you sure? Y”

    And then the whole thing hangs forever.

    I use screen as a terminal emulator, should I kill it with killall?

  2. What happens there is completely normal. Once you go into UART bridge mode you can’t break out of it without actually resetting the Bus Pirate (ie, unplugging it).

    Pull its power cable, and put it back in again to get a prompt back.

  3. As an additional comment…

    When you drop into UART bridge mode like that, typing things into the console will usually cause absolutely nothing to happen because the Arduino on the other end typically won’t echo back. So it will _look_ like the BP has locked up.

    However if you look at the RX/TX leds on the Arduino you’ll notice they flash when you type. And if you already had a sketch on the Arduino that does something with the serial port, you’ll see it (assuming the speeds match, remember the UART bridge can’t change speeds).

  4. I’m trying to do this, but when i Upload the sketch in arduino ide I get the following erro:
    avrdude: stk500_recv(): programmer is not responding
    I make the connection OK, but i don’t know why it’s not working 🙁
    ANy help?

  5. I haven’t tried this one in a fair while, not since I made up the AVR Extended Commands firmware update for the Bus Pirate (it makes doing this way, way faster). Anyway, have you checked you have the connections absolutely right? If you’re connected up in transparent mode and you then use your terminal emulator and bang away at random keys you should see the LED on the Arduino flash briefly.

    If that’s all good, the next thing is to make sure that you have the Arduino IDE set to the right port. And lastly, when you upload, you upload by using the ‘Upload’ option, NOT the ‘Upload using programmer’ option. The BusPirate in this case is acting as a serial port passthrough.

    Oh – check out the alternate avrdude firmware you can use with the BP;


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.