Monday, April 9, 2018

What is I2C


Original Post from :- https://www.lifewire.com/learn-how-windows-4102761
Thanks  To Originl Poster :- Matthew Burris 





Developed by Philips in the 1980's, I2C has become one of the most common serial communication protocols in electronics. I2C enables communication between electronic components or IC to IC, whether the components are on the same PCB or connected via a cable. The key feature of I2C is the ability to have a vast number of components on a single communication bus with only two wires which makes I2C perfect for applications that demand simplicity and low cost over speed.


Overview of the I2C Protocol

I2C is a serial communication protocol that only requires two signal lines that was designed for communication between chips on a PCB. I2C was originally designed for 100kbps communication but faster data transmission modes have been developed over the years to achieve speeds of up to 3.4Mbit. The I2C protocol has been established as an official standard, which provides for good compatibility among I2C implementations and good backward compatibility.

I2C Signals

The I2C Protocol uses only two bi-directional signal lines to communicate with all of the devices on the I2C bus. The two signals used are:
  • Serial Data Line (SDL)
  • Serial Data Clock (SDC)
The reason that I2C can use only two signals to communication with a number of peripherals is in how communication along the bus is handled. Each I2C communication starts with a 7-bit (or 10-bit) address that calls out the address of the peripheral the rest of the communication is meant to receive the communication.
This allows multiple devices on the I2C bus to play the role of the master device as the needs of the system dictate. To prevent communication collisions, the I2C protocol includes arbitration and collision detection capabilities which allow smooth communication along the bus.

Advantages and limitations

As a communication protocol, I2C has a lot of advantages that make is a good choice for many embedded design applications.
I2C brings the following advantages:
  • I2C only requires two signal lines
  • Flexible data transmission rates
  • Each device on the bus is independently addressable
  • Devices have a simple Master/Slave relationship
  • I2C is capable of handling multiple master communications by providing arbitration and communication collision detection
  • Longer distance communication than SPI
  • With all of these advantages, I2C also has a few limitations that may need to be designed around. The most important I2C limitations include:
    • Since only 7-bits (or 10-bits) are available for device addressing, devices on the same bus can share the same address. Some devices are capable of configuring the last few bits of the address, but this still imposes a limitation of devices on the same bus.
    • Only a few limited communication speeds are available and many devices do not support the transmission higher speeds. Partial support for each speed on the bus is required to prevent slower devices from catching partial transmissions that will result in operational glitches.
    • The shared nature of the I2C bus can result in the entire bus hanging when a single device on the bus stops operating. Cycling the power to the bus can be used to restart the bus and restore proper operation.
    • Since devices can set their communication speed, slower operational devices can delay the operation of faster speed devices.
    • I2C draws more power than other serial communication busses due to the open-drain topology of the communication lines.
    • The limitations of the I2C bus typically limit the number of devices on a bus to around a dozen devices.
    • Applications

      The I2C bus is a great option for applications that require low cost and simple implementation rather than high speed. For example, reading certain memory ICs, accessing DACs and ADCs, reading sensors, transmitting and controlling user directed actions, reading hardware sensors, and communicating with multiple microcontrollers are common uses of the I2C communication protocol.


No comments:

Post a Comment

frp

link