28029 Parallax Inc, 28029 Datasheet - Page 275

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
To display the custom character at a certain character, the next example program has a
Disp_Cust_Char
custChar
which are defined in the example program's Constants section. Again, the
variable is a value between 0 and 7, which selects a custom character in the LCD's
character memory. The
far from the LCD's left you want the character printed. For example, to print Custom
Character 5 on the LCD's Line 0 at character 8, use these commands:
Since the next example program is just animating a character, a simple
can be used to access each of the custom character
of each
character definition in the sequence of
loop that takes steps of 8, and begins at
DATA
DO
LOOP
custChar = 5
line = Line0
cursor = 8
GOSUB Disp_Cust_Char
, and
How to make
The code block above is in a
variable increases by 1 each time through a loop. The command
// 3
setting counter equal to the remainder of counter ÷ 3, it causes counter to only count to 2
before falling back to 0. The resulting sequence of values stored by counter is 0, 1, 2, 0, 1,
2, 0, 1, 2, ...
counter = counter + 1
counter = counter // 3
' Define custom character.
custChar = 5
LOOKUP counter,
GOSUB Def_Cust_Char
.
.
.
directive will be eight bytes after the next. Updating the LCD with each
uses the PBASIC modulus operator // to calculate the remainder of counter ÷ 3. By
cursor
[Char0, Char1, Char2],
charBase
subroutine.
counter
. The
cursor
line
count 0, 1, 2, 0, 1, 2, ... without
variable can be a value from 0 to 15 depending on how
This subroutine depends on three variables,
DO
variable should be set to either
Chapter 7: LCD Bar Graphs for Distance and Tilt · Page 263
Char0
...
DATA
LOOP
and ends at
directives can be done with a
, so it gets repeated indefinitely. The counter
DATA
directives. The starting address
Char14
FOR
...
NEXT
.
counter = counter
Line0
FOR
...
NEXT
FOR
or
custChar
Line1
...
line
NEXT
loop
,
,

Related parts for 28029