A Menu System – Thoughts about data storage (ATMEGA328)

///A Menu System – Thoughts about data storage (ATMEGA328)

A Menu System – Thoughts about data storage (ATMEGA328)

As i was designing the menu system it quickly became clear that all of the strings required for display would need quite a bit of program memory which simply was not available. Storing these in program memory as variables also meant they were loaded to the ATMEGA328’s 2k of ram which will already be managing an array (no pun intended :p) of other variables.

This was also a good time to begin considering where settings would be saved and how they would be modified, internally, externally or both. It was time to begin thinking about storage options.


There is an ability available to store strings to the microcontroller’s EEPROM memory of which the ATMEGA328 has 1KB. There is enough storage here for what i require and EEPROM is happy being read repeatedly BUT if i were to store settings on here, which could change fairly frequently, issues could arise with the units life cycle. EEPROM also poses a problem with externally editing settings once the unit is built. This option is free !

SPI or Serial based flash data chip

This is a viable option which would overcome the limited write cycles of the EEPROM memory. It does though suffer from the same issues of being troublesome to externally modify settings. If SPI it must be able to comfortably share the bus with the wireless module. This option is likely to be fairly cheap.

SD Card

After some research it was discovered that SD cards offer connectivity via SPI also. They also leave us with the ability to remove them from the device and modify settings as well as other values from a computer with commonly found card readers. Future use could also include system profiles and preset animation playback on detection of certain events or scenarios.

At the moment it seems for the master, the SD card may be the best choice. It allows external modification and backup of settings without the need for connecting the system directly. It also allows easy switching of units whilst retaining settings. For driver and sensor units, its unlikely settings will be changed that often so the use of the EEPROM should be sufficient.

By |2016-11-05T11:17:47+00:00February 20th, 2011|Lightive Project|0 Comments

About the Author:

A PhD in Electronic Engineering. A love for photography (www.islou.co.uk). An interest in tinkering, electronics and design. (www.louisc.co.uk).

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.