English
Language : 

805-00012 Datasheet, PDF (5/11 Pages) List of Unclassifed Manufacturers – Parallax Serial LCD
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
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.
BASIC Stamp 2 Custom Character Example
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}
' {$PBASIC 2.5}
TxPin
Baud19200
CON 0
CON 32
HIGH TxPin
PAUSE 100
SEROUT TxPin, Baud19200, [250]
SEROUT TxPin, Baud19200, [%00000]
SEROUT TxPin, Baud19200, [%00100]
SEROUT TxPin, Baud19200, [%01110]
SEROUT TxPin, Baud19200, [%11111]
SEROUT TxPin, Baud19200, [%01110]
SEROUT TxPin, Baud19200, [%00100]
SEROUT TxPin, Baud19200, [%00000]
SEROUT TxPin, Baud19200, [%00000]
SEROUT TxPin, Baud19200, [2]
' Set pin high to be a serial port
' Pause for Serial LCD to initialize
' Define custom character 2
' Now send the eight data bytes
' %00000 =
' %00100 = *
' %01110 = * * *
' %11111 = * * * * *
' %01110 = * * *
' %00100 = *
' %00000 =
' %00000 =
' Display the new custom character 2
Copyright © Parallax Inc.
Parallax Serial LCDs (#27976, 27977, 27979)
v3.1 3/11/2013 Page 5 of 11