

The PCF8575C is a 16-bit I/O port expander that communicates via the I2C protocol. It enables microcontrollers to control up to 16 digital input/output pins using only two communication lines (SCL and SDA). This makes it an excellent choice for applications where additional GPIO pins are required but limited by the microcontroller's onboard resources.








The PCF8575C has 24 pins. Below is the pin configuration:
| Pin | Name | Type | Description |
|---|---|---|---|
| 1 | P0.0 | I/O | General-purpose I/O pin |
| 2 | P0.1 | I/O | General-purpose I/O pin |
| 3 | P0.2 | I/O | General-purpose I/O pin |
| 4 | P0.3 | I/O | General-purpose I/O pin |
| 5 | P0.4 | I/O | General-purpose I/O pin |
| 6 | P0.5 | I/O | General-purpose I/O pin |
| 7 | P0.6 | I/O | General-purpose I/O pin |
| 8 | P0.7 | I/O | General-purpose I/O pin |
| 9 | GND | Power | Ground connection |
| 10 | A0 | Input | I2C address selection bit 0 |
| 11 | A1 | Input | I2C address selection bit 1 |
| 12 | A2 | Input | I2C address selection bit 2 |
| 13 | RESET | Input | Active-low reset pin |
| 14 | SCL | Input | I2C clock line |
| 15 | SDA | Input/Output | I2C data line |
| 16 | INT | Output | Interrupt output (active low) |
| 17 | P1.0 | I/O | General-purpose I/O pin |
| 18 | P1.1 | I/O | General-purpose I/O pin |
| 19 | P1.2 | I/O | General-purpose I/O pin |
| 20 | P1.3 | I/O | General-purpose I/O pin |
| 21 | P1.4 | I/O | General-purpose I/O pin |
| 22 | P1.5 | I/O | General-purpose I/O pin |
| 23 | P1.6 | I/O | General-purpose I/O pin |
| 24 | P1.7 | I/O | General-purpose I/O pin |
Below is an example of how to use the PCF8575C with an Arduino UNO to toggle an LED connected to one of its pins:
#include <Wire.h> // Include the Wire library for I2C communication
#define PCF8575C_ADDRESS 0x20 // Default I2C address of the PCF8575C
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(PCF8575C_ADDRESS);
Wire.write(0x00); // Low byte (P0.0 to P0.7)
Wire.write(0x00); // High byte (P1.0 to P1.7)
Wire.endTransmission();
}
void loop() {
// Turn on an LED connected to P0.0
Wire.beginTransmission(PCF8575C_ADDRESS);
Wire.write(0x01); // Set P0.0 high, others low
Wire.write(0x00); // Keep P1.x pins low
Wire.endTransmission();
delay(1000); // Wait for 1 second
// Turn off the LED
Wire.beginTransmission(PCF8575C_ADDRESS);
Wire.write(0x00); // Set all P0.x pins low
Wire.write(0x00); // Keep P1.x pins low
Wire.endTransmission();
delay(1000); // Wait for 1 second
}
I2C Communication Not Working
I/O Pins Not Responding
Interrupt Pin Not Functioning
Can the PCF8575C handle analog signals? No, the PCF8575C is designed for digital input/output only.
What happens if multiple PCF8575C devices share the same I2C address? Address conflicts will occur, leading to communication errors. Use unique addresses for each device by configuring the A0, A1, and A2 pins.
Is the PCF8575C compatible with 3.3V systems? Yes, the PCF8575C operates within a voltage range of 2.5V to 5.5V, making it compatible with both 3.3V and 5V systems.