27976 Parallax Inc, 27976 Datasheet - Page 7
![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
command set table. You can change the cursor and blink mode even if the display is already on; you
don’t need to turn it off and then back on again.
With models 27977 and 27979, you can also control the backlight of the display. The backlight lights up
the display so that it is easier to see in the dark. There are commands to turn the backlight on (Dec 17)
and off (Dec 18).
Custom Characters
The Serial LCD has the capability to store up to eight user-defined custom characters. The custom
characters are stored in RAM and so they need to be redefined if you turn off the power. You can display
the custom characters by sending the commands Dec 0 to 7, as shown in the command set table. The
custom character will display at the current cursor position.
The custom characters are five pixels wide by eight pixels high. Each of the characters is stored as a
series of eight data bytes where the low five bits of each byte represent a row of pixels in the character.
The high three bits of each byte are ignored. A bit value of one turns that pixel on (i.e. makes it black).
The bottom row of pixels is often left blank (all zeros) to make it easier to see the cursor.
To define a custom character, you will send a total of 9 bytes to the Serial LCD. The first byte needs to
be a valid define-custom-character command (Dec 248 to 255) and must be followed by eight data bytes
that define the pixels of the character. The Serial LCD will always use the next eight bytes it receives to
set the pixels of the character. The data bytes define the character starting at the topmost row of pixels,
as shown in the example code.
Define a custom character using the code example below. First, set the baud rate on your Serial LCD to
19,200. Then, load the code below into your BASIC Stamp 2 and run it. You will see a diamond
character appear on the screen.
' {$STAMP BS2}
TxPin
Baud19200
Command Set
The tables on the following pages list all of the valid Serial LCD commands.
are invalid and are ignored. The lines of the LCD display are numbered starting from 0, with line 0 being
the top line. The character positions on each line are numbered starting from 0, with position 0 being
the leftmost position on the line.
HIGH TxPin
PAUSE 100
SEROUT TxPin, Baud19200, [250]
SEROUT TxPin, Baud19200, [0]
SEROUT TxPin, Baud19200, [4]
SEROUT TxPin, Baud19200, [14]
SEROUT TxPin, Baud19200, [31]
SEROUT TxPin, Baud19200, [14]
SEROUT TxPin, Baud19200, [4]
SEROUT TxPin, Baud19200, [0]
SEROUT TxPin, Baud19200, [0]
SEROUT TxPin, Baud19200, [2]
©Parallax, Inc. • Serial LCD (#27976/27977/27979) • v2.0 7/26/2006 Page 7 of 11
CON
CON
0
32
' Set pin high to be a serial port
' Pause for Serial LCD to initialize
' Define custom character 2
' Now send the eight data bytes
' 0
' 4
' 14 = %01110
' 31 = %11111
' 14 = %01110
' 4
' 0
' 0
' Display the new custom character 2
= %00000
= %00100
= %00100
= %00000
= %00000
* * * * *
* * *
* * *
*
*
Commands marked as N/A