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
Cheap character LCDs based on the HD44780 chipset come in a variety of sizes: 2×16, 4×20, etc. These displays have two standard interface modes, 4bit and 8bit parallel. 8bit requires a total of 11 data lines, 4bit requires 7 (6 for write-only). Some LCDs support an additional serial data mode, like the VFD Ian covered at Hack a Day.
HD44780 LCDs are generally 5volt parts with a separate supply for the back light. The Bus Pirate only has five 5volt tolerant I/O pins, so we made a small adapter board with enough pins to control the LCD. The Bus Pirate controls the adapter board through its LCD interface library.
Continue reading about the Bus Pirate HD44780 character LCD adapter board and interface library after the break. We can have PCBs, kits, or assembled kits produced by Seeed Studio for about $15, including worldwide shipping, more here. Continue reading “Bus Pirate: HD44780 character LCD adapter”
Brettinman got a Bus Pirate from Hack a Day’s preorder, but he couldn’t get it working with the default MAC serial terminal. He used ZTerm and documented how to use the Bus Pirate with a MAC.
Don’t forget that you can also do firmware updates from a MAC or Linux. Read our guide to the Python firmware quick programmer.
The original web server on a business card Ian posted at Hack a Day was a homemade single-sided PCB with a few jumper wires. A version 2 was designed on a professional PCB, which opened up a lot of possibilities for new features. We added a 128×128 color Nokia knock-off LCD to make a network-connected photo frame.
The blue wire on the left connects some power pins we forgot to route. The unrouted wire was directly over the connecting wire, which made Eagle Cad’s unrouted indicator invisible. Now we use the zoom-unrouted.ulp script to check for unrouted wires before submitting Gerbers to the board house.
This design remains unpublished because the parts are hard to find. SparkFun stopped carrying the microSD card holder, and a new batch of LCDs didn’t work the same as the old models. The giant DPack 3.3volt regulator (LD117) next to the power jack at the back of the board was also a really expensive, somewhat rare part. We have one extra PCB that we’ll give away on a future free PCB Sunday.
Early Bus Pirate prototypes used PIC24FJ64GA002 revision A3 chips. A3 has a bug in the I2C hardware, so we’ve always used a software library to provide I2C on the Bus Pirate. Many, but not all, of the Bus Pirates manufactured by Seeed Studio have a newer, revision B4 chip with working I2C hardware. We showed how to check your PIC revision last week.
Project contributors (thanks JoseJX!) with revision B4 silicon were able to get the hardware I2C module working. We’ve included this update in the latest nightly firmware. You can follow our guide to firmware updates on Windows or Linux/OSX.
Read more about hardware I2C on the Bus Pirate after the break.
Continue reading “Bus Pirate: Hardware I2C added”
We go through a lot of prototype PCBs, and end up with lots of extras that we’ll 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 a USB controlled RGB color changing light. Ian did this project at DIY Life, a Weblogs, Inc. site that shut down about a year ago. Someone made some minor modifications to the design and had a bunch of boards produced, we ended up with a pile of the extras. This PCB is as-of-yet untested, you can discuss it in the forum.
We’re giving away two PCBs this week, just ask for one in the comments. 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: USB RGB color changer”
Here’s a roundup of our current Bus Pirate related posts.
Install and setup your Bus Pirate with our introductory Bus Pirate 101 guide. We’ve also updated the Bus Pirate menu, protocol, and syntax manual to match the latest hardware and firmware.
The most common issue for beginners is usually the Bus Pirate’s on-board pull-up resistors, there’s also more help in the unofficial Bus Pirate forum.
We have new 1-Wire, I2C, and SPI EEPROM demonstrations that use the latest Bus Pirate firmware and hardware. Try all three EEPROMs with our 3EEPROM explorer board. We include full logs of the terminal output so you don’t miss anything.
Use our firmware update guide to install the latest firmware (currently v2.0), don’t forget that most PICs can load the firmware much faster than the default setting. Linux, OSX, and Windows users can try the new Python firmware update script.
Not sure your Bus Pirate is working? Firmware v2.0+ includes a self-test that verifies most Bus Pirate functions.
Curious about the PIC chip revision on your Bus Pirate? The latest nightly firmware prints the device and version information in the terminal.
If you want to get your hands on a Bus Pirate, we’re nearly done with the Bus Pirate v3. V3 uses the SSOP version of the PIC24FJ64GA002, which will help avoid the shortage problems experienced at Hack a Day. You can also get a free Bus Pirate v2a PCB from us.
This guide explains the Bus Pirate I/O pins, describes each menu available from the Bus Pirate terminal, and documents the syntax functions for each protocol library.
The Bus Pirate I/O pins try to be consistent across all libraries, the same pins are used for similar functions. Unused pins are usually in a safe high-impedance state. Modes not shown in the above diagram are similar to other libraries: MIDI=UART; raw2wire=HD44780=PC keyboard=I2C; raw3wire=SPI.
Master-out slave-in (MOSI) is the primary data pin, it’s used for bi-directional data transfer in protocols like I2C and 1-Wire, and as data-out from the Bus Pirate in uni-directional protocols like SPI and asynchronous serial (UART).
Clock is always a clock-out signal from the Bus Pirate, except in the PC keyboard library where the keyboard provides a clock signal to the Bus Pirate.
Master-in slave-out (MISO) is used with protocols that have a dedicated data-input, such as SPI and UART.
Chip select (CS) is an output used to activate the serial interface in SPI-like protocols. Use the auxiliary pin config menu (c) to get manual control of the CS pin through the auxiliary pin commands (a, A, @).
The auxiliary pin (AUX) can be used as an output or input from the Bus Pirate terminal interface with the A, a, and @ commands. It’s useful for protocols that require an additional signal, such as a reset.
A detailed explanation of each Bus Pirate mode follows the break.
Continue reading “Bus Pirate: Menu, protocol, and syntax guide”
See the latest version in the documentation wiki.
The latest Bus Pirate v2go nightly firmware build reports the device ID, revision, and configuration bits in the terminal.
Hack a Day Bus Pirate v2go
DEVID:0x0447 <<< PIC 24F64GA002
REVID:0x3042 (B4) <<<0x3042 = Revision 4
CFG1:0xF9DF <<< config word one
CFG2:0x3F7F <<<config word two
Use the information menu (i) to report the settings. PIC revisions: A3/A4=0x3003, B4=0x3042, B5=0x3043.
STOP!!! You probably need the v2 to v4 upgrade guide instead!!!
See the latest version in the documentation wiki.
Bus Pirate firmware updates can be done from Linux or OSX using the Python PIC24F programmer developed by broeggle and JoseJX. The programmer works on all operating systems that support Python and pySerial: Linux, OSX, and Windows, too. Thanks for a great script!
Our step-by-step guide to the Python PIC24F programmer continues after the break.
Continue reading “Bus Pirate: Firmware upgrades on Linux, OSX”
***We’ll start a preorder ($30 assembled, shipped worldwide) if there are a few firm commitments, sign up for notification in the forum.***
This rendering shows the nearly-complete Bus Pirate v3 PCB. Our initial preview of the new hardware generated some really good comments.
- We decided to swap the PGC and PGD pins of the ICSP header as suggested by numerous readers. The pins will now align with a PICKIT2 programmer.
- The power traces and vias have been expanded to handle the maximum possible loads.
- SSOP PIC, eliminated a few parts, centered USB jack, rotated CD4066 IC to accommodate a shrouded or right angle pin header.
- The PGC/PGD swap means this hardware will require a new bootloader and firmware. For this reason we’re going to increment the hardware to v3 instead of v2.5.
- Added power-on self-test to firmware for hardware v3. Future hardware will probably require a jumper between PGD and ground for normal operation.
- We decided against mounting holes. We couldn’t locate a standard separation for the hole pattern, so the holes would only fit one specific case.
- Removed alternate resistor placement pads from bottom of PCB. Back LEDs now use the same resistors as the front side LEDs.
There’s been a lot of progress on a Linux/Python programmer for the Bus Pirate’s PIC 24FJ bootloader. The programmer is based on AN851, AN1157, some existing code, and COM dumps. You can track the development in the forum and in the project SVN.
Continue reading “Bus Pirate: Linux/Pyton programmer for PIC 24FJ”
Seeed Studio tested the bootloader and terminal of each Bus Pirate prior to shipping. This is a good test, but Seeed requested that we design a more thorough test program for future orders.
We implemented a self-test menu option in firmware version 2 that tests most of the hardware and functions on the Bus Pirate PCB. It’s still a slow way to test 1000 units, so we came up with a power-on self-test for v3 hardware that can be semi-automated.
The manufacturer’s power-on self-test (POST) is activated by connecting the inner programming pin (which will be PGD on v3 hardware) to +3.3volts (the power pin). This creates a PGD/PGC mismatch that exits the bootloader, and then the main firmware runs the POST if the pin is high.
The POST is a silent version of the self-test available from the Bus Pirate terminal (menu ‘~’). If the test is successful, the MODE LED lights. This could be confused with the v2 ‘bootloader ready LED’, but you can see the VREG LED blink during POST. When the test is complete, any data sent to the Bus Pirate over the USB connection is echoed back, which tests the FTDI chip and the PIC UART. If there were errors, the number of errors is added to the value returned. The easiest test is to enter ASCII 0 and the number of errors will be returned.
The POST is a little dangerous because there’s a chance of accidentally entering the POST mode and harming an attached circuit. v3 will probably ship with a jumper between the inner programming pin and ground, just to guard against accidental POSTs. The v3 article will include a table of ICSP jumper settings with corresponding modes, like ‘normal’, ‘bootloader’, and ‘POST’.
We go through a lot of prototype PCBs, and end up with lots of extras that we’ll never use. This week we’re going to start a regular, weekly PCB giveaway. Every Sunday we’re going to give away a few professionally-made PCBs from one of our past or future projects, or a related prototype.
This week we’ll send a Bus Pirate v2a PCB to two readers, PCB by Seeed Studio. 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. The nicest feature of v2a is the power switch, which allows developers to reset the Bus Pirate without messing with the USB cable. If you don’t get a free one, Seeed Studio still has some v2a PCBs for sale.
Request your PCB in the comments, be sure to use a real e-mail address so we can contact you for shipping info. Some rules after the break.
Continue reading “Free prototype PCB Sunday”
Get help with your Bus Pirate in our unofficial Bus Pirate forum. There’s ongoing development of a Python quick programmer for Linux. We’re also tracking Bus Pirate defects, and working on future hardware. Join the discussion.
The Bus Pirate V2a and V2go weren’t the only design candidates for the Bus Pirate v2 series. Here’s a rendering of the Bus Pirate ‘v1.5’, a design that never saw the light of day. This Bus Pirate was meant to be completely portable. It has an LCD to display the terminal, and a keyboard jack to work with a roll-up rubber keyboard.
Here’s some of the differences between this version and the final v2 series.
- This design didn’t include software controlled pull-up resistors. It uses the jumper concept from v1a with SMD resistors.
- V1.5 included a Nokia LCD knock off, like the one SparkFun sells for $15. The LCD backlight needs 7volts, so the large SOT223 regulator behind the power supply is a LM317 set to 7volts. The LM317 also supplies the other regulators with 7volts, which is better than the 5V supply to 5volt regulators on the v2a and v2go.
- The six hole pattern seen on both sides of the PCB is for the PC keyboard connector. PC keyboards operate at 5volts, so this feature took two of only seven 5volt tolerant pins on the PIC24FJ64.
When we decided to manufacture the Bus Pirate, this design was too complicated and expensive. The code to run the LCD terminal and read the keyboard was big and made it hard to add new protocols. The knock-off Nokia LCDs are really inconsistent too, even different batches from SparkFun require different drivers. We minimized the design first to the v2a, then to the v2go.
In the end, we’re really pleased with the v2go. In retrospect, however, there were a few changes that would have make the whole process smoother. These have been integrated into the updated Bus Pirate v3, which is an even cleaner design that should be easier to manufacture in quantity.
This is an old version, see the latest version on the documentation wiki.
Now you’ve got one of Hack a Day’s Bus Pirates, what do you do with it? Learn about 1-wire, I2C, and SPI EEPROMs with the 3EEPROM explorer board (we pronounce it THREE-PROM, emphasis on the EE).
EEPROM is a type of memory chip that stores data without a continuous power supply. It’s useful for permanent data storage in small logger circuits, or holding custom pages in a mini web server. EEPROMs come in lots of sizes and protocols.
The 3EEPROM has three common EEPROM chips: the DS2431 (1-Wire), 24AA- (I2C), and 25AA- (SPI). All three were previously demonstrated on Hack a Day, but each demo uses a different version of the Bus Pirate hardware and firmware, its difficult for a beginner to follow using a Bus Pirate v2go.
Continue reading for an updated, step by step guide to using the DS2431, 24AA-, and 25AA- EEPROMs with the Bus Pirate v2go. We’ve also got the full session logs as text files so you won’t miss a single detail.
We can have 3EEPROM explorer board PCBs or kits produced at Seeed Studio. PCBs are about $10, kits are about $15, shipped worldwide. We need to organize a group purchase of 10 PCBs or 20 kits to get started. If you’re interested in a Bus Pirate, version 3 is coming.
Continue reading “Prototype: Bus Pirate 3EEPROM explorer board”
UPDATE II: PCB stuffed and tested.
UPDATE I:***We’ll start a preorder ($30 assembled, shipped worldwide) if there are a few firm commitments, sign to be notified and check the forum.***
The next version of the Bus Pirate universal serial interface is about a week away from prototyping. Why a new version so soon, when Hack a Day’s second preorder won’t ship for another 20 days?
The chip availability problem has a lot to do with it. We modified the v2go board to use the SSOP version of the PIC24FJ64GA002, which seems to be more widely available.
We normally work with SOIC chips whenever possible. It’s an easy surface mount size for the timid solderer, and it’s an easy size to prototype on homemade PCBs. The SSOP PIC makes sense here, though, because FTDI only makes the 232RL USB chip used on the Bus Pirate in SSOP and QFN packages, we’re using professional PCBs, and the vast majority of these are being made in a factory.
Changes to Bus Pirate V3:
- Changed to SSOP PIC24FJ64GA002-I/SS
- Removed unnecessary pull-down resistor R18. Verified in datasheet that VR3 & VR4 are off when enable pin is open.
- Moved and rotated the CD4066 (IC3) for cleaner routing and (maybe) sufficient clearance to fit a shrouded header.
- Thicker power traces, bigger power vias.
- PCB is thinner and slightly longer, USB jack centered, R19 aligned with other resistors.
- Moved USB LED to top.
- Switched ADC and 3.3V pins.
- Will be programmed with V2+ firmware. Includes a power-on self-test mode triggered by starting with the PGC pin jumpered to +3.3volts. Quality control will be faster and more thorough.
- Code name is v3, may end up being versioned to v2.5 if the firmware is 100% compatible with v2go.
Look for the new PCB in the SVN soon.
Make your change requests in the comments.
See the latest version on the documentation wiki.
In the past few days Hack a Day’s Bus Pirate preorders have started to arrive all over the world. Broken units have been extremely rare, there’s only been one manufacturing defect and one broken FTDI chip reported so far. Seeed Studio tested the bootloader and terminal of each Bus Pirate, but problems can always occur in transit.
Firmware v2.0 has a self-test routine that will help determine if your Bus Pirate v2go has a defect. Upgrade to the latest Bus Pirate firmware before attempting the self-test. Bus Pirate v3 will come with a power-on self-test mode.
Detailed self-test instructions and analysis follow the break.
Continue reading “Bus Pirate: Self-test guide”
See the latest version in the documentation wiki.
There’s often some confusion about how the Bus Pirate’s on-board pull-up resistors work. It doesn’t help that the implementation changes drastically from one hardware revision to the next, a lot of the original device tutorials are difficult to follow if you have a Bus Pirate v2go.
The figure outlines the basic parts of the Bus Pirate v2go on-board pull-up resistors. A pull-up (or pull-down) voltage supplied through the Vpullup (Vpu) pin is fed into a CD4066 analog switch (IC3). The 4066 distributes the pull-up voltage to four 10K resistors (R20-23) that connect to the MOSI, CLOCK, MISO, and CS bus pins.
Continue reading our practical guide to the Bus Pirate v2go’s pull-up resistors after the break.
Continue reading “Bus Pirate: Practical guide to pull-up resistors”