Professional Documents
Culture Documents
LCD-01-SPAR-guide Arduino PDF
LCD-01-SPAR-guide Arduino PDF
&
The Pieces
x1
16 Pin Header
x1
Assembling
To get started you'll need to attach the header pins to your LCD module, learn how to do this
at: http://sparkfun.com/lcd
Potentiometer
(10k Ohm)
x1
Testing
Testing your LCD with an Arduino is really simple. Wire up your display using the schematic or
breadboard layout sheet. Then open the Arduino IDE and open the example program.
The Schematic
Potentiometer
Upload to your board and watch as "hello, world!" is shown on your display. If no message is
displayed the contrast may need to be adjusted. To do this turn the potentiometer.
gnd
(ground) (-)
1
+5 volts
pin 12
pin 11
LCD
pin 5
pin 4
pin 3
(5v)
(gnd)
pin 2
16
Arduino
Vss (gnd)
Vdd (5v)
Vo (contrast)
RS
R/W
Enable
Data 0
Data 1
Data 2
Data 3
Data 4
Data 5
Data 6
Data 7
Library Summary
(here's a summary of the LCD library for a full reference visit http://ardx.org/LCD-REF )
LiquidCrystal(rs, rw, enable, d4, d5, d6, d7) - create a new LiquidCrystal object using a 4
bit data bus
LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7) - create a new
LiquidCrystal object using an 8 bit data bus
clear() - Clears the display and moves the cursor to upper left corner
home() - Moves the cursor to the upper left corner
setCursor(col, row) - moves the cursor to column col and row row
write(data) - writes the char data to the display
print(data) - prints a string to the display
Technical Details
.: Full LCD Datasheet: http://ardx.org/LCD-DATAS :.
The Circuit
A B C D E
V+
F Gto
H Gnd
I J
to 5v
gnd
3
4
7
8
9
to pin 12
10
to pin 11
12
11
13
14
15
16
to pin 5
to pin 4
to pin 3
to pin 2
17
18
19
B/light
20
21
(5v)
22
(gnd)
23
21
22
16
-SPARKFUN16 x 2 LCD
7
Vss (gnd)
8
Vdd (5v)
9
Vo (contrast)
10RS
11
R/W
12
Enable
13 0
Data
14 1
Data
15
Data 2
16 3
Data
17 4
Data
18 5
Data
19 6
Data
20
Data 7
23
24
24
25
25
CIRC-LCD
26
26
Showing27
Text
27
(LCD Displays)
28
28
29
29
30
30
A B C D E
1
2
F G H I