Unit1
Unit1
MICROPRPCESSOR
E 4160
CHAPTER OUTLINE
Block diagram of a computer system
Basic components of a computer system using
block diagrams:
Cpu
Memory
Input and output unit
Evolution of microprocessor : 4,8,16,32 dan 64 byte
Nibble, byte, word dan longword
Fecthing and execution cycles.
Internal structure and basic operation of a
microprocessor (arithmetic and logic unit, control unit,
register sets, accumulator, condition code register,
program counter, stack pointer)
Bus system: data bus, address bus and control bus.
Microprocessor clock system
Examples of microprocessor: 8085,8086. 2
Introduction
A computer is a programmable machine
that receives input, stores and manipulates
data//information, and provides output in a
useful format.
1.1 DIAGRAM OF A COMPUTER
SYSTEM
A computer is a programmable machine that receives input, stores and
manipulates data//information, and provides output in a useful format.
Address bus
9
SOME TERMINOLOGIES
Architecture
Data; input output
Bus
Flags
Operand
Instruction
Peripheral 10
Pipelining
DATA SIZE
Nibble 4 bit
Byte 8 bit
Word 16 bit
Long 32 bit
word
11
FETCHING & EXECUTION CYCLES
Fetching Cycles
The fetch cycle takes the instruction
required from memory, stores it in the
instruction register, and
moves the program counter on one so
that it points to the next instruction.
Execute cycle
13
FETCHING AN INSTRUCTION (cont.)
Step 2
14
FETCHING AN INSTRUCTION (cont.)
Step 3
15
FETCHING AN INSTRUCTION (cont.)
Step 4
16
FETCHING AN INSTRUCTION (cont.)
Step 5
17
FETCHING AN INSTRUCTION (cont.)
Step 6
18
INTERNAL STRUCTURE AND BASIC
OPERATION OF MICROPROCESSOR
Address bus
ALU Register
Section
Data bus
Control and timing
section Control bus
24
REGISTER SETS
The register section/array consists completely
of circuitry used to temporarily store data
or program codes until they are sent to the
ALU or to the control section or to memory.
PC PROGRAM CONTER 26
15 8 7 0
SYSTEM BYTE USER VYTE SR STATUS REGISTER
ACCUMULATOR
a register in which intermediate arithmetic
and logic results are stored.
example for accumulator use is summing a
list of numbers.
The accumulator is initially set to zero, then each
number in turn is added to the value in the
accumulator.
Only when all numbers have been added is the
result held in the accumulator written to main
memory or to another, non-accumulator, CPU
register.
27
CONDITION CODE REGISTER (CCR)
an 8 bit register used to store the status of
CPU, such as carry, zero, overflow and half
carry.
28
Flag Name Description
Indicates that the result of a mathematical or logical operation
Z Zero flag
was zero.
31
STACK POINTER (SP)
The stack is configured as a data
structure that grows downward from
high memory to low memory.
At any given time, the SP holds the 16-
bit address of the next free location in
the stack.
The stack acts like any other stack
when there is a subroutine call or on
an interrupt. ie. pushing the return
address on a jump, and retrieving it
after the operation is complete to 32
come back to its original location.
BUS SYSTEM
a subsystem that transfers data between
computer components inside a computer or
between computers.
4 PCI Express bus card slots (from top to bottom: x4, x16, x1 and x16),
compared to a traditional 32-bit PCI bus card slot (very bottom).
33
BUS SYSTEM CONNECTION
34
DATA BUS
The data bus is 'bi-directional'
data or instruction codes from memory or
input/output.are transferred into the
microprocessor
the result of an operation or computation is
sent out from the microprocessor to the
memory or input/output.
Depending on the particular
microprocessor, the data bus can handle
8 bit or 16 bit data.
35
ADDRESS BUS
The address bus is 'unidirectional', over
which the microprocessor sends an address
code to the memory or input/output.
The size (width) of the address bus is
37
MICRO PROCESSOR CLOCK
Also called clock rate, the speed at which a
microprocessor executes instructions. Every computer
contains an internal clock that regulates the rate at
which instructions are executed and synchronizes all the
various computer components.
The CPU requires a fixed number of clock ticks (or clock
cycles) to execute each instruction. The faster the clock,
the more instructions the CPU can execute per second.
Clock speeds are expressed in megahertz (MHz) or
gigahertz ((GHz).
Some microprocessors are superscalar, which means
that they can execute more than one instruction per
clock cycle.
Like CPUs, expansion buses also have clock speeds.
Ideally, the CPU clock speed and the bus clock speed
should be the same so that neither component slows
down the other. In practice, the bus clock speed is often
slower than the CPU clock speed, which creates a 38
bottleneck. This is why new local buses, such as AGP,
have been developed.
8086
The 8086 is a 16-bit
microprocessor chip designed by
Intel, which gave rise to the x86
architecture; development work
on the 8086 design started in the
spring of 1976 and the chip was
introduced to the market in the
summer of 1978.
The Intel 8088, released in 1979,
was a slightly modified chip with
an external 8-bit data bus
(allowing the use of cheaper and
fewer supporting logic chips and
is notable as the processor used
in the original IBM PC. 39
40
41
42
ROLE OF MICROCONTROLLERS IN IOT
The IoT requires sensors and actuators to form the
link between the physical and digital worlds.
A sensor converts a physical state into an
analogue or digital signal, while an actuator turns a
digital signal into some physical effect.
Most IoT applications require more than just adding
a sensor to a physical object.
The next step in the IoT architecture is the
computing system which processes or generates
the digital signals.
Both microcontrollers and microprocessors can
perform these operations.
‘Smart objects,’ -the addition of an Internet
connected microcontroller known as an MCU. 43
CHOOSING A MICROCONTROLLER
FOR IOT SYSTEM
TI, Samsung, Arduino, Raspberry Pi
Choosing MC depends on a number of factors that
Architecture:
Memory
Availability:
Power:
Cost:
Development Kit
44
Development Support: