You are on page 1of 1

Small Displays (16 x 2 LCD Display)

The Pieces
Liquid Crystal Display
(Craftdata BC1602A)

The Theory & Code


Liquid Crystal Displays (LCD) An LCD is a small low cost display. It is easy to interface with a micro-controller because of an embedded controller(the black blob on the back of the board). This controller is standard across many displays (HD 44780) which means many micro-controllers (including the Arduino) have libraries that make displaying messages as easy as a single line of code. 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. File > Sketchbook > Examples > Library-LiquidCrystal > HelloWorld 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. Library Summary
(here's a summary of the LCD library for a full reference visit http://tinyurl.com/krcarl )

x1
Potentiometer
(10k Ohm)

x1

The Schematic
Potentiometer

gnd (ground) (-)

LCD

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
(5v) (gnd)

+5 volts

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 .: Summary LCD Datasheet: http://tinyurl.com/met7ol :. .: Full LCD Datasheet: http://tinyurl.com/lmjxad :.

The Circuit

21 (5v) 22 (gnd)

B/light

.: Instructions: print out, cut out, get making :. .: for more details visit: http://tinyurl.com/ltvo93 :.

1
pin 12
pin 11

Arduino

pin 5 pin 4

pin 3
pin 2
16

The Layout Sheet


Potentiometer
(variable resistor)

A B C D E

F Gto Gnd H I J

1 2 3 4 5 6

V+ gnd

to 5v

1 2 3 4 5 6 7 8 9

Vss7(gnd) 8 Vdd (5v) 9 Vo (contrast) 10 RS 11 R/W 12 Enable 13 Data 0 14 Data 1 15 Data 2 16 Data 3 17 Data 4 18 Data 5 19 Data 6 20 Data 7

to pin 12 to pin 11

10 11 12 13 14 15 16

to pin 5 to pin 4 to pin 3 to pin 2

17 18 19 20 21 22 23 24 25

16
A B C D E F G H I J

23 24 25 26 27 28 29 30

CIRC-18 26
Showing27 Text
(LCD Displays) 28
29 30

You might also like