Documentation

ShillehTek PCF8574 I2C Serial Interface Adapter Module for 1602 2004 LCD | ShillehTek Product Manual
Documentation / ShillehTek PCF8574 I2C Serial Interface Adapter Module for 1602 2004 LCD | ShillehTek Product Manual

ShillehTek PCF8574 I2C Serial Interface Adapter Module for 1602 2004 LCD | ShillehTek Product Manual

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

Operating Voltage
5V DC
Interface
I2C (2-wire)
Default Address
0x27 or 0x3F
Compatibility
1602 / 2004 HD44780
Pin Count
4 pins (host)
Pins
GND, VCC, SDA, SCL

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

PCF8574 I2C LCD adapter pinout showing 16-pin LCD header, GND VCC SDA SCL output, backlight jumper, contrast adjustment, and I2C address select pads

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)
Tip: If the screen powers on but shows blank rows or only black blocks, turn the contrast trimpot until characters appear. This is the most common "is it broken?" symptom — it's just contrast.

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)
Warning: The PCF8574's I2C signals idle at 5V from internal pull-ups. ESP32 GPIO is 3.3V. For a quick test it usually works, but for reliability use a 3.3V/5V bidirectional I2C level shifter (e.g., the BSS138-based modules).

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
Tip: Run 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

i2c_lcd_arduino.ino
// 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

i2c_scanner.ino
// 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)

i2c_lcd_rpi.py
#!/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)

i2c_lcd_pico.py
# 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

My LCD shows nothing even though it's powered on. What now?
Turn the small blue contrast trimpot (the box-shaped potentiometer on the adapter) until you can see the character grid. Nine times out of ten, "blank LCD" is just contrast set too high or too low. After that, run an I2C scanner to confirm the address and double-check VCC is solid 5V.
What's the I2C address — 0x27 or 0x3F?
Both are common. Modules built around the PCF8574 default to 0x27, while ones using the PCF8574A default to 0x3F. The address can also be changed by bridging the A0/A1/A2 solder pads on the adapter. Use an I2C scanner sketch to confirm.
Can I run two LCDs on the same I2C bus?
Yes — bridge the A0, A1, or A2 solder pads on one of the adapters to give it a different address. The PCF8574 supports up to 8 unique addresses, and you can mix in PCF8574A boards (different base address) for even more.
How do I disable the backlight?
There's a 2-pin jumper on the adapter (labeled "POWER" or near it). Remove the shorting jumper to disable the backlight, or use software: lcd.noBacklight() in Arduino's LiquidCrystal_I2C.
Why is the screen flickering or showing garbage characters?
Usually a power issue — the LCD backlight pulls ~25 mA, which can dip the 5V rail on a USB-powered Arduino. Use a separate 5V supply for the LCD, or add a 100µF electrolytic capacitor across VCC and GND on the adapter board.
Does this work with the 20x4 (2004) LCD?
Yes. The 16-pin header is identical between 1602 and 2004 LCDs. You just initialize the LCD object with 20 columns and 4 rows instead of 16x2.

Related Tutorials