badge icon

This article was automatically translated from the original Turkish version.

Article

I2C (Inter-Integrated Circuit)

Quote
Comm_I2C_250-250x250.png
I2C Communication Protocol
Full Name
I²C (Inter-Integrated Circuit)
Developer
Philips Semiconductor (NXP Semiconductors)
Type
Synchronous Serial Communication Protocol
Communication Type
Master–Slave
Number of Channels
2
Alternatives
SPI UART

I²C (Inter-Integrated Circuit), commonly pronounced as I-squared-C or I-two-C, is a short-distance, low-speed, bidirectional, two-wire serial communication protocol developed by Philips (now NXP Semiconductors) in the early 1980s. It is designed for communication between integrated circuits (ICs), particularly on a single printed circuit board (PCB). Due to its simplicity and low pin count requirement, it is widely used in embedded systems.

Key Features

  • Two Signals: Uses only two signal lines for communication:
    • SDA (Serial Data Line): Serial data line. Enables bidirectional data transfer.
    • SCL (Serial Clock Line): Serial clock line. Carries clock signals that synchronize data transfer. Typically controlled by the master device.
  • Master-Slave Architecture
    • Master: The device that initiates communication and generates the clock signal (SCL). It can send data to or request data from slave devices.
    • Slave: The device addressed by the master and responds to its commands. It can receive data from or send data to the master.
  • Multi-Master Support: Allows multiple devices to assume the master role. A collision detection and arbitration mechanism determines which master gains control of the bus if multiple masters attempt to transmit simultaneously.


I²C Protocol Connection Diagram (Analog Devices)



Addressing: Each slave device has a unique address on the bus, typically 7-bit, sometimes 10-bit. The master selects the target slave device using this address.


Acknowledgement Mechanism (ACK / NACK): After each byte (8 bits) is transferred, the receiving device sends an ACK bit to confirm successful reception or a NACK bit to indicate an error, such as being busy or unable to receive the data.


  • Speed Modes: Operates at various speeds:
    • Standard Mode: Up to 100 kbit/s
    • Fast Mode (Fm): Up to 400 kbit/s
    • Fast Mode Plus (Fm+): Up to 1 Mbit/s
    • High-speed Mode (Hs-mode): Up to 3.4 Mbit/s
    • Ultra Fast-mode (UFm): Up to 5 Mbit/s (unidirectional)


Open-Drain / Open-Collector Outputs: The SDA and SCL lines have open-drain (CMOS) or open-collector (TTL) outputs. This allows multiple devices to connect to the same bus and enables wired-AND logic operation. Therefore, these lines must be connected to VDD (supply voltage) via external pull-up resistors.

Operation Principle

  • Start Condition: The master initiates communication by pulling the SDA line from high to low while the SCL line is high.
  • Addressing: After the start condition, the master sends the 7-bit (or 10-bit) address of the target slave device followed by a R/W bit indicating read (1) or write (0) operation.
  • Acknowledgement (ACK): If the addressed slave recognizes its address and is ready to communicate, it pulls the SDA line low for one clock pulse to send an ACK bit.
  • Data Transfer:
    • Write Operation: The master sends data bytes to the slave. After each byte, the slave responds with an ACK.
    • Read Operation: The master receives data bytes from the slave. After each byte, the master sends an ACK if more data is expected, or a NACK if it has received the final byte.
    • Data bits are set on the SDA line while the SCL line is low and sampled on the rising edge of SCL. The most significant bit (MSB) is transmitted first.
  • Stop Condition: The master terminates communication by pulling the SDA line from low to high while the SCL line is high.
  • Repeated Start Condition: A master can send a repeated start condition without issuing a stop condition to switch to another slave device or change the operation mode (read/write) with the same slave.
  • Clock Stretching: A slave can temporarily hold the SCL line low if it needs more time to process or send the next bit. The master must wait until the SCL line returns to high.

Applications

I²C is used in a wide range of applications within embedded systems:

  • Reading data from sensors such as temperature, humidity, accelerometers, and gyroscopes.
  • Writing to and reading from EEPROM and flash memory chips.
  • Setting and reading time and date information from real-time clocks (RTC).
  • Controlling analog-to-digital converters (ADC) and digital-to-analog converters (DAC).
  • Controlling LCD and OLED display controllers.
  • Power management ICs (PMIC).
  • Fan speed control and system status monitoring.
  • Touchscreen controllers.

Advantages and Disadvantages


Author Information

Avatar
AuthorYağmur Yıldız ParıltıDecember 4, 2025 at 3:06 PM

Tags

Discussions

No Discussion Added Yet

Start discussion for "I2C (Inter-Integrated Circuit)" article

View Discussions

Contents

  • Key Features

  • Operation Principle

  • Applications

  • Advantages and Disadvantages

Ask to Küre