ATmega328PLM75BMOTOR1const byte ADDR = 0x90;const byte ADDR = 0x48;2Wire.beginTransmission(ADDR);3Wire.write(0x00); // Temp4byte e = Wire.endTransmission();4 MS/s50 MS/sS010x900x200x48ACK!
0255075100SDASCLt (µs)CAPTURE · ADDRESS BYTET0010000011001000000x10 WNACK0x48 WACK00.511.5250MS/s4MS/swiret (µs)ZOOM · SCL, 2 µs0 of 9 samples hit5 samples hitT: 100 ns < 1 µsarmed · no trigger
Back: the Uno's chip, the LM75B sensor, the SCL and SDA traces and a motor wireFront: the driver code and the logic analyser with its probe leadsBelow: the analyser's screen, the captured frame and a zoom on SCLAn Arduino Uno R3 talks to an LM75B temperature sensor over I2C, with a logic analyser clipped onto SCL and SDA. Triggered on the START, the capture decodes as address 0x10 and a NACK, because the driver passed the 8-bit form 0x90; with 0x48 the sensor ACKs. A 100 ns spike on SCL hides between 4 MS/s samples and is caught at 50 MS/s with a pulse-width trigger.

Set up the analyser

  1. Our Uno asks an LM75B temperature sensor for a reading over I2C and gets nothing back. Clip on a logic analyser: channel 0 to SCL, channel 1 to SDA, and its ground to the board's ground.

Find the NACK

Catch a glitch

What happens

;; step 1/10 · probes
board     Arduino Uno R3 (ATmega328P, 5 V)
sensor    LM75B, runs on 2.8 to 5.5 V
CH0  ->  SCL (clock)      CH1  ->  SDA (data)
GND  ->  board ground: the 0 V both read against
the analyser records each wire as 0 or 1

The capture is drawn with idealised square edges and an evenly spaced 100 kHz clock (SCL high and low 5 µs each). A real bus has slow rising edges set by the pull-up resistors, and the Uno's clock is not exactly half high and half low. Whether the 4 MS/s capture misses a 100 ns spike depends on where it falls: with 250 ns between samples it is missed whenever no sample lands inside it. At 50 MS/s at least 5 samples always land on it.