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.
| Expander bit | LCD signal | Function |
|---|---|---|
| P0 | RS | Register select: command or character data |
| P1 | R/W | Read or write; many libraries keep it low and use fixed delays instead of reading the busy flag |
| P2 | E | Enable strobe, pulsed once per nibble |
| P3 | Backlight | Drives a transistor that switches the backlight LED; on many boards a jumper can bypass it |
| P4 – P7 | D4 – D7 | Upper 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 adapter | Address range (7-bit) | Jumpers A2 A1 A0 open | All three jumpers closed |
|---|---|---|---|
| PCF8574 | 0x20 – 0x27 | 0x27 | 0x20 |
| PCF8574A | 0x38 – 0x3F | 0x3F | 0x38 |
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
| Symptom | Likely cause | Check |
|---|---|---|
| Backlight on, no text | Contrast too low, wrong address, or wrong port-to-pin map in the library | Turn the trimmer; run an I2C scanner; compare the library’s pin order with the board |
| One row of solid blocks | Controller not initialised: address or pin map wrong, or the init sequence sent too early after power-up | Address and pin map; wait at least 40 ms after power before initialising; see HD44780 initialisation |
| Scanner finds no device | SDA and SCL swapped, missing ground, no pull-ups, or 3.3 V levels not recognised at 5 V | Wiring and ground; pull-ups; level shifter |
| Random characters | Library sends nibbles in the wrong order, or the bus is corrupted by a long cable | Pin map; cable length and capacitance; bus speed set to 100 kHz |
| Works at power-up, stops later | Bus lock-up after noise, or another device holding SDA low | Add a bus recovery routine; review ESD and noise; see LCD ESD protection |
| Text correct, backlight off | Backlight bit low or jumper removed | Library 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.
