Go Down

Topic: Use 23LC1024 as Arduino Uno's entended SRAM (Read 903 times) previous topic - next topic

ChrisRhw

Hi everyone,

I would like to know if it's possible to use the 23LC1024 SRAM Chip as an extend of Arduino Uno's SRAM.

Here is the explication:

I would like to take GPS data every 15 seconds with a SIM908 Chip, store it in a buffer, and send all the datas every 10 minutes by POSTing in my Web Server.

The problem is that 10 minutes of data takes about 3k of SRAM. Additionally, I would like my program to be able to store the data for 1 or 2 hours in case of networks problem, so it would take a huge amount of SRAM.

I havent buyed the SRAM chip yet, it's just a question before i'm buying it.

Thanks in advance !

Smajdalf

#1
Apr 20, 2016, 01:54 pm Last Edit: Apr 20, 2016, 02:00 pm by Smajdalf
Why it shouldn't work? But I think you could use large EEPROM instead which will be much cheaper I guess.

EDIT: well it looks like the cost is similary neligible.
On 8-bit (i.e. Uno) use "byte" instead of "int" if possible - it is faster and saves resources!

Whandall

You could use an SD-card which basically is just a big flash, and it's replaceable if worn out.
Ah, this is obviously some strange usage of the word 'safe' that I wasn't previously aware of. (D.Adams)

Smajdalf

You could use an SD-card which basically is just a big flash, and it's replaceable if worn out.
He has only 3k (bytes?) of data to record every 10 min. It is around 1Gbit data per year. If he bought 1Mbit EEPROM he would need 1k writes per year so it would take more than 100 years to wear out the EEPROM. If he bought 4GB SD card he could write the data for over 20 years before need for first erasing so it would take eternity to wear the SD card out ;-)
It looks all of this solutions are viable, cost is comparable, all have some advantages/disadvantages:
SRAM is volatile, in case of loss of power unsent data are lost
EEPROM takes more time to write, if used carelessly it may be worn out
SD card need level converting and I think it needs more energy and is more complex to use but can log the data for many years without need for rewriting them
On 8-bit (i.e. Uno) use "byte" instead of "int" if possible - it is faster and saves resources!

chucktodd

#4
Apr 20, 2016, 11:41 pm Last Edit: Apr 20, 2016, 11:45 pm by chucktodd Reason: Spelling
Hi everyone,

I would like to know if it's possible to use the 23LC1024 SRAM Chip as an extend of Arduino Uno's SRAM.

Here is the explication:

I would like to take GPS data every 15 seconds with a SIM908 Chip, store it in a buffer, and send all the datas every 10 minutes by POSTing in my Web Server.

The problem is that 10 minutes of data takes about 3k of SRAM. Additionally, I would like my program to be able to store the data for 1 or 2 hours in case of networks problem, so it would take a huge amount of SRAM.

I havent buyed the SRAM chip yet, it's just a question before i'm buying it.

Thanks in advance !
I use the 23LC512 all the time.  It is a 64k SPI RAM,  very easy to use. Just initialize it to sequential access, a Read or Write sequence just takes a one byte cmd, a two byte address and a buffer containing the data.


No wearout problems, no waiting after a write command.  Consistent access times.
No complex library needed, Code overhead can be as small as a single 16bit word for data length.

As long as you can survive a power failure loosing all of your data the 23LC512 or LC1024 work great for temp storage. The LCV* versions also support a battery backup feature for persistent memory.

Chuck.
Currently building mega http server 90% done, the Last 10% is killing me.

ChrisRhw

Thanks for your quick answers!

Why it shouldn't work? But I think you could use large EEPROM instead which will be much cheaper I guess.
Yeah I tought about it, but ROM mean Read Only Memory, isn't it ? I need to remove the data each time I successfully send it to the network so wouldn't it be a problem ?

You could use an SD-card which basically is just a big flash, and it's replaceable if worn out.
In the same idea. Can I write/read/erase data as fastly/easily as with a SRAM Chip ?

SRAM is volatile, in case of loss of power unsent data are lost
EEPROM takes more time to write, if used carelessly it may be worn out
SD card need level converting and I think it needs more energy and is more complex to use but can log the data for many years without need for rewriting them
In my case, even if I lose 2/3 hour of data, I don't think this would be a problem.
But as you say, I don't know if the EEPPROM is able to store the data as fast as I need it, and I don't think SD Card would be a bad idea but energy is also an important aspect of my project, so i'll have to think about it.

I use the 23LC512 all the time.  It is a 64k SPI RAM,  very easy to use. Just initialize it to sequential access, a Read or Write sequence just takes a one byte cmd, a two byte address and a buffer containing the data.


No wearout problems, no waiting after a write command.  Consistent access times.
No complex library needed, Code overhead can be as small as a single 16bit word for data length.

As long as you can survive a power failure loosing all of your data the 23LC512 or LC1024 work great for temp storage. The LCV* versions also support a battery backup feature for persistent memory.

Chuck.
Yeah, I think that's the best idea. I thought about the LC512, but I think that it would be better to store more data in case of networks problems.So I think i'll buy the LC1024, thanks!

Smajdalf

Yeah I tought about it, but ROM mean Read Only Memory, isn't it ? I need to remove the data each time I successfully send it to the network so wouldn't it be a problem ?
...
In the same idea. Can I write/read/erase data as fastly/easily as with a SRAM Chip ?
...
But as you say, I don't know if the EEPPROM is able to store the data as fast as I need it, and I don't think SD Card would be a bad idea but energy is also an important aspect of my project, so i'll have to think about it.
EEPROM = Electrically Erasable Programmable Read Only Memory. You can erase it, they used to have very limited amount of erase cycles, but now they usually have at least 100k cycles guaranteed. SD card/flash has similar technology as EEPROM. Both have loooong write time - considered from processor's point of view. It is usually less than 5ms - if you want to take data each 15 sec you don't have to care about the write time.
Our local shop has only a few SRAMs and they are far more expensive than EEPROMs. But over the internet the costs are similar so you may use either. The SRAM solution would be easier to use if you you are not afraid of data loss due to power failure.
On 8-bit (i.e. Uno) use "byte" instead of "int" if possible - it is faster and saves resources!

ChrisRhw

Ok, finally I was asked to find a solution to store data for 2 or 3 month, so I think SD Card is the only method left x).

Thank you very much for your help!

Go Up