Self-test in binary mode

perl-st

See the latest version in the documentation wiki.

Since v2 the Bus Pirate firmware has included a self-test that verifies the function of pins and peripherals. The latest v2.6-nightly build adds a self-test to the binary bitbang mode. This is a useful way for applications to test the Bus Pirate, and for manufacturing quality control.

Self-test details after the break. Don’t forget that we’re giving Bus Pirate probe cables to script authors.

Continue reading “Self-test in binary mode”

Python Bus Pirate binmode library

bppy

Audiohacked developed pyBusPirateLite, a Python interface to the new Bus Pirate binmode. It includes libraries that manage each mode (bitbang, SPI, I2C), and an example SPI EEPROM reader built on the libraries. Download a copy from our example scripts folder, or get the latest code at Audiohacked’s git repository. You’ll also need pySerial if you don’t have it.

Don’t forget that we want your scripts too! We’re giving away two Bus Pirate probe kits to binmode script authors. Here’s all the binmode documentation so far.

Thanks for the tip!

Free probe cables for your binmode scripts

iancable1

We want your scripts!

The Bus Pirate has three new binary access modes that can be scripted from a PC: I2C, SPI, and bitbang. There’s already some basic Perl demos in the example scrips folder. If you script something for any of the new modes, in any language, we’d like to host it with the other examples.

We’ll send Bus Pirate probe cable kits to two authors of binmode scripts posted by the end of next week (October 24th, 2009). Any language is fine, but something widely available and cross-platform is best.

Bus Pirate: Binary I2C mode

binic2

See the latest version in the documentation wiki.

The Bus Pirate’s new binary modes provide a consistent, logical way to script actions from Python, Perl, etc. We already introduced the new binary bitbang and SPI modes, today we’ll document the binary I2C mode. Binary I2C will be in the v2.6 firmware release, for now you can grab the v2.6 nightly compile.

We want your scripts! If you script something for any of the new modes, in any language, we’d like to host it in the example scripts folder. We’ll send Bus Pirate probe cable kits to two authors of Bus Pirate binary mode scripts posted by the end of next week (October 24th, 2009).

Binary I2C mode specification follows after the break.

Continue reading “Bus Pirate: Binary I2C mode”

Bus Pirate firmware v2.5

2.5

Firmware v2.5 is a minor fix release. We cleaned up two small bugs in the binary SPI library, and removed an update to the smartcard library to make it more flexible. This should be the last rapid release to correct minor bugs –   sorry about that, we want a final release firmware with fully working binmode features to develop against.

Our Perl script to dump SPI EEPROMs is in the project SVN, look for a full tutorial in the next few days. We created a scripts folder for any Bus Pirate related software. We’d love to host a copy of your scripts, no matter how simple.

The next firmware release will probably include binary UART and binary I2C access modes.

Bus Pirate probe cable, $7.75

iancable1

Seeed Studio is now listing a Bus Pirate compatible probe cable kit for $4.90. That’s about $7.75 including worldwide shipping. This cable has been a pretty popular item, we’re really glad Seeed is making them available for everyone.

iancable3

The cable is a kit that you solder yourself. It includes a 2×5 connector that mates with the Bus Pirate, rainbow ribbon cable, and 10 hook type probes.

You can still preorder an assembled Bus Pirate v3 with a red PCB for $30 at Seeed Studio, including worldwide shipping.

Continue reading “Bus Pirate probe cable, $7.75”

Bus Pirate binmode Perl test script

binmode

Here’s a Perl script that demonstrates the new Bus Pirate binary bitbang mode. You’ll need Perl with Win32::SerialPort or Device::SerialPort, and a Bus Pirate with firmware v2.4 or later. Edit the script to use the correct serial port number and device.

We chose Perl because we had never used it before, and we weren’t in the mood for a strongly typed language like Python. Perl’s serial port situation isn’t as clean or universal as Python’s pySerial. Since the Bus Pirate already uses a Python firmware updater, using Python for binmode scripts seems preferable. Hopefully we’ll have some Python examples soon, but if you come up with something first, please share it in the forum.

Bus Pirate preorder update

bpv3-tweaks.450

The Bus Pirate v3 preorder has been a great success. Seeed moved to a second preorder because we, once again, exhausted the supply of critical chips available for the Bus Pirate. So much for advanced planning!

If you got in on preorder 1, your Bus Pirate is being manufactured at this very moment. It should ship soon with the latest v2.4 firmware and bootloader installed. If you’re participating in preorder 2, we’re trying to reduce the wait time as much as possible; we’ll gauge interest early next week and order chips ASAP.

You can still preorder an assembled Bus Pirate v3 with a red PCB for $30 at Seeed Studio, including worldwide shipping.

Look for new Bus Pirate demos and tutorials all next week. We’ll also give away some Bus Pirate goodies we have around the lab. Thank you for your support!

Continue reading “Bus Pirate preorder update”

Bus Pirate firmware v2.4

HiZ>i
Bus Pirate v2go
http://dangerousprototypes.com
Firmware v2.4
DEVID:0x0447 REVID:0x3042 (B4)
HiZ>

Download Bus Pirate firmware v2.4. This should fix the ‘dead terminal syndrome’ experienced by some users with the v2.3 firmware. It includes all fixes from v2.3.

It looks like some garbage 0x00 bytes were triggering the new binary IO modes accidentally. The binary modes have been updated to require a longer trigger sequence (20 times 0x00).

Bus Pirate probe cable

cable1

Seeed Studio may put together a Bus Pirate probe cable kit. We’re not involved in this sale, but we encouraged Seeed to offer it as an inexpensive accessory for the Bus Pirate. We get a lot of questions about this cable, this might be your chance to get one.

We suggested that Seeed use the round barrel clips, rather then the flat tweezers. The tweezers probes on this test cable didn’t last very long, though we really abuse our tools.

Don’t forget that it’s time to vote in Seeed’s Rainbowduino contest.

Bus Pirate firmware v2.3 problems

fm-24

There have been several problems reported with the recent Bus Pirate v2.3 firmware release. We believe it’s a problem with some terminals sending NULL characters (0x00) to the Bus Pirate, which causes it to enter the new binary IO mode.

This 2.4-nightly for v2go tries to fix that problem by looking for 20 NULL characters before entering binary IO mode. Other than this change, it’s exactly the same as the v2.2 firmware. Hopefully this will help us get a handle on the extent of the problem.

Some tips:

  • You must erase the chip before programming new firmware. Press the green ‘X’ button on the Windows updater before pressing the write device button.
  • Check your verify errors to make sure none are outside the range of 0x400 and 0xc00.
  • See the Windows and Python update guides for the complete firmware upgrade procedure.

Bus Pirate: Binary bitbang mode

rawspi

See the latest version in the documentation wiki.

There’s two new binary I/O libraries in the v2.3 Bus Pirate firmware. Raw bitbang mode provides direct control over the Bus Pirate pins and hardware using a simple single-byte protocol. We discussed the new raw SPI mode yesterday.

Hopefully the raw access modes inspire some interesting new Bus Pirate tools using PC software. There’s already a patch for AVRDude AVR programmer in the works.

Full documentation of the raw bitbang binary I/O mode after the break.

Continue reading “Bus Pirate: Binary bitbang mode”

Bus Pirate firmware v2.3

bpf23

Bus Pirate firmware v2.3 is available for download. This version fixes a major bug with the speed settings in all modes, but especially in the UART library.

There’s also two new binary IO modes for controlling the Bus Pirate from a PC, which should allow a number of complicated programmer functions that couldn’t fit in the firmware. The first new mode is a raw bitbang IO mode, similar to the bitbang mode of an FTDI232 chip. The second mode is a raw SPI mode written for high-speed communications with AVRDude.

Continue reading “Bus Pirate firmware v2.3”

Bus Pirate: Raw SPI mode

rawspi

See the latest version in the documentation wiki.

Raw SPI is a new mode that provides high-speed access to the Bus Pirate SPI hardware. It was developed in conjunction with Michal Ludvig, so that AVRDude can use the  Bus Pirate to program AVR microcontrollers and EEPROMs.

Firmware v2.3 includes two new raw I/O modes that give computer software and scripts direct access to the Bus Pirate hardware. Hopefully this opens the door to a whole new class of Bus Pirate applications, like chip programmers. In this post we describe the raw SPI access mode. We’ll describe the raw bitbang mode in a few days. The protocol is documented below the break.

Continue reading “Bus Pirate: Raw SPI mode”

AVRDude patch: Program AVRs with the Bus Pirate

bpv3-atmel

UPDATE: Bus Pirate support is now included in the current AVRDude SVN version.

Michal Ludvig submitted a patch that gives AVRDude support for programming ATMEL AVRs and serial EEPROMs using the Bus Pirate. AVRDude parses ASCII terminal output at the moment, but we’re working on a raw SPI mode for better speed and performance. More in the forum.

The picture shows the Bus Pirate v3 with a Protostack ATMEL AT8 development board.

Bus Pirate: Major UART fix

uart-sl

There was a major bug in the speed setting code for all libraries. At some point the speed variable was reduced to a single bit, so only the first two speed settings in any library worked correctly. This had an especially noticeable impact on the UART library.

Since this is a major issue, we’ve made a v2.3 preview release for all hardware. This is a recommended upgrade for anyone with speed setting problems. V2.3 will be released soon.

Other major changes in v2.3 include a transparent UART bridge for a simple serial->USB mode. There’s two new raw IO modes for bitbanging and SPI. The bitbang mode uses a simple 8bit/byte protocol to control the Bus Pirate pins and functions directly from a PC program. The SPI mode provides a fast, raw SPI connection for integrating the Bus Pirate with AVR ISP programming software. These features will be documented in posts over the next few days.

Last Bus Pirates in preorder 1

bpv3-top.450

The Bus Pirate hardware v3 preorder has been a huge success. Thank you for your support!

The BPv3 rollout has been pretty low-key. We haven’t posted the Instructables version, and the new design hasn’t been linked by any blogs. Only readers and forum members know about the new hardware, but we’ve almost run out of chips anyway.

Changing to the SSOP-sized PIC helped alleviate some supply problems, but we’re still reaching the end of 24FJ64GA002-i/ss chips available for immediate local delivery in Shenzhen.

There’s about 50 Bus Pirate v3 left in the current preorder, after that we’ll move onto a second preorder with a later delivery date. The delay shouldn’t be as bad as the Hack a Day preorder, but unfortunately it seems unavoidable with popular items.

Thank you for supporting this open source project.