In LCD 16×2, the term LCD stands for Liquid Crystal Display that uses a plane panel display technology, used in screens of computer monitors & TVs, smartphones, tablets, mobile devices, etc. Both the displays like LCD & CRTs look the same but their operation is different. Instead of electrons diffraction at a glass display, a liquid crystal display has a backlight that provides light to each pixel that is arranged in a rectangular network.
Every pixel includes a blue, red, green sub-pixel that can be switched ON/OFF. Once all these pixels are deactivated, then it will appear black and when all the sub-pixels are activated then it will appear white. By changing the levels of each light, different color combinations are achievable. This article discusses an overview of LCD 16X2 & its working with applications.
What is LCD 16X2?
An electronic device that is used to display data and the message is known as LCD 16×2. As the name suggests, it includes 16 Columns & 2 Rows so it can display 32 characters (16×2=32) in total & every character will be made with 5×8 (40) Pixel Dots. So the total pixels within this LCD can be calculated as 32 x 40 otherwise 1280 pixels.
16 X2 displays mostly depend on multi-segment LEDs. There are different types of displays available in the market with different combinations such as 8×2, 8×1, 16×1, and 10×2, however, the LCD 16×2 is broadly used in devices, DIY circuits, electronic projects due to less cost, programmable friendly & simple to access.
Specifications of LCD 16X2
The specifications of LCD 16X2 are discussed below.
- The operating voltage of this display ranges from 4.7V to 5.3V
- The display bezel is 72 x 25mm
- The operating current is 1mA without a backlight
- PCB size of the module is 80L x 36W x 10H mm
- HD47780 controller
- LED color for backlight is green or blue
- Number of columns – 16
- Number of rows – 2
- Number of LCD pins – 16
- Characters – 32
- It works in 4-bit and 8-bit modes
- Pixel box of each character is 5×8 pixel
- Font size of character is 0.125Width x 0.200height
LCD 16X2 Pin Configuration
The pin configuration of LCD 16 X 2 is discussed below so that LCD 16×2 connection can be done easily with external devices.
- Pin1 (Ground): This pin connects the ground terminal.
- Pin2 (+5 Volt): This pin provides a +5V supply to the LCD
- Pin3 (VE): This pin selects the contrast of the LCD.
- Pin4 (Register Select): This pin is used to connect a data pin of an MCU & gets either 1 or 0. Here, data mode = 0 and command mode =1.
- Pin5 (Read & Write): This pin is used to read/write data.
- Pin6 (Enable): This enables the pin must be high to perform the Read/Write procedure. This pin is connected to the data pin of the microcontroller to be held high constantly.
- Pin7 (Data Pin): The data pins are from 0-7 which are connected through the microcontroller for data transmission. The LCD module can also work on the 4-bit mode through working on pins 1, 2, 3 & other pins are free.
- Pin8 – Data Pin 1
- Pin9 – Data Pin 2
- Pin10 – Data Pin 3
- Pin11 – Data Pin 4
- Pin12 – Data Pin 5
- Pin13 – Data Pin 6
- Pin14 – Data Pin 7
- Pin15 (LED Positive): This is a +Ve terminal of the backlight LED of the display & it is connected to +5V to activate the LED backlight.
- Pin16 (LED Negative): This is a -Ve terminal of a backlight LED of the display & it is connected to the GND terminal to activate the LED backlight.
LCD 16X2 Commands
The LCD 16×2 commands are discussed below.
- HexCode 1: This command will remove data displaying on the screen of LCD.
- HexCode 2: It used to move return home.
- HexCode 4: It is used to modify a cursor location to the left side.
- HexCode 6: It is used to change the cursor location to the right side.
- HexCode 5: It is used to shift the display to right.
- HexCode 7: It used to shift the display to left.
- HexCode 8: It is used to turn off the display & the cursor will be turned off.
- HexCode 0A: It is used to turn ON the cursor &turn off the display
- HexCode 0C: It is used to turn OFF the cursor & turn oON the display
- HexCode 0E: It is used to turn ON the display & blink the cursor.
- HexCode 0F: It is used to turn ON display & blink the cursor
- HexCode 10: It changes the cursor location to left.
- HexCode 14: It changes the cursor location to right.
- HexCode 18: It changes the display location to the left side.
- HexCode 1C: It changes the display location to the right side.
- HexCode 80: It is used to shift the cursor to the primary line.
- HexCode C0: It moves the cursor to the beginning of the next line
- HexCode 38: 2- lines & 5×7 matrix
The basic working principle of LCD is passing the light from layer to layer through modules. These modules will vibrate & line up their position on 90o that permits the polarized sheet to allow the light to pass through it.
These molecules are accountable for viewing the data on every pixel. Every pixel utilizes the method of absorbing light to illustrate the digit. To display the value, the position of molecules must be changed to the angle of light.
So this light deflection will make the human eye notice the data that will be the ingredient wherever the light gets absorbed. Here, this data will supply to the molecules & will be there till they get changed
At present, LCDs are used frequently in CD/DVD players, digital watches, computers, etc. In screen industries, LCDs have replaced the CRTs (Cathode Ray Tubes) because these displays use more power as compared to LCD, heavier & larger.
The displays of LCDs are thinner as compared to CRTs. As compared to LED screens, LCD has less power consumption because it functions on the fundamental principle of blocking light instead of dissipating.
Registers of LCD
The registers used in LCD are two types like data register & command register. The register can be changed by using the RS pinout. If we set ‘0’ then it is command register and if it is ‘1’ then it is data register.
The main function of the command register is to save instructions illustrated on LCD. That assists in data clearing & changes the cursor location & controls the display.
The data register is used to save the date to exhibit on the LCD. Once we transmit data to LCD, then it shifts to the data register to process the data. If we fix the register value at one that the data register will start working.
Interfacing LCD 16×2 with Arduino
Interfacing of a 16X2 LCD with Arduino is discussed to display “Hello World!” on the screen. A library like LiquidCrystal permits you to manage the displays that are well-matched through the driver like Hitachi HD44780 driver. Here, the following example circuit displays “Hello World!” on the LCD & displays the time in sec once the Arduino board was reset.
The 16×2 display includes a parallel interface which means that the microcontroller used in this has to control different interface pins immediately to control the LCD. The interface includes mainly these pins like RS (Register Select) pin, Read/Write pin, Enable Pin, Data pins from D0 to D7, display contrast pin, LED backlight pins, power supply pins.
The display controlling process mainly involves placing the data to form the picture of what you desire to show into the data registers, after that placing instructions within the instruction register. A library like LiquidCrystal will simplify this for you so you don’t require identifying the instructions in low-level.
The controlling of LCDs compatible with Hitachi can be done using two modes like 4-bit/8-bit. Here, the 4-bit mode needs 7 I/O pins using the Arduino board, whereas the 8-bit mode needs 11 pins. To display the text on the LCD, the 4-bit mode is used. The following example will explain how to control an LCD using 4-bit mode.
The required components of interfacing 16X2 LCD with Arduino include the following.
- Arduino Board
- LCD Screen
- Hook-up Wires
- Pin headers for soldering the display pins of LCD
- Resistor – 220 ohm
- Potentiometer – 10k ohm
Before interfacing the LCD screen to the Arduino board, a pin header strip need to be solder to pin-14 or 16 of the LCD. We can notice this in the following circuit diagram. The following pins need to connect to wire the LCD to an Arduino board.
- RS pin of LCD to digital pin-12
- Enable pin is connected to digital pin-11
- D4 pin is connected to digital pin -5
- D5 pin is connected to digital pin- 4
- D6 pin is connected to digital pin-3
- D7 pin is connected to digital pin-2
- Read/Write pin is connected to GND
- VSS pin is connected to the GND terminal
- VCC pin is connected to 5V
- A 220-ohm resistor is connected from LED+ to 5V
- LED is connected to the GND terminal
- In addition, connect a 10k pot toward +5V & GND through its wiper to LCD pin3.
Thus, this is all about an overview of LCD 16×2, used in a wide range of applications such as different devices and circuits such as calculators, mobile phones, TV sets, computers, etc. These displays are mostly selected for multi-segment LEDs & 7- segment displays. LCDs are extensively used in different electronic applications like different systems to illustrate different statuses as well as parameters. Here is a question for you, what are the different types of LCDs available in the market?