LCD Display

Interfacing LCD Display with Arduino Uno

LCD stands for Liquid Crystal Display. LCDs are available in many different sizes:

  • 16 x 2 (1602)
  • 16 x 4 (1604)
  • 20 x 4 (2004) and others

but they all use the same HD44780 parallel interface LCD controller chip from Hitachi. This means you can easily swap them. You will only need to change the size specifications in your Arduino code.

16 x 2 means 16 Columns and 2 Rows. We can show a maximum of 16 characters in one line at a time.

More details: OLED Display | 20*4 LCD Display | 7 Segment

Components

Arduino Unox 1
16 x 2 LCDx 1
Bread Boardx 1
Jumper Wirex 20
10k Potentiometerx 1
Screw Driverx 1

Steps:

  1. Connect the LCD Display pins as shown in the image. Refer to the pin connection chart for proper configuration. We will be using the LCD in 4-bit mode.
  2. Make sure VCC and GND not short.
  3. The library for LCD is pre-installed int Arduino IDE but we will have to call it while using.
  4. You can control the brightness of the LCD with the help of the Potentiometer attached. Rotate it with the help of a screwdriver to set the brightness.
  5. Upload the code mentioned for Arduino UNO.

Circuit:

Pin Connections:

Pin 1VssGND
Pin 2VDD+5V
Pin 3VoPot Center Pin
Pin 4RSGPIO 12
Pin 5RWGND
Pin 6 EGPIO 11
Pin 7D0
Pin 8D1
Pin 9D2
Pin 10D3
Pin 11D45
Pin 12D54
Pin 13D63
Pin 14D72
Pin 15A+5V
Pin 16KGND

Code:

/*the code is written for Arduino UNO, but can run on any
Arduino Board with required modification */

#include<LiquidCrystal.h>          
//defining library

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 
//RS, EN, D4, D5, D6, D7
		
void setup() {
  
  lcd.begin(16, 2);                   
  //defing the columns and rows of lcd
  
  lcd.setCursor(0, 0);                
  //defining the position of the cursor in lcd
  
  lcd.print("HELLO WORLD");           
  //the text inside “ “ must be in the limits of 16 characters as the  capacity of screen is 16 characters.

}
		
void loop() {
  
  lcd.setCursor(1, 0);                
  //defining the position of the cursor in lcd
  
  lcd.print("PLATFORUMA");           
  //the text inside “ “ must be in the limits of 16 
  //characters as the  capacity of screen is 16 characters.

}

Helpful Resources:

OLED Display | 20*4 LCD Display | 7 Segment

Related Projects:

LCD & SR-04 Interfacing | Scrolling LCD | Special Character on LCD

Follow us on:

Source: Platforuma

Leave a Comment

Your email address will not be published. Required fields are marked *

EXTRA ₹999 OFF on Lock-Down Live Learning!

Join Now!
X myStickymenu