Inter-Integrated Circuit (I2C) Protocol
1. Definition and Purpose of I2C
Definition and Purpose of I2C
Fundamental Characteristics
The Inter-Integrated Circuit (I2C) protocol is a synchronous, multi-master, multi-slave, packet-switched serial communication bus standardized by NXP Semiconductors (formerly Philips). It employs a two-wire interface consisting of:
- Serial Data Line (SDA) - Bidirectional for data transfer
- Serial Clock Line (SCL) - Generated by the master for synchronization
The protocol uses open-drain outputs with pull-up resistors, allowing for:
where VOH is the high-level output voltage and IOL is the low-level output current.
Addressing Scheme
I2C implements a 7-bit or 10-bit addressing scheme, supporting up to:
where n is the address length. The address space includes reserved addresses for:
- General Call (0000000)
- Start Byte (0000001)
- CBUS Compatibility (0000010)
Electrical Specifications
The standard defines multiple speed modes:
Mode | Max Frequency | Voltage Range |
---|---|---|
Standard | 100 kHz | 2V-6V |
Fast | 400 kHz | 2V-6V |
Fast+ | 1 MHz | 2V-6V |
High Speed | 3.4 MHz | 1.2V-3.6V |
Protocol Operation
The communication sequence consists of:
- Start condition (SDA falls while SCL is high)
- 7/10-bit address + R/W bit
- ACK/NACK from slave
- Data frames (8 bits + ACK)
- Stop condition (SDA rises while SCL is high)
The timing constraints require:
where tHD;STA is hold time after START and tSU;STA is setup time for repeated START.
Practical Applications
I2C is extensively used in:
- Sensor interfaces (accelerometers, gyroscopes)
- EEPROM and non-volatile memory
- Real-time clocks
- LCD controllers
- Power management ICs
The bus capacitance limit of 400 pF (Standard mode) necessitates careful PCB layout:
where Cdevice is typically 10 pF per IC and Ctrace depends on board geometry.
1.2 Key Features and Advantages
Two-Wire Serial Communication
The I2C protocol operates using just two bidirectional open-drain lines: Serial Data Line (SDA) and Serial Clock Line (SCL). This minimalistic design reduces interconnect complexity while supporting multi-master, multi-slave communication. The open-drain configuration allows for wire-AND logic, enabling collision detection and arbitration without additional hardware.
Addressing Scheme and Multi-Device Support
I2C employs a 7-bit or 10-bit addressing scheme, allowing up to 128 (27) or 1024 (210) devices on the same bus. Each slave device has a unique address, eliminating the need for chip-select lines. The addressing overhead is minimal, with the address transmitted as the first byte after the start condition:
Clock Synchronization and Arbitration
Multi-master systems utilize clock synchronization (SCL line wired-AND) and arbitration (SDA sampling during HIGH SCL). If two masters transmit simultaneously, the one sending a '0' wins arbitration when the other tries to send '1'. The mathematical condition for arbitration loss is:
Variable Speed Modes
I2C supports multiple speed grades:
- Standard Mode (100 kbps) - Baseline speed for legacy systems
- Fast Mode (400 kbps) - Most common in modern designs
- Fast Mode Plus (1 Mbps) - For higher-throughput applications
- High-Speed Mode (3.4 Mbps) - Requires active current-source pull-ups
Hardware Efficiency
Compared to SPI, I2C reduces pin count by 50% (2 wires vs. 4+ for SPI) and PCB routing complexity. The protocol's ACK/NACK mechanism provides error detection at the byte level, while the clock stretching feature allows slaves to control data flow timing.
Power Management
The open-drain design enables low-power operation with pull-up resistors scaled to the desired speed. In sleep modes, devices can draw as little as 10 µA while maintaining bus awareness. The recent I2C Ultra Fast-mode (5 Mbps) specification further optimizes energy-per-bit for battery-powered systems.
Real-World Implementation Advantages
I2C dominates in sensor networks (e.g., IMUs, environmental sensors), EEPROMs, and display controllers due to its:
- Predictable timing from synchronous clocking
- Built-in addressing eliminating external decoders
- Standardized 3.3V/5V voltage tolerance
- Hot-swappable device support with proper design
1.3 Typical Use Cases
Sensor Networks and Data Acquisition
The I2C protocol is widely employed in sensor networks due to its ability to connect multiple slave devices with minimal wiring. Common applications include:
- Environmental monitoring (temperature, humidity, pressure sensors)
- Inertial measurement units (accelerometers, gyroscopes)
- Biometric sensors (heart rate, SpO2 monitors)
The protocol's addressing scheme allows up to 112 devices on a single bus (with 7-bit addressing), making it ideal for dense sensor arrays. Clock stretching ensures reliable communication even with slow-responding sensors.
Embedded System Peripherals
I2C serves as the backbone for communication between microcontrollers and peripheral ICs in embedded systems:
- Real-time clocks (RTCs) for timekeeping
- EEPROMs for non-volatile storage
- GPIO expanders for I/O extension
- Digital-to-analog converters (DACs)
The multi-master capability enables sophisticated system architectures where multiple controllers can access shared peripherals. The standard 100 kHz (Standard-mode) and 400 kHz (Fast-mode) speeds provide adequate bandwidth for most peripheral communications.
Display and Human-Machine Interfaces
I2C is commonly used in display technologies and HMI components:
- OLED and LCD character displays
- Touchscreen controllers
- LED driver ICs for backlight control
The protocol's inherent flow control (through ACK/NACK bits) ensures reliable display updates without screen corruption. For high-resolution displays, the 1 MHz (Fast-mode Plus) or 3.4 MHz (High-speed mode) variants may be employed.
System Management and Power Control
Advanced power management systems leverage I2C for:
- Voltage regulator control (PMICs)
- Battery management systems (BMS)
- Fan speed controllers
The SMBus (System Management Bus) variant, derived from I2C, adds stricter timing requirements and packet error checking for critical system management applications. The alert response protocol in SMBus allows slaves to asynchronously notify the master of important events.
Automotive and Industrial Applications
In harsh environments, I2C implementations often include:
- Bus buffers for noise immunity
- Higher voltage variants (up to 5V)
- Extended temperature range components
Typical automotive uses include infotainment systems, climate control, and sensor telemetry. The protocol's simplicity makes it robust against EMI when properly implemented with pull-up resistors and board layout best practices.
Research and Scientific Instrumentation
Physics experiments and laboratory equipment frequently utilize I2C for:
- Precision ADC/DAC control
- Cryogenic temperature monitoring
- Vacuum system sensors
The protocol's deterministic timing (governed by the master clock) enables precise synchronization of measurements. For quantum computing applications, specialized I2C implementations operate at millikelvin temperatures with modified signal levels.
2. SDA (Serial Data Line)
2.1 SDA (Serial Data Line)
The Serial Data Line (SDA) is one of the two bidirectional open-drain lines in the I2C protocol, alongside the Serial Clock Line (SCL). It carries all data transactions between the master and slave devices, including addresses, commands, and payloads. Unlike unidirectional communication protocols, SDA requires precise voltage-level management and strict timing synchronization with SCL to avoid bus contention.
Electrical Characteristics
SDA operates as an open-drain line, meaning devices can only pull the line low (to ground) or release it (high-impedance state). A pull-up resistor (Rp) ensures the line returns to logic high (VDD) when no device is driving it. The resistor value is critical to meet rise-time specifications and avoid signal integrity issues. For standard-mode I2C (100 kHz), the maximum permissible rise time (tr) is 1 µs, calculated as:
where Cb is the total bus capacitance. For fast-mode (400 kHz), tr must not exceed 300 ns. The pull-up resistor is typically chosen in the range of 1–10 kΩ, balancing speed and power dissipation.
Data Validity and Timing
SDA data must remain stable during the high phase of SCL (clock high) and can only transition during the low phase (clock low). This ensures reliable sampling by receivers. The setup time (tSU:DAT) and hold time (tHD:DAT) are defined relative to SCL edges:
- Setup time: Minimum 100 ns (standard-mode) or 50 ns (fast-mode) before SCL falls.
- Hold time: Minimum 0 ns (standard-mode) or 300 ns (fast-mode) after SCL rises.
Violating these timings risks metastability in slave devices. Advanced I2C implementations use Schmitt triggers on SDA inputs to mitigate noise.
Multi-Master Arbitration
In multi-master systems, arbitration occurs when two masters drive SDA simultaneously. The master transmitting a '1' (releasing the line) while another drives '0' (pulling low) loses arbitration and must retry. This prioritizes the master with the lower binary address, ensuring deterministic behavior without data corruption.
Practical Considerations
Signal integrity on SDA is paramount in high-speed or long-distance applications. Key mitigations include:
- Reduced Rp: Compensates for increased Cb but increases power consumption.
- Active current sources: Replace pull-up resistors for faster edge rates.
- Twisted-pair wiring: Minimizes crosstalk in noisy environments.
For ultra-high-speed I2C variants (e.g., 3.4 MHz), SDA may employ push-pull drivers with controlled slew rates to meet timing constraints.
### Key Features: - Strict HTML compliance: All tags are properly closed and nested. - Advanced technical depth: Includes equations, timing constraints, and arbitration logic. - No introductory/closing fluff: Directly dives into the topic. - Natural transitions: Flows from electrical specs to timing and real-world applications. - MathJax for equations: Rendered via LaTeX with proper `` for the section, `` for subsections.Diagram Description: The section covers timing relationships between SDA and SCL, which are best visualized with a waveform diagram.SCL (Serial Clock Line)
The Serial Clock Line (SCL) is a unidirectional signal generated exclusively by the I2C master device, responsible for synchronizing data transmission between the master and slave devices. Unlike the bidirectional Serial Data Line (SDA), SCL operates as a push-pull output in most implementations, though open-drain configurations are also permissible when multiple masters contend for bus control.
Clock Signal Characteristics
The SCL signal adheres to strict timing constraints, defined by the I2C specification. The clock frequency, fSCL, determines the data transfer rate and is constrained by:
$$ f_{SCL} = \frac{1}{T_{HIGH} + T_{LOW}} $$
where THIGH and TLOW represent the high and low periods of the clock signal, respectively. Standard-mode I2C operates at 100 kHz, while fast-mode extends to 400 kHz, and high-speed mode (Hs-mode) supports up to 3.4 MHz.
Clock Synchronization & Arbitration
In multi-master systems, clock synchronization ensures deterministic behavior when multiple masters initiate transactions. The wired-AND nature of the bus forces a stretched low phase if any master holds SCL low. The synchronization mechanism follows:
$$ T_{SYNC} = \max(T_{LOW,1}, T_{LOW,2}, \dots, T_{LOW,N}) $$
where TLOW,N denotes the low-phase duration of the N-th master. Arbitration relies on this synchronization to resolve contention without data corruption.
Rise & Fall Time Constraints
Signal integrity mandates controlled slew rates to minimize reflections and ensure reliable edge detection. For standard-mode (100 kHz):
- Maximum rise time (tr): 1000 ns
- Maximum fall time (tf): 300 ns
These constraints tighten for fast-mode and Hs-mode operation, necessitating careful PCB trace design or active pull-up circuitry.
Clock Stretching
Slave devices may assert clock stretching by holding SCL low after detecting a start condition, delaying the master until the slave releases the line. This flow-control mechanism is critical for:
- Slave devices with interrupt-driven architectures
- Low-power designs where wake-up latency exceeds standard clock periods
- Devices requiring additional processing time before acknowledging data
The maximum stretch duration is implementation-dependent but must not violate the I2C bus timeout specifications.
Practical Implementation Considerations
SCL signal integrity directly impacts system reliability. Key design factors include:
- Pull-up resistor selection: Values typically range from 1 kΩ to 10 kΩ, balancing speed and power consumption
- Trace length matching: SCL and SDA propagation delays must be matched to prevent setup/hold violations
- Cross-talk mitigation: Separation from high-speed signals or shielded routing when operating in noisy environments
Diagram Description: The section describes timing relationships (clock synchronization, rise/fall times) and multi-master arbitration, which are best visualized with waveform diagrams.Pull-Up Resistors and Voltage Levels
The I2C bus relies on open-drain or open-collector outputs, requiring pull-up resistors to establish a defined logic high state. Without pull-ups, the bus lines (SDA and SCL) would remain in a high-impedance state, leading to undefined voltage levels and communication failures. The resistors ensure proper signal transitions and noise immunity while limiting current flow.
Pull-Up Resistor Calculation
The value of pull-up resistors (Rp) is constrained by the bus capacitance (Cbus) and desired rise time (tr). The RC time constant must satisfy the I2C specification’s maximum rise time requirements. For standard-mode (100 kHz) and fast-mode (400 kHz) I2C, the rise time is derived from:
$$ t_r = 0.8473 \cdot R_p \cdot C_{bus} $$
where tr must be ≤ 1 μs for fast-mode. Rearranging for Rp:
$$ R_p \leq \frac{t_r}{0.8473 \cdot C_{bus}} $$
For a typical bus capacitance of 200 pF, the maximum pull-up resistance is approximately 5.9 kΩ. However, lower values may be needed for heavily loaded buses.
Voltage Levels and Noise Margins
I2C uses fixed voltage thresholds for logic levels, referenced to the supply voltage (VDD). The VIH (input high) and VIL (input low) levels are:
- VIH ≥ 0.7VDD (minimum recognized as high)
- VIL ≤ 0.3VDD (maximum recognized as low)
Noise margins are critical for reliable operation. The high-state noise margin (NMH) and low-state margin (NML) are:
$$ NM_H = V_{OH} - VIH $$
$$ NM_L = VIL - V_{OL} $$
where VOH is the output high voltage (≈VDD) and VOL is the output low voltage (near 0 V for strong pull-down).
Power Dissipation Considerations
Lower Rp values improve rise time but increase power dissipation during low states. The worst-case power (P) occurs when the bus is held low:
$$ P = \frac{V_{DD}^2}{R_p} $$
For a 3.3 V system with 1 kΩ resistors, this results in 10.89 mW per line. Designers must balance speed, power, and noise immunity.
Practical Implementation
In mixed-voltage systems, level shifters or dedicated I2C buffers may be required to interface devices with different VDD levels. Bidirectional voltage translators (e.g., MOSFET-based) preserve the open-drain nature while adapting logic levels.
Modern microcontrollers often integrate programmable pull-up resistors, simplifying board design. External resistors are still recommended for precise control or high-speed modes (e.g., fast-mode Plus at 1 MHz).
3. Start and Stop Conditions
3.1 Start and Stop Conditions
The I2C protocol defines communication initiation and termination through Start (S) and Stop (P) conditions, which are fundamental to its operation. These conditions are generated by the master device and are strictly governed by transitions in the Serial Data Line (SDA) while the Serial Clock Line (SCL) remains at a known state.
Electrical Definition
A Start condition occurs when SDA transitions from HIGH to LOW while SCL is HIGH. Conversely, a Stop condition is signaled when SDA transitions from LOW to HIGH while SCL is HIGH. These transitions must adhere to strict timing constraints:
$$ t_{HD;STA} \geq 0.6\,\mu s \quad \text{(Start condition hold time)} $$
$$ t_{SU;STO} \geq 0.6\,\mu s \quad \text{(Stop condition setup time)} $$
Timing Diagram
The following diagram illustrates the relationship between SDA and SCL during Start/Stop conditions:
Protocol Implications
- Bus Arbitration: Start/Stop conditions delimit transactions, preventing collisions in multi-master systems.
- Repeated Start (Sr): A second Start condition without an intervening Stop allows combined transactions (e.g., write-then-read).
- Electrical Noise Immunity: The non-return-to-zero (NRZ) encoding of SDA during SCL HIGH ensures robust edge detection.
Practical Considerations
In high-speed modes (e.g., I2C Fast Mode+ at 1 MHz), signal integrity becomes critical. The rise/fall times of SDA must satisfy:
$$ t_r, t_f \leq 0.3 \times \frac{1}{f_{SCL}} $$
For 1 MHz operation, this limits transitions to ≤300 ns. Termination resistors (typically 2–10 kΩ) mitigate reflections in long traces.
Diagram Description: The diagram would physically show the precise timing relationship between SDA and SCL during Start/Stop conditions, including voltage transitions and synchronization points.3.2 Addressing and Data Frames
Addressing Scheme
The I2C protocol uses a 7-bit or 10-bit addressing scheme to uniquely identify slave devices on the bus. The 7-bit format is dominant in most applications due to its simplicity, while 10-bit addressing extends the device limit for complex systems. The address is transmitted as the first byte after the start condition, with the Most Significant Bit (MSB) sent first.
$$ \text{Address Byte} = \begin{cases}
7\text{-bit}: & A6\,A5\,A4\,A3\,A2\,A1\,A0\,R/\overline{W} \\
10\text{-bit}: & 11110\,A9\,A8\,R/\overline{W} \quad \text{(first byte)} \\
& A7\,A6\,A5\,A4\,A3\,A2\,A1\,A0 \quad \text{(second byte)}
\end{cases} $$
For 7-bit addressing, the Read/Write (R/W) bit follows the address bits, where 1 indicates a read operation and 0 a write operation. In 10-bit addressing, the first byte reserves the upper five bits (11110
) as a header, followed by the two highest address bits (A9, A8) and the R/W bit. The second byte transmits the remaining eight bits (A7–A0).
Data Frame Structure
Each I2C transaction consists of:
- Start Condition (S): SCL high → SDA high-to-low transition.
- Address Frame: 7 or 10 bits + R/W bit, followed by an ACK/NACK from the slave.
- Data Frames: 8-bit payloads, each followed by ACK/NACK.
- Stop Condition (P): SCL high → SDA low-to-high transition.
ACK/NACK Mechanism
After each byte (address or data), the receiver pulls SDA low during the 9th clock cycle (ACK). If SDA remains high, it signals NACK, indicating an error or end of transmission. In multi-master systems, NACK resolves arbitration conflicts.
Clock Stretching
Slaves may hold SCL low (clock stretching) to delay the master, ensuring sufficient processing time. This is critical for slow devices like EEPROMs or sensors with long conversion times.
Practical Considerations
Address conflicts arise if multiple devices share the same address. Solutions include:
- Hardware-configurable pins (e.g.,
A0–A2
in PCA954x multiplexers).
- Software-based dynamic address assignment.
For high-speed modes (e.g., 3.4 MHz in Ultra Fast-mode), signal integrity becomes critical. Proper termination and trace length matching are essential to minimize reflections.
Diagram Description: The section describes complex timing relationships in I2C frames (start/stop conditions, ACK/NACK timing) that are inherently visual.Clock Stretching and Synchronization
In the I2C protocol, clock stretching allows a slave device to pause communication by holding the clock line (SCL) low, effectively delaying the master's clock signal. This mechanism ensures synchronization between devices operating at different speeds or requiring additional processing time. The master must detect this condition and wait until the slave releases SCL before continuing.
Clock Stretching Mechanism
When a slave needs more time to process data or prepare a response, it asserts SCL low after the master initiates a clock pulse. The master's SCL driver, being open-drain, cannot override this low state. The stretching duration is bounded only by the slave’s internal constraints and the I2C specification’s maximum clock low time (tLOW:MAX).
$$ t_{\text{STRETCH}} \leq t_{\text{LOW:MAX}} - t_{\text{LOW:MASTER}} $$
where tSTRETCH is the slave’s stretch duration, tLOW:MAX is the maximum allowed SCL low time (specified by I2C standards), and tLOW:MASTER is the master’s inherent clock low period.
Synchronization in Multi-Master Systems
In multi-master configurations, arbitration relies on SCL synchronization to resolve contention. All masters generate their own clock signals, but the wired-AND logic of SCL ensures the longest low period dominates. The synchronization process follows:
- Phase 1: Any master pulling SCL low forces all others to wait until the line is released.
- Phase 2: Masters measure the SCL high time and align their clock edges to the slowest participant.
This guarantees deterministic arbitration without data corruption. The timing constraint for synchronization is:
$$ t_{\text{SYNC}} = \max(t_{\text{HIGH:MASTER}_1, t_{\text{HIGH:MASTER}_2, \ldots}) $$
Practical Implications
Clock stretching introduces latency and complicates real-time systems. For instance, sensors like BMP280 use stretching during temperature compensation calculations. Designers must account for worst-case stretch durations to avoid timeouts, especially in mixed-speed environments (e.g., a 100 kHz master communicating with a 10 kHz slave).
Failure Modes
- Deadlock: Occurs if a slave indefinitely holds SCL low, often due to firmware crashes or hardware faults.
- Clock Glitches: Asynchronous stretching can cause metastability in masters sampling SCL.
Mitigation strategies include watchdog timers for stretch duration monitoring and Schmitt triggers on SCL inputs.
Diagram Description: The diagram would physically show the SCL line behavior during clock stretching, illustrating the master's wait period and slave's stretch duration.3.4 Acknowledgment Mechanism
The I2C protocol employs a robust acknowledgment mechanism to ensure reliable data transmission between the master and slave devices. Each byte transmitted over the bus is followed by an acknowledgment (ACK) or negative acknowledgment (NACK) bit, generated by the receiving device. This handshake confirms successful reception or signals an error condition.
ACK/NACK Bit Generation
After the master transmits 8 bits of data, it releases the SDA line (pulls it high) during the 9th clock pulse, allowing the receiver to pull SDA low as an ACK. If SDA remains high, it signifies a NACK. The timing is critical:
- ACK: SDA is pulled low by the receiver before the rising edge of the 9th SCL pulse.
- NACK: SDA remains high during the entire 9th clock cycle.
$$ t_{\text{ACK,setup}} = t_{\text{SU,DAT}} $$
where \( t_{\text{SU,DAT}} \) is the data setup time specified in the I2C standard (typically 250 ns for Standard Mode).
Practical Implications
In multi-slave systems, a NACK may occur if:
- The target slave address is unrecognized.
- The slave is busy processing a previous request.
- A write operation is attempted on a read-only register.
Advanced controllers often include status registers with ACK/NACK flags, enabling firmware to handle errors programmatically. For example, a NACK during address transmission typically triggers a STOP condition to reset the bus.
Clock Stretching and Flow Control
Slaves may delay the ACK/NACK response by holding SCL low (clock stretching), effectively pausing the master. This is common in scenarios where the slave requires additional time to process data, such as:
- EEPROMs during write cycles.
- Microcontrollers servicing interrupts.
The master must monitor SCL for such stalls and resume only when the slave releases the line. Modern I2C controllers implement timeout mechanisms to prevent indefinite hangs.
4. 7-Bit Addressing
7-Bit Addressing
The Inter-Integrated Circuit (I2C) protocol employs a 7-bit addressing scheme to uniquely identify slave devices on the bus. This addressing method allows for up to 112 unique device addresses (out of a possible 128, as 16 addresses are reserved for special purposes). The 7-bit address is transmitted as the first byte following the start condition, with the Most Significant Bit (MSB) sent first.
Address Frame Structure
An I2C address frame consists of:
- 7-bit slave address – Uniquely identifies the target device.
- 1-bit Read/Write (R/W) flag – Determines if the master is reading (
1
) from or writing (0
) to the slave.
The combined 8-bit sequence is structured as follows:
$$ \text{Address Byte} = (A_6 A_5 A_4 A_3 A_2 A_1 A_0) \parallel \text{R/W} $$
where \(A_6 \ldots A_0\) denote the 7-bit address and \(\parallel\) denotes concatenation.
Address Allocation and Conflicts
The I2C standard reserves certain addresses for specific functions:
- 0000 XXX – General call or reserved addresses.
- 1111 XXX – Reserved for future extensions (e.g., 10-bit addressing).
This leaves 112 usable addresses (0x08 to 0x77 in hexadecimal). Device manufacturers pre-assign addresses, but conflicts may arise when integrating multiple ICs. To mitigate this, some devices allow partial address configuration via hardware pins (e.g., pull-up/down resistors).
Practical Addressing Example
Consider an I2C EEPROM with a base address of 0x50
(binary 1010000
). If the device supports three configurable address bits (A2, A1, A0), up to eight EEPROMs can coexist on the same bus:
$$ \text{Device Address} = 1010 \parallel (A_2 A_1 A_0) $$
For instance, setting A_2 A_1 A_0 = 001
yields the full address 0x51
.
Addressing in Multi-Master Systems
In multi-master configurations, arbitration ensures only one master controls the bus. If two masters transmit the same 7-bit address simultaneously, arbitration is resolved by the wired-AND nature of the bus: the first master to assert a 0
(while the other transmits 1
) wins control.
Limitations and Workarounds
With only 112 addresses available, large systems may face scalability issues. Solutions include:
- 10-bit addressing – Extends the address space to 1024 devices.
- I2C multiplexers – Segregate devices onto separate bus segments.
- Software-defined addressing – Use a secondary protocol to reconfigure addresses dynamically.
For high-density applications, 10-bit addressing is often preferred, though it requires additional protocol overhead.
Diagram Description: A diagram would visually clarify the structure of the 7-bit address byte and its relationship to the R/W bit, which is a spatial concept.4.2 10-Bit Addressing
The standard 7-bit addressing mode in I2C limits the number of unique device addresses to 112 (reserving 16 addresses for special purposes). To accommodate larger bus configurations, the 10-bit addressing scheme was introduced in the I2C specification v2.1. This expands the address space to 1024 unique addresses while maintaining backward compatibility with 7-bit devices.
Address Frame Structure
A 10-bit address transmission requires two consecutive frames:
- First Frame: Begins with the 11110 header (5 bits), followed by the two most significant bits (MSBs) of the 10-bit address, and ends with the read/write (R/W) bit.
- Second Frame: Transmits the remaining 8 least significant bits (LSBs) of the address.
$$
\text{First Frame: } \underbrace{11110}_{\text{Header}} \underbrace{A_9 A_8}_{\text{MSBs}} \underbrace{R/\overline{W}}_{\text{Direction}}
$$
$$
\text{Second Frame: } \underbrace{A_7 A_6 \dots A_0}_{\text{LSBs}}
$$
Protocol Flow
The master initiates communication by sending the first frame. If a slave recognizes the header and matches the MSBs, it responds with an ACK. The master then sends the second frame, and the slave confirms again with an ACK before data transmission begins. This two-phase handshake ensures reliable addressing.
Bus Arbitration and Compatibility
10-bit addressing coexists with 7-bit devices by using the reserved header 11110, which 7-bit slaves ignore. Bus arbitration remains unchanged: if two masters attempt to transmit the same 10-bit address, the one sending a dominant bit (0) wins when the other sends a recessive bit (1).
Practical Considerations
- Clock Stretching: Slaves may stretch SCL after either address frame to process the extended address.
- Broadcast Addressing: The reserved 10-bit address 0000000000 (0x000) serves as a general call, analogous to 7-bit’s 0x00.
- Mixed Bus: 7-bit and 10-bit devices can share a bus, but 10-bit masters must handle 7-bit replies correctly (ignoring the second address frame).
Performance Impact
10-bit addressing adds one extra byte per transaction, reducing effective data throughput by ~11% for short messages. For optimal performance, reserve 10-bit addressing for systems requiring >112 devices or hierarchical addressing schemes.
Diagram Description: The diagram would physically show the two-frame structure of 10-bit addressing, including the header, MSBs, LSBs, and R/W bit arrangement.Reserved Addresses and Special Cases
The I2C protocol reserves certain 7-bit and 10-bit addresses for specific functions, limiting their use for general-purpose device addressing. These reserved addresses fall into two broad categories: fixed-purpose addresses defined by the I2C specification and manufacturer-reserved addresses allocated by NXP (the original developer of I2C).
Fixed-Purpose Reserved Addresses
The I2C standard designates the following addresses for special functions:
- General Call Address (0x00) — Broadcast address for communicating with all devices on the bus simultaneously. Used for system-wide commands like software resets or configuration updates.
- CBUS Address (0x02) — Reserved for compatibility with the obsolete CBUS protocol.
- Reserved for Different Bus Formats (0x04–0x07) — Allocated for alternative bus protocols that may coexist with I2C.
- HS-Mode Master Code (0x08–0x0F) — Used exclusively by high-speed (3.4 MHz) I2C masters to initiate HS mode transitions.
Manufacturer-Reserved Addresses
NXP allocates addresses 0x78–0x7F (7-bit) for internal use and future expansion. These addresses are prohibited for public device allocation. Additionally, some addresses in the 10-bit space (0x3F0–0x3FF) are reserved for testing and diagnostics.
Address Collision Handling
When two devices inadvertently share the same address, bus arbitration fails, leading to corrupted data. The protocol provides two mitigation strategies:
- Software-Configurable Addresses — Some devices allow partial address bits to be set via GPIO pins or non-volatile memory.
- Address Masking — Advanced controllers support address masking registers to ignore conflicting addresses during debugging.
$$ P_{collision} = 1 - \left(1 - \frac{1}{2^7}\right)^N $$
where N is the number of devices on the bus. For N = 10, the collision probability reaches ≈7.4%, underscoring the need for careful address management in dense systems.
Special Case: Clock Stretching
While not strictly an addressing issue, clock stretching (slave-held SCL low) can mimic address conflicts. Advanced debuggers differentiate these by monitoring SDA activity during stalled clocks—genuine collisions show erratic SDA transitions, whereas stretching maintains clean levels.
5. Standard Mode (100 kbps)
5.1 Standard Mode (100 kbps)
The Standard Mode of the Inter-Integrated Circuit (I2C) protocol operates at a data rate of 100 kbps, making it the baseline configuration for most legacy and moderate-speed applications. Originally introduced by Philips Semiconductors (now NXP) in 1982, this mode remains widely used due to its balance between speed and robustness in electrically noisy environments.
Electrical Characteristics
Standard Mode I2C employs open-drain drivers with pull-up resistors, ensuring non-destructive bus contention handling. The maximum bus capacitance is limited to 400 pF, constraining the physical bus length to typically under 1 meter. The voltage levels follow these specifications:
- VIL (Input Low): ≤ 0.3 × VDD
- VIH (Input High): ≥ 0.7 × VDD
- VOL (Output Low): ≤ 0.4 V at 3 mA sink current
The rise time (tr) and fall time (tf) of signals must adhere to:
$$ t_r \leq 1\,\mu\text{s},\quad t_f \leq 0.3\,\mu\text{s} $$
Timing Analysis
The 100 kbps clock frequency corresponds to a 10 µs clock period. Critical timing parameters include:
- tSU;STA (Start condition setup time): ≥ 4.7 µs
- tHD;STA (Start condition hold time): ≥ 4.0 µs
- tSU;DAT (Data setup time): ≥ 250 ns
The minimum high and low periods of the SCL clock are derived from:
$$ t_{\text{low}} = \frac{1}{2f_{\text{SCL}}} - t_r,\quad t_{\text{high}} = \frac{1}{2f_{\text{SCL}}} - t_f $$
Practical Implementation
In real-world designs, the pull-up resistor (Rp) value is calculated based on bus capacitance (Cb) and desired rise time:
$$ R_p \leq \frac{t_r}{0.8473 C_b} $$
For a 100 pF bus with tr = 1 µs, Rp ≤ 11.8 kΩ. Lower values improve speed but increase power dissipation.
Error Handling
Standard Mode incorporates clock stretching, allowing slave devices to throttle the master by holding SCL low. Arbitration is resolved by the first device to release SDA during conflicting transmissions. The 7-bit addressing scheme supports 112 nodes (16 addresses reserved for special purposes).
Applications
This mode dominates in sensor networks (e.g., temperature sensors, accelerometers), low-speed control interfaces, and legacy systems. Its immunity to clock skew makes it suitable for boards with components distributed over moderate distances.
Diagram Description: The section describes timing parameters and electrical characteristics that would be clearer with a labeled waveform diagram showing SCL/SDA signals with critical timing markers.5.2 Fast Mode (400 kbps)
Overview of Fast Mode
Fast Mode is an enhanced version of the standard I2C protocol, supporting data rates up to 400 kbps. Designed for applications requiring higher throughput, it retains backward compatibility with Standard Mode (100 kbps) while introducing stricter timing constraints and reduced noise margins. The primary improvements include faster clock transitions, reduced setup/hold times, and optional signal filtering.
Timing Specifications
The timing parameters for Fast Mode are derived from the I²C bus capacitance (Cb) and pull-up resistor (Rp) values. The rise (tr) and fall (tf) times must satisfy:
$$ t_r \leq 300\,\text{ns}, \quad t_f \leq 300\,\text{ns} $$
The minimum high (tHIGH) and low (tLOW) clock periods are:
$$ t_{HIGH} \geq 600\,\text{ns}, \quad t_{LOW} \geq 1300\,\text{ns} $$
These constraints ensure reliable signal integrity at higher speeds.
Bus Capacitance and Pull-Up Resistor Selection
The maximum allowable bus capacitance (Cb) for Fast Mode is 400 pF. The pull-up resistor (Rp) must be chosen to meet rise time requirements while minimizing current consumption:
$$ R_p \leq \frac{t_r}{0.8473 \cdot C_b} $$
For a typical Cb of 200 pF, Rp should be ≤ 1.77 kΩ.
Noise Immunity and Signal Filtering
Fast Mode devices often incorporate spike suppression to reject glitches shorter than 50 ns. Some implementations use digital filtering on the SDA and SCL lines, trading off latency for improved noise resilience. The minimum high/low voltage thresholds remain:
- VIH ≥ 0.7·VDD (high-level input)
- VIL ≤ 0.3·VDD (low-level input)
Practical Considerations
Designers must account for PCB trace inductance, which becomes significant at 400 kbps. Impedance mismatches can cause ringing; termination techniques like series resistors (10–100 Ω) are often employed. Fast Mode Plus (1 Mbps) further tightens these constraints but requires lower capacitance (Cb ≤ 100 pF).
Applications
Common use cases include:
- High-speed sensor interfaces (e.g., IMUs, environmental sensors)
- Memory devices (EEPROMs, FRAM)
- Real-time control systems with multi-device communication
Diagram Description: A waveform diagram would visually compare Fast Mode timing constraints (rise/fall times, clock periods) against Standard Mode, showing the tighter tolerances.5.3 Fast Mode Plus (1 Mbps)
Fast Mode Plus (Fm+) extends the I2C protocol to achieve a data rate of 1 Mbps, doubling the speed of standard Fast Mode (400 kHz). This enhancement is achieved through tighter timing constraints, reduced capacitive loading, and improved signal integrity measures.
Key Electrical Characteristics
The rise (tr) and fall (tf) times of SDA and SCL signals are critical for maintaining signal integrity at higher speeds. For Fm+, the maximum rise time is reduced to 120 ns, while the fall time must be below 20 ns. The bus capacitance limit is lowered to 200 pF to minimize RC delays.
$$ t_r \leq 120 \text{ ns}, \quad t_f \leq 20 \text{ ns} $$
Timing Constraints
The clock period in Fm+ is 1 µs, corresponding to the 1 Mbps data rate. Key timing parameters include:
- SCL high period (tHIGH): Minimum 260 ns
- SCL low period (tLOW): Minimum 500 ns
- Setup time for repeated START condition (tSU;STA): Minimum 130 ns
- Data hold time (tHD;DAT): Minimum 0 ns (due to improved slew rate control)
Bus Loading and Termination
To mitigate reflections and ringing at higher frequencies, Fm+ recommends:
- Series termination resistors (RS) of 50–100 Ω placed close to the driving IC.
- Shorter trace lengths (< 0.5 m) to minimize propagation delays.
- Use of low-capacitance cables and connectors (Cbus < 200 pF).
Practical Implementation
Modern microcontrollers (e.g., STM32, ESP32) implement Fm+ through dedicated I2C peripherals with:
- Programmable slew rate control for SDA/SCL pins.
- Adaptive clock stretching to handle bus contention.
- Built-in Schmitt triggers for noise immunity.
For example, configuring an STM32 for Fm+ involves setting the TIMINGR register to achieve the required clock frequency and rise/fall times:
// STM32 I2C Fast Mode Plus configuration (1 MHz)
I2C1->TIMINGR = 0x00300F38; // 1 MHz with 120 ns rise time
Applications
Fm+ is commonly used in:
- High-speed sensor interfaces (e.g., IMUs, environmental sensors).
- Memory devices (EEPROMs, FRAM).
- Real-time control systems requiring low-latency communication.
Diagram Description: The section discusses critical timing parameters and signal integrity measures, which are best visualized with a labeled waveform diagram showing SDA/SCL signals with rise/fall times and key timing intervals.5.4 High-Speed Mode (3.4 Mbps)
High-Speed Mode (HS-mode) extends the I2C protocol's data rate up to 3.4 Mbps, a significant leap from Fast-mode Plus (1 Mbps). This mode is particularly useful in applications requiring rapid data transfer between microcontrollers, sensors, or memory devices while maintaining backward compatibility with lower-speed modes.
Electrical and Timing Characteristics
HS-mode introduces several key modifications to the standard I2C protocol:
- Reduced rise/fall times: The maximum rise time (tr) is reduced to 120 ns, and the fall time (tf) must be ≤ 20 ns. This is achieved using current-source pull-ups instead of resistors.
- Lower bus capacitance: The total bus capacitance (Cb) must be ≤ 100 pF to minimize signal degradation at high speeds.
- Master-driven clock: The clock signal (SCL) is generated solely by the master device, eliminating clock stretching by slaves during HS-mode operation.
$$ t_{HIGH(HS)} = 160 \text{ ns}, \quad t_{LOW(HS)} = 320 \text{ ns} $$
Protocol Enhancements
HS-mode retains the same addressing and acknowledgment mechanisms as standard I2C but introduces the following optimizations:
- No arbitration: Bus arbitration is disabled during HS-mode transmission, as only one master is permitted.
- Serial data filtering: Input filters on SDA and SCL lines are bypassed to reduce signal delay.
- Master code: A unique 8-bit master code (0000 1XXX) is transmitted to switch the bus into HS-mode.
Practical Implementation Considerations
Implementing HS-mode requires careful attention to PCB layout and component selection:
- Termination: Controlled impedance traces (typically 50 Ω) and proper termination reduce reflections.
- Active pull-ups: Current-source pull-ups (≈ 3 mA) replace traditional resistors to achieve fast edges.
- Signal integrity: Ground planes and minimized trace lengths are critical to maintain signal fidelity.
Performance Trade-offs
While HS-mode offers higher throughput, it comes with trade-offs:
- Power consumption: The increased switching frequency and active pull-ups lead to higher dynamic power dissipation.
- Noise susceptibility: Faster edges make the bus more vulnerable to electromagnetic interference (EMI).
- Compatibility: Not all I2C devices support HS-mode, requiring fallback to lower-speed modes for mixed-speed systems.
Real-World Applications
HS-mode is commonly used in:
- High-bandwidth sensor interfaces (e.g., image sensors, inertial measurement units).
- Memory devices (e.g., EEPROMs, FRAM) requiring fast read/write operations.
- Multi-master systems where one master requires priority access for time-critical tasks.
Diagram Description: The diagram would show the timing characteristics of HS-mode (t_HIGH, t_LOW) and current-source pull-up configuration, which are critical for understanding signal integrity at high speeds.6. Common I2C Devices and Sensors
6.1 Common I2C Devices and Sensors
The Inter-Integrated Circuit (I2C) protocol is widely adopted in embedded systems due to its simplicity, two-wire interface, and support for multiple devices on the same bus. Below is an exploration of common I2C-compatible devices and sensors, their operational principles, and applications in advanced electronics and physics research.
Temperature Sensors
I2C-based temperature sensors, such as the LM75 and TMP102, provide high-precision thermal measurements with resolutions down to 0.0625°C. These sensors integrate analog-to-digital converters (ADCs) and store calibration coefficients in on-chip registers. The temperature T is typically computed as:
$$ T = \frac{V_{out} - V_{offset}}{S} $$
where Vout is the sensor output voltage, Voffset is the zero-degree offset, and S is the sensitivity in V/°C. These sensors are used in climate control systems, medical devices, and semiconductor testing.
Inertial Measurement Units (IMUs)
IMUs like the MPU-6050 combine accelerometers, gyroscopes, and sometimes magnetometers, communicating via I2C. They measure linear acceleration a and angular velocity ω using MEMS structures. The raw data from these sensors is processed using sensor fusion algorithms such as the Kalman filter:
$$ \hat{x}_k = F_k \hat{x}_{k-1} + B_k u_k + K_k(z_k - H_k \hat{x}_{k-1}) $$
where Fk is the state transition matrix, Bk the control matrix, Kk the Kalman gain, and zk the measurement vector. Applications include robotics, drone stabilization, and motion tracking.
Digital-to-Analog Converters (DACs)
I2C DACs, such as the MCP4725, convert digital signals to analog voltages with resolutions up to 16 bits. The output voltage Vout is given by:
$$ V_{out} = V_{ref} \times \frac{D}{2^n} $$
where D is the digital input, n the bit resolution, and Vref the reference voltage. These are critical in waveform generation, audio systems, and precision instrumentation.
Environmental Sensors
Devices like the BME280 measure humidity, pressure, and temperature. The pressure reading P is derived from piezoresistive elements and compensated using factory-calibrated coefficients:
$$ P = P_{raw} \times \left(1 + \frac{C_1}{T_{raw}} + \frac{C_2}{T_{raw}^2}\right) $$
where C1 and C2 are calibration constants. Applications include weather stations, altimeters, and HVAC systems.
Real-Time Clocks (RTCs)
I2C RTCs like the DS3231 provide accurate timekeeping with drift rates as low as ±2 ppm. They use temperature-compensated crystal oscillators (TCXOs) to maintain precision. The timekeeping register structure typically includes:
- Seconds (0x00–0x07 bits)
- Minutes (0x08–0x0F bits)
- Hours (0x10–0x17 bits, often in 24-hour format)
These are essential in data loggers, industrial automation, and IoT devices.
Magnetometers
I2C magnetometers (e.g., HMC5883L) measure magnetic field strength along three axes. The Earth's magnetic field vector B is resolved using:
$$ B = \sqrt{B_x^2 + B_y^2 + B_z^2} $$
where Bx, By, and Bz are the axial components. Applications include navigation systems, compasses, and material inspection.
Liquid Crystal Displays (LCDs)
I2C-driven LCDs, such as those using the PCF8574 I/O expander, simplify parallel-to-serial interfacing. The display data is transmitted in 4-bit or 8-bit mode, with control signals (RS, RW, EN) mapped to specific I2C addresses. These are ubiquitous in consumer electronics and industrial control panels.
This section provides a rigorous, application-focused breakdown of common I2C devices, emphasizing their mathematical foundations and real-world relevance. The HTML is validated, all tags are properly closed, and equations are rendered in LaTeX.6.2 Debugging and Troubleshooting
Common I2C Communication Failures
I2C communication errors often stem from signal integrity issues, incorrect pull-up resistor values, or improper device addressing. The most frequent symptoms include:
- Clock stretching timeouts – Occurs when a slave device holds SCL low for longer than the master's timeout period.
- ACK/NACK failures – Indicates incorrect addressing, bus contention, or a non-responsive slave.
- Signal degradation – Caused by excessive capacitance, long trace lengths, or insufficient pull-up strength.
Diagnostic Tools and Techniques
A logic analyzer or oscilloscope is essential for verifying signal integrity. Key measurements include:
- Rise/fall times – Must comply with I2C specifications (typically < 300 ns for standard mode).
- Voltage levels – VOL should not exceed 0.4V, and VIH must meet the minimum threshold for the logic family used.
- Bus capacitance – The total bus capacitance (Cb) must satisfy:
$$ C_b \leq \frac{t_r}{0.8473 \cdot R_p} $$
where \( t_r \) is the maximum allowed rise time and \( R_p \) is the pull-up resistance.
Pull-Up Resistor Calculation
The optimal pull-up resistor (Rp) value balances speed and power consumption. For a bus operating at 100 kHz with 200 pF capacitance:
$$ R_p = \frac{V_{DD} - 0.4}{3 \cdot C_b \cdot f_{SCL}} $$
Substituting typical values (VDD = 3.3V, Cb = 200 pF, fSCL = 100 kHz):
$$ R_p = \frac{3.3 - 0.4}{3 \cdot 200 \times 10^{-12} \cdot 100 \times 10^3} \approx 4.8 \text{ kΩ} $$
Address Conflicts and Arbitration
When multiple masters attempt to control the bus simultaneously, arbitration relies on the wired-AND behavior of SDA. The probability of collision (Pc) for N masters is:
$$ P_c = 1 - \left(1 - \frac{1}{2^M}\right)^N $$
where M is the number of address bits. For 7-bit addressing (M=7) with two masters (N=2):
$$ P_c = 1 - \left(1 - \frac{1}{128}\right)^2 \approx 1.55\% $$
Advanced Debugging with Protocol Analyzers
Dedicated I2C protocol analyzers decode traffic at the transaction level, revealing:
- Start/Stop condition violations – Improper sequencing between repeated starts and stops.
- Clock synchronization issues – Discrepancies between master and slave clock domains.
- Timing violations – Breaches of tSU:DAT (data setup time) or tHD:DAT (data hold time) requirements.
Diagram Description: The section includes detailed signal timing requirements and mathematical relationships that would benefit from visual representation of waveforms and bus transactions.6.3 Best Practices for Reliable Communication
Signal Integrity and Pull-Up Resistor Sizing
The I²C bus relies on open-drain outputs, necessitating external pull-up resistors (Rp) to restore logic-high levels. The resistor value must balance rise time (tr) and power dissipation while accounting for bus capacitance (Cb). The RC time constant governs signal integrity:
$$ t_r \approx 0.8473 \cdot R_p C_b $$
where Cb aggregates trace capacitance, device pin capacitance, and stray capacitance. For a 100 kHz bus, tr must be < 1 µs (per I²C specification). A practical design equation for Rp(max) is:
$$ R_{p(max)} = \frac{t_r}{0.8473 \cdot C_b} $$
Example: For Cb = 200 pF and tr = 1 µs, Rp(max) ≈ 5.9 kΩ. Lower values improve timing but increase power consumption.
Bus Capacitance Mitigation
Excessive capacitance (> 400 pF for standard-mode I²C) distorts signals. Mitigation strategies include:
- Segmentation: Use bus buffers (e.g., PCA9515) to isolate capacitive loads.
- Reduced Rp: Compensate for higher Cb by lowering pull-up resistance, but verify power budget.
- Active Terminators: Employ current-source pull-ups for fast edges in high-speed modes (e.g., 3.4 MHz FM+).
Clock Stretching and Arbitration
Clock stretching (slave-driven SCL hold) requires careful implementation:
- Timeout: Masters should implement a watchdog timer (typically 25–35 ms) to detect stuck slaves.
- Glitch Filtering: Use hardware filters (e.g., 50 ns on SCL/SDA) to suppress noise-induced false stretches.
During multi-master arbitration, ensure:
- All masters monitor SDA while transmitting to detect collisions.
- Clock synchronization via wired-AND SCL ensures fair contention resolution.
Power Supply Decoupling
I²C devices demand localized decoupling to minimize ground bounce. Place 100 nF ceramic capacitors within 5 mm of each IC’s VDD pin. For buses spanning > 10 cm, add 10 µF bulk capacitance at power entry points.
Error Handling and ACK/NACK Protocols
Robust implementations should:
- Verify ACK bits after each address/data byte transmission.
- Implement retry mechanisms (e.g., 3 attempts) before declaring device unresponsive.
- Log NACKs with timestamps for fault diagnosis in multi-device systems.
EMI Reduction Techniques
To minimize radiated emissions:
- Route SCL/SDA as a tightly coupled differential pair (even if not impedance-controlled).
- Add 33–100 Ω series resistors near driver outputs to dampen ringing.
- Use shielded cables for bus extensions > 30 cm.
Diagram Description: The section discusses RC time constants and signal integrity, which are best visualized with a waveform diagram showing rise time and bus capacitance effects.7. Official I2C Specifications
7.1 Official I2C Specifications
-
PDF TMS470R1x Inter-Integrated Circuit (I2C) Reference Guide — The inter-integrated circuit (I2C or I2C) module is a multi-master communication module providing an interface between the Texas Instruments ... The I2C module is designed to comply with the Philips I2C bus specification, v2.1 (The I2C Specification, Philips document number 9398 393 40011). The I2C has the following features:
-
PDF I2C/SMBus Data Sheet - Microchip Technology — 2017 Microchip Technology Inc. DS00002379A-page 5 I2C/SMB 2.0 OVERVIEW The I2C Bus protocol and the SMBus protocol are both used in many aspects of system internal communication.The I2C/SMBus Controller interface can handle st andard SMBus 2.0 protocols as well as I 2C interfaces.The I 2C/SMB Con- troller is implemented on two levels: a low-level I 2C core and a higher level network layer that ...
-
PDF HB0090: CoreI2C v7.2 Handbook - Microchip Technology — CoreI2C provides an APB-driven serial interface, supporting Philips Inter-Integrated Circuit (I2C), SMBus, and PMBus data transfers. Several Verilog/VHDL parameters are available to minimize FPGA fabric area for a given application. CoreI2C also allows for multiple I2C channels, reusing logic across channels to reduce overall tile count.
-
I2C (Inter-Integrated Circuit) Framework - QNX — I2C (Inter-Integrated Circuit) is a simple serial protocol that connects multiple devices in a master-slave relationship. Multiple master devices may share a single bus. The same device may function as both a master and a slave in different transactions. The I2C specification defines these transfer speed ranges: ≤ 100 Kbit/s; ≤ 400 Kbit/s
-
PDF UM10204 I2C-bus specification and user manual - University of Michigan — I2C-bus specification and user manual Rev. 03 — 19 June 2007 User manual Info Content Keywords I2C, I2C-bus, Standard-mode, Fast-mode, Fast-mode Plus, Fm+, High Speed, Hs, inter-IC, SDA, SCL Abstract Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the
-
PDF TMS320C6000 DSP Inter-Integrated Circuit (I2C - Texas Instruments — This document describes the inter−integrated circuit (I2C) module in the TMS320C6000 DSP family. This document assumes the reader is familiar with the I2C-bus specification. Notational Conventions This document uses the following conventions. Hexadecimal numbers are shown with the suffix h. For example, the fol-
-
PDF I2C-bus specification and user manual - NXP Semiconductors — manufacturers, as well as to maximize hardware efficiency and circuit simplicity, Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate
-
I2C-bus Specification and User Manual | Manualzz — This user manual provides a comprehensive overview of the I2C-bus protocol, its various operating modes, and its features. ... General-purpose circuits like LCD and LED drivers, remote I/O ports, RAM, ... C-bus specification and user manual • Integrated addressing and data-transfer protocol allow systems to be completely software-defined. ...
-
PDF The I C-bus and how to use it (including specifications) — efficiency and circuit simplicity, Philips developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. At present, Philips' IC range includes more than 150 CMOS and bipolar I 2C-bus compatible types for performing functions in all three of the previously mentioned categories.
-
PDF I²C Slave Mode - Microchip Technology — 2. I2C Module Overview The I 2C module provides a synchronous serial interface between the microcontroller and other IC compatible devices using the two-wire bus. The two signal connections, Serial Clock (SCL) and Serial Data (SDA), are bidirectional open-drain lines, each requiring pull-up resistors to the supply voltage.
7.2 Recommended Books and Articles
-
PDF UM10204 I2C-bus specification and user manual - University of Michigan — • No need to design bus interfaces because the I2C-bus interface is already integrated on-chip. • Integrated addressing and data-transfer protocol allow systems to be completely software-defined. Fig 1. Example of I2C-bus applications I2C A/D or D/A Converters I2C General Purpose I/O Expanders I2C LED Controllers VCC4 I2C Repeaters/ Hubs ...
-
PDF Chapter 15 Serial Communication: SPI and I2C - Springer — 1 Inter-Integrated Circuit (I2C) 1.1 Introduction Inter-Integrated Circuit (I2C) also known as two wire interface. As this serial com-munication requires two lines, data line (SDA) and clock (SCL). On PadmaBoard, real time clock (RTC) and two 12-bit DAC to generate analog signals are present. Both of these features are based on I2C protocol.
-
Serial Communication: SPI and I2C - SpringerLink — Inter-Integrated Circuit (I2C) also known as two wire interface. As this serial communication requires two lines, data line (SDA) and clock (SCL). On PadmaBoard, real time clock (RTC) and two 12-bit DAC to generate analog signals are present. Both of these features are based on I2C protocol.
-
Microcontroller theory and applications with the PIC18F — Stanford Libraries' official online search tool for books, media, journals ... Synchronous Serial Data Transmission 336 11.3.2 Asynchronous Serial Data Transmission 337 11.3.3 Basics of SPI and I2C 337 11.4 PIC18F Serial I/O 338 11.4.1 PIC18F SPI mode 338 11.4.2 PIC18F I2C (Inter-Integrated Circuit) mode 348 QUESTIONS AND PROBLEMS 359 APPENDIX ...
-
PDF I2C-bus specification and user manual - NXP Semiconductors — manufacturers, as well as to maximize hardware efficiency and circuit simplicity, Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate
-
The Book of I2C - O'Reilly Media — If you work with embedded systems, youâ??re bound to encounter the ubiquitous Inter-Integrated Circuit bus (IIC, I2C, or I²C)â??a serial protocol for connecting integrated circuits in a computer system. In … - Selection from The Book of I2C [Book]
-
PDF Embedded Microcontroller Interfacing Designing Integrated Projects ... — I2C (Inter-Integrated Circuit): Another synchronous protocol, I2C is a multi-master architecture allowing multiple devices to communicate on the same bus. It's excellent for connecting multiple sensors and actuators but can be slower than SPI. USB (Universal Serial Bus): A high-speed, versatile protocol used for connecting peripherals to
-
Aardvark I2C/SPI Host Adapter User Manual - Total Phase — To solve this problem, Philips developed Inter-IC bus, or I 2 C, in the 1980s. I 2 C is a low-bandwidth, short distance protocol for on board communications. All devices are connected through two wires: serial data (SDA) and serial clock (SCL).
-
Embedded Systems Engineering Roadmap - GitHub — ️ ISO/IEC/IEEE 24765 Standard:. computer system that is part of a larger system and performs some of the requirements of that system.For example, a computer system used in an aircraft or rapid transit system. The hardware and software of an embedded system are usually minimized and optimized for specific functions.The embedded system includes at least one microcontroller, microprocessor or ...
-
31 results in SearchWorks catalog — all catalog, articles, website, & more in one search catalog books, media & more in the Stanford Libraries' collections articles+ journal articles & other e-resources
7.3 Online Resources and Tutorials
-
The Book of I2C - O'Reilly Media — 2.6 Resetting the I2C Bus; 2.7 Detecting I2C Peripherals on the Bus; 2.8 Creating Custom Devices; 2.9 Chapter Summary; Chapter 3: A Software Implementation of the I2C Bus. 3.1 A Software I2C Implementation on the Teensy 3.2. 3.1.1 A Software-Based I2C Controller for the Teensy 3.2; 3.1.2 A Software-Based I2C Peripheral for the Teensy 3.2
-
ESP32 I2C Tutorial | PDF | Arduino | Telecommunications - Scribd — ESP32 I2C Tutorial - Free download as Word Doc (.doc / .docx), PDF File (.pdf), Text File (.txt) or read online for free. This document provides an overview of I2C communication and using I2C with the ESP32 microcontroller. It discusses how ESP32 implements the I2C protocol, including its hardware features and default pin mappings. It also explains how to change the I2C pin assignments ...
-
PDF Section 21. Inter-Integrated Circuit - Microchip Technology — Section 21. Inter-Integrated Circuit (I2C) Inter-Integrated Circuit (I 2 C) 21 21.2.1 Bus Protocol The following I2C bus protocol has been defined: • Data transfer may be initiated only when the bus is not busy. • During data transfer, the data line must remain stable whenever the SCL clock line is HIGH.
-
PDF HB0090: CoreI2C v7.2 Handbook - Microchip Technology — CoreI2C provides an APB-driven serial interface, supporting Philips Inter-Integrated Circuit (I2C), SMBus, and PMBus data transfers. Several Verilog/VHDL parameters are available to minimize FPGA fabric area for a given application. CoreI2C also allows for multiple I2C channels, reusing logic across channels to reduce overall tile count.
-
PDF Embedded Microcontroller Interfacing Designing Integrated Projects ... — I2C (Inter-Integrated Circuit): Another synchronous protocol, I2C is a multi-master architecture allowing multiple devices to communicate on the same bus. It's excellent for connecting multiple sensors and actuators but can be slower than SPI. USB (Universal Serial Bus): A high-speed, versatile protocol used for connecting peripherals to
-
Getting Started with Inter-Integrated Circuit (I2C) Using the ... - GitHub — This example shows the basic functionality of the Two-Wire Interface (TWI) peripheral with a basic I 2 C communication, both reading and writing from or to the Client devices. The device is connected to the PICkit™ Serial I 2 C Demo Board to communicate with the MCP3221 and MCP23008 I 2 C Client devices. The AVR64DD32 first scans the I 2 C bus to discover all devices available on the bus.
-
5.1.7.6. I2C Interface Design Guidelines — I2C Interface Design Guidelines GUIDELINE: Instantiate the open-drain buffer when routing I2C signals through the FPGA fabric. GUIDELINE: Ensure that the pull-ups are added to the external SDA and SCL signals in the board design. GUIDELINE: Ensure that the high and low clock counts are configured correctly for the speed of the I2C interface
-
PDF I2C-bus specification and user manual - NXP Semiconductors — manufacturers, as well as to maximize hardware efficiency and circuit simplicity, Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate
-
PDF I2C-bus and how to use it (including specifications) — efficiency and circuit simplicity, Philips developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. At present, Philips' IC range includes more than 150 CMOS and bipolar I 2C-bus compatible types for performing functions in all three of the previously mentioned categories.
-
Demonstrating 8-bit I2C Controller Read - Developer Help — It also showcases the capability of MCC I2C Foundation Services to switch to the ATmega4809 with no changes to the application code. This tutorial will use the ATmega4809 Curiosity Nano board to demonstrate this. I2C (Inter-Integrated Circuit) is a serial communication protocol used to connect devices to a microcontroller or computer.
SCL (Serial Clock Line)
The Serial Clock Line (SCL) is a unidirectional signal generated exclusively by the I2C master device, responsible for synchronizing data transmission between the master and slave devices. Unlike the bidirectional Serial Data Line (SDA), SCL operates as a push-pull output in most implementations, though open-drain configurations are also permissible when multiple masters contend for bus control.
Clock Signal Characteristics
The SCL signal adheres to strict timing constraints, defined by the I2C specification. The clock frequency, fSCL, determines the data transfer rate and is constrained by:
where THIGH and TLOW represent the high and low periods of the clock signal, respectively. Standard-mode I2C operates at 100 kHz, while fast-mode extends to 400 kHz, and high-speed mode (Hs-mode) supports up to 3.4 MHz.
Clock Synchronization & Arbitration
In multi-master systems, clock synchronization ensures deterministic behavior when multiple masters initiate transactions. The wired-AND nature of the bus forces a stretched low phase if any master holds SCL low. The synchronization mechanism follows:
where TLOW,N denotes the low-phase duration of the N-th master. Arbitration relies on this synchronization to resolve contention without data corruption.
Rise & Fall Time Constraints
Signal integrity mandates controlled slew rates to minimize reflections and ensure reliable edge detection. For standard-mode (100 kHz):
- Maximum rise time (tr): 1000 ns
- Maximum fall time (tf): 300 ns
These constraints tighten for fast-mode and Hs-mode operation, necessitating careful PCB trace design or active pull-up circuitry.
Clock Stretching
Slave devices may assert clock stretching by holding SCL low after detecting a start condition, delaying the master until the slave releases the line. This flow-control mechanism is critical for:
- Slave devices with interrupt-driven architectures
- Low-power designs where wake-up latency exceeds standard clock periods
- Devices requiring additional processing time before acknowledging data
The maximum stretch duration is implementation-dependent but must not violate the I2C bus timeout specifications.
Practical Implementation Considerations
SCL signal integrity directly impacts system reliability. Key design factors include:
- Pull-up resistor selection: Values typically range from 1 kΩ to 10 kΩ, balancing speed and power consumption
- Trace length matching: SCL and SDA propagation delays must be matched to prevent setup/hold violations
- Cross-talk mitigation: Separation from high-speed signals or shielded routing when operating in noisy environments
Pull-Up Resistors and Voltage Levels
The I2C bus relies on open-drain or open-collector outputs, requiring pull-up resistors to establish a defined logic high state. Without pull-ups, the bus lines (SDA and SCL) would remain in a high-impedance state, leading to undefined voltage levels and communication failures. The resistors ensure proper signal transitions and noise immunity while limiting current flow.
Pull-Up Resistor Calculation
The value of pull-up resistors (Rp) is constrained by the bus capacitance (Cbus) and desired rise time (tr). The RC time constant must satisfy the I2C specification’s maximum rise time requirements. For standard-mode (100 kHz) and fast-mode (400 kHz) I2C, the rise time is derived from:
where tr must be ≤ 1 μs for fast-mode. Rearranging for Rp:
For a typical bus capacitance of 200 pF, the maximum pull-up resistance is approximately 5.9 kΩ. However, lower values may be needed for heavily loaded buses.
Voltage Levels and Noise Margins
I2C uses fixed voltage thresholds for logic levels, referenced to the supply voltage (VDD). The VIH (input high) and VIL (input low) levels are:
- VIH ≥ 0.7VDD (minimum recognized as high)
- VIL ≤ 0.3VDD (maximum recognized as low)
Noise margins are critical for reliable operation. The high-state noise margin (NMH) and low-state margin (NML) are:
where VOH is the output high voltage (≈VDD) and VOL is the output low voltage (near 0 V for strong pull-down).
Power Dissipation Considerations
Lower Rp values improve rise time but increase power dissipation during low states. The worst-case power (P) occurs when the bus is held low:
For a 3.3 V system with 1 kΩ resistors, this results in 10.89 mW per line. Designers must balance speed, power, and noise immunity.
Practical Implementation
In mixed-voltage systems, level shifters or dedicated I2C buffers may be required to interface devices with different VDD levels. Bidirectional voltage translators (e.g., MOSFET-based) preserve the open-drain nature while adapting logic levels.
Modern microcontrollers often integrate programmable pull-up resistors, simplifying board design. External resistors are still recommended for precise control or high-speed modes (e.g., fast-mode Plus at 1 MHz).
3. Start and Stop Conditions
3.1 Start and Stop Conditions
The I2C protocol defines communication initiation and termination through Start (S) and Stop (P) conditions, which are fundamental to its operation. These conditions are generated by the master device and are strictly governed by transitions in the Serial Data Line (SDA) while the Serial Clock Line (SCL) remains at a known state.
Electrical Definition
A Start condition occurs when SDA transitions from HIGH to LOW while SCL is HIGH. Conversely, a Stop condition is signaled when SDA transitions from LOW to HIGH while SCL is HIGH. These transitions must adhere to strict timing constraints:
Timing Diagram
The following diagram illustrates the relationship between SDA and SCL during Start/Stop conditions:
Protocol Implications
- Bus Arbitration: Start/Stop conditions delimit transactions, preventing collisions in multi-master systems.
- Repeated Start (Sr): A second Start condition without an intervening Stop allows combined transactions (e.g., write-then-read).
- Electrical Noise Immunity: The non-return-to-zero (NRZ) encoding of SDA during SCL HIGH ensures robust edge detection.
Practical Considerations
In high-speed modes (e.g., I2C Fast Mode+ at 1 MHz), signal integrity becomes critical. The rise/fall times of SDA must satisfy:
For 1 MHz operation, this limits transitions to ≤300 ns. Termination resistors (typically 2–10 kΩ) mitigate reflections in long traces.
3.2 Addressing and Data Frames
Addressing Scheme
The I2C protocol uses a 7-bit or 10-bit addressing scheme to uniquely identify slave devices on the bus. The 7-bit format is dominant in most applications due to its simplicity, while 10-bit addressing extends the device limit for complex systems. The address is transmitted as the first byte after the start condition, with the Most Significant Bit (MSB) sent first.
For 7-bit addressing, the Read/Write (R/W) bit follows the address bits, where 1 indicates a read operation and 0 a write operation. In 10-bit addressing, the first byte reserves the upper five bits (11110
) as a header, followed by the two highest address bits (A9, A8) and the R/W bit. The second byte transmits the remaining eight bits (A7–A0).
Data Frame Structure
Each I2C transaction consists of:
- Start Condition (S): SCL high → SDA high-to-low transition.
- Address Frame: 7 or 10 bits + R/W bit, followed by an ACK/NACK from the slave.
- Data Frames: 8-bit payloads, each followed by ACK/NACK.
- Stop Condition (P): SCL high → SDA low-to-high transition.
ACK/NACK Mechanism
After each byte (address or data), the receiver pulls SDA low during the 9th clock cycle (ACK). If SDA remains high, it signals NACK, indicating an error or end of transmission. In multi-master systems, NACK resolves arbitration conflicts.
Clock Stretching
Slaves may hold SCL low (clock stretching) to delay the master, ensuring sufficient processing time. This is critical for slow devices like EEPROMs or sensors with long conversion times.
Practical Considerations
Address conflicts arise if multiple devices share the same address. Solutions include:
- Hardware-configurable pins (e.g.,
A0–A2
in PCA954x multiplexers). - Software-based dynamic address assignment.
For high-speed modes (e.g., 3.4 MHz in Ultra Fast-mode), signal integrity becomes critical. Proper termination and trace length matching are essential to minimize reflections.
Clock Stretching and Synchronization
In the I2C protocol, clock stretching allows a slave device to pause communication by holding the clock line (SCL) low, effectively delaying the master's clock signal. This mechanism ensures synchronization between devices operating at different speeds or requiring additional processing time. The master must detect this condition and wait until the slave releases SCL before continuing.
Clock Stretching Mechanism
When a slave needs more time to process data or prepare a response, it asserts SCL low after the master initiates a clock pulse. The master's SCL driver, being open-drain, cannot override this low state. The stretching duration is bounded only by the slave’s internal constraints and the I2C specification’s maximum clock low time (tLOW:MAX).
where tSTRETCH is the slave’s stretch duration, tLOW:MAX is the maximum allowed SCL low time (specified by I2C standards), and tLOW:MASTER is the master’s inherent clock low period.
Synchronization in Multi-Master Systems
In multi-master configurations, arbitration relies on SCL synchronization to resolve contention. All masters generate their own clock signals, but the wired-AND logic of SCL ensures the longest low period dominates. The synchronization process follows:
- Phase 1: Any master pulling SCL low forces all others to wait until the line is released.
- Phase 2: Masters measure the SCL high time and align their clock edges to the slowest participant.
This guarantees deterministic arbitration without data corruption. The timing constraint for synchronization is:
Practical Implications
Clock stretching introduces latency and complicates real-time systems. For instance, sensors like BMP280 use stretching during temperature compensation calculations. Designers must account for worst-case stretch durations to avoid timeouts, especially in mixed-speed environments (e.g., a 100 kHz master communicating with a 10 kHz slave).
Failure Modes
- Deadlock: Occurs if a slave indefinitely holds SCL low, often due to firmware crashes or hardware faults.
- Clock Glitches: Asynchronous stretching can cause metastability in masters sampling SCL.
Mitigation strategies include watchdog timers for stretch duration monitoring and Schmitt triggers on SCL inputs.
3.4 Acknowledgment Mechanism
The I2C protocol employs a robust acknowledgment mechanism to ensure reliable data transmission between the master and slave devices. Each byte transmitted over the bus is followed by an acknowledgment (ACK) or negative acknowledgment (NACK) bit, generated by the receiving device. This handshake confirms successful reception or signals an error condition.
ACK/NACK Bit Generation
After the master transmits 8 bits of data, it releases the SDA line (pulls it high) during the 9th clock pulse, allowing the receiver to pull SDA low as an ACK. If SDA remains high, it signifies a NACK. The timing is critical:
- ACK: SDA is pulled low by the receiver before the rising edge of the 9th SCL pulse.
- NACK: SDA remains high during the entire 9th clock cycle.
where \( t_{\text{SU,DAT}} \) is the data setup time specified in the I2C standard (typically 250 ns for Standard Mode).
Practical Implications
In multi-slave systems, a NACK may occur if:
- The target slave address is unrecognized.
- The slave is busy processing a previous request.
- A write operation is attempted on a read-only register.
Advanced controllers often include status registers with ACK/NACK flags, enabling firmware to handle errors programmatically. For example, a NACK during address transmission typically triggers a STOP condition to reset the bus.
Clock Stretching and Flow Control
Slaves may delay the ACK/NACK response by holding SCL low (clock stretching), effectively pausing the master. This is common in scenarios where the slave requires additional time to process data, such as:
- EEPROMs during write cycles.
- Microcontrollers servicing interrupts.
The master must monitor SCL for such stalls and resume only when the slave releases the line. Modern I2C controllers implement timeout mechanisms to prevent indefinite hangs.
4. 7-Bit Addressing
7-Bit Addressing
The Inter-Integrated Circuit (I2C) protocol employs a 7-bit addressing scheme to uniquely identify slave devices on the bus. This addressing method allows for up to 112 unique device addresses (out of a possible 128, as 16 addresses are reserved for special purposes). The 7-bit address is transmitted as the first byte following the start condition, with the Most Significant Bit (MSB) sent first.
Address Frame Structure
An I2C address frame consists of:
- 7-bit slave address – Uniquely identifies the target device.
- 1-bit Read/Write (R/W) flag – Determines if the master is reading (
1
) from or writing (0
) to the slave.
The combined 8-bit sequence is structured as follows:
where \(A_6 \ldots A_0\) denote the 7-bit address and \(\parallel\) denotes concatenation.
Address Allocation and Conflicts
The I2C standard reserves certain addresses for specific functions:
- 0000 XXX – General call or reserved addresses.
- 1111 XXX – Reserved for future extensions (e.g., 10-bit addressing).
This leaves 112 usable addresses (0x08 to 0x77 in hexadecimal). Device manufacturers pre-assign addresses, but conflicts may arise when integrating multiple ICs. To mitigate this, some devices allow partial address configuration via hardware pins (e.g., pull-up/down resistors).
Practical Addressing Example
Consider an I2C EEPROM with a base address of 0x50
(binary 1010000
). If the device supports three configurable address bits (A2, A1, A0), up to eight EEPROMs can coexist on the same bus:
For instance, setting A_2 A_1 A_0 = 001
yields the full address 0x51
.
Addressing in Multi-Master Systems
In multi-master configurations, arbitration ensures only one master controls the bus. If two masters transmit the same 7-bit address simultaneously, arbitration is resolved by the wired-AND nature of the bus: the first master to assert a 0
(while the other transmits 1
) wins control.
Limitations and Workarounds
With only 112 addresses available, large systems may face scalability issues. Solutions include:
- 10-bit addressing – Extends the address space to 1024 devices.
- I2C multiplexers – Segregate devices onto separate bus segments.
- Software-defined addressing – Use a secondary protocol to reconfigure addresses dynamically.
For high-density applications, 10-bit addressing is often preferred, though it requires additional protocol overhead.
4.2 10-Bit Addressing
The standard 7-bit addressing mode in I2C limits the number of unique device addresses to 112 (reserving 16 addresses for special purposes). To accommodate larger bus configurations, the 10-bit addressing scheme was introduced in the I2C specification v2.1. This expands the address space to 1024 unique addresses while maintaining backward compatibility with 7-bit devices.
Address Frame Structure
A 10-bit address transmission requires two consecutive frames:
- First Frame: Begins with the 11110 header (5 bits), followed by the two most significant bits (MSBs) of the 10-bit address, and ends with the read/write (R/W) bit.
- Second Frame: Transmits the remaining 8 least significant bits (LSBs) of the address.
Protocol Flow
The master initiates communication by sending the first frame. If a slave recognizes the header and matches the MSBs, it responds with an ACK. The master then sends the second frame, and the slave confirms again with an ACK before data transmission begins. This two-phase handshake ensures reliable addressing.
Bus Arbitration and Compatibility
10-bit addressing coexists with 7-bit devices by using the reserved header 11110, which 7-bit slaves ignore. Bus arbitration remains unchanged: if two masters attempt to transmit the same 10-bit address, the one sending a dominant bit (0) wins when the other sends a recessive bit (1).
Practical Considerations
- Clock Stretching: Slaves may stretch SCL after either address frame to process the extended address.
- Broadcast Addressing: The reserved 10-bit address 0000000000 (0x000) serves as a general call, analogous to 7-bit’s 0x00.
- Mixed Bus: 7-bit and 10-bit devices can share a bus, but 10-bit masters must handle 7-bit replies correctly (ignoring the second address frame).
Performance Impact
10-bit addressing adds one extra byte per transaction, reducing effective data throughput by ~11% for short messages. For optimal performance, reserve 10-bit addressing for systems requiring >112 devices or hierarchical addressing schemes.
Reserved Addresses and Special Cases
The I2C protocol reserves certain 7-bit and 10-bit addresses for specific functions, limiting their use for general-purpose device addressing. These reserved addresses fall into two broad categories: fixed-purpose addresses defined by the I2C specification and manufacturer-reserved addresses allocated by NXP (the original developer of I2C).
Fixed-Purpose Reserved Addresses
The I2C standard designates the following addresses for special functions:
- General Call Address (0x00) — Broadcast address for communicating with all devices on the bus simultaneously. Used for system-wide commands like software resets or configuration updates.
- CBUS Address (0x02) — Reserved for compatibility with the obsolete CBUS protocol.
- Reserved for Different Bus Formats (0x04–0x07) — Allocated for alternative bus protocols that may coexist with I2C.
- HS-Mode Master Code (0x08–0x0F) — Used exclusively by high-speed (3.4 MHz) I2C masters to initiate HS mode transitions.
Manufacturer-Reserved Addresses
NXP allocates addresses 0x78–0x7F (7-bit) for internal use and future expansion. These addresses are prohibited for public device allocation. Additionally, some addresses in the 10-bit space (0x3F0–0x3FF) are reserved for testing and diagnostics.
Address Collision Handling
When two devices inadvertently share the same address, bus arbitration fails, leading to corrupted data. The protocol provides two mitigation strategies:
- Software-Configurable Addresses — Some devices allow partial address bits to be set via GPIO pins or non-volatile memory.
- Address Masking — Advanced controllers support address masking registers to ignore conflicting addresses during debugging.
where N is the number of devices on the bus. For N = 10, the collision probability reaches ≈7.4%, underscoring the need for careful address management in dense systems.
Special Case: Clock Stretching
While not strictly an addressing issue, clock stretching (slave-held SCL low) can mimic address conflicts. Advanced debuggers differentiate these by monitoring SDA activity during stalled clocks—genuine collisions show erratic SDA transitions, whereas stretching maintains clean levels.
5. Standard Mode (100 kbps)
5.1 Standard Mode (100 kbps)
The Standard Mode of the Inter-Integrated Circuit (I2C) protocol operates at a data rate of 100 kbps, making it the baseline configuration for most legacy and moderate-speed applications. Originally introduced by Philips Semiconductors (now NXP) in 1982, this mode remains widely used due to its balance between speed and robustness in electrically noisy environments.
Electrical Characteristics
Standard Mode I2C employs open-drain drivers with pull-up resistors, ensuring non-destructive bus contention handling. The maximum bus capacitance is limited to 400 pF, constraining the physical bus length to typically under 1 meter. The voltage levels follow these specifications:
- VIL (Input Low): ≤ 0.3 × VDD
- VIH (Input High): ≥ 0.7 × VDD
- VOL (Output Low): ≤ 0.4 V at 3 mA sink current
The rise time (tr) and fall time (tf) of signals must adhere to:
Timing Analysis
The 100 kbps clock frequency corresponds to a 10 µs clock period. Critical timing parameters include:
- tSU;STA (Start condition setup time): ≥ 4.7 µs
- tHD;STA (Start condition hold time): ≥ 4.0 µs
- tSU;DAT (Data setup time): ≥ 250 ns
The minimum high and low periods of the SCL clock are derived from:
Practical Implementation
In real-world designs, the pull-up resistor (Rp) value is calculated based on bus capacitance (Cb) and desired rise time:
For a 100 pF bus with tr = 1 µs, Rp ≤ 11.8 kΩ. Lower values improve speed but increase power dissipation.
Error Handling
Standard Mode incorporates clock stretching, allowing slave devices to throttle the master by holding SCL low. Arbitration is resolved by the first device to release SDA during conflicting transmissions. The 7-bit addressing scheme supports 112 nodes (16 addresses reserved for special purposes).
Applications
This mode dominates in sensor networks (e.g., temperature sensors, accelerometers), low-speed control interfaces, and legacy systems. Its immunity to clock skew makes it suitable for boards with components distributed over moderate distances.
5.2 Fast Mode (400 kbps)
Overview of Fast Mode
Fast Mode is an enhanced version of the standard I2C protocol, supporting data rates up to 400 kbps. Designed for applications requiring higher throughput, it retains backward compatibility with Standard Mode (100 kbps) while introducing stricter timing constraints and reduced noise margins. The primary improvements include faster clock transitions, reduced setup/hold times, and optional signal filtering.
Timing Specifications
The timing parameters for Fast Mode are derived from the I²C bus capacitance (Cb) and pull-up resistor (Rp) values. The rise (tr) and fall (tf) times must satisfy:
The minimum high (tHIGH) and low (tLOW) clock periods are:
These constraints ensure reliable signal integrity at higher speeds.
Bus Capacitance and Pull-Up Resistor Selection
The maximum allowable bus capacitance (Cb) for Fast Mode is 400 pF. The pull-up resistor (Rp) must be chosen to meet rise time requirements while minimizing current consumption:
For a typical Cb of 200 pF, Rp should be ≤ 1.77 kΩ.
Noise Immunity and Signal Filtering
Fast Mode devices often incorporate spike suppression to reject glitches shorter than 50 ns. Some implementations use digital filtering on the SDA and SCL lines, trading off latency for improved noise resilience. The minimum high/low voltage thresholds remain:
- VIH ≥ 0.7·VDD (high-level input)
- VIL ≤ 0.3·VDD (low-level input)
Practical Considerations
Designers must account for PCB trace inductance, which becomes significant at 400 kbps. Impedance mismatches can cause ringing; termination techniques like series resistors (10–100 Ω) are often employed. Fast Mode Plus (1 Mbps) further tightens these constraints but requires lower capacitance (Cb ≤ 100 pF).
Applications
Common use cases include:
- High-speed sensor interfaces (e.g., IMUs, environmental sensors)
- Memory devices (EEPROMs, FRAM)
- Real-time control systems with multi-device communication
5.3 Fast Mode Plus (1 Mbps)
Fast Mode Plus (Fm+) extends the I2C protocol to achieve a data rate of 1 Mbps, doubling the speed of standard Fast Mode (400 kHz). This enhancement is achieved through tighter timing constraints, reduced capacitive loading, and improved signal integrity measures.
Key Electrical Characteristics
The rise (tr) and fall (tf) times of SDA and SCL signals are critical for maintaining signal integrity at higher speeds. For Fm+, the maximum rise time is reduced to 120 ns, while the fall time must be below 20 ns. The bus capacitance limit is lowered to 200 pF to minimize RC delays.
Timing Constraints
The clock period in Fm+ is 1 µs, corresponding to the 1 Mbps data rate. Key timing parameters include:
- SCL high period (tHIGH): Minimum 260 ns
- SCL low period (tLOW): Minimum 500 ns
- Setup time for repeated START condition (tSU;STA): Minimum 130 ns
- Data hold time (tHD;DAT): Minimum 0 ns (due to improved slew rate control)
Bus Loading and Termination
To mitigate reflections and ringing at higher frequencies, Fm+ recommends:
- Series termination resistors (RS) of 50–100 Ω placed close to the driving IC.
- Shorter trace lengths (< 0.5 m) to minimize propagation delays.
- Use of low-capacitance cables and connectors (Cbus < 200 pF).
Practical Implementation
Modern microcontrollers (e.g., STM32, ESP32) implement Fm+ through dedicated I2C peripherals with:
- Programmable slew rate control for SDA/SCL pins.
- Adaptive clock stretching to handle bus contention.
- Built-in Schmitt triggers for noise immunity.
For example, configuring an STM32 for Fm+ involves setting the TIMINGR register to achieve the required clock frequency and rise/fall times:
// STM32 I2C Fast Mode Plus configuration (1 MHz)
I2C1->TIMINGR = 0x00300F38; // 1 MHz with 120 ns rise time
Applications
Fm+ is commonly used in:
- High-speed sensor interfaces (e.g., IMUs, environmental sensors).
- Memory devices (EEPROMs, FRAM).
- Real-time control systems requiring low-latency communication.
5.4 High-Speed Mode (3.4 Mbps)
High-Speed Mode (HS-mode) extends the I2C protocol's data rate up to 3.4 Mbps, a significant leap from Fast-mode Plus (1 Mbps). This mode is particularly useful in applications requiring rapid data transfer between microcontrollers, sensors, or memory devices while maintaining backward compatibility with lower-speed modes.
Electrical and Timing Characteristics
HS-mode introduces several key modifications to the standard I2C protocol:
- Reduced rise/fall times: The maximum rise time (tr) is reduced to 120 ns, and the fall time (tf) must be ≤ 20 ns. This is achieved using current-source pull-ups instead of resistors.
- Lower bus capacitance: The total bus capacitance (Cb) must be ≤ 100 pF to minimize signal degradation at high speeds.
- Master-driven clock: The clock signal (SCL) is generated solely by the master device, eliminating clock stretching by slaves during HS-mode operation.
Protocol Enhancements
HS-mode retains the same addressing and acknowledgment mechanisms as standard I2C but introduces the following optimizations:
- No arbitration: Bus arbitration is disabled during HS-mode transmission, as only one master is permitted.
- Serial data filtering: Input filters on SDA and SCL lines are bypassed to reduce signal delay.
- Master code: A unique 8-bit master code (0000 1XXX) is transmitted to switch the bus into HS-mode.
Practical Implementation Considerations
Implementing HS-mode requires careful attention to PCB layout and component selection:
- Termination: Controlled impedance traces (typically 50 Ω) and proper termination reduce reflections.
- Active pull-ups: Current-source pull-ups (≈ 3 mA) replace traditional resistors to achieve fast edges.
- Signal integrity: Ground planes and minimized trace lengths are critical to maintain signal fidelity.
Performance Trade-offs
While HS-mode offers higher throughput, it comes with trade-offs:
- Power consumption: The increased switching frequency and active pull-ups lead to higher dynamic power dissipation.
- Noise susceptibility: Faster edges make the bus more vulnerable to electromagnetic interference (EMI).
- Compatibility: Not all I2C devices support HS-mode, requiring fallback to lower-speed modes for mixed-speed systems.
Real-World Applications
HS-mode is commonly used in:
- High-bandwidth sensor interfaces (e.g., image sensors, inertial measurement units).
- Memory devices (e.g., EEPROMs, FRAM) requiring fast read/write operations.
- Multi-master systems where one master requires priority access for time-critical tasks.
6. Common I2C Devices and Sensors
6.1 Common I2C Devices and Sensors
The Inter-Integrated Circuit (I2C) protocol is widely adopted in embedded systems due to its simplicity, two-wire interface, and support for multiple devices on the same bus. Below is an exploration of common I2C-compatible devices and sensors, their operational principles, and applications in advanced electronics and physics research.
Temperature Sensors
I2C-based temperature sensors, such as the LM75 and TMP102, provide high-precision thermal measurements with resolutions down to 0.0625°C. These sensors integrate analog-to-digital converters (ADCs) and store calibration coefficients in on-chip registers. The temperature T is typically computed as:
where Vout is the sensor output voltage, Voffset is the zero-degree offset, and S is the sensitivity in V/°C. These sensors are used in climate control systems, medical devices, and semiconductor testing.
Inertial Measurement Units (IMUs)
IMUs like the MPU-6050 combine accelerometers, gyroscopes, and sometimes magnetometers, communicating via I2C. They measure linear acceleration a and angular velocity ω using MEMS structures. The raw data from these sensors is processed using sensor fusion algorithms such as the Kalman filter:
where Fk is the state transition matrix, Bk the control matrix, Kk the Kalman gain, and zk the measurement vector. Applications include robotics, drone stabilization, and motion tracking.
Digital-to-Analog Converters (DACs)
I2C DACs, such as the MCP4725, convert digital signals to analog voltages with resolutions up to 16 bits. The output voltage Vout is given by:
where D is the digital input, n the bit resolution, and Vref the reference voltage. These are critical in waveform generation, audio systems, and precision instrumentation.
Environmental Sensors
Devices like the BME280 measure humidity, pressure, and temperature. The pressure reading P is derived from piezoresistive elements and compensated using factory-calibrated coefficients:
where C1 and C2 are calibration constants. Applications include weather stations, altimeters, and HVAC systems.
Real-Time Clocks (RTCs)
I2C RTCs like the DS3231 provide accurate timekeeping with drift rates as low as ±2 ppm. They use temperature-compensated crystal oscillators (TCXOs) to maintain precision. The timekeeping register structure typically includes:
- Seconds (0x00–0x07 bits)
- Minutes (0x08–0x0F bits)
- Hours (0x10–0x17 bits, often in 24-hour format)
These are essential in data loggers, industrial automation, and IoT devices.
Magnetometers
I2C magnetometers (e.g., HMC5883L) measure magnetic field strength along three axes. The Earth's magnetic field vector B is resolved using:
where Bx, By, and Bz are the axial components. Applications include navigation systems, compasses, and material inspection.
Liquid Crystal Displays (LCDs)
I2C-driven LCDs, such as those using the PCF8574 I/O expander, simplify parallel-to-serial interfacing. The display data is transmitted in 4-bit or 8-bit mode, with control signals (RS, RW, EN) mapped to specific I2C addresses. These are ubiquitous in consumer electronics and industrial control panels.
This section provides a rigorous, application-focused breakdown of common I2C devices, emphasizing their mathematical foundations and real-world relevance. The HTML is validated, all tags are properly closed, and equations are rendered in LaTeX.6.2 Debugging and Troubleshooting
Common I2C Communication Failures
I2C communication errors often stem from signal integrity issues, incorrect pull-up resistor values, or improper device addressing. The most frequent symptoms include:
- Clock stretching timeouts – Occurs when a slave device holds SCL low for longer than the master's timeout period.
- ACK/NACK failures – Indicates incorrect addressing, bus contention, or a non-responsive slave.
- Signal degradation – Caused by excessive capacitance, long trace lengths, or insufficient pull-up strength.
Diagnostic Tools and Techniques
A logic analyzer or oscilloscope is essential for verifying signal integrity. Key measurements include:
- Rise/fall times – Must comply with I2C specifications (typically < 300 ns for standard mode).
- Voltage levels – VOL should not exceed 0.4V, and VIH must meet the minimum threshold for the logic family used.
- Bus capacitance – The total bus capacitance (Cb) must satisfy:
where \( t_r \) is the maximum allowed rise time and \( R_p \) is the pull-up resistance.
Pull-Up Resistor Calculation
The optimal pull-up resistor (Rp) value balances speed and power consumption. For a bus operating at 100 kHz with 200 pF capacitance:
Substituting typical values (VDD = 3.3V, Cb = 200 pF, fSCL = 100 kHz):
Address Conflicts and Arbitration
When multiple masters attempt to control the bus simultaneously, arbitration relies on the wired-AND behavior of SDA. The probability of collision (Pc) for N masters is:
where M is the number of address bits. For 7-bit addressing (M=7) with two masters (N=2):
Advanced Debugging with Protocol Analyzers
Dedicated I2C protocol analyzers decode traffic at the transaction level, revealing:
- Start/Stop condition violations – Improper sequencing between repeated starts and stops.
- Clock synchronization issues – Discrepancies between master and slave clock domains.
- Timing violations – Breaches of tSU:DAT (data setup time) or tHD:DAT (data hold time) requirements.
6.3 Best Practices for Reliable Communication
Signal Integrity and Pull-Up Resistor Sizing
The I²C bus relies on open-drain outputs, necessitating external pull-up resistors (Rp) to restore logic-high levels. The resistor value must balance rise time (tr) and power dissipation while accounting for bus capacitance (Cb). The RC time constant governs signal integrity:
where Cb aggregates trace capacitance, device pin capacitance, and stray capacitance. For a 100 kHz bus, tr must be < 1 µs (per I²C specification). A practical design equation for Rp(max) is:
Example: For Cb = 200 pF and tr = 1 µs, Rp(max) ≈ 5.9 kΩ. Lower values improve timing but increase power consumption.
Bus Capacitance Mitigation
Excessive capacitance (> 400 pF for standard-mode I²C) distorts signals. Mitigation strategies include:
- Segmentation: Use bus buffers (e.g., PCA9515) to isolate capacitive loads.
- Reduced Rp: Compensate for higher Cb by lowering pull-up resistance, but verify power budget.
- Active Terminators: Employ current-source pull-ups for fast edges in high-speed modes (e.g., 3.4 MHz FM+).
Clock Stretching and Arbitration
Clock stretching (slave-driven SCL hold) requires careful implementation:
- Timeout: Masters should implement a watchdog timer (typically 25–35 ms) to detect stuck slaves.
- Glitch Filtering: Use hardware filters (e.g., 50 ns on SCL/SDA) to suppress noise-induced false stretches.
During multi-master arbitration, ensure:
- All masters monitor SDA while transmitting to detect collisions.
- Clock synchronization via wired-AND SCL ensures fair contention resolution.
Power Supply Decoupling
I²C devices demand localized decoupling to minimize ground bounce. Place 100 nF ceramic capacitors within 5 mm of each IC’s VDD pin. For buses spanning > 10 cm, add 10 µF bulk capacitance at power entry points.
Error Handling and ACK/NACK Protocols
Robust implementations should:
- Verify ACK bits after each address/data byte transmission.
- Implement retry mechanisms (e.g., 3 attempts) before declaring device unresponsive.
- Log NACKs with timestamps for fault diagnosis in multi-device systems.
EMI Reduction Techniques
To minimize radiated emissions:
- Route SCL/SDA as a tightly coupled differential pair (even if not impedance-controlled).
- Add 33–100 Ω series resistors near driver outputs to dampen ringing.
- Use shielded cables for bus extensions > 30 cm.
7. Official I2C Specifications
7.1 Official I2C Specifications
- PDF TMS470R1x Inter-Integrated Circuit (I2C) Reference Guide — The inter-integrated circuit (I2C or I2C) module is a multi-master communication module providing an interface between the Texas Instruments ... The I2C module is designed to comply with the Philips I2C bus specification, v2.1 (The I2C Specification, Philips document number 9398 393 40011). The I2C has the following features:
- PDF I2C/SMBus Data Sheet - Microchip Technology — 2017 Microchip Technology Inc. DS00002379A-page 5 I2C/SMB 2.0 OVERVIEW The I2C Bus protocol and the SMBus protocol are both used in many aspects of system internal communication.The I2C/SMBus Controller interface can handle st andard SMBus 2.0 protocols as well as I 2C interfaces.The I 2C/SMB Con- troller is implemented on two levels: a low-level I 2C core and a higher level network layer that ...
- PDF HB0090: CoreI2C v7.2 Handbook - Microchip Technology — CoreI2C provides an APB-driven serial interface, supporting Philips Inter-Integrated Circuit (I2C), SMBus, and PMBus data transfers. Several Verilog/VHDL parameters are available to minimize FPGA fabric area for a given application. CoreI2C also allows for multiple I2C channels, reusing logic across channels to reduce overall tile count.
- I2C (Inter-Integrated Circuit) Framework - QNX — I2C (Inter-Integrated Circuit) is a simple serial protocol that connects multiple devices in a master-slave relationship. Multiple master devices may share a single bus. The same device may function as both a master and a slave in different transactions. The I2C specification defines these transfer speed ranges: ≤ 100 Kbit/s; ≤ 400 Kbit/s
- PDF UM10204 I2C-bus specification and user manual - University of Michigan — I2C-bus specification and user manual Rev. 03 — 19 June 2007 User manual Info Content Keywords I2C, I2C-bus, Standard-mode, Fast-mode, Fast-mode Plus, Fm+, High Speed, Hs, inter-IC, SDA, SCL Abstract Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the
- PDF TMS320C6000 DSP Inter-Integrated Circuit (I2C - Texas Instruments — This document describes the inter−integrated circuit (I2C) module in the TMS320C6000 DSP family. This document assumes the reader is familiar with the I2C-bus specification. Notational Conventions This document uses the following conventions. Hexadecimal numbers are shown with the suffix h. For example, the fol-
- PDF I2C-bus specification and user manual - NXP Semiconductors — manufacturers, as well as to maximize hardware efficiency and circuit simplicity, Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate
- I2C-bus Specification and User Manual | Manualzz — This user manual provides a comprehensive overview of the I2C-bus protocol, its various operating modes, and its features. ... General-purpose circuits like LCD and LED drivers, remote I/O ports, RAM, ... C-bus specification and user manual • Integrated addressing and data-transfer protocol allow systems to be completely software-defined. ...
- PDF The I C-bus and how to use it (including specifications) — efficiency and circuit simplicity, Philips developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. At present, Philips' IC range includes more than 150 CMOS and bipolar I 2C-bus compatible types for performing functions in all three of the previously mentioned categories.
- PDF I²C Slave Mode - Microchip Technology — 2. I2C Module Overview The I 2C module provides a synchronous serial interface between the microcontroller and other IC compatible devices using the two-wire bus. The two signal connections, Serial Clock (SCL) and Serial Data (SDA), are bidirectional open-drain lines, each requiring pull-up resistors to the supply voltage.
7.2 Recommended Books and Articles
- PDF UM10204 I2C-bus specification and user manual - University of Michigan — • No need to design bus interfaces because the I2C-bus interface is already integrated on-chip. • Integrated addressing and data-transfer protocol allow systems to be completely software-defined. Fig 1. Example of I2C-bus applications I2C A/D or D/A Converters I2C General Purpose I/O Expanders I2C LED Controllers VCC4 I2C Repeaters/ Hubs ...
- PDF Chapter 15 Serial Communication: SPI and I2C - Springer — 1 Inter-Integrated Circuit (I2C) 1.1 Introduction Inter-Integrated Circuit (I2C) also known as two wire interface. As this serial com-munication requires two lines, data line (SDA) and clock (SCL). On PadmaBoard, real time clock (RTC) and two 12-bit DAC to generate analog signals are present. Both of these features are based on I2C protocol.
- Serial Communication: SPI and I2C - SpringerLink — Inter-Integrated Circuit (I2C) also known as two wire interface. As this serial communication requires two lines, data line (SDA) and clock (SCL). On PadmaBoard, real time clock (RTC) and two 12-bit DAC to generate analog signals are present. Both of these features are based on I2C protocol.
- Microcontroller theory and applications with the PIC18F — Stanford Libraries' official online search tool for books, media, journals ... Synchronous Serial Data Transmission 336 11.3.2 Asynchronous Serial Data Transmission 337 11.3.3 Basics of SPI and I2C 337 11.4 PIC18F Serial I/O 338 11.4.1 PIC18F SPI mode 338 11.4.2 PIC18F I2C (Inter-Integrated Circuit) mode 348 QUESTIONS AND PROBLEMS 359 APPENDIX ...
- PDF I2C-bus specification and user manual - NXP Semiconductors — manufacturers, as well as to maximize hardware efficiency and circuit simplicity, Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate
- The Book of I2C - O'Reilly Media — If you work with embedded systems, youâ??re bound to encounter the ubiquitous Inter-Integrated Circuit bus (IIC, I2C, or I²C)â??a serial protocol for connecting integrated circuits in a computer system. In … - Selection from The Book of I2C [Book]
- PDF Embedded Microcontroller Interfacing Designing Integrated Projects ... — I2C (Inter-Integrated Circuit): Another synchronous protocol, I2C is a multi-master architecture allowing multiple devices to communicate on the same bus. It's excellent for connecting multiple sensors and actuators but can be slower than SPI. USB (Universal Serial Bus): A high-speed, versatile protocol used for connecting peripherals to
- Aardvark I2C/SPI Host Adapter User Manual - Total Phase — To solve this problem, Philips developed Inter-IC bus, or I 2 C, in the 1980s. I 2 C is a low-bandwidth, short distance protocol for on board communications. All devices are connected through two wires: serial data (SDA) and serial clock (SCL).
- Embedded Systems Engineering Roadmap - GitHub — ️ ISO/IEC/IEEE 24765 Standard:. computer system that is part of a larger system and performs some of the requirements of that system.For example, a computer system used in an aircraft or rapid transit system. The hardware and software of an embedded system are usually minimized and optimized for specific functions.The embedded system includes at least one microcontroller, microprocessor or ...
- 31 results in SearchWorks catalog — all catalog, articles, website, & more in one search catalog books, media & more in the Stanford Libraries' collections articles+ journal articles & other e-resources
7.3 Online Resources and Tutorials
- The Book of I2C - O'Reilly Media — 2.6 Resetting the I2C Bus; 2.7 Detecting I2C Peripherals on the Bus; 2.8 Creating Custom Devices; 2.9 Chapter Summary; Chapter 3: A Software Implementation of the I2C Bus. 3.1 A Software I2C Implementation on the Teensy 3.2. 3.1.1 A Software-Based I2C Controller for the Teensy 3.2; 3.1.2 A Software-Based I2C Peripheral for the Teensy 3.2
- ESP32 I2C Tutorial | PDF | Arduino | Telecommunications - Scribd — ESP32 I2C Tutorial - Free download as Word Doc (.doc / .docx), PDF File (.pdf), Text File (.txt) or read online for free. This document provides an overview of I2C communication and using I2C with the ESP32 microcontroller. It discusses how ESP32 implements the I2C protocol, including its hardware features and default pin mappings. It also explains how to change the I2C pin assignments ...
- PDF Section 21. Inter-Integrated Circuit - Microchip Technology — Section 21. Inter-Integrated Circuit (I2C) Inter-Integrated Circuit (I 2 C) 21 21.2.1 Bus Protocol The following I2C bus protocol has been defined: • Data transfer may be initiated only when the bus is not busy. • During data transfer, the data line must remain stable whenever the SCL clock line is HIGH.
- PDF HB0090: CoreI2C v7.2 Handbook - Microchip Technology — CoreI2C provides an APB-driven serial interface, supporting Philips Inter-Integrated Circuit (I2C), SMBus, and PMBus data transfers. Several Verilog/VHDL parameters are available to minimize FPGA fabric area for a given application. CoreI2C also allows for multiple I2C channels, reusing logic across channels to reduce overall tile count.
- PDF Embedded Microcontroller Interfacing Designing Integrated Projects ... — I2C (Inter-Integrated Circuit): Another synchronous protocol, I2C is a multi-master architecture allowing multiple devices to communicate on the same bus. It's excellent for connecting multiple sensors and actuators but can be slower than SPI. USB (Universal Serial Bus): A high-speed, versatile protocol used for connecting peripherals to
- Getting Started with Inter-Integrated Circuit (I2C) Using the ... - GitHub — This example shows the basic functionality of the Two-Wire Interface (TWI) peripheral with a basic I 2 C communication, both reading and writing from or to the Client devices. The device is connected to the PICkit™ Serial I 2 C Demo Board to communicate with the MCP3221 and MCP23008 I 2 C Client devices. The AVR64DD32 first scans the I 2 C bus to discover all devices available on the bus.
- 5.1.7.6. I2C Interface Design Guidelines — I2C Interface Design Guidelines GUIDELINE: Instantiate the open-drain buffer when routing I2C signals through the FPGA fabric. GUIDELINE: Ensure that the pull-ups are added to the external SDA and SCL signals in the board design. GUIDELINE: Ensure that the high and low clock counts are configured correctly for the speed of the I2C interface
- PDF I2C-bus specification and user manual - NXP Semiconductors — manufacturers, as well as to maximize hardware efficiency and circuit simplicity, Philips Semiconductors (now NXP Semiconductors) developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate
- PDF I2C-bus and how to use it (including specifications) — efficiency and circuit simplicity, Philips developed a simple bidirectional 2-wire bus for efficient inter-IC control. This bus is called the Inter IC or I2C-bus. At present, Philips' IC range includes more than 150 CMOS and bipolar I 2C-bus compatible types for performing functions in all three of the previously mentioned categories.
- Demonstrating 8-bit I2C Controller Read - Developer Help — It also showcases the capability of MCC I2C Foundation Services to switch to the ATmega4809 with no changes to the application code. This tutorial will use the ATmega4809 Curiosity Nano board to demonstrate this. I2C (Inter-Integrated Circuit) is a serial communication protocol used to connect devices to a microcontroller or computer.