Shop OBEX P1 Docs P2 Docs Learn Events
Writing to the EEPROM — Parallax Forums

Writing to the EEPROM

kt88seampkt88seamp Posts: 112
edited 2009-11-20 01:38 in Propeller 1
A future prop app of mine will involve nonvolitile storage. I have been poking around in the object exchange for objects that read+write to the prop's eeprom. I do know the prop uses the eeprom to store its programs . A concern of mine is if you can loosely write to the eeprom (I think I will use the eeprom function found in the BS2 for prop object)·you may overwrite critical information that is already stored by the prop for its program. How does the prop address and store its program? Does it start at the beginning (zero)·and work its way up to·the top? What i am trying to figure out is a safe place (address)·in the eeprom to start·storing my data. Is that where the memory map comes in handy?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-19 04:10
    The Prop program starts at EEPROM location zero and goes upward in address. The "memory map" shows you how high in memory the program goes. You're safe writing from the high end of memory (32K -> $7FFF) downwards.
  • kt88seampkt88seamp Posts: 112
    edited 2009-11-19 04:17
    Does the number (lets say 0x7FFF) when you address memory represent the last bit or byte in memory?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-19 04:21
    EEPROM memory is addressed in bytes only. $7FFF is the last byte in a 32K EEPROM.
  • JonnyMacJonnyMac Posts: 9,385
    edited 2009-11-20 01:38
    To Mike's, point you could spec in a 64K EEPROM (24LC512) and write your values in the range of $8000 to $FFFF -- this would prevent you from ever corrupting the program space.
Sign In or Register to comment.