28123 Parallax Inc, 28123 Datasheet - Page 210

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28123

Style
Book
Title
What's a Microcontroller?
Contents
Whats a Microcontroller? Text
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
Lead Free Status / RoHS Status
Not applicable / Not applicable
Programming Data Retrieval
To retrieve these values from EEPROM, you can use the
the
While the
DataItem
EEPROM by the
Let’s say that the variable
littleEE
using the write command.
Example Program: ReadLightMeasurementsFromEeprom.bs2
This example program demonstrates how to use the
measurements that were stored in EEPROM by StoreLightMeasurementsInEeprom.bs2.
Compare the table that is displayed by this program with the one displayed by
StoreLightMeasurementsInEeprom.bs2, and verify that the values are the same.
' What's a Microcontroller - ReadLightMeasurementsFromEeprom.bs2
' Read light measurements from EEPROM.
' {$STAMP BS2}
' {$PBASIC 2.5}
time
READ
READ Location, {WORD} Data Item
READ 7, littleEE
READ 8, Word eepromValueA
READ 10, Word eepromValueB
command is:
WRITE
After StoreLightMeasurementsToEeprom.bs2 has completed, disconnect and
reconnect the power supply to the BASIC Stamp module to prove that the data
is not erased from the module’s EEPROM when the power is disconnected.
Also, close and re-open the BASIC Stamp Editor.
Leave the BASIC Stamp module’s power disconnected until you are ready to
run ReadLightMeasurementsFromEeprom.bs2; otherwise, it will start taking
measurements again.
Enter and run ReadLightMeasurementsFromEeprom.bs2.
argument must be a variable, because it has to store the value fetched from the
is a byte variable. Here are some commands to retrieve the values you stored
VAR
READ
command can use either a constant or a variable, the
command.
Word
eepromValueA
and
eepromValueB
READ
READ
command to retrieve the light
command. The syntax for
are
Word
READ
variables, and
command’s

Related parts for 28123