16×2 Liquid Crystal Display with Arduino

LCD is known as Liquid Crystal Display. It uses liquid crystals to produce a visible image. 
When current is applied to special kind of crystal, it turns opaque, blocking the backlight that lives behind the screen. Then that particular area will become dark compared to others making the characters visible on the screen



Pinout Configuration

  • Connect GND to the ground of the Arduino
  • Connect Vcc to 5v on Arduino UNO.
  • Vo controls the contrast and brightness of the LCD.
  • RS (Register Select) tells the LCD if Arduino is sending commands or the data.
  • R/W pin (Read/Write) controls the reading and writing of data on the LCD.
  • En (Enable pin) enable the display.
  • D0-D7 (Data Bus) carries the 8 bit data sent to the LCD display.
  • A-K (Anode & Cathode) pin control the backlight.


How to Install Library for LCD?

Before uploading the code install the library for Liquid Crystal Display. Open Arduino IDE, go to tools, click on manage library. The library manager will pop up. Search for Liquid Crystal library and install it. The figure below may help you. 

Once the Library is installed upload the code to Arduino UNO.


					// include the library code:
#include <LiquidCrystal.h>

// Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() 
	// set up the LCD's number of columns and rows:
	lcd.begin(16, 2);

	// Clears the LCD screen

void loop() 
	// Print a message to the LCD.
	lcd.print(" Hello world!");

	// set the cursor to column 0, line 1
	// (note: line 1 is the second row, since counting begins with 0):
	lcd.setCursor(0, 1);
	// Print a message to the LCD.
	lcd.print(" LCD Tutorial");
Leave a Reply

Your email address will not be published.