In this note, we are going to learn about LCD Interfacing with Arduino. Welcome to Poly Notes Hub, a leading destination for engineering notes for diploma and degree engineering students.
Author Name: Arun Paul.
What is LCD Module?
A flat-panel display technology called liquid crystal display (LCD) is frequently seen in electronics including televisions, computer monitors, smartphones, and more. It is composed of two glass or plastic substrates layered with a layer of liquid crystals. The liquid crystals alter their orientation in response to an electrical voltage, either permitting or obstructing light flow. The text and images you see on the screen are the result of careful light manipulation. LCD modules are a popular option for a variety of display applications because of its narrow profile, low power consumption, and adaptability.
Pin Description of 16×2 LCD Module
Here are the pin description of 16×2 LCD Module that is used in this circuit. Before using this display you have to know about each and every pin and their function of this display.
Pin No | Name | Function |
---|---|---|
1 | VSS | Ground |
2 | VCC | Power supply (+5V) |
3 | VEE | Contrast adjustment (via potentiometer) |
4 | RS | Register Select (0: Command, 1: Data) |
5 | RW | Read/Write (0: Write, 1: Read) |
6 | E | Enable (latches data) |
7 to 14 | D0 to D7 | Data lines |
15 | LED+ | Backlight positive terminal |
16 | LED- | Backlight negative terminal |
LCD Interfacing With Arduino
The Arduino microcontroller has completely changed the electronics industry in this digital age. The 16×2 character LCD display is one of the most interesting and useful LCD displays that can be interfaced with Arduino. This post will give a thorough explanation of how to utilize Arduino with a 16×2 LCD display.
Components Required for LCD Interfacing with Arduino
We will use these components which are listed below –
- Arduino
- LCD Module 16*2
- Jumper Wires
- One 100K POT
- One 9V Battery
- One Breadboard
- One 220 ohm Resistor
Circuit Wiring of LCD Interfacing with Arduino
Here is the circuit connection of LCD Interfacing with Arduino UNO or with any Arduino Module –
- RS to Arduino Pin 12
- E to Arduino Pin 11
- D4 to Arduino Pin 5
- D5 to Arduino Pin 4
- D6 to Arduino Pin 3
- D7 to Arduino Pin 2
- VSS to Ground
- VDD to +5V
- VO to Middle pin of potentiometer
- RW to Ground
- LED+ to 5V (via 220Ω resistor)
- LED- to Ground
Circuit diagram of LCD Interfacing with Arduino
Below shows the hardware connection and circuit connection of LCD Interfacing with Arduino –
Code for LCD Interfacing with Arduino
#include <LiquidCrystal.h>
int seconds = 0;
LiquidCrystal lcd_1(12, 11, 5, 4, 3, 2);
void setup()
{
lcd_1.begin(16, 2); // Set up the number of columns and rows on the LCD.
}
void loop()
{
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting
// begins with 0):
lcd_1.setCursor(0, 0);
// Print a message to the LCD.
lcd_1.print("hello world!");
}