28029 Parallax Inc, 28029 Datasheet - Page 324

KIT PARTS SMART SENSORS W/TEXT

28029

Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28029

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® or Javelin Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
28029PAR
Page 312 · Smart Sensors and Applications
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 below list all of the valid Serial LCD commands. Commands marked as N/A
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]
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
* * * * *
* * *
* * *
*
*

Related parts for 28029