Log in

View Full Version : How many memory ? :confused:



nquere
- 24th October 2009, 00:05
Hi,

Can you help me to calculate how many bytes take this: "ddmmyyyy;hh:mm:ss;XX" (whitout the quotes) ?

I must know how many bytes i need to buy my external memory to save this datas. It's a string that i want to save. I will analyse it when i will read the memory.

Sorry for my english ^^

Regards,
Niko

Charles Linquis
- 24th October 2009, 01:49
If you are storing the data in ASCII, each character or number DIGIT takes one byte.

nquere
- 24th October 2009, 16:43
Ok, so i need 22bytes.

22b x (48 acquisitions x 30 days) = 31680 bytes.

I think that a memory of 32Kb is good :)

What sort of external memory can i use ?(cheapest !)

Regards,
Niko

ScaleRobotics
- 24th October 2009, 17:12
"ddmmyyyy;hh:mm:ss;XX"

You could compress your data a little bit.

For instance, one byte for "dd" ( 1 to 31 )
one byte for mm (1 to 12)
one byte for yy, and one for the other half of yy
etc. etc.

That would decrease your requirements by half. So maybe you could use a large Pic chip. But if you need to go to external, it is probably not worth it, as you will have ample space.

aratti
- 24th October 2009, 17:13
You could use "24AA32" which is 32K serial EEPROM. See datashet @ http://pdf1.alldatasheet.com/datasheet-pdf/view/74858/MICROCHIP/24AA32.html

Al.

nquere
- 24th October 2009, 23:39
OK !

So, i finaly use:

dd |/| mm |/| yy yy |;| hh |:| mm |:| ss |;| XX => 22bytes
dmy;h:m:s;X => 11 bytes !

11 x (48 x 30) => 15840 bytes => 16k EEPROM !! :)

I think i will buy a "24AA16" :)

Thank you :)

nquere
- 25th October 2009, 00:14
Cool and thanks Ebay :)

I have sell 30 pieces of 24C16 for 14$ :)
Now i have 480Kb free for my mini-projects ^^

nquere
- 25th October 2009, 10:55
*buy of course, not sell.