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.

Is Flash Memory RAM or ROM

Status
Not open for further replies.

vinothmct

Member level 1
Joined
May 2, 2012
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,584
Is flash memory RAM or ROM? RAM is temporary storage, data gets lost when power is turned off . In that case it will be ROM . Can anyone here explain this basic doubt . Program memory is flash memory right? Data memory is?
 

Re: Flash Memory is RAM or ROM

It depends on what you define, if you have a variable with data that is not going to change during execution then you can declare a constant variable and place it in the flash, the value can be read but not changed and is stored permanently (doesn't get cleared when power off).

Normal variables reside in RAM so the content is lost when you power off the mcu.
 

Re: Flash Memory is RAM or ROM

It's neither RAM or ROM. Flash memory is EPROM (Electrically Programmable Read-Only Memory).
 

Re: Flash Memory is RAM or ROM

Flash memory is a type of constantly-powered nonvolatile memory that can be erased and reprogrammed in units of memory called blocks. It is a variation of electrically erasable programmable read-only memory (EEPROM) which, unlike flash memory, is erased and rewritten at the byte level, which is slower than flash memory updating.

Flash memory is often used to hold control code such as the basic input/output system (BIOS) in a personal computer. When BIOS needs to be changed (rewritten), the flash memory can be written to in block (rather than byte) sizes, making it easy to update. On the other hand, flash memory is not useful as random access memory (RAM) because RAM needs to be addressable at the byte (not the block) level.



RAM: Stands for random access memory; refers to memory that the microprocessor can read from and write to. When you create something in memory, it’s done in RAM. RAM is memory and vice versa.

ROM: Stands for read-only memory. The microprocessor can read from ROM, but it can’t write to it or modify it. ROM is permanent. Often, ROM chips contain special instructions for the computer — important stuff that never changes. The microprocessor can access information stored on a ROM chip whenever it needs to. The instructions are always there because they’re not erasable.

Flash memory: A special type of memory that works like both RAM and ROM. You can write information to flash memory, like you can with RAM, but that information isn’t erased when the power is off, like it is with RAM.

Sadly, flash memory isn’t as fast as RAM, so don’t expect it to replace standard computer memory any time soon.



https://searchstorage.techtarget.com/definition/flash-memory

https://www.howstuffworks.com/flash-memory.htm

https://www.dummies.com/how-to/content/ram-rom-and-flash-memory.html
 
Re: Flash Memory is RAM or ROM

It depends on what you define, if you have a variable with data that is not going to change during execution then you can declare a constant variable and place it in the flash, the value can be read but not changed and is stored permanently (doesn't get cleared when power off).

Normal variables reside in RAM so the content is lost when you power off the mcu.

The codes i write in my IDE stores in the flash memory. When i switch off the power and restart also the flash has my code . So its ROM right? Or some of the code stores in RAM?
 

Re: Flash Memory is RAM or ROM

Sometimes we call flash a ROM but what it is actually is a non volatile memory which means that the content is preserved when power supply is removed.

- - - Updated - - -

http://en.wikipedia.org/wiki/Non-volatile_memory

- - - Updated - - -

The IDE stores everything in ROM (unless there are some values written in an internal eeprom too) then when the mcu starts up the variables that should reside in RAM are copied there at runtime.
Each time the mcu is disconnected from the power supply the RAM content is lost.
 

Re: Flash Memory is RAM or ROM

Sometimes we call flash a ROM but what it is actually is a non volatile memory which means that the content is preserved when power supply is removed.

- - - Updated - - -

https://en.wikipedia.org/wiki/Non-volatile_memory

- - - Updated - - -

The IDE stores everything in ROM (unless there are some values written in an internal eeprom too) then when the mcu starts up the variables that should reside in RAM are copied there at runtime.
Each time the mcu is disconnected from the power supply the RAM content is lost.

Do we know which variable will reside in ROM/RAM?
 

Re: Flash Memory is RAM or ROM

The constant variables have a predefined value which can't be changed and they can be placed in flash (read below), the rest of the variables are located in RAM.
Depending on the compiler (and memory space of mcu ) sometimes a const keyword is not enough to place a variable in flash and there is a need for additional keyword.

For example with in avrgcc a const variable is just a constant variable in RAM that whose value can't be changed during execution so PROGMEM or const PROGMEM has to be used for a variable to be placed in flash.
 

Re: Flash Memory is RAM or ROM

Stack is internal section of RAM . What exactly does stack do?

RAM is a volatile memory which loses its contents when power is switched off
ROM is non volatile . Our codes are stored here and constants are stored here ..

Take a LED a led on off program?

What are the functions of RAM and Flash?
Is flash a RAM or ROM

Flash is program memory which executes our program right?
Where is the C code we have written stored RAM or Flash?
What exactly does stack do here.
Lets say We write a delay function? Is it stored in Flash or RAM.

Can someone explain me the flow . Been keen to know this .
 

Re: Flash Memory is RAM or ROM

Is flash memory RAM or ROM? RAM is temporary storage, data gets lost when power is turned off . In that case it will be ROM . Can anyone here explain this basic doubt . Program memory is flash memory right? Data memory is?

the data will be stored as RAM..but when the power is off,that data will not be erased...

- - - Updated - - -

please compare between cortex ,arm7,arm9 with practical knowledge
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top