Tools: Saleae Logic, logic analyzer
posted Mar 6th 2009 1:58pm by Ianfiled under: reviews

A logic analyzer records bus communications between two chips. If you’ve ever had a problem getting two chips to talk, or wanted to reverse engineer a protocol, a logic analyzer is the tool you need to spy on the bus.
The Logic is a USB logic analyzer with eight channels and sampling rates up to 24MHz. Among hobby-level logic analyzers, the Logic has a good mix of features and decent sampling rates. We’ve been following Joe Garrison’s work on the Logic for a long time. If you’ve ever considered bringing a product to market, you can learn a lot from Joe’s blog that documents his development process.
When it debuted, the Logic was so popular that it was hard to buy one. It’s now widely available, and Saleae gave us one to try. Read our review below.
Logic Analyzers vs. Oscilloscopes
Most modern electronics projects will benefit more from a logic analyzer than an oscilloscope. An oscilloscope displays a graph of an analog voltage as it varies over time, such as the curve of a sine wave. A logic analyzer only detects high and low digital states, but it records many signals simultaneously. Logic analyzers dump data to a computer for analysis, very few oscilloscopes have this feature.
What you get

The Logic comes packaged in an external hard drive case. The analyzer is a small, anodized aluminum puck with laser etched signal markers. It’s much smaller than we expected, slightly smaller than a compact flash storage card. A mini-B USB cable is included.
A heavy-gauge cable and nine E-Z-Hooks (5 shown) connect the Logic to a circuit. The hooks are a really nice touch; press the back of the hook to expose a pair of tweezers, grab onto a signal wire, and retract to hold it in place. The retractable tweezers prevent accidental shorts on cramped test circuits.
Software isn’t included, instead you get instructions to download the latest version from the Saleae web site. We always download the latest software, so we appreciate that there’s one less CD headed to the landfill.
Right now, only Windows XP/Vista software is available, but Mac and Linux software should be ready soon. Warning: the Windows version requires .NET 3.5, download the redistributable off-line installer if you don’t want to give internet access to Microsoft’s online installer.
Using it

Using the Logic is simple. Connect the gray ground wire to the ground of the test circuit, then hook into the signal lines you want to record. We connected it to the 32K SPI SRAM that we demonstrated earlier this week. SPI has four important signals; enable, data in, data out, and clock. The E-Z-Hooks make it dead simple to tap into the signals without accidental shorts.
Be mindful of wire orientation. We associate a black wire with ground, but the Logic cable uses gray. Comments on SparkFun’s product page suggest that reversing the connections will damage the Logic.

The software analyzes and displays signal captures. The primary configuration options are the sampling rate (200KHz-24MHz) and number of samples (millions to billions). We were able to sample at 24MHz, but the top speed depends on how much other stuff is using the USB bus. A 24MHz sampling rate can capture signals up to 12MHz, we found this suitable for all the protocols we use. The total number of samples is limited only by the available PC RAM.
There’s a four level trigger that watches the signals, and waits for a specific combination before it starts recording samples. Since we’re analyzing SPI, the most logical place to start capturing is when the SPI enable signal drops at the beginning of a bus transaction. We set the Logic trigger to start sampling when SPI enable is 0 by changing its trigger to ‘0′.

We really like the profiles that decode most common serial protocols; 1-Wire, I2C, SPI, and asynchronous serial. CAN and other protocols will be added eventually.
Profiles suggest names for each signal, and convert squiggly lines into readable byte values. This is a really awesome feature. Without it, you’d have to count clock pulses to identify byte boundaries, and then manually decode the values.
This transaction shows the host issue the read configuration register command (0×05), and the SRAM response (0×41).
![]()
We also tried the 1-Wire decoder with a DS2431 EEPROM. The software identified the 1-Wire reset command, and the 1-Wire ’search rom’ command (0xf0).
A look inside

The Logic is based on the Cypress Semiconductor CY7C68013A-56PVXC, an Intel 8052 microcontroller with a USB peripheral. The 8052 is an enhanced version of the well-known 8051. We can also identify a 24MHz crystal, which is probably multiplied to 48 or 96MHz by an internal phase-locked loop.
Conclusion
Logic analyzers take the guess work out of debugging inter-chip communication. If you can’t see what’s going on, the best you can do is guess about the problem. When a project won’t work, 99% of the time we can solve the problem immediately by looking at the signals with a logic analyzer. Without it, there’s no easy way to know what’s happening.
The Logic records 8 channels at 24MHz. The Windows software has useful features, and there’s an SDK if you want to write your own apps. Linux and Mac versions are under development. We really like this logic analyzer, and plan to use it to illustrate future articles.
The Logic is $149 at the Saleae website and SparkFun, and Joe is working on EU distribution. If you’re interested in the Logic, but aren’t ready to buy, you can download the software and try it in demo mode.
Hack a Day review disclosure: We asked for a Logic and Saleae sent it to us





I just got my first logic analyzer from a family member for Christmas (as merely a hobbiest, I couldn’t afford dropping money on one for myself… I just don’t have quite enough need) this past year. I wasn’t involved in the decision-making process (thus the disadvantage of *not* buying for oneself), but the got me a USBee SX series — it’s very similar in form factor to this little baby, and I suspect is approximately similar in specifications. Works pretty well to help debug my PIC projects.
http://www.usbee.com/sx.html is the one I got, retails at $139 and has very similar looking software. It can also serve as a signal/pulse generator. The software’s honestly a bit buggy, but in fairness I’m running an older version of it in a Windows 7 VM (VMWare Fusion on a Macbook Pro). My old dev machine (*very* old Windows Server 2k3 laptop which gave up the ghost a couple weeks into January) seemed to support higher sample rates (up to the maximum), but 4 million per second is fast enough for what I need, without a doubt.
In writing this post, I noticed the fact that I’m running an old version… from the looks of it, the newest version has been well tested in Windows 7, and has more features (like easier-to-read decodes of communications protocols), will have to download the latest to see if I get better performance.
But yeah, just an alternative. This looks like the build quality may be a little better, though I don’t see a +voltage output… I use the one on the usbee as a lazy-man’s capture trigger — set the software to watch for a leading edge to trigger a 4 second sample at 4msps, and then just touch a wire to the trigger line and the +5v line — I could just press the mouse, but that’s not always near my circuit.
Posted at 2:25 pm on Mar 6th, 2009 by mrasmus