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.
- 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.
- Change to UART mode (type “m” and then “3”)
- Select serial port speed of 115200 baud (type “9”)
- Select 8 data bits, no parity (type “1”)
- Select 1 stop bit (type “1”)
- Select receive polarity of idle 1 (type “1”)
- Select output type of Normal (H=3.3v, L=GND) (type “2”)
- Activate the power supplies (skip this step if the circuit is externally powered!) (type “W”)
- Type “i” for info. The pullup resistors should be off.
- 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.
- Close your terminal emulator.
- 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.