CrazyEngineers
  • Difference between flash memory and EEPROM

    Updated: Oct 27, 2024
    Views: 1.4K
    what is difference betw'n flash memory & EEPROM ...mostly specified in atmega series microcontroller like atmega 16.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • arunchary

    MemberOct 8, 2012

    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
    Are you sure? This action cannot be undone.
    Cancel
  • Jeffrey Arulraj

    MemberOct 9, 2012

    —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
    Are you sure? This action cannot be undone.
    Cancel
  • arunchary

    MemberOct 9, 2012

    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....;
    Are you sure? This action cannot be undone.
    Cancel
  • mayurpawar85

    MemberOct 29, 2012

    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
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 29, 2012

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 29, 2012

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • arunchary

    MemberOct 29, 2012

    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
    Are you sure? This action cannot be undone.
    Cancel
  • dossdss

    MemberOct 30, 2012

    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
    Are you sure? This action cannot be undone.
    Cancel
  • dossdss

    MemberOct 30, 2012

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 30, 2012

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • dossdss

    MemberOct 31, 2012

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 31, 2012

    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?
    Are you sure? This action cannot be undone.
    Cancel
  • dossdss

    MemberOct 31, 2012

    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
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 31, 2012

    dossdss
    yes sir, its LPC2148... I program using 'C'
    thank you
    This can help you :- #-Link-Snipped-# have a look at sample codes.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register