Table of Contents

In the I2C protocol, each device on the bus is identified by a unique address. The master uses these addresses to communicate with specific slave devices. Let’s dive into how I2C addresses work and whether the master has an address.

Only the slave devices have an I2C address. The master is the controller of the bus and initiates communication, but it doesn’t require a specific address because it never responds to other devices—only the slaves do.

In short, the I2C bus is designed to allow a single master to communicate with multiple slaves, each identified by a unique address, while the master controls the flow of data.

I2C Address

  • I2C addresses are 7-bit or 10-bit values that identify slave devices on the bus.
  • 7-bit addresses are the most common and range from 0x00 to 0x7F (0 to 127 in decimal).
  • 10-bit addresses are less commonly used but allow a larger address space. For example:
  • A sensor may have an address of 0x27 or 0x68, which the master uses to identify and communicate with that specific sensor.
  • Addressing Process:
  1. The master sends the 7-bit address of the slave device it wants to communicate with.
  2. The master indicates whether it wants to read from or write to the slave by sending a bit (0 for write, 1 for read).
  3. The slave with the matching address responds and begins the communication.

I2C Address Configuration

The I2C address of a device or sensor may be hardcoded into the hardware, which means it is fixed by the manufacturer. However, different batches of the same device or sensor model may come with different hardcoded I2C addresses. This variation in I2C addresses can typically be identified based on the IC model number or part number, as the manufacturer may assign different addresses to different production runs or batches for the same device.

For many I2C devices and sensors, it is possible to change the I2C address to suit specific needs, often by using jumper pins or short pads on the device. These jumper pins or solder pads are usually connected to the address selection pins (such as A1, A2, A3) and allow the user to pull them either high or low (connect to VCC or GND). Changing the state of these pins will adjust the device’s I2C address, enabling multiple devices to coexist on the same I2C bus without address conflicts.

Categorized in:

I2C,