Basic LCD Project (Arduino LCD 16x2 Display)

Published

Introduction: Basic LCD Project (Arduino LCD 16x2 Display)

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.

Step 1: Components Required

All we need are as follow:

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

Step 2: Connection

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

Step 3: Code

#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);

}

Share

    Recommendations

    • Oil Contest

      Oil Contest
    • Casting Contest

      Casting Contest
    • Stick It! Contest

      Stick It! Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    2 Comments

    Thanks for sharing :)

    any queries plz ask