</>EmbeddedInterview

What is a logic analyser and when do you use it instead of an oscilloscope?

EasyDebugging, Testing & Tools

Short answer: A logic analyser captures many digital signals (8–32+ channels) as 1s and 0s over long periods and decodes protocols (SPI, I2C, UART, CAN, 1-Wire, I2S, SWD), so it answers "what data was sent, in what order and with what timing between events". An oscilloscope shows the analog waveform of a few channels — voltage levels, rise times, ringing, noise, power-supply ripple — so it answers "is this signal electrically correct". Use the logic analyser for protocol and timing logic; use the oscilloscope when you suspect signal integrity, power or analog problems.

Logic analyser Oscilloscope
Channels 8–34+ 2–8
Shows logic levels vs time, decoded protocols real voltage waveform
Capture length long (seconds to minutes, streaming) short at high sample rates (deep memory helps)
Finds wrong commands, missing ACKs, CS timing, ISR timing (with GPIO markers), sequence errors ringing, slow edges, glitches, wrong levels, noise, supply dips, crosstalk
Typical tools Saleae Logic, DSLogic, sigrok/PulseView with cheap analysers Rigol, Siglent, Keysight, Tektronix; mixed-signal scopes (MSO) combine both

Typical workflow: the logic analyser shows that an I2C sensor sometimes NACKs; the oscilloscope then shows that SDA's rising edge is too slow because the pull-up is too weak — two tools, one bug.

Timing measurements: toggle GPIOs at points in firmware (ISR entry/exit, task start, DMA complete) and capture them with the logic analyser alongside the bus signals to measure latency, execution time and jitter precisely without debugger interference.