I2C Character LCD Adapter (PCF8574): Addresses 0x27 and 0x3F, Wiring and Troubleshooting

Quick answer: An I2C LCD adapter, often called a backpack, puts a PCF8574 port expander between the two-wire I2C bus and the parallel bus of an HD44780-type character LCD. The expander’s eight port bits drive RS, R/W, E, a backlight switch and the four data lines D4 to D7, so the host needs only SDA, SCL, power and ground. The adapter’s address is 0x27 on boards with a PCF8574 and 0x3F on boards with a PCF8574A when the three address jumpers are open; closing jumpers lowers the address within 0x20 to 0x27 or 0x38 to 0x3F.

The PCF8574 is limited to 100 kHz I2C, and a typical library needs four to six bus transfers per character, so a 16×2 screen takes a few tens of milliseconds to rewrite. That is fine for text and menus, and it is why the adapter is not used for graphic displays.

How The Adapter Works

The PCF8574 is a quasi-bidirectional 8-bit port expander. The host writes one byte over I2C and the eight port pins take those levels. The adapter board wires those pins to the LCD header, adds a contrast trimmer for V0, pull-up resistors on SDA and SCL, and a transistor so that one port bit can switch the backlight. Because the LCD controller runs in 4-bit mode, each character or command is sent as two nibbles, and the E line must be pulsed for each nibble, which is why one character costs several I2C writes.

I2C character LCD adapter wiring with a PCF8574 expanderA host microcontroller connects SDA and SCL with pull-up resistors to a PCF8574 I2C expander. The expander port bits P0 to P7 drive the LCD signals RS, R/W, E, backlight switch and D4 to D7 in 4-bit mode. Address jumpers A2 A1 A0 select 0x20 to 0x27 on the PCF8574 and 0x38 to 0x3F on the PCF8574A; with all jumpers open the addresses are 0x27 and 0x3F.Common I2C adapter wiring: PCF8574 port bits to the HD44780 busHost MCUSDASCLGND / VCCpull-ups 4.7 kΩVCCPCF8574I2C expanderSDASCLA2 A1 A0address jumpersHD44780-type character LCD4-bit mode: D0–D3 unusedP0RSP1R/WP2EP3Backlight (via transistor)P4D4P5D5P6D6P7D77-bit addressChipRangeAll jumpers openPCF85740x20–0x270x27PCF8574A0x38–0x3F0x3FMax SCL clock 100 kHz; VDD 2.5–6 VV0 comes from the adapter’s contrast trimmerPort-to-pin assignment varies between adapter boards: confirm it before configuring the library.
Figure: a common PCF8574 adapter wiring. P0 to P7 drive RS, R/W, E, the backlight switch and D4 to D7; A2 to A0 set the address.
Expander bitLCD signalFunction
P0RSRegister select: command or character data
P1R/WRead or write; many libraries keep it low and use fixed delays instead of reading the busy flag
P2EEnable strobe, pulsed once per nibble
P3BacklightDrives a transistor that switches the backlight LED; on many boards a jumper can bypass it
P4 – P7D4 – D7Upper four data lines, used in 4-bit mode

This assignment is the most common one, but it is not standard. Some boards swap the order, and the library must be configured to match. If the adapter has been soldered to the LCD, check the board’s silkscreen or trace it with a meter before writing firmware. The LCD side follows the pinout described in the character LCD module guide.

I2C Address: 0x27, 0x3F And The Jumpers

Chip on the adapterAddress range (7-bit)Jumpers A2 A1 A0 openAll three jumpers closed
PCF85740x20 – 0x270x270x20
PCF8574A0x38 – 0x3F0x3F0x38

The address pins have internal pull-ups, so an open jumper reads as 1 and a closed jumper as 0. Up to eight adapters of the same chip type can share one bus, which is useful when a product has two or more small displays. The simplest way to find the address of an unknown board is to run an I2C scanner on the host and look for a single device in one of the two ranges. Some libraries use 8-bit addresses, which are these values shifted left by one: 0x4E for 0x27 and 0x7E for 0x3F.

Wiring, Voltage Levels And Pull-Ups

  • Supply: most character LCDs and their backlights expect 5 V, so the adapter is usually powered from 5 V. The PCF8574 itself works from 2.5 V to 6 V.
  • 3.3 V hosts: with the adapter at 5 V, its input high level is 0.7 × VDD, which is 3.5 V. A 3.3 V microcontroller may not reach it reliably, and the adapter’s pull-ups will lift SDA and SCL to 5 V, which many 3.3 V inputs do not tolerate. Use a bidirectional level shifter, or power the adapter and a 3.3 V-capable LCD from 3.3 V. A 3.3 V LCD normally needs a negative contrast voltage; see LCD contrast and V0 adjustment.
  • Pull-ups: adapters usually carry 4.7 kΩ or 10 kΩ pull-ups on SDA and SCL. With several devices on one bus, remove the duplicates so the combined pull-up is not too strong for the drivers.
  • Cable length: I2C is meant for a circuit board, not a cable. Keep the run short; bus capacitance above about 400 pF makes edges slow and causes errors. For a panel-mounted display on a longer cable, consider the options in UART serial LCDs and baud rate.
  • Contrast: turn the trimmer on the adapter until text appears clearly; a blank screen with the backlight on is nearly always contrast, not the bus.

Speed And Update Time

The PCF8574 supports standard-mode I2C only, 100 kHz at most. Each I2C transfer carries an address byte and a data byte with acknowledge bits, so one transfer takes roughly 0.25 ms including start and stop. A character in 4-bit mode needs two nibbles, and each nibble needs at least two transfers to pulse E, so one character costs about 1 ms, and libraries that write three bytes per nibble cost about 1.5 ms. Rewriting a 16×2 screen then takes roughly 30 to 50 ms, and a 20×4 screen about 80 to 120 ms. Update only the fields that change, and the display keeps up with any menu.

For displays with more pixels, the bus is the bottleneck. The I2C vs SPI vs UART vs parallel guide shows the arithmetic, and graphic LCD resolutions lists what each format needs.

Troubleshooting An I2C LCD

SymptomLikely causeCheck
Backlight on, no textContrast too low, wrong address, or wrong port-to-pin map in the libraryTurn the trimmer; run an I2C scanner; compare the library’s pin order with the board
One row of solid blocksController not initialised: address or pin map wrong, or the init sequence sent too early after power-upAddress and pin map; wait at least 40 ms after power before initialising; see HD44780 initialisation
Scanner finds no deviceSDA and SCL swapped, missing ground, no pull-ups, or 3.3 V levels not recognised at 5 VWiring and ground; pull-ups; level shifter
Random charactersLibrary sends nibbles in the wrong order, or the bus is corrupted by a long cablePin map; cable length and capacitance; bus speed set to 100 kHz
Works at power-up, stops laterBus lock-up after noise, or another device holding SDA lowAdd a bus recovery routine; review ESD and noise; see LCD ESD protection
Text correct, backlight offBacklight bit low or jumper removedLibrary backlight setting; jumper on the adapter

Using An I2C Adapter In A Production Product

Hobby adapter boards are convenient for prototypes, but for a production design it is better to place the expander, or a microcontroller with spare pins, on the main board and connect the LCD with a defined cable or header. That removes a second supplier, fixes the pin assignment and lets the design use the LCD’s busy flag and a proper reset sequence. SuccessLCD confirms the interface, connector and logic voltage for each character LCD project, and monochrome LCD and LCM references can be specified with the header the host board needs.

I2C LCD Adapter FAQs

What is the I2C address of a 16×2 LCD adapter?

Usually 0x27 for boards with a PCF8574 and 0x3F for boards with a PCF8574A, with the address jumpers open. Closing jumpers lowers the address within 0x20 to 0x27 or 0x38 to 0x3F. An I2C scanner on the host confirms it.

Why does my I2C LCD show a backlight but no text?

Most often the contrast trimmer is set too low, so the characters are invisible. If adjusting it shows nothing, check the address and the library’s port-to-pin assignment, which differs between adapter boards.

Can I use an I2C LCD adapter with a 3.3 V microcontroller?

Only with care. At 5 V the PCF8574 needs about 3.5 V to see a logic high, and the adapter’s pull-ups lift the bus to 5 V. Use a bidirectional level shifter, or run the adapter and a 3.3 V-capable LCD from 3.3 V.

How fast can an I2C LCD update?

The PCF8574 runs at 100 kHz, and each character needs several transfers, so a full 16×2 screen takes roughly 30 to 50 ms. Writing only the characters that change keeps the display responsive.

Can several I2C LCDs share one bus?

Yes. Each adapter needs a different address set with its jumpers, so up to eight PCF8574 boards and eight PCF8574A boards can share one bus, as long as the total pull-up resistance and bus capacitance stay within limits.

Designing a character LCD into a product? Send the format, host processor, interface, logic voltage and backlight needs. Send your requirements for an engineering review, or browse monochrome LCD and LCM references. For a custom character module, see custom LCD module options.

Scroll to Top
Get a QuoteWhatsApp