Skip to Content
Circuitera

PCF8574 I²C I/O expander

Add eight GPIO lines through I²C and understand why the PCF8574 port must be written high before it is read as an input.

Microscope photograph of a Philips PCF8574 port expander die
NXP-PCF8574-HD.jpg by ZeptoBars · CC BY 3.0. Resized and encoded as WebP without cropping.

Port behavior

Each line can sink current when commanded low. A high write releases the line to a weak source after the initial transition so an external circuit can pull it low for input use.

Source: Texas Instruments

Address pins

A0, A1 and A2 select one of eight addresses. Check the chip variant before assuming the address used by another board. The SDA and SCL pull-ups must be compatible with every connected device.

Source: Texas Instruments

LCD backpack trap

The expander’s data pins can be assigned differently on different display boards. A successful I²C scan confirms the bus address but does not identify which pin controls enable or backlight.

Source: Texas Instruments

Specifications

ParameterValue or conditionSource
Recommended supply2.5–6 VTexas Instruments
Port capacityEight quasi-bidirectional digital I/O linesTexas Instruments

Compatibility and practice

Verify the exact chip suffix, bus voltage and pin mapping, especially on LCD backpacks.

Sources and datasheets