27404 Parallax Inc, 27404 Datasheet - Page 46

COMPETITION RING FOR SUMOBOT

27404

Manufacturer Part Number
27404
Description
COMPETITION RING FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 27404

Accessory Type
Hobby and Education
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
As the SumoBot programs get larger and more complex, both good EEPROM
management and strict adherence to code conventions will make large and complex
programs seem easy, or at least, not nearly as hard as they might look.
ACTIVITY #1: A CLOSER LOOK AT THE EEPROM
The optional
programming tools that make storing and accessing values much easier. Especially when
you're dealing with more than one list of stored values,
This activity starts by examining the relationship between a
name and the values the
downloads.
This activity also introduces techniques you can use to store new values in an EEPROM
byte to track how many times the Reset button has been pressed and released. In
addition, distinguishing between odd and even values as well as odd and even numbers of
resets is introduced.
Symbol Names, Addresses, and EEPROM Bytes
The BASIC Stamp 2's EEPROM is 2048 bytes. Each byte has an address that can store
either program tokens or values you tell it to store. When a program is downloaded to
EEPROM, it occupies the highest addresses, starting at address 2047, 2046, 2045, etc. If
a program is 500 bytes, it will occupy memory from EEPROM addresses 2047 to 1548.
That leaves EEPROM addresses 0 to 1547 free for storing data.
You can use
being used for program storage) at the time a program is downloaded. Once the program
is running, EEPROM bytes are not like variables in that they cannot be manipulated
directly, but
values are copied to variables, they can be manipulated, used for comparisons, etc, and
then
The program SymbolNamesVsAddressContents.bs2 declares several
WRITE
Numbers
RunStatus
UndefData
Alphabet
READ
commands can copy the values stored in those variables back to EEPROM.
DATA
Symbol
commands can copy values stored in EEPROM to variables. After the
directives to pre-store values in available EEPROM bytes (those not
names that you can use to precede
DATA
DATA
DATA
DATA
DATA
directive pre-writes to EEPROM when the program
7, 20, 11, 2, 80
0
(20)
"ABCDEFG"
Symbol
DATA
DATA
names are indispensable.
directives are powerful
DATA
directive's
directives:
Symbol

Related parts for 27404