Bus Pirate Tips

Mon Dec 27 14:22:54 2010 by Eric Hokanson
Modified Mon Apr 30 01:53:06 2012


The Bus Pirate is one of the best hardware hacker tools available.  It has dozens of uses and significantly increases the ease of development and debugging of your projects.  It features upgradable firmware and a nice menu system to interact with it.  Many 3rd party programs now work the Bus Pirate as well.  In this article I'll share some of my favorite uses I've found for it.

Data Sniffer

In even the simplest projects you often have many different parts talking many different protocols with each other.  It can be frustrating when two parts don't seem to be talking to each other correctly.  With a Bus Pirate you can hook probes up to the data lines, without having to desolder or disconnect anything, and view a live stream of the data being passed.  This is done by selecting the correct mode (m) and activating the correct monitoring macro (see all by typing (0)).

Serial Bridge

Many devices still speak simple serial but most are low voltage TTL or CMOS serial and thus can't talk directly to a high voltage PC serial.  This is where the Bus Pirate comes to the rescue.  You simply set the Bus Pirate to UART mode with the correct settings and active the transparent bridge macro ((1)).  Now you can simply talk to the device without worrying about level converters.

AVR & SPI Flash Programmer

One of my favorite uses for the Bus Pirate is a flash programmer.  I flash many of my AVR chips using the Bus Pirate.  This can either be done using a recent version of AVRdude or you can reflash the firmware on the Bus Pirate with the included STK500 firmware and use any AVR programming software.  If your device has an ICSP header you can flash it right on the board, otherwise you'll have to hook up the pins using the AVR spec sheet as a guide.  I even made an easy-to-use ZIF socket adapter if you're interested.

Programming SPI flash memory is also easy with the Bus Pirate and the flashrom software.  SPI flash is the new standard for most motherboard BIOS chips and is also found in many other newer devices.  Now you never have to worry about bricking your device again.


JTAG support is available through the OpenOCD project.  Firmware support is currently broken in versions 5.9 and 5.10 but you'll find it working just fine in 5.8.

Connection Guides

The following are a couple nice connection guides for the various protocols discussed above.

Connection Guide

blog comments powered by Disqus