16x2 LCD Display Module

Published  October 24, 2015   9
User Avatar Aswinth Raj
Author
16x2 LCD Display Module with HD44780 Controller
16x2 LCD Display Module with HD44780 Controller

16x2 LCD Display Module Pinout Configuration

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, hence we are using it here. This comprehensive 16x2 LCD display module datasheet guide covers all technical specifications and implementation details.

All the above-mentioned LCD displays will have 16 pins, and the programming approach is also the same; hence, the choice is left to you. Below is the 16x2 LCD display module pinout and pin and  with a detailed 16x2 LCD display module diagram description:

16x2-LCD-Module-Pinouts

Sr. NoPin No.Pin NamePin TypePin DescriptionPin Connection
1Pin 1GroundSource PinThis is a ground pin of the LCDConnected to the ground of the MCU/ Power source
2Pin 2VCCSource PinThis is the supply voltage pin of the LCDConnected to the supply pin of the Power source
3Pin 3V0/VEEControl PinAdjusts the contrast of the LCD.Connected to a variable POT that can source 0-5V
4Pin 4Register SelectControl PinToggles between Command/Data Register

Connected to an MCU pin and gets either 0 or 1.

0 -> Command Mode

1-> Data Mode

5Pin 5Read/WriteControl PinToggles the LCD between Read/Write Operation

Connected to an MCU pin and gets either 0 or 1.

0 -> Write Operation

1-> Read Operation

6Pin 6EnableControl PinMust be held high to perform the Read/Write OperationConnected to the MCU and always held high.
7Pin 7-14Data Bits (0-7)Data/Command PinPins are used to send commands or data to the LCD.

In 4-Wire Mode

Only 4 pins (0-3) is connected to the MCU

In 8-Wire Mode

All 8 pins(0-7) are connected to MCU

8Pin 15LED PositiveLED PinNormal LED like operation to illuminate the LCDConnected to +5V
9Pin 16LED NegativeLED PinNormal LED like operation to illuminate the LCD connected with GND.Connected to ground

Understanding 16x2 LCD Display Module Internal Architecture

It is okay if you do not understand the function of all the pins; I will be explaining in detail below. Now, let us examine the internal components of our 16x2 LCD screen:

16x2-LCD-Module-Interface-IC

Okay, what are these two black circle components on the back of the 16x2 LCD display module?

These black circles consist of an interface IC and its accompanying components to help us work with this 16x2 LCD display with the MCU. This component layout is clearly shown in the 16x2 LCD display module diagram above. Our LCD, a 16*2 Dot matrix LCD, will have (16*2=32) 32 characters in total, where each character will consist of 5*8 Pixel Dots. The picture below shows a Single character with all its pixels enabled.

LCD-Module-Pixels

So now, we know that each character has (5*8=40) 40 Pixels and for 32 Characters we will have (32*40) 1280 Pixels. Further, the 16x2 LCD display module should also be instructed about the Position of the Pixels.

It will be a hectic task to handle everything with the help of the MCU; hence, an Interface IC like HD44780 is used, which is mounted on the LCD Module itself. The function of this IC is to get the Commands and Data from the MCU and process them to display meaningful information on our 16x2 LCD screen.

Let’s discuss the different type of modes and options available in our LCD that has to be controlled by our Control Pins.

16x2 LCD Display Module Specifications

SpecificationValue
Display Format16 characters × 2 lines
Character Matrix5 × 8 dots
Total Pixels1280 pixels (32 chars × 40 pixels each)
Controller ICHD44780U or compatible
Operating Voltage5V DC
Operating Current1-3 mA (without backlight)
Backlight Current120-200 mA
Operating Temperature0°C to +50°C
Communication Modes4-bit or 8-bit parallel
Total Pins16 pins

16x2 LCD Display Module Operating Modes

Next, we will talk about the various operating modes and options associated with our 16x2 LCD display module, which can be controlled by the Control Pins. 

4-bit and 8-bit Mode of LCD:

The LCD can work in two different modes, namely the 4-bit mode and the 8-bit mode. In 4-bit mode, we send the data nibble by nibble, first the upper nibble and then the lower nibble. For those of you who don’t know what a nibble is: a nibble is a group of four bits, so the lower four bits (D0-D3) of a byte form the lower nibble while the upper four bits (D4-D7) of a byte form the higher nibble. This enables us to send 8-bit data.

Whereas in 8-bit mode, we can send the 8-bit data directly in one stroke since we use all 8 data lines.

Now you must have guessed it, yes, 8-bit mode is faster and flawless than 4-bit mode. But the major drawback is that it needs 8 data lines connected to the microcontroller. This will make us run out of I/O pins on our MCU, so 4-bit mode is widely used. No control pins are used to set these modes. It's just the way of programming that changes.

Read and Write Mode of LCD:

As said, the LCD itself consists of an Interface IC. The MCU can either read or write to this interface IC. Most of the time, we will be just writing to the IC, since reading will make it more complex, and such scenarios are very rare. Information like the position of the cursor, status completion interrupts, etc., can be read if required, but it is out of the scope of this tutorial.

The Interface IC present in most of the LCDs is HD44780U. To program our LCD we should learn the complete datasheet of the IC. The 16x2 LCD display module datasheet is given here.

LCD Commands:

There are some preset command instructions in the LCD, which we need to send to the LCD through a microcontroller. Some important command instructions are given below:

Hex CodeCommand to LCD Instruction Register
0FLCD ON, cursor ON
01Clear display screen
02Return home
04Decrement cursor (shift cursor to left)
06Increment cursor (shift cursor to right)
05Shift display right
07Shift display left
0EDisplay ON, cursor blinking
80Force cursor to beginning of first line
C0Force cursor to beginning of second line
382 lines and 5×7 matrix
83Cursor line 1 position 3
3CActivate second line
08Display OFF, cursor OFF
C1Jump to second line, position 1
OCDisplay ON, cursor OFF
C1Jump to second line, position 1
C2Jump to second line, position 2

Troubleshooting LCD Display Modules 16x2

Some possible problems with the LCD display modules are identified below, along with suggested solutions.

  • Blank display: Check power and connections, and, if applicable, check contrast adjustment on the V0 pin.
  • Dim characters: Adjust the contrast potentiometer, reset switch and/or check backlight connections.
  • Garbage characters: Check data pin connections and the sequence of initialisation.
  • No backlight: Check LED+ and LED- connections, and in some cases, you can add a current-limiting resistor.
  • Partial display: Check your Enable pin connection, as well as the timing in your code.

16x2 LCD Display Module FAQ

⇥ How many pins does the 16x2 LCD module have?
The 16x2 LCD module has a total of 16 pins:

  • Power pins (2): VCC and Ground
  • Control pins (3): Register Select (RS), Enable, and Read/Write
  • Data pins (8): D0 to D7 to send commands/data
  • Display control (1): V0/VEE to adjust contrast
  • Backlight pins (2): LED+ and LED- to provide backlight illumination

⇥ What controller chip is in the 16x2 LCD module?
The vast majority of 16x2 LCD modules use the HD44780U controller IC. This interface chip interfaces the microcontroller to the LCD; it handles the commands and character data so that the 1280 individual pixels can be controlled.

⇥ What is the difference between 4-bit and 8-bit mode?
4-bit: Uses only 4 of D4-D7, sends data nibble by nibble, conserves microcontroller pins.
8-bit: Uses all D0-D7, sends a complete byte at once, faster, consumes more pins.

Check our LCD interfacing Articles with different Microcontrollers:

Dive into LCD Interfacing Projects

Create a deeper understanding of 16x2 LCD modules by diving into these diverse microcontroller-based interfacing projects.

Interfacing 16x2 LCD with Arduino

Interfacing 16x2 LCD with Arduino

In this article we discussed about 16x2 LCD, its working, pinout, and also how to use 16x2 LCD with Arduino. We provided Circuit Diagram, Complete Arduino Code, and step-by-step guide.

16x2 LCD with Atmega16 AVR Microcontroller in 4-Bit Mode

16x2 LCD with Atmega16 AVR Microcontroller in 4-Bit Mode

In this tutorial, we will see how to interface a 16x2 LCD with Atmega16 AVR microcontroller and display a simple welcome message.

16x2 LCD with ARM7-LPC2148 in 4-Bit Mode

16x2 LCD with ARM7-LPC2148 in 4-Bit Mode

In this tutorial we will see how to interface a 16x2 LCD with ARM7-LPC2148 microcontroller and display a simple welcome message.

Have any question related to this Article?
Commented by on | Permalink

In my project i have to connect a relay to digital pins of the arduino uno board. But I couldn't control the relay since the output is 2.18v. Could you please guide me what should i do.

Hi aparna,

You should not drive the Relay directly from an Arduino I/O pin.  If your Relay is a 5V relay you can use the circuit shown in the link below

https://circuitdigest.com/fullimage?i=circuitdiagram_mic/Visitor-Counter-Circuit1.gif (Check the relay driving part alone)

As shown in the circuit if you use a transistor like BC547 and current limiting resistor, you should be able to toggle the relay without any problem. 

The reason is that when you trigger a relay directly from Arduino, the current provided by the I/O pin will not be enough and hence there will be a voltage drop (In your case 2.7) on your Arduino pin.

Hence we use the I/O pin to trigger the transistor, which closes the connection between a constant +5V and the relay.

 

Commented by on | Permalink

datasheet of LCD Display

Commented by on | Permalink

Need advise on availability and compatibility . Required 12 unit.

the hex command 38 is used for making 5x8 dot martix not for 5x7

Hi

Tank you for your interesting and usefull articel. Question: Is it possible to find out a pinout from an older, used LCD display? I have different, old displays I got out of still working but sorted out electronic gears like server nodes, video recorders , ... , you name it ... . Of course, I would like to use them and I asked myself, if it is possible, to find out how the pinout for that devcices is.

Add New Comment

Login to Comment Sign in with Google Log in with Facebook Sign in with GitHub