Introduction to microprocessor and
microcontroller
By Prashanth.S.N.
Computer Block Diagram
input Memory output
CPU
ALU
2 Wednesday, November 10, 2010
3 Wednesday, November 10, 2010
Difference between Microprocessor and
microcontroller
Microprocessor Microcontroller
It is used for general It is used for specific or
purpose. particular application
It does not consists of It consists of timers and
any timers or counters. counters .
microprocessor is used Micro controller is used
for processing data. for control some action.
Microprocessor is a chip Micro controller is a
on computer on chip.
computer.
4 Wednesday, November 10, 2010
5 Wednesday, November 10,
2010
6 Wednesday, November 10, 2010
Harvard architecture
In Harvard architecture, program and data
are stored in separate memory and handled
by different sub-system
7 Wednesday, November 10, 2010
Harvard Architecture
advantages:
1: Data Space and Program Space are distinct
2: There is no Data corruption or loss of data
Disadvantage is:
1: The circuitry is very complex.
2:communication of data with peripheral is slow
3: Require large board area.
8 Wednesday, November 10, 2010
Von Neumann Architecture
In von-Neumann architecture, program and
data are stored in same memory and
managed by same information handling
subsystem.
9 Wednesday, November 10, 2010
Von Neumann Architecture
Advantages
Interchange of data with peripheral is easy
Require less board area.
Disadvantage
Sequential operation
Data may get corrupted
10 Wednesday, November 10, 2010
Overview.
Harvard Architecture Von-Neumann
11 Wednesday, November 10, 2010
RISC V/s CICS
CISC Complex instruction set for
computer.
Eg:- Intel, X86,8051, Motorola chips(6800).
RISC Reduced instruction set for computer.
Eg:-ARM,PIC,AVR etc.
12 Wednesday, November 10, 2010
On the right is a diagram
representing the storage scheme
for a generic computer. The main
memory is divided into locations
numbered from (row) 1: (column)
1 to (row) 6: (column) 4. The
execution unit is responsible for
carrying out all computations.
However, the execution unit can
only operate on data that has been
loaded into one of the six registers
(A, B, C, D, E, or F). Let's say we
want to find the product of two
numbers - one stored in location
2:3 and another stored in location
5:2 - and then store the product
back in the location 2:3.
13 Wednesday, November 10, 2010
The CISC Approach
The primary goal of CISC architecture is to complete a task
in as few lines of assembly as possible. This is achieved by
building processor hardware that is capable of
understanding and executing a series of operations. For this
particular task, a CISC processor would come prepared
with a specific instruction (we'll call it "MULT").
When executed, this instruction loads the two values into
separate registers, multiplies the operands in the execution
unit, and then stores the product in the appropriate register.
Thus, the entire task of multiplying two numbers can be
completed with one instruction:
MULT 2:3, 5:2
14 Wednesday, November 10,
2010
MULT is what is known as a "complex instruction." It
operates directly on the computer's memory banks and
does not require the programmer to explicitly call any
loading or storing functions. It closely resembles a
command in a higher level language. For instance, if we let
"a" represent the value of 2:3 and "b" represent the value
of 5:2, then this command is identical to the C statement "a
= a * b.“.
15 Wednesday, November 10, 2010
The RISC Approach
RISC processors only use simple instructions that can be
executed within one clock cycle. Thus, the "MULT" command
described above could be divided into three separate
commands: "LOAD," which moves data from the memory
bank to a register, "PROD," which finds the product of two
operands located within the registers, and "STORE," which
moves data from a register to the memory banks. In order to
perform the exact series of steps described in the CISC
approach, a programmer would need to code four lines of
assembly:
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A
16 Wednesday, November 10, 2010
The RISC strategy also brings some very important advantages.
Because each instruction requires only one clock cycle to
execute, the entire program will execute in approximately the
same amount of time as the multi-cycle "MULT" command.
These RISC "reduced instructions" require less transistors of
hardware space than the complex instructions, leaving more
room for general purpose registers. Because all of the
instructions execute in a uniform amount of time (i.e. one clock),
pipelining is possible.
Separating the "LOAD" and "STORE" instructions actually
reduces the amount of work that the computer must perform.
After a CISC-style "MULT" command is executed, the processor
automatically erases the registers. If one of the operands needs to
be used for another computation, the processor must re-load the
data from the memory bank into a register. In RISC, the operand
will remain in the register until another value is loaded in its
place.
17 Wednesday, November 10, 2010
Difference Between RISC and CISC
Architecture
CISC RISC
Emphasis is on hardware Emphasis is on software
Includes multi clock Single clock reduced
complex instruction. instruction.
Register to register “LOAD”
Memory to memory
and “STORE” and are
“LOAD” and “STORE”
independent instructions.
incorporated instruction.
Large code size low
Small codes sizes cycles/sec.
high cycles/sec. Execution period remains
Execution period is same.
different
18 Wednesday, November 10, 2010
Micro Controllers are used Where ever
• Small size
• Low cost
• Low power
Where ever
19 Wednesday, November 10, 2010