27976 Parallax Inc, 27976 Datasheet - Page 6
![MODULE SRL LCD 2X16 NON-BACKLIT](/photos/7/89/78992/mfg_27976_sml.jpg)
27976
Manufacturer Part Number
27976
Description
MODULE SRL LCD 2X16 NON-BACKLIT
Manufacturer
Parallax Inc
Specifications of 27976
Display Mode
Transflective
Interface
Serial
Display Type
STN - Super-Twisted Nematic
Number Of Digits/alpha
32
Outline L X W X H
80.00mm x 36.00mm x 21.00mm
Viewing Area
61.00mm L x 15.70mm W
Backlight
Without Backlight
Display Format
16 x 2
Character Format
5 x 8 Dots
Voltage - Supply
5.0V
Operating Temperature
-20°C ~ 70°C
Character Count X Line
16 x 2
Module Size (w X H X T)
38 mm x 80 mm
Features
Serial LCD
Fluid Type
STN Positive
Voltage Rating
5 VDC
Operating Temperature Range
- 20 C to + 70 C
Backlight Type
LED Yellow-Green
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Dot Size
-
Character Size
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
In all of your Serial LCD code, you should pause for 100 ms at start-up to give time for the Serial LCD to
initialize. You should also set the serial port pin on the BASIC Stamp to HIGH before the 100 ms start-up
delay, as this is the normal state of a serial port when it isn’t sending any data.
' {$STAMP BS2}
TxPin
Baud19200
Moving the Cursor
When you send a character to the Serial LCD, it always displays at the current cursor position. There are
a few different ways to move the cursor on the Serial LCD display. After each character you send, the
cursor automatically moves over one position. Along with this, there is a standard set of cursor move
commands including Backspace, Carriage Return, and Line Feed.
The Backspace/Left command (Dec 8) moves the cursor one place to the left and the Right command
(Dec 9) moves the cursor one place to the right. These can be useful for moving the cursor around to
overwrite existing text. These commands wrap to the next line of the display, if necessary. The Line
Feed command (Dec 10) moves the cursor to the next line of the display without changing the horizontal
position of the cursor. The Carriage Return command (Dec 13) also moves the cursor to the next line,
but it moves the cursor to the leftmost position on that line as well. The Form Feed command (Dec 12)
clears the entire display and moves the cursor to the leftmost position on line 0, just like when you first
turn on the display. You will need to pause for 5mS in your code after sending the Form Feed command,
to give the Serial LCD time to clear the display. Except for Form Feed, none of these move commands
affects the characters on the display.
There are also direct move commands that you can use to move the cursor to any position on the display
with a single command. The commands in the range Dec 128 to 143 and Dec 148 to 163 move the
cursor to the 16 different positions on each of the two lines of the model 27976 and 27977 LCDs. The
commands in the range Dec 128 to 207 move the cursor to the 20 different positions on each of the four
lines of the model 27979 LCD.
Controlling the Display
You also have control over the various display modes of the Serial LCD. The display-off command (Dec
21) turns off the display so that all of the characters disappear. The characters aren’t erased from the
display, though, and you can even keep writing new characters to the display when it is turned off. A
trick to make a lot of text show up all at once, even at a slow baud rate, is to turn off the display and
then send all of your text. Then, when you turn the display on again, all of the text appears instantly.
The display-on commands (DEC 22 to 25) turn the display back on and also control whether you want to
display the cursor and/or make the cursor character blink. The cursor is the short bar that shows up
below the character at the current cursor position. The blink option makes that character blink on and
off repeatedly. You can turn the cursor and blink options on or off, in any combination, as listed in the
HIGH TxPin
PAUSE 100
SEROUT TxPin, Baud19200, ["Hello, this text will wrap."]
©Parallax, Inc. • Serial LCD (#27976/27977/27979) • v2.0 7/26/2006 Page 6 of 11
CON
CON
0
32
' Set pin high to be a serial port
' Pause for Serial LCD to initialize