

The Bus I2C (Inter-Integrated Circuit) is a communication protocol developed for connecting low-speed devices such as sensors, microcontrollers, and other peripherals in a multi-master, multi-slave configuration. Manufactured by Chino, this protocol is widely used in embedded systems due to its simplicity, efficiency, and ability to connect multiple devices using only two wires.








The I2C protocol operates using two bidirectional lines:
| Parameter | Specification |
|---|---|
| Voltage Levels | 3.3V or 5V (depending on the system) |
| Clock Speed | Standard Mode: 100 kHz |
| Fast Mode: 400 kHz | |
| Fast Mode Plus: 1 MHz | |
| High-Speed Mode: 3.4 MHz | |
| Number of Devices | Up to 127 devices (7-bit addressing) |
| Communication Type | Half-duplex |
| Pull-up Resistors | Required on both SDA and SCL lines |
| Pin Name | Description |
|---|---|
| SDA | Serial Data Line for bidirectional data transfer |
| SCL | Serial Clock Line for synchronization |
| GND | Ground connection |
| VCC | Power supply (3.3V or 5V) |
Below is an example of interfacing an I2C temperature sensor with an Arduino UNO:
#include <Wire.h> // Include the Wire library for I2C communication
#define SENSOR_ADDRESS 0x48 // Replace with your sensor's I2C address
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
}
void loop() {
Wire.beginTransmission(SENSOR_ADDRESS); // Start communication with the sensor
Wire.write(0x00); // Send a command to read temperature (example command)
Wire.endTransmission(); // End transmission
Wire.requestFrom(SENSOR_ADDRESS, 2); // Request 2 bytes of data from the sensor
if (Wire.available() == 2) { // Check if 2 bytes are available
int temp = Wire.read() << 8 | Wire.read(); // Combine the two bytes
Serial.print("Temperature: ");
Serial.println(temp / 256.0); // Convert and print the temperature
}
delay(1000); // Wait for 1 second before the next reading
}
No Communication Between Devices:
Address Conflicts:
Data Corruption:
Clock Stretching Issues:
By following this documentation, users can effectively implement and troubleshoot the Bus I2C protocol in their projects.