Liquid Crystal Display (LCD) HD 44780

Hitachi HD 44780 LCD controller is one of the most common used character LCD. It is available in variety of size such as 8×2, 16×2 or 20×4. This kind of LCD controller is easy to interface and there are also many libraries made for this controller.

Front view of 16×2 LCD
Back view of 16×2 LCD

So, lets start looking at the hardware of LCD. Some of the LCD comes with 14 pins while some are 16 pins. The extra two pins are used for backlight supply. There are 3 pins used as control pin namely register select (RS), read/write (RW) and enable (E). Besides that, there are 8 pins used as data line. Summary of the pins are as below:

Pin description for HD 44780 controller

Note that there are 8 data pins available. So there are 2 kinds of interfacing available which is 8 bit interfacing and 4 bit interfacing. In 4 bit interfacing, the lower four bit (D0 – D4) are not in used.

Circuit diagram of LCD and Arduino Uno

Below is the how I set up the LCD with the Arduino that I had on breadboard.


Example of code interfacing with LCD

#include <LiquidCrystal.h>
LiquidCrystal lcd(5,6,7,8,9,10);
void setup()

void loop()
 lcd.print("Liquid Crystal");
 lcd.print("For more ");
 lcd.print("details, visit");

Explanation of code:

At the beginning, you need to add the line #include <LiquidCrystal.h> to use the library for LCD.

 LiquidCrystal lcd(RS, Enable, D4, D5, D6, D7)

This is used to initialize the library with respective pins. In my case, I am using pin 5 to pin 10 for respective pins. So it would be LiquidCrystal lcd(5,6,7,8,9,10).

lcd.begin(column, row)

– This is used to initialize the lcd that you are using. In my case, I’m using a 16×2 LCD, so include it in the void setup() as lcd.begin(16,2).

– Without setting up this lcd.begin(), your lcd will only display on the first line.

lcd.setCursor(column, row)

– This is used to set the cursor at where you want to begin displaying your character.


– This is used to type in what you want to display on the display, it can be a variable or a string of characters. For the case of variable, you can straight away type lcd.print(your variable here). However, if you want to display a string of characters, you need to include “Your text here”, example lcd.print(“Hello, world!”)


– This is used to clear all the display on the lcd

Last but not least, a video demo of using LCD. 🙂

Enjoy 😀

5 thoughts on “Liquid Crystal Display (LCD) HD 44780

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s