The logic analyzer

Four probes, every edge with the time it happened, and a timing diagram on the face of the instrument.

A scope answers "what shape is that signal". This answers "in what order did those four things happen", which is the question every bus raises.

It is on the bench beside the oscilloscope, the meter and the generator, and it is the instrument for digital work. A scope is for a waveform: a sine, a ramp, a capacitor charging. An analyzer is for a sequence: which edge of SCL the data was stable on, whether the chip select really went low before the first clock, whether the stepper's four coils are being switched in the order the sketch thinks.

It records edges, not samples

A scope samples on a timer and sends whatever the voltage was. This part is event driven, like the kernel it lives in, and records changes. Nothing is recorded while nothing moves.

That is not a shortcut, it is why the readings are exact. A capture of an I2C transfer is a few hundred records rather than a few million samples, and the time on each one is the picosecond the kernel says it happened at, rather than a number rounded to whichever sample interval you happened to pick.

Four channels that change in the same instant are one record, not four.

A channel on nothing is not a channel on a zero

Clip a probe to nothing and it is floating, and the difference between that and low is most of what an analyzer is for. Each channel carries a known bit beside its level, and the diagram draws an unknown channel down the middle of its lane rather than pretending it is a nought.

The probes are listen-only and present no load at all, which is the one way this is better than the bench: a real probe is a few picofarads and can stretch an edge on a high-impedance node.

The face

  • - and + step the window through 1, 2, 5 per decade, the way the scope's time base does. They change the property the panel also edits, so the setting is saved with the circuit, and they poke the running part as well, so the picture moves without the simulation restarting. Nothing is lost by zooming: every edge is kept whatever the face happens to be showing.
  • C throws the capture away and starts again from wherever the signals are now.
  • the down arrow hands the whole capture over as a CSV file: one row per moment, a column per channel, a floating channel written as an empty cell. It opens in a spreadsheet, which is where an argument about timing usually ends.

The strip under the screen says how much time is across it and how many edges are in the capture.

Reading a capture

The three things worth practicing, in rough order of usefulness:

  1. Order. Lay the probes on a bus and read down the screen: address, then acknowledge, then data. Most bus faults are an order fault.
  2. Width. A DHT's nought is 27 us of high and its one is 70; a NEC nought is one unit of space and a one is three. Zoom until one bit fills a division and the two are obviously different lengths.
  3. Skew. Two signals that should change together, and do not. A ripple counter's second stage changes one gate delay after its first, which is why it is called a ripple counter and why a fast design uses a synchronous one.

What is not modeled

A trigger, a pre-trigger buffer and a sample depth: it records everything from the start of the run and the face shows the end of it. A real analyzer arms on a condition and captures around it, which is what you want when the event is rare.

A threshold. A channel is high or low by the same half-supply rule every other part here uses, so this cannot show you a signal sitting in the forbidden band between the two, which on a real bench is a common and confusing fault.

Probe capacitance and ground-lead inductance, as above. More than four channels. Protocol decoding is there for UART, I2C and SPI (the part's decode setting), but nothing past those three, and a decode only reads what was captured: it will not guess through a floating stretch.

The circuit to open

Stepper dial on the analyzer: the 28BYJ-48's four coil lines on D0 to D3, with the eight-row half-step sequence walking across the screen as the knob turns. Swap two of the four wires and watch a perfectly good sequence arrive in an order the rotor cannot follow.