Using Character LCDs with I2C Adapters (PCF8574)

Character LCDs based on the HD44780 controller normally require multiple data and control lines. This can quickly consume many GPIO pins on a microcontroller.

An I2C adapter based on the PCF8574 solves this problem by reducing the connection to just two signal lines. This article explains how these adapters work and how to use them effectively.

What Is a PCF8574 I2C Adapter?

The PCF8574 is an I2C I/O expander. It converts I2C commands into parallel signals that control the LCD.

Instead of directly connecting multiple pins, the microcontroller communicates with the adapter over I2C.

  • Uses SDA and SCL lines
  • Controls LCD data and control pins
  • Reduces wiring complexity

These adapters are commonly found as small boards attached to the back of a 16x2 or 20x4 LCD.

How It Works

The PCF8574 provides 8 digital I/O pins. These pins are connected to the LCD signals.

Typical mapping:

  • 4 pins for data (4-bit mode)
  • RS (register select)
  • E (enable)
  • Backlight control

The microcontroller sends I2C commands, and the adapter sets the corresponding LCD pins.

Wiring

Using an I2C adapter simplifies wiring significantly.

Required connections:

  • VCC
  • GND
  • SDA
  • SCL

Multiple I2C devices can share the same bus, which is especially useful in modular systems like CANABLOX.

I2C Address

Each PCF8574 adapter has an I2C address.

  • Common addresses: 0x20 to 0x27 or 0x38 to 0x3F
  • Address is set by jumper pins or solder bridges
  • Must be unique on the I2C bus

If the display does not respond, checking the correct I2C address is one of the first troubleshooting steps.

Advantages of I2C Adapters

  • Reduces pin usage from many pins to two
  • Simplifies wiring
  • Allows multiple devices on the same bus
  • Works well with compact systems

This makes I2C adapters very useful for projects with limited GPIO availability.

Limitations of I2C Adapters

  • Slower than direct parallel connection
  • Slightly more complex software layer
  • Depends on correct I2C configuration

For simple text displays, the speed difference is usually not noticeable.

Software Libraries

Many libraries support I2C character LCDs.

Typical features:

  • Initialization of LCD via I2C
  • Text output functions
  • Cursor control
  • Backlight control

Some libraries require the correct pin mapping configuration, since different adapters may wire the PCF8574 pins differently.

Performance Considerations

I2C communication is slower than direct parallel communication.

  • Each character requires multiple I2C transactions
  • Updates are slower compared with direct wiring
  • Still fast enough for menus and status displays

For most applications, the reduced wiring complexity is more important than speed.

Backlight Control

Many PCF8574 adapters allow software control of the LCD backlight.

  • Backlight can be turned on or off
  • Some modules support brightness control via PWM

This can be useful for power saving or user interface behavior.

Typical Use Cases

  • Menu-driven systems
  • Sensor readouts
  • Compact embedded projects
  • Educational setups
  • Systems with multiple I2C devices

I2C adapters are especially useful when many peripherals share the same bus.

Common Problems

  • Wrong I2C address
  • Incorrect pin mapping in library
  • Missing pull-up resistors
  • Loose connections

Using an I2C scanner sketch is often the fastest way to find the correct address.

Important Practical Notes

  • Most LCD modules use 5V power
  • PCF8574 often works with 3.3V logic, but verify
  • Pull-up resistors are required on SDA and SCL
  • Keep I2C wires short for reliability
  • Check compatibility with your microcontroller

Conclusion

PCF8574 I2C adapters make character LCDs much easier to use by reducing the number of required connections. They are an excellent solution for projects where GPIO pins are limited or where multiple devices share the same bus.

While slightly slower than direct parallel connections, I2C adapters provide a cleaner and more flexible design, especially in modular systems and compact embedded projects.

Shopping Cart
Scroll to Top