IOT Practical (Part-4)
IOT Practical (Part-4)
The term LCD stands for liquid crystal display. It is one kind of electronic display module used in
an extensive range of applications like various circuits & devices like mobile phones, calculators,
computers, TV sets, etc. These displays are mainly preferred for multi-segment light-emitting
diodes and seven segments. The main benefits of using this module are inexpensive; simply
programmable, animations, and there are no limitations for displaying custom characters,
special and even animations, etc. Pin diagram and description of each pin have explained in the
following table.
Pin No Pin Name Pin Description
Pin 1 VSS/GND This pin is a ground pin and the LCD is connected to the Ground.
(VSS: Voltage Source)
Pin 2 VDD/VCC The VCC pin is used to supply the power to the LCD. (VDD:
Voltage Drain; VCC: Voltage Collector)
Pin 3 V0/VEE This pin is used for adjusting the contrast of the LCD by
connecting the variable resistor in between the VCC & Ground.
(VEE: Voltage Emitter)
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. (0 = data mode, and 1 = command
mode).
Pin 5 RW 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. (0 = Write Operation, and 1 = Read Operation).
Pin 6 E/EN This is an enable signal pin if the positive pulses are passing
through a pin, then the pin function as a read/write pin.
Pin 7-14 D0 to D7 These Data pins of LCD are used to send data to the display.
Pin 15 A/LED+ This Anode pin is connected to VCC and it is used for the pin 16
to set up the glow of backlight of LCD. This pin is connected to
+5V
Pin 16 K/LED- This Cathode pin is connected to Ground and it is used for the
pin 15 to set up the glow of backlight of the LCD. This pin is
connected to GND.
Circuit:
Code:
#include<LiquidCrystal.h>
LiquidCrystal lcd(1,2,4,5,6,7);
void setup()
{
lcd.begin(16,2);
}
void loop()
{
lcd.print("Hello!");
delay(2000);
lcd.print("NIELIT");
delay(2000);
lcd.clear();
lcd.setCursor(8,2);
lcd.print("Hello!");
delay(2000);
}