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

(Last Updated On: July 3, 2019)

16x2 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.


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
16×2 lcd: https://amzn.to/2FcXuUS
Potentiometer: https://amzn.to/2JSLbfg
330 ohm resistors pack: https://amzn.to/2NtlAeh
5v 2A adaptor: https://amzn.to/2GsNfcw
2n2222 npn transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF

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.

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 following video.

As you can see in the circuit diagram above, 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

16×2 LCD Soldering:

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

16×2 LCD 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.


# 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.

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.


Watch Video Tutorial:

Recommended For You

About the Author: 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

Close