LCD1602 I2C with Arduino: Wiring, Library, Address Scan & Blank-Screen Fix

Cartoon of a 16x2 LCD module with a glowing blue screen showing two rows of blank character cells, a black I2C backpack board peeking from behind its top edge

Quick answer: An LCD1602 with an I2C backpack needs four wires to an Arduino Uno or Nano: GND to GND, VCC to 5V, SDA to A4, SCL to A5.

  1. Install the library LiquidCrystal I2C by Frank de Brabander from Library Manager.
  2. Upload the first sketch below. It uses address 0x27 and calls lcd.init() then lcd.backlight().
  3. Backlight on but no text? Turn the blue trimmer on the back with a small screwdriver until the letters show.
  4. Still blank, or one row of blocks? Run the I2C scanner below. If it prints 0x3F, use that address in the sketch.
  5. No light at all? Check the black jumper cap on the backpack and the GND and VCC wires.

Parts you need

The 1602 + I2C module arrives with the black I2C backpack already soldered on. The backpack carries the interface chip, a blue contrast trimmer, a backlight jumper and a 4-pin header labelled GND, VCC, SDA, SCL. Nothing in this build needs soldering.

The Basic variants are the same display without the backpack: a bare 16-pin parallel interface that needs about a dozen wires and your own contrast potentiometer. Buy one only when a lesson plan asks for parallel wiring.

Display Interface Screen colour Where
16×2 I2C, pre-soldered White on blue 1602 + I2C (Blue) (this guide)
16×2 I2C, pre-soldered Dark on green Green option on the same product page
16×2 Parallel, no backpack Dark on green 1602 Basic (Green)
20×4 I2C, pre-soldered White on blue 2004 + I2C (Blue)
20×4 I2C, pre-soldered Dark on green Green option on the same product page
20×4 Parallel, no backpack White on blue 2004 Basic (Blue)

Parts list

ItemPriceQty
LCD1602 LCD2004 Liquid Crystal Display Module with IIC I2C Basic 16x2 20x4For Arduino Display Application - 2004 + I2C (Blue)LCD1602 LCD2004 Liquid Crystal Display Module with IIC I2C Basic 16x2 20x4For Arduino Display Application - 2004 + I2C (Blue)LCD2004RM19.95Out of stock

The bigger 20x4 screen. Same wiring and same library. Only the constructor line changes to (0x27, 20, 4).

The Uno in this list has a full-size USB-B port and no cable in the box, so the A-to-B cable is listed too. The CH340 Uno comes with its cable and takes the same wiring and sketch.

Wiring: LCD1602 I2C to Arduino Uno (4 wires)

The LCD1602’s backpack header takes male-to-female jumper wires directly (jumper wire types explained). The female ends push onto the backpack pins and the male ends go into the Uno’s sockets. No breadboard is needed. Everything runs on 5 V DC from the USB port, so mains voltage is never involved.

Backpack pin Uno pin Why
GND GND Common reference for power and the I2C bus
VCC 5V The HD44780 and its backlight are 5 V parts, so a 5 V board drives them directly
SDA A4 The Uno’s I2C data line
SCL A5 The Uno’s I2C clock line

The picture shows the idea. Use the table for the exact sockets: 5V and GND on the Uno’s power header, A4 and A5 on the analog header.

Cartoon desk build of a dark blue Arduino Uno connected by four coloured jumper wires to a glowing blue 16x2 LCD, with a translucent blue USB cable plugged into the Uno
The finished build: four male-to-female jumpers from the Uno’s sockets to the backpack’s header, a USB cable for power and code, and the screen lights up.

Check GND and VCC before you connect the USB cable. They sit side by side on the backpack, and swapping them puts 5 V backwards across its chip. That can destroy it (the PCF8574 datasheet allows no less than -0.5 V on the supply pin).

The Uno’s pins marked SDA and SCL beside AREF connect to the same lines as A4 and A5, so either pair works. On other 5 V Arduino boards only SDA and SCL can move (Arduino Wire reference):

Board SDA SCL
Arduino Uno A4 A5
Arduino Nano A4 A5
Arduino Mega 2560 20 21

Prefer to see the hookup and first power-up done on camera before you plug anything in?

Install the library and find the I2C address (0x27 or 0x3F)

The LCD1602’s backpack needs the library LiquidCrystal I2C by Frank de Brabander. In the Arduino IDE, open Sketch β†’ Include Library β†’ Manage Libraries and search “LiquidCrystal I2C”. Several libraries have similar names, so match the author. hd44780 by Bill Perry is an alternative that detects the address and pin mapping itself.

The address depends on the chip on your backpack. A PCF8574 answers at 0x20 to 0x27 and a PCF8574A at 0x38 to 0x3F. The A0 to A2 solder pads are left open at the factory, which gives the top address of each range: 0x27 or 0x3F. Both chips work the same way. This scanner prints yours:

// I2C scanner: prints the address of every device on the bus.
// Run this FIRST - it tells you whether to write 0x27 or 0x3F.
#include <Wire.h>

void setup() {
  Wire.begin();
  Serial.begin(9600);
  Serial.println("Scanning...");

  byte found = 0;
  for (byte addr = 1; addr < 127; addr++) {
    Wire.beginTransmission(addr);
    if (Wire.endTransmission() == 0) {   // a device answered here
      Serial.print("Device found at 0x");
      if (addr < 16) Serial.print("0");
      Serial.println(addr, HEX);
      found++;
    }
  }
  if (found == 0) Serial.println("No devices found - check SDA/SCL wiring");
}

void loop() {}

Upload it and open Serial Monitor at 9600 baud. It prints your display’s address. If it prints “No devices found”, SDA and SCL are probably swapped, so trade the A4 and A5 wires.

First sketch: print text on the LCD1602

This sketch prints two lines on the LCD1602. Replace 0x27 if your scanner printed another address:

// LCD1602 + I2C backpack on Arduino Uno.
// Library: "LiquidCrystal I2C" by Frank de Brabander (Library Manager).
// Put the address YOUR scanner printed in the first argument.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);   // address, columns, rows
                                      // LCD2004: (0x27, 20, 4)

void setup() {
  lcd.init();               // start the PCF8574 and the HD44780 behind it
  lcd.backlight();          // switch the LED backlight on
  lcd.setCursor(0, 0);      // column 0, row 0 (top line)
  lcd.print("Hello MakerHub");
}

void loop() {
  lcd.setCursor(0, 1);      // column 0, row 1 (bottom line)
  lcd.print("Uptime: ");
  lcd.print(millis() / 1000);   // seconds since power-up
  lcd.print("s");
  delay(1000);
}

lcd.init() starts the controller in 4-bit mode and lcd.backlight() turns the LED on. Without lcd.init() the display is never set up, so it shows one row of blocks. Without lcd.backlight() the backlight stays off, and text on the blue screen is very hard to see.

Why is the LCD1602 blank or showing blocks?

The LCD1602’s backpack has two separate controls. The removable black jumper feeds the backlight LED, so it decides whether the screen glows. The blue trimmer sets the contrast voltage on the LCD’s VO pin, so it decides whether text is visible. A glowing screen with no text is usually a contrast problem.

Start with the trimmer. Power the display and turn it slowly with a small screwdriver until the characters look crisp. With no sketch loaded, stop where the top row of faint blocks just shows. Too far one way fades the text out. Too far the other way fills every cell with a solid block.

Cartoon back view of an LCD1602 showing the black I2C backpack with a screwdriver turning its blue contrast trimmer and a separate black backlight jumper cap highlighted
Two controls, two circuits: the blue trimmer sets contrast (whether characters are visible), the black jumper feeds the backlight (whether the glass glows). Adjust the right one for your symptom.

If that does not fix it, match what you see:

What you see Most likely cause The fix
Backlight glows, nothing else Contrast too low, or wrong I2C address Turn the blue trimmer; if still blank, run the scanner
One row of solid blocks Powered but never initialised Wrong address, or the sketch never ran lcd.init(). Scan, then check the constructor
Random garbled characters Loose SDA, SCL or GND wire Re-seat the four jumpers, re-scan, restart the board
Only the first letter of each lcd.print() shows Old copy of the library (version 1.1.1) Remove the old copy and install version 1.1.2 from Library Manager
No glow at all Backlight jumper missing, or no power Refit the black jumper cap; check GND and VCC. The backpack’s small POWER LED should be lit. If it is dark, 5V is not reaching the module
Glows at power-up, then goes dark when the sketch starts The sketch never calls lcd.backlight() Add lcd.backlight(); right after lcd.init(); in setup()

Error messages and what they mean

Message What it means The fix
fatal error: LiquidCrystal_I2C.h: No such file or directory The library is not installed Install LiquidCrystal I2C by Frank de Brabander from Library Manager
'class LiquidCrystal_I2C' has no member named 'init' Another library with the same file name is being used Remove it so only de Brabander’s library is left, or use that library’s own example sketch
Scanner prints No devices found The backpack is not answering on the bus SDA and SCL are swapped, or the module has no power. Trade the two wires, then check GND and VCC

How the I2C backpack works, and the 16-pin LCD1602 pinout

The LCD1602’s I2C backpack carries a PCF8574, an I2C port expander. It copies each byte it receives over SDA and SCL onto eight output pins. The LCD’s controller, the HD44780, has a 4-bit mode that takes each command as two half-bytes on data lines D4 to D7. The eight outputs cover those four data lines, the three control lines (RS, RW, E) and the backlight transistor. Other I2C devices can share the same two wires, each on its own address.

Cartoon comparing a bare 16x2 LCD with about twelve tangled grey wires against the same LCD with a black I2C backpack and only four tidy coloured wires
The whole sales pitch in one picture: the bare parallel LCD needs a dozen wires; the PCF8574 backpack carries the same signals over four.

The LCD itself keeps the standard 16-pin layout of an HD44780-type 16×2 display, often sold as 1602A (1602A datasheet). The backpack is soldered to all 16 pins:

Pin Name Job What the backpack does with it
1 VSS (GND) Ground Joined to GND on the 4-pin header
2 VDD 5 V supply Joined to VCC on the 4-pin header
3 VO Contrast voltage Set by the blue trimmer
4 RS Register select (command or character) Driven by the PCF8574
5 RW Read or write Driven by the PCF8574
6 E Enable (clocks the data in) Driven by the PCF8574
7 to 10 D0 to D3 Data, lower four bits Not used in 4-bit mode
11 to 14 D4 to D7 Data, upper four bits Driven by the PCF8574
15 A Backlight positive (anode) Powered through the black jumper cap
16 K Backlight negative (cathode) Switched by the backpack’s transistor (lcd.backlight())

What customers ask us about this LCD

These three questions about the LCD1602 I2C module come from our customer chats, quoted as sent.

“This lcd is already soldered with i2c chip?”
Yes, on the +I2C variants. To check yours, turn it over: the black board on the back is the I2C backpack.

“lcd1602 + I2C last time brough with u need install what library ah”
LiquidCrystal I2C by Frank de Brabander, from Library Manager. The plain LiquidCrystal library in the IDE is for the bare parallel version. It compiles, but the I2C display stays blank.

“i cant change the address of the lcd”
No sketch can change it. The address is set by the backpack’s hardware. Read it with the scanner and put that number in the constructor. To move it, bridge an A0 to A2 solder pad.

FAQ

What I2C address is my LCD1602?

Either 0x27 (PCF8574 chip) or 0x3F (PCF8574A chip). Run the I2C scanner and use the address it prints.

Can I use the same code for the LCD2004?

Yes. The 20×4 module uses the same backpack, wiring and library. Only the constructor changes: LiquidCrystal_I2C lcd(0x27, 20, 4);

Why does my LCD show one row of white blocks?

An HD44780 display shows one row of solid blocks when it has power and contrast but was never initialised. The screen is fine. Run the scanner and correct the address in the constructor. If the address is right, check that lcd.init() is in setup().

Can I use an Arduino Nano or Mega instead of the Uno?

Yes. A Nano wires like the Uno: SDA to A4 and SCL to A5. On a Mega 2560, SDA goes to pin 20 and SCL to pin 21. The library and sketch stay the same.

Can I connect two LCDs to one Arduino?

Yes. Bridge an A0 to A2 solder pad on the second backpack to pull that address bit low (bridge A0 on a 0x27 module and it becomes 0x26). Then create one LiquidCrystal_I2C object per address. Both displays share the A4 and A5 wires.

Next project: our DS3231 digital clock shows the time on this same LCD1602. The keypad password lock uses an OLED instead, on the same A4/A5 I2C bus.

Last updated November 2026. Stuck? Chat with us on WhatsApp.

Leave a Reply

Your email address will not be published. Required fields are marked *