Email Address:

Lost your password?

This is the legacy website; please use the new website.

The I2C Bus: A Quick Primer

Developed by Philips over 25 years ago, the I2C bus is now a well-established standard for low to medium-speed data communication between ICs. However, its basic operation still isn't well understood, except by people in the chip design business. Here's a quick primer to bring you up to speed.

By Jim Rowe

BACK ABOUT 1980, when digital ICs were really starting to be used in consumer gear such as car radios, stereo systems and TV sets, Philips developed a low-cost interfacing tech-
nique for allowing the various ICs in a system to exchange data at a low to medium speed. They called it the "Inter-Integrated Circuit" or "I-squared-C" (I2C) bus and it rapidly became very widely used for data communication between ICs in all kinds of equipment.

These days, I2C is found not just in consumer audio and video gear but in computer and industrial equipment as well. In fact, it’s now used in over 1000 ICs, made by more than 50 different companies worldwide. So it’s well worth knowing how this very versatile bus works.

I2C is usually described as a 2-wire synchronous serial bus, although strictly speaking it’s a 3-wire bus because the PC board’s ground line is also an essential part of the communications link. The two nominal wires or "lines" are the data or SDA line and the clock or SCL line. Both of these lines are regarded as bidirectional and to allow this they are both used in wired-OR or "open drain/open collector" mode.

This means that both lines are connected to the PC board’s positive supply rail only via pull-up resistors and can only be pulled down to logic low (or ground potential) by the circuitry inside the chips connected to the bus lines. So strictly speaking, any chip connected to the SDA or SCL lines can pull them down but if none of the chips does so, both lines are pulled high by the external resistors. This is known as the "idle bus" condition, incidentally.

Click for larger image

Click for larger image

In its most basic form, I2C is used for "master-slave" communication – where one device takes control of the bus as the master, to send data to or request data from another device acting as the slave. It’s true that because both the SDA and SCL lines are bidirectional, any device on the bus can initiate a data transfer as the master and similarly, any device can play the role of the slave.

So the I2C bus can operate as a multi-master bus and in fact its official specification provides for bus contention and resolution situations, where two devices try to take control of the bus at the same time. However, in most common applications, there is a single master device (usually a microcontroller) and the rest of the devices are used as slaves. These slave devices may be digital tuning chips, controlled-gain amplifier or filter chips, video switching or processing chips, EEPROM memories and LCD panels, etc.

Fig.1 shows the basic master-slave I2C interface circuit. As shown, there are really three lines between the master and slave chips: SCL, SDA and ground. The external pull-up resistors (Rp) provide the only connections between the SCL and SDA lines and the positive supply rail (+V).

Share this Article: 

Privacy Policy  |  Advertise  |  Contact Us

Copyright © 1996-2019 Silicon Chip Publications Pty Ltd All Rights Reserved