Pages: [1]   Go Down
Author Topic: Storing volatile data in Flash Memory  (Read 827 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using an Arduino Mega ADK, which has 256kB of flash memory.

I would like to be able to store a 32kB array in flash memory. I can send this data to the arduino through the serial port from matlab. Ideally I would like to send the data from matlab, store it in the flash memory for a little while and access it as I please, then replace it with another 32kB block.

I realize that I could use external memory parts and they would probably be faster and what not, but that's not what I'm interested in. I would like to keep circuit complexity to an absolute minimum and being able to store volatile data in flash memory would be very useful.

Is there any way of doing this?

Thanks!

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm using an Arduino Mega ADK, which has 256kB of flash memory.
Otherwise known as program memory, which is read-only at run time.

Quote
I would like to be able to store a 32kB array in flash memory.
You can.

Quote
I can send this data to the arduino through the serial port from matlab.
Ooh, not that way, though.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So this is not possible?

My sketch is currently able to recieve data from matlab via the Serial.readBytes() command. I currently only read 1kB at a time, then send it to a DAC.

I'm just looking to send all the data at once and store it in program memory then access and change it while my sketch is still running.

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm just looking to send all the data at once and store it in program memory
That is the part you can't do.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Only option I can think of is to use an external memory module. May I suggest buying an SD card module (like the one Adafruit sells), hooking it up and then using Serial.read() and saving all the data to the card and after all the data is on the card, then access it through your program. Total cost around 20 USD and you can have gigabytes of storage.
Logged

Pages: [1]   Go Up
Jump to: