Arduino interfacing with 16×2 LCD

16×2 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.

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

How to use RW:

RW pin is Read/Write.

where, RW=0 means Write Data on LCD

RW=1 means Read Data from LCD

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.

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


Following is the Sequence to Follow.

Higher Nibble

Enable Pulse,

Proper RS value, Based on COMMAND/DATA

Lower Nibble

Enable Pulse,

Proper RS value, Based on COMMAND/DATA

Connection Diagram

Leave a Reply

Your email address will not be published. Required fields are marked *