Source: https://mokxi.com/parts/lcd2004i2c
Updated: 2026-11-10

Part

# Character LCD, 20x4, with I2C backpack

The 20x4 on four wires, through the same PCF8574 backpack at 0x27.

See every part

- 4 pins
- 2 settings
- In 3 projects
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Character LCD, 20x4, with I2C backpack in brief

What it is, and every setting the properties panel gives it.

The 20x4 I2C LCD is a four-row, twenty-column HD44780 display with the same PCF8574 backpack as the smaller 16x2, so it needs only GND, VCC, SDA and SCL: A4 and A5 on an Uno, GPIO 21 and 22 on an ESP32. The backpack carries its own pull-ups and answers at 0x27 by default; the address property takes 0x3F for a PCF8574A board, and a contrast property from 0 to 1, starting at 0.75, stands in for the blue trimmer on its back. The surprise this panel is known for comes straight from the controller’s memory map, and Mokxi models it the same way: the chip only has two lines of forty characters, shown as four rows of twenty, so the rows start at 0x00, 0x40, 0x14 and 0x54, and a string that runs off the end of row 0 carries on in row 2, not row 1. The other common mistake is constructing LiquidCrystal_I2C as 16, 2, which sends setCursor to the wrong address. Busy timing and the backlight bit behave as on the 16x2. The PCF8574’s input port and interrupt pin are not modeled.

Family

Displays

Pins

4

address

39

contrast

0.75

Pins

## 4 pins

Named as the editor names them, so a wire lands where you expect it.

- GND
- VCC
- SDA
- SCL

How to use it

## How to use a 20x4 I2C LCD with an Arduino

Four wires, the same as the 16x2 backpack: SDA to A4, SCL to A5, VCC to 5 V and GND to GND. Construct LiquidCrystal_I2C with the address and the real size, 20 and 4, then call init() and backlight() before printing. Most backpacks answer at 0x27 and some at 0x3F.

Place every row with setCursor(). The library knows the row starts, 0x00, 0x40, 0x14 and 0x54, but one long print does not: it runs off the end of row 0 and carries on in row 2. The project beside this shows that on a bare 20x4 next to the backpack one.

Part pin

Board pin

SDA

A4

SCL

A5

VCC

5 V

GND

GND

LiquidCrystal_I2C compiles on every board here, on whichever pins Wire.begin() uses on that board: GPIO 21 and 22 on an ESP32.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Four rows on a 20x4 I2C LCD

How it is modeled

## What is true about the Character LCD, 20x4, with I2C backpack, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Not modeled

The same as the 16x2: nothing is read back (the busy flag, the address counter and
DDRAM all read nothing), there is no 5x10 font, and bias, temperature and viewing
angle do not exist. On the backpack, the PCF8574's input port and its interrupt pin
are not there either.

From 20x4 character LCD, in full.

Projects

## See the Character LCD, 20x4, with I2C backpack in a project

3 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- Arduino LCD 20x4: I2C Example Code and Library

Boards

## The boards it is shown on

This board has a built-in project with the Character LCD, 20x4, with I2C backpack in it.

- Arduino Uno R3

Libraries

## Arduino libraries for the Character LCD, 20x4, with I2C backpack

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- LiquidCrystal I2C
- hd44780

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Character LCD, 20x4, with I2C backpack

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
