Basic Stamp and EEPROM Write/Read?
#1
Thread Starter
Junior Member
Joined: Jul 2003
Posts: 1
Likes: 0
Received 0 Likes
on
0 Posts
From: Denmark
Does anybody have experience with writing data to and reading data from the Basic Stamp 2 EEPROM?
First I write some data to known positions at the EEPROM. Then I start reading and checking them in the debugging window, but only the first two are correct, and the rest is corrupted. Also in the same moment there are problems with the program execution, it loops without an exit...
Has somebody an idea what is going on?
Thank you in advance.
Petar
First I write some data to known positions at the EEPROM. Then I start reading and checking them in the debugging window, but only the first two are correct, and the rest is corrupted. Also in the same moment there are problems with the program execution, it loops without an exit...
Has somebody an idea what is going on?
Thank you in advance.
Petar
#2
Senior Member
Joined: Sep 2002
Posts: 1,373
Likes: 0
Received 0 Likes
on
0 Posts
From: Rochester,
NY
Unless you end the program intentionally it will automatically loop once it hits the end of code. The Read and Write commands start at the very end of memory and work their way forward (to avoid hitting stored code) If you're reading/writing from an area of the eeprom that has code stored in it you're probably corrupting your program and causing it to tweak. Read the on-line PDF manual, it covers all of this in detail. What are you reading/writing to eeprom for? This will shorten the life of your stamp if you do it too often as there is a finite number of read/writes to eeprom. I would highly recommend adding a serial ram chip to your stamp setup instead of using eeprom. Eeprom is only really useful for extremely long term storage when power may be intermitant.



