I don't know what I didn't already explain.
But..
When you program your device, make certain that you erase the EEPROM to all '0's'.
Now if you want to write to the EEPROM
READ 1023,WriteStart.LowByte
READ 1024,WriteStart.HighByte
Now write your data -
WRITE WriteStart,(your data goes here)
WriteStart = WriteStart + 1
Now write back the value of WriteStart so it can be the starting address
the next time you WRITE. Every time you issue a WRITE, you need to
increment WriteStart. When you are done writing (or even after every WRITE
if you really want to protect against power failure).
WRITE 1023,WriteStart.LowByte
WRITE 1024,WriteStart.HighByte
Charles Linquist
Just don't make the mistake I just did. The highest address on a 1024 byte EEPROM is 1023!
Charles Linquist
Bookmarks