23 Feb 2011


I am working on a new prototype to be used for production eventually. I need to store some 200 configuration variables (floats ie 123.21234)and read them on startup and save them on change. My question is which would be better for this type of use FLASH or EEPROM? It appears that FLASH is read/written in large blocks while EEPROM can be read in single bytes?

Which will be easier to work with on the mbed platform to store and retreive these variables?


23 Feb 2011

Hi Matt,

There is a nice Serial EEPROM class here :


I don't think the original supported floats directly, but this shouldn't be too difficult to plumb in.

There was also a library to do the same for the AT45 flash parts from Atmel, but those parts are hard to get hold of at the moment.

Hope that helps, Chris

25 Feb 2011

Your disticntion is correct - EEPROMS can be written in single bytes, whereas flash always is written blocks. But both can be read byte by byte (but depending on how the interface really works).

For your problem, maybe you can have a look at the mFS library, which implements a small file system on top of an I2C-EEPROM.

25 Feb 2011

some EEPROMS can be read/write by page

the Microchip EEPROM im using has a page buffer of 64KB and rated at 1,000,000 write cycles

its also fairly easy to use using the I2C commands with mbed

01 Mar 2011

For small amount of data like this, I think would be better EEPROM. It's easier to work with and also component cost is cheaper than Flash.