I2C stands for “Inter-integrated circuit,” or “inter-IC,” and is a simple, 8-bit, serial communication bus protocol that uses just two bus wires; a serial data wire (SDA) and a serial clock wire (SCL). I2C is integrated into many ICs and allows devices to communicate directly with each other, avoiding CPU cycles. I2C operates on a master-slave basis, and all devices on an I2C bus have a unique address. I2C is used both internally in integrated chips to communicate between areas in the chip-based circuit, as well as externally, from chip to chip.
I2C was created by Philips Semiconductor in 1982. (Philips was bought by NXP Semiconductor in 2006.) According to NXP’s I2C-bus Specification and User Manual v6, published in 2014, I2C is “implemented in over 1000 different ICs manufactured by more than 50 companies.”
Integrated chips that integrate I2C capability cover many different applications and devices. For instance, a majority of sensor ICs incorporate I2C communication into their circuitry, as long as I2C data transfer rates are sufficient for a control loop’s purposes. The same is true for I2C communication to output devices such as displays, LEDs, and data converters. However, other devices such as real time clocks, memory devices, and many others also use I2C to communicate information to other chips, which is often a microcontroller or processor.
Table 1: The Various Data-Transfer Rates for I2C
Mode | Data Transfer Speed | Data Travel | Acronyms |
Standard | 100 Kbits/sec | Bi-directional | |
Fast | 400 Kbits/sec | Bi-directional | |
Fast Mode Plus | 100 Kbits/sec | Bi-directional | Fm+ |
High-Speed | 3.4 Mbits/sec | Bi-directional | Hs |
Ultra-Fast | 5 Mbits/sec | Uni-directional | UFm |
I2C is a multi-master bus that uses collision detection and arbitration to avoid issues when two masters initiate communication at the same time. Arbitration is a procedure that prevents message corruption. Without arbitration, the “winning” message would get corrupted with bits of information interjected by the competing message. Nevertheless, I2C allows multiple masters on the same I2C bus line, which means that more than one chip can attempt to control the bus line at a time; arbitration decides who is the master if two or more chips attempt to control the bus at the same time. For I2C, arbitration works in a deterministic manner; that is, it is a known issue as to whether a master has control or not and is based on the SDA and SCL line status. It is important to note that not all devices that support I2C support multi-master mode.
The number of ICs using an I2C bus is limited “only by a maximum bus capacitance,“[i] however theoretically, since an address is either seven bits or nine bits long (followed by a data direction bit), the limit is 128 devices on one I2C bus since a 7 bit number goes from 0 to 127.
I2C has become a de facto standard because it is easy to use and offers a shortcut that designers use to eliminate having to design a communication system, I2C is easy to debug, I2C can be easily added or removed without affecting other devices on the I2C bus, and I2C has very low current consumption, high immunity to noise, and offers a wide range of supply voltages for system compatibility. I2C’s main benefit to designers, however, is that it can reduce the use of I/O pins on a chip (as long as the I2C bus speed is sufficient to not cause a bottleneck in data transfer.)
I2C’s main “competitors” as a simple communication bus are the Serial Peripheral Interface (SPI), plain old serial interface, and for external communication, perhaps USB. The main advantage that I2C provides communication between several devices on a simple 2-wire bus, which significantly reduces traces on a PCB and the pin count needed to implement it. Serial communication is primarily intended for communication between two devices. SPI and USB both require more pins to implement a communication transfer scheme, although both of these can also support communication between many different devices. SPI is used when faster data rates (up to 10 Mbits/sec) and full-duplex (sending and receiving in both directions simultaneously) are desired. However, SPI does not support multiple masters. USB has more pins than I2C but has taken over as the default communication bus (formerly serial communication) in personal computers (PCs) such that serial communication ports are now absent on PCs. USB, a faster communication bus than I2C, was designed for external use and is much more complicated than I2C to implement. USB provides more than is necessary for communication between chips and is definitely “overkill” if used as an I2C replacement.
For complete information on I2C, see the I2C-bus specification and User Manual by NXP Semiconductor
[i] I2C-bus specification and user manual. (2014, April 4). Retrieved January 5, 2017.
Leave a Reply