

The I2C PC8574 is an 8-bit I/O expander that communicates via the I2C protocol, enabling microcontrollers to control additional input/output pins. This component is particularly useful in applications where the number of available GPIO pins on a microcontroller is insufficient. By using the PC8574, you can expand the number of digital I/O pins without requiring additional microcontroller resources.








The PC8574 is a versatile and efficient I/O expander. Below are its key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 2.5V to 6V |
| Maximum Sink Current | 25mA per pin |
| Maximum Source Current | 300µA per pin |
| Communication Protocol | I2C (2-wire) |
| I2C Address Range | 0x20 to 0x27 (configurable via A0, A1, A2 pins) |
| Number of I/O Pins | 8 |
| Operating Temperature | -40°C to +85°C |
The PC8574 has 16 pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | P0 | General-purpose I/O pin 0 |
| 2 | P1 | General-purpose I/O pin 1 |
| 3 | P2 | General-purpose I/O pin 2 |
| 4 | P3 | General-purpose I/O pin 3 |
| 5 | P4 | General-purpose I/O pin 4 |
| 6 | P5 | General-purpose I/O pin 5 |
| 7 | P6 | General-purpose I/O pin 6 |
| 8 | P7 | General-purpose I/O pin 7 |
| 9 | GND | Ground (0V) |
| 10 | SDA | I2C data line |
| 11 | SCL | I2C clock line |
| 12 | INT | Interrupt output (active low, optional use) |
| 13 | A2 | Address selection bit 2 (used to configure I2C address) |
| 14 | A1 | Address selection bit 1 (used to configure I2C address) |
| 15 | A0 | Address selection bit 0 (used to configure I2C address) |
| 16 | VCC | Power supply (2.5V to 6V) |
The PC8574 is straightforward to use in a circuit. Below are the steps and considerations for integrating it into your project:
Below is an example of how to use the PC8574 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 PC8574_ADDRESS 0x20 // I2C address of the PC8574 (adjust as needed)
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
// Set all pins on the PC8574 as outputs and turn them off
Wire.beginTransmission(PC8574_ADDRESS);
Wire.write(0xFF); // Write 0xFF to set all pins HIGH (off for active-low devices)
Wire.endTransmission();
}
void loop() {
// Turn on the LED connected to P0
Wire.beginTransmission(PC8574_ADDRESS);
Wire.write(0xFE); // Set P0 LOW (active) and others HIGH
Wire.endTransmission();
delay(1000); // Wait for 1 second
// Turn off the LED connected to P0
Wire.beginTransmission(PC8574_ADDRESS);
Wire.write(0xFF); // Set all pins HIGH (inactive)
Wire.endTransmission();
delay(1000); // Wait for 1 second
}
I2C Communication Failure
Incorrect I2C Address
Pins Not Responding
Low Current Output
Q: Can the PC8574 be used with 3.3V microcontrollers?
A: Yes, the PC8574 operates at 2.5V to 6V, making it compatible with both 3.3V and 5V systems.
Q: How many PC8574 devices can be connected to a single I2C bus?
A: Up to 8 devices can be connected by configuring unique I2C addresses using the A0, A1, and A2 pins.
Q: Can the PC8574 handle analog signals?
A: No, the PC8574 is designed for digital I/O only. Use an ADC for analog signals.
Q: What happens if the INT pin is not used?
A: The INT pin is optional. If not used, it can be left unconnected.