I2C Protocol
The I2C stands for the inter integrated controller. The I2C protocol is a serial communication protocol that is used to connect low-speed devices. For example, EEPROMs, microcontrollers, A/D and D/A converters, and input/output interfaces. It was developed by Philips semiconductor in 1980 for inter-chip communication. Almost all major IC manufacturers now use it. It is a master-slave communication in which you can connect and control multiple slaves from a single master. In this, each slave device has a particular address. It supports various data rates according to versions ranging from 100 Kbps, 400 Kbps, 1 Mbps to 3.4 Mbps. It is synchronous communication like SPI.
I2C interface
I2C protocol uses only two cables for the communication in which one cable is used for the data (SDA), and another cable is used for clock (SCL). Both cables are required to pull up with a resistor for + Vdd. It can be used to link two I2C buses with different voltages.
Applications of I2C
It is the best choice for those applications that require less costly and easy implementation rather than high-speed.
- Reading certain memory ICs
- Accessing DACs and ADCs
- Transmitting and controlling user-directed actions
- Reading hardware sensors
- Communicating with multiple micro-controller
Advantages of I2C
There are the following advantages:
- It provides flexible data transmission rates.
- It provides long-distance communication than SPI.
- Each device on the bus is controlled independently.
- It increases the complexity of firmware or low-level hardware.
- This protocol imposes overhead that also reduces throughput.
- This protocol requires only two cables.
- It can accommodate several master interactions through arbitration and collision detection.
Disadvantages of I2C
- The complexity of hardware increases when no. of master/slave devices are high in the circuit.
- It provides a half-duplex mode for communication.
- It is managed by the stack.
- Many devices have multiple addresses stored, which can cause conflicts.
Difference between the I2C and SPI protocol.
I2C | SPI |
---|---|
I2C stands for the Inter-integrated controller. | SPI stands for the Serial Peripheral Interface. |
It was developed by Philips semiconductor in 1980. | It was developed by Motorola in the mid-1980. |
It is a half-duplex protocol. | It is a full-duplex protocol. |
It supports the multiple master configuration. | It does not support the multiple master configuration. |
More overhead. | Less overhead. |
I2C protocol uses two cables for communication (CCL and SDA). | SPI protocol uses four cables for communication (MISO, MOSI, CS, and CLK). |
Its data transfer speed ranges from 100kHz to 400kHz. | Its data transfer speed up to 25 MHz. |
It is a multi-master protocol. | It is a single master protocol. |