HD44780 1602 LCD Display 16×2 – Arduino Wiring, Code & Troubleshooting
This 1602 character LCD provides two rows of 16 characters with a blue LED backlight and white characters. It uses an HD44780-compatible parallel interface and can be controlled directly from an Arduino UNO without an I2C backpack.
This guide covers the standard 16-pin connection, contrast adjustment, safe backlight wiring, Arduino LiquidCrystal setup, a basic display test and common troubleshooting steps.
1602 LCD Overview
HD44780-compatible controllers support both 4-bit and 8-bit transfers. Using 4-bit mode saves four microcontroller pins because only DB4 to DB7 are required. DB0 to DB3 are left unconnected.
The voltage capability of an HD44780 controller IC does not automatically establish the operating voltage of every complete 1602 module. This product is specified as a 5V module, so the Arduino UNO is the simplest controller for the example below.
16-Pin LCD Connections
Most bare HD44780-compatible 1602 modules use the following 16-pin arrangement. Module manufacturers can vary PCB layouts, so follow the pin numbers or labels printed on your particular display rather than relying only on the physical left-to-right position of the header.
| Pin | Label | Function |
|---|---|---|
| 1 | VSS | Ground |
| 2 | VDD | 5V logic supply |
| 3 | VO / V0 | LCD contrast input |
| 4 | RS | Register Select: command or character data |
| 5 | R/W | Read / Write select |
| 6 | E | Enable signal |
| 7 | DB0 | Data bit 0; unused in this 4-bit example |
| 8 | DB1 | Data bit 1; unused in this 4-bit example |
| 9 | DB2 | Data bit 2; unused in this 4-bit example |
| 10 | DB3 | Data bit 3; unused in this 4-bit example |
| 11 | DB4 | Data bit 4 |
| 12 | DB5 | Data bit 5 |
| 13 | DB6 | Data bit 6 |
| 14 | DB7 | Data bit 7 |
| 15 | A / LED+ | Backlight anode |
| 16 | K / LED− | Backlight cathode |
Contrast Control
Pin 3 controls the LCD contrast and should not normally be left floating. Use a 10kΩ potentiometer so the contrast can be adjusted:
- Connect one outer potentiometer terminal to 5V.
- Connect the other outer terminal to GND.
- Connect the centre wiper to LCD pin 3 (VO / V0).
If the display powers up but the characters are invisible, contrast adjustment is one of the first things to check.
Backlight Current Limiting
Different 1602 modules can use different backlight circuits. For a conservative first connection, place a 220Ω resistor in series between 5V and pin 15 (A / LED+), with pin 16 (K / LED−) connected to GND. If authoritative documentation for your particular module specifies that a suitable current-limiting resistor is already fitted, follow that module documentation.
Arduino UNO Wiring – 4-Bit Mode
The following connection matches the Arduino example code later in this guide.
| LCD | Arduino UNO | Connection |
|---|---|---|
| 1 – VSS | GND | Ground |
| 2 – VDD | 5V | LCD logic supply |
| 3 – VO | 10kΩ pot wiper | Contrast adjustment |
| 4 – RS | D12 | Register Select |
| 5 – R/W | GND | Write-only operation |
| 6 – E | D11 | Enable |
| 7 – DB0 | Not connected | Unused in 4-bit mode |
| 8 – DB1 | Not connected | Unused in 4-bit mode |
| 9 – DB2 | Not connected | Unused in 4-bit mode |
| 10 – DB3 | Not connected | Unused in 4-bit mode |
| 11 – DB4 | D5 | Data |
| 12 – DB5 | D4 | Data |
| 13 – DB6 | D3 | Data |
| 14 – DB7 | D2 | Data |
| 15 – A / LED+ | 5V through 220Ω | Backlight positive |
| 16 – K / LED− | GND | Backlight negative |
The LiquidCrystal example only needs to write commands and characters to the display. Permanently connecting R/W low selects write mode and avoids using another Arduino pin.
Arduino LiquidCrystal Library
Use the Arduino LiquidCrystal library for this parallel display. It supports HD44780-compatible LCDs in 4-bit and 8-bit modes.
In the Arduino IDE, open the Library Manager and search for LiquidCrystal. Install the Arduino LiquidCrystal library if it is not already available in your installation.
A bare 16-pin parallel 1602 display does not use SDA and SCL. If your display has an additional I2C backpack fitted and exposes pins such as GND, VCC, SDA and SCL, it requires different wiring and an appropriate I2C LCD library.
Basic Arduino Display Test
Double-check the wiring before applying power, then upload the following sketch to the Arduino UNO.
#include <LiquidCrystal.h>
// LiquidCrystal(RS, E, D4, D5, D6, D7)
const byte LCD_RS = 12;
const byte LCD_E = 11;
const byte LCD_D4 = 5;
const byte LCD_D5 = 4;
const byte LCD_D6 = 3;
const byte LCD_D7 = 2;
LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);
void setup() {
// Configure a 16-column, 2-row display.
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("AuscomTech LCD");
lcd.setCursor(0, 1);
lcd.print("16x2 test: OK");
}
void loop() {
// Nothing else is required for this basic test.
}
Expected Result
The blue backlight should illuminate and, after adjusting the contrast potentiometer, the first line should show AuscomTech LCD and the second line should show 16x2 test: OK.
If the backlight works but no readable text appears, do not immediately assume the display is faulty. Contrast setting and data wiring are common causes.
Troubleshooting
Backlight is on but no characters are visible
- Adjust the 10kΩ contrast potentiometer slowly through its range.
- Confirm pin 3 (VO) is connected to the potentiometer wiper.
- Check that LCD pin 1 is connected to GND and pin 2 to 5V.
- Confirm the Arduino sketch was uploaded successfully.
One or two rows of solid blocks appear
- Solid blocks usually indicate that the LCD has power and contrast but has not been initialised correctly.
- Check RS, E and DB4 to DB7 carefully.
- Confirm the wiring matches the pin order in
LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);. - Confirm pin 5 (R/W) is connected to GND.
Random or incorrect characters appear
- Check DB4, DB5, DB6 and DB7 for swapped connections.
- Check the RS and E connections.
- Use short, secure jumper connections while testing.
- Confirm Arduino GND and LCD GND are connected together.
Only the first line works correctly
- Make sure the sketch uses
lcd.begin(16, 2);. - Use
lcd.setCursor(0, 1);to select the beginning of the second row. - Recheck the data connections if the second row contains corrupted characters.
Backlight does not turn on
- Check the polarity of pins 15 and 16.
- Pin 15 is normally A / LED+ and pin 16 is K / LED− on the standard 16-pin arrangement.
- Check the series resistor and confirm 5V is reaching the backlight circuit.
- Do not reverse the backlight polarity repeatedly while troubleshooting.
Using a 3.3V microcontroller
- Do not assume that a 5V LCD module can itself be powered correctly from 3.3V.
- Check the specifications of the actual display controller and module before connecting a 3.3V board.
- Avoid allowing a 5V-powered LCD data output to drive directly into a non-5V-tolerant microcontroller input.
- Keeping R/W tied to GND makes the LCD interface write-only and prevents the data bus from being intentionally driven back towards the controller during normal operation.
1602 character LCD modules are produced by many manufacturers using HD44780 or compatible controller ICs, and PCB dimensions, fitted backlight resistors, operating-temperature ratings and other board-level details can vary. Treat this product as a 5V module, follow the markings on the specific display supplied, and use appropriate backlight current limiting unless the module documentation explicitly specifies otherwise.