
Table of Contents
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:
Sr. No | Pin No. | Pin Name | Pin Type | Pin Description | Pin Connection |
1 | Pin 1 | Ground | Source Pin | This is a ground pin of the LCD | Connected to the ground of the MCU/ Power source |
2 | Pin 2 | VCC | Source Pin | This is the supply voltage pin of the LCD | Connected to the supply pin of the Power source |
3 | Pin 3 | V0/VEE | Control Pin | Adjusts the contrast of the LCD. | Connected to a variable POT that can source 0-5V |
4 | Pin 4 | Register Select | Control Pin | Toggles between Command/Data Register | Connected to an MCU pin and gets either 0 or 1. 0 -> Command Mode 1-> Data Mode |
5 | Pin 5 | Read/Write | Control Pin | Toggles the LCD between Read/Write Operation | Connected to an MCU pin and gets either 0 or 1. 0 -> Write Operation 1-> Read Operation |
6 | Pin 6 | Enable | Control Pin | Must be held high to perform the Read/Write Operation | Connected to the MCU and always held high. |
7 | Pin 7-14 | Data Bits (0-7) | Data/Command Pin | Pins 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 |
8 | Pin 15 | LED Positive | LED Pin | Normal LED like operation to illuminate the LCD | Connected to +5V |
9 | Pin 16 | LED Negative | LED Pin | Normal 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:
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.
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
Specification | Value |
---|---|
Display Format | 16 characters × 2 lines |
Character Matrix | 5 × 8 dots |
Total Pixels | 1280 pixels (32 chars × 40 pixels each) |
Controller IC | HD44780U or compatible |
Operating Voltage | 5V DC |
Operating Current | 1-3 mA (without backlight) |
Backlight Current | 120-200 mA |
Operating Temperature | 0°C to +50°C |
Communication Modes | 4-bit or 8-bit parallel |
Total Pins | 16 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 Code | Command to LCD Instruction Register |
0F | LCD ON, cursor ON |
01 | Clear display screen |
02 | Return home |
04 | Decrement cursor (shift cursor to left) |
06 | Increment cursor (shift cursor to right) |
05 | Shift display right |
07 | Shift display left |
0E | Display ON, cursor blinking |
80 | Force cursor to beginning of first line |
C0 | Force cursor to beginning of second line |
38 | 2 lines and 5×7 matrix |
83 | Cursor line 1 position 3 |
3C | Activate second line |
08 | Display OFF, cursor OFF |
C1 | Jump to second line, position 1 |
OC | Display ON, cursor OFF |
C1 | Jump to second line, position 1 |
C2 | Jump 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:
- LCD Interfacing with 8051 Microcontroller
- Interfacing LCD with ATmega32 Microcontroller
- LCD Interfacing with PIC Microcontroller
- Interfacing a 16x2 LCD with Arduino
- 16x2 LCD Interfacing with Raspberry Pi using Python
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
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
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
In this tutorial we will see how to interface a 16x2 LCD with ARM7-LPC2148 microcontroller and display a simple welcome message.
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.
Please use the transistor with relay
datasheet of LCD Display
Here is the datasheet
https://components101.com/sites/default/files/component_datasheet/16x2%…
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.
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.