28122 Parallax Inc, 28122 Datasheet - Page 209

KIT WHAT'S A MICRO:PARTS ONLY

28122

Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28122

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
' Write light measurements to EEPROM.
' {$STAMP BS2}
' {$PBASIC 2.5}
time
eepromAddress
DEBUG "Starting measurements...", CR, CR,
PAUSE 1000
FOR eepromAddress = 0 TO 58 STEP 2
NEXT
DEBUG "All done.
END
How StoreLightMeasurementsInEeprom.bs2 Works
The
to count in steps of 2 because word values are written into the EEPROM.
The
The
eepromAddress
variable is incremented by two each time through the loop because a
up two bytes. The address for a
HIGH 2
PAUSE 5000
RCTIME 2, 1, time
DEBUG DEC2 eepromAddress,
WRITE eepromAddress, Word time
RCTIME
FOR…NEXT
time
"Measurement
"-----------
"ReadLightMeasurementsFromEeprom.bs2"
FOR eepromAddress = 0 to 58 STEP 2
NEXT
"
RCTIME 2, 1, time
WRITE eepromAddress, Word time
variable is stored at the address given by the current value of the
command loads the time measurement into the word size
loop that measures the RC-time values and stores them to EEPROM has
VAR
VAR
variable each time through the loop. Remember, the
Now, run:", CR,
Value", CR,
-----", CR
", DEC time, CR
Word
Byte
WRITE
command is always in terms of bytes.
Word
time
eepromAddress
variable.
variable takes

Related parts for 28122