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

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
Page 214 · Smart Sensors and Applications
Symbol
not actually store any values in EEPROM addresses 0 to 9. It just reserves these bytes for
your PBASIC code, and gives a name to the address of the first byte:
RecordsEnd DATA
The
address of the EEPROM
the two
ten bytes (addresses 0 to 9). Since address 0 is the beginning address,
a constant for the value 0 in the program. Likewise, since the
directive sets aside a byte at address 10,
the program.
The
repeats from
eeIndex
EEPROM bytes, from address 0 to address 10.
Addresses
Contents
Byte
Symbol
Clear_Data
DATA
name is especially useful for recordkeeping. The
Records
RecordsEnd
variable increases by 1, so
The
Records DATA (10)
want to initialize the EEPROM values to zero, use
store 0 in EEPROM addresses 0 to 9. The BASIC Stamp Editor only does this when it
downloads the program. If you press and release your board's Reset button or disconnect
and reconnect power, no values are written to those EEPROM addresses. This is a handy
feature, as you will see in the next activity.
00
names (
0
directives. Since
Records
Records = 0
EEPROM
subroutine in the next example program has a
Table 6-1:
00
directive reserves a single byte at EEPROM address 10.
1
Records
to
DATA
DATA
DATA
00
bytes
2
RecordsEnd
DATA directives and EEPROM Addresses
and
directives they precede. Table 6-1 shows how it works for
, whatever values are already there will not be changed. If you
Records
00
don't
3
(10)
RecordsEnd
WRITE eeIndex, 100
00
necessarily
4
RecordsEnd
(0 to 10). Each time through the loop, the
is the first
00
5
) become constants that store the starting
contain
00
DATA
6
Records DATA 0 (10)
becomes the constant value 10 in
directive, it sets aside the first
00
Records DATA
7
RecordsEnd = 10
zero.
stores 100 in each of the
00
8
FOR
With
RecordsEnd DATA
Records
...
00
9
Records
NEXT
the
directive does
00
10
. This will
command
loop that
becomes
. The
00
11

Related parts for 122-28029