Whats the Difference Between Logic Analyzer vs Protocol Analyzer? - Page 1
Forum section: electronics / beginners

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 24, 2010, 03:33:25 pm
content: the topic speaks for itself... just for a while, i already know a little bit on what Logic Analyzer is... but i saw too, a device called Protocol Analyzer. What actually it is? can somebody give more info on this esp:1) Are they siblings (related)?2) What a "Logic" cant do that "Protocol" can, vice versa?3) Which one more worthy to buy?sure i can google on this, but perhaps it will take days or weeks, i prefer it to be here from whom are more knowledgable, thanx.

author: Unknown
author_rank: Unknown
timestamp: May 24, 2010, 03:46:49 pm
content: Disclaimer: I own a logic analyzer and didn't buy (but did research) a protocol analyzer, so I may be somewhat biased. Feel free to correct me.Protocol analyzers are usually dedicated to one (or a few) protocol(s), like USB or SPI. They can usually work at higher speeds than similar logic analyzers, and have a much deeper buffer (or can do continuous capture). A logic analyzer can be used to debug timing issues and see if you actually meet the protocol specs, the protocol analyzer implements the protocol decoder in hardware, and only shows the data inside. Some protocol analyzers can also transmit. A logic analyzer is a more generic piece of equipment, but a protocol analyzer is much better at capturing long streams of data at high speed.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 24, 2010, 04:15:38 pm
content: another question.... if i want to specify my own protocol (for some very specific purpose), can i embed/program it inside the protocol analyzer, so it can understand my protocol? and report any invalid data if the protocol specification is not met?

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 24, 2010, 04:25:33 pm
content: They are two completely different animals. Previous reply touched on the diffs, but to elaborate a bit more on what a protocol analyzer is / does:It's not designed to take generic digital inputs. It's connections are designed to meet the specific standards spec. In many cases, they are designed to be both electrically and logically transparent (snoop mode). Many of them can also be put into a mode to act as a recognizable device on the bus they are attached to. When used to simply snoop the bus, they take the information on the wire and display it in a form that makes sense for the higher level protocol standard. E.g.: show start and stop bits, header info, packet ID info, where's the payload, where's the CRC, etc. Typical application is to debug a product under development to ensure your product is obeying by the rules and to be able to see at a macro level what you're spitting out to the wire. Yes, often times you could devise the means to sample the same info with a generic logic analyzer (provided you adapt a way to maintain electrical specs), but your analyzer would simply see a senseless stream of bits. Many / most of them can also be used to generate traffic on the bus. A good example: you're developing a USB device, so you want something that can behave and generate traffic in a deterministic fashion as a host during the early development phases. Or vice versa (developing host and want generic device). You'll find protocol analyzers for pretty much any standardized bus you can imagine. Network analyzers are usually pretty complex things since they usually support all the higher level protocols (TCP/IP for example).

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 24, 2010, 04:26:28 pm
content: Quote from: shafri on May 24, 2010, 04:15:38 pmNo. Each protocol analyzer is designed for a unique standard.

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 24, 2010, 06:02:35 pm
content: Quote from: shafri on May 24, 2010, 05:23:55 pmActually, what I will call 'real' logic analyzers have this ability to a limited extent. At my old job we had the HP 165xx series, or later ones were 16700 logic analyzers. You could build little state machines for trigger mechanisms and setup labels for certain bit combinations. Couldn't get super sophisticated to follow a terribly complex protocol, but you could at least make it easier to track what's going on. Examples would be things like: if a READY and a VALID are both asserted, that's the data phase. Or if your bus has a 3 bit wide vector for the type of transaction you could assign a label to it. Makes it easier to read when looking at the wiggles on the screen. That sort of thing. But these were machines that our internal cost was on the order of $20K + (USD). That was the mid - late 90's.Keep in mind one other major difference: the electrical. Logic analyzers have a finite type of electrical signals they can look at. If you want them to snoop a bus you have to have some sort of circuit to plug into. Example would be the SCSI sniffer we used when doing Senior Project in college. We were able to watch the bus with a logic analyzer, but we had to use a specially designed product that would maintain the electrical specs on the cable while providing headers we could attach the logic analyzer to. It was strictly a passive pass-through sort of thing. Not to mention it is pretty tedious to walk through the bit stream to decipher just what you're looking at on the bus. Things like USB, SATA, or SAS protocol analyzers actually just use the same phy that would be used in any other product for that bus, but the logic that sits on top of that phy is designed to work with the software to behave as the capabilities of the analyzer call out. Which brings up the other aspect. Most protocol analyzers (especially anything built in the last decade) also have the ability to generate traffic. i.e.: act as a node on the wire. So not saying it can't be done, and could potentially be an intriguing project (or more likely projects....plural), but I think you'll find it's more than you bargain for when you start looking further into it to truly see the difference. Hell, if nothing else it's a crapload of software, and I don't mean just some basic firmware you can load on a micro.but that's just my $0.02

author: Unknown
author_rank: Unknown
timestamp: May 24, 2010, 09:49:53 pm
content: You can decode protocols with a logic analyzer, but it's all done it software (slower), and might not be as sophisticated (depends on the quality of the software). Some logic analyzer allow you to write your own protocol decoders. It depends on the protocol. It's much less critical for something like SPI than high-speed USB or SATA (much higher speeds, more complex protocols). You'd need a pretty beefy logic analyzer for SATA, they're 3GHz differential signals.Depending on the complexity of the protocol and the speed, a PHY/transceiver with a micro-controller might make a simple protocol analyzer.Protocol analyzers (for examplethese) are usually for well-known standard protocols, so if you'll develop a custom protocol, a logic analyzer might be more useful, unless it's a subset of some other protocol. Depending on how many products you have to design with that protocol, it might save time to develop your own custom protocol analyzer.

author: RayJones
author_rank: Frequent Contributor
timestamp: May 25, 2010, 10:04:15 am
content: It is worth considering three tools:1/ Oscilloscope - shows the real logic levels present in the circuit, can clearly show runt signals and dodgy timing.2/ Logic Analyser - shows multiple digital signals simultaneously, but only has finite levels of true or false. Bad signals can be misleading (use CRO to check levels)2 major modes of operation on the proper units - State (uses a clock edge to synchronise capture) - Timing effectively a multichannel digital signal CRO.Most of the cheapies are only timing analysers3/ Protocol Analyser - designed to capture serial data streams, sometimes with an associated clock signal, and decode to frames / ASCII data etc.especially handy for debugging / designing serial protocols between DSP's, peripherals etc.Each piece of test equipment has there purpose where they truly shine, and the do it alls will usually have some sort of limitation.All very worthwhile to have if your bent is digital logic. (and money fell out of trees)

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 25, 2010, 03:44:49 pm
content: Quote from: shafri on May 25, 2010, 04:54:30 amI'll try to clarify.Every standardized protocol has a portion of its spec to call out exactly what the signaling should look like on the wire or between nodes (I use the latter term for things like PCI Express where it may all be on the same board even). The spec defines things like whether it's differential, voltages, rise and fall times, termination, etc. And yes, they're all different. Well, SAS and SATA are enough alike they can actually share the same phy at the same time, but that's another story. Logic analyzers aren't necessarily equipped in themselves to be able to pick up these signals. For instance, the voltage levels may be low enough that even a logic '1' is seen by the analyzer that it's still just a '0'. Not to mention when you get into differential signaling and / or the speeds involved (actually SATA has a 6G addition to the spec and you'll start to see products for it). On top of all this, the attachment of the LA itself could throw the signals out of spec so now you've totally whacked the very thing you're trying to look at. Even things like the old school PCI parallel bus were fun to try and look at because the spec is actually dependent on using the reflected wave on signal transitions. So yeah, trying to put a logic analyzer on that is always fun.So, to be able to see what's going on with a very large percentage of standardized protocols, if you're trying to look at the wire directly, you use a scope to see that your signals are within spec for the electrical aspects as at that point it is every bit an analog signal as a digital one. But to be able to see and comprehend a full chunk of data whizzing by you need a protocol analyzer. If you're savvy with your digital design, we have on occasion done things like take the data stream once it's truly in the digital domain from the back side of a phy, and after it's gone through some level of your logic that puts it in the sense of bytes, words, and portions of a frame, and clock THAT out to some pins in parallel with your normal datapath, then it IS something a logic analyzer can look at more easily (assuming your LA is capable of the speeds and # of bits).But as mentioned, at that point you've only handled the electrical side of things. Then you often still need some fairly sophisticated software to make sense of the bit stream in the terms of the higher levels of the protocol.

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 25, 2010, 03:53:57 pm
content: Quote from: RayJones on May 25, 2010, 10:04:15 amI discovered it is possible to find a good used logic analyzer for about the same budget a hobbyist would spend on a decent scope. Couple months ago I came real close to squeezing the trigger on a used HP 16500C on ebay that had a couple of LA cards, pattern generators, and might have even had a DSO card for about a grand. And that was a LOT of LA.Don't know about protocol analyzers. Haven't looked. Although, if you're up for the challenge on the software front, it's not unreasonable to build your own. I've seen some teams build USB analyzers for their senior project. Use off the shelf chips for like a USB device driven by a micro, and away you go. Had limited capabilities, but enough that a hobbyist could make use of it.

author: Polossatik
author_rank: Frequent Contributor
timestamp: May 25, 2010, 04:08:31 pm
content: If you're only interested in (rather slow) serial 5v interfaces using serial protocols (SPI/I2C.) then the bus piratehttp://dangerousprototypes.com/bus-pirate-manual/might be of interest, it's only 30 usd.Note that this is nowhere a "real" protocol analyser, it only use full for serial 5v interfaces (even "real RS323" needs some kind of level adjuster / extra hardware).

author: Unknown
author_rank: Unknown
timestamp: May 25, 2010, 05:25:13 pm
content: Actually the bus pirate is 3.3V. The pins are 5V tolerant, and can output (almost) any voltage in open-collector mode. Depending on the exact logic thresholds, I'd expect it to work down to at least (most?) 2.5V. But yes, it's quite slow (PIC with 8k memory and a 115200 baud interface to your PC), and designed for interactive use, not for high-speed capture.An oscilloscope, logic analyzer and bus analyzer are each specialized subsets of each other, in my opinion. A (storage) scope can be used as a very basic logic analyzer with only a few channels, simple triggering and no state mode. It can also see much more than a logic analyzer. A logic analyzer can do a subset of the measurements you can do with a scope, but can do them much better (lots of channels, more advanced triggering, state mode, more sample memory). A logic analyzer can do basic protocol analysis (possibly with an external PHY), but a real protocol analyzer can do it much better. A logic analyzer can do lots of protocols, a protocol analyzer usually just one (or a few related).In my opinion it doesn't make sense for a hobbyist to purchase a logic analyzer before purchasing a scope (you still need a scope to troubleshoot logic levels and power supplies). It doesn't make much sense to buy a protocol analyzer before buying a logic analyzer, unless you deal with that protocol exclusively.I think for a protocol analyzer to work, you need to send something that at least resembles a correct packet, correct? Since they often use real transceiver chips. So you may not get any output if the complete header is missing/corrupt. To troubleshoot more basic problems, a logic analyzer might still be needed.

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 25, 2010, 06:29:33 pm
content: Quote from: alm on May 25, 2010, 05:25:13 pmDepends. Yes they typically use an off the shelf transceiver, but most transceivers do nothing more than take what I will call the analog signals off the wire and turn them into 1's and 0's that are at the logic levels for the given process technology, as well as bundle them into a given word width (which is sometimes programmable). And depending on the spec, some may go the extra step of doing like the 8b10b decode and such. But for anything above that you start getting into custom logic. There are also ICs available that some analyzers may use at the next level to make themselves appear as a node on the wire, but in large it depends on the software behind the hardware. The analyzers do have the ability to display down to the bit / byte level of what they received so even if things aren't formatted correctly, you can usually figure out what went on because you'll see the bits you put out it's just the sniffer tried to interpret them per what the spec says to do. So if you have something jacked up you'll see, for instance, the data payload start showing up in the header field or the CRC or something like that. Most analyzers you can put into a fairly raw mode so it does minimal interpretation of the data.Some examples of protocol analyzers I've recently played with are SAS and SATA versions of:http://www.lecroy.com/ProtocolAnalyzer/

author: RayJones
author_rank: Frequent Contributor
timestamp: May 25, 2010, 08:06:40 pm
content: Quote from: alm on May 25, 2010, 05:25:13 pmHave to pick up this.The open collector can only pull down any logic level, it is not capable of driving a logic high without side assistance (resistor etc)

author: Unknown
author_rank: Unknown
timestamp: May 25, 2010, 08:38:57 pm
content: Quote from: RayJones on May 25, 2010, 08:06:40 pmYou are correct, but they have on-board pull-up resistors (which is quite common for open collector outputs), if you want any voltage other than 3.3V or 5V however, you'll have to provide your own reference voltage.

author: chscholz
author_rank: Regular Contributor
timestamp: May 25, 2010, 08:39:25 pm
content: You can do a limited set of functions of a logic analyzer with a mixed signals oscilloscope (available either as dedicated mixed signals oscilloscope of as a hardware option for medium and high-end oscilloscopes)Many modern oscilloscopes have decode (and sometimes trigger) options for low-speed serial data.For PCIe you can even do some of the functions of a protocol analyzer with an oscilloscopehttp://www.lecroy.com/Options/ProductDetails.aspx?modelid=2129&categoryid=12&groupid=88&capid=102&mid=Of course none of these software options and hardware boxes replaces the "real thing".