What is I2C? How does it work? // Technology

Common issues

I2C is a fairly straight foward interface, but there are a few things to watch out for:

  • Bus speeds – Make sure all your I2C devices on the bus operate at the same speed, otherwise you’ll see bus arbitration issues.
  • Termination – Ensure you have pullup resistors on SDA and SCL for every I2C device on the bus, otherwise you could potentially see the bus hang and be non-responsive.
  • Logic levels – Some 3.3v devices are 5v tolerant, but not all. So always check your voltages!
  • Cable length – At higher speeds keep your cable length short. Heck, at any speed keep your cable length short.
  • Dodgy devices – Some devices don’t fully adhere to the I2C spec and don’t have an open-drain SCL. These types of masters won’t work on a multi-master bus nor support clock stretching.
  • Software – Some I2C software implementations, aka bit bashing, don’t fully adhere to the spec and you’ll see lots of bizarre issues there.

Linky links

  • http://www.esacademy.com/en/library/technical-articles-and-documents/miscellaneous/i2c-bus/general-introduction/bus-arbitration.html
  • https://www.i2c-bus.org/i2c-bus/
  • https://en.wikipedia.org/wiki/I%C2%B2C
  • http://www.robot-electronics.co.uk/i2c-tutorial
  • http://i2c.info/

If you like this YouTube channel please subscribe by clicking the in-video button, or the little red "Subscribe" button in your browser or app. You can also get updates by subscribing to me on Facebook, Twitter, Google+, Pinterest, and also Tumblr.