Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DIFFERENCE BEETWEN fLASH ,SRAM & EEPROM IN PIC

Status
Not open for further replies.

bikas.bikun

Junior Member level 3
Junior Member level 3
Joined
Nov 22, 2010
Messages
25
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
pune
Activity points
1,443
Can any body tell me why SRAM , Flash & EEPROM are used in microcontrollers ?

I think Flash is for HEX code.

Sram is for current Data

then for why EEPROM

but i am not clear about all this , if anybody know please help me out.
 

If you need to save some data/ or setting. The internal EEPROM will help you to avoid using external EEPROM chip for saving your non volatile data.
 

will you please tell me EEPROM is program memory or Data memory ?

---------- Post added at 11:10 ---------- Previous post was at 11:09 ----------

and why for Static RAM
 

there are several types of memory used with microcontrollers (this is only a short guide)
1. Flash program memory - stores the program and fixed data when you program the device
2. EEPROM - Electrically Erasable Programmable Read-Only Memory is non-volatile memory (does not loose its contents when power is removed) with a limited number of write operations. Some microcontrollers have some internal EEPROM, e.g. the PIC16F84 has 64 bytes, or one can attach external EEPROM
3. SRAM - static RAM does not need to be refreshed like dynamic RAM - has unlimited read/writes - usually volatile (looses contents when power is removed) so needs battery backup, e.g. the Microchip MCP79410
4. non-volatile RAM - RAM which does not loose contents when power is removed, e.g. the Ramtron FM33256

have a look at
**broken link removed**

it is possible with some microcontrollers to use Flash program memory to as an EEPROM, e.g.
**broken link removed**

you use EEPROM for data which is not changed very often, e.g. configuration parameters such as IP addresses which may be fixed for days or even years. SRAM is used when you need external data memory that may need updating every few milliseconds.
 
Last edited:
Adding to that....

volatile memory types: SRAM, DRAM

As there memories are volatile it is clear that you can't store your application program in this memory....also temporary data can be saved

Non-volatile memory types: ROM, EPROM, EEPROM, FLASH

EEPROM has less density & also costlier and can be read/write only byte at a time...So, mostly you don't use it for program memory and can be used as data memory...

FLASH can be programmed in blocks & even at less cost , highly dense, so used widely as program memory....

The main reason why you will be using EEPROM for data storage is that you can erase/write single byte without the need to erase whole block as in flash....

Here another question arises then why need of RAM and why don't you use EEPROM instead...Reason for this is EEPROM acces times are very high compared to RAM.....
 
EEPROM has limited writes - it may be a 1000000 but if you are saving data several times a second and you expect your product to last 10 years it is better to use SRAM.
Dynamic RAM requires complex external circuitry to keep its contents refreshed - so unless one needs Gbytes one tends to use more expensive SRAM
 
The limited Read/Write cycles is the main reason why you won't choose EEPROM over SRAM.....One thing you have have to remember here is why still people use EEPROM in some applications is because of non-volatile nature...Then again you ask why not flash as it is less cost and fast...why not FLASH instead of EEPROM is beacuse of byte access to EEPROM which suits for data writing..

Also, the read/write cycles are much faster in SRAM compared to EEPROM.....So, if you want your system to be operate quickly you do prefer SRAM...
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top