Memory depth in a logic analyzer? - Page 1
Forum section: electronics / testgear

author: somlioy
author_rank: Regular Contributor
timestamp: November 05, 2013, 10:17:24 pm
content: I'm considering one of the cheaper zeroplus logic analyzers, but I'm wondering how much memory depth is actually needed for a hobbyist?Leaning towards the 64kbit or 128kbit versions.Are those hacks still available?

author: Retep
author_rank: Regular Contributor
timestamp: November 05, 2013, 11:52:44 pm
content: I can't tell how much you need for hobbyist use (whatever that maybe), and I'm not familiar with the ZeroPlus logic analyzer. FWIW my experience (admittedly from 15 years ago, based on a HP 16500) is that there is no such thing as too much memory depth in a logic analyzer.If you have too little memory depth you spend a lot of time figuring out trigger conditions that are specific enough so you will catch whatever you are looking for. Defining very specific triggering conditions implies that you have to know exactly know what you are looking for (which may not be the case). However if you are too specific so you miss the event. And you may also need to figure out the lowest possible sample rate you can get away with. In the end you spend more time trying to catch the event you are interested in than analyzing the problem.So I recommend you go for memory as much as you reasonably can afford. 64 or 128 kbit (per channel I assume) doesn't seem that much to me, though it is much more than I had on the HP 16500 at the time.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 06, 2013, 09:54:13 am
content: Hantek gives 2Gbits of memory for a comparable price

author: con-f-use
author_rank: Unknown
timestamp: November 06, 2013, 10:01:42 am
content: 128kbit will quickly get annoying even for basic stuff (e.g. debugging IR remotes).

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 06, 2013, 10:13:27 am
content: Quote from: abyrvalg on November 06, 2013, 09:54:13 amYes, and it's really annoying the way they "spec" that. They claim a 2G depth, and it's simply not. The 2G is the depth x the width... i.e., the samples are all 32-bit wide, and the real depth is 64M samples. I wish they'd just say that.Since there is no option to trade off width for depth (e.g., 16-bit wide x 128M samples, and so forth) the 2G depth claim is just

author: somlioy
author_rank: Regular Contributor
timestamp: November 06, 2013, 07:53:24 pm
content: Well, I was mainly thinking of cars (can-bus), i2c, spi and possible some rs485 if it dosent require much hardware.

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 06, 2013, 09:11:31 pm
content: Quote from: somlioy on November 06, 2013, 07:53:24 pmIn that case, mojo-chan's suggestion would be an excellent option. An 8-channel USB analyzer that has unlimited memory can run at 24 MSa/s (or a bit more, on a couple devices that run narrower than 8-channels). That speed is adequate for everything you listed, as long as you don't try to do SPI much beyond 5 MBit/sec (I've squeaked out 8 MBit/sec, in a pinch, and they claim 12 is doable).I'd recommendUSBee SXfor this, mainly because it has the best protocol analysis software. (Best decoders, customizable, filtering, searching, excellent navigation.) There are also others that do essentially the same thing, hardware-wise (e.g.Saleae Logic8), but the software isn't nearly as good. These are under $200 solutions. And I believe both offer "try it, and if you don't like it, return it" options.

author: leafi
author_rank: Regular Contributor
timestamp: November 07, 2013, 04:34:53 am
content: I personally have a Salaea Logic 16 and I love the thing. Yes it is more expensive than other products but I love that they have so many built in decoders and it uses the PC hard drive for storage which allows for almost unlimited capture (All be it at lower capture rates). I personally have used mine to debug 1 wire and JTAG. It is also great that you can save the entire capture data and send it to some other computer and use the software to debug or monitor your transactions. The software is free to use so you do not need the hardware attached to the computer to review the data captures. The only real weakness is the USB 2.0 bandwidth. I they will come out with a USB 3.0 device which can capture more channels at higher frequency.

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 07, 2013, 04:54:27 am
content: Quote from: leafi on November 07, 2013, 04:34:53 amAll the good things you had to say about the Saleae Logic are true. It also has the smoothest scrolling of any such software, which is quite impressive. However,> The only real weakness is the USB 2.0 bandwidth.is a statement I'd have to take issue with. The bandwidth limitation IS a weakness, if and when your signal exceeds what it can handle. But it's not the ONLY weakness. Far worse (IMO), is the fact that the software provides no tools for dealing with a large sample acquisition. Zoom in & out, scroll, and JumpToNextEdge. That's it!And it's been that way for years.No Searching, no Markers, no Filtering, or anything else to aid in navigation. Nada. That's where USBee beats it hands-down, in effective usability (with all those capabilities, and more). USBee also provides an EventList view, with relative or absolute time stamps, that the Logic8/16 lacks, and synchronizes the two views.So while Saleae does a great job with what it DOES do, there's so much it DOESN'T do that kills it, for me. YMMV.

author: casper.bang
author_rank: Frequent Contributor
timestamp: November 07, 2013, 09:34:22 am
content: I like the Salea Logic mostly because of it's hardware quality build and software in the same league, with support of all major platforms - other vendors could learn from this (my opinion).

author: olsenn
author_rank: Frequent Contributor
timestamp: November 07, 2013, 02:32:41 pm
content: Saleae is the Apple of logic analyzers

author: casper.bang
author_rank: Frequent Contributor
timestamp: November 07, 2013, 03:23:28 pm
content: Quote from: olsenn on November 07, 2013, 02:32:41 pmEhhh... except when did Apple do software for Windows and Linux? #AnalogyFailure

author: gmb42
author_rank: Frequent Contributor
timestamp: November 08, 2013, 12:48:25 pm
content: The horror story that is itunes. And quicktime.

author: sprocket
author_rank: Regular Contributor
timestamp: November 08, 2013, 02:26:25 pm
content: Well a prober Logic analyzer will be on my shopping list pretty soon, and I have come across this onehttp://www.digilentinc.com/Products/Detail.cfm?Prod=ANALOG-DISCOVERYalot of tools in a small handy size. And for me it's a big selling point that it can do a lot of other stuff that I dont use very often so I cant really justify buying a standalone bench equibment. for an exsample it has a 2 channel waveform generator, pattern generator and a spectrum analyzer.Yea the bandwith is not impressive compared to stand-alone bench equibment, but I dont do HF og VHF stuff any ways.. so for low freq. stuff and easy PWM test switcher for LEDs and SMPS circuits it will serve my needs very very well I think.

author: Maxlor
author_rank: Frequent Contributor
timestamp: November 08, 2013, 05:54:09 pm
content: I like the Saleae devices. Mostly because it works on non-Windows platforms, and the unlimited sample depth means I don't have to figure out complex triggers.As for the software limitations that come with it: don't forget that you can export the captured data into a CSV file, then continue filtering/decoding/massaging using external tools.I would consider anything under 1M sample depth per channel inadequate for a logic analyzer (unless it can do clever tricks like record only changes.) I've found that often, there's a pause in the communication you're recording, which ends up burning through a lot of samples (one example: you wake up some I2C sensor and tell it to do a measurement, which might take a second, wait for the interrupt, read the measurement, then tell it to go back to sleep.) If you're limited then it makes recording the events you're interested in very challenging.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 09, 2013, 03:25:34 pm
content: Quote from: Mark_O on November 06, 2013, 10:13:27 amAnyway, 64M/channel is 1024x more than topicstarter's ZeroPlus 64K.Despite of dirt cheap DDR SDRAM availability most popular LAs still utilize tens years old technologies like small expensive SRAMs, or are too lazy to add external storage at all and use even smaller FPGA's builtin RAMs, but their prices are quite "modern".

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 09, 2013, 07:22:44 pm
content: Quote from: abyrvalg on November 09, 2013, 03:25:34 pmI agree. And if Hantek's software and support didn't suck so badly, I'd have less trouble recommending them. But the hardware seems capable, and the 64M sample depth is quite impressive. Other than possibly the time it takes to pull it over into the PC (which I'm unfamiliar with).The other thing Hantek does right (with their hardware) that many of the alternatives fall short on, is allow you to deal with voltages in a much wider range, and set the thresholds far more flexibly. Some products have NO threshold flexibility at all. E.g., "1" is anything >= 2.0V. And that's all you get.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 09, 2013, 11:52:09 pm
content: Mark_O, sure, their software is far from being perfect, some features are nice (like complex triggers, measurements, bus grouping), while others are poor (limited navigation, just 3 protocol decoders, no binary export), but I can tolerate it for the ability to sample 64MB/ch @400MSPSWaiting for "USB 3.0 Saleae", the Cypress FX3 is in production long time already, but nobody had released anything interesting yet.

author: casper.bang
author_rank: Frequent Contributor
timestamp: November 11, 2013, 10:31:46 am
content: Quote from: mojo-chan on November 11, 2013, 09:44:24 amIt must be trivial to add some rudimentary run-length with Huffman encoding to achieve much higher transfer in practice.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 11, 2013, 11:24:24 am
content: There are lots of cheap USB flash sticks achieving 40MB/s read speed in USB 2.0 mode. Cypress FX2 itself (chip used in saleaes) achieves 52MB/s in ideal conditions (always ready, "screamer fw" sample from Cypress). So 24MB/s is far from the limits. There were limits on the other end of wire - slow USB hosts, but they are in the past.And with USB 3.0 200+MB/s speeds are possible (example: Kingston HyperX USB 3.0 flash stick achieving 220MB/s) - that can be really interesting, but no such instruments yet.

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 11, 2013, 03:22:05 pm
content: Quote from: AcHmed99 on November 11, 2013, 10:04:45 amI agree that most of the time a 24 MSa/s rate is adequate, and an unlimited buffer memory is a huge win.But the point I think that abyrvalg was trying to make is that the Hantek (had to go look it up) 4032L can do 400M Sa/s, combined with a local buffer of 64M (!) samples... at 32 channels width. All for <$200. That's 256MB of buffer RAM, and these days, why not?So it's certainly a very decent option, as long as the software doesn't suck so bad as to be unusable. I've considered picking one of these up myself, and if I had a need for those speeds, I probably would.[I work mostly with embedded systems, and the fastest signal I've needed to look at (so far) was a 50 MHz SPI bus. Most of the time, signals are much,muchless than that, and my USBee SX will handle the job. But in that one case, I have an instrument that will sample digital signals at up to 2 GSa, with a few Meg (8, maybe) samples, so I was OK. I may even have clocked it in State mode, to get a better time window.]

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 11, 2013, 03:37:39 pm
content: Quote from: casper.bang on November 11, 2013, 10:31:46 amThat's an interesting conjecture. Unfortunately though, incorrect.The problem being that while HE can effectively reduce the data size (and thus increases the effective rate)on average, it's the peaks you have to worry about. And HE can actually make those larger (high entropy increases the coding size). The whole idea of these cheap acquisition devices is low cost, and they don't have much internal buffer memory (or processing power, either). They're basically clocking in and out at full speed, at the same time.What you're suggesting would require much larger buffers for matching the I/O streams, and would still be prone to breaking down if the data stream under test had too much variation for too long a time. Definitely not trivial.

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 11, 2013, 03:47:03 pm
content: Quote from: abyrvalg on November 11, 2013, 11:24:24 amThanks for those examples! I was unaware of those capabilities. I think the fastest I've seen USB2 run in real life was about 32 MB/sec.One point to keep in mind though is that those speeds are only possible if you had quite a bit more buffer RAM available on the acquisition device, to smooth out the transfer rate variations. These things typically have about 2K or 4K, max.The second point, and reason for larger buffer requirements, is that PCs are not so good at dealing with instantaneous real-time demands. Certain types of latencies and contentions could break the data stream, and in fact, already do on many systems. Even with just the current, relatively modest, 24 MB/sec rates.

author: Rasz
author_rank: Super Contributor
timestamp: November 11, 2013, 03:53:49 pm
content: Quote from: mojo-chan on November 11, 2013, 09:44:24 amNo, FX2 realistically can pump out ~40MB/s

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 11, 2013, 05:09:48 pm
content: mojo-chan, no, in Saleae case 24MHz is sample rate, not input bandwidth. They use FX2 in "GPIF master" 8-bit mode (this simplifies interfacing to the ADC, no glue logic needed) and 24MB/s is the maximum possible throughput in this mode (GPIF state machine runs at 48MHz producing one active ADC read edge per 2 cycles, 2nd cycle is wasted for inactive edge).Edit: ADC exists in oscilloscope models only (some USBees) of course, but for LA models operation mode is the same.Edit: saleae specs:http://www.saleae.com/logic/specshackaday's review:http://hackaday.com/2009/03/06/tools-saleae-logic-logic-analyzer/,scroll to "can capture signals up to 12MHz"

author: backflipper
author_rank: Contributor
timestamp: November 11, 2013, 09:59:52 pm
content: Quote from: sprocket on November 08, 2013, 02:26:25 pmI would be interested in a review of this if you do buy it.

author: Rigby
author_rank: Super Contributor
timestamp: November 12, 2013, 07:58:46 pm
content: Quote from: mojo-chan on November 12, 2013, 10:15:46 amIf you read the Overview paragraph ofthe Logic16 page, you can get an idea of what they mean.I'm pretty sure they're speaking in terms of samples per second. In the case of the Logic, that's 24MHz on each of 8 channels. They don't say such, but I would assume that the sample rate would double if you were only sampling 4 channels, as is described on the Logic16.

author: Mark_O
author_rank: Frequent Contributor
timestamp: November 12, 2013, 09:29:36 pm
content: Quote from: Rigby on November 12, 2013, 07:58:46 pmI would assume precisely the opposite.Since they explicitly describe how narrowing the channel increases the sampling rate in the Logic16, but say no such thing on the similar Tech Specs page for the Logic8, I'd think that 24 MHz was the max rate, regardless of the number of "active" channels. In fact, I see no evidence that all 8 channels are not always "active", even if just acquiring null data. It's the simplest hardware implementation, and I doubt the base Logic unit can do anything else.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 12, 2013, 10:30:45 pm
content: Mark_O, you are 100% right. Logic16 has an FPGA that combines narrow bits into bytes, but Logic8 is bare Cypress FX2 - no combining.Logic16 PCB:http://sigrok.org/wiki/File:Saleae_Logic16_PCB_top.jpgLogic8 PCB:http://sigrok.org/wiki/File:Saleae_logic_pcb_front.jpg