eeprom
Archiver
Posts: 46,084
does anyone know how to clear the eeprom of a bs2 chip?
thank you for your time..
~Rich
thank you for your time..
~Rich
Comments
lastbytetoclear var word '2047 is last byte, but program will crash
anyway once the routine clears program data.
counter var word
for counter = 0 to lastbytetoclear
write counter, 0
next
end
'regards, Chris
Original Message
From: <oneuptick@e...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, February 20, 2001 10:13 AM
Subject: [noparse][[/noparse]basicstamps] eeprom
> does anyone know how to clear the eeprom of a bs2 chip?
> thank you for your time..
> ~Rich
>
>
>
>
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com
first 4 or 8 outputs. Any ideas about why the following doesn't work?
Thanks for your help..
Leroy
'{$STAMP BS2}
'Write the values to EEPROM.
CHARACTER var byte
x var nib
Data "BetsywasaGoodOlegirl"
for x = 0 to 20
READ x, CHARACTER
outa = CHARACTER
pause 2000
outa = 0
debug bin CHARACTER
debug " :", dec x
debug CR
next
DirA = %1111
... or for eight bits:
DirL = %11111111
-- Jon Williams
-- Parallax
In a message dated 4/13/02 10:12:05 PM Central Daylight Time, leroy@f...
writes:
> I am trying to read a four bit value stored in eeprom and place into the
> first 4 or 8 outputs. Any ideas about why the following doesn't work?
>
> Thanks for your help..
>
> Leroy
>
> '{$STAMP BS2}
> 'Write the values to EEPROM.
>
> CHARACTER var byte
> x var nib
>
> Data "BetsywasaGoodOlegirl"
>
> for x = 0 to 20
>
> READ x, CHARACTER
>
> outa = CHARACTER
>
> pause 2000
>
> outa = 0
>
> debug bin CHARACTER
>
> debug " :", dec x
>
> debug CR
>
>
> next
>
[noparse][[/noparse]Non-text portions of this message have been removed]
> > Data "BetsywasaGoodOlegirl"
> > for x = 0 to 20
Also x needs to be a byte if it is to go above 15
>You need to initialize the outputs. If you're just using four bits, do this:
>DirA = %1111
>... or for eight bits:
>DirL = %11111111
>-- Jon Williams
>-- Parallax
>
>In a message dated 4/13/02 10:12:05 PM Central Daylight Time, leroy@f...
>writes:
> > I am trying to read a four bit value stored in eeprom and place into the
> > first 4 or 8 outputs. Any ideas about why the following doesn't work?
> > Thanks for your help..
> > Leroy
> >
> > '{$STAMP BS2}
> > 'Write the values to EEPROM.
> >> CHARACTER var byte
> > x var nib
> > Data "BetsywasaGoodOlegirl"
> > for x = 0 to 20
> > READ x, CHARACTER
> > outa = CHARACTER
> > pause 2000
> > outa = 0
> > debug bin CHARACTER
> > debug " :", dec x
> > debug CR
> > next
'for x = 1 to 20'
the compiler assumes decimal, not hex?
And if I wanted to write the values as a hex number I would write what ?
Also the statement: Data "BetsywasaGoodOlegirl" places number patterns
in the eeprom. Could I specify those patters in binary? Also, what is
the size limitataion of the eprom for this type of storage?
thanks so much for help. I am sure these questions are in the manual,
somewhere, I just don't know where they are..
Leroy
Tracy Allen wrote:
>
> > > x var nib
> > > Data "BetsywasaGoodOlegirl"
> > > for x = 0 to 20
>
> Also x needs to be a byte if it is to go above 15
>
> >You need to initialize the outputs. If you're just using four bits, do this:
> >DirA = %1111
> >... or for eight bits:
> >DirL = %11111111
> >-- Jon Williams
> >-- Parallax
> >
> >In a message dated 4/13/02 10:12:05 PM Central Daylight Time, leroy@f...
> >writes:
> > > I am trying to read a four bit value stored in eeprom and place into the
> > > first 4 or 8 outputs. Any ideas about why the following doesn't work?
> > > Thanks for your help..
> > > Leroy
> > >
> > > '{$STAMP BS2}
> > > 'Write the values to EEPROM.
> > >> CHARACTER var byte
> > > x var nib
> > > Data "BetsywasaGoodOlegirl"
> > > for x = 0 to 20
> > > READ x, CHARACTER
> > > outa = CHARACTER
> > > pause 2000
> > > outa = 0
> > > debug bin CHARACTER
> > > debug " :", dec x
> > > debug CR
> > > next
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>'for x = 1 to 20'
>
>the compiler assumes decimal, not hex?
Yes, it is always decimal, unless you specify $20 for hex.
x has to be defined as a byte in either case, because a nib can only
hold values up to 15, $0f.
>And if I wanted to write the values as a hex number I would write what ?
>
>Also the statement: Data "BetsywasaGoodOlegirl" places number patterns
>in the eeprom. Could I specify those patters in binary? Also, what is
>the size limitataion of the eprom for this type of storage?
Any of the following puts exactly the same numeric values in memory:
Data 66,101,116,115,121,....
Data $43,$65,$74,$73,$79,.. ' represented as hex
Data %01000010,%01100101,%01110100,%01110011,%01111001,... ' binary
>thanks so much for help. I am sure these questions are in the manual,
>somewhere, I just don't know where they are..
They are in the introductory section where it talks about variables,
and also (in the version 2.x manual) in the command reference under
"DATA" (but not under "RTFM"!).
-- regards,
Tracy Allen
electronically monitored ecosystems
mailto:tracy@e...
http://www.emesystems.com
>Leroy
>
>Tracy Allen wrote:
> >
> > > > x var nib
> > > > Data "BetsywasaGoodOlegirl"
> > > > for x = 0 to 20
> >
> > Also x needs to be a byte if it is to go above 15
> >
> > >You need to initialize the outputs. If you're just using four
>bits, do this:
> > >DirA = %1111
> > >... or for eight bits:
> > >DirL = %11111111
> > >-- Jon Williams
> > >-- Parallax
> > >
> > >In a message dated 4/13/02 10:12:05 PM Central Daylight Time,
>leroy@f...
> > >writes:
> > > > I am trying to read a four bit value stored in eeprom and
>place into the
> > > > first 4 or 8 outputs. Any ideas about why the following doesn't work?
> > > > Thanks for your help..
> > > > Leroy
> > > >
> > > > '{$STAMP BS2}
> > > > 'Write the values to EEPROM.
> > > >> CHARACTER var byte
> > > > x var nib
> > > > Data "BetsywasaGoodOlegirl"
> > > > for x = 0 to 20
> > > > READ x, CHARACTER
> > > > outa = CHARACTER
> > > > pause 2000
> > > > outa = 0
> > > > debug bin CHARACTER
> > > > debug " :", dec x
> > > > debug CR
> > > > next
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
stamp to make it stop working? the manual says its like 10e6 or something
bwahahaha...?