0% found this document useful (0 votes)
37 views14 pages

Microprocessor and Microcomputer Systems and Applications (CPE 401)

The document provides an overview of microcomputer and microprocessor systems, detailing their architecture, components, and functionalities. It explains the roles of input/output units, the central processing unit (CPU), memory types, and the distinctions between microprocessors and microcontrollers. Additionally, it categorizes microprocessors by generations and characteristics, and describes the architecture of microprocessors, including the arithmetic and logic unit, control unit, and system bus.

Uploaded by

nmaxy22tmw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views14 pages

Microprocessor and Microcomputer Systems and Applications (CPE 401)

The document provides an overview of microcomputer and microprocessor systems, detailing their architecture, components, and functionalities. It explains the roles of input/output units, the central processing unit (CPU), memory types, and the distinctions between microprocessors and microcontrollers. Additionally, it categorizes microprocessors by generations and characteristics, and describes the architecture of microprocessors, including the arithmetic and logic unit, control unit, and system bus.

Uploaded by

nmaxy22tmw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Microprocessor and Microcomputer Systems and Applications

(CPE 401)

Introduction to Microcomputer and Microprocessor

General Architecture of a Microcomputer System:

The term microcomputer is generally synonymous with personal computer, or a computer that
depends on a microprocessor. Microcomputer is used to describe a system that includes a minimum
of a microprocessor, program memory, data memory, and input/output (I/O). Some microcomputer
systems include additional components such as timers, counters, analogue-to- digital converters
and so on. Thus, a microcomputer system can be anything from a large computer with hard disks,
floppy disks, and printers to a single-chip computer system.
The hardware of a microcomputer system can be divided into four functional sections:
(a) Input unit
(b) Microprocessor Unit
(c) Memory Unit, and
(d) Output Unit.

General Architecture of a Microcomputer System

Input Unit and Output Unit: Input and Output units are the means by which the MPU
communicates with the outside world.
Input unit: keyboard, mouse, scanner etc.
Output unit: Monitor, printer etc.
Bi-directional ports: Modem, Network etc.
I/O is responsible for interfacing between CPU and operators (or external devices). I/O includes

1
any device that converts binary data in the computer into another form of data that are used by
human beings. Examples of I/O devices include monitors, keyboards, printers, modems, mice,
hard disks, floppy disks, etc. Each computer system may have many I/O ports. Each input port
has a unique address and each output port has a unique address. Some microprocessors assign the
memory and I/O with separate address spaces (e.g., Intel x86 processors). In this case, one may
use memory address X and also I/O address X at the same time. Some microprocessors make the
memory and I/O use the same address space (e.g., Motorola 68HC12). In this case, if memory uses
address X, I/O cannot use address X.
Microprocessor Unit/ Central Processing Unit:
CPU has two main components
(a) Arithmetic and logic unit (ALU): Responsible for computation only
(b) Control unit:
⮚ Responsible for sending and gathering information from memory and I/O
⮚ Responsible for coordinating the sequence and timing of the activities on the
whole system.
CPU also has several storage places called registers.
CPU is the "brain" of the microcomputer. It provides the decision-making ability for the computer.
CPU has two parts, the arithmetic and logic unit (ALU), and the control unit. ALU is responsible
for arithmetic and logic operations. The control unit is responsible for coordinating the data flow
and controlling the sequence and timing of circuit operations in the system. Registers are very
small but fast-accessing storage space that holds very essential information for program execution
and decision-making. In program execution, the CPU reads and executes the program instructions
one by one from the main memory. The execution of instructions may involve the arithmetic/logic
operations and/or transfer of data between CPU and main memory (or I/O ports).

Memory Unit:
(a) Processor Memory
(b) Primary (or main) memory
(c) Secondary memory
⮚ Hard disks, CD, floppy disks, tape

Memory is responsible for storing programs and the data that are needed by the program. To make
the concept clear, we divide the computer memory to processor memory, main memory (or primary
memory) and secondary memory.
Processor Memory refers to a set of CPU registers. These registers are useful to hold temporary
results when a computation is in progress. Also, there is no speed disparity between the registers
and the microprocessor because they are fabricated using the same technology. The main
disadvantage is the cost involved which forces the architect to include very few registers (usually
8 to 16 only) in the microprocessor.
The main memory is the memory that the CPU can access directly. Examples of main memory
include RAM, ROM, etc.
The secondary memory cannot be addressed directly (cannot access specified memory location)
by the CPU. Examples of secondary include floppy disks, hard disks, CDs, etc. The information
in the secondary memory must be copied to the main memory so that the CPU can access it.

2
Secondary memory is much cheaper than primary memory.

Microprocessor and Microcontroller


Microprocessor is a multipurpose, programmable register-based electronic device which read
binary instructions from memory, processes the input data as per instructions, and provides output.
It is an IC which has only the CPU inside them i.e. only the processing powers such as Intel’s
Pentium 1,2,3,4, core 2 duo, i3, i5 etc. These microprocessors don’t have RAM, ROM, and other
peripheral on the chip. A system designer has to add them externally to make them functional.
Microcontroller is a device that includes microprocessor, memory and input/output devices on a
single chip. Microcontroller has a CPU, in addition with a fixed amount of RAM, ROM and other
peripherals all embedded on a single chip. At times it is also termed as a mini computer or a
computer on a single chip.

Comparison of Microcontroller and Microprocessor


Microcontroller :
1. Microcontroller having inbuilt RAM or ROM and inbuilt timer.
2. Input and output ports are available.
3. Inbuilt serial port.
4. Separate memory to store program and data.
5. Many functional pins on the IC.
6. Boolean operation directly possible.
7. It takes few instructions to read and write data from external memory.
Microprocessor :
1. Do not have inbuilt RAM or ROM and timer.
2. Input and output ports are not available, requires extra device like 8255
3. Do not have inbuilt serial port.
4. Program and data are stored in same memory.
5. Less multifunction pins on IC.
6. Boolean operation is not possible directly.
7. It takes many instructions to read and write data from external memory.

Microprocessor Characteristics

Three basic characteristics that differentiate microprocessors are-


• Instruction set: The set of instructions that the microprocessor can execute.
• Bandwidth: The number of bits processed in a single instruction.
• Clock speed: Given in megahertz (MHz), the clock speed determines how many instructions
per second the processor can execute.
In all cases, the higher the value, the more powerful the CPU. For example, a 32 bit microprocessor
that runs at 50MHz is more powerful than a 16-bit microprocessor that runs at 25MHz.

3
Types of Microprocessors:
Microprocessors generally are categorized in terms of the maximum number of binary bits in the
data they process (i.e. number of bits that their ALU can work with at a time) – that is, their word
length. Over time, five standard data widths have evolved for microprocessors: 4-bit, 8-bit, 16-bit,
32-bit, 64-bit.
So, 16-bit microprocessor means that ALU can work with 16-bit number at a time or, data width
of this microprocessor is 16-bit.
There are so many manufacturers of Microprocessors, but only two companies have been
producing popular microprocessors: Intel and Motorola.

4
Evaluation of Microprocessor:

We can divide the years of development of microprocessors into 5 generations (based on data width, Clock speed,
Transistor count, etc.):

Notable Clock Transistor


Generation Time Period Key Features Applications
Microprocessors Speed Count
- 4-bit & 8-bit
architecture
Calculators,
- Basic instruction Intel 4004 (1971)
First 108 kHz - Embedded
1971-1978 set Intel 8008 (1972) 2,300 - 6,000
Generation 2 MHz Systems, Early
- Used Intel 8080 (1974)
Computers
PMOS/NMOS
technology
- 16-bit architecture Intel 8086 (1978)
IBM PCs, Apple
Second - Improved Intel 8088 (1979) 5 - 16 29,000 -
1978-1985 Macintosh, Early
Generation memory addressing Motorola 68000 MHz 68,000
Workstations
- Used in early PCs (1979)
- 32-bit architecture
Intel 80386 (1985)
- Protected mode Advanced PCs,
Third Intel 80486 (1989) 16 - 100 275,000 -
1985-1990s for multitasking Workstations,
Generation Motorola 68040 MHz 1.2M
- On-chip cache Gaming Consoles
(1990)
memory
Intel Pentium
- 64-bit (1993)
architecture AMD Athlon
High-Performance
Fourth 1990s- - Multi-core (1999) 60 MHz - 4 3.1M -
PCs, Gaming,
Generation Present processors Intel Pentium 4 GHz 100M
Servers
- Increased cache (2000)
size AMD Athlon 64
(2003)
- AI & machine
learning AMD Ryzen
acceleration (2017-Present)
AI Computing,
- Hybrid core Intel Alder Lake
Fifth Present & 2 GHz - 6 Cloud Servers,
architecture (2021) 10B+
Generation Future GHz Mobile & Desktop
- Energy-efficient Apple M1, M2,
Devices
ARM(Advanced M3 (2020-
RISC Machine) Present)
chips

5
Microprocessor Architecture

As there are a great many variations in architecture between the different kinds of CPU/MPU, we
shall begin by looking at a simplified model of the structure. The simplified model consists of five
parts, which are:

Arithmetic & Logic Unit (ALU)

The part of the central processing unit that deals with operations such as addition, subtraction and
multiplication of integers and Boolean operations. It receives control signals from the control unit
telling it to carry out these operations. It works in conjunction with the register array for many of
these, in particular, the accumulator and flag registers. The accumulator holds the results of
operations, while the flag register contains a number of individual bits that are used to store
information about the last operation carried out by the ALU.

Some of the tasks performed by the ALU are given below:

Addition and subtraction: These two tasks are performed by constructs of logic gates, such as half
adders and full adders. While they may be termed 'adders', they can also perform subtraction via the
use of inverters and '2's complement' arithmetic.

Multiplication and division: In most modern processors, the multiplication and division of integer
values is handled by specific floating-point hardware within the CPU. Earlier processors used either
6
additional chips known as maths co-processors, or used a completely different method to perform
the task.

Logical tests: Further logic gates are used within the ALU to perform a number of different logical
tests, including seeing if an operation produces a result of zero. Most of these logical tests are used
to then change the values stored in the flag register, so that they may be checked later by separate
operations or instructions. Others produce a result which is then stored, and used later in further
processing.

Comparison: Comparison operations compare values in order to determine such things as whether
one number is greater than, less than or equal to another. These operations can be performed by
subtraction of one of the numbers from the other, and as such can be handled by the aforementioned
logic gates. However, it is not strictly necessary for the result of the calculation to be stored in this
instance; the amount by which the values differ is not required. Instead, the appropriate status flags
in the flag register are set and checked to determine the result of the operation.

Bit shifting: Shifting operations move bits left or right within a word, with different operations filling
the gaps created in different ways. This is accomplished via the use of a shift register, which uses
pulses from the clock within the control unit to trigger a chain reaction of movement across the bits
that make up the word. Again, this is a quite complicated logical procedure, and further reading may
aid your understanding.

Control Unit (CU)


This controls the movement of instructions in and out of the processor, and also controls the operation
of the ALU. It consists of a decoder, control logic circuits, and a clock to ensure everything happens
at the correct time. It is also responsible for performing the instruction execution cycle. The three
main elements of the control unit are as follows:

Decoder: This is used to decode the instructions that make up a program when they are being
processed, and to determine what actions must be taken to process them. These decisions are
normally taken by looking at the operation code (opcode) of the instruction, together with the
addressing mode used.

Timer or clock: The timer or clock ensures that all processes and instructions are carried out and
completed at the right time. Pulses are sent to the other areas of the CPU at regular intervals (related
to the processor clock speed), and actions only occur when a pulse is detected. This ensures that the
actions themselves also occur at these same regular intervals, meaning that the operations of the CPU
are synchronized.

Control logic circuits: The control logic circuits are used to create the control signals themselves,
which are then sent around the processor. These signals inform the arithmetic and logic unit and the
register array what actions and steps they should be performing, what data they should be using to
perform said actions, and what should be done with the results.

Register Array:
This is a small amount of internal memory that is used for the quick storage and retrieval of data and
instructions. All processors include some common registers used for specific functions, namely the
program counter, instruction register, accumulator, memory address register and stack pointer. Many
7
different types of registers are common between most microprocessor designs. These are:

Program Counter (PC): This register is used to hold the memory address of the next instruction that
has to execute in a program. This is to ensure the CPU knows at all times where it has reached, so
that it can resume following an execution at the correct point, and that the program is executed
correctly.

Instruction Register (IR): A special register within a CPU that temporarily stores the currently
fetched instruction from memory, allowing the processor to quickly access and decode it during
execution, significantly speeding up the overall process compared to repeatedly accessing slower
main memory to retrieve the instruction.

Accumulator (A, or ACC): The accumulator is used to hold the result of operations performed by the
arithmetic and logic unit

Memory Address Register (MAR): Used for storage of memory addresses, usually the addresses
involved in the instructions are held in the instruction register. The control unit then checks this
register when needs to know which memory address to check or obtain data from.

Memory Buffer Register (MBR): When an instruction or data is obtained from the memory or
elsewhere, it is first placed in the memory buffer register. The next action to take is then determined
and carried out, and the data is moved on to the desired location.

Flag register/status register/condition code register (CCR): The flag register is specially designed
to contain all the appropriate 1-bit status flags, which are changed as a result of operations
involving the arithmetic and logic unit.

Other general-purpose registers: These registers have no specific purpose, but are generally used for
the quick storage of pieces of data that are required later in the program execution.

System Bus:
It is used for connections between the processor, memory and peripherals, and transfer of data
between the various parts. The system bus consists of three different groups of wiring, called the
data bus, control bus and address bus. These all have separate responsibilities and characteristics,
which can be outlined as follows:

8
Address Bus

Microprocessor

Data Bus

MWTC
MRDC
IOWC
IORC

Read Only Read/Write


Memory Memory Keyboard Printer
ROM RAM

Control Bus: The control bus contains lines that select the memory or I/O and cause them to perform
a read or write operation. In most computer system, there are four control bus connections:

• MRDC (Memory read control)


• ̅MWTC (Memory Write control)
• IORC (I/O read control)
• IOWC (I/O write control)

Data Bus: This is used for the exchange of data between the processor, memory and peripherals, and
is bi-directional so that it allows data flow in both directions along the wires. Data bus may be 8 bits,
16 bits, 32 bits or 64 bits.

Address Bus: This is a unidirectional bus. This bus is usually 8 to 32 bits wide. Information transfer
takes place from the microprocessor to the memory or I/O elements. For a 16 bit address bus,
microprocessor can generate 216 = 65,536 different possible address. Each one of these addresses
represents a definite memory location or an I/O element.

Memory:
The memory is not an actual part of the CPU itself, and is instead housed elsewhere on the
motherboard. However, it is here that the program being executed is stored, and as such is a crucial
part of the overall structure involved in program execution.

Instruction Execution
To execute an instruction processor must follows minimum of four steps:
(1) Instruction Fetch
(2) Instruction Decode
(3) Instruction execute
(4) Store or, Store of Result
9
Instruction Fetch: Control unit collect the instructions from main memory and put them in CPU
register. This is called instruction fetch.

Instruction Decode: When instruction reaches in processor register, CU decodes or interprets the
instruction and sends necessary signals and data to ALU.

Instruction Execute: ALU process the data with arithmetic and logic operations and gives a result
according to instructions.

Store Result: Finally CU stores result in Accumulator or main memory. These

four steps to execute an instruction are called machine cycle.

Microprocessor Architecture (Based on Instruction Set):

As microprocessor is a programmable device, obviously it has an instruction set to control its


operation by programming. There are two prevalent instruction set architectures:

✓ RISC (Reduced Instruction Set Computer) Architecture.


✓ CISC (Complex Instruction Set Computer) Architecture.

RISC CISC
Small number of instructions in the instruction CISC chips have a large amount of different
set compared to CISC. and complex instructions
RISC chips use simpler instructions sets to In common, CISC chips process smaller
achieve higher clock frequencies and process instructions per clock cycle than RISC
more instructions per clock cycle than CISC processors, but to do same task number of
Processors instruction is smaller in CISC than RISC.
It’s hardware design is easy but software It’s hardware design is difficult but
(programming) is difficult because you have to programming is easy as it has a large number of
write code using a small number of instructions.
instructions.
Apple and SUN use RISC architecture. Intel and AMD develop CISC processors. 8086
microprocessor has CISC architecture.

Typically, CISC chips have a large amount of different and complex instructions. The philosophy
behind it is that hardware is always faster than software, therefore one should make a powerful
instruction set, which provides programmers with assembly instructions to do a lot with short
programs.
There is still considerable controversy among experts about which architecture is better. Some say
that RISC is cheaper and faster and therefor the architecture of the future. Others note that by making
the hardware simpler, RISC puts a greater burden on the software. Software needs to become more
complex. Software developers need to write more lines for the same tasks. Therefore, they argue that
10
RISC is not the architecture of the future, since conventional CISC chips are becoming faster and
cheaper anyway.

Intel 8085 microprocessor instruction set

The Intel 8085 microprocessor is an 8-bit microprocessor with a 16-bit address bus, capable of addressing 64 KB
of memory. It has a rich instruction set categorized into different groups based on functionality.

The Intel 8085 instruction set provides a comprehensive set of operations necessary for programming a wide
range of applications, from simple arithmetic to complex control operations. These instructions form the
backbone of low-level assembly programming and are essential for understanding microprocessor architecture.

Intel 8085 Instruction Set Classification

The instruction set of the 8085 microprocessor is broadly classified into the following categories:

1. Data Transfer Instructions


2. Arithmetic Instructions
3. Logical Instructions
4. Branching Instructions
5. Control and Machine Instructions

1. Data Transfer Instructions

These instructions are used to transfer data between registers, memory, and the accumulator.

11
2. Arithmetic Instructions

These instructions perform arithmetic operations like addition, subtraction, and increment/decrement.

12
3. Logical Instructions

These instructions perform bitwise logical operations such as AND, OR, XOR, and rotate.

4. Branching Instructions

These instructions are used to alter the flow of program execution.

13
5. Control and Machine Instructions

These instructions control the execution of the processor.

14

You might also like