A toolkit to monitor, diagnose and validate I2C systems.
This project has only just started. It's nowhere near ready for release.
The design is experimental and likely to change. Do not expect the API to remain stable until I create a release with a version number.
I haven't organised the documentation properly. It's still more of a set of working notes.
I haven't made any attempt to make this project friendly to use. You'll need to download or clone the code and install it in a way that suits your IDE.
If you're wondering how to get code out of GitHub then you're not alone! Here are some instructions for downloading or cloning this library. The page also explains how to download a different branch.
The Pullup Resistors and Rise Times page describes how to set and tune your pullups.
There are links to other I2C resources at the bottom of the page.
Slow rise times are one of the most common problems with I2C. You can use the LineTester class instead of an oscilloscope to measure the rise times directly
The Pullup Resistors and Rise Times page describes how to set and tune your pullups in detail.
The BusRecorder records electrical activity on an I2C bus. It's a bit like having an oscilloscope.
It creates a trace which shows each transition from HIGH to LOW and back again for both SDA and SCL. It also records the interval between these events.
You can use it to:
- record I2C traffic
- measure the bus clock speed
- check for I2C logic errors
- verify that an I2C device conforms to the I2C specification
- detect glitches which may be caused by electrical noise
See Analysing BusRecorder Traces for more information about analysing traces.
The BusMonitor
watches an I2C bus and reports whether it's idle, busy
or stuck. Nothing can use the bus once it becomes stuck. You can free
a stuck bus by sending a set of clock pulses or with a hardware reset.
The Stuck Bus Example
shows how to use the monitor. The Monitor Master Example
contains code to recover a stuck bus. See: