Introduction: Arduino for Beginners: Arduino Interface With 16x2 LCD Explained

Hello Everyone,

Nowadays, Arduino has became very popular and everyone accepting it as well because of easy-ness of coding.

I have created the series of Arduino Basics which help the beginners, newbie and even developers to get the module work. This series has covered the basic of modules, interface used between module and Arduino and coding.

Lets begin..

Step 1: Pinout of 16x2 LCD

16x2 LCD is 16 character and 2 row lcd which has 16 pins of connection. This LCD requires data or text in ASCII format to display.
First row Starts with 0x80 and 2nd row starts with 0xC0 address.

LCD can work in 4-bit or 8-bit mode.
In 4 bit mode, Data/Command is Sent in Nibble Format First Higher nibble and then lower Nibble

For Example, to send 0x45 First 4 will be sent Then 5 will be sent.

Step 2: Connection of 16x2 LCD Interface With Arduino

Step 3: Pin Control and Flow

There are 3 controlling pins that is RS, RW, E.

How to Use RS:
When Command is sent, then
RS = 0 When Data is sent, then RS = 1

RW pin is Read/Write.

where, RW=0 means Write Data on LCD

RW=1 means Read Data from LCD

How to use RW:

When we are writing to LCD command/Data, we are setting pin as LOW.

When we are reading from LCD, we are setting pin as HIGH.

In our case, we have hardwired it to LOW level, because we will be writing to LCD always.

How to use E (Enable):

When we send data to LCD, we are giving pulse to lcd with the help of E pin.


Step 4: High Level Flow

This is high level flow we have to follow while sending COMMAND/DATA to LCD.

Higher Nibble
Enable Pulse,

Proper RS value, Based on COMMAND/DATA

Lower Nibble

Enable Pulse,

Proper RS value, Based on COMMAND/DATA

Step 5: Tutorial