Basic LCD Project (Arduino LCD 16x2 Display)

by md iqbal in Living > Education

21844 Views, 9 Favorites, 0 Comments

Basic LCD Project (Arduino LCD 16x2 Display)

FX796RZIYV9NQ3F.MEDIUM.jpg

LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.

Components Required

FBR01YWIYV9NQ6K.MEDIUM.jpg
download.jpg
FX796RZIYV9NQ3F.MEDIUM.jpg
FCVHS4HIYV9NQ58.MEDIUM.jpg
images.jpg

All we need are as follow:

  1. Arduino UNO
  2. 16 x 2 LCD module
  3. Potentiometer
  4. Pins Wires
  5. Breadboard

Connection

lcd_bb.png

To wire your LCD screen to your board, connect the following pins:

  1. LCD RS pin to digital pin 12
  2. LCD Enable pin to digital pin 11
  3. LCD D4 pin to digital pin 5
  4. LCD D5 pin to digital pin 4
  5. LCD D6 pin to digital pin 3
  6. LCD D7 pin to digital pin 2

Code

IMG_20171106_234431030.jpg
Hello World print on 16*2 LCD

#include

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;

LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {

lcd.begin(16, 2);

lcd.print("hello, world!");

}

void loop() {

lcd.setCursor(0, 1);

lcd.print(millis() / 1000);

}