Components required:-
1.Arduino Uno:-
2.16x2 LCD display:-
16x2 LCD display
The name "16x2 LCD display" came from this fact that is has 16 columns and 2 rows , that means we can display 32 characters on this LCD display screen. Characters could be either alphabets, numbers or custom made characters. Each column is made from 5 x 8 matrix of pixels which means 40 pixels per column .
Features:-
- Operating voltage is 4.7V to 5.3V
- Current consumption is 1mA without backlight
- Alphanumeric LCD display module, meaning can display alphabets and numbers
- Can work on both 8-bit and 4-bit mode
- Available in Green and Blue Backlight
LCD DISPLAY INTERFACING WITH ARDUINO
VSS and LED- pin of LCD are combined together and are grounded.
VCC and LED+ pin of LCD are combined together and is connected to 5v pin of Arduino.
Then connect a potentiometer to VEE to adjust the contrast of LCD by varying the knob of potentiometer.
Then connect RS pin of LCD to 6th pin of Arduino and R/W pin of LCD to 7th pin of Arduino.
Then connect E pin of LCD to 8th pin of Arduino.
Then connect DB4 pin of LCD to 9th pin of Arduino, DB5 pin to 10th pin , DB6 pin to 11th pin and DB7 to 12th pin of Arduino.
ARDUNIO CODE
____________________
int scrollLeft=0,scrollRight=0,firstLine=6,secondLine=10;
#include <LiquidCrystal.h>
LiquidCrystal lcd(6,7,8,9,10,11,12);
void setup()
{
lcd.begin(16,2);
}
void loop()
{
for(scrollRight=0;scrollRight<=firstLine;scrollRight++)
{
lcd.clear();
lcd.setCursor(scrollRight,0);
lcd.print("Dharmanshu");
scrollLeft=secondLine-scrollRight;
lcd.setCursor(scrollLeft,1);
lcd.print("Sharma");
delay(1000);
}
for(scrollLeft=firstLine;scrollLeft>=0;scrollLeft--)
{
lcd.clear();
lcd.setCursor(scrollLeft,0);
lcd.print("Dharmanshu");
scrollRight=secondLine-scrollLeft;
lcd.setCursor(scrollRight,1);
lcd.print("Sharma");
delay(1000);
}
}
Comments
Post a Comment