introduction to microprocessor and microcontroller
TRANSCRIPT
-
8/7/2019 Introduction to microprocessor and microcontroller
1/19
By Prashanth.S.N.
Introduction to microprocessor and
microcontroller
-
8/7/2019 Introduction to microprocessor and microcontroller
2/19
Computer Block Diagram
input output
CPU
Memory
ALU
Wednesday, November 10, 20102
-
8/7/2019 Introduction to microprocessor and microcontroller
3/19
Wednesday, November 10, 20103
-
8/7/2019 Introduction to microprocessor and microcontroller
4/19
Difference between Microprocessor
and microcontroller
Microprocessor Microcontroller
y It is used for general
purpose.
y It does not consists of any
timers or counters.
y microprocessor is used for
processi
ng data.y Microprocessor is a chip on
computer.
y It is used for specific or
particular application
y It consists of timers and
counters .
y Micro controller is used
for control some acti
on.y Micro controller is a
computer on chip.
Wednesday, November 10, 20104
-
8/7/2019 Introduction to microprocessor and microcontroller
5/19
Wednesday, November 10, 20105
-
8/7/2019 Introduction to microprocessor and microcontroller
6/19
Wednesday, November 10, 20106
-
8/7/2019 Introduction to microprocessor and microcontroller
7/19
Harvard architecture
In Harvard architecture, program and data
are stored in separate memory and handledby different sub-system
Wednesday, November 10, 20107
-
8/7/2019 Introduction to microprocessor and microcontroller
8/19
Harvard Architecture
y advantages:
y 1: Data Space and Program Space are distinct
y 2: There is no Data corruption or loss of data
y Disadvantage is:y 1: The circuitry is very complex.
y 2:communication of data with peripheral is slow
y 3: Require large board area.
Wednesday, November 10, 20108
-
8/7/2019 Introduction to microprocessor and microcontroller
9/19
Von Neumann Architecture
In von-Neumann architecture, program and
data are stored in same memory andmanaged by same information handling
subsystem.
Wednesday, November 10, 20109
-
8/7/2019 Introduction to microprocessor and microcontroller
10/19
Von Neumann Architecture
y Advantages
Interchange of data with peripheral is easy
Require less board area.
DisadvantageSequential operation
Data may get corrupted
Wednesday, November 10, 201010
-
8/7/2019 Introduction to microprocessor and microcontroller
11/19
Overview.
Harvard Architecture Von-Neumann
Wednesday, November 10, 2010
y
11
-
8/7/2019 Introduction to microprocessor and microcontroller
12/19
RISCV/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.
Wednesday, November 10, 201012
-
8/7/2019 Introduction to microprocessor and microcontroller
13/19
y On the right is a diagramrepresenting the storage scheme for
a generic computer. The mainmemory is divided into locationsnumbered from (row) 1: (column) 1to (row) 6: (column) 4. Theexecution unit is responsible for
carrying out all computations.However, the execution unit canonly operate on data that has beenloaded into one of the six registers(A, B, C, D, E, or F). Let's say we
want to f ind the product of twonumbers - one stored in location 2:3
and another stored in location 5:2 -and then store the product back inthe location 2:3.
Wednesday, November 10, 201013
-
8/7/2019 Introduction to microprocessor and microcontroller
14/19
The CISC Approach
Wednesday, November 10, 2010
yThe primary goal of CISC architecture is to complete a task in asfew lines of assembly as possible. Th is is achieved by buildingprocessor hardware that is capable of understanding and executinga series of operations. For this particular task, a CISC processorwould come prepared with a specific instruction (we'll call it
"MULT").y When executed, this instruction loads the two values into separate
registers, multiplies the operands in the execution unit, and thenstores the product in the appropriate register. Thus, the entire task
of multi
plyi
ng two numbers can be completed wi
th oneinstruction:
MULT 2:3, 5:2
14
-
8/7/2019 Introduction to microprocessor and microcontroller
15/19
Wednesday, November 10, 2010
y 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 load
ing or stor
ing
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
-
8/7/2019 Introduction to microprocessor and microcontroller
16/19
The RISC Approach
Wednesday, November 10, 2010
y
RI
SC processors only use si
mplei
nstructi
ons that can be executedwithin one clock cycle. Thus, the "MULT" command describedabove 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 thememory banks. In order to perform the exact series of stepsdescribed in the CISC approach, a programmer would need tocode four lines of assembly:
y LOAD A, 2:3LOAD B, 5:2PROD A, BSTORE 2:3, A
16
-
8/7/2019 Introduction to microprocessor and microcontroller
17/19
Wednesday, November 10, 2010
y The RISC strategy also brings some very important advantages. Becauseeach instruction requires only one clock cycle to execute, the entireprogram will execute in approximately the same amount of time as the
multi-cycle "MULT" command.
y These RISC "reduced instructions" require less transistors of hardwarespace than the complex instructions, leaving more room for generalpurpose registers. Because all of the instructions execute in a uniform
amount of ti
me (i
.e. one clock), pi
peli
ni
ngi
s possi
ble.
y Separating the "LOAD" and "STORE" instructions actually reduces theamount of work that the computer must perform. After a CISC-style"MULT" command is executed, the processor automatically erases theregisters. If one of the operands needs to be used for anothercomputation, the processor must re-load the data from the memorybank into a register. In RISC, the operand will remain in the registeruntil another value is loaded in its place.
17
-
8/7/2019 Introduction to microprocessor and microcontroller
18/19
Difference Between RISC and CISC
ArchitectureCISC RISC
y Emphasis is on hardware
y Includes multi clock
complex instruction.
y Memory to memory
LOAD and STORE
incorporated instruction.
y Small codes sizes high
cycles/sec.
y Execution period is
different
y Emphasis is on software
y Single clock reduced
instruction.
y Register to register LOAD
and STORE and are
independent instructions.
y Large code size low
cycles/sec.
y Execution period remains
same.
Wednesday, November 10, 201018
-
8/7/2019 Introduction to microprocessor and microcontroller
19/19
Micro Controllers are used Where ever
y Small size
y Low cost
y Low power
Where ever
Wednesday, November 10, 201019