CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@mayurpawar85 • 08 Oct, 2012
what is difference betw'n flash memory & EEPROM ...mostly specified in atmega series microcontroller like atmega 16.
@arunchary • 08 Oct, 2012 • 3 likes 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 • 09 Oct, 2012
—Flash (for mega32)
—32K Bytes of In-System Self-Programmable Flash Endurance: 10,000 Write/Erase Cycles
Need a little clarification here arunchary Do you mean the life time of the Flash drives is that much blah blah cycles only
@arunchary • 09 Oct, 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....;
@mayurpawar85 • 30 Oct, 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
@Harshad Italiya • 30 Oct, 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.
@Harshad Italiya • 30 Oct, 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.
@arunchary • 30 Oct, 2012 • 1 like 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 • 30 Oct, 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
@dossdss • 30 Oct, 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.
@Harshad Italiya • 31 Oct, 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.
@dossdss • 31 Oct, 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.
@Harshad Italiya • 31 Oct, 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?
@dossdss • 01 Nov, 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
@Harshad Italiya • 01 Nov, 2012
dossdss
yes sir, its LPC2148... I program using 'C'
thank you
This can help you :- https://ics.nxp.com/support/documents/microcontrollers/?scope=LPC2148 have a look at sample codes.
4.3k views

Related Posts

@Anoop Kumar · Jun 7, 2014

SAR - Specific absorption rate (SAR) is a measure of the rate at which energy is absorbed by the human body when exposed to a radio frequency (RF) electromagnetic field....
3.6k views

@mvaa07 · Apr 25, 2010

we've been taught that ac current is alternating in nature i.e. no negative or positive poles but we been also told that live actually carries the current and the neutral...
11.4k views

@rh495 · Oct 8, 2010

Hi all, I am making a Digital Clock. For this purpose, I need a 1 Hz signal to insert as a Clock for 'Seconds' portion of my circuit. How to...
3.2k views

@Suresh146305 · Jul 15, 2015

Hi All, I am 2.7 years experienced in TCS and got offer from mphasis yesterday. In that offer itself they mentioned the DOJ as 3rd August and reporting time at...
5.5k views

@Joe walter · Jan 28, 2016

Any plz give me some ideas for mini project in mechanical
3k views