In this tutorial you will connect a LCD (Liquid Crystal Display) to the Arduino Uno and then run the Arduino LCD example programs that are built into the Arduino IDE.
It is recommended for beginners to complete all the Arduino tutorials up to and including Tutorial 10: Ten Arduino Projects for Absolute Beginners.
Read about Liquid Crystal Displays (LCD). You will also need to prepare your LCD by soldering wires or a pin header to the display unless your LCD already has connections that allow you to connect it to a breadboard. Read the article on soldering irons and on soldering. The article on soldering has a video that shows how to solder a pin header to a LCD display.
Besides an Arduino Uno board, USB cable, wire links and a breadboard, you will need:
|1||47 ohm resistor (yellow – violet – black)||R1||1/4W, 5% or better|
Only needed if using LCD backlight
|1||10k potentiometer||RV1||Trimpot or panel mount. Used for LCD contranst||Potentiometer|
|1||MSC-C162DYLY-4N (Truly) or PC1602LRS-FWA-B (Powertip) or similar||2 line by 16 character LCD, HD44780 compatible|
The display can be with or without backlight. The two parts mentioned here both have backlights.
|1||16 way single in-line pin header||Single in-line pin header, 16 pins (2.54mm pin spacing) to be soldered into LCD for connection to breadboard||Header|
Before wiring up your LCD to the Arduino, make sure that your LCD has the same pin numbering as the one in the circuit diagram below. If it does not, you will need to make sure that you make the correct connections between the LCD and Arduino. Also refer to the Arduino Liquid Crystal page for connections to a different LCD that has pins at the top of the LCD instead of at the bottom. The pin numbering on the physical LCD used in this tutorial can be found on the LCD page. When building the circuit, you will need to refer to the diagram or photo showing the physical pin numbering / pin names of the LCD to make sure that you are connecting the LCD correctly.
The circuit diagram shows that the following connections are made:
|Pin 11||→||E (Enable)|
The following are all connected to the Arduino GND:
- The LCD R/W pin
- One of the outer pins of the potentiometer
- The LCD VSS pin
- The LCD backlight cathode pin (BLC)
The centre pin (or wiper) of the potentiometer is connected to the LCD V0 pin.
The following are connected to the Arduino 5V pin:
- The LCD VDD pin
- One of the potentiometer outer pins
- The LCD backlight anode pin (BLA) is connected to 5V through a 47Ω resistor
The first four data pins of the LCD (DB0 to DB3) are left disconnected as the LCD will be run in 4-bit mode where these pins are not needed.
The 47 ohm resistor provides current limiting for the LCD backlight and will not be needed if your LCD does not have a backlight.
The 10k potentiometer adjusts the LCD contrast. After powering up the circuit, you will need to adjust the contrast pot. until you can see the dots of the display or characters being displayed if a program (sketch) has been loaded to the Arduino and has written to the LCD.
Building the Circuit
After preparing your LCD display by soldering a pin header to it, get ready to plug it into the breadboard. Also be sure to check the datasheet for your LCD to see what the pin names are so that you can connect it correctly. Be very careful not to connect the LCD power pins the wrong way around as this will most likely destroy the LCD.
For more detail: Arduino LCD