Overview

The PCF8574 (and its companion variant PCF8574A) is an 8-bit quasi-bidirectional I/O expander for the I2C bus manufactured by NXP Semiconductors and Texas Instruments. It provides general-purpose remote I/O expansion for microcontrollers via a two-line bidirectional I2C bus (SDA and SCL).

It features 8 quasi-bidirectional I/O pins (P0P7), three hardware address input pins (A0, A1, A2), and an active-LOW open-drain interrupt output (INT). The PCF8574 is widely integrated into I2C backpack boards for HD44780 character LCD displays (LCD1602 / LCD2004) and used for button matrix scanning or driving LEDs.

Quick reference

Operating voltage (VCC)2.5 V to 6.0 V DC
I2C bus clock speedUp to 100 kHz (Standard-mode I2C)
I/O ports8 Quasi-bidirectional pins (P0P7)
I2C address (PCF8574)0x20 to 0x27 (determined by A0A2)
I2C address (PCF8574A)0x38 to 0x3F (determined by A0A2)
Interrupt outputActive-LOW open-drain (INT)
Standby current10 µA max

Pinout

16-Pin DIP / SOIC Package

PinNameTypeDescription
1A0Digital InputAddress input 0
2A1Digital InputAddress input 1
3A2Digital InputAddress input 2
4P0Quasi-I/OQuasi-bidirectional I/O port 0
5P1Quasi-I/OQuasi-bidirectional I/O port 1
6P2Quasi-I/OQuasi-bidirectional I/O port 2
7P3Quasi-I/OQuasi-bidirectional I/O port 3
8VSSPowerGround (0 V)
9P4Quasi-I/OQuasi-bidirectional I/O port 4
10P5Quasi-I/OQuasi-bidirectional I/O port 5
11P6Quasi-I/OQuasi-bidirectional I/O port 6
12P7Quasi-I/OQuasi-bidirectional I/O port 7
13INTDigital OutputInterrupt output (Open-drain, Active-LOW)
14SCLDigital InputI2C Serial Clock line
15SDADigital I/OI2C Serial Data line (Open-drain)
16VDDPowerPositive supply voltage (+2.5 V to +6.0 V)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply VoltageVDDV_{DD}2.55.06.0V
Supply CurrentIDDI_{DD}40100µAVDD=5.0 VV_{DD} = 5.0\text{ V}, no load, fSCL=100 kHzf_{SCL} = 100\text{ kHz}
Standby CurrentIstbI_{stb}2.510µAVDD=5.0 VV_{DD} = 5.0\text{ V}, IIO=0I_{IO} = 0
LOW-level Input VoltageVILV_{IL}-0.50.3VDD0.3 V_{DD}V
HIGH-level Input VoltageVIHV_{IH}0.7VDD0.7 V_{DD}VDD+0.5V_{DD} + 0.5V
LOW-level Output CurrentIOLI_{OL}1025mAVDD=5.0 VV_{DD} = 5.0\text{ V}, VOL=1.0 VV_{OL} = 1.0\text{ V} (Sinking)
HIGH-level Output CurrentIOHI_{OH}-30-100-300µAVDD=5.0 VV_{DD} = 5.0\text{ V}, VOH=VSSV_{OH} = V_{SS} (Source)
SCL/SDA Clock FrequencyfSCLf_{SCL}0100kHzStandard Mode

Communication & Addressing

The PCF8574 uses a 7-bit slave address consisting of a 4-bit fixed control code (0100 for PCF8574, 0111 for PCF8574A) followed by 3 programmable address bits (A2, A1, A0).

Address Map

Part NumberSlave Address Byte Format (R/W = 0)I2C Address Range (Hex)
PCF85740 1 0 0 A2 A1 A0 R/W0x200x27
PCF8574A0 1 1 1 A2 A1 A0 R/W0x380x3F

Quasi-Bidirectional I/O Architecture

Each pin can be used as an input or output without a direction control register.

  • As an Output: Sinks up to 25 mA (LOW). Sourcing current (HIGH) is limited to ~100 µA via an internal pull-up.
  • As an Input: Software must first write a HIGH (1) to the port pin. When configured HIGH, an external driver can pull the pin LOW.

Wiring

PCF8574 BreakoutMicrocontroller (Arduino / ESP32)Notes
VCC / VDD5V (or 3.3V)Power supply
GND / VSSGNDCommon ground
SDASDA (A4 on Uno, GPIO21 on ESP32)I2C Data (requires pull-up resistors)
SCLSCL (A5 on Uno, GPIO22 on ESP32)I2C Clock (requires pull-up resistors)
INTGPIO Pin (e.g. GPIO2)Optional interrupt line
Note

When using PCF8574 as an LCD backpack board, solder jumpers A0, A1, and A2 configure the address (0x27 is common for PCF8574, 0x3F for PCF8574A).

Common mistakes

  • Attempting to read inputs without writing HIGH first: Because ports are quasi-bidirectional, reading a pin that was previously written LOW will always return 0. Always write 1 (HIGH) to pins intended as inputs before reading.
  • Relying on strong HIGH output drive: The chip can sink up to 25 mA (LOW) but can only source ~100 µA (HIGH). Active-HIGH LED circuits will be very dim; connect LEDs in active-LOW (sinking) configuration instead.
  • Confusing PCF8574 and PCF8574A I2C addresses: PCF8574 uses base 0x20, whereas PCF8574A uses base 0x38. Running an I2C scanner script is recommended if communication fails.

Notes

  • Up to 8 PCF8574 and 8 PCF8574A devices can co-exist on the same I2C bus for up to 128 total I/O pins.

Assets & downloads