28029 Parallax Inc, 28029 Datasheet - Page 197

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
The
number of spaces over and the y value is the number of carriage returns down. To get to
the correct address of a character on the third row, your program has to add all the
characters in the first two rows. Since each row has 14 characters,
multiplied by 14 before it can be added to
address 0.
Regardless of whether it's a computer display, the liquid crystal display on your cell
phone, or your BASIC Stamp application's display, the same technique applies. The
processor remembers two different images, the one in the background, and the one in the
foreground. As the foreground object “moves” it is displayed in a different location and
the area that the foreground object vacated is re-drawn.
The most important thing to keep in mind about this programming technique is that it
saves the processor lots of time. It only has to get one character from EEPROM and send
it to the Debug Terminal. Compared to 99 characters, that's a significant time savings,
and the BASIC Stamp can be doing other things with that time, such as monitoring other
sensors, controlling servos, etc.
Example Program – EepromBackgroundRefresh.bs2
This program takes PlotXYGraph.bs2 combined with EepromBackgroundDisplay.bs2,
using the background display, coordinate storage, and the background re-draw technique
just discussed.
' -----[ Title ]-----------------------------------------------------------
' Smart Sensors and Applications - EepromBackgroundRefresh.bs2
'{$STAMP BS2}
'{$PBASIC 2.5}
' -----[ Variables ]-------------------------------------------------------
x
y
xOld
yOld
index
Enter save and run EepromBackgroundRefresh.bs2.
Test and verify that the asterisk disappears from its old location and appears at
the new location you entered.
variable selects the correct character from EEPROM. The x value is the
VAR
VAR
VAR
VAR
Word
Word
Nib
Nib
xOld
Chapter 5: Accelerometer Gaming Basics · Page 185
. The extra 1 is added to skip the
' Stamp/PBASIC directives
' Store current position
' Store previous position
yOld
has to be
CLS
at

Related parts for 28029