Bus Pirate firmware v2.1 released


Bus Pirate firmware v2.1 is a major upgrade that fixes a lot of bugs. With Hack a Day’s second Bus Pirate preorder about to ship, we couldn’t wait any longer to release it.

This version has major fixes to the I2C library, hardware I2C support, new speed options, and improved terminal interface. Thanks to a dedicated translator, we’re also able to release the first Spanish and Italian localized firmware for the Bus Pirate. Download the updated firmware from the Google Code page, check out the change log below.

Do you have any requests for the next firmware version?  What hardware version do you use? How often do you update your firmware?

Continue reading “Bus Pirate firmware v2.1 released”

Bus Pirate HEX/DEC/BIN converter


See the latest version in the documentation wiki.

Converting between hexadecimal, decimal, and binary is a pretty constant activity when you work with a new microchip.

HiZ>=<<<HEX/DEC/BIN converter command
CONVERT (1) >0b1010 <<<convert this value
0x0A <<<HEX equivalent
10<<<DEC equivalent
0b00001010<<<BIN equivalent
HiZ>=<<<HEX/DEC/BIN converter command
CONVERT (1) >0xf

The latest Bus Pirate nightly firmware compile (v2.1-RC3+) adds a much-needed base conversion command, available in all modes. Press ‘=’ and enter any byte value to see the HEX/DEC/BIN equivalent.

Continue reading “Bus Pirate HEX/DEC/BIN converter”

Hack a Day Bus Pirate preorder 2 update


Seeed Studio just tweeted an update on Hack a Day’s second Bus Pirate preorder. Looks like they’ll ship in one week:

After long time waiting,we got ICs from Digikey. Now Bus Pirat Preorder 2 just started manufacture,will be ship out within a week.

Check out our Bus Pirate goodies when it arrives.

Thanks Mike! Artwork by Aaron, Creative Commons Attribution 3.0.

Easy infrared UART data link

Here’s an easy way to transfer data with an infrared LED and an infrared remote control demodulator. The example uses an Arduino, but the technique will work with any microcontroller.


The transmitting microcontroller powers an IR LED from a pin configured as a 38KHz pulse-width modulator. Another pin configured as a 2400bps UART switches the IR LED ground pin on and off. This converts the standard UART output into a train of rapidly-blinking light pulses.

The receiver is an IR remote control demodulator connected to a 2400bps UART input pin. The demodulator is specially tuned to detect IR light pulses at 38KHz. It converts the transmission back into a 2400bps UART bitstream.

How would you use a line of sight data link?

Via Make.

Seeed Studio Rainbowduino Carnival contest


Seeed Studio, the team that handles fulfillment of the Bus Pirate, is celebrating the success of their Rainbowduino LED control platform with a design contest. The Rainbowduino can control any LEDs, but it seems to be designed for the 8×8 LED matrix blocks in the picture. The best projects win hardware and Seeed Studio store credit.

Thanks Eric!

Bus Pirate Spanish, Italian translations


Project contributor pastus submitted Bus Pirate translations in Spanish and Italian. You can download the localized builds for most hardware versions from the project SVN nightly compiles folder. If you don’t see a build for your language and hardware combination, please request it in the comments.

Most of the Bus Pirate interface text is defined in a single translation file. If you’d like to prepare a translation, or request a specific language, check out the translation/localization thread.

VA7DB's web server on a business card build


This is VA7DB’s homemade build of the web server on a business card project Ian posted at Hack a Day. A PIC microcontroller handles incoming connections and serves files from a microSD card. An ENC28J60 ethernet MAC/PHY provides the network interface.

There’s a live site, but you’ll have to find the link yourself, we don’t want to overload it. Read more about this build, and check out our unofficial web server on a business card forum.

Bus Pirate: I2C updates in firmware v2.1


See the latest version in the documentation wiki.

The I2C mode in Bus Pirate firmware prior to v2.1 has a major deficiency, an upgrade to v2.1-RC2 or later is highly recommended.

The Bus Pirate I2C library underwent major changes between v2.0 and v2.1. We added a hardware I2C mode, and squashed a huge bug in the way the Bus Pirate reads from devices and scans for addresses on the I2C bus. This guide details the updated I2C library.

Continue reading “Bus Pirate: I2C updates in firmware v2.1”

$49 FPGA development board


Field programmable gate arrays often separate the professionals from the hobbyists. Development tools are expensive, and the chips are usually in high pin-count BGA surface mount packages.

Totti turned us on to a $49 Spartan-3A FPGA development kit from AVNET. It’s got a large Xilinx Spartan FPGA, two types of flash memory, and four capacitive touch switches. Like all FPGAs, the Spartan is programmed over a JTAG interface, however, this dev kit comes with a Cypress Programmable System-on-Chip (PSoC) that acts as an on-board USB JTAG programmer.

AVNET has schematics, source code, and an active development community. This could be a great way to get started with FPGAs without buying a lot of tools.

Thanks Totti!

Free PCB Sunday: Bus Pirate 2a & 2go


We go through a lot of prototype PCBs, and end up with lots of extras that we never use. Every Sunday we give away a few professionally-made PCBs from one of our past or future projects, or a related prototype.

This week we’re giving away one Bus Pirate v2a PCB (left) and one Bus Pirate v2go PCB (right).  The Bus Pirate v2a was really handy for developing the Bus Pirate v2 series, but the Bus Pirate v2go is really the final revision of the v2 design.

This week we’re giving away one of each v2 PCB, PCBs made by Seeed Studio. Request your free PCB in the comments, the first request can specify v2a or v2go. Be sure to use a real e-mail in the address field so we can contact you for shipping info. Some rules after the break.

Continue reading “Free PCB Sunday: Bus Pirate 2a & 2go”

Sure Electronics PICkit2 clone teardown


Today we have teardown photos of a Sure Electronics PICkit2 clone PIC programmer, the type commonly sold on eBay. Scopria, who took these pictures, reports that his programmer stopped working after a few months.  He recommends a real Microchip PICkit2 because it’s only a couple dollars more.

Teardown photos and a look at the circuit board after the break.

Continue reading “Sure Electronics PICkit2 clone teardown”

Microchip PICkit2 teardown


PICkit2 is a programmer for Microchip PIC microcontrollers. It has limited debugging features and a low-speed serial protocol analyzer. It’s really useful for low-volume production programming because it can store firmware and program circuits while not attached to a PC. Buy it at Mouser for about $40, Digi-Key has the new PICkit3 for about $70.

We’ve been discussing programmers for the PIC24F- in the web server on a business card forum, so Scorpia sent us these teardown pictures. More photos and a quick look at the components after the break.

Continue reading “Microchip PICkit2 teardown”

Bus Pirate firmware v2.1-RC2


We just uploaded Bus Pirate firmware v2.1 release candidate 2 for all hardware versions, including the first release for Bus Pirate v3.

Since v2.1-RC1, we’ve combined the hardware and software I2C libraries. This applies the RC1 ACK/NACK management system to the hardware library without duplicating a bunch of code. Some have reported success using the updated hardware I2C library on revision 3 hardware. We’ll post a complete overview of the new I2C library in a few days.

Bus Pirate v3 PCBs pass testing


Sign up to be notified of v3 preorders here. We plan to sell the Bus Pirate v3 for $30, shipped worldwide. Preorder discussion.

This picture from our workbench shows the new Bus Pirate v3 (left) and the Bus Pirate v2go (right). The Bus Pirate V3 PCB arrived yesterday. We stuffed it last night, and it passed the self-test without incident.

V3 makes several improvements over the v2go design:

  • Uses more common SSOP size PIC 24FJ64GA002 microcontroller.
  • Bigger power supply traces and vias, better ground plane.
  • Optimized component placement.
  • Slightly smaller than v2go.
  • Corrected programming header to work with PICKIT.
  • USB LED aligned with other indicator LEDs.
  • Removed unnecessary resistor R18.
  • Centered USB connector.
  • Rotated IC3 for better clearance around I/O header.
  • Swapped +3.3V and ADC on I/O header for better pinout.
  • Colored PCB makes it easier to see the circuit.

There’s another detailed close-up picture after the break.

Continue reading “Bus Pirate v3 PCBs pass testing”

Bus Pirate: Wii Nunchuck quick guide


See the latest version in the documentation wiki.

Scorpia shared his experience interfacing a Wii Nunchuck with the Bus Pirate I2C library. He used Seeed Studio’s breakout board that brings all the Nunchuck signals to an easy-to-tap header. Here’s some alternatives to the breakout board.

Bus Pirate Wii Nunchuck breakout
+3.3volts +

Connect the Bus Pirate to the Wii Nunchuck breakout board as shown in the table. The nunchuck is powered from the Bus Pirate’s on-board 3.3volt regulator. The nunchuck has very small value internal pull-up resistors on the I2C bus pins, so the Bus Pirate on-board pull-up resistors aren’t needed.

Open the mode menu (m) in the Bus Pirate terminal and select the software I2C library (4). Enable the Bus Pirate’s power supplies (big ‘W’).

I2C>[0xa4 0x40 0x00]<<<Wii Nunchuck initialize
WRITE: 0xA4 GOT ACK: YES<<<write address
WRITE: 0x40 GOT ACK: YES<<<write location (?)
WRITE: 0x00 GOT ACK: YES<<<write 0 to location 0x40 (?)

Initialize the nunchuck, this only has to be done once. See also this example Arduino code.

I2C>[0xa4 0x00]<<<setup the read pointer
WRITE: 0xA4 GOT ACK: YES<<<write address
WRITE: 0x00 GOT ACK: YES<<<pointer to 0
I2C>[0xa5 r:6]<<<read nunchuck measurements
WRITE: 0xA5 GOT ACK: YES<<<read address
BULK READ 0x06 BYTES:<<read back 6 bytes
0x78 ACK 0x7A ACK 0x2F ACK 0x7D ACK 0x6E ACK 0x17 NACK

Reading data from the nunchuck takes two steps. First, set the read pointer. Next, read six values to get the measurements, decoding guide here.
Continue reading “Bus Pirate: Wii Nunchuck quick guide”

Bus Pirate: Firmware v2.1-RC1


Bus Pirate firmware v2.1 release candidate 1 can be downloaded from the Bus Pirate project page. Learn how to update your firmware from Windows or Linux/OSX.


  • Experimental hardware I2C library for PICs that support it.
  • PIC chip revision detection.
  • New public domain I2C library, fixes bugs with read ACK/NACKs. I2C no longer GPL. More on the new I2C features tomorrow.
  • Universal bitbang abstraction saves a ton of space for new features, adds speed option to I2C, raw2/3wire, LCD.
  • Removed JTAG XSVF programmer, we ran out of space. It’s big, ugly, and I don’t think anyone uses it. It will be replaced with a real SVF programmer in an upcoming build.
  • Raw2wire macro cleanup.
  • Spelling, other translation fixes.
  • More

The point of I2C NACKs


The logic analyzer output above (top continues on the bottom) shows the Bus Pirate I2C address scan function. The Bus Pirate sends a DS1307 I2C read address. After the DS1307 ACKnowledges the address (bit 9), it immediately starts sending data to the Bus Pirate and ignores the I2C STOP sequence sent by the address scanner. This caused extra I2C addresses to appear at random.

This is the purpose of the I2C NACK bit that concludes a transfer from the slave IC to the master device. If the master ACKs the last byte and then attempts a STOP condition, the slave might put a 0 on the data line that blocks the STOP condition. If the master NACKs the last byte then the slave IC gives up and everybody exits cleanly.

Read more about this issue here, updates will be in the nightly compiles in a few days.

Free PCB Sunday: Web server v2 prototype


We go through a lot of prototype PCBs, and end up with lots of extras that we never use. Every Sunday we give away a few professionally-made PCBs from one of our past or future projects, or a related prototype.

This is version 2 of the web server on a business card Ian posted at Hack a Day. It follows the original design, but it adds a Nokia color LCD knock-off to the back of the PCB. The LCD is driven by extra pins on the microcotnroller, otherwise all other pin connections are the same as version 1. This PCB works with same fimware as version 1.

This week we’re giving away one blank PCB for the v2 prototype, PCB by BatchPCB. We’ve only got two boards, and one is already assembled. This design has an issue or two. The blue wire on the left connects a few power pins that are  unrouted, the PCB won’t work without this jumper. Also, the SD card holder may not be available anywhere.

This is a buggy, two-of-a-kind prototype, so we ask that the winner have some SMD soldering or other project experience. Request the free PCB in the comments, but please post a link to a web site or picture that shows a project you’ve done. Be sure to use a real e-mail in the address field so we can contact you for shipping info. Some rules after the break.

Continue reading “Free PCB Sunday: Web server v2 prototype”

Bus Pirate: Chip demonstrations


Here’s a comprehensive list of Bus Pirate chip demonstrations. It includes Ian’s old demonstrations from Hack a Day, and the most recent demos from Dangerous Prototypes. Tutorials are arranged by Bus Pirate hardware version.

Bus Pirate v2&v3

Bus Pirate v1a

Bus Pirate v0a