I2C (Inter-Integrated Circuit, pronounced “I-squared-C” or “I-two-C”) is a synchronous, multi-master, multi-slave serial communication bus protocol developed by Philips Semiconductors (now NXP Semiconductors) in the early 1980s. Designed for short-distance, low-speed communication between integrated circuits (ICs) on a single printed circuit board (PCB), I2C is widely used in embedded systems, consumer electronics, and industrial devices. It uses just two bidirectional wires for data transfer and clock synchronization, making it a simple, cost-effective solution for connecting peripheral devices (e.g., sensors, EEPROMs, displays) to microcontrollers (MCUs).
Unlike other serial protocols (e.g., SPI, UART), I2C supports multiple master devices and addressable slave devices on the same bus, with no need for separate chip select lines.
Core Technical Specifications
I2C defines the physical layer (PHY) and data link layer specifications for serial communication, with key parameters standardized by the I2C Bus Specification (currently Version 7.0, 2021):
| Parameter | Specification |
|---|---|
| Bus Wires | Two bidirectional lines:- SDA (Serial Data): Transmits/receives data- SCL (Serial Clock): Carries the clock signal (generated by the master) |
| Voltage Levels | Typically 3.3V or 5V (logic levels); some low-power variants support 1.8V |
| Data Rates | – Standard-mode (Sm): 100 kbps- Fast-mode (Fm): 400 kbps- Fast-mode Plus (Fm+): 1 Mbps- High-speed mode (Hs-mode): 3.4 Mbps- Ultra-fast mode (UFm): 5 Mbps |
| Number of Nodes | Limited by bus capacitance (max 400 pF); typically up to 10–15 devices (or more with bus extenders) |
| Addressing | 7-bit (128 unique addresses) or 10-bit (1024 unique addresses) slave addressing; master devices use dynamic arbitration |
| Topology | Multi-drop bus (all devices connected to SDA/SCL lines) |
| Pull-Up Resistors | Required on SDA and SCL lines (typically 2.2kΩ–10kΩ, depending on voltage and bus speed) |
| Max Distance | Short-range (typically <1 meter on a PCB; up to 10 meters with twisted-pair cable and transceivers) |
| Error Handling | Acknowledge (ACK)/Not Acknowledge (NACK) bits for data validation; bus arbitration for master conflicts |
Note: The 400 pF bus capacitance limit is a critical constraint—adding too many devices or long wires increases capacitance, reducing maximum data rate and signal integrity.
Key Architectural Features
1. Two-Wire Interface
The minimal two-wire design (SDA + SCL) is the defining feature of I2C, reducing PCB wiring complexity and component count compared to multi-wire protocols like SPI (which requires separate MOSI/MISO/SCLK/CS lines). Both lines are open-drain (or open-collector) outputs, meaning devices pull the line low to transmit a logic 0, and release it to let the pull-up resistors pull the line high (logic 1).
2. Multi-Master/Multi-Slave Support
- Multi-Slave: Each slave device on the bus has a unique 7-bit or 10-bit address. The master addresses a specific slave for data transmission/reception, enabling communication with multiple peripherals on a single bus (e.g., a temperature sensor, EEPROM, and OLED display connected to one MCU).
- Multi-Master: Multiple master devices (e.g., two MCUs) can control the bus. If two masters attempt to transmit simultaneously, bus arbitration ensures the master with the higher-priority address (lower binary value) gains control without data corruption.
3. Synchronous Communication
I2C is a synchronous protocol, meaning data transfer is synchronized to the clock signal (SCL) generated by the master. The master controls the clock speed (up to the maximum supported rate of the slowest device on the bus) and initiates/terminates all communication sessions.
4. ACK/NACK Handshaking
After each byte of data is transmitted (8 bits), the receiving device sends an acknowledge (ACK) bit (pulls SDA low) to confirm successful reception, or a not acknowledge (NACK) bit (leaves SDA high) to indicate an error or end of transmission. This handshaking mechanism ensures reliable data transfer.
I2C Communication Process
All I2C communication is initiated and controlled by a master device, following a fixed frame format:
- Start ConditionThe master pulls SDA low while SCL is high to signal the start of a communication session. All slave devices on the bus detect this condition and listen for their address.
- Slave Address + Read/Write BitThe master transmits a 7-bit slave address followed by a 1-bit read/write (R/W) command:
- 0 = Master writes data to the slave
- 1 = Master reads data from the slaveThe addressed slave responds with an ACK bit to confirm it has been selected.
- Data Transmission
- Write Operation: The master sends 8-bit data bytes to the slave, each followed by an ACK from the slave.
- Read Operation: The slave sends 8-bit data bytes to the master, each followed by an ACK from the master (except the final byte, where the master sends a NACK to end reading).
- Stop ConditionThe master releases SDA to go high while SCL is high to signal the end of the session. The bus returns to the idle state (SDA and SCL high via pull-up resistors).
I2C vs. Other Serial Protocols
I2C is often compared to SPI and UART, with distinct tradeoffs for different embedded applications:
| Characteristic | I2C | SPI | UART |
|---|---|---|---|
| Wires | 2 (SDA/SCL) | 3–4 (MOSI/MISO/SCLK/CS) | 2 (TX/RX) |
| Topology | Multi-master/multi-slave | Single-master/multi-slave | Point-to-point (typically) |
| Addressing | 7/10-bit slave addresses | Chip select (CS) lines | None (peer-to-peer) |
| Data Rate | Up to 5 Mbps (UFm) | Up to tens of Mbps | Variable (e.g., 9600 bps–1 Mbps) |
| Synchronization | Synchronous (clocked) | Synchronous (clocked) | Asynchronous (no clock) |
| Error Handling | ACK/NACK handshaking | None (no built-in error checking) | Parity bits (optional) |
| Distance | Short (<1m PCB) | Short (<1m PCB) | Longer (up to 10m) |
| Typical Use | On-board peripheral communication (sensors, EEPROMs) | High-speed on-board communication (flash memory, displays) | Serial communication between MCUs/PCs (e.g., USB-to-UART adapters) |
Common I2C Peripherals and Applications
I2C is the dominant protocol for on-board communication in embedded systems, used with a wide range of peripherals:
- Sensors: Temperature (e.g., TMP102), humidity (e.g., SHT3x), pressure (e.g., BMP280), accelerometer (e.g., ADXL345), and gyroscope (e.g., L3GD20) sensors.
- Memory Devices: EEPROMs (e.g., 24LC256) and FRAMs for non-volatile data storage.
- Display Controllers: OLED/LCD display drivers (e.g., SSD1306 for OLEDs) and LED matrix controllers.
- Power Management: PMICs (Power Management Integrated Circuits) for voltage regulation and battery monitoring (e.g., MAX17043).
- Real-Time Clocks (RTCs): Timekeeping ICs (e.g., DS3231) for embedded systems requiring accurate time tracking.
- Audio Devices: DACs/ADCs (e.g., PCM5102) and audio codecs for consumer electronics (e.g., headphones, speakers).
- Industrial Control: PLCs (Programmable Logic Controllers) and I/O expanders (e.g., MCP23017) for adding digital input/output pins to MCUs.
Troubleshooting Common I2C Issues
- Bus LockupCaused by a slave device holding SDA/SCL low (e.g., due to a power failure mid-transmission). Fix: Reset the bus by cycling power or using a master-controlled reset circuit.
- Incorrect Pull-Up ResistorsToo large (e.g., 100kΩ) = slow rise times and data errors; too small (e.g., 1kΩ) = excessive power consumption. Fix: Use 2.2kΩ–4.7kΩ resistors for 3.3V systems, 4.7kΩ–10kΩ for 5V systems.
- Bus Capacitance ExceedanceCauses signal degradation at high speeds. Fix: Reduce the number of devices, shorten wire lengths, or use I2C bus extenders (e.g., TCA9548A multiplexers).
- Address ConflictsOccurs when two slaves have the same 7-bit address. Fix: Use slaves with programmable addresses (via hardware jumpers) or an I2C multiplexer to split the bus into separate channels.
- Noise InterferenceCauses incorrect ACK/NACK or data corruption. Fix: Route SDA/SCL lines away from high-speed digital lines/power supplies, use shielded cable for long runs, and add decoupling capacitors near device power pins.
- iPhone 15 Pro Review: Ultimate Features and Specs
- iPhone 15 Pro Max: Key Features and Specifications
- iPhone 16: Features, Specs, and Innovations
- iPhone 16 Plus: Key Features & Specs
- iPhone 16 Pro: Premium Features & Specs Explained
- iPhone 16 Pro Max: Features & Innovations Explained
- iPhone 17 Pro: Features and Innovations Explained
- iPhone 17 Review: Features, Specs, and Innovations
- iPhone Air Concept: Mid-Range Power & Portability
- iPhone 13 Pro Max Review: Features, Specs & Performance
- iPhone SE Review: Budget Performance Unpacked
- iPhone 14 Review: Key Features and Upgrades
- Apple iPhone 14 Plus: The Ultimate Mid-range 5G Smartphone
- iPhone 14 Pro: Key Features and Innovations Explained
- Why the iPhone 14 Pro Max Redefines Smartphone Technology
- iPhone 15 Review: Key Features and Specs
- iPhone 15 Plus: Key Features and Specs Explained
- iPhone 12 Mini Review: Compact Powerhouse Unleashed
- iPhone 12: Key Features and Specs Unveiled
- iPhone 12 Pro: Premium Features and 5G Connectivity
- Why the iPhone 12 Pro Max is a Top Choice in 2023
- iPhone 13 Mini: Compact Powerhouse in Your Hand
- iPhone 13: Key Features and Specs Overview
- iPhone 13 Pro Review: Features and Specifications






















Leave a comment