View previous topic :: View next topic |
Author |
Message |
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
Minimising EEPROM read and write times |
Posted: Sun Mar 20, 2005 7:59 am |
|
|
Hi,
How can one minimise EEPROM ( 24LC256 etc.) read and write times, I think they generally take 5 Msec.
thanks
arun |
|
|
Ttelmah Guest
|
|
Posted: Sun Mar 20, 2005 8:46 am |
|
|
Read is already quick. It is a write 'cycle' that takes nominally 5mSec. However it'll often take less (it varies with temperature, and from chip to chip). You can wait the minimum amount of time, by 'polling' for the acknowledge (the CCS code examples do this already). However as was pointed out in a thread here only a few days ao, a 'write' on such a chip, can be a 'block write'. With this up to 64 bytes are written in one go. I posted an example of how to approach writing this in the thread, which Mark then tidied up (but only for the 16byte buffer used on smaller chips).
The thread was:
<http://www.ccsinfo.com/forum/viewtopic.php?t=22237&sid=02442278402888e508a3b432da75db18>
Best Wishes |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Sun Mar 20, 2005 8:59 am |
|
|
or use FRAM and get instant (no delay) reads/writes AND full code compatibility with the 24C256 |
|
|
Ttelmah Guest
|
|
Posted: Sun Mar 20, 2005 9:14 am |
|
|
Yes. FRAM is a very good solution. I have used it fairly extensively myself, and it is only the very cheap prices of EEPROMs, and their availability from multiple manufacturers, that keep them from being superceeded by this technology. In the same thread, I suggested these.
Best Wishes |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sun Mar 20, 2005 10:22 am |
|
|
The actually reading of the data from the flash is very fast. The slow part is the actual addressing of the chip and transfering the data. The read speed can be improved, however, using the same approach as the page writes. Reading sequential bytes saves the overhead of addressing the chip. For example to read 2 bytes you might do the following sequence:
1. Address the device write mode
2. Write the address that you are reading
3. Adress the device in read mode
4. Read the data
5. Address the device write mode
6. Write the address that you are reading
7. Adress the device in read mode
8. Read the data
Now a faster way:
1. Address the device write mode
2. Write the address that you are reading
3. Adress the device in read mode
4. Read the data
5. Read the data
Notice that we saved 3 "byte times" by doing a sequential read on just 2 bytes. That's only 60% of the time required for single byte access.
What if we did 16 bytes that would be 64 byte times vs 20 byte times. |
|
|
|