How to – LCD Interfacing

Hello everyone, today we are going to learn how to use a liquid crystal display. I use a Hitachi HD44780 LCD, a 16×2 display (16 columns and 2 rows, 32 characters in total), that is cheap and easy to get.

The display has 16 pins: 2 for the power, 2 for the backlight, 1 for contrast adjustement, 3 control lines and 8 for writing data. However, in this post I am going to transfer data in 4bit: so I only use 4 of these last pins. Let’s analyze the pins in detail.

Pin functions

Below, a table with every pin’s name and function:

Pin number Symbol Function
 1  Vss  GND
 2  Vdd  +5V
 3  V0  Contrast adjustement
 4  RS  Register select signal
 5  R/W  Read/write signal
 6  E  Enable signal
 7  D0  Data bus line
 8  D1  Data bus line
 9  D2  Data bus line
10  D3  Data bus line
11  D4  Data bus line
12  D5  Data bus line
13  D6  Data bus line
14  D7  Data bus line
15  BL+  +5V for blacklight
16  BL-  GND for blacklight

Here a more accurated descriptions of certain pins:

  • Pin 3 (V0) is usually connected to a potentiometer, so that the user can apply a voltage variation (from 0 to +5V): in this way, he can adjust the LCD contrast.
  • Pin 4 (RS) is used to control in which lcd memory you want to write. You can select the data register, that hold data which will be printed on the screen, or the instructions register, that is where the LCD look for istructions on what to do.
  • Pin 7 to 14 (D0-D7) are control lines that send or receive data to or from LCD’s registers.

For further information, look up the datasheet.


Because of the number of used pins, there will be a lot of wires, but don’t worry, it’s quite simple. Here’s the scheme:

LCD scheme

This is a test sketch from the tutorial on Arduino official website. It uses LiquidCrystal library.

LCD - Hello world

Stay tuned!



Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:


Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )


Connessione a %s...