Shop OBEX P1 Docs P2 Docs Learn Events
Static RAM? — Parallax Forums

Static RAM?

EliEli Posts: 3
edited 2007-12-19 04:06 in Propeller 1
Hello,


I was wondering if the propeller chip has any free EEPROM or static RAM space available. I want to be able to save a user-given value so that it is not erased when the processor is reset. Any ideas or suggestions regarding this would be greatly appreciated. Thanks.

--Eli

Comments

  • RaymanRayman Posts: 14,162
    edited 2007-12-18 17:55
    Somebody from Parallax posted a cool object that saves your variables back into the EEPROM from whence it came. Doing it this way, you don't need any extra EEPROM and it's very easy to use... I used it in my Delay Generator Demo here:

    http://www.rayslogic.com/propeller/Programming/RaysStuff/RaysStuff.htm

    I think it's part of the PE Education kit, if you want to search for that...
  • henkhenk Posts: 1
    edited 2007-12-18 21:56
    Use the Eprom object from the object exchange
    See example code from a small f\project that had to save and reload preset timers values

    CON MaxTimes = 6 'Allow for 6 timer presets
    VAR Long Time[noparse][[/noparse]MaxTimes] 'Timers preset value
    OBJ
    Eeprom : "Eeprom"


    PRI SaveVars '' Save timers to eeprom
    Eeprom.VarBackup(@Time,@Time+4*MaxTimes-1)
    ser.str(string( CR, LF, " Timers saved.. ", CR, LF))

    PRI LoadVars | n '' Load timers from eeprom
    eeprom.VarRestore(@Time,@Time+4*MaxTimes-1)
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-12-19 04:06
    Eli, the protoboard has an eeprom that is twice as big as the PEKit's. The upper half is strictly under programmer's control. Data placed there can only be changed by your own program.
Sign In or Register to comment.