122-28029 Parallax Inc, 122-28029 Datasheet - Page 31

GUIDE STUDENT SMART SENSORS

122-28029

Manufacturer Part Number
122-28029
Description
GUIDE STUDENT SMART SENSORS
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-28029

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Smart Sensors
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
These declarations will make your code easier to understand, which is especially
important if you decide to make changes to your program after not having looked at it for
several months. For example, the first
The
can be rewritten like this:
ACTIVITY #4: CUSTOM CHARACTERS AND LCD ANIMATION
While not every picture saves a thousand words, even the ones that only save a sentence
or two are useful when you've got just 32 character spaces to work with. One example of
a useful picture is that hourglass cursor your computer screen uses to let you know the
program is busy.
somewhere on the screen that says, "please wait, the program is busy...". This activity
uses an hourglass to introduce techniques for defining, storing, displaying, and animating
custom characters.
Custom Characters in the Parallax LCD
The Parallax Serial LCD has room set aside for eight custom characters shown in Figure
1-13. To display Custom Character 0, just send the LCD the value
command. Likewise, to display Custom Character 1, just send a
Character 2, send a
to be the backslash and tilde. Here is an example
them -
Save LcdTimer.bs2 under a new name.
Add descriptive constants to your program.
Replace as many numbers as you can with meaningful constant names.
Run your program and troubleshoot as needed.
SEROUT
SEROUT 14, 84, [0, 1]
LcdCr
LcdOff
LcdOn
Line0
Line1
SEROUT LcdPin, T9600, [LcdOn, LcdCls]
SEROUT LcdPin, T9600, [(Line1 + 0), DEC2 hours,
command in LcdTimer.bs2 that displays the numbers on Line 1 of the LCD
2
, and so on. Note that Custom Characters 0 and 1 are pre-configured
This simple animated icon works much better than a message
CON
CON
CON
CON
CON
.
13
21
22
128
148
(Line1 + 5), DEC2 minutes,
(Line1 + 10), DEC2 seconds]
SEROUT
command can be rewritten like this:
Chapter 1: Parallax Serial LCD Display · Page 19
' Carriage return
' Turns display off
' Turns display on
' Line 0, character 0
' Line 1, character 0
SEROUT
command that displays both of
1
, to display Custom
0
with the
SEROUT

Related parts for 122-28029