What Is the PCF8574? I2C I/O Expander: Pinout and Uses
The PCF8574 is an I/O expander that adds 8 GPIO over I2C. Using just SDA/SCL it increases an MCU's pin count; its most common use is I2C LCD backpack boards. With the address pins (A0–A2) up to 8 can share one bus. Its pins are quasi-bidirectional: strong pull-low, weak pull-high.
The PCF8574 is an I/O expander that adds 8 general-purpose I/O (GPIO) pins over I2C. Using just 2 I2C lines (SDA/SCL) it increases an MCU's pin count. Its most common use is I2C LCD "backpack" boards. For the concept, see what is I2C.
What is the PCF8574 used for?
Pin saving: 8 GPIO from 2 I2C lines. Reading buttons, driving LEDs/relays and especially driving a 16x2 LCD over I2C (LCD backpack). With the address pins (A0–A2) up to 8 PCF8574s can share one bus.
PCF8574 pinout (DIP-16)
| Pin | Function | Pin | Function |
|---|---|---|---|
| 1 | A0 (address) | 16 | VCC |
| 2 | A1 (address) | 15 | SDA |
| 3 | A2 (address) | 14 | SCL |
| 4 | P0 | 13 | INT (interrupt output) |
| 5 | P1 | 12 | P7 |
| 6 | P2 | 11 | P6 |
| 7 | P3 | 10 | P5 |
| 8 | GND | 9 | P4 |
Watch out: quasi-bidirectional
The PCF8574's pins are "quasi-bidirectional": they pull low strongly but pull high with a weak pull-up. So as an output it sources current weakly (you usually wire an LED between the pin and VCC, with inverted logic). To read an input you must first drive the pin high.
Limitations
- Weak high-drive on outputs (good for sinking, not sourcing).
- Limited by I2C speed; for fast GPIO use a direct MCU pin.
Equivalents and alternatives
- PCF8574A: a version with a different I2C address range.
- PCF8575: the 16-bit version.
- MCP23017: a true bidirectional 16-bit I2C/SPI expander.
Find it in our catalog
Use the PCF8574 search.