Hi, I'm just wondering if someone could tell me the main differences between the Open Logic Sniffer and the Bus Pirate? Is it mainly resolution/speed? I'm getting started with speaking to chips with Arduinos and am currently working with SPI, but I want something which can interface with a chip which is already in-place.
Specifically I'm trying to get my Arduino Mega to speak to a Sparkfun buttonpad SPI (http://http://www.sparkfun.com/commerce/product_info.php?products_id=9022), and I'm finding it difficult to do without visibility at the bit level - the Hackaday article (http://http://hackaday.com/2009/03/09/parts-4x4-rgb-button-pad-controller-spi/) on the buttonpad was a big help but I'd like to be able to see what the authors (and the microcontrollers) are seeing.
I'm also interested in MIDI which the Bus Pirate mentions but the Logic Analyzer looks like it might be a more open-ended/powerful tool?
You might read my parts demo of the button pad SPI, it has a funky start error that threw me off. You can find the link under the part demos on the Bus Pirate manual at dangerousprototypes.com.
The Bus Pirate is a prototyping tool. You can sit down with the Bus Pirate, a new chip, and the chip datasheet, and learn how the interface works. You can enter commands into a terminal interface and the Bus Pirate twiddles the pins and displays what comes back. It also has a very low speed logic analyzer that can show what signals are doing on a graph-like display, for example between your Arduino and the button pad. The Bus Pirate 'speaks' a ton of protocols, so you can test out devices in SPI, I2C, 1-wire, UART, MIDI, etc.
The Logic Sniffer is a high-speed logic analyzer that is intended soley for visualizing the signals between devices. The Bus Pirate LA works to about 1 million samples per second, the Open Logic Sniffer can capture 200Msps.
The Bus Pirate is very useful for getting to know an unknown chip without setting up a microcotroller, implementing a protocol library, all the base stuff you have to do before you can even try to read or write a byte from a new device. The goal is to have a simple, known-working protocol implementation. Learn how it works, then try to implement it with your own microcontroller code (or steal the code from the Bus Pirate, it's public domain).
The Logic Sniffer is useful for debugging electronics by seeing what's going on between two devices.
I personally use both for tough situations. I use the Bus Pirate to interface a new device for the first time, and if it gives me troubles I connect a logic analyzer to get a better look at what's going on.
I keep mentioning SUMP, you can check that out at http://www.sump.org/projects/analyzer/client/ (http://www.sump.org/projects/analyzer/client/)
Thank you very much for the reply Ian - that definitely clears things up. One or two things I'm still wondering:
[quote author="ian"]
You might read my parts demo of the button pad SPI, it has a funky start error that threw me off. You can find the link under the part demos on the Bus Pirate manual at dangerousprototypes.com.[/quote]I've seen that tutorial and found it very helpful in figuring out how the board works. Is this the start error you mean:
The protocol is simple enough, but there’s one major catch. The clock line must be high before raising CS, or the bytestream will be off by 1 bit. For this reason, many hardware SPI modules won’t work with the board. This isn’t a problem if your microcontroller lets you twiddle pins that are controlled by a hardware module, but the micros we’ve worked with don’t allow this.
[quote author="ian"]You can enter commands into a terminal interface and the Bus Pirate twiddles the pins and displays what comes back. [/quote]Actually I was confused by the 'twiddling' terminology in the buttonpad SPI article - does this just mean control a pin's output from going between logical 1 and 0?
The Bus Pirate is very useful for getting to know an unknown chip without setting up a microcotroller, implementing a protocol library, all the base stuff you have to do before you can even try to read or write a byte from a new device. The goal is to have a simple, known-working protocol implementation. Learn how it works, then try to implement it with your own microcontroller code (or steal the code from the Bus Pirate, it's public domain).
From this description it sounds like the Bus Pirate is more what I need at the moment :)
The Logic Sniffer is useful for debugging electronics by seeing what's going on between two devices.
Just wondering then, could the Logic Sniffer somehow be used as an audio oscilloscope?
Yes, that's the beast of an error. That whole situation was unpleasant, the datasheet was 100% wrong at the start, and then that major bug which is still there as far as I know. I didn't enjoy interfacing that board.
Twiddling is just my overly-cute way of saying: switch pins high and low in whatever combination and timing is needed for a device.
We're working on an o-scope attachment for the logic sniffer, but it's a ways from done.
Maybe not the best board for me to learn about SPI on then - oh well, a challenge is always good :)
Thanks for clarifying the twiddling - I need to make sure I have the right terminology when speaking in hacking circles :D I'll definitely be keeping an eye on the Logic Sniffer progress, to be honest as it stands both bits of hardware look like great value for the price.
Appreciate the help!
[quote author="rozling"]
Just wondering then, could the Logic Sniffer somehow be used as an audio oscilloscope?
[/quote]
If all you want to do is audio you might try just using your sound card. There are many restrictions for the sound card A-D, like it is AC coupled so you can't see any flat DC signal. However if you are looking at line level audio it's just fine. I've also been able to hook up an IR detector and see IR signals using the sound card. If you are doing anything other than line level you'll need a probe with attenuation. Have a look at the Zeitnitz scope software for windows or xoscope for linux.
* http://www.zeitnitz.de/Christian/scope_en (http://http://www.zeitnitz.de/Christian/scope_en)
Since you are working on the arduino, have you seen this?
* http://www.practicalarduino.com/projects/scope-logic-analyzer (http://http://www.practicalarduino.com/projects/scope-logic-analyzer)
Also, I've just started using a bus pirate. It's most basic features, like the voltage probe and it's frequency counter to monitor my Arduino pins when running a sketch. After a long struggle with rxtx, I finally got the SUMP logic analyzer bit working today.
Hope This Helps,
--Rob