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 support@ccsinfo.com

Which is faster eeprom write/read or program mem write/read?

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



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

Which is faster eeprom write/read or program mem write/read?
PostPosted: Mon Oct 12, 2009 1:58 am     Reply with quote

Need info. Which is faster, i2c eeprom write/read or writing/reading chip
program memory ? And this for 18f2550.

Thanks and Regards,
Jaikumar.
Ttelmah
Guest







PostPosted: Mon Oct 12, 2009 2:25 am     Reply with quote

More complex than it might seem...
Read, is basically instantaneous. The time involved is setting up what address to access.
What takes the longest time, is _erase_. Typically 4mSec.
When talking to the EEPROM, the a byte 'write' cycle, is an erase/write cycle, so takes normally 4mSec (some of the latter chips have a faster cycle than this).
For the program memory, the erase block, is normally larger than a byte, so you have a 'block erase time (typically the same as the EEPROM erase), and then a 'write' time, which is normally faster, at perhaps 1mSec to 2mSec. Writing a single byte, is then slower (erase a block, then write a byte), but writing a few bytes is faster than writing the same number of bytes on the EEPROM, since you will normally have only one erase.
You then have to look carefully at which function you are using. Using 'write_program_memory', with a _block_ of data, that is the same size as the chip's erase block, will be faster to move the whole block, than to move a similar sized block to the EEPROM, but writing a single _byte_ to the EEPROM, will be faster than moving a byte to the program memory.

Remember to 'beware' the shorter write life of the program memory...

Best Wishes
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Mon Oct 12, 2009 3:43 am     Reply with quote

Thanks for the info Ttelmah.

for my particular application, which is to read a pre programmed time info from eeprom/program memory and compare with and then turn on a alarm.

Which will be faster, As you have said above i think it will be the program memory am i right. Also let me know if the no of write time for program memory is the same as eeprom which is 100,000 write cycle.

Regards,
Jai Kumar.
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