Shop OBEX P1 Docs P2 Docs Learn Events
Store variabels in eeprom — Parallax Forums

Store variabels in eeprom

marclamarcla Posts: 19
edited 2008-03-01 23:01 in Propeller 1
Hello!
i have som variabels i want to store so if i turn off the propeller the variable will still be ther how do i do that? eeprom??? i don't want to use an extra eeprom... can a use the code eeprom???


/Martin

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-01 22:04
    Yes.

    Read the chapters in the PBasic Manual on the READ / WRITE statements.
  • OwenSOwenS Posts: 173
    edited 2008-03-01 22:48
    Mike,

    PBasic? Was your brain in Stamp mode?

    In any case, there are objects on the Object Exchange which can write to an EEPROM connected to the I2C bus, including the code eeprom. It's entirely possible to save data back to the code EEPROM.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-01 23:01
    Sorry, I was indeed still in Stamp mode. The "Basic_I2C_Driver" in the Object Exchange has an example of what you want in the comments at the beginning. The upper end of the 32K program EEPROM is normally unused since the program is written beginning at location zero. If you have a Propeller with more than 32K of EEPROM like the Protoboard or the Hydra, everything above the first 32K is yours to use. Neither the Propeller Tool nor the boot loader knows anything about it.
Sign In or Register to comment.