Arduino Projects

16×2 LCD Arduino, Introduction, Pinout, datasheet,and Proteus simulation

16×2 LCD Description:


This Tutorial “Arduino 16×2 LCD” is based on the famous 16×2 LCD interfacing and programming. LCD modules are commonly used in most embedded projects, the reason being its cheap price, availability and programmer-friendly. Most of us would have come across these displays in our day-to-day life, either at PCO’s or calculators. In this tutorial, you will learn

  1. 16×2 LCD introduction
  2. Features of the 16×2 LCD module
  3. 16×2 LCD Pinout or pin Description
  4. Soldering
  5. 16×2 LCD interfacing with Arduino and
  6. 16×2 LCD programming.

Amazon Links:

Arduino Uno

Arduino Nano

Mega 2560:

16X2 LCD

LCD 16×2 i2c:

16×2 LCD:


Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines


Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

16×2 LCD:

16x2 LCD

LCD stands for Liquid crystal display. 16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of combinations available like 8×1, 8×2, 10×2, 16×1, etc. but the most used one is the 16×2 LCD. So, it will have 16×2 = 32 characters in total and each character will be made of 5×8 Pixel Dots.

Features of the 16×2 LCD module

  • Operating Voltage of the 16X2 LCD  is 4.7V to 5.3V
  • Current consumption is 1mA without backlight
  • This is an Alphanumeric LCD display module, which means you  can display alphabets and numbers
  • Consists of two rows and each row can print 16 characters.
  • Each character is built by a 5×8 pixel box
  • Can work on both 8-bit and 4-bit mode. “we will be using this LCD  in 4-bit mode”.
  • It can also display any custom generated characters. I will explain this in my upcoming tutorial.
  • Available in Green and Blue Backlight

16×2 LCD Pinout:

16x2 LCD

16×2 LCD has a total of 16 pins.

Pin number1 is the Ground and will be connected with the Arduino’s Ground.

Pin number 2 is the VDD and will be connected with the Arduino’s 5 volts.

Pin number 3 the contrast pin, this pin will be connected with the potentiometer. The LCD contrast can be then controlled using a potentiometer……

Pin number 4 is the RS which stands for register select. It can be set to 0 or 1.

0 is equal to an instruction input

1 is equal to data input

Pin number 5 is the read or write pin of the LCD. It can be set to 0 or 1.

0 means Write to an LCD module and
1 means Read from the LCD module

Most commonly we use 0, as we print text and sensors values on the LCD. For this, we simply connect this pin with the ground, as ground means 0.

Pin number 6 is the enable pin.

Pin number 7 to 14 are the data pins which are also represented by D0 TO D7. SO

Pin number 7 = D0

Pin number 8 = D1

Pin number 9 = D2

And so on up to pin number 14 which is D7

To reduce the wiring we will be using this LCD in a 4-bit configuration, so out of these 8 pins, we will be using only 4 pins D4 to D7.

Pin number 16 will be connected with Arduino’s 5 volts and finally

Pin number 16 will be connected with the Arduino’s Ground.

16×2 LCD interfacing with Arduino, Circuit Diagram:

16x2 LCD

This is the complete circuit diagram explaining how 16×2 LCD is connected with the Arduino. This schematic is designed in cadsoft eagle 9.1.0 version. If you want to learn how to make schematics and PCB’s, then watch the video tutorial.

As you can see in the circuit diagram above, the ground is connected with pin number 1, 5 and pin number 16…5v from Arduino is connected with pin number 2 and pin number 15…the middle pin of the variable resistor or potentiometer is connected with pin number 3 of the LCD…while the other two pins are connected with the ground and 5v. Pin’s 4 to 7 of the Arduino are connected with pins D7 to D4 of the LCD.

Pin number 8 of the Arduino is connected with the enable pin of the LCD….pin number 9 of the Arduino is connected with the RS pin of LCD…

16×2 LCD Proteus Simulation:

16x2 LCD

Download:16×2 lcd simulation design

LCD Soldering:

For Soldering watch video given at the end of this Article.

16×2 LCD Arduino Programming:

16×2 LCD programming is really easy. The difficult part has already been done. We have a library for this which consists of all the functions, with the help of these functions you can select any column, you can select any of the two rows and so on.

#include <LiquidCrystal.h>

# means that this is a preprocessor directive and .h means that this is a header file.  Then we define some pins, rs is connected with pin number 9 of the Arduino, en is connected with pin 8, d4 with pin7, d5 with pin 6, d6 with pin 5 and d7 with pin4.

#define rs 9 
#define en 8 
#define d4 7 
#define d5 6  
#define d6 5 
#define d7 4 
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.

void loop() {

setcursor is a function and it takes two arguments as the input, the column number and the row number.  0 means first column and 1 means 2nd row.


  lcd.setCursor(0, 1);
  // print the number of seconds since reset:

Watch Video Tutorial:

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

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

Back to top button