You are on page 1of 9

let's make Explore (/tag/type-id/) Publish (/about/create.

jsp) You (/you/)

Featured: share what youIoT(/id/intel/)


Intel make Life Hacks(/tag/type-id/category-home/channel-life-hacks/?sort=FEATURED)
(/)
Beauty(/tag/type-id/category-home/channel-beauty/?sort=FEATURED) Woodworking(/tag/type-id/category-workshop/channel-woodworking/)

(http://cdn.instructables.com/FS6/X7OF/H1JUGSKG/FS6X7OFH1JUGSKG.LARGE.jpg)
About This Instructable

Posted:
59,979 views Apr 30, 2012
28 favorites License:

Kev_MacD
(/member/Kev_MacD/)
Follow 26
(http://cdn.instructables.com/FPT/TOJ5/H1JUGSJR/FPTTOJ5H1JUGSJR.LARGE.jpg)
(/member/Kev_MacD/)
More by Kev_MacD

(/id/Wiring-and-
programming-an-Electric-Imp-with-an-
Show All 7 Items
(http://cdn.instructables.com/FOF/1YY3/H1JUGSJU/FOF1YY3H1JUGSJU.LARGE.jpg) LCD)

(http://cdn.instructables.com/FAF/S0N6/H1JUGSJS/FAFS0N6H1JUGSJS.LARGE.jpg)
(/id/Wiring-and-
This instructable will guide a user step-by-step in wiring and programming a Hitachi programming-the-Parallax-RFID-Serial-
HD44780 (or a compatible) chipset LCD screen to an Arduino, using the Ca)
LiquidCrystal Library. Programming examples are provided for all the Library calls.
(http://cdn.instructables.com/FXW/GTDB/H1JUGSJW/FXWGTDBH1JUGSJW.LARGE.jpg)

Parts List: (/id/Using-the-Pololu-5V-


Boost-Regulator)
1- Arduino (I am using an UNO R3 here for the demonstration)
2- Solderless Breadboard Tags:
3- An Hitachi HD44780 or compatible LCD panel arduino (/tag/type-id/category-technology/keyw ord-arduino/)

4- Current(http://cdn.instructables.com/FEZ/P1T1/H1JUGSJX/FEZP1T1H1JUGSJX.LARGE.jpg)
limiting resistor for the backlight (10 Ohm) LCD (/tag/type-id/category-technology/keyw ord-lcd/)
5- 10K trim pot for the contrast LiquidCrystal (/tag/type-id/category-technology/keyw ord-liquidcrystal/)
6- 16 pin Male 0.01 Headers

Add instructable to:

Group

Step 1: Pin Configurations May Vary


Related

how to interface LCD


(16X2) to arduino (/id/how-
to-interface-LCD-16X2-to-
arduino/)
by TechPonder
LCD Arduino Shield
(/id/LCD-Arduino-Shield/)
by peyt52 (/member/peyt52/)

Interfacing 20x4 LCD with


Arduino (/id/Interfacing-
20x4-LCD-with-Arduino/)
by apoorveinstein
(/member/apoorveinstein/)
How to use an LCD -
Arduino (/id/How-to-use-
an-LCD-Arduino/)
by Hugo Trombert
(/member/Hugo+Trombert/)
Pinning Liquid Crystal
(http://cdn.instructables.com/FPT/TOJ5/H1JUGSJR/FPTTOJ5H1JUGSJR.LARGE.jpg) Displays (/id/Pinning-
Liquid-Crystal-Displays/)
by Josehf Murchison
(/member/Josehf+Murchison/)
The Hitachi HD44780 chipset or compatible LCD's generally have a very standard See More (/tag/type-id/?q=)
pin set. Those without backlights may have only 14 pins, omitting the final two pins
powering the light. Please refer to the datasheet for your unit to make sure they
match up.

The pinout is as follows:

1. Ground
2. VCC (+3.3 to +5V)
3. Contrast adjustment (VO)
4. Register Select (RS). RS=0: Command, RS=1: Data
5. Read/Write (R/W). R/W=0: Write, R/W=1: Read
6. Clock (Enable). Falling edge triggered
7. Bit 0 (Not used in 4-bit operation)
8. Bit 1 (Not used in 4-bit operation)
9. Bit 2 (Not used in 4-bit operation)
10.Bit 3 (Not used in 4-bit operation)
11.Bit 4
12.Bit 5
13.Bit 6
14.Bit 7
15.Backlight Anode (+)
16.Backlight Cathode (-)

Step 2: Get the Backlight working

(http://cdn.instructables.com/FOF/1YY3/H1JUGSJU/FOF1YY3H1JUGSJU.LARGE.jpg)

(http://cdn.instructables.com/FXW/GTDB/H1JUGSJW/FXWGTDBH1JUGSJW.LARGE.jpg)

Solder the headers onto the LCD panel and insert the LCD Panel into a solderless
breadboard.
Wire the Breadboard with 5V and GND from the Arduino

Add jumpers from 5V to pin 15 on the LCD, and insert the 10 Ohm Resistor into Pin
16 on the LCD. Jumper the other end of the resistor to GND.

Power up the Arduino and the backlight should light up. Progress!

Step 3: Add Power and Display Contrast

(http://cdn.instructables.com/FZV/XP47/H1JUGSJZ/FZVXP47H1JUGSJZ.LARGE.jpg)

1 - Wire GND to pin 1 and 5 (Pin 5 jumper not shown in photo)


2 - Wire 5V to Pin 2
3 - Wire one of the outer legs of the 10K trim pot to 5V and the other to GND (Both
wires Yellow in Photo)
4 - Wire the middle leg of the 10K trim pot to pin 3 (Brown in photo)

Apply power to the unit and adjust the trim pot until you see rectangles appear on
the screen. (See Photo)

Step-By-Step
Step 4: Control LCD
Wireswiring (4 Wires
and Data Bit Mode) and Programming examples for
Arduino
by Kev_MacD (/member/Kev_MacD/)

Download (/id/Step-By-Step-LCD-wiring-4-Bit-Mode-and-Programmi/?download=pdf)

(/id/Step-By-Step-LCD-wiring-4-Bit-Mode-and-Programmi/) 8 Steps

Collection I Made it! Favorite Share


(http://cdn.instructables.com/FS6/X7OF/H1JUGSKG/FS6X7OFH1JUGSKG.LARGE.jpg)

Add the control connections

1 - Jumper pin 4 on the LCD to Digital IO 6 on the Arduino


2 - Jumper pin 6 on the LCD to Digital IO 7 on the Arduino

Add the data connections

1- Jumper pin 11 on the LCD to Digital IO 9 on the Arduino


2- Jumper pin 12 on the LCD to Digital IO 10 on the Arduino
3- Jumper pin 13 on the LCD to Digital IO 11 on the Arduino
4- Jumper pin 14 on the LCD to Digital IO 12 on the Arduino

Before anything shows up on the LCD, you will need to load the Library and sketch
provided in the next 2 steps onto the Arduino.

Step 5: Download the LiquidCrystal Library


The LiquidCrystal Library is a core library for Arduino - there should be no need to
install it. If you need to install it for some reason, visit the Arduino site.

http://arduino.cc/en/Reference/Libraries (http://arduino.cc/en/Reference/Libraries)

Step 6: Uploading the "Hello, World!" sketch


(http://cdn.instructables.com/FS6/X7OF/H1JUGSKG/FS6X7OFH1JUGSKG.LARGE.jpg)

Create a new sketch window enter the information below. If you display is not a 16
character by 2 line display, please modify

#define LCDColumns 16
#define LCDRows 2

to match your LCD display unit.

Upload the sketch to your Arduino to get the display to read "Hello, World!"

If your display does not function, check the wiring carefully.

#include <LiquidCrystal.h>

#define RSPin 6
#define EnablePin 7
#define DS4 9
#define DS5 10
#define DS6 11
#define DS7 12

#define LCDColumns 16
#define LCDRows 2

LiquidCrystal lcd(RSPin, EnablePin,DS4,DS5,DS6,DS7);

void setup()
{
lcd.begin(LCDColumns, LCDRows); //Configure the LCD
lcd.setCursor(0,0);
lcd.print("Hello, World!");
}

void loop()
{

LCD_Instructable_Hello_World.ino
(/files/orig/FN3/ECFC/H1JUGSWV/FN3ECFCH1JUGSWV.ino)369 bytes

Step 7: Understanding "Hello, World!" using the LiquidCrystal


library
LiquidCrystal(rs, enable, d4, d5, d6, d7) - Creates a variable of type
LiquidCrystal. You are asked to define the Ardunio pins the LCD is connected to.

In the example we used define statements to set the pin values and then called
LiquidCrystal using the define'd values

#define RSPin 6
#define EnablePin 7
#define DS4 9
#define DS5 10
#define DS6 11
#define DS7 12
#define LCDColumns 16
#define LCDRows 2
LiquidCrystal lcd(RSPin, EnablePin,DS4,DS5,DS6,DS7);

begin(cols, rows) - Specifies the dimensions (width in coolumns and height in


rows) of the display. In this example, I am using a 16 Character by 2 line display.
We used define statements to set these values and called begin() in the setup()
routine.

#define LCDColumns 16
#define LCDRows 2

...

lcd.begin(LCDColumns, LCDRows);

setCursor(col, row) - Positions the cursor. setCursor(0,0) to the top left of the
display

print(data) - Prints Text to the LCD, lcd.print("Hello, World!") prints"Hello, World!"


on the screen, starting at the cursor position

Step 8: Advanced LiquidCrystal


Load the sketch provided below. It extends the "Hello, World!" example by including
all of the LiquidCrystal command and allowing you to uncomment various sections
to explore the functionality of thelibrary. Most of the commands available are there
for you to play with!
LCD_Instructable_LiquidCrystal.ino
(/files/orig/FU2/KS6F/H1JUIHY9/FU2KS6FH1JUIHY9.ino)4 KB

We have a be nice comment policy.


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

psycho.maggot (/member/psycho.maggot/) 9 months ago Reply

what if i using lcd shield?.. same or not?


(/member/psycho.maggot/)
http://www.famosastudio.com/lcd-shield

flag

psycho.maggot (/member/psycho.maggot/) 9 months ago Reply

what if i using lcd shield?.. same or not?


(/member/psycho.maggot/)
http://www.famosastudio.com/lcd-shield

flag

FEATURED CHANNELS

Life Hacks Beauty Woodworking Minecraft Breakfast Laser Cut Organizing Arduino
(/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type-
id/category- id/category- id/category- id/category- id/category- id/category- id/category- id/category-
Intel IoT home/channel- home/channel- workshop/channel-play/channel- food/channel- workshop/channel-home/channel- technology/channel-
(/id/intel/) life-hacks/) beauty/) woodworking/) minecraft/) breakfast/) laser-cutting/) organizing/) arduino/)
Newsletter
Join 2 million + to receive instant
inspiration in your inbox.

enter email I'm in!

Mobile
Download our apps!

Android (https://play.google.com/store/apps/details?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)
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 (/id/how-to-write-a-great-instructable/)
Google+ (https://plus.google.com/+instructables)
Tumblr (http://instructables.tumblr.com)

Resources
For Teachers (/teachers/)
Artists in Residence (/air)
Gift Pro Account (/account/give?sourcea=footer)
Forums (/community/)
Answers (/tag/type-question/?sort=RECENT)
Sitemap (/sitemap/)

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)
2015 Autodesk, Inc.

You might also like