Shop OBEX P1 Docs P2 Docs Learn Events
Storing data to the eeprom — Parallax Forums

Storing data to the eeprom

John_BJohn_B Posts: 16
edited 2009-07-22 17:05 in Propeller 1
Hi,
I have about 10 longs of configuration data that can be changed by the user. These need to be stored somewhere for the next power up. My first thought was the eeprom - is this possible? If so, how do you access the eeprom and what locations are available? Is there anywhere on the prop chip to·store the data? Any other suggestions?
Regards
John

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-22 13:13
    There are several I2C drivers available in the Object Exchange. The simplest one to use is the "Basic I2C Driver". It allows you to write anywhere in the attached EEPROM. Your program is stored in the EEPROM starting at location zero and the Propeller Tool will tell you how much memory is used. The rest of the EEPROM (up to 32K), although cleared to zeros by the download process, is available for storing data afterwards. Anything past 32K is completely untouched by the download process.

    Usually programs start storing data at the end of the EEPROM. In your case, you could use the last 40 bytes of the EEPROM (locations $7FD8-$7FFF).

    Look at the comments at the beginning of "Basic I2C Driver" for an example of writing data to the boot EEPROM.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-22 13:44
    my id object stores 32 bytes to the end of the boot eeprom. very good example of how to do what Mike Mentioned.

    http://obex.parallax.com/objects/410/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • John_BJohn_B Posts: 16
    edited 2009-07-22 17:05
    I will give that a go.
    Thanks for your help,
    John
Sign In or Register to comment.