Bus Pirate Oscilloscope!

November 02, 2012

I purchased a Bus Pirate from Sparkfun without really understanding what it could do. It’s been a few months now and in the meantime I have been playing with a fairly large cross section of electronics projects.

The first project thing I tried to do with the Bus Pirate (as a test of it’s command line interface) was reading and writing to an I2C memory chip. It worked! Too bad writing large amounts of data to the thing is easier done using other methods.

The second thing I did with the Bus Pirate was use it as a low speed logic analyzer to figure out the required delay timings of the MicroChip xc8 compiler’s built in software UART functions for the PIC12F683. I still need to post that code… maybe tomorrow.

The third thing I did with the Bus Pirate (actually, what I’m doing now) is use the thing as a really REALLY slow oscilloscope. The Arduino can be used as a basic, multiline oscilloscope as well but the projects I found using Processing as the UI seemed pretty fail in terms of control. Also, not having any clear timing specs is going to be an issue with the projects I’m trying to use this thing with.

The Bus Pirate is easy to set up. Upgrading the firmware is easy. Getting it to work as a logic analyzer is pretty straight forward too (using the OpenBench LogicSniffer Client and these notes).

But the oscilloscope functionality needs to be a bit more seamless. The trick seems to be putting the Python script in the pyBusPirateLite directory from this github repo before doing anything else. Then, chmod x the script, change the serial port in the script to match yours and run the script. You’ll get errors unless you have some libraries installed. You will need to install pyserial , and you’ll need pygame from this link. Notice the Lion installer isn’t at the top of the osx list… p. Finally, depending on where you got your Bus Pirate’s cable, you will probably need to know which color equates to which line on the Bus Pirate’s port. This page has the Sparkfun connector at the bottom of the page. The oscope python script uses the ADC pin, which, on the Sparkfun cable, is purple. p. NOW I can get down to building that analog synth! p. Well… not really. The Bus Pirate’s oscope script works, but it’s pretty crappy for doing real work compared to a real scope. Sure, you can get voltage readings, and sure, it’s accurate, but there are plenty of glitches that get in the way of actually using the thing. Honestly, I think the Arduino Processing scopes are better. Too bad I haven’t found a really good one yet…

Hell, I bet a bitbang’d FTDI adaptor and a midrange PIC would be able to get much faster speeds and be much more sane then the Bus Pirate. Hell, even a soundcard scope hack would be okay…

Now where did I put my HP desktop analog scope…


James Hagerman

Written by James Hagerman

© 2026