DIY Electronics
— Building circuits, programming microcontrollers, and making things blinkRust on the Raspberry Pi Pico — setting up the toolchain
Oscilloscope-Based I2C Debugging
Using a scope on I2C seems redundant when you have a logic analyzer, but there are signal integrity problems that only show up on a scope. Here's what to look for.
Slew rate: I2C rise times should be 300-1000ns in standard mode, 20-300ns in fast mode. Faster and you get EMI; slower and you approach the maximum rise time spec and risk bit errors. Slow rise times mean your pull-up resistors are too weak or your bus capacitance is too high. The fix is lower pull-up resistor values (1kΩ instead of 10kΩ).
Overshoot and ringing: if you see oscillation after a rising edge, your pull-up current is too strong relative to bus capacitance and trace inductance. Add a small series resistor (22-47Ω) on each I2C line near the master — this forms an RC damping network that kills the ringing without significantly affecting the bus speed.