Bs2sx eprom mayhem
nick bernard
Posts: 329
HAIL YOU GUYS!
my bs2sx is having a major malfuction. i have a bs2sx monitorying a vital alarm system. there are 48 switches which are buffered and sucked into the stamp via a PISO shift register. there is a delay function where the status of each point counts up to a contant then triggers an alarm. the status of each point is stored into a byte in the stamps eprom.
for no apperant reason 2 of the bytes in the eprom will count up to 3 then reset to 0, and 2 other bytes will count up to 222.... niether of these values have any significance in the program.....
the catch is that the faulty code runs fine fine on a new bs2sx
also on the problomatic stamps the problem follows those 4 eprom locations and can be fixed by adding an offset to my read writes...
has anyone experianced such a problem...
rox on
nickB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
my bs2sx is having a major malfuction. i have a bs2sx monitorying a vital alarm system. there are 48 switches which are buffered and sucked into the stamp via a PISO shift register. there is a delay function where the status of each point counts up to a contant then triggers an alarm. the status of each point is stored into a byte in the stamps eprom.
for no apperant reason 2 of the bytes in the eprom will count up to 3 then reset to 0, and 2 other bytes will count up to 222.... niether of these values have any significance in the program.....
the catch is that the faulty code runs fine fine on a new bs2sx
also on the problomatic stamps the problem follows those 4 eprom locations and can be fixed by adding an offset to my read writes...
has anyone experianced such a problem...
rox on
nickB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
Comments
·· HAIL!· LOL· Without seeing your code I cannot be sure, but I can tell you what I suspect is happening...You mentioned counting using the EEPROM...Depending on how often the EEPROM is being written to, you may very well have worn out those locations on the EEPROM.
·· You see, EEPROMs have a finite number of write cycles before they wear out.· It's usually 1 to 10 million writes depending on the EEPROM (Some are lower, even).· But the point is, if you have a loop constantly writing to the EEPROM, you're exceeding the life expectancy of the device in a really short time.· I won't bother to get into the math...Tracy Allen has covered this several times in the past regarding data logging.
This page says 1,000,000 cycles...·· http://www.parallax.com/html_pages/tech/faqs/gnrl_info.asp
I think it works out so that if you're writing to the EEPROM 10 times per second, it will be past it's expected life in 69 days.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
i'm read writing twice a second....
this is horrible... if 1 million writes is an average... then that explains why some locations fall out much sooner....
whoa is me
i thought
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
You may have to re-think the number of writes per given time-period.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
i just switched my read statements to get and writes to put....
please dont tell me that there are a limited number of writes to the scratch pad....
i just wanted the stamp to remember the state of the system in case of a reset or powerloss....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
It's not safe against powerloss, either...
If you need that, I would suggest either getting some sort of non-volatile memory chip and connect to the BS2sx, or making darn certain that you never lose power.(Battery backup)
This way your EEPROM stored program state is only a few tens of seconds old, AND you can extend the life of your EEPROM.
well my system is backed up by a ups.... and the memory preservation is more of a perk than a necessity....
ROX ON
nickB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
One thing we did years ago on a Z80 system (Or was it a 6502 system) was we used a circuit on the Input side of the power supply to detect power loss, then had that generate an IRQ to save the system settings into SRAM (Which was battery backed using a Dallas Semi Smart Socket)...On power-up the system would fetch the settings from the SRAM chip.
Obviously many choices...But one isn't writing to the EEPROM that often...hehe
Well, before I forget to mention it, yet again...Parallax could inexpensively repair that BS2 that you over-wrote the EEPROM on...That should be an easy repair.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
yeah i have 3 faulty stamps that will have to make a trip back to parallax for repairs... if it is inexpensive... thx for that nibble of info...
rox on
nickB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·