Having recently had some issues trying to debug SPI communications on a development board I built I decided it was time I looked into purchasing a logic analyser. Now I know these things can retail for mega bucks but I also know you can get more reasonably priced USB based versions as well. Now I am not going to get some 100 Mhz 18 channel beast for peanuts but I was optimistic I could find something suitable.
Cue the Salae Logic. This little beauty can sample 8 channels at up to 24 Mhz and record upto 10 billion samples. With 17 different protocol anaysers including I2C, SPI, CAN and many more this appears to be ideal. It comes with its own case and wiring harness including test clips. All this for €152 (£120) shipped directly from Saleae.
Dave Jones recently did a review of the Salae Logic on this on EEVblog. Watching his video it becomes clear there really isn’t a lot of hardware in this device. Its based on the Cypress CY7C68013A microcontroller. This is a 8051 microcontroller with a built in USB transceiver. The input logic signals are sampled on 8 GPIO lines and transferred over USB back to the host software.
There are a number of Salae Logic clones available on the internet for a fraction of the cost. This only being possible due to the fact that Salae supply their software for free. Now that left me with a moral dilemma. Do I shell out £120 for the official version or do I buy a clone for around a tenth of the price. I knew deep down this is most likely only going to get an outing once in a blue moon so the idea of spending £120 for something that is going to sit in my draw the majority of the time was difficult to justify. On the other hand I appreciate all the hard work that has gone into the development of this kit and this is at the end of the day a source of income for these guys.
So after a bit of pondering I made a decision, I will purchase one of the clones, see how well it works, see how I get on with it and then if I end up using more than twice a year I’ll buy the official version. In the end I managed to buy one complete with wiring harness and clips for £15 delivered. A bargain in anyone’s book but only time will tell what the quality is like.
Upon receiving it I followed Dave Jones philosophy of “Don’t plug it in take it apart”. The quality of the soldering was adequate. There didn’t appear to be any shorts and all the components were fitted correctly. No surprise this uses the same CY7C68013A as the official version. One interesting thing about this micro controller it executes code from internal RAM downloaded over USB, loaded from EEPROM or from an external memory device. On closer inspection this board has an Atmel 24C02 2Kb (256 byte) serial EEPROM fitted. Interesting. Is it possible the firmware could be stored in this EEPROM and loaded into RAM for execution on power up? Though 256 bytes doesn’t seem a lot even for a modest bit of firmware. This leads me to think the firmware is more than likely download by the host software when first started. So its possible this EEPROM maybe used to store the Vendor ID (VID) and Product ID (PID) which must be the same as the official Salae device. Closer inspection also reveals that each logic input passes through a HC245 3 state octal bus transceiver before connecting to the micro controller. This provides some level of protection for the GPIO lines. Stock series resistors are present on each input as well as pull up/down resistors. No diode clamping though like the official version. Note there is also 3.3V regulator fitted on the reverse side of the board.
Having already downloaded the latest version of the Salae Logic software (1.1.15) I plugged in the device for the first time. It identified itself as correctly as a “Saleae USB Logic Analyzer”. First impressions of the Saleae Logic software is its very good indeed. I love the dark theme which really makes everything stand out. Using it is a breeze as well. Simply connect the probes to signals you wish to monitor, choose the number of samples you want and at what frequency you want to sample. The maximum sampling frequency is 24 MHz which is more than fast enough for most applications. Initially I did have an issue when connecting through a USB hub. The software was unable to sample quick enough. Swapping over to a dedicated USB port resolved that issue. After selecting the number of samples and frequency you can simply press the “Start” button to begin sampling. I did notice some cross talk between unused channels which may be problematic but for now I simply hid those channels from view.
One of the main reasons I bought this analyser was to diagnose serial communications problems and so to see just how well it performed I connected it to the MCP3008 10 bit ADC on my variable electronic load board. The sample rate was set to 24 MHz (bit over kill since the SPI is only running at 1 MHz) and 25M samples which equates to around 1 second of data. I selected an SPI analyser in the logic tool and assigned its signals MOSI, MISO, Clock and Enable (CS). The start trigger was set to trigger on a high to low transitions on the Enable signal. The captured data can be seen below.
Communication between the micro controller and the MCP3008 requires 3 bytes to be sent. The first byte transmitted contains seven leading zeros followed by a start bit. The second byte transmitted starts with the mode bit (1 = single ended 0 = differential) followed by three bits determining the channel to be sampled (000 = CH0 … 111 = CH7). The remaining four bits are don’t cares. Once the second byte has been sent the micro controllers receive buffer contains five unknown bits, a null bit and the two highest order bits of the conversion result. The third byte sent is a dummy byte. Once the third byte has been sent the micro controllers receive buffer contains the lowest order eight bits of the conversion result. In the example shown the ADC is sampled twice. Channel 0 is sampled first followed by channel 1. Both channel 0 and channel 1 have no sources connected to them and remain floating so both channels read zero counts.
Overall impressions of the this low cost logic analyser a very good. Putting aside the issue with potential cross talk for the price this logic analyser performs very well. It may not be as aesthetically pleasing or as well built as the official Saleae device but for the money you cant go far wrong.