Verified by our editorial teamSimulated in Proteus 9.0 SP2

Arduino LCD

Summary of Arduino LCD This tutorial guides users in connecting a 16x2 HD44780-compatible LCD to an Arduino Uno, preparing the display by soldering headers if necessary, and running built-in IDE examples. It details wiring the circuit in 4-bit mode, utilizing a potentiometer for contrast adjustment and a resistor for backlight current limiting, while emphasizing correct […]

Avatar of Ibrar Ayyub
By Ibrar Ayyub
Published January 19, 2016
At a glance
CategoryLCD Projects
DifficultyBeginner
IncludesCode, Diagrams, Datasheets
UpdatedNovember 24, 2026
Reading timeabout 9 min
On this page

Summary of Arduino LCD


This tutorial guides users in connecting a 16x2 HD44780-compatible LCD to an Arduino Uno, preparing the display by soldering headers if necessary, and running built-in IDE examples. It details wiring the circuit in 4-bit mode, utilizing a potentiometer for contrast adjustment and a resistor for backlight current limiting, while emphasizing correct pin alignment to prevent hardware damage.

Parts used in the Arduino LCD Project:

  • Arduino Uno board
  • USB cable
  • Wire links
  • Breadboard
  • 47 ohm resistor (yellow - violet - black)
  • 10k potentiometer
  • 16x2 character LCD (HD44780 compatible)
  • 16 way single in-line pin header
9 min read

A 16×2 character LCD is the quickest way to make an Arduino show you something without a computer: a status, a sensor reading, a counter. This page shows how to wire one to an Arduino Uno with six signal wires, why the screen is often blank on the first try, a short sketch to prove it works, and when an I2C display is the better choice.

HOW THIS PAGE WAS CHECKED

Datasheet verified by us. Pin names, the 4-bit wiring and the command behaviour were checked against the HD44780 controller documentation. Page numbers are quoted where each figure is used, and the datasheets are linked in the resources box below.

Simulated in Proteus 9.0 SP2, run by us. We built the circuit and ran the sketch ourselves in Proteus 9.0 SP2 Professional (Build 40482). The screenshots and the files we used are on this page. The sketch was run on a simulated ATmega328P at 16 MHz with an LM016L 16×2 display. The first line showed “Hello, Arduino” with the heart character in the last column, and the second line counted seconds once per second. The simulation is also what showed that the cursor must be reset with lcd.setCursor(0, 0) after createChar(), which is why that line is in the sketch. See the screenshots and download the files.

IN SHORT
  • Any 16×2 display with the HD44780 controller works with the LiquidCrystal library that ships with the Arduino IDE.
  • In 4-bit mode you need six Arduino pins: RS, E and four data lines, plus 5 V, GND and a 10 k contrast pot.
  • A blank screen or a row of solid blocks is nearly always the contrast pot, not a dead display.
  • If you are short of pins or want fewer wires, an I2C backpack uses only two (see the comparison below).
16 x 2
characters
6 pins
used on the Arduino
HD44780
controller chip
5 V
supply
A 16x2 character LCD connected to an Arduino Uno on a breadboard
A 16×2 LCD wired to an Arduino Uno. Photo: Starting Electronics.

Our Proteus simulation: schematic, screenshots and files

We ran the sketch from this page in Proteus 9.0 SP2 Professional on a simulated ATmega328P at 16 MHz with an LM016L 16×2 display. These are our own screenshots. Click any screenshot to enlarge it. The simulation also showed that the cursor must be reset after createChar(), which is why lcd.setCursor(0, 0) is in the sketch.

Proteus 9.0 SP2 schematic of the Arduino LCD circuit running
Our Proteus schematic with the simulation running, about 13.9 seconds in.
Proteus LCD showing Hello, Arduino with a heart and Seconds: 15
The display: “Hello, Arduino” with the heart in the last column, and the seconds counter on line 2.
💾 Download our simulation files (arduino-lcd-16×2-proteus-files.zip)
Zip with the compiled .hex, the Arduino sketch, the Proteus project (.pdsprj) and a README. Open the .pdsprj in Proteus 9.0 SP2 or newer, check the Program File path points to the .hex, and press Play.

What this proves: the code and the 4-bit wiring logic. What it does not: the contrast pot, the backlight resistor or the Uno board itself (the Proteus LCD model has no backlight pins).

How the display works

Each character cell on the screen is a grid of 5 by 8 dots. The HD44780 chip on the back of the display knows the shapes of the letters, so the Arduino only sends it character codes, not dots. It talks to the Arduino over a parallel bus. The chip can run in 8-bit mode (eight data lines) or 4-bit mode, where each byte is sent as two 4-bit halves on lines D4 to D7 (datasheet p. 22). The four low lines, D0 to D3, are simply left unconnected. That saves four Arduino pins at almost no cost in speed, which is why this build, and most Arduino LCD tutorials, use 4-bit mode.

Besides the four data lines you need two control lines. RS (register select) tells the chip whether the byte is a command or a character (datasheet p. 8). E (enable) is the clock pulse that makes the chip read the data. The R/W pin chooses read or write. The library only ever writes, so R/W goes straight to GND.

What you need

Arduino Uno and USB cable
Breadboard and jumper wires
16×2 HD44780 LCD (with or without backlight)
10 k potentiometer (contrast)
47 ohm resistor (backlight only)
16-way pin header

We simulated a standard 16×2 module. Any “16×2” display with 16 pins and the HD44780 (or a compatible) controller will do. Most bare LCD modules arrive without pins, so solder a 16-way header into the display first, then it plugs straight into the breadboard. The 47 ohm resistor limits the current to the backlight LED. Skip it if your display has no backlight, and leave it out if your module already has a resistor next to the backlight pin.

Wiring

Arduino Uno D12D11D5D4 D3D25VGND 16×2 LCD RSEDB4DB5 DB6DB7VDD, BLA (via 47 ohm)VSS, R/W, BLC 10 k pot: outer pins to 5V and GND, middle pin to LCD V0 DB0 to DB3 stay unconnected (4-bit mode)

Connection table

Arduino LCD pin What it does
Pin 12 RS Command or character
Pin 11 E (Enable) Clock pulse
Pin 5 DB4 Data
Pin 4 DB5 Data
Pin 3 DB6 Data
Pin 2 DB7 Data
5V VDD, one pot end, BLA through 47 ohm Power, contrast, backlight
GND VSS, R/W, BLC, other pot end Ground, write-only, backlight return

The pot’s middle pin (the wiper) goes to the LCD’s V0 pin. Check your display’s datasheet for pin names, because some modules number the pins in a different order or put them along the top edge.

Schematic of an Arduino Uno wired to a 16x2 LCD with a 10 k contrast potentiometer and 47 ohm backlight resistor
The circuit schematic. It matches the table above.

Three details that stop this build working

Blank screen or a row of blocks is usually contrast. After powering up, turn the pot slowly until the dots of the first row, or your text, appear. With V0 floating or at the wrong level the display can look completely dead.
Do not reverse the power pins. Swapping VDD and VSS, or the backlight pins, will most likely destroy the display. Check the pin names against your datasheet before you apply power.
R/W must go to GND. If it floats, the chip may try to put data on the bus while the Arduino is sending, and the display behaves randomly. The library never reads from the display, so ground it.

The code

The LiquidCrystal library is already in the Arduino IDE, so there is nothing to install. The first line of the sketch tells it which Arduino pins you used, in the order RS, E, D4, D5, D6, D7. Our sketch prints a message, draws one custom character and shows a seconds counter, so you can see at once that writing, positioning and updating all work.

// duino4projects.com
#include <LiquidCrystal.h>

// RS, E, D4, D5, D6, D7 (matches the wiring table above)
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

byte heart[8] = {
  0b00000, 0b01010, 0b11111, 0b11111,
  0b11111, 0b01110, 0b00100, 0b00000
};

void setup() {
  lcd.begin(16, 2);            // 16 columns, 2 rows
  lcd.createChar(0, heart);    // store a custom character in slot 0
  lcd.setCursor(0, 0);         // go back to the screen (createChar leaves the LCD writing to character memory)
  lcd.print("Hello, Arduino");
  lcd.setCursor(15, 0);        // last column of the first row
  lcd.write(byte(0));          // draw the heart
}

void loop() {
  lcd.setCursor(0, 1);         // first column of the second row
  lcd.print("Seconds: ");
  lcd.print(millis() / 1000);
}

Each row of the heart array is five dots wide, and a 1 lights a dot. The chip can store eight such 5 by 8 characters (datasheet p. 19). In the IDE, File, Examples, LiquidCrystal also has ready-made sketches for scrolling text, a blinking cursor, custom characters and showing text typed into the Serial Monitor, and they are worth running once your wiring works.

If it does not work

What you see Likely cause What to do
Backlight on, screen blank Contrast too low Turn the pot through its whole range
Top row of solid blocks, bottom row empty Display powered but not initialised Check the sketch uploaded, and RS, E and the data wires
Garbled or random characters A data wire swapped or loose Recheck D4 to D7 against the table, and the breadboard contacts
Text on the wrong row, or only half shown Wrong size in lcd.begin Match it to your display, for example lcd.begin(16, 2)
Nothing at all, no backlight No power or wrong backlight wiring Check 5V and GND, and the 47 ohm resistor on BLA

Parallel or I2C: which suits you?

LCD connection Arduino pins used Good for Watch out for
4-bit parallel (this build) 6 signal pins Learning, any pins you like, no extra parts Many wires, uses about half your digital pins on an Uno
8-bit parallel 10 signal pins Rarely needed Four more pins for almost no gain in speed
I2C backpack (PCF8574 serial adapter board) 2 (SDA, SCL), plus 5 V and GND Saving pins, tidy wiring, sharing the bus with other I2C parts Needs the LiquidCrystal_I2C library and the right address (commonly 0x27 or 0x3F)

Our view: build this parallel version once, because it shows what RS, E and the data lines actually do. For a finished project with other sensors, move to an I2C backpack. On an Uno the I2C pins are A4 and A5, so keep those free.

Project variants: other ways to use a 16×2 LCD

Related projects: other displays

Quick answers

Which Arduino pins can I use?
Any digital pins. Change the numbers in the LiquidCrystal line to match your wiring. This page uses 12, 11, 5, 4, 3 and 2 because the official example does.
Why are DB0 to DB3 not connected?
The display runs in 4-bit mode, so only DB4 to DB7 carry data.
What does the 10 k pot do?
It sets the voltage on V0, which controls the contrast of the characters.
Do I need the 47 ohm resistor?
Only if your display has a backlight. It limits the current through the backlight LED.

Check your own build

Power up and turn the pot until you see the first row of rectangles, then upload the sketch. You should see “Hello, Arduino” with a heart at the end of the first line, and a seconds counter on the second line that goes up once per second. If the text is there but too faint or too dark, adjust the pot a little at a time.

Project resources and downloads

Datasheets and documents for the parts in this build. Page numbers quoted on this page refer to these files.

Share this project
X
LinkedIn
Reddit
WhatsApp

Quick Solutions to Questions related to Arduino LCD Project:

  • What is recommended before starting this tutorial?
    Beginners should complete all Arduino tutorials up to Tutorial 10.
  • How do I prepare an LCD without existing connections?
    You must solder wires or a pin header to the display.
  • Which pins on the Arduino connect to the LCD data lines?
    Pins 2, 3, 4, and 5 connect to DB7, DB6, DB5, and DB4 respectively.
  • Why are the first four data pins of the LCD left disconnected?
    The LCD runs in 4-bit mode where DB0 to DB3 are not needed.
  • What is the function of the 10k potentiometer?
    It adjusts the LCD contrast.
  • When is the 47 ohm resistor required?
    It is only needed if using the LCD backlight to limit current.
  • Which Arduino pin connects to the LCD Enable pin?
    Arduino Pin 11 connects to the LCD E (Enable) pin.
  • Where does the LCD R/W pin connect?
    It connects directly to the Arduino GND.
© 2026 Use Arduino for Projects Home
Scroll to Top