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

Storing to EEPROM

TCTC Posts: 1,019
edited 2014-02-10 08:12 in Propeller 1
Hello all,

I know this will be an easy question to answer for most of you.

I just bought a 24LC512 EEPROM for my prop, I was planing to use the extra space for storage of data that the prop could use. I not saying programing space, but parameters for objects. I should've thought ahead, but to late. I know there has to be a way to read and write to locations $1_000 to $8_000. Would I use a I2C object, and make the address %1010000 ? Or is there another way of doing it?

Thanks
TC

Comments

  • PublisonPublison Posts: 12,366
    edited 2014-02-10 04:36
  • max72max72 Posts: 1,155
    edited 2014-02-10 04:36
    I use Kye's I2C_romengine
    http://obex.parallax.com/object/23

    Very easy to use..
    Massimo
  • TCTC Posts: 1,019
    edited 2014-02-10 04:57
    Publison wrote: »
    max72 wrote: »
    I use Kye's I2C_romengine
    http://obex.parallax.com/object/23
    Very easy to use..
    Massimo

    Great Thank you both.

    If I may ask, What is "arbitary page"? and what could it be used for?
  • Heater.Heater. Posts: 21,230
    edited 2014-02-10 05:34
    EEPROMS work on pages at a time. A page is 64 bytes (or is it 128, I'd have to check).
    To change any data a whole page has to be erased and then rewritten. Even if you are only updating a BYTE, WORD, or LONG within the page.
    So working on pages will be much quicker if you are updating a lot of BYTES or whatever within it.

    "arbitary page" just means you can read and write any page you like when you like. See dictionary.
  • TCTC Posts: 1,019
    edited 2014-02-10 05:43
    Heater. wrote: »
    EEPROMS work on pages at a time. A page is 64 bytes (or is it 128, I'd have to check).
    To change any data a whole page has to be erased and then rewritten. Even if you are only updating a BYTE, WORD, or LONG within the page.
    So working on pages will be much quicker if you are updating a lot of BYTES or whatever within it.

    "arbitary page" just means you can read and write any page you like when you like. See dictionary.

    Ahh, now I get it. Thank you.
  • max72max72 Posts: 1,155
    edited 2014-02-10 07:19
    About the page... If I remember correctly there also is a kind of rollover in the page.
    Out of memory it is something like that.. if you increase the index in the page and go over the end of the page you start from the beginning of the same page, not in the next.
    Massimo
  • JonnyMacJonnyMac Posts: 9,107
    edited 2014-02-10 07:40
    For the EFX-TEK EZ-8+ which stores digital sequences in the upper 32K of a 64K EEPROM, I created the attached object.

    There are a couple methods in the object that help with the paging issue. For the 24x512, the page size is 128 bytes.
  • TCTC Posts: 1,019
    edited 2014-02-10 08:11
    max72 wrote: »
    About the page... If I remember correctly there also is a kind of rollover in the page.
    Out of memory it is something like that.. if you increase the index in the page and go over the end of the page you start from the beginning of the same page, not in the next.
    Massimo

    Thank You, I am new to using the EEPROM like this, and I would've never thought of that.
  • TCTC Posts: 1,019
    edited 2014-02-10 08:12
    JonnyMac wrote: »
    For the EFX-TEK EZ-8+ which stores digital sequences in the upper 32K of a 64K EEPROM, I created the attached object.

    There are a couple methods in the object that help with the paging issue. For the 24x512, the page size is 128 bytes.

    Wonderful, Thank you very much.
Sign In or Register to comment.