Bus Pirate as a logic analyzer

Many months now I wanted to test the logic analyzer feature of the bus pirate, which is documented here.

In order to do so, I created a simple circuit with couple of components I had lying around. Specifically, I decided to make a square wave frequency generator using a HCF4060BE binary counter, so that the output of the logic analyzer would be quite clear. The circuit is the following:

4060 as a frequency generator schematic
4060 as a frequency generator schematic

And here is the messy breadboard version:

Breadboard version of 4060 as a frequency generator
Breadboard version of 4060 as a frequency generator

Connections between the bus pirate and the 4060:

Probe channelBus pirate pinHCF4060 pinFrequency
chan0CSQ8 (pin 14)74.583KHz
chan1MISOQ7 (pin 6)148.655KHz
chan2CLKQ6 (pin 4)297.311KHz
chan3MOSIQ5 (pin 5)594.185KHz
chan4AUXQ4 (pin 7)1.188MHz

Make sure that your Bus Pirate firmware is v3.0 or later. With the bus pirate you can have up to 5 channels. Yeah, I used ’em all in this example.

I used a 4MHz crystal in the above circuit, thus the “weird” frequencies you see in the table. With a 2.4576 MHz one, you will get more common baudrates.

After you set up the connections and power up, launch the Open Bench LogicSniffer software and press “Capture” to start capturing samples from your bus pirate.

Logic analyzer output:

LogicSniffer channels output
LogicSniffer channels output

Channel information using the “Measurement mode” (under Tools menu):

LogicSniffer Channel 0 information
Channel 0 information
LogicSniffer Channel 1 information
Channel 1 information
LogicSniffer Channel 2 information
Channel 2 information
LogicSniffer Channel 3 information
Channel 3 information
LogicSniffer Channel 4 information
Channel 4 information

You can clearly see that the frequency is doubled in each channel, starting with the lowest in channel 0, where they are also verified from the Measurement tab.

Leave a Reply

Your email address will not be published. Required fields are marked *