/ 16×2 LCD I2C Display Guide
← All Guides Shop ↗
🌐 Translate:
⏱ 20 min 🔌 4 wires (I2C) ✅ Beginner

16×2 Character LCD
I2C Setup Guide

Display two lines of text on a classic 16-column character LCD — using just 4 wires thanks to the integrated I2C backpack. No 16-pin wiring, no contrast potentiometer, just 4 wires and one library.

🛒
This guide covers the 16×2 LCD with I2C module (PCF8574T backpack) — Blue backlight screen. View product page ↗ (Note: our product has a blue backlight, not green)
📺

Video walkthrough

Prefer to watch? These cover the same steps.

Arduino 16×2 LCD I2C Display Tutorial
YouTube
▶ YouTube
I2C LCD with Arduino — Full Guide
YouTube
▶ YouTube

Community videos. Tishvi is not affiliated with creators.

1

About the LCD + I2C Module

What makes this display easy to use.

A standard 16×2 LCD needs up to 12 wires to the Arduino. The I2C backpack (PCF8574T chip) soldered to the back reduces this to just 4 wires. It communicates over the I2C bus, the same as the OLED display — so both devices can share the same A4 and A5 pins (at different addresses).

📝
Display Capacity
16 columns × 2 rows
ASCII characters
Supply Voltage
5V
Arduino 5V pin only
🔌
Interface
I2C via PCF8574T
Address: 0x27
💡
Backlight
Blue (software control)
On/Off via library
2

What You Need

Everything required for this guide.

Tishvi Arduino UNO R3

Must already be set up with Arduino IDE. See the UNO R3 Setup Guide first.

16×2 LCD with I2C Backpack (PCF8574T)

The LCD with a small PCB soldered to its back — 4 header pins labelled GND · VCC · SDA · SCL.

4× Jumper Wires (Female-to-Male)

Female end to LCD I2C header. Male end to Arduino.

USB-A to USB-B Cable + Computer with Arduino IDE

For uploading. One library needs to be installed before compiling.

💡
The I2C backpack may have a small contrast potentiometer (tiny blue box). If text is visible but very faint or too dark, adjust this with a small screwdriver after powering up.
3

Install the Library

One library needed — install before uploading.

Open Arduino IDE → Sketch → Include Library → Manage Libraries…

Search for: LiquidCrystal I2C
Install the one by Frank de Brabander (listed as "LiquidCrystal_I2C"). This is the most widely used library for I2C LCDs with PCF8574.

Installed? You should see LiquidCrystal_I2C listed under Sketch → Include Library. You're ready to wire up.
ℹ️
There are several libraries with similar names. If compilation fails with LiquidCrystal_I2C.h not found, try searching for just LiquidCrystal_I2C and look for the one by Frank de Brabander with the most downloads.
4

Wiring (I2C)

Same 4-wire I2C connection as the OLED display.

ARDUINO UNO R3 GND 5V A4 A5 TISHVI DOCS LCD I2C Ready! PCF8574T GND VCC SDA SCL
LCD I2C PinArduino UNO R3 PinWire ColourNotes
GNDGNDBlackCommon ground
VCC5VRedMust be 5V — this LCD does not work on 3.3V
SDAA4BlueI2C Data — fixed to A4 on UNO R3
SCLA5GreenI2C Clock — fixed to A5 on UNO R3
⚠️
This LCD requires 5V — not 3.3V. The backlight will be dim or off, and the screen may malfunction on 3.3V. Always use the Arduino's 5V pin.
5

Hello World Sketch

Print text on both rows of the LCD.

This sketch initialises the LCD, turns on the backlight, and prints two lines of text — one on each row.

lcd_hello_world.ino
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Address 0x27 is standard for PCF8574T.
// If blank, try 0x3F (PCF8574AT variant).
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.init();
  lcd.backlight();          // Turn on blue backlight

  lcd.setCursor(0, 0);     // Column 0, Row 0 (top)
  lcd.print(" Hello, World!  ");

  lcd.setCursor(0, 1);     // Column 0, Row 1 (bottom)
  lcd.print("  Tishvi Docs   ");
}

void loop() {
  // Message stays — nothing in loop
}
Upload the sketch. The LCD backlight should turn on immediately and display "Hello, World!" on row 1 and "Tishvi Docs" on row 2. If the screen is blank, try the contrast pot (Step 7 — Troubleshooting) or the alternate address 0x3F.
6

Uptime Counter Sketch

Display live HH:MM:SS uptime on the LCD.

This sketch updates the LCD every second with a live uptime timer. It demonstrates overwriting specific columns without clearing the whole screen — which prevents the LCD from flickering.

lcd_uptime_counter.ino
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.init();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("Uptime:");
}

void printPad(int v) {
  if (v < 10) lcd.print("0");
  lcd.print(v);
}

void loop() {
  unsigned long t = millis() / 1000;
  int h = t / 3600;
  int m = (t % 3600) / 60;
  int s = t % 60;

  lcd.setCursor(0, 1);
  printPad(h); lcd.print(":");
  printPad(m); lcd.print(":");
  printPad(s);
  lcd.print("  Tishvi");

  delay(1000);
}
💡
No flicker trick: Instead of lcd.clear() every loop (which causes visible flicker), position your cursor with setCursor() and overwrite only the changing characters. Pad strings to a fixed width so old characters are always replaced.
7

Troubleshooting

Screen blank or showing wrong output? Start here.

?

Backlight on but no text visible

The most common issue — contrast is set too low. On the I2C backpack there is a small blue box potentiometer. With the LCD powered and showing a sketch, use a small Phillips screwdriver to slowly turn it until dark rectangles or text become visible.

?

Screen completely blank (no backlight)

Check VCC is connected to 5V (not 3.3V). Verify GND. Also confirm SDA → A4 and SCL → A5 aren't swapped. Run an I2C scanner sketch to confirm the module is seen on the bus.

?

Sketch uploads but nothing happens

The I2C address may be wrong. Try LiquidCrystal_I2C lcd(0x3F, 16, 2); instead of 0x27. PCF8574AT chips use 0x3F, while PCF8574T uses 0x27. Run an I2C scanner to find the exact address.

?

Compile error: LiquidCrystal_I2C.h not found

Install the library: Sketch → Include Library → Manage Libraries → search LiquidCrystal I2C → install by Frank de Brabander.

?

First row shows blocks, second row is blank

This is an uninitialised display — your lcd.init() may not have run. Check that lcd.init() and lcd.backlight() are both inside setup(), before any print() calls.

Download Sample Sketch

Get a ready-to-upload .ino file for the 16×2 LCD.

Download the full sample sketch — it includes a welcome screen, a live HH:MM:SS uptime counter, zero-padding helper, and detailed comments. Requires the LiquidCrystal_I2C library (Step 3).

📄
lcd16x2_i2c_sample.ino
Welcome screen · HH:MM:SS uptime · No flicker · LiquidCrystal_I2C
⬇ Download .ino
💡
Library must be installed first — see Step 3. In Arduino IDE go to File → Open, select the .ino file. If the address 0x27 doesn't work, change it to 0x3F on line 10 of the sketch.