Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Noob question re. various on-chip memory use

2013-01-10 by bayramdavies

--- In AVR-Chat@yahoogroups.com, Dave C  wrote:
>
> ... Flash, EEPROM, and SRAM ... not
> clear on what each of these is used
> for when writing a program ... 

Flash stores the program and fixed data.  It can only be modified by a special programming interface (ISP, JTAG, PDI, etc.) or by a special Flash Loader program residing in a special area of Flash memory.

SRAM stores all data that will be modified at run time but does not need to survive a reset or power cycle, including all standard 'C' language variables (except automatic variables in registers).

EEPROM can be used to store data that may be modified at run time but must survive a reset or power cycle.  Many applications don't use EEPROM at all, so you will probably ignore it at first.

The AVR is a Harvard Architecture device, in the original sense of having separate address spaces for program and data memory.  As the 'C' language assumes Von-Neumann Architecture, i.e. a single address space for program and data, like the 68k, assembly language or non-standard features are necessary to get at data in Flash or EEPROM.

Graham.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.