LCD Interfacing With Arduino Board

LCD Interfacing With Arduino

LCD stands for Liquid Crystal Display. There are different types of displays (like TFT, OLED, Dot Matrix) available in the market for Arduino interfacing. The display we are going to interface with is a 16×2 display. This display has two rows and sixteen columns, Which means a maximum 32 characters can display at a time. Every character has 8×5 pixels.

Components Required:

  1. One Arduino UNO
  2. Computer with Arduino IDE
  3. USB to Arduino connecting Cable
  4. Jumper Wires
  5. 16×2 LCD Display
  6. 10k Potentiometer (To control Brightness)

16×2 LCD PINS:

16x2-Lcd-Pins-Diagram

 

LCD Pins With Function:

PIN NO NAME Function
1 VSS GND
2 VCC Supply Voltage For Logic
3 VEE Supply Voltage For LCD Contrast
4; RS Register Select
5 R/W Read Or Write Data
6 E Enable Chip
7 D0 Data Bit 0
8 D1 Data Bit 1
9 D2 Data Bit 2
10 D3 Data Bit 3
11 D4 Data Bit 4
12 D5 Data Bit 5
13 D6 Data Bit 66
14 D7 Data Bit 7
15 A(Led+) Anode For Led Back Light
16  K(Led-) Cathode For Led Back Light

 

Circuit Diagram:

lcd-interfacing-with-arduino

 

Steps To Follow::

  1. Establish the given circuit
  2. Open Arduino IDE.
  3. Click on File.
  4. Go to New. – A new File will open
  5. Remove the Pre-Written code..
  6. Paste the code given in the “CODE Section”
  7. Check whether your UNO has been detected by the ID by going to Tools.
  8. Click on Port – Select the COM-Port on which Arduino UNO is detected.
  9. Verify the Sketch by Clicking on the TICK icon.
  10. Once, the sketch is verified, Upload the sketch using the ARROW icon.

 

Code:

#include <LiquidCrystal.h>
// Initialize LCD with following connections
LiquidCrystal lcd(10, 9, 8, 7, 6, 5);
void setup() {
// Setup LCD Size : Columns, Rows
lcd.begin(16, 2);
// Display a message on the LCD.
lcd.print("hello, world!");
}
void loop() {
// Set position of the cursor to column 0, line 1
// Note : Counting starts from 0
lcd.setCursor(0, 1);
// Displays the number of seconds since reset
lcd.print(millis()/1000);
}

Leave a comment