Go Down

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

Vincent19

Hey there,

I have a confusion here actually.

What's the difference between EEPROM and flash memory of a chip ?

Thank you

Grumpy_Mike

In the arduino flash memory is the place where the program is stored and EEPROM is just for non volatile data.
In general flash is quicker to read from, the both take a bit of time to write to.

Vincent19

so what for i have to expand the eeprom storage?

Grumpy_Mike

English a bit bad on that.

It is rare that you would want to expand EEPROM memory, but for example I have used external chips to store a look up wave table.
For most projects you would not even use the EEPROM.

fungus


so what for i have to expand the eeprom storage?


Most people use SD cards when they need more storage.

Advanced Arduino

Vincent19

So normally we expand the flash memory only?

fungus


So normally we expand the flash memory only?


The internal memory on the Arduino can't be expanded. If you need more you have to use an Arduino Mega.
Advanced Arduino

Grumpy_Mike

There is no way to expand any memory on an Arduino.
On the mega you can expand the SRAM with a card but that is all.

All other forms of memory expansion is what it known as paged memory. It does not appear in the memory map, you can't use it for program storage or variables, only for storing data through port bit manipulation.

What do you want to expand and why?

jtw11

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.

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.

CrossRoads

Static Lookup tables are typically stored in PROGMEM. EEPROM is generally used when the sketch needs to make changes that need to be stored.

You can add external EEPROM & SRAM. FRAM is another option - writes fast like SRAM, has EEPROM non-volatility.  All are available in little 8-pin packages with serial interface.


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

Quote
1) Look up tables are stored in EEPROM yes? I

They can be if you want, although you have some EEPROM built in. They could also be stored in Flash if they are static, that is if they don't change.

Quote
I can expand the amount of EEPROM I have by adding an external EEPROM chip?

Yes, well you don't expand the internal stuff you just have an external I2C chip.

Quote
this type of memory is used up quickly when performing float calculations

No floating point makes little difference to the SDRM usage.

Quote
can one also expand SRAM with an external chip?

Extra memory shield for the Mega
http://www.ruggedcircuits.com/html/megaram.html

Quote
I/O requirements may see me needing to up to a 2560 chip.

Shame, there are many ways to increase I/O without going to a bigger processor, just use a port expander.

jtw11

I see - thank you for input thus far. I will take a look at port expanding, it doesn't sound like it should be too much of an issue as I only need more general purpose I/O, for things like low rate sensor sampling.

The look up tables are static yes, if they need to be changed - then it's a reflash job, there are slight modifiers to these values, adders and multipliers and what not - but that's temporary stuff that is stored in RAM yes?

Now I know I can up my I/O this way - sticking with the 1284, with it's large amount of RAM - I need not worry about adding external. Maybe just external EEPROM to allow for a bit of future flexibility in the PCB.

Grumpy_Mike

Quote
but that's temporary stuff that is stored in RAM yes?

Yes.

Look at the MCP23S17 it is one I use a lot, it uses the SPI bus or the MCP23017 that uses the I2C bus.
They give you 16 I/O per chip and you can have 8 chips on each bus.

jtw11

#13
Nov 09, 2012, 09:59 pm Last Edit: Nov 09, 2012, 11:01 pm by jtw11 Reason: 1
Wow - that's just opened a lot of doors for me, thanks so much for the recommendation. I'll check them out now. This is all a very steep learning curve for me, that is only getting more and more enjoyable :D

EDIT: I'm just looking at things like data rates - but any preferences of I2C vs SPI? I've only used SPI for ICSP before, and I2C for a few temp sensors. I have chosen SPI as the bandwidth is FAR higher.

On another note, any recommendations for external serial EEPROM chips people have successfully used? Also, what's the bit value talking about here? For example, microchip offer them in 128bit, 1kbit, 2, 4, 8 etc...

Vincent19

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

Go Up