Aziz Bench

PCA9685 I²C address

The PCA9685 (16-channel 12-bit PWM / servo driver) can answer on 0x40–0x77: below is how to choose.

I²C address (7-bit)
0x40–0x77
55 possible addresses
Write / read (8-bit)
0x80 / 0x81
Binary
1000000
Shares an address with
53 devices
Where it sits on the bus its addresses reserved
0123456789ABCDEF
00000102030405060708090A0B0C0D0E0F
10101112131415161718191A1B1C1D1E1F
20202122232425262728292A2B2C2D2E2F
30303132333435363738393A3B3C3D3E3F
40404142434445464748494A4B4C4D4E4F
50505152535455565758595A5B5C5D5E5F
60606162636465666768696A6B6C6D6E6F
70707172737475767778797A7B7C7D7E7F

How to set the address

Wire the address pins like this:

A5…A0 → 0x40–0x77 (0x70 = All Call)

At power-up it also answers the All Call address 0x70, which clashes with a TCA9548A at its default address. Turn All Call off in MODE1, or move the multiplexer.

Devices that use the same addresses

Two devices on the same bus can’t answer on the same address. These modules from our list use at least one of these addresses:

DeviceWhat it isShared address
HDC1080temperature and humidity sensor0x40
INA219current/voltage/power monitor0x40–0x4F (16)
INA226current/voltage/power monitor0x40–0x4F (16)
INA260current/voltage/power monitor with integrated shunt0x40–0x4F (16)
INA32213-channel current/voltage monitor0x40, 0x41, 0x42, 0x43
Si7021temperature and humidity sensor0x40
OPT3001ambient light sensor0x44, 0x45, 0x46, 0x47
SHT30 / SHT31 / SHT35temperature and humidity sensor0x44, 0x45
SHT40 / SHT41 / SHT43 / SHT45 (SHT4x)temperature and humidity sensor0x44, 0x45, 0x46
ADS101512-bit 4-channel ADC0x48, 0x49, 0x4A, 0x4B
Show all 53 devices
DeviceWhat it isShared address
ADS111516-bit 4-channel ADC0x48, 0x49, 0x4A, 0x4B
ADS78308-bit 8-channel ADC0x48, 0x49, 0x4A, 0x4B
LM75Bdigital temperature sensor / thermostat0x48–0x4F (8)
PCF85918-bit 4-channel ADC + 1 DAC0x48–0x4F (8)
TMP102digital temperature sensor0x48, 0x49, 0x4A, 0x4B
TMP117high-accuracy digital temperature sensor0x48, 0x49, 0x4A, 0x4B
24LC256 / 24AA256 / 24FC256256-Kbit I2C EEPROM0x50–0x57 (8)
AT24C3232-Kbit I2C EEPROM0x50–0x57 (8)
PCF85063Areal-time clock0x51
ENS160metal-oxide air quality (TVOC/eCO2/AQI) sensor0x52, 0x53
ADXL3453-axis accelerometer0x53
BQ27441-G1single-cell Li-ion fuel gauge0x55
MAX30100pulse oximeter and heart-rate sensor0x57
SGP30VOC and eCO2 gas sensor0x58
SGP40VOC index gas sensor0x59
SGP41VOC and NOx index gas sensor0x59
CCS811eCO2 / TVOC gas sensor0x5A, 0x5B
MLX90614non-contact infrared thermometer0x5A
MPR12112-channel capacitive touch sensor controller0x5A, 0x5B, 0x5C, 0x5D
LPS22HBbarometric pressure sensor0x5C, 0x5D
GT9115-point capacitive touch screen controller0x5D
MCP472512-bit DAC with EEPROM0x60–0x67 (8)
MCP472812-bit quad DAC with EEPROM0x60–0x67 (8)
SCD30NDIR CO2, temperature and humidity module0x61
SCD40 / SCD41photoacoustic CO2, temperature and humidity sensor0x62
BMI2706-axis IMU0x68, 0x69
DS1307real-time clock0x68
DS3231temperature-compensated real-time clock0x68
MPU-60506-axis accelerometer + gyroscope0x68, 0x69
MPU-68866-axis IMU0x68, 0x69
MPU-92509-axis IMU (accel + gyro + AK8963 magnetometer)0x68, 0x69
SEN50 / SEN54 / SEN55particulate matter, VOC/NOx, temperature and humidity module0x69
SHTC3temperature and humidity sensor0x70
SX150916-channel I/O expander with LED driver and keypad engine0x70, 0x71
TCA9548A8-channel I2C multiplexer0x70–0x77 (8)
IP5306power-bank charger/boost SoC, I2C-enabled variant0x75
BME280temperature, humidity and pressure sensor0x76, 0x77
BME680gas (VOC), temperature, humidity and pressure sensor0x76, 0x77
BME688AI gas, temperature, humidity and pressure sensor0x76, 0x77
BMP280pressure and temperature sensor0x76, 0x77
BMP388pressure and temperature sensor0x76, 0x77
MS5611-01BAbarometric pressure sensor (altimeter)0x76, 0x77
BMP180pressure and temperature sensor0x77

If two of them end up on the same address, move one with its address pin, put one behind a TCA9548A multiplexer (0x70–0x77), or use a second I²C bus: the ESP32, ESP32-S3 and RP2040 have two I²C controllers (the ESP32-C3 has one).

Check your whole bus →Add the PCA9685 and your other modules: the checker finds conflicts, suggests free addresses and sizes the pull-ups.

7-bit and 8-bit address

I²C addresses are 7 bits long. Some datasheets and libraries write them as 8-bit numbers, with the read/write bit added on the right: that is why the same chip can appear as 0x40 or 0x80. Arduino’s Wire library and ESPHome use the 7-bit form.

Its addresses run from 0x40 to 0x77 in 7-bit form, that is from 0x80 to 0xEE as 8-bit write addresses.

Check that it answers

Upload this sketch with the PCA9685 wired to SDA and SCL: it tries every address the chip can use and prints the one that answers. On an ESP32 the default pins are GPIO21 (SDA) and GPIO22 (SCL); on an Arduino Uno, A4 and A5.

#include <Wire.h>

const byte ADDRS[] = {
  0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
  0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
  0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
  0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
  0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
  0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
  0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77
};

void setup() {
  Serial.begin(115200);
  Wire.begin();
  for (byte a : ADDRS) {
    Wire.beginTransmission(a);
    if (Wire.endTransmission() == 0) {
      Serial.print("PCA9685 answers at 0x");
      if (a < 0x10) Serial.print('0');
      Serial.println(a, HEX);
      return;
    }
  }
  Serial.println("No answer: check the wiring");
}

void loop() {}

In ESPHome the bus is scanned at boot (scan: true is the default): the log lists every address that answers.

i2c:
  sda: GPIO21
  scl: GPIO22
  scan: true

Pull-up resistors

SDA and SCL need pull-up resistors to the supply. Many breakout boards already carry them, often 4.7 kΩ or 10 kΩ, and with several boards on the bus they add up in parallel. The I²C checker works out the allowed range for your bus voltage and speed.

Frequently asked questions

What is the I2C address of the PCA9685?

0x40–0x77, depending on the wiring: A5…A0 → 0x40–0x77 (0x70 = All Call).

Can I use more than one PCA9685 on the same bus?

Yes, up to 55, each set to a different address. For more, use a TCA9548A multiplexer or a second I²C bus.

Why doesn’t the PCA9685 show up in an I2C scan?

Check, in this order: SDA and SCL not swapped; ground shared between the boards; pull-up resistors on SDA and SCL; the module powered at the voltage it is made for; the address pin not left floating; and that your code uses the 7-bit address (0x40), not the 8-bit one (0x80).

Similar devices

Addresses checked against the PCA9685 datasheet.