Liquid Crystal Display With Arduino Mega 2560

Introduction

 
In this article, I will explain about LCD display connection and we will see how to connect it with the Arduino Mega 2560.
 
Parts Of Lists:
  • Arduino Mega 2560
  • LCD Display
  • Bread Board
  • Potentiometer
  • Hookup Wires
LCD Display:
  • LCD display is a flat panel display.
  • It does not emit light directly.
  • It will display arbitrary images or fixed images with less information.
Connection:
 
Step 1:
Connection from LCD To Arduino Mega 2560,
 
 
Figure 1: LCD Display
  • Fix the LCD display from 16 to 02 in the BreadBoard.
  • The 16 from the LCD can be connected to the Gnd.
  • The 15 from the LCD can be connected to the Vcc.
  • The 14 from the LCD can be connected to the Digital pin 07.
  • The 13 from the LCD can be connected to the Digital pin 08.
  • The 12 from the LCD can be connected to the Digital pin 09.
  • The 11 from the LCD can be connected to the Digital pin 10.
  • The 01 from the LCD can be connected to the Gnd.
  • The 02 from the LCD can be connected to the Vcc.
  • The 03 from the LCD can be connected to the potentiometer of center pin.
  • The 04 from the LCD can be connected to the Digital pin 11.
  • The 05 from the LCD can be connected to the Gnd.
  • The 06 from the LCD can be connected to the Digital pin 12.
Step 2: Connection from Potentiometer to ArduinoMega2560,
 
 
Figure 2: Potentiometer
  • Take the first pin connected to Gnd of the ArduinoMega2560.
  • Take the second pin connected to 3 pin of the ArduinoMega2560.
  • Take the third pin connected to the Vcc of the ArduinoMega2560.
Programming:
  1. #include < LiquidCrystal.h > // Includes the library code    
  2. LiquidCrystal lcd(07, 08, 09, 10, 11, 12);    
  3. void setup()    
  4. {    
  5.     lcd.begin(16, 2);    
  6.     lcd.print("C# Corner");    
  7. }    
  8. void loop()    
  9. {    
  10.     lcd.print(millis() / 1000);    
  11. }  
Before uploading the program add the Liquid Crystal library
 
Explanation:
  • In this we can simply see the name or any content we type in the LCD.Printf statement.
  • The LCD should be kept as 16 to 2.
  • This is used in schools, buses, shopping malls, etc.
Read more articles on Arduino: