What is a Logic Analyzer?

TL;DR - Logic analyzers are the best tools for measuring and viewing digital electronic signals, and digital protocols like I2C, SPI, and Serial. The most common use case is debugging.

I2C on a Logic Analyzer

I2C on an Oscilloscope

Because digital information is typically always changing much to quickly to see, logic analyzers record the signal, so you can take your time inspecting it.

The primary functions of a logic analyzer are to:

  • Record a digital signal and move it to a computer.
  • Display the digital signal, and provide a way to navigate a potentially very long recording.
  • Provide a way to measure the time between different points in the displayed signal.
  • Interpret the contents of the digital signal via a “protocol analyzer” depending on what format the communication is using, such as SPI, I2C, Serial, CAN, etc.

In the real word, all electrical signals are all analog. No matter how perfect a square wave is, when you look closely enough, it is not a square wave — it is a completely analog wave shape which more or less resembles a digital shape.

Ideal shape, and a possible real shape.

Logic analyzers - and all digital components such as microcontrollers and Arduinos - pretend that analog signals are actually digital signals; that is, when the voltage is below a certain threshold (for example 0.5V) it says “this is a zero” and when the voltage is above a certain threshold (for example 0.5V) it says “this is a one”.

Here, a signal below .5V is considered a "0"; above .5V is considered a "1"