Difference between flash memory and EEPROM

what is difference betw'n flash memory & EEPROM ...mostly specified in atmega series microcontroller like atmega 16.

Replies

  • arunchary
    arunchary
    Types of memories used in AVR family are
    -->
    Data
    —SRAM (Static Random Access Memory)
    —EEPROM (Electrically Erasable Programmable Read Only Memo)
    —Program
    Flash memory
    —-->
    SRAM (for mega32)
    —2K Byte Internal SRAM- Register file, I/O Register, Data Address.
    —
    —EEPROM (for mega32)
    —1024 Bytes EEPROM Endurance: 100,000 Write/Erase Cycles

    —Flash (for mega32)
    —32K Bytes of In-System Self-Programmable Flash Endurance: 10,000 Write/Erase Cycles
  • Jeffrey Arulraj
    Jeffrey Arulraj
    —Flash (for mega32)
    —32K Bytes of In-System Self-Programmable Flash Endurance: 10,000 Write/Erase Cycles
    Need a little clarification here #-Link-Snipped-# Do you mean the life time of the Flash drives is that much blah blah cycles only
  • arunchary
    arunchary
    yes exactly it consists of read and write cycles ,if you want to test you can....after completing these cycles it get locks to set and reset operation on an internal functional gates....;
  • mayurpawar85
    mayurpawar85
    arunchary ......i mean to say.....when we burn any program in controller where does it get stored ...??
    EEPROM ?? OR FLASH MEMORY??
    wats diffference between flash & eeprom
  • Harshad Italiya
    Harshad Italiya
    mayurpawar85
    arunchary ......i mean to say.....when we burn any program in controller where does it get stored ...??
    EEPROM ?? OR FLASH MEMORY??
    wats diffference between flash & eeprom
    when you write code it stored into Flash Memory but using some commands you can also use EEPROM to save your run-time data. You have need not to erase flash in that case.
  • Harshad Italiya
    Harshad Italiya
    Here is one simple example.

    You want to develop application which counts the number of rotation. So now first you have written firmware which is used to work as counting rotations.
    Now you want to load it into microcontroller in your case atmega 16 so now the hex file for the same you need to burn that is going to store into Flash memory as there is no need to change in program once its working fine.

    Now you want to save the number of rotation. As there is option for RAM but it only stores when there is Power. So in case you want to save same data even there is power lost then you can use EEPROM so your data is going to store there and on next Power ON you can read them back and also store the updated value of same.

    Hope this example is going to clear some of your doubts.
  • arunchary
    arunchary
    flash ROM comes to picture when program is as to burn and also EEprom.but you can observe in sinaprog tool we do have two options such that we can program both.but here length of the code comes under picture.so we dont estimate the program size exactly in HEX format if it is small we can program into Eprom. if we are unable to judge the size definitely we need to go for flash other than Eprom. you can see the options in the following picture.sina
  • dossdss
    dossdss
    godfather
    Here is one simple example.

    You want to develop application which counts the number of rotation. So now first you have written firmware which is used to work as counting rotations.
    Now you want to load it into microcontroller in your case atmega 16 so now the hex file for the same you need to burn that is going to store into Flash memory as there is no need to change in program once its working fine.

    Now you want to save the number of rotation. As there is option for RAM but it only stores when there is Power. So in case you want to save same data even there is power lost then you can use EEPROM so your data is going to store there and on next Power ON you can read them back and also store the updated value of same.

    Hope this example is going to clear some of your doubts.
    sir can you please help with specifying some points =>
    • if i store data in EEPROM i can retrieve it even after power is gone in between, then is it true for i try to retrieve the same data even after i program that flash again ? i mean to say does the EEPROM contents change if i program my controller again.
    • and how to make this thing, that is to save the intermediate data in EEPROM than in RAM ? (Like if i am not wrong then i will declare one pointer pointing some address ... n will store the data at that addresss.... or is it for RAM ??)
    thank you
  • dossdss
    dossdss
    As said above when u write program in to uC the program goes to FLASH; Now one more thing is u can use flash blockwise like erasing a specic area of flash or writing some other block of flash. which is not the case for EEPROM.

    n one more thing before FLASH there was only EEPROM but now with arrival of FLASH, ISP has become possible.
  • Harshad Italiya
    Harshad Italiya
    dossdss
    sir can you please help with specifying some points =>
    • if i store data in EEPROM i can retrieve it even after power is gone in between, then is it true for i try to retrieve the same data even after i program that flash again ? i mean to say does the EEPROM contents change if i program my controller again.
    • and how to make this thing, that is to save the intermediate data in EEPROM than in RAM ? (Like if i am not wrong then i will declare one pointer pointing some address ... n will store the data at that addresss.... or is it for RAM ??)
    thank you
    Normally when you burn your flash it first erase all the memory but if your software supports to erase only flash then you can save that EEPROM. And I think its not commonly with every MCU.
  • dossdss
    dossdss
    godfather
    Normally when you burn your flash it first erase all the memory but if your software supports to erase only flash then you can save that EEPROM. And I think its not commonly with every MCU.

    yes sir but please help me with my second point that how can i store my temporarily obtained data in eeprom instead of in RAM in run-time, as i asked in my previous post.
  • Harshad Italiya
    Harshad Italiya
    dossdss
    yes sir but please help me with my second point that how can i store my temporarily obtained data in eeprom instead of in RAM in run-time, as i asked in my previous post.
    For that there are specif instruction which may very according to MCU. which MCU you are using?
  • dossdss
    dossdss
    godfather
    For that there are specif instruction which may very according to MCU. which MCU you are using?
    yes sir, its LPC2148... I program using 'C'
    thank you
  • Harshad Italiya
    Harshad Italiya
    dossdss
    yes sir, its LPC2148... I program using 'C'
    thank you
    This can help you :- #-Link-Snipped-# have a look at sample codes.

You are reading an archived discussion.

Related Posts

create a class medicine.provide a function displaylabel() in this class to print name and address of the company. Derive tablet,syrup and oinment classes from the medicine class.Override the display label()...
Does anyone know what's the joining date of candidates recruited in 2012 by Cognizant?
dear friends i really want to know how we can increase a power of hammer attack and lso sugeest me a good dc motor which may be used in cutting...
Honda is becoming an all round transport company. Walking is transportation too, right? Honda is coming in with robotic stride assist devices to help people with walking problems:
Micro power consuming devices like body worn health monitors and watches may soon be powered by thermoelectric wrist bands. https://www.mnn.com/green-tech/gadgets-electronics/stories/power-a-device-using-only-your-body-heat