CSE247 on YouTube

How to Interface LCD (Liquid Crystal Display) Using An Arduino

In Arduino based embedded system design, the  Liquid Crystal Display modules play a very important role. Hence it is very important to learn about how to interface LCD with an Arduino of 16×2 in embedded system design. The display units are very important in communication between the human world and the machine world. The display unit work on the same principle, it does not depend on the size of the display it may be big or the small. We are working with the simple displays like 16×1 and 16×2 units. The 16×1 display unit has the 16 characters which present in one line and 16×2 display units have 32 characters which are present in the 2 line. We should know that to display the each character there are 5×10 pixels. Thus to display one character all the 50 pixels should be together. In the display,there is a controller which is HD44780 it is used to control the pixels of characters to display.

What is a Liquid Crystal Display?

The liquid crystal display uses the property of light monitoring of liquid crystal and they do not emit the light directly. The Liquid crystal display is a flat panel display or the electronic visual display. With low information, content the LCD’ s are obtained in the fixed image or the arbitrary image which are displayed or hidden like present words, digits, or 7 segment display. The arbitrary images are made up of large no of small pixels and the element has larger elements.
Liquid Crystal Display

Liquid Crystal Display of 16×2

The 16×2 liquid crystal display contains two horizontal lines and they are used for compressing the space of 16 display characters. In inbuilt, the LCD has two registers which are described below.
  • Command Register
  • Data Register
Command Register: This register is used to insert a special command in the LCD. The command is a special set of data and it is used to give the internal command to the liquid crystal display like clear screen, move to line 1 character 1, setting the curser and etc.
Data Register: The data registers are used to enter the line in the LCDLiquid Crystal Display of 16x2


Liquid Crystal Display of 16×2

Pin diagram and description of each pin have explained in the following table.
Pin NoPin Name
Pin Description
Pin 1
GND
This pin is a ground pin and the LCD is connected to the Ground
Pin 2
VCC
The VCC pin is used to supply the power to the LCD
Pin 3
VEE
This pin is used for adjusting the contrast of the LCD by connecting the variable resistor in between the VCC & Ground.
Pin 4
RS
The RS is known as register select and it selects the Command/Data register. To select the command register the RS should be equal to zero. To select the Data register the RS should be equal to one.
Pin 5
R/W
This pin is used to select the operations of Read/Write. To perform the write operations the R/W should be equal to zero. To perform the read operations the R/W should be equal to one.
Pin 6
EN
This is a enable signal pin if the positive pulses are passing through a pin, then the pin function as a read/write pin.
Pin 7
DB0 to DB7
The pin 7 contains total 8 pins which are used as a Data pin of LCD.
Pin 15
LED +
This pin is connected to VCC and it is used for the pin 16 to set up the glow of backlight of LCD.
Pin 16
LED –
This pin is connected to Ground and it is used for the pin 15 to set up the glow of backlight of the LCD.

LCD Interfacing with the Arduino Module

The following circuit diagram shows the liquid crystal display with the Arduino module. From the circuit diagram, we can observe that the RS pin of the LCD is connected to the pin 12 of the Arduino. The LCD of R/W pin is connected to the ground. The pin 11 of the Arduino is connected to the enable signal pin of LCD module. The LCD module & Arduino module are interfaced with the 4-bit mode in this project. Hence there are four input lines which are DB4 to DB7 of the LCD. This process very simple, it requires fewer connection cables and also we can utilize the most potential of the LCD module.



LCD Interfacing with the Arduino Module
LCD Interfacing with the Arduino Module

The digital input lines (DB4-DB7) are interfaced with the Arduino pins from 5-2. To adjust the contrast of the display here we are using a 10K potentiometer. The current through the back LED light is from the 560-ohm resistor. The external power jack is provided by the board to the Arduino. Using the PC through the USB port the Arduino can power. Some parts of the circuit can require the +5V power supply it is taken from the 5V source on the Arduino board.
The following schematic diagram shows the LCD module interfacing with the Arduino.



Schematic Diagram

No comments:

Powered by Blogger.