Connecting an LCD to the Arduino

304,135

131

51

Introduction: Connecting an LCD to the Arduino

About: I love to build stuff.
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

     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 +5v, and the center to LCD pin 3.  Now you're in business.

Step 2: Opening the IDE

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

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.

5 People Made This Project!

Recommendations

  • Plywood Challenge

    Plywood Challenge
  • Plastic Contest

    Plastic Contest
  • Battery Powered Contest

    Battery Powered Contest

51 Discussions

0
Vaibhav47
Vaibhav47

1 year ago

Please may I know why we are using potentiometer here? Can we replace it with resistor? If yes- how much ohms should be preferable??

0
urvashij
urvashij

Question 1 year ago

I am using fingerprint module r307 and LCD together. In that, I am using 2,3 digital pins of arduino for data transfer to the fingerprint.(I tried other pin configurations for this but it didn't work) But as I am connecting LCD, it also requires same 2,3 digital pins of arduino and it is not possible for me to use 2 and 3 pins of Arduino for both lcd and fingerprint sensor for data transfer. Can you please suggest an alternative to this. Can we use analog pins of arduino as digital ones and if so the how?? PLEASE HELP... Thank you!!

0
shawnalfaro
shawnalfaro

2 years ago

ok so i have an Epson EA-D20025AR LCD module i want to have as a display with my arduino based project. I am attempting to reuse it from a machine i got for free, but it has 14 pins instead of 16. is it still useable with an arduino?

0
Djandco
Djandco

2 years ago

St last! someone who takes the time to give a value for the potentiometer, 10k!
Thank you :-)

0
Djandco
Djandco

Reply 2 years ago

"At" last even!

0
rockerrock121
rockerrock121

3 years ago

how do i copy the text???????

0
John JoshuaR1

is it possible to hookup the arduino and LCD without using potentiometer??

0
Georgeh3
Georgeh3

Reply 4 years ago

If you know the value you need I suppose you could use a resistor.

0
KhubaibK1
KhubaibK1

Reply 4 years ago

yes u can by using LCD module by ardinu which is easy to use .you just attach those pins with ardino that have to be use in your program and ither advantage is that that module is fixed on ardinu completely

0
Dashing Rainbow Dash

Can I change what pins to connect the LCD to? I need pin 2 for an interrupt.

0
DyanD1
DyanD1

5 years ago

Do you know how to connect an arduino mega 2560 R3 to 4x20 LCD??

0
ShauryaS3
ShauryaS3

5 years ago on Introduction

how to change pins as pro mini has only 10 digital pins?
please reply soon project deadline tommorow

0
SelvaK3
SelvaK3

5 years ago

I like your project and I will give 5 star

0
azhween
azhween

5 years ago on Introduction

i need a program for interfacing lcd wit arduino atmega 328 with y=mx+c logic . please help me out

Sir I want to know if you can change the pin initialization of the LCD and what other pins can i used to initialize it ( I'm using pin 2 as an interrupt thats why I need to reinitialize it to other pins)

0
rohanjoseph
rohanjoseph

5 years ago on Introduction

hello...i did what was instructed on my 16*2 LCD but after running the code all it shows is black boxes...plz help!!

0
Volthaus Electronics Laboratory
Volthaus Electronics Laboratory

Reply 5 years ago on Introduction

Are you using the 10k Potentiometer? That is what you need to adjust the contrast so you will be able to see the text. Check connections if you are using it.

0
pallaviv
pallaviv

5 years ago on Introduction

ii this is pallavi valunj i want to write code to display the robot moving left and right on display pl help me in this

0
ibenkos
ibenkos

6 years ago

Check my instructables out to uppgrade your work on a shield