See the latest version on the documentation wiki.
This is an updated guide to the Bus Pirate logic analyzer mode, it expands on the initial documentation posted earlier.
Bus Pirate firmware v3.0 introduced a logic analyzer mode that works with the SUMP open source logic analyzer client. The logic analyzer can record 4096 samples at up to 1MHz, each channel has a selectable sample trigger.
***BIG WARNING*** The Bus Pirate will never be a substitute for a ‘proper’ logic analyzer, the hardware isn’t designed for it. The Bus Pirate can’t store a lot of samples, it can’t feed live samples very fast, and speeds are in the kHz range, not MHz.
Despite the limitations of the Bus Pirate hardware, the logic analyzer worked well enough to examine decoded IR remote signals. It’s also well suited to debug environments where you can control the bus speed (and the Bus Pirate may already be connected for other reasons). It should also be able to look at most I2C traffic (400kHz clock).
Documentation below. There’s still time to get a Bus Pirate v3, $30 including worldwide shipping.
Logic analyzer specs
The five major IO pins are included in analyzer output:
SUMP follows a simple protocol. We’ve only implemented the minimum command set: reset, run, ID, speed (divider), samples, and trigger. Other commands are received, but the contents are ignored. Trigger direction, pre-sampling, and other advanced features could be handled with an update.
What you’ll need
Install Java, the rxtx serial port library, and the SUMP client. Jack Gassett at the Gadget Factory has a version compiled from the latest source code. He also has a Windows compile of SUMP for his ButterFly Platform that doesn’t require you to install Java. SUMP has a SourceForge page, but it’s not very active.
Using the logic analyzer
The Bus Pirate understands the SUMP initialization commands, no special configuration is required to put the Bus Pirate into logic analyzer mode. It will also return to user terminal mode automatically.
Open SUMP. Press the rocket button. Configure SUMP as shown here.
Sampling can also be triggered by a change on one or more pins.
Note that sampling is triggered by a change on any of the selected pins. There’s currently no direction configuration. Channel triggers are set with mask bits 4-0, ordered according to the channel table.
Samples are sent to SUMP and displayed.
Improving the logic analyzer
The logic analyzer could be upgraded with a rolling sample buffer that can show activity prior to the trigger.