Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
David Prentice
12/28/11 13:39
Read: 396 times

#185227 - Thankyou for your input
Responding to: Per Westermark's previous message
The subject arose because I wanted to replace at Atmel chip (real EEPROM) with a Chinese STC12C5Axx single-clocker.

A 1k of real EEPROM is very convenient for non-volatile data. Each location may be altered 50-100 times a year. So it is neither once-only nor 'data logger'. Nor is the endurance much of an issue.

The STC chips offer 1k to 28k of 'Flash eeprom' so space is not an issue.

1. maintaining a linear 'array' means a copy-erase-write of a whole 512 byte sector. e.g. 21ms erase + 56ms write (max) if copy is in __XDATA. Almost every time a byte is changed. This is a serious number of sector-erases.

2. maintain a linear 'array'. If the byte is invalid, write a 0 and store the new value in a secondary array. This gives a rapid 'lookup_eeprom(loc)' function involving a maximum two reads. This uses twice the number of sectors, but reduces the need to copy-erase-write dramatically.

3. the linked list or flagged block structure suggested by Erik will also use more sectors. The lookup_eeprom(loc) algorithm could involve a lot of reads in the worst case.

4. A data-logger can generally start from erased sectors, and never overwrites. It suits flash-pages.

My (2) method is fairly complex but it works. I was just surprised at how awkward paged-flash is to manage. And how simple the Atmel eeprom is to use!

Yes. A 24Cxxx eeprom gives byte access and typical 4ms write time. It is an extra chip though.


p.s. Jan, what is the Basic-52 trick?

List of 6 messages in thread
Strategy for 'FLASH' eeprom      David Prentice      12/27/11 08:17      
   depends      Jan Waclawek      12/27/11 10:59      
   comments      Erik Malund      12/27/11 11:22      
      Avoid flash if you can - unless having wear-leveling chip      Per Westermark      12/27/11 21:13      
         Thankyou for your input      David Prentice      12/28/11 13:39      
            poor tips and no tricks      Jan Waclawek      12/29/11 07:29      

Back to Subject List