Saturday, June 1, 2013

RAM & ROM -- Have a deep look

1-RAM (Random Access Memory)
o Also called Read/Write Memory.
o The term random access refers to the ability to access any memory cell direct.
o Volatile memory requires external power to maintain memory content.
o Used to store data as long as Microcontroller is powered and the program is running
o Memory can usually be extended by adding external memory chips
o RAM Types:
   1.Dynamic RAM (DRAM)
    *DRAM is a RAM device that requires periodic refreshing to retain its content

   2.Static RAM (SRAM)
    *SRAM is a RAM device that retains its content as long as power is supplied by
     an external power source
    *SRAM does not require periodic refreshing
    *It is faster than DRAM
  
   3.Non-Volatile RAM (NVRAM)
    *NVRAM is a special type of SRAM that has backup battery power so it can retain its
     content after the main system power is shut off.

o RAM is Divided virtually to:
    -General purpose registers for CPU
    -Peripherals control special registers
    -Stack
==================================================
2-ROM (Read Only Memory)
o Permanent memory
o Written upon programming the microcontroller
o Can’t be written/modified at run time
==================================================
3-PROM (Programmable ROM)
o Is a type of ROM that can be programmed in the field by the end user using a device called a
   PROM programmer
o Once a PROM has been programmed, its contents cannot be changed
==================================================
4-EPROM (Erasable Programmable ROM)
o Has a small clear-glass window on top of the chip where the data can be erased under strong ultraviolet light
o Once the memory is programmed, the window can be covered with dark tape to prevent
   accidental erasure of the data
o An EPROM memory must be erased before it can be reprogrammed
o Some versions of EPROMs, known as OTP (one time programmable), can be programmed
   using a suitable programmer device but cannot be erased
==================================================
5-EEPROM (Electrically Erasable Programmable ROM)
o Can be erased and reprogrammed using a suitable programming device
o In microcontrollers ,EEPROM is used to save important data
==================================================
6-Flash EEPROM
o Used to store the user program
o can be erased and then reprogrammed using a suitable programming device
o Program electrically many times
o Used during development time
o Currently used in products to be updatable
________________________________________

Memory can be classified into two types:
•Program memory
   Stores the program written by the programmer and is usually nonvolatile
    (i.e., data is not lost after the power is turned off).
•Data memory
   Stores the temporary data used in a program and is usually volatile
   (i.e., data is lost after the power is turned off)
________________________________________
ROM Contents
*Program code
*Vector table
*Constant data (handled through const keyword
*Initialization of global variables

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...