LCD
Interfacing LCD1602 I2C with Arduino Uno
What is the LCD1602 I2C?
The LCD1602 is a 16-column, 2-row character LCD built around the ubiquitous HD44780 controller. On its own it needs a dozen wires and a contrast potentiometer, which is why almost every one sold today comes glued to a small PCF8574 I2C backpack — that backpack absorbs all of it into 4 pins (power, ground, and two I2C lines) and gives you an onboard trimmer for contrast.
It only displays fixed-width text characters (plus up to 8 custom 5x8 glyphs you can define yourself), not arbitrary graphics — for anything pixel-addressable, look at a graphic display like the SSD1306 OLED instead. But for status readouts, menus, sensor value displays, and simple UIs, it's the cheapest and most reliable text display in the hobbyist ecosystem, and the exact same library and code scale straight up to the larger LCD2004 (20x4) — see the variants table below.
Specifications
| Display | 16 characters × 2 lines, fixed-width text (HD44780 controller) |
| Backpack | PCF8574 I2C I/O expander (converts the LCD's 6-wire parallel interface to I2C) |
| Operating voltage | 5 V DC (most common); some 3.3V-tolerant backpacks exist but are less common |
| I2C address | 0x27 default on most PCF8574 backpacks, 0x3F on some clones — scan to confirm |
| Interface | I2C, up to 100 kHz typical |
| Backlight | LED backlight, on/off controllable over I2C |
| Custom characters | Up to 8 user-defined 5×8 pixel glyphs |
LCD1602 I2C Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | VCC | Power, 5V DC |
| 3 | SDA | I2C data line |
| 4 | SCL | I2C clock line |
The PCF8574 backpack already includes its own I2C pull-up resistors, tied to whatever you feed VCC — same consideration as any other I2C breakout with onboard pull-ups. Most backpacks are 5V parts and the display itself needs 5V to hit full contrast/brightness, so on 3.3V-only boards (ESP32, Raspberry Pi, STM32) you'll typically power VCC from a 5V rail while still wiring SDA/SCL through a level shifter or accepting that the I2C lines will sit at 5V — check your specific board's I2C pin tolerance before skipping a level shifter. If characters look like solid black blocks or are invisible, adjust the small blue potentiometer on the back of the backpack — that's a contrast issue, not a wiring or code fault. If nothing shows up on the bus at all, run an I2C scanner sketch first to confirm the actual address, since 0x27 vs 0x3F varies by manufacturer.
Setting Up LCD1602 I2C with Arduino Uno
Library
LiquidCrystal I2C by Frank de Brabander
Arduino IDE → Tools → Manage Libraries → search "LiquidCrystal I2C" by Frank de Brabander → Install
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V | — |
| GND | GND | — |
| SDA | A4 | Uno's hardware I2C data pin. |
| SCL | A5 | Uno's hardware I2C clock pin. |
Example code
- If the backlight is on but no text appears, adjust the contrast potentiometer on the back of the backpack before assuming it's a code problem.
lcd.print()does not auto-wrap or clear the line first — always pad with trailing spaces (as in the example) if a new value might be shorter than the old one, or you'll see leftover characters.- Run an I2C scanner sketch once if
lcd.init()doesn't seem to do anything - confirm the address is actually 0x27 before debugging further.
Related Components
Related Guides & Projects

Arduino Uno R3 Pinout: Every Pin Explained (Digital, Analog, PWM, Power)
Complete Arduino Uno R3 pinout reference: all 14 digital pins, 6 analog inputs, PWM, UART, SPI, I2C, AREF, and power rails explained with wiring tips and common mistakes.

Ultimate Arduino Mega 2560 Pinout Guide: Complete Power & I/O Reference
Master the Arduino Mega 2560 pinout. Detailed reference for all 54 digital pins, 16 analog inputs, PWM, UARTs, SPI, I2C, interrupts, and power. Includes a printable table and practical wiring tips.

Interfacing HC-SR04 Ultrasonic Sensor with Arduino
Measure distance accurately using ultrasonic sound waves and an Arduino Uno — no complex math, no expensive hardware.
HC‑SR04 Ultrasound Distance Measurement with Arduino – Parking Alert (LCD & Buzzer)
Learn HC‑SR04 ultrasound distance measurement with Arduino Uno. Build a parking alert system with 16x2 LCD and buzzer – shows distance and beeps faster as you approach.