View Full Version : EEPROM access on Spin Stamp

05-20-2008, 10:19 AM
Hey experts, I'm thinking about using a Spin Stamp for a project currently run on Javelin. One issue is I have a large SROM (config file) for an external device. In order to save RAM space I store it in the EEPROM of the javelin and transfer it one byte at a time during start up.

Can I get the same access to the Spin Stamp's on board 32kb EEPROM? Flipping through the datasheet and the manual I don't see a way to write and read from the EEPROM aside from the automatic startup that loads the bootloader and program into RAM.

Thanks, Josh

P.S. Just so you know I'm not reading and writing to the EEPROM constantly. I have one program that loads the SROM (which doesn't ever change) into EEPROM, and another program that actually runs the project. I only run the SROM loader once, the other program then gets loaded on and updated as the code changes. The SROM is only read after that.

Mike Green
05-20-2008, 10:35 AM
The only problem with using the EEPROM this way is that the entire first (or only) 32K gets replaced whenever you download a program to the Propeller. It would be easier for you to include the configuration data as a constant file that's part of the program. There's a directive (FILE) that does this. Look at the examples in the Propeller manual. There's no disadvantage to doing it this way because the entire Propeller program is loaded from the EEPROM into RAM anyway on boot up.

05-20-2008, 10:46 AM
Mike, thanks for the quick reply. The reason we were doing this with the Javelin was because we were running low on RAM and didn't really need this whole thing in RAM anyway. Will the result be similar with the FILE directive?


Mike Green
05-20-2008, 11:18 AM
Again, the Propeller uses EEPROM and RAM very differently from the Javelin. You've got 32K of RAM which holds the program, variable data and constant data. This whole 32K is loaded from the first 32K of the EEPROM. If you had more than 32K of EEPROM, you could store your configuration information above 32K and access it with any of several I2C drivers available from the Propeller Object Exchange, you wouldn't need the FILE statement, and the information wouldn't need to occupy RAM. With the Spin Stamp, this is not an option.