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 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.
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