Main Content

Raspberry Pi I2C Interface

Inter-Integrated Circuit (I2C) is a protocol for communicating with low-speed peripherals.

Depending on the model and revision of your board, Raspberry Pi® hardware has one or two I2C buses. Each bus has an I2C Central connected to two bidirectional lines, serial data line (SDA), and serial clock (SCL). These two lines are connected to a pair of pins, such as I2C1_SDA (GPIO2) and I2C1_SCL (GPIO3), on the GPIO header.

You can connect multiple I2C devices, such ADCs, LCDs, and sensors, to the I2C pins on the Raspberry Pi hardware. Each I2C device on an I2C bus must have a unique address. Most devices have a default address that is assigned by the manufacturer. If the address is not unique, follow the manufacturer’s instructions for reconfiguring the address. Often, you can reconfigure the address using a pair of jumpers on the device. The Raspberry Pi hardware supports only 7-bit addresses. This 7-bit address space supports 128 unique addresses.

The I2C pins on the Raspberry Pi hardware are pulled up with 1.8 kOhm resistors. The I2C devices must support +3.3V and not draw more current than the Raspberry Pi’s maximum.