Go Down

Topic: Difference between EEPROM and flash memory (Read 20587 times) previous topic - next topic

CrossRoads

jtw11, how much memory do you need, and how often will you use it?
I'd go with this.
http://www.mouser.com/ProductDetail/Ramtron/FM25640B-G/?qs=sGAEpiMZZMtsPi73Z94q0LVCZPBibhMGLoJvNRrGMO0%3d
64K, SPI, 5V operation. Doesn't have 3.3mS write times like EEPROM, you'll never wear it out.

Vincent19,
Connect up the Arduino ICSP header to the SPI port (lower left) on a board like this, and bring over the additional CS and INT pins from D2-3-4 or wherever.
http://www.mouser.com/ProductDetail/mikroElektronika/MIKROE-127/?qs=%2fha2pyFaduhRbLyvlpnF2i%252bszNIaZu4g3TBVIiMroqnC%2fuqCSuPFAg%3d%3d
Probably a library for this chip somewhere too.
http://ww1.microchip.com/downloads/en/DeviceDoc/21952b.pdf

Available in DIP package also
28-pin PDIP (300 mil)
http://www.digikey.com/product-detail/en/MCP23S17-E%2FSP/MCP23S17-E%2FSP-ND/894276
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Grumpy_Mike


So, how can I expand the IO pins in arduino UNO ?

Lots of ways.
Look at this project of mine, if you down load the schematics there are versions both with and without port expansion.

http://www.thebox.myzen.co.uk/Hardware/Pendulum.html

fungus


I may jump in here, if I may, as I was about to start a thread asking a question that has come about in the last few replies. I'm working on a project at the moment that will ultimately need multiple large look up tables. 4 or 5 tables of 15 x 10 values for example.


That's hardly massive...should fit in progmem.


1) Look up tables are stored in EEPROM yes? If so, I can expand the amount of EEPROM I have by adding an external EEPROM chip?

2) Regarding SRAM, if I understand correctly - this type of memory is used up quickly when performing float calculations, doing serial strings etc - can one also expand SRAM with an external chip? Currently I'm using a 1284P, so have quite an abundance of SRAM - however, I/O requirements may see me needing to up to a 2560 chip.


It all depends on how fast/often you need to look things up...and if you need to write data as well as read it.

There's a lot of 8-pin flash memory chips out there with SPI interfaces of you're mostly reading data.

SRAM is only needed if you're writing/updating the data a lot.

EEPROM is somewhere between the two.

First though, you have to define your speed requirements.
Advanced Arduino

jtw11

It seems then extra RAM is the best option - as I'm reading static values from flash stored by PROGMEM, but than altering them as mentioned with terms such as adders and multipliers, and thus are stored in RAM. Right now, there's no way I've run out of RAM - but future code may do when processing many many more terms at once, so best add it to the hardware now.

These values in RAM are being updated on average, once each mS, sometimes twice as fast. Sounds like EEPROM is FAR too slow here.

fungus


It seems then extra RAM is the best option - as I'm reading static values from flash stored by PROGMEM, but than altering them as mentioned with terms such as adders and multipliers, and thus are stored in RAM. Right now, there's no way I've run out of RAM - but future code may do when processing many many more terms at once, so best add it to the hardware now.

These values in RAM are being updated on average, once each mS, sometimes twice as fast.


Sounds like you need an SRAM chip with SPI interface. You can get them in little 8-pin chips.

Sounds like EEPROM is FAR too slow here.


The onboard EEPROM take about 1ms to write a single byte. I can't imagine external EEPROMS will be any better.

Advanced Arduino

jtw11

Quote
Sounds like you need an SRAM chip with SPI interface. You can get them in little 8-pin chips.


Yep, just reading about these chips recommended by Crossroads - http://uk.mouser.com/ProductDetail/Ramtron/FM25640B-G/?qs=sGAEpiMZZMtsPi73Z94q0LVCZPBibhMGLoJvNRrGMO0=

CrossRoads

"The onboard EEPROM take about 1ms to write a single byte."
No, EEPROM takes 3.3mS.

The FRAM is nice because it stores data like an EEPROM, but at SRAM speeds.
FRAM/EEPROM only needed if you need to keep the data between resets or loss of power.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jtw11

Volatility is not an issue - there is no problem with the RAM being erased when the power is lost in my application.

In which case, is there any advantage of FRAM over SRAM? Seems FRAM has very fast write speeds (or lack of!). I am also writing a lot to an SD card and thus will need to buffer lots of data in RAM until its written.

silasmoeckel


Volatility is not an issue - there is no problem with the RAM being erased when the power is lost in my application.

In which case, is there any advantage of FRAM over SRAM? Seems FRAM has very fast write speeds (or lack of!). I am also writing a lot to an SD card and thus will need to buffer lots of data in RAM until its written.


FRAM does not need power to retain the data.  As you say volatility is not an issue you probably do not need to use it.  Neither will really help you in regards to writing data to a SD card that needs to be internal SRAM and since it's block oriented it's uses a 512b buffer. 

Please note that your going to end up coping everything to and from internal sram constantly so your not necessarily during yourself a favor trying to use offboard sram. 

jtw11

Quote
Please note that your going to end up coping everything to and from internal sram constantly so your not necessarily during yourself a favor trying to use offboard sram.


I see - in which case, what ever is the point in using external RAM? It seems that statement renders it useless. Then again, a PCs RAM is all external minus the small cache?

Futhur, I started a thread in the storage section - as I was looking at using SD cards to store logged data, however - could I use an external flash IC for this? Is there a library, or is it possible to do this?

fungus


Futhur, I started a thread in the storage section - as I was looking at using SD cards to store logged data, however - could I use an external flash IC for this?


Definitely.


Is there a library, or is it possible to do this?


I assume the SD libary has a function to read/write a disk sector. Hack that to use the flash/RAM chip instead and ... bingo!

Advanced Arduino

jtw11

Just looking at the flash chips available - I have found an SPI flash IC (good, easier to adapt to the SD library being SPI I assume) of 32mb. It seems this is an appropriate sort of chip?

I'm just planning to design something like this into the hardware for future use.

http://uk.farnell.com/spansion/s25fl256sagnfi001/memory-flash-256mbit-8wson/dp/2136254

fungus


Just looking at the flash chips available - I have found an SPI flash IC (good, easier to adapt to the SD library being SPI I assume) of 32mb. It seems this is an appropriate sort of chip?

I'm just planning to design something like this into the hardware for future use.

http://uk.farnell.com/spansion/s25fl256sagnfi001/memory-flash-256mbit-8wson/dp/2136254


Yep. Something like that....

That one has 16 pins for some reason, most of them have 8. Try restricting the Farnell search to 8 pin chips, they should be much cheaper...

Advanced Arduino

jtw11

I think it's just the picture - it's listed as 8 pins. The datasheet won't load - the microwave is on see, of which my router is cleverly sat next to. Long story.  8)

fungus

One other thing... You won't be sticking that chip into a PC card reader so you might not even need FAT file system support (depending on your data). eg. For a simple data log you can just start at the beginning and fill it up.


Advanced Arduino

Go Up