Forums

ATMega128 -- Difference between flash/eeprom

Started by Ben Nguyen January 14, 2004
Im trying to learn microprocessors, and Im a bit confused about 
flash vs eeprom.

1. Does my program that I download (via ISP ribbon cable) go into the EEPROM
or the FLASH?

2. Can my user program use the EEPROM at run-time or must it be programmed
ahead of time?

3. How does a bootloader work?  (If I store a bootloader in flash, will
I need the ISP connector to program the chip anymore?  How is it then 
programmed?)

Thanks!
Ben
Ben Nguyen wrote:
> Im trying to learn microprocessors, and Im a bit confused about > flash vs eeprom. > > 1. Does my program that I download (via ISP ribbon cable) go into the EEPROM > or the FLASH?
All executable code in the AVR's is in Flash, so your program goes into it. You can have constant data there also, but accessing it is different from accessing data in the data memories. The EEPROM is a program-writable memory capable of keeping the data intact when power is off. It is accessed as a peripheral device through a couple of I/O ports, not as an usual memory directly.
> 2. Can my user program use the EEPROM at run-time or must it be programmed > ahead of time?
The EEPROM is program-writable. Most ISP programmers for AVR can also write it. Get the Atmel documentation of the chips, your questions have the answers there (http://www.atmel.com/). HTH Tauno Voipio tauno voipio @ iki fi
Ben Nguyen wrote:

> Im trying to learn microprocessors, and Im a bit confused about > flash vs eeprom. > > 1. Does my program that I download (via ISP ribbon cable) go into the > EEPROM or the FLASH?
I use the gnu tools, but it certainly will be FLash
> 2. Can my user program use the EEPROM at run-time or must it be programmed > ahead of time?
user can program it at runtime - and it can be pre-programmed, too.
> 3. How does a bootloader work? (If I store a bootloader in flash, will > I need the ISP connector to program the chip anymore? How is it then > programmed?)
After reset, the chips looks for a programm in the flash. Michael -- Remove the sport from my address to obtain email www.enertex.de - Innovative Systeml�sungen der Energie- und Elektrotechnik