Test, Debugging & Instrumentation

a logic analyzer

A logic analyzer is like an oscilloscope that gave up caring about the exact shape of a wave and instead watches many digital lines at once, asking only one question of each: is it a 1 or a 0 right now? In a digital system you rarely care that an edge is 3.31 V — you care that eight or sixteen wires changed in a particular pattern at a particular moment. A logic analyzer captures all those lines together and lays them out as neat rows of highs and lows over time, so you can see a whole bus talk.

Each input compares the line against a threshold voltage: above it is a logic 1, below it a 0, and the instrument records just that single bit per channel per sample. With eight, sixteen, or more channels it can watch an entire parallel bus or several serial lines side by side, all time-aligned. The real magic is protocol decoding: tell it the lines are an I2C, SPI, or UART link and it will translate the raw highs and lows back into the actual bytes and addresses being exchanged, so a confusing tangle of edges becomes a readable conversation like 'write 0x3C, ack, 0x01'.

Why it matters: when a microcontroller talks to a sensor or memory and nothing works, the logic analyzer shows you whether the right bytes are actually on the wires and where the handshake breaks. Two honest limits keep it in its lane. It is blind to analog detail — it cannot show you ringing, a marginal voltage, or noise, only the 1/0 decision, so a borderline signal can fool it; for that you still need a scope. And like any sampler it must run fast enough: its sample rate has to be several times the bus speed, or fast pulses slip between samples and the capture lies.

An I2C sensor returns nothing. You clip a two-channel logic analyzer on SDA and SCL, capture, and turn on I2C decoding. It shows the master sending address 0x48 but no acknowledge bit coming back — so the device never answered. A quick check reveals the address pin was wired for 0x49, not 0x48: found in seconds.

Many lines, one question each — 1 or 0 — decoded back into the bytes on the bus.

A logic analyzer only sees logic levels, never the analog story, so a signal sitting in the murky region between valid 0 and valid 1 may be read as either — sometimes you must reach for the scope to see what the analyzer cannot.

Also called
LA邏輯分析儀