Reducing the number of writecycles on EEPROM


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default Reducing the number of writecycles on EEPROM

    I'm working on a DataLogger Project.

    The logger has 1Mbit of EEPROM on Board (2x24FC512)
    and of course it has it's own RTC (DS1307).

    The issue was to remember the last EEPROM address data was written to.
    (even after a RESET or Power failure)

    There are certainly several different approaches like:

    - storing the last used address at a fixed location in EEPROM
    (will wear out those memory cells pretty quickly)

    - "scanning" the EEPROM before each write to find the next unused address
    (will be time consuming)

    etc.

    Agreed,
    using FRAM instead of EEPROM would be another option,
    but having an RTC with 256 Bytes of NVRAM on Board
    I found this is great to "memorize" the EEPROM address last used (and some other stuff).
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    If you Format/Erase your EEPROM to say all $FF, by simple Binary Division you'll be able to determine your last used location in 1Mb of EEPROM using about 20 reads or less. Since reading is near instantaneous and doesn't wear out the EEPROM, even with rubbish code you'll get your answer in under a millisecond.

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Mel,

    you are right,
    but this would mean I have got to "Format" the EEPROM each time
    after I have transfered the Loggers Data to some other system.
    This means an additional write to every memory cell that was previously used.

    By storing the "pointer" in the RTC's NVRAM I could double the lifetime of the EEPROM,
    as I don't have to "clear" the memory, I just reset the pointer in NVRAM.

    or am I missing something here ?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Be warned about RTC's NVRAM...

    With many of them (the DS1307 is one in particular), it's only NV as long as there's some form of power on the chip... remove the main power AND remove the Battery Backup, AND IT WILL lose the contents of NVRAM.

    The use of the letters 'NV' by manufacturers in their literature in some cases is contestable!

  5. #5
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Originally posted by Melanie
    Be warned about RTC's NVRAM...

    ...it's only NV as long as there's some form of power on the chip...
    Melanie, thanks for pointing that out.

    For the current application this shouldn't be much of a problem
    as the RTC has a good lithium battery backup.
    If the Power-Supply AND the backup would fail at the same time
    the Device would need Maintenance anyway, as the RTC would have lost it's Time Setting.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. How to define constants that specify eeprom addresses
    By DwayneR in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th December 2009, 04:07
  3. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  4. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts