Microcontroller Overview
Part (2)
Microcontroller part (1) deals with the definition of
microcontroller (what it is ) and some basic components of the microcontroller
(ports,register and rom).
This blog will explain some other elements of the micro
controller.
Elements of Micro Controller (continue ...)
RAM : Random Access Memory
Register , As we see in my the blog micro-controller-part-1 ,
a small memory unit which has a faster access by the CPU. Where these register
resides?
RAM is a temporary memory
storage of microcontroller, usaully in size of Kbytes which hold the program
temporary data ,the results comes from arithmetic logic unit etc. It contains
the general purpose register and special function register
RAM is volatile memory unit ,
means whenever the power goes off it will lost it contents. The memory will be
cleared.
Program Memory :
The program which will be save somewhere inside the micro controller is called program memory. every micro controller has internal program memory. But if the program is too long reference to program memory it is possible to add external program memory.
Program Counter :
Program counter is a special register which hold the
instruction address of program memory that will fetch next.The value of this register will be incremented
automatically each time when a instruction will be executed. Working procedure
of the program counter is like that , CPU will call for next instruction that
will be executed. The address of the instruction is obtained from the
program counter and It will be incremented.
Instruction will be placed into Instruction Register for
most of the micro processor and micro controller.
Program counter register and instruction register ins
typically involve for the instruction fetching. After the early production of
8051 Micro controller , most of the micro controller contain program memory
which is a internal memory block that hold the instruction for the CPU.
Instruction fetching involve typically to obtain
the appropriate address of the program memory which hold the
appropriate instruction that should be executed now and execute the
instruction.
Instruction Register
Instruction register is a register that will store
instruction. Operation code is extracted from the instruction set and it will
executed in processing unit.
Stack Pointer
A block of memory storage is called stack that will store temporary storage of data.To save data of general-purpose register during execution of a subroutine (function) or when an interrupt is serviced. Push and Pop mechanism is use to save the content of a register and to retrieve data into register. Stack is use for the faster access by the CPU.
Central Processor Unit (CPU)
CPU is unit that actually deals with the data , perform some
operation and gives some output . CPU unit consist of the following units
a) Instruction
Decoder :
Each and every instruction has opcode (operation code) that
must be parsed and executed.
Instruction decoder is a electronics components that will
take the opcode from the instruction and regenerate code so that the
electronics components can execute it.
b)Arithmetical Logical Unit (ALU)
The arithmetic logic unit (ALU) is the most sophisticated
components of any processing unit. It performs the entire integer arithmetic
and bit-wise logical operations of the microprocessor.
Operation bit can be 8 bit arithmetic , 16 bit arithmetic or
32 bit arithmetic.
c) Accumulator is
an SFR closely related to the operation of ALU. It is a kind of working desk
used for storing all data upon which some operations should be executed
(addition, shift etc.). It also stores the results ready for use in further
processing. One of the SFRs, called the Status Register, is closely related to
the accumulator, showing at any given time the "status" of a number
stored in the accumulator (the number is greater or less than zero etc.).


No comments:
Post a Comment