[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: [avr-gcc-list] placing a variable in flash
From: |
Sean Casey |
Subject: |
Re: Fw: [avr-gcc-list] placing a variable in flash |
Date: |
Mon, 22 Nov 2004 12:25:09 -0800 |
User-agent: |
Mutt/1.3.28i |
I wish I could find all the beginner stuff like this in one place.
There should be an O'Reilly book!
E. Weddington <address@hidden> said...
> Royce & Sharal Pereira wrote:
>
> >
> >================================================
> >
> >
> >>Wouldn't the variable be better off stored in the EEPROM and not in
> >>Flash (Program Memory)?
> >>
> >>
> >-------------------------------------------------------------------------
> >Is there some advantage of that as compared to storing it in flash?
> >Anyways, is it at all possible to fix a variable at a predetermined
> >location
> >in flash ?
> >
> >
> >
>
> Here are just two advantages:
>
> 1. Endurance.
> For example, the mega128 data sheet specifies that the Flash has 10,000
> read/write cycles. It specifies the EEPROM has 100,000 read/write cycles.
>
> 2. Ease of use.
> Reading and writing the EEPROM is easy especially for small values,
> because each byte can be erased. While reading Flash is easy, it is more
> complicated to write to Flash because you have to erase and write a
> block of data at a time, which means you need to flush the contents of a
> Flash block to a RAM buffer, erase the block and write the block with
> the new contents.
>
> The EEPROM is *designed* to hold values that must persist between power
> cycles. The Flash was designed to hold your program, not data.