We will interface a 16x2(16 columns and 2 rows) LCD. Other variations are also available like 8x1,10x2 etc.
It is having a wide range of applications; they are also preferred over the 7-segment display as they are cheap, easily programmable and also have the leverage to display special characters.
Now let us interface
- 16x2 LCD 1No.
- Resistor 560ohms 1No.
- Potentiometer 10k 1No.
- Arduino UNO 1No.
- Few connecting wires
- Breadboard
Follow the image below for circuit connection reference.
After making the circuit dump the code given below.
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16, 2);
}
void loop()
{
lcd.setCursor(0,0);
lcd.print("WELCOME TO");
lcd.setCursor(2,1);
lcd.print("SUDOLEARN TECH");
}
The potentiometer can be used to control the contrast of your display.
You can use an LCD to display the output of your projects instead of showing them in the serial monitor, providing a display to the system will make your system independent and interactive.
You can also generate patterns of numbers as shown below
You can also generate patterns of numbers as shown below
- Data is transferred in 4 bits to the pins D4-D7.
- LCD has its own controller named Hitachi HD44780 LCD controller.
Thinking?
Join our hands-on training courses.
To know more visit us at http://www.karkhana.club
Comments