I2C Communication is a part and parcel of embedded system design; especially for systems where the priority is not focused on achieving very high clock rates. So, it should come as no surprise that I2C is widely used in low-speed and low-cost applications. The technology was first conceived in 1982 and in spite of being three decades old, the popularity and applications of I2C haven't decreased in number. Even today, I2C protocol powers a vast majority of entry-level and mid-level embedded system designs and it is likely to continue to do so in the near future.
The naming conundrum: First of all, let’s throw some light upon the terminology problem that I2C suffers from. To say that it is a major problem would be going overboard. Nevertheless, there are various terminologies associated with I2C and that creates a certain degree of confusion when someone reads or hears about it for the first time. You might find a number of engineers, professors, and technicians who prefer writing it as I2C (pronounced I Squared C) to I2C. In the past, IIC (pronounced double I C) used to be quite common.
So, what exactly is I2C? Inter-Integrated Circuit – that’s what I2C stands for. The I2C protocol is used to establish communication between two or more ICs (Integrated Circuits), hence why it’s known as Inter-Integrated Circuit (I2C) communication. However, it should be noted that I2C could also be used as a communication protocol between two ICs that are located on the same PCB.
Where and how is it used? In short, when you need to establish short distance communication within the same board or device, you can use I2C. It requires only two bidirectional wires for transmitting and receiving information. You also need to know that I2C protocol supports serial communication only. The protocol is very popular and multiple peripheral ICs are connected in master-slave configurations. Talking about master-slave configuration, you have a lot of flexibility when it comes to using the I2C protocol. I2C allows designers to establish two-way communication between multiple master ICs and slave ICs. In fact, you can connect as many as 1008 slave devices.
A brief idea about the speed of communication: As far as the speed of communication is concerned, we have already mentioned that I2C is best suited for low-speed applications. That being said, recent improvements have made it possible to achieve speeds as high as 3.4Mbps. In low-speed mode, the I2C bus usually works at 10kbs. Standard speed mode allows you to increase the speed to 100kbs. Two other modes namely the fast mode and the fast mode plus support 400KBps and 1Mbps respectively.
However, it doesn’t mean that your design will be limited by these default values. You can use arbitrary values as well. These speeds are more than enough for embedded system applications. An embedded engineer can use the I2C protocol for PC design as well.
So, for the budding and young engineers, it would be best if you confine I2C protocol within the realm of embedded system design.
I2C communication or protocol has a significant edge over its peers such as serial port communication and SPI. Let us have a look into the various advantages that renders the I2C protocol so effective for short distance intra-board communication.
1. Flexibility – The I2C protocol supports multi-master, multi-slave communication, which implies you can add a lot of functionality to your design. More than one master IC controlling and communicating with the slave ICs can speed things up and add functionalities to the embedded system.
2. Addressing feature – Yet another advantage of the I2C protocol lies in its inherent ability to use chip addressing. It means that you can easily add components to the bus without any complexity. It eliminates the necessity of CS (chip select) lines.
3. Simplicity – I2C protocol doesn’t complicate the design. It requires only two bidirectional signal lines to establish communication among multiple devices. Further, the pin count is low as well.
4. Better error handling mechanism – To improve the error detection and correction mechanism, the I2C protocol relies on ACK/NACK feature, which is a robust error correction feature. ACK stands for Acknowledgement whereas NACK means No Acknowledgement.
5. Adaptable – The I2C protocol is adaptable in the sense that it can work well with both slow ICs and fast ICs.
I2C communication doesn’t have too many disadvantages. The fact that the protocol has been in use for over 30 years highlights this fact. However, it suffers from a few minor limitations.
1. Conflicts – Due to chip addressing, there’s always a possibility of an address conflict.
2. Slower speeds – I2C protocol uses pull-up resistors rather than the push-pull ones used by its peers. Due to the open-drain design, the speed is limited.
3. Requires more space – Now, as an embedded system engineer, you know how valuable PCB real estate is. So, it isn’t such a positive attribute that the I2C protocol requires so much space for its pull-up resistors.
Despite these minor limitations, I2C is a robust and desirable protocol. It achieves exactly what it was meant to - facilitate low-speed communication. So, if you are designing an entry-level embedded system, I2C communication may be the right choice for you.
Learn more about Total Phase’s line to I2C products:
Have questions about using I2C in your latest project? Contact us, we would be happy to consult with you on your objectives and how to achieve them.