Open In App

Liquid Crystal Display Interfacing

Last Updated : 02 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisites: LCD Full Form

LCD stands for Liquid Crystal Display. It is a flat panel display technology, mainly used in TVs and computer monitors, nowadays it is used for mobile phones also.  In LCD, each pixel consists of a layer of molecules aligned between two transparent electrodes and two polarizing filters, the axes of transmission perpendicular to each other. The LCD is finding widespread use by replacing the LEDs 

In general. LCDs use much less power than their CRT counterparts. The size of LCDs is all small. In LCDs, there is no bulky picture tube. These factors make the LCDs practical where size and weight are essential.

The most common LCD controller is HITACHI 44780 which provides a simple interface between the microprocessor or microcontroller and an LCD. The commonly used alphanumeric displays are 1-16 (single line & 16 characters), 2 * 16 (double line & 16 characters per line) and 4-20 (four lines & 20 characters per line).

LCD Pin Description:

The LCD requires 3 control lines (RS, R/W, and EN) and 8(or 4) data lines. The number of data lines depends on the mode of operation. If operated in 8-bit mode then 8-bit data lines are required. And if the operation is in 4-bit mode then 4-bit data lines are required. The 8-bit mode is faster than the 4-bit mode. In 8-bit mode, LCD uses a total of 14 pins including 8 data lines, 3 control lines, and 3 power supply lines (Vee Vss and Vee)

1. Power Supply: The LCD discussed here uses three power supply pins (Vcc, Vss, and Vee ) Vcc and Vss pins are used to provide +5V and ground respectively. The pin Vee is used for controlling LCD contrast.

2. Control Lines: There are three control lines in the LCD. These three are used to control the LCD operations There are two very important registers inside the LCD: the command register and the data register. The RS (Register select) pin is used to select the register out of these two. If RS = 0 the command register is selected and the user is allowed to send the command to the LCD. If RS = 1, the data register is selected and the data sent by the user is displayed on the LCD.

R / W  (Read/ Write ) pin allows the user to read/write the information (data or code) to/ from the LCD. R /W = 1 when reading and R/W=0 when the writing operation is performed.

Another control pin EN (Enable) is used to latch the data present on the data pins. A high-low signal is required to latch the data. The LCD interprets and executes the commands at the instant the EN line is brought low.

3. Data lines: The 8-bits data pins. D(0)-D(7) are used to send the information to the LCD or read the contents of the LCD’s internal register.

 Pin Description for LCD:

Pin No Symbol Description
1 Vss Ground
2 Vcc +5V power supply
3 Vee power supply to control the contrast
4 RS register select
5 R/W Read/Write
6 EN Enable
7-14 D0-D7 8- bit data lines

LCD Command Words:

There are LCD commands those can be sent to the LCD to clear the display or shift the cursor from right to left or left to right or blink the cursor. To write the LCD command word in the command register RS must be zero (RS = 0) and R/  W = 0. The LCD commands

Hex code Description
01 Clear display screen
02 Return home
04 Decrement cursor (shift cursor from right to left)
06 Increment cursor (shift cursor from left to right)
05 Shift display right
07 Shift display left
08 Display off. cursor off
0A Display off. cursor on
0C Display on. cursor off
0E Display on, cursor blinking
0F Display on, cursor blinking
10 Shift cursor position to left
14 Shift cursor position to the right
18 Shift the entire display to left
1C Shift the entire display to the right
80 Force cursor to the beginning of 1″ line
C0 Force cursor to the beginning of 2 line
38 2 lines and 5×7 matrix

LCD Interfacing:

The LCD can be interfaced to the microprocessor 8085 using the programmable peripheral interface (PPI-8255) IC. To display letters and numbers. ASCII code for the letters A to Z, a to 7, and numbers 0 to 9 is sent to the data lines (D0 -D7). These codes may be sent to LCD data lines through one port of 8255 (PPI), port A is used as the output port and send the data to the LCD. The EN pin and RS pin are connected to port B of the 8255. Since it is used as a normal display R/W is made low by connecting to the ground directly. Power supply connections are provided to Vcc and Vss pins. The Vee pin is connected to the EE moving node of the potentiometer which is connected between the Vcc and Vss pins. By moving the potentiometer the contrast of the LCD can be changed.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads