COMPONENTS-
Arduino or Genuino Board X 1
LCD Screen (compatible with Hitachi HD44780 driver) X 1
pin headers to solder to the LCD display pins X1
10k ohm potentiometer X 1
LCD-
A register select (RS) pin that controls where in the LCD's memory you're writing data to. You can select either the data register, which holds what goes on the screen, or an instruction register, which is where the LCD's controller looks for instructions on what to do next. A Read/Write (R/W) pin that selects reading mode or writing mode An Enable pin that enables writing to the registers 8 data pins (D0 -D7). The states of these pins (high or low) are the bits that you're writing to a register when you write, or the values you're reading when you read. There's also a display contrast pin (Vo), power supply pins (+5V and Gnd) and LED Backlight (Bklt+ and BKlt-) pins that you can use to power the LCD, control the display contrast, and turn on and off the LED backlight, respectively.
CONNECTION-
Before wiring the LCD screen to your Arduino or Genuino board we suggest to solder a pin header strip to the 14 (or 16) pin count connector of the LCD screen, as you can see in the image above. To wire your LCD screen to your board, connect the following pins:
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2
Additionally, wire a 10k pot to +5V and GND, with it's wiper (output) to LCD screens VO pin (pin3). A 220 ohm resistor is used to power the backlight of the display, usually on pin 15 and 16 of the LCD connector
CODE-
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup()
{
// set up the LCD's number of columns and rows:
lcd.begin(16, 2); // Print a message to the LCD.
lcd.print("hello, world!");
}
void loop()
{
line 1 // (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1); // print the number of seconds since reset:
lcd.print(millis() / 1000);
}
*if there is any problem while making this project please comment
LiquidCrystal lcd(rs, en, d4, d5, d6, d7) -- Not understand properly why we use the only rs,en,d4,d5,d6.d7 pins in the programming