100% found this document useful (1 vote)
12 views

12th Experiment

The document outlines an experiment to interface a 16×2 LCD with an Arduino to display text and characters. It details the necessary hardware and software components, the theory behind LCD technology, and the pin configuration of the LCD module. Additionally, it includes pre-lab and post-lab questions to reinforce learning and a sample code structure for the Arduino setup.

Uploaded by

kpnx8cpmmk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
12 views

12th Experiment

The document outlines an experiment to interface a 16×2 LCD with an Arduino to display text and characters. It details the necessary hardware and software components, the theory behind LCD technology, and the pin configuration of the LCD module. Additionally, it includes pre-lab and post-lab questions to reinforce learning and a sample code structure for the Arduino setup.

Uploaded by

kpnx8cpmmk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment 12: LCD INTERFACING

Aim:

To interface LCD to Arduino (Display text and characters on LCD screen using Arduino)

Components Requirement:

Hardware components : i) Desktop/ Laptop (Host)


(ii) Arduino Uno Development Board (Target)
(iii) Type B USB Cable
Software Tools : Arduino IDE,
Tinkercad online Virtual Lab (For simulation)

Theory:

In this experiment, we’re learning how to interface LCD to Arduino and display text characters on
LCD screen. We’re interfacing 16×2 LCD to Arduino as a demonstration with circuit and code.

A Liquid Crystal Display commonly abbreviated as LCD is basically a display unit built
using Liquid Crystal technology. In order to build real life/real world electronics based projects, we
need a medium/device to display output values and messages. The most basic form of electronic
display available is 7 Segment display – which has its own limitations. The next best available option
is Liquid Crystal Displays which comes in different size specifications. Out of all available LCD
modules in market, the most commonly used one is 16×2 LCD Module which can display 32 ASCII
characters in 2 lines (16 characters in 1 line).

The name and functions of each pin of the 16×2 LCD module is given below.
Pin1(Vss):Ground pin of the LCD module.
Pin2(Vcc): Power to LCD module (+5V supply is given to this pin)
Pin3(VEE):Contrast adjustment pin. This is done by connecting the ends of a 10K potentiometer to
+5V and ground and then connecting the slider pin to the VEE pin. The voltage at the VEE pin defines
the contrast. The normal setting is between 0.4 and 0.9V.
Pin4(RS):Register select pin.The JHD162A has two registers namely command register and data
register. Logic HIGH at RS pin selects data register and logic LOW at RS pin selects command regis-
ter. If we make the RS pin HIGH and feed an input to the data lines (DB0 to DB7), this input will be
treated as data to display on LCD screen. If we make the RS pin LOW and feed an input to the data
1
lines, then this will be treated as a command ( a command to be written to LCD controller – like posi-
tioning cursor or clear screen or scroll).
Pin5(R/W): Read/Write modes. This pin is used for selecting between read and write modes. Logic
HIGH at this pin activates read mode and logic LOW at this pin activates write mode.
Pin6(E): This pin is meant for enabling the LCD module. A HIGH to LOW signal at this pin will ena-
ble the module.
Pin7(DB0) to Pin14(DB7): These are data pins. The commands and data are fed to the LCD module
though these pins.
Pin15(LED+): Anode of the back light LED. When operated on 5V, a 560 ohm resistor should be
connected in series to this pin. In arduino based projects the back light LED can be powered from the
3.3V source on the arduino board.
Pin16(LED-): Cathode of the back light LED.

Circuit diagram – Arduino to 16×2 LCD Module

2
Pre-lab Questions:
1) List and describe the important control signals of LCD?
2) Write the advantages of LCD over the LED display.

Code Structure (Arduino to LCD):

#include<LiquidCrystal.h>
LiquidCrystallcd(12, 11, 5, 4, 3, 2); // sets the interfacing pins
void setup( )
{
lcd.begin (16, 2); // initializes the 16x2 LCD
}
Void loop ( )
{
--
--
}

Post-Lab Questions:
1) Write an ATMega328P Arduino C program to send letters “SRMIST” to the LCD display. Test the
output in Tinkercad and paste the output result here.

RESULT:

You might also like