Overview
The PCF8574 I2C serial interface adapter is a tiny breakout board that solders onto the back of a 1602 or 2004 character LCD and converts the LCD's parallel HD44780 interface into a 2-wire I2C bus. Instead of tying up six or more digital pins on your microcontroller, you only need SDA and SCL.
The board includes a contrast trimpot, a backlight enable jumper, and three address-select solder pads (A0, A1, A2). You can run multiple LCDs on a single I2C bus by setting different addresses on each. Default address is typically 0x27 or 0x3F depending on the chip variant.
At a Glance
Specifications
| Parameter | Value |
| IC | PCF8574 (or PCF8574A) |
| Operating Voltage | 5V DC |
| Operating Current | ~25 mA (with backlight on) |
| Interface | I2C, 100 kHz default (up to 400 kHz) |
| I2C Address | 0x20 - 0x27 (PCF8574) or 0x38 - 0x3F (PCF8574A); typical 0x27 / 0x3F |
| Address Selection | 3 solder pads (A0, A1, A2) |
| LCD Compatibility | HD44780-compatible 1602 (16x2) and 2004 (20x4) |
| Backlight Control | On/off via jumper or software (P3 of PCF8574) |
| Contrast Adjustment | Onboard 10k trimpot |
| Header | 16-pin row to mount on LCD; 4-pin output (GND, VCC, SDA, SCL) |
Pinout Diagram
Wiring Guide
Arduino Wiring
First, solder the 16-pin male header on the back of your 1602 or 2004 LCD, then plug the adapter on. The 4-pin I2C output goes to your Arduino. The PCF8574 already has internal pull-ups, but adding 4.7k externally can help on long wires.
| Adapter Pin | Arduino Pin |
|---|---|
| GND | GND |
| VCC | 5V |
| SDA | A4 (SDA) |
| SCL | A5 (SCL) |
ESP32 Wiring
The PCF8574 needs 5V to drive the LCD backlight properly, but the I2C lines are 5V signals. Most ESP32 boards have 5V-tolerant I2C pins, but a bidirectional logic level shifter is the safest choice for production builds.
| Adapter Pin | ESP32 Pin | Details |
|---|---|---|
| GND | GND | |
| VCC | VIN (5V) | LCD needs 5V |
| SDA | GPIO 21 | Via level shifter (recommended) |
| SCL | GPIO 22 | Via level shifter (recommended) |
Raspberry Pi Wiring
Like the ESP32, the Raspberry Pi GPIO is 3.3V while the PCF8574 wants 5V. Use a level shifter on SDA and SCL for safe long-term use. Power the LCD from the Pi's 5V rail (pin 2 or 4).
| Adapter Pin | Raspberry Pi Pin | Details |
|---|---|---|
| GND | Pin 6 (GND) | |
| VCC | Pin 2 (5V) | |
| SDA | Pin 3 (GPIO 2) | Via level shifter |
| SCL | Pin 5 (GPIO 3) | Via level shifter |
i2cdetect -y 1 on the Pi to find the LCD's address. You'll usually see 0x27 or 0x3F.
Raspberry Pi Pico Wiring
Same story as ESP32/RPi — the Pico is 3.3V GPIO. Use a level shifter for reliable I2C with the 5V LCD module.
| Adapter Pin | Pico Pin | Details |
|---|---|---|
| GND | GND | |
| VCC | VBUS (5V) | USB power |
| SDA | GP4 | Via level shifter |
| SCL | GP5 | Via level shifter |
Code Examples
Arduino
// PCF8574 I2C 1602 LCD - Arduino Example
// Library: LiquidCrystal_I2C by Frank de Brabander
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set I2C address (0x27 typical, try 0x3F if blank)
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Hello, ShillehTek!");
lcd.setCursor(0, 1);
lcd.print("PCF8574 I2C LCD");
}
void loop() {
// nothing
}
Arduino — I2C Address Scanner
// Find the LCD's I2C address
#include <Wire.h>
void setup() {
Wire.begin();
Serial.begin(9600);
Serial.println("I2C Scanner");
}
void loop() {
for (byte addr = 1; addr < 127; addr++) {
Wire.beginTransmission(addr);
if (Wire.endTransmission() == 0) {
Serial.print("Found device at 0x");
Serial.println(addr, HEX);
}
}
delay(5000);
}
Raspberry Pi (Python)
#!/usr/bin/env python3
# Install: pip install RPLCD smbus2
# Enable I2C: sudo raspi-config -> Interface Options -> I2C
from RPLCD.i2c import CharLCD
lcd = CharLCD('PCF8574', 0x27, port=1, cols=16, rows=2)
lcd.write_string('Hello, ShillehTek!')
lcd.crlf()
lcd.write_string('PCF8574 I2C LCD')
Raspberry Pi Pico (MicroPython)
# PCF8574 LCD on Pico - MicroPython
# Save i2c_lcd.py and lcd_api.py from the dhylands/python_lcd repo to the Pico
# https://github.com/dhylands/python_lcd
from machine import I2C, Pin
from i2c_lcd import I2cLcd
I2C_ADDR = 0x27 # try 0x3F if blank
i2c = I2C(0, sda=Pin(4), scl=Pin(5), freq=400000)
lcd = I2cLcd(i2c, I2C_ADDR, 2, 16)
lcd.putstr("Hello, ShillehTek!")
lcd.move_to(0, 1)
lcd.putstr("PCF8574 I2C LCD")
Frequently Asked Questions
lcd.noBacklight() in Arduino's LiquidCrystal_I2C.