Microprocessor: Engr. Mark Angelo Y. Santos, ECE, ECT
Microprocessor: Engr. Mark Angelo Y. Santos, ECE, ECT
Microprocessor: Engr. Mark Angelo Y. Santos, ECE, ECT
◦ It is an output signal.
All these components of a microprocessor are fabricated of a single IC. Such ICs are coupled to
build a computer. Three minimum IC’s that are needed to make up a microprocessor are the CPU,
memory, and peripheral IC.
CPU (Central Processing Unit)
• The CPU forms the nucleus of any computer by executing
instructions. Microprocessors are grouped into 4-bit, 8-bit, 16-bit,
and 32-bit microprocessors according to the length of bits they can
handle at a time. A 4-bit microprocessor can handle four binary digits
in a single instance of calculation, but as many as eight digits in two
instances and 16 in four instances.
The microprocessor is also known as a "MPU (microprocessing
unit)", "microprocessor", or simply "processor."
Input device (Input)
• A data input device. The keyboard and mouse of a PC, for example,
are data input devices. With a built-in controller, switches and
sensors are input devices.
• These input devices cannot be directly connected to a CPU, but they
must be attached to the CPU by way of a "peripheral IC," containing
connection circuitry. Depending on the kind of input device to be
connected to the CPU, an appropriate peripheral IC is used.
Output device (Output)
• A data output device. The display and printer of a PC, for example,
are data output devices. With a built-in controller, display LEDs,
motors, heaters and so on are output devices. Like input devices,
output devices are attached to a CPU by way of a "peripheral IC."
Depending on the kind of output device to be connected to the CPU,
an appropriate peripheral IC is used.
• Input devices and output devices are collectively called "peripherals."
Microprocessor Special Purpose Designs
Microprocessor Special Purpose Designs
26
PARTS OF COMPUTER SYSTEM
Buses
• A bus is a high-speed internal connection. Buses are used to send control
signals and data between the processor and other components.
Three types of bus are used.
• Address bus - carries memory addresses from the processor to other
components such as primary storage and input/output devices. The address
bus is unidirectional.
• Data bus - carries the data between the processor and other components. The
data bus is bidirectional.
• Control bus - carries control signals from the processor to other components.
The control bus also carries the clock's pulses. The control bus is
unidirectional.
PARTS OF COMPUTER SYSTEM
• Read-only memory, or ROM, is a type of computer storage containing
non-volatile, permanent data that, normally, can only be read, not
written to. ROM contains the programming that allows a computer to
start up or regenerate each time it is turned on.
• RAM (random access memory) is a computer's short-term memory,
where the data that the processor is currently using is stored. Your
computer can access RAM memory much faster than data on a hard
disk, SSD, or other long-term storage device, which is why RAM
capacity is critical for system performance.
PARTS OF COMPUTER SYSTEM
• Input-Output Interface is used as an method which helps in
transferring of information between the internal storage devices i.e.
memory and the external peripheral device .
• A peripheral device is that which provide input and output for the
computer, it is also called Input-Output devices.
BLOCK DIAGRAM OF A BASIC
COMPUTER SYSTEM
Basic computer system consist of a Central processing unit (CPU),
memory (RAM and ROM), input/output (I/O) unit.
30
Basic component of microcomputer
1. CPU - Central Processing Unit
• the portion of a computer system that carries out the
instructions of a computer program
• the primary element carrying out the computer's functions.
It is the unit that reads and executes program instructions.
• The data in the instruction tells the processor what to do.
31
Common CPU components
Different processors have different numbers of registers for different purposes. Most have some, or all, of
the following:
• program counter (PC)
• memory address register (MAR)
• memory data register (MDR)
• current instruction register (CIR)
• accumulator (ACC)
Definition
• A processor register or simply register is a quickly accessible location
available to a computer's processor. Registers usually consist of a
small amount of fast storage, although some registers have specific
hardware functions, and may be read-only or write-only.
•
CACHE
• Cache is a small amount of high-speed random access memory
(RAM) built directly within the processor. It is used to temporarily
hold data and instructions that the processor is likely to reuse. This
allows for faster processing, as the processor does not have to wait
for the data and instructions to be fetched from the RAM.
CLOCK
• The CPU contains a clock which, along with the CU, is used to
coordinate all of the computer's components. The clock sends out a
regular electrical pulse which synchronises (keeps in time) all the
components.
• The frequency of the pulses is known as clock speed. Clock speed is
measured in hertz (Hz). The greater the speed, the more instructions
can be performed in any given moment of time.
BUSES
A bus is a high-speed internal connection. Buses are used to send control
signals and data between the processor and other components.
• Three types of bus are used.
• Address bus - carries memory addresses from the processor to other
components such as primary storage and input/output devices. The address
bus is unidirectional.
• Data bus - carries the data between the processor and other components. The
data bus is bidirectional.
• Control bus - carries control signals from the processor to other components.
The control bus also carries the clock's pulses. The control bus is
unidirectional.
2. Memory
• physical devices used to store data or programs.
• Computer main memory comes in two principal varieties:
random-access memory (RAM) and read-only memory
(ROM).
• RAM can be read and written to anytime the CPU
commands it, but ROM is pre-loaded with data and software
that never changes, so the CPU can only read from it.
• ROM is typically used to store the computer's initial start-up
instructions.
• In general, the contents of RAM are erased when the power
to the computer is turned off, but ROM retains its data
indefinitely.
• In a PC, the ROM contains a specialized program called the
BIOS that orchestrates loading the computer's
operating system from the hard disk drive into RAM
whenever the computer is turned on or reset.
41
3. I/O Unit
42
DATA SIZE
Nibble 4 bit
Byte 8 bit
Word 16 bit
43
Internal structure and basic operation of
microprocessor
Address bus
ALU Register
Section
Data bus
45
Internal structure of ALU
46
Control unit
• The circuitry that controls the flow of
information through the processor, and
coordinates the activities of the other units
within it.
• In a way, it is the "brain within the brain", as it
controls what happens inside the processor,
which in turn controls the rest of the PC.
• On a regular processor, the control unit performs
the tasks of fetching, decoding, managing
execution and then storing results.
47
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
15 8 7 0
SYSTEM BYTE USER VYTE SR STATUS REGISTER 49
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.
50
Condition code register (CCR) = Flags
• an 8 bit register used to store the status of CPU,
such as carry, zero, overflow and half carry.
51
Flag Name Description
Z Zero flag Indicates that the result of a mathematical or logical operation was zero.
Indicates that the result of an operation produced an answer greater than the
C Carry flag number of available bits. (This flag may also be set before a mathematical
operation as an extra operand to certain instructions, e.g. "add with carry".)
X Extend flag Masks the XIRQ request when set. It is set by the hardware and cleared by the
software as well is set by unmaskable XIRQ.
52
Program counter (PC)
• a 16 bit register, used to store the next address
of the operation code to be fetched by the CPU.
• Not much use in programming, but as an
indicator to user only.
• Purpose of PC in a Microprocessor
• to store address of tos (top of stack)
• to store address of next instruction to be
executed.
• count the number of instructions.
53
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 come back to
its original location.
54
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.
55
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 specified
by the number of bits it can handle.
• The more bits there are in the address bus, the
more memory locations a microprocessor can
access.
• A 16 bit address bus is capable of addressing
65,536 (64K) addresses.
56
Control bus
• The control bus is used by the microprocessor to
send out or receive timing and control signals in
order to coordinate and regulate its operation
and to communicate with other devices, i.e.
memory or input/output.
57
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.
58
Examples of micro processor
• Intel 8086
• Motorola 6800
• Zilog Z80
59