English
Language : 

805-00012 Datasheet, PDF (6/11 Pages) List of Unclassifed Manufacturers – Parallax Serial LCD
Propeller™ P8X32A 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 Propeller and load RAM or EEPROM. You will see a diamond
character appear on the screen. Note: the FullDuplexSerial.spin object is included with the Propeller Tool
software.
{{
Serial_LCD_Custom_Character.spin
For Parallax Serial LCDs 27976, 27977, 27979
}}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
TX_PIN = 0
BAUD = 19_200
OBJ
LCD : "FullDuplexSerial.spin"
PUB Main
LCD.start(TX_PIN, TX_PIN, %1000, 19_200)
waitcnt(clkfreq / 100 + cnt)
' Pause for FullDuplexSerial.spin to initialize
LCD.tx(250)
LCD.tx(%00000)
LCD.tx(%00100)
LCD.tx(%01110)
LCD.tx(%11111)
LCD.tx(%01110)
LCD.tx(%00100)
LCD.tx(%00000)
LCD.tx(%00000)
LCD.tx(2)
' Define custom character 2
' Now send the eight data bytes
' %00000 =
' %00100 = *
' %01110 = * * *
' %11111 = * * * * *
' %01110 = * * *
' %00100 = *
' %00000 =
' %00000 =
' Display the new custom character 2
Playing Music
The Serial LCD has a built-in piezoelectric speaker which can play musical notes. The LCD includes a
sophisticated music player enabling users to program songs and tunes. You can play musical notes by
sending three types of note commands (Dec 214 to 232), as shown in the command set table.
Set Length
The “set length” commands (Dec 208 to 214) determines the length of time each note will play for. This
value remains the same until another “set length” command is received. A note’s length can range from
a 1/64th note to a whole note. A whole note is 2 seconds long.
Copyright © Parallax Inc.
Parallax Serial LCDs (#27976, 27977, 27979)
v3.1 3/11/2013 Page 6 of 11