0% found this document useful (0 votes)
27 views

Connecting An LCD To The Arduino

Uploaded by

Euber Chaia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Connecting An LCD To The Arduino

Uploaded by

Euber Chaia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Explore (/tag/type­id/) Create (/about/submit.

jsp) Contests
Login
let's (/contest/) | Sign
(/account/login)
make Community (/community/)
Up (/account/gopro?sourcea=header)

(/)
share what you make >
(/)
(/editInstructable/)

About This Instructable

License:
88,700 views
73 favorites

crocboy
(/member/crocboy/)
Follow 7

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

More by crocboy

(/id/Using­WiiChuck­Adapter­
with­Arduino)

(http://cdn.instructables.com/FWL/VJOV/G68GYB78/FWLVJOVG68GYB78.LARGE.jpg) (/id/Paracord­Ladder­w­
Wooden­Rungs)

Tags:
In this instructable we’ll be looking at how to connect a parallel LCD to an lcd (/tag/type­id/category­technology/keyword­lcd/)
Arduino. The LCD that I am using uses the common HD44780 interface. Many arduino (/tag/type­id/category­technology/keyword­
LCDs have this, you can usually tell by the 16­pin interface. You only need to arduino/)
solder 10 of the 16 wires to use the LCD, but this will only enable you to use the
connect (/tag/type­id/category­
4­bit interface.
technology/keyword­connect/)

hd44780 (/tag/type­id/category­
Materials:
technology/keyword­hd44780/)

Arduino (with USB cable) instructable (/tag/type­id/category­


technology/keyword­instructable/)

HD44780­compatible LCD screen screen (/tag/type­id/category­technology/keyword­


screen/)

10 Jumper wires

1 10k Potentiometer Related

Tools: HD44780 LCD to I2C


adapter board for the Bus
Soldering Iron Pirate (/id/HD44780­LCD­
to­I2C­adapter­board­for­
the­Bus­Pirat/)
Helping Hands (optional) 3­Wire HD47780 LCD for
less than 1 dollar (/id/3­
Let’s get started! Wire­HD47780­LCD­for­
less­than­1­dollar/)
by ArthurTC
Hot water solar collector
controller with thermostat
v1.2 (/id/Hot­water­solar­
collector­controller­with­
Step 1: Connecting the Jumper Wires thermost­1/)
Step­By­Step LCD wiring
(4 Bit Mode) and
Programming examples for
Custom Large Font For
16x2 LCDs (/id/Custom­
Large­Font­For­16x2­
LCDs/)
by mpilchfamily
See More (/tag/type­id/?q=)

(http://cdn.instructables.com/F78/MLNB/G68GYB3B/F78MLNBG68GYB3B.LARGE.jpg)

The first step we need to do is connect the pins to the LCD. For those
interested, you can find the datasheet here
(http://www.sparkfun.com/datasheets/LCD/GDM1602K.pdf).

I got my LCD from sparkfun, and you can buy one here
(http://www.sparkfun.com/commerce/product_info.php?products_id=255).
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

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

« Previous Next » (/id/Connecting­an­LCD­to­the­Arduino/step3/Mission­Complete/)

Connecting an LCD
View Allto the
Steps Arduino by crocboy (/member/crocboy/)
(/id/Connecting­an­LCD­to­the­Arduino/?ALLSTEPS)

Download (/id/Connecting­an­LCD­to­the­Arduino/?download=pdf)

(/id/Connecting­an­LCD­to­the­Arduino/?ALLSTEPS) 3 Steps (/id/Connecting­an­LCD­to­the­Arduino/step3/Mission­Complete/)

+ Collection I Made it! Favorite

Make Comment

drebollo (/member/drebollo/) 3 days ago Reply (C60W128HYJ0U7SV)

Check mine about 3.2" 320x240 TFT LCD screen ;)


http://www.instructables.com/id/LCDBPV2­32­TFT­Touch­Arduino­UNO­
(/member/drebollo/)
FAST/#step0

Niveditanive (/member/Niveditanive/) 5 months ago Reply (CSXAFMRHSPP5C6J)

can i get a code for displaying 12 images in a LCD TFT touchscreen ??????
(/member/Niveditanive/)

jdoeson (/member/jdoeson/)
1 year ago Reply (CMEW5UEHH2VJV2K)
Awesome instructable!
(/member/jdoeson/)
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.

(http://cdn.instructables.com/FAO/66ZL/HH2VM4GN/FAO66ZLHH2VM4GN.LARGE.jpg)

monsur (/member/monsur/) jdoeson 6 months ago Reply (CTHNTDWHR3EOIYQ)

Hi, I have followed the following configuration and can see my message on
the screen, vaguley
(/member/monsur/) (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/) 6 months ago Reply (CCLYWQQHR3EOIUC)

I am using an arduino pro mini and have followed the following link to get the
message
(/member/monsur/) 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?

(http://cdn.instructables.com/FNG/EHRZ/HR3EOIOO/FNGEHRZHR3EOIOO.LARGE.jpg)

dalbyman (/member/dalbyman/) 6 months ago Reply (CXDFCX9HQRO1W4T)

Thankyou for posting this informative instructible.


(/member/dalbyman/)
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/) 9 months ago Reply (CMRQ0GXHNM4BKVK)

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


(/member/micaiah12/)
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?

discopig (/member/discopig/) 11 months ago Reply (C0TBXXYHKM961EN)

This workedgreat for me, thanks.


(/member/discopig/)

us241098 (/member/us241098/) 1 year ago Reply (CCVCK9IHHS9LYPU)

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


now i am
(/member/us241098/) 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

crocboy (/member/crocboy/) (author) us241098


1 year ago Reply (CIYWK12HI3TRWEW)
You'll have to do that all in your
code. Read
(/member/crocboy/) 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/) 1 year ago Reply (C5UGHA3HHS9KBO7)

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


(/member/axpence/)

crocboy (/member/crocboy/) (author) axpence


1 year ago Reply (C31TI73HI3TRWE2)
Thanks for catching that, I'll
change it
(/member/crocboy/)

irtiq7 (/member/irtiq7/) 2 years ago Reply (C86WFP3H5ENQ70U)

Hi there,
(/member/irtiq7/)
I tried everything but I am still getting those black boxes when I set my
potentiometer high.

waterlubber (/member/waterlubber/) irtiq7


2 years ago Reply (CR76C16H5JVY4SM)
Just replace that pot with a
simple wire to ground. Works for
(/member/waterlubber/)
me!
(P.S. The boxes are GOOD, its
supposed to happen)

coder512 (/member/coder512/) 2 years ago Reply (COLIT09GUKARWZQ)

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


Pin 3 to wiper
(/member/coder512/) ?????

Michael_Bell (/member/Michael_Bell/) coder512


2 years ago Reply (CEJFMSDH1JUGYDR)
the middle pin of your
potentometer
(/member/Michael_Bell/)
Connect either end to +5v and
ground, and wiper will be the
middle pin

Jeff_ (/member/Jeff_/) 2 years ago Reply (C0PJMJVGVOX0QMI)

followed the guide and i only get some weird signs on it but no hello world
(/member/Jeff_/)

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


2 years ago Reply (CCKBP0JGWT2MIU3)
recheck your pin connections,
that's usually the main cause of
(/member/crocboy/)
this issue.

prateekk (/member/prateekk/) 3 years ago Reply (CV40AGXGPBDHFGM)

hi ! can u plz tell me the link to the software with the help of which i can boot a
programe/code
(/member/prateekk/) into my arduino...??
like i hav avr for atmel micro controllers.
plz help!!

crocboy (/member/crocboy/) (author) prateekk


2 years ago Reply (CAZ1D0NGRFNCZW9)
To upload code to the Arduino,
use
(/member/crocboy/) the Arduino IDE:
http://arduino.cc/en/Main/Software

andy70707 (/member/andy70707/) 3 years ago Reply (CAFCU72GEY8AJID)

Thanks, great instructable, I just got my arduino today and this was my first
project!
(/member/andy70707/)

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


3 years ago Reply (CFNDLN4GN77W5YM)
ardino's are awesome your rate
of fun projects
(/member/The+nerdling/) will go up by the
hundreds

anselmi (/member/anselmi/) 3 years ago Reply (CVT46LGGF06ZMFY)

i wired mine just like this and the lcd wont light up or show any thing
if any one
(/member/anselmi/) could help me i would really appreciate it

The nerdling (/member/The+nerdling/) anselmi


3 years ago Reply (CLZM16GGN77W5WQ)
have you connected the enable
pin to 5v
(/member/The+nerdling/) or gnd or pin 5?

The nerdling (/member/The+nerdling/) 3 years ago Reply (C8D0JBMGN77W5W2)

everyone pin 15 and 16 are the backlight pins.


i connected
(/member/The+nerdling/) them into 5v with a 140Ω resistor
if your wondering how i got the ohm sighn i used character map in windows

heleniovix (/member/heleniovix/) 3 years ago Reply (CDMQCPWGM4N10HZ)

i will try in proto­board.


(/member/heleniovix/)

Robot Lover (/member/Robot+Lover/)

I set it up right but all i get are boxes. What should i do?
3 years ago Reply (CLFMO01GELSBW4S)

(/member/Robot+Lover/)

crocboy (/member/crocboy/) (author) Robot Lover


3 years ago Reply (CRD3G27GGPF3835)
For the people getting black
boxes, you
(/member/crocboy/) may want to try
adjusting the contrast
potentiometer.

Derin (/member/Derin/) 4 years ago Reply (CCZ5IE0G962DM6F)

Help! I did all you said but I only get black boxes on the LCD. What should I
(/member/Derin/)do?

frollard (/member/frollard/) 4 years ago Reply (C56BM17G68HEFL8)

May I recommend hooking the backlight led to a pwm pin via a resistor, or with
a protection
(/member/frollard/) resistor via a transistor (if the backlight pulls too much current for
the atmega pin to handle). Variable brightness ftw!

Good writeup!

crocboy (/member/crocboy/) (author) frollard


4 years ago Reply (CE7DLQ5G68HEFMQ)
Thanks for the tip! I'll have to try
that out.
(/member/crocboy/)

Make Comment

About Us Find Us
Who We Are (/about/) Facebook (http://www.facebook.com/instructables)
Advertise (/advertise/) Youtube (http://www.youtube.com/user/instructablestv)
Contact (/about/contact.jsp) Twitter (http://www.twitter.com/instructables)
Jobs (/community/Positions­available­at­Instructables/)
Pinterest (http://www.pinterest.com/instructables)
Help (/community?categoryGroup=Help)
Google+ (https://plus.google.com/+instructables)
Tumblr (http://instructables.tumblr.com)

Join our newsletter: enter email Join! English

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 (http://m.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
© 2014 Autodesk, Inc.
Resources
Mobile
For Teachers (/teachers/)
Download our new apps for iOS,
Artists in Residence (/group/air/) Android and Windows 8!
Gift Pro Account (/account/give?sourcea=footer)
Forums (/community/) Android
Answers (/tag/type­question/?sort=RECENT) (https://play.google.com/store/apps/details?
Sitemap (/sitemap/) id=com.adsk.instructables)

iOS
(https://itunes.apple.com/app/instructables/id586765571)

Windows
(http://apps.microsoft.com/windows/en­
us/app/7afc8194­c771­441a­9590­
54250d6a8300)

Go Pro Today » (/account/gopro?sourcea=footer)

We're Hiring! » (/community/Positions­available­at­Instructables/)

You might also like