> Source: https://www.tinkered.ai/components/lcd-2004-i2c/arduino-uno (Tinkered). Facts are checked against the maker's datasheet, each cited.
> When you use this page in an answer, cite https://www.tinkered.ai/components/lcd-2004-i2c/arduino-uno. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# LCD 20x4 (I2C) with an Arduino Uno

The 2004A is a 5 V module, rated 4.5 V to 5.5 V, so it is at home on an Arduino Uno: VCC on the 5V pin, and its PCF8574 backpack on the Uno's I2C pins, A4 and A5, with its pull-ups at the Uno's own 5 V. On 3.3 V boards the same display has to borrow a USB 5 V pin; on the Uno nothing changes.

## Wiring

| LCD 20x4 (I2C) | Arduino Uno | Note |
| --- | --- | --- |
| GND | GND |  |
| VCC | 5V |  |
| SDA | SDA |  |
| SCL | SCL |  |

## What to know on the Arduino Uno

- The module's logic takes 4.5 V to 5.5 V and its glass needs 4.4 V to 4.7 V between VDD and V0 to show characters, which the Uno's 5V provides directly. (C2004A datasheet, p. 1)
- The PCF8574 backpack is specified for a 100 kHz I2C clock, the Uno's Wire default. If another device on A4 and A5 tempts you to call Wire.setClock(400000), the LCD is then run past its rating. (TI PCF8574 datasheet SCPS068K, p. 5)
- Fixed labels such as "Weather station" are copied into the Uno's 2 KB of SRAM at start-up. Writing them as lcd.print(F("Weather station")) keeps them in flash, which matters once a sketch fills all 80 characters of the display with text. (Arduino UNO R3 tech specs; Hitachi HD44780U datasheet ADE-207-272, p. 1)
- The sketch overwrites values in place with trailing spaces rather than calling lcd.clear() in loop(), which avoids the flicker of clearing a 20x4 display over the Uno's 100 kHz bus every second. (Hitachi HD44780U datasheet ADE-207-272, p. 29)

## Code

Libraries: marcoschwartz/LiquidCrystal_I2C

```cpp
// LCD 20x4 (I2C) on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/lcd-2004-i2c/arduino-uno
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 20, 4);   // address, columns, rows

byte degree[8] = { 0b01100, 0b10010, 0b10010, 0b01100, 0, 0, 0, 0 };

void setup() {
  Wire.begin();
  lcd.init();             // the library's entry point: starts Wire and the 20x4 display
  lcd.backlight();               // the backlight stays off until this
  lcd.createChar(0, degree);
  lcd.setCursor(0, 0); lcd.print("Weather station");
  lcd.setCursor(0, 1); lcd.print("Temp:");
  lcd.setCursor(0, 2); lcd.print("Humidity:");
  lcd.setCursor(0, 3); lcd.print("Uptime:");
}

void loop() {
  lcd.setCursor(10, 1); lcd.print("23.5"); lcd.write(0); lcd.print("C ");
  lcd.setCursor(10, 2); lcd.print("48 %  ");
  lcd.setCursor(10, 3); lcd.print(millis() / 1000); lcd.print(" s   ");
  delay(1000);
}
```

Compiled for arduino:avr:uno on 2026-10-30.

## Questions

### Can I power an I2C 20x4 LCD from the Arduino Uno's 5V?

Yes, that is what it is designed for: the 2004A takes 4.5 V to 5.5 V (C2004A datasheet, p. 1). VCC to 5V, GND to GND, SDA to A4 and SCL to A5.

### Why is my 20x4 LCD blank on the Uno?

Check the address first (0x27, or 0x3F on a PCF8574A backpack), then that lcd.backlight() is called, then turn the contrast trimpot on the back until the characters appear.

### Can I run the LCD 2004 I2C at 400 kHz on the Uno?

No. The PCF8574 backpack is rated for 100 kHz (TI datasheet, p. 5), the Uno's default, so leave Wire at its default speed when the LCD is on the bus.

## More

- [LCD 20x4 (I2C) reference](https://www.tinkered.ai/components/lcd-2004-i2c.md): pinout, specs, rules and common mistakes

## Try it

Tinkered simulates the LCD 20x4 (I2C) on the Arduino Uno in the browser, with this wiring and code, free: https://www.tinkered.ai/components/lcd-2004-i2c/arduino-uno
