Memory System in Microcontrollers
Table of Contents
Memory Controller (MCU)
It is a digital circuit that manages the flow of data going to and from the computer main memory.
MCU can be a separate chip or integrated into another chip such as being placed on the same die of a microprocessor. In the latter case it is known as an integrated memory controller.
Memory controller is also called a Memory Chip Controller(MCC) or Memory Control Unit.(MCU).
Now Main memory can be directly or indirectly connected to the CPU via memory bus.
- Is the only memory that is directly accessible to CPU
- The CPU continuously reads instructions stored in Main Memory and executes them as required.
Types of Main Memory/Primary Storage are:
- RAM(Random Access Memory)
- Processor Registers
- Processor Cache
Processor Registers: are located inside the processors and are the fastest accessible memory by CPU of computers data storage.
Processor Cache / cache memory: is intermediate stage b/w Processor registers and RAM. Most actively used information in the RAM is stored in the cache memory.
Random Access Memory(RAM): is a main memory which is directly accessible by CPU (though it is slowest of the above mentioned Primary Storage).
RAM(Random Access Memory)
It is volatile memory that loses content on power off. It is the main memory with the largest size and it stores the working data and machine code.
(Machine Code – is instruction that can be executed directly by CPU. Each instruction tells the CPU to perform a task like load, store, jump or ALU operation on the data of Processor Register or Processor Core)
So RAM stores the instructions and the data on which instruction has to be done. When the computer is turned on, it loads data to RAM. Programs that are currently running are stored in RAM.
Now, there are 2 main types RAM:
- SRAM 2) DRAM
As the RAM types used for Primary storage are volatile, a computer containing only such storage would not have a source memory to read instructions from, in order to start the computer.
Hence the non – volatile primary storage containing a small start-up program(BIOS) is used to bootstrap the computer.The non-volatile technology used for this purpose is ROM(Read Only Memory).
ROM( Read Only Memory)
It stores the program that is rarely changed during the life of the system and it contains the data for initialising the system and also user application program.
→ When Powered on CPU has no software in its main memory (as main memory mainly RAM: that tells the instructions to CPU, is volatile in nature)
→ ROM stores the initial program that runs when the computer is powered on.
→ The computer first executes a relatively small program stored in ROM(Read Only Memory) along with a small amount of data, to access the non-volatile devices.
In short ROM contains the program that allows a computer to startup each time it is turned on. ROM also performs large Input/Output tasks and perform programs or software instructions.