Ramblings of an aging IT geek
← Ramblings of an aging IT geek
hardware

a cheap logic analyser, and finally seeing the bus

How an eight-quid logic analyser turned a guess-and-poke I2C problem into something I could actually read off the screen.

A breadboard and probes on an electronics bench

For years I debugged serial buses by intuition. The sensor was not responding, so I would change a pull-up, swap a wire, retry the address, and eventually something would work and I would have no idea why. It is a miserable way to spend an evening, half voodoo and half stubbornness.

Then I bought one of those eight-channel clones for about eight quid, the little blue ones that show up as a Saleae if you squint, and ran it with sigrok and PulseView. The first time I captured a failing I2C transaction and saw the waveform decode straight into hex on the screen, address, ACK, NACK, the actual bytes, I felt slightly cheated. All those evenings.

The bug was obvious once I could see it. I was getting a NACK on the address because the device was at 0x68, not 0x69, and the breakout's address pin was floating, not tied low like I had assumed. No amount of wiggling pull-ups was ever going to fix that. The analyser told me in one capture.

The thing nobody says about these cheap analysers: the value is not the hardware, it is finally being able to see. A bus you can read is a bus you can fix. A bus you are guessing at will eat your whole evening and leave you no wiser. Eight quid to stop guessing is the best money I have spent on the bench this year.