Connecting an LCD to the Arduino

 by crocboy
IMG_1955.JPG
In this instructable we’ll be looking at how to connect a parallel LCD to an Arduino. The LCD that I am using uses the common HD44780 interface.  Many LCDs have this, you can usually tell by the 16-pin interface. You only need to solder 10 of the 16 wires to use the LCD, but this will only enable you to use the 4-bit interface.
 
Materials:
 
Arduino (with USB cable)
 
HD44780-compatible LCD screen
 
10 Jumper wires

1 10k Potentiometer
 
Tools:
 
Soldering Iron
 
Helping Hands (optional)
 
Let’s get started!

Step 1: Connecting the Jumper Wires

Arduino Setup.bmp

     The first step we need to do is connect the pins to the LCD.  For those interested, you can find the datasheet here.
    
     I got my LCD from sparkfun, and you can buy one here.
As I mentioned before, you only need to connect 10 pins.  Solder jumpers to these wires:


Pin 1 - Ground
Pin 2 - +5V
Pin 3 - Contrast Adjustment
Pin 4 - H/L Register Select
Pin 5 - H/L Read/Write
Pin 6 - H/L Enable
Pin 11 - DB4
Pin 12 - DB5
Pin 13 - DB6
Pin 14 - DB7

As shown in the picture below:

Pin 1 to GND
Pin 2 to 5V
Pin 3 to wiper
Pin 4 to Arduino pin 12
Pin 5 to GND
Pin 6 to Arduino pin 11
Pin 11 to Arduino pin 5 
Pin 12 to pin 4
Pin 13 to pin 3
Pin 14 to pin 2

Because we will only be writing, pin 5 will be dropped to ground to show that there will be no reading.  For those who wish to use the backlight, connect LCD pin 16 to GND and LCD pin 15 to +4.2V. 

Connect one side of the pot to GND, the opposite to %v, and the center to LCD pin 3.  Now you're in business.

 

Step 2: Opening the IDE

IDE.JPG
Now, you need to open up the Arduino IDE. (For those who are lost click on the icon!)  Then click File -> Examples -> LiquidCrystal -> HelloWorld.  Open the sketch and dowload it to the Arduino board.

     You can change the text if you want.

Step 3: Mission Complete

IMG_1951.JPG
Your done!  You can substitute text for variables, or even analogRead().  In this way you can read in sensor values and such.

Thanks for reading my instructable!   Please Comment and Rate.
irtiq7 says: Aug 5, 2012. 10:40 AM
Hi there,

I tried everything but I am still getting those black boxes when I set my potentiometer high.
waterlubber in reply to irtiq7Aug 12, 2012. 8:00 AM
Just replace that pot with a simple wire to ground. Works for me!
(P.S. The boxes are GOOD, its supposed to happen)
coder512 says: Nov 11, 2011. 5:30 AM
What do you mean by the wiper part , i didn't get that !!
Pin 3 to wiper ?????
Michael_Bell in reply to coder512Apr 30, 2012. 5:31 PM
the middle pin of your potentometer

Connect either end to +5v and ground, and wiper will be the middle pin
Jeff_ says: Dec 4, 2011. 1:19 PM
followed the guide and i only get some weird signs on it but no hello world
crocboy (author) in reply to Jeff_Dec 30, 2011. 10:11 AM
recheck your pin connections, that's usually the main cause of this issue.
prateekk says: Jul 3, 2011. 10:47 AM
hi ! can u plz tell me the link to the software with the help of which i can boot a programe/code into my arduino...??
like i hav avr for atmel micro controllers.
plz help!!
crocboy (author) in reply to prateekkAug 19, 2011. 9:28 AM
To upload code to the Arduino, use the Arduino IDE: http://arduino.cc/en/Main/Software
andy70707 says: Oct 7, 2010. 8:02 AM
Thanks, great instructable, I just got my arduino today and this was my first project!
The nerdling in reply to andy70707May 3, 2011. 7:11 PM
ardino's are awesome your rate of fun projects will go up by the hundreds
anselmi says: Oct 7, 2010. 7:17 PM
i wired mine just like this and the lcd wont light up or show any thing
if any one could help me i would really appreciate it
The nerdling in reply to anselmiMay 3, 2011. 7:08 PM
have you connected the enable pin to 5v or gnd or pin 5?
The nerdling says: May 3, 2011. 7:07 PM
everyone pin 15 and 16 are the backlight pins.
i connected them into 5v with a 140Ω resistor
if your wondering how i got the ohm sighn i used character map in windows
heleniovix says: Apr 6, 2011. 10:49 AM
i will try in proto-board.
Robot Lover says: Sep 27, 2010. 4:47 PM
I set it up right but all i get are boxes. What should i do?
crocboy (author) in reply to Robot LoverNov 19, 2010. 6:56 PM
For the people getting black boxes, you may want to try adjusting the contrast potentiometer.
Derin says: May 15, 2010. 4:27 AM
Help! I did all you said but I only get black boxes on the LCD. What should I do?
frollard says: Mar 9, 2010. 4:41 AM
May I recommend hooking the backlight led to a pwm pin via a resistor, or with a protection resistor via a transistor (if the backlight pulls too much current for the atmega pin to handle).  Variable brightness ftw!

Good writeup!
crocboy (author) in reply to frollardMar 9, 2010. 5:39 AM
Thanks for the tip!  I'll have to try that out.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!