

The PCF8575 is a 16-bit I/O expander that communicates via the I2C protocol, enabling microcontrollers to expand their GPIO capabilities. It features two 8-bit ports (Port 0 and Port 1), which can be configured as inputs or outputs. This component is ideal for applications requiring additional GPIO pins without increasing the microcontroller's pin usage. The PCF8575 is commonly used in projects involving LED control, keypad interfacing, sensor integration, and other peripheral expansions.








Below are the key technical details of the PCF8575:
| Parameter | Value |
|---|---|
| Operating Voltage | 2.5V to 5.5V |
| I2C Communication Speed | Up to 400 kHz (Fast Mode) |
| Number of I/O Pins | 16 (2 ports, 8 bits each) |
| Input High Voltage (VIH) | 0.7 × VDD (minimum) |
| Input Low Voltage (VIL) | 0.3 × VDD (maximum) |
| Output Low Current | 25 mA (maximum per pin) |
| Output High Current | -25 mA (maximum per pin) |
| I2C Address Range | 0x20 to 0x27 (configurable via A0, A1, A2 pins) |
| Package Types | SOIC, TSSOP, DIP |
The PCF8575 has 16 GPIO pins divided into two 8-bit ports (P0 and P1) and additional pins for power, ground, and I2C communication.
| Pin | Name | Description |
|---|---|---|
| 1 | P00 | Port 0, Bit 0 (GPIO) |
| 2 | P01 | Port 0, Bit 1 (GPIO) |
| 3 | P02 | Port 0, Bit 2 (GPIO) |
| 4 | P03 | Port 0, Bit 3 (GPIO) |
| 5 | P04 | Port 0, Bit 4 (GPIO) |
| 6 | P05 | Port 0, Bit 5 (GPIO) |
| 7 | P06 | Port 0, Bit 6 (GPIO) |
| 8 | P07 | Port 0, Bit 7 (GPIO) |
| 9 | GND | Ground |
| 10 | SDA | I2C Data Line |
| 11 | SCL | I2C Clock Line |
| 12 | /INT | Interrupt Output (active low) |
| 13 | P10 | Port 1, Bit 0 (GPIO) |
| 14 | P11 | Port 1, Bit 1 (GPIO) |
| 15 | P12 | Port 1, Bit 2 (GPIO) |
| 16 | P13 | Port 1, Bit 3 (GPIO) |
| 17 | P14 | Port 1, Bit 4 (GPIO) |
| 18 | P15 | Port 1, Bit 5 (GPIO) |
| 19 | P16 | Port 1, Bit 6 (GPIO) |
| 20 | P17 | Port 1, Bit 7 (GPIO) |
| 21 | A0 | I2C Address Selection Bit 0 |
| 22 | A1 | I2C Address Selection Bit 1 |
| 23 | A2 | I2C Address Selection Bit 2 |
| 24 | VCC | Power Supply |
The following example demonstrates how to use the PCF8575 with an Arduino UNO to toggle an LED connected to P00.
#include <Wire.h> // Include the Wire library for I2C communication
#define PCF8575_ADDRESS 0x20 // Default I2C address of the PCF8575
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Set all pins to output and turn them off
Wire.beginTransmission(PCF8575_ADDRESS);
Wire.write(0x00); // Low byte (P00-P07)
Wire.write(0x00); // High byte (P10-P17)
Wire.endTransmission();
}
void loop() {
// Turn on the LED connected to P00
Wire.beginTransmission(PCF8575_ADDRESS);
Wire.write(0x01); // Set P00 high, others low
Wire.write(0x00); // High byte remains low
Wire.endTransmission();
delay(1000); // Wait for 1 second
// Turn off the LED connected to P00
Wire.beginTransmission(PCF8575_ADDRESS);
Wire.write(0x00); // Set all low
Wire.write(0x00); // High byte remains low
Wire.endTransmission();
delay(1000); // Wait for 1 second
}
No Response from the PCF8575:
Incorrect GPIO Behavior:
I2C Communication Errors:
Q: Can the PCF8575 handle analog signals?
A: No, the PCF8575 is designed for digital I/O only. It cannot process analog signals.
Q: How many PCF8575 devices can be connected to the same I2C bus?
A: Up to 8 devices can be connected by configuring unique I2C addresses using the A0, A1, and A2 pins.
Q: What happens if the power supply voltage exceeds 5.5V?
A: Exceeding the maximum voltage can damage the PCF8575. Always ensure the supply voltage is within the specified range.
Q: Can I use the PCF8575 with a 3.3V microcontroller?
A: Yes, the PCF8575 operates at 2.5V–5.5V, making it compatible with both 3.3V and 5V systems.