PDA

View Full Version : Using serial eeprom to save data ?



iugmoh
- 6th February 2008, 20:03
I need your advices in the suitable way to save information (data) for about 10,000 students where each student have at least 11 bytes ( 88 bits) , is't an efficient way to use serial eeproms like 24Cxxx to save data or the porcess will be slow and what it expected time will be if we need to seach for specific number of student ?

skimask
- 6th February 2008, 21:28
I need your advices in the suitable way to save information (data) for about 10,000 students where each student have at least 11 bytes ( 88 bits) , is't an efficient way to use serial eeproms like 24Cxxx to save data or the porcess will be slow and what it expected time will be if we need to seach for specific number of student ?

Well, let's see what a quick search and a bit of math can do for us...shall we?
10,000 students @ 11 bits each = 88,000 bits.
Dealing with 11 bits isn't worth the pain, so call it 16 bits, in other words, 2 bytes.
10,000 students @ 2 bytes each = 20,000 bytes.
Hmmmm....20,000 bytes....roughly equates to 20KB....Hmmmm....
AHA!!!!
A standard, run of the mill 24LC256, 32K x 8 serial eeprom can easily hold 10,000 students with plenty of room to spare.
Hmm...let's download the datasheet and see what it says...
Datasheet says that it takes about 5ms to write a byte or a page (which according to said datasheet is 64 bytes).
So, I'll just assume we're going to write one byte at a time...
A completely full 24LC256 has 32,768 bytes.
32,768 bytes x 5ms each = 163.84 seconds for a complete write of a 24LC256.
A page write would be about 64 times as fast (because a page is 64 bytes and a byte is one byte).
32,768 / 16 bytes/page x 5ms = 2.56 seconds plus the time it takes to write each byte in a page, maybe another few seconds.
Well now, that wasn't so hard...was it? Didn't even need a calculator.
Notes:
-Reads are much faster than writes.
-An FRAM (www.ramtron.com) would be a much better option here. Write times are much faster, and they don't wear out.
-A good search engine can work wonders

Darrel Taylor
- 6th February 2008, 21:33
11 bytes ( 88 bits)
Added:
10,000 students @ 11 bits each = 88,000 bits.
Dealing with 11 bits isn't worth the pain, so call it 16 bits, in other words, 2 bytes.

:eek:  

skimask
- 7th February 2008, 17:00
Added:
:eek:  

Well, I did say that I didn't even need a calculator....RIGHT? :D I could've SWORE that it said 11 bits...

Nonetheless, the idea still remains...
Except now the address pins on the 24LC256 might have to be used to put 4 of them on the same PCB.
Or use I2CRead/Write with 2/3/4/5 different sets of pins to address the individual chips.
Still not much of an issue is it?

iugmoh
- 8th February 2008, 08:36
thanks alot for your information which help me very much , but I want to ask what about using usb stick flash disk I think it's a powerfull idea which it's easy to remove it and connect to PC to save data then connect to PIC to make interface for reading and writing in a quick manner, but how ?