Vous êtes sur la page 1sur 15

Connecting an LCD to the Arduino: 3 Steps http://www.instructables.

com/id/Connecting-an-LCD-to-the-Arduino/

(/) Featured (/featured/) Write an InstructableLogin


(/about/create.jsp)
(/account/login/)

Classes (/classes/) Contests (/contest/) Forums (/community/?categoryGroup=all&category=all) Answers (/tag/type-question/?sort=


(http

Teachers (/teachers/) advertisement

1 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/
In this instructable well 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)

Lets get started!

Step 1: Connecting the Jumper Wires

About This Instructa

275,018 views
130 favorites

crocboy (
/crocboy/
Follow

(/member
Bio: I love to build stuff.
/crocboy/)

More by crocboy:

(https://cdn.instructables.com/F78/MLNB/G68GYB3B/F78MLNBG68GYB3B.MEDIUM.jpg)

(/id/Paracord- (/id/Using-
The first step we need to do is connect the pins to the LCD. For those
Ladder- WiiChuck-
interested, you can find the datasheet here (http://www.sparkfun.com/datasheets w-Wooden- Adapter-with-
/LCD/GDM1602K.pdf). Rungs/) Arduino/)

2 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

I got my LCD from sparkfun, and you can buy one here
(http://www.sparkfun.com/commerce/product_info.php?products_id=255). Related
As I mentioned before, you only need to connect 10 pins. Solder jumpers to
these wires: C Library for H
Display Contr
Library-for-HD
Display-Contr
Pin 1 - Ground (/id/C- by jpitz31 (
HD44780 LCD
Pin 2 - +5V board for the B
Pin 3 - Contrast Adjustment (/id/HD44780-L
adapter-board
Pin 4 - H/L Register Select
(/id/HD44780- Pirat/)
Pin 5 - H/L Read/Write How to Conne
Pin 6 - H/L Enable Crystal Displa
Arduino (/id/H
Pin 11 - DB4
Liquid-Crystal
Pin 12 - DB5 (/id/How-to- to-Arduin/)
Pin 13 - DB6 3-Wire HD4778
than 1 dollar
Pin 14 - DB7 HD47780-LCD
than-1-dollar/
As shown in the picture below: (/id/3-Wire- by ArthurTC
Hot water sola
controller with
Pin 1 to GND v1.2 (/id/Hot-w
collector-cont
Pin 2 to 5V
(/id/Hot- thermost-1/
Pin 3 to wiper
Pin 4 to Arduino pin 12
advertisement
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

3 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

(https://cdn.instructables.com/FZU/3702/G68GYB31/FZU3702G68GYB31.MEDIUM.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

4 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

(https://cdn.instructables.com/F6E/FACN/G68GYB6G/F6EFACNG68GYB6G.MEDIUM.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.

advertisement

Comments

5 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

We have a be nice comment policy.


Please be positive and constructive. I Made it! Add Images Post Comment

CIClubPhys (/member/CIClubPhys/) made it! 2017-04-15 Reply

Worked as instructed on my Pro Mini!

(https://cdn.instructables.com/F5G/HGU3/J1GP2FT7

/F5GHGU3J1GP2FT7.LARGE.jpg)

renicantik (/member/renicantik/) 2017-04-10 Reply

When I involve God in every dream, I'm sure there is nothing impossible.
Cara Mengobati Penyakit Kista Leher Tanpa Operasi
(http://www.ahlinyamiom.com/2017/04/10/cara-mengobati-penyakit-kista-leher-
tanpa-operasi/)

renicantik (/member/renicantik/) 2017-04-06 Reply

But here i miss you, and i hope you come back again
Obat asam urat kolesterol dan gula darah (http://www.obatherbalterlaris.com
/2017/04/06/cara-menyembuhkan-asam-urat-kolesterol-dan-gula-darah-secara-
alami/)

renicantik (/member/renicantik/) 2017-03-29 Reply

Good morning, spirit continues! do not give up, because God willing efforts will
not betray results ..
Obat Kista Hati (http://www.ahlinyamiom.com/2017/03/15/cara-menyembuhkan-
kista-hati-dengan-cepat-dan-mudah/)

rockerrock121 (/member/rockerrock121/)

6 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/
how do i copy the text??????? 2017-03-08 Reply

2016-12-29 Reply
Canters (/member/Canters/) made it!

Thanks for simple and clear explanation. Took me about 15mins. :)

(https://cdn.instructables.com/FB6/9AH2/IXAPS99K

/FB69AH2IXAPS99K.LARGE.jpg)

beatniksailor (/member/beatniksailor/) made it! 2016-09-26 Reply

I loved it. I made(MAKDED:) a few mods using a arduino NANO w/pinouts and
a small b-board, I soldered jumpers to lcd and left the pins long to plug into the
b-board. I hope to take advantage of unused pin & board space to add sensors
& some communication stuff!! THNX!!

(https://cdn.instructables.com/F03/DNUU/ITKIWSZQ

/F03DNUUITKIWSZQ.LARGE.jpg) (https://cdn.instructables.com

/FWZ/ERZF/ITKIWT0V/FWZERZFITKIWT0V.LARGE.jpg)

John JoshuaR1 (/member/John+JoshuaR1/) 2015-09-26 Reply

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

Georgeh3 (/member/Georgeh3/) John JoshuaR1 (/member/John+JoshuaR1/)

7 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/
If you know the value you need I suppose you could 2015-12-26 Reply

use a resistor.

KhubaibK1 (/member/KhubaibK1/) Georgeh3 (/member/Georgeh3/) Reply

2016-08-12
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

Dashing Rainbow Dash (/member/Dashing+Rainbow+Dash/) 2016-03-13 Reply

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

DyanD1 (/member/DyanD1/) 2015-11-24 Reply

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

SumithB (/member/SumithB/) 2015-09-17 Reply

no err. great

ShauryaS3 (/member/ShauryaS3/) 2015-07-04 Reply

how to change pins as pro mini has only 10 digital pins?


please reply soon project deadline tommorow

SelvaK3 (/member/SelvaK3/) 2015-05-14 Reply

I like your project and I will give 5 star

azhween (/member/azhween/) 2015-03-07 Reply

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

The.Deathspace (/member/The.Deathspace/) 2015-03-05 Reply

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)

8 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

rohanjoseph (/member/rohanjoseph/)
hello...i did what was instructed on my 16*2 LCD but after 2015-02-17 Reply

running the code all it shows is black boxes...plz help!!

Volthaus Electronics Laboratory (/member/Volthaus+Electronics+Laboratory/)


rohanjoseph (/member/rohanjoseph/) 2015-03-02 Reply

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.

pallaviv (/member/pallaviv/) 2015-02-20 Reply

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

ibenkos (/member/ibenkos/) 2014-10-26 Reply

Check my instructables out to uppgrade your work on a shield

borigam.tejaswini (/member/borigam.tejaswini/) 2014-10-12 Reply

please send me ...this total copy to my mail:borigamtejaswini79@gmail.com

Volthaus Electronics Laboratory (/member/Volthaus+Electronics+Laboratory/)

made it! 2014-08-28 Reply

I just finished soldering a 16 pin header on my new LCD screen and did a quick
search for an Instructable I could use to test my work and your project came up.
I grabbed my Arduino, jumpers, and a 10k pot and whipped it up. Thanks!

(https://cdn.instructables.com/F3H/F5HJ/HZDYJVJZ

/F3HF5HJHZDYJVJZ.LARGE.jpg)

drebollo (/member/drebollo/) 2014-08-07 Reply

9 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/
Check mine about 3.2" 320x240 TFT LCD screen ;)
https://www.instructables.com/id/LCDBPV2-32-TFT-Touch-Arduino-UNO-
FAST/#step0

Niveditanive (/member/Niveditanive/) 2014-03-13 Reply

can i get a code for displaying 12 images in a LCD TFT touchscreen ??????

jdoeson (/member/jdoeson/) 2013-05-28 Reply

Awesome instructable!

I was able to get everything running smoothly on my ATmega328 (Arduino Uno)


and a TM204A-1 LCD screen I got from Amazon. I thought I would be spending
days learning how to figure this out, but after soldering the DIP pins on the LCD
I was able to get this up in 30 minutes!

I made a slight adjustment by connecting pins 15 and 16 as "The nerdling"


mentioned, in order to get the backlight working. I connected pin 15 of the LCD
to pin 13 on my Arduino, and made sure to open the pin (13) via IDE
programming. Naturally, pin 16 went to the same ground as the rest.

I also used a mini breadboard for the LCD (the red one) to make things easier.

See the attached photo for my setup.

(https://cdn.instructables.com/FAO/66ZL/HH2VM4GN

/FAO66ZLHH2VM4GN.LARGE.jpg)

monsur (/member/monsur/) jdoeson (/member/jdoeson/) 2014-02-04 Reply

Hi, I have followed the following configuration and can see my message
on the screen, vaguley (http://www.hacktronics.com/Tutorials/arduino-
character-lcd-tutorial.html (http://www.hacktronics.com/Tutorials/arduino-
character-lcd-tutorial.html))
You have mentioned opening pin 13 on the IDE, how is this done?

monsur (/member/monsur/) 2014-02-04 Reply

I am using an arduino pro mini and have followed the following link to get the

10 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/
message to display on my 16*2 LCD. (http://www.hacktronics.com/Tutorials
/arduino-character-lcd-tutorial.html (http://www.hacktronics.com/Tutorials
/arduino-character-lcd-tutorial.html))

I have managed to upload it with no problem but cannot seem to clearly see the
writing that is visible, it is very dim and cannot understand why. The issue may
be related to my 10k potentiometer as it does not adjust when I turn it.

From the uploaded pic you can just make out ' Hello World' on the top and
'Hackatronics.com' on the bottom.
Any suggestions?

(https://cdn.instructables.com/FNG/EHRZ/HR3EOIOO

/FNGEHRZHR3EOIOO.LARGE.jpg)

dalbyman (/member/dalbyman/) 2014-01-23 Reply

Thankyou for posting this informative instructible.


Had everything working within 30 mins - Brilliant.
FYI - I found that connecting pin 15 on the LCD to the 3.3v pin on the Arduino
powered the back-light fine.

micaiah12 (/member/micaiah12/) 2013-11-05 Reply

Help all I am getting is white boxes on my 20x4 white on blue LCD.

I set it up exactly like the picture and instructions. I even added


pin 15 = Digital Pin 13
pin 16 = GND
to light up the backlight.
Why won't it work?

us241098 (/member/us241098/) 2013-06-17 Reply

Hi crocboy!!! I connected my lcd same way as in your instructables and it works.


now i am facing a problem i am newbie to arduino and want to use lcd as output
( actually i want to print different numbers when different tactical switches are
pressed ) please help me.
THANKS

11 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

crocboy (/member/crocboy/) us241098 (/member/us241098/) 2013-06-21 Reply

You'll have to do that all in your code. Read in from the digital inputs on
the Arduino and set the text in your display to reflect the state of the
switches.

axpence (/member/axpence/) 2013-06-10 Reply

note: when the user put %v, he means +5V

crocboy (/member/crocboy/) axpence (/member/axpence/) 2013-06-21 Reply

Thanks for catching that, I'll change it

irtiq7 (/member/irtiq7/) 2012-08-05 Reply

Hi there,

I tried everything but I am still getting those black boxes when I set my
potentiometer high.

waterlubber (/member/waterlubber/) irtiq7 (/member/irtiq7/) 2012-08-12 Reply

Just replace that pot with a simple wire to ground. Works for me!
(P.S. The boxes are GOOD, its supposed to happen)

coder512 (/member/coder512/) 2011-11-11 Reply

What do you mean by the wiper part , i didn't get that !!


Pin 3 to wiper ?????

Michael_Bell (/member/Michael_Bell/) coder512 (/member/coder512/) Reply

2012-04-30
the middle pin of your potentometer

Connect either end to +5v and ground, and wiper will be the middle pin

Jeff_ (/member/Jeff_/) 2011-12-04 Reply

followed the guide and i only get some weird signs on it but no hello world

12 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

crocboy (/member/crocboy/) Jeff_ (/member/Jeff_/)


recheck your pin connections, that's usually the main 2011-12-30 Reply

cause of this issue.

prateekk (/member/prateekk/) 2011-07-03 Reply

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 (/member/crocboy/) prateekk (/member/prateekk/) 2011-08-19 Reply

To upload code to the Arduino, use the Arduino IDE: http://arduino.cc


/en/Main/Software

andy70707 (/member/andy70707/) 2010-10-07 Reply

Thanks, great instructable, I just got my arduino today and this was my first
project!

The nerdling (/member/The+nerdling/) andy70707 (/member/andy70707/)


2011-05-03 Reply
ardino's are awesome your rate of fun projects will go
up by the hundreds

anselmi (/member/anselmi/) 2010-10-07 Reply

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 (/member/The+nerdling/) anselmi (/member/anselmi/) Reply

2011-05-03
have you connected the enable pin to 5v or gnd or pin 5?

The nerdling (/member/The+nerdling/) 2011-05-03 Reply

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

13 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

Newsletter About Us
Let your inbox help you discover our best Who We Are (/about/)
projects, classes, and contests. Instructables Advertise (/advertise/)
will help you learn how to make anything! Contact (/about/contact.jsp)
Jobs (/community/Positions-available-at-Instructables/
I'm in!
Help (/id/how-to-write-a-great-instructable/)
Find Us Resources
Facebook (http://www.facebook.com/instructables) For Teachers (/teachers/)
Youtube (http://www.youtube.com/user/instructablestv) Residency Program (/pier9residency)
Twitter (http://www.twitter.com/instructables) Gift Premium Account (/account/give?sourcea=footer)
Forums (/community/?categoryGroup=all&category=all)
Pinterest (http://www.pinterest.com/instructables)
Answers (/tag/type-question/?sort=RECENT)
Google+ (https://plus.google.com/+instructables)
Sitemap (/sitemap/)

14 of 15 10/5/2017, 1:33 AM
Connecting an LCD to the Arduino: 3 Steps http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/
Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |
Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (https://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2017 Autodesk, Inc.

15 of 15 10/5/2017, 1:33 AM