28029 Parallax Inc, 28029 Datasheet - Page 273

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
Chapter 7: LCD Bar Graphs for Distance and Tilt · Page 261
Chapter 7: LCD Bar Graphs for Distance and Tilt
Defining and displaying custom characters with the Parallax Serial LCD was introduced
in Chapter 1, Activity #4.
This chapter introduces some more custom character
techniques, and then applies them to bar graph displays. These displays will indicate the
distance of an object from the Ping))) ultrasonic sensor and the tilt of the Memsic 2125
Dual Axis Accelerometer.
ACTIVITY #1: CUSTOM CHARACTER SWAPPING
The Parallax Serial LCD can display up to eight custom characters at any given time.
However, there can be many more than eight custom characters in your application,
because custom characters can be defined and redefined as needed. The only limitation is
that only eight can be displayed simultaneously, and eight is ample for most projects.
The place where you can define and store a library of more than eight custom character
definitions is in the part of the BASIC Stamp EEPROM memory that is not used for
program storage. Since PBASIC programs rarely fill the entire EEPROM memory, there
is typically room for all the custom character definitions an application might need.
One powerful technique is to use just one of the LCD's eight custom character slots to
display a sequence of custom character definitions that are stored in the BASIC Stamp
EEPROM. This is especially useful for animation, but it will also be important for bar
graph displays. This activity provides an animation example.
From EEPROM Storage to LCD Character Memory
The next example program will demonstrate a convenient way to store custom character
definitions in the BASIC Stamp EEPROM.
Two of the program's fifteen custom
character definitions are shown below. Each definition gets a unique
name, like
Symbol
,
,
, and so on, up through
. Each of these
names
Char0
Char1
Char2
Char14
Symbol
represents the EEPROM address of the first byte in the
directive. The subroutine
DATA
that transfers the definitions from EEPROM to the LCD's custom character memory slots
uses these
names as a reference point for reading the bytes from EEPROM.
Symbol
After reading each byte from EEPROM, the subroutine sends it to the serial LCD.

Related parts for 28029