CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Minimising EEPROM read and write times

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

Minimising EEPROM read and write times
PostPosted: Sun Mar 20, 2005 7:59 am     Reply with quote

Hi,

How can one minimise EEPROM ( 24LC256 etc.) read and write times, I think they generally take 5 Msec.

thanks
arun
Ttelmah
Guest







PostPosted: Sun Mar 20, 2005 8:46 am     Reply with quote

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: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Mar 20, 2005 8:59 am     Reply with quote

or use FRAM and get instant (no delay) reads/writes AND full code compatibility with the 24C256
Ttelmah
Guest







PostPosted: Sun Mar 20, 2005 9:14 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Sun Mar 20, 2005 10:22 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group