View Full Version : storing data on the EEPROM
01-22-2009, 11:51 AM
Is it possible to record/read just a few bytes to the eeprom so my code can have a starting point on powerup? Has this been discussed?
01-22-2009, 12:44 PM
It's been discussed many times. There are several objects in the Propeller Object Exchange that will do the I2C I/O to the EEPROM. The simplest to use is the Basic_I2C_Driver, but there are also easy-to-use routines in the BS2 Compatibility Library.
Basically, everything from the end of your program (as shown by the Propeller Tool memory map) to the end of the EEPROM is available. If you download a new program to the EEPROM, the first 32K (or the entire 32K) of the EEPROM will be erased, so keep that in mind. There are other fancier schemes, but I suggest that you use the last few bytes of the EEPROM if 32K or the first few bytes of the 2nd 32K if you have a 64K EEPROM (like on the Protoboard).
01-22-2009, 07:25 PM
Thanks Mike I should have looked there first. I was thinking the very end of the EEPROM too. I thought the EEPROM would be erased when programmed but a simple test byte will help with that.
01-22-2009, 10:12 PM
Can the propeller use the 1025k bit (128k byte) version of this eeprom? (24lc1025)
01-22-2009, 10:27 PM
Fred, Absolutely. The Hydra has a 128K byte EEPROM as the on-board EEPROM and, when you plug in an expansion card, you have two of them. The newer AT24C1024B allows you to have 4 on a pair of I/O pins for a total of 512K bytes.
01-22-2009, 11:48 PM
Make sure you tie A2 on 24LC1025 high (as instructed by the datasheet). I use 24LC1025 with Propeller all the time.