Logic analyzers
Often, when developing or debugging electronic devices consisting of several components (microcontroller, ADC, I2C memory, etc.), I would like to look at the communication of these components among themselves. To finally understand why everything is written “correctly,” but nothing works. In general, you can use a digital oscilloscope for this, but 4-channel oscilloscopes are quite expensive, and this is not very convenient. Much nicer such a problem is solved using a logic analyzer. The logic analyzer is essentially similar to an oscilloscope, but if the main task of the oscilloscope is
displaying a change in the analog signal with which it does a great job, then the goal of the logic analyzer is to
record a digital (but not always only digital) signal with its subsequent analysis in convenient programs.
Below I will describe the experience with logic analyzers Logic Pro 8 from Saleae at the price of about $ 480 and DSLogic Pro from DreamSourceLab (most likely a copy) at the price of $ 99 I got for $ 73.
To whom it became interesting welcome under kat.
Specifications
Logic analyzers differ from each other mainly: the number and type of channels, the presence of a buffer, and the frequency of sampling.
A small comparison table with the characteristics:
| Logic Pro 8 | DSLogic Pro | Description |
---|
The number of digital channels | eight | sixteen | The more the better, but for the year of use more than 4 while it was not really needed |
The number of analog channels | eight | 0 | For an analog, an oscilloscope is preferable, but sometimes it is convenient to see what is going on not only in the digital on the channel, but also in the analog. |
Interface | USB 2.0 / USB 3.0 | USB 2.0 | USB 3.0 is preferable if you have it of course. Although the moment is controversial, I will describe below why. |
Sampling frequency of digital channels | 500 MS / s - USB 3.0
100 MS / s - USB 2.0 | 400 MS / s - for 4 channels
200 MS / s - for 8 channels
100 MS / s - for 16 channels | The more the better, but in the case there is one nuance, but more on that below. |
Analog Channel Sampling Frequency | 50 MS / s - USB 3.0
10 MS / s - USB 2.0 | - | The bigger, the better. |
Voltage range digit / analog: | 1.2V - 5.5V / -10V - + 10V | 0V - 5V / - | Here Logic Pro 8 has a choice of three threshold voltages of 1.2V / 1.8V / 3.3V.
DSLogic Pro has a choice from 0V to 5V in 0.1V increments. It also has an overvoltage protection of -30V - + 30V.
|
Internal channel resistance | 1.8 MOm | 250 kOm | The more the better, the less turns there are on the scheme under study. |
Buffer | - | 256Mbits | The more the better, it depends on this parameter how many samples can capture the analyzer without transferring them to the computer. The thing is extremely useful especially for UBS 2.0 |
Sampling depth | not limited in theory | 16MS per channel | The more the better, Logic Pro 8 uses PC memory. The depth of sampling can be very large, but DSLogic Pro also suffices. |
In general, in many respects, Logic Pro 8 has an advantage, especially in terms of the analog part. However, the lack of a buffer has a negative effect, firstly, the speed drops twice when using 4 channels, and 4 times when using 6 or more channels. But this is not all, since the speed is tightly tied to the USB bus, incidents happen if this bus is loaded, sometimes it is enough to plug the UART cable into one USB hub so that the program curses and says that the USB speed is not enough and the capture speed will be reduced. Not that it happens often and strongly hinders, but it’s worth remembering about it.
Of the features of DSLogic Pro, we would like to note the presence of an external line of the clock, and signals for external trigger input, and trigger output.
Appearance and equipment
Logic Pro 8 Kit:
- analyzer itself
- two connectors with multi-colored wires, 4 channels per connector
- 16 clips for connection with the feet of the chips, wires, etc.
- USB 3.0 Cable USB-A to MictoUSB 3.0
')
DSLogic Pro Kit:
- analyzer itself
- 16-channel wide connector plus additional signals
- 16 multi-colored clips for connecting with legs of microcircuits, wires, etc.
- USB 2.0 cable USB-A to MictoUSB
Comparison
If we compare the equipment, it is approximately the same. However, in my opinion, the connector with wires for
Logic Pro 8 is much more convenient and pleasant to use, the wires are softer and more flexible. Clips at Logic Pro 8 is several times more convenient. First, they have two pins for connecting to the analyzer wire, which is convenient, and secondly, the pins for connecting are on the side, which makes it easier to hook the clips to the wire already connected to them. DSLogic Pro has a pin on the top, which makes it difficult to connect at times, although the clips are no different in terms of flexibility, but the overall quality is still lame.
Several comparative photos
Software
Whatever a good logic analyzer is, without good software there will be no convenience in working with it. Good software should quickly display captured data, allow you to watch their characteristics such as frequency, duty cycle. And it is very good that he would be able to decipher well-known protocols. It is unimaginably convenient to indicate where the I2C legs are and see exactly what was happening on the bus from the point of view of the I2C protocol, and not sit and scratch the head peering and trying to figure out whether it is all right and what address was written here. Each analyzer is equipped with its own program:
Saleae Logic
Saleae analyzers are equipped with Saleae Logic
The program is multiplatform, all Windows versions starting with XP are supported (a year ago there were problems with Win 7 and higher, the new version of Win 7 works without complaints, did not test it above), Mac OS X 10.7 Lion + was installed and worked without complaints, Ubuntu 12.04.2 + I did not earn it (I tested it a year ago on the old version of the program can now work), but I did not really try.
It supports a large list of protocols for analyzing I2C / SPI / UART / CAN, work without complaints. It is possible to capture both by manual start and by trigger on one of the channels. Of the shortcomings on long samples, it begins to slow down quite strongly.
Of the features of the program, it is worth noting the possibility of management via a telnet-like protocol, the presence of an SDK for writing your own protocol decoders. Protocols are written in C ++, which complicates the process of writing them.
DSView
DSLogic Pro comes with DSView:
Also multiplatform program support for Windows since XP, Mac OS X 10.11.4, Linux (the program is in source). The program is superior in capabilities to Saleae Logic, there are more advanced triggers with support for several channels at once, the list of protocols is quite extensive. But here the developers went further and the protocol can also be used to add the ability to decrypt work with a specific implementation of this protocol. For example, you can select the I2C protocol and the implementation of the 24CXX and then immediately read what exactly happened on the bus from the point of view of the chip. Both protocols and their implementations are written in Python, which in theory should simplify writing and debugging. Brakes in the work was not observed.
It is also worth noting that the project is partly OpenSource and on
GitHub are laid out the sources of software, and HDL parts. And on the
Wiki is a schematic. Therefore, it may soon be a bunch of clones of this device (maybe I also have a clone).
Simple testing
For a simple test of the analyzers, a DE0-Nano-SoC dev was used on which the meanders from 200Mhz were generated; each next one was obtained by dividing by 2 previous (200/100/50) I would try to capture them with available analyzers.
The DSLogic Pro managed to capture 200Mhz / 100Mhz / 50Mhz below, and so it is clear that everything is going fine. To say that 200 and 100 were captured ideally it is impossible sometimes there is a slight frequency and frequency shift, but on the whole it is normal, by 50 everything is already perfect.
Seleae normally could not remove 200Mhz and 100Mhz, but 50 Mhz is already going perfectly.
And yet, I would not be serious about such measurements, 200Mhz is probably just a brute force measurement, but it was worth a try.
For the experiment we will try to capture the data transmission over I2C (the transmissions are different, therefore the data do not converge).
Everything is perfectly readable, it is clear where what event occurred, what addresses and data were transferred. No fuss.
Same for CAN:
The result is the same as in I2C everything is clear for the minimum amount of time.
findings
Both logic analyzers do an excellent job with their tasks. In spite of the difference in price, I would not be able to take someone in the lead, they have both pluses and minuses. On the side of Saleae, the appearance, convenient wires, high-quality clips, USB3.0 and analog channels, is it worth paying $ 400 for this? The question is complicated, if there is a possibility then why not. On the DSView side there are more channels, an input for an external clock and triggers, a buffer inside the analyzer, OpenSource software, and a price. Both of them can greatly facilitate and speed up the work of setting up their own or others' schemes, and the study of third-party protocols.
If you have questions - ask.
Ps. We have been using Seleae for about a year, there were only problems with earlier versions of software for Win7 and higher, DSView was bought for personal use about a week ago, but there are no complaints yet, but the usage time is small ...