0% found this document useful (0 votes)
2 views

Microprocessor System and Interfacing

The Microprocessor Systems and Interfacing course aims to provide students with a comprehensive understanding of microprocessor architecture, programming, and interfacing techniques. Key objectives include mastering assembly language programming, interfacing peripheral devices, and applying knowledge to solve practical problems. The course includes lectures, assignments, and examinations to assess students' understanding and skills in microprocessor systems.

Uploaded by

nicolejacob701
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Microprocessor System and Interfacing

The Microprocessor Systems and Interfacing course aims to provide students with a comprehensive understanding of microprocessor architecture, programming, and interfacing techniques. Key objectives include mastering assembly language programming, interfacing peripheral devices, and applying knowledge to solve practical problems. The course includes lectures, assignments, and examinations to assess students' understanding and skills in microprocessor systems.

Uploaded by

nicolejacob701
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

MICROPROCESSOR SYSTEM AND

INTERFACING
Credit Hours: 3
Code: CPE 401

Course lecturer:
Engr. Afolabi AWODEYI
[Ph.D(in view)], M.Eng., PGDE, PGD

Lecture hours:
Email: [email protected]
Examination – 70% [Answer 4 out of 6 questions]
C.A – 20% [ Assignment, Tests and Quizzes]
Attendance – 10% [80% Attendance]

1
OBJECTIVES OF THIS COURSE
1) Understand the fundamental concepts and architecture of microprocessors.

Students will gain a solid understanding of the basic components, operations, and

programming models of microprocessors.

2) Acquire knowledge of microprocessor programming in real and protected modes.

Students will learn how to write assembly language programs for microprocessors,

including the use of registers, memory, addressing modes, and interrupts.

3) Master the principles of memory and I/O interfacing. Students will understand the

techniques for connecting memory and input/output devices to microprocessors,

including address decoding, bus timing, and I/O instructions.

4) Develop skills in interfacing peripheral devices with microprocessors. Students will

learn how to use various peripheral chips (e.g., PPI, UART, DMA, timer/counter) to

communicate with external devices.

5) Gain proficiency in assembly language programming for Intel and Motorola

microprocessors. Students will be able to write efficient and well-structured assembly

language programs for specific microprocessor architectures.

6) Analyze the architecture and components of typical microprocessor-based

systems. Students will understand the relationship between hardware and software in

real-world systems, such as personal computers.

7) Apply their knowledge to solve practical problems in microprocessor-based

systems. Students will be able to design, implement, and troubleshoot microprocessor-

based applications.

2
STUDENT LEARNING OUTCOMES
Upon successful completion of the Microprocessor Systems and Interfacing course, students

will be able to:

1. Demonstrate a comprehensive understanding of microprocessor architecture and

operation.

2. Write efficient assembly language programs for Intel and Motorola microprocessors.

3. Effectively interface memory, input/output devices, and peripheral chips with

microprocessors.

4. Design and implement microprocessor-based systems for various applications.

5. Troubleshoot and debug microprocessor-related issues.

6. Apply their knowledge of microprocessors to solve real-world problems.

7. Communicate effectively about microprocessor concepts and technologies.

8. Work independently and collaboratively on microprocessor-related projects.

3
TABLE OF CONTENTS
Week 1: Introduction to Microprocessors and Basic Architecture

i) Definition and purpose of microprocessors

ii) CPU, memory, I/O, and bus subsystems

Week 2: Basic Operation of the Microprocessor System

i) Fetch-decode cycle

ii) Architecture of typical 8-bit and 16-bit microprocessors (Intel and Motorola)

Week 3: Real Mode Programming - Registers, Memory, and Addressing Modes

Week 4: Real Mode Programming - Interrupt System

i) Organization of interrupt system

ii) Interrupt vectors and external interrupts

iii) Implementation of single and multiple interrupts in real mode

Week 5: Protected Mode Programming - Registers, Memory Management, and Address

Translation

Week 6: Protected Mode Programming - Descriptors, Page Tables, and System Control

Instructions

Week 7: Protected Mode Programming - Multitasking, Memory Protection, Addressing

Modes, and Interrupt System

Week 8: Memory and I/O Interfacing

i) Memory interfacing and address decoding

ii) I/O interfacing: memory-mapped I/O and isolated I/O

iii) Bus timing and I/O instructions

Week 9: Peripheral Devices Interfacing - 8255 PPI/6821 PIA

Week 10: Peripheral Devices Interfacing - 8251 UART/6821 UART, DMA,

Timer/Counter Chips

4
Week 11: Instruction Set and Assembly Language Programming - Instruction Set of Intel

and Motorola Microprocessors

Week 12: Instruction Set and Assembly Language Programming - Assembly Language

Programming Examples

Week 13: System Architecture and Case Studies - Discussion of a Typical System (e.g.,

IBM PC, Apple Macintosh)

Week 14: System Architecture and Case Studies - System Components and Their

Interactions

Week 15: Course Review and Final Exam

 Review of key concepts and topics

 Final examination

5
ASSIGNMENTS

Week 1-2: Introduction to Microprocessors and Basic Architecture

 Assignment 1: Research and write a brief report on the history of microprocessors,

including key milestones.

 Assignment 2: Create a flowchart or diagram illustrating the basic fetch-decode cycle

of a microprocessor.

Week 3-4: Real Mode Programming

 Assignment 3: Write an assembly language program to perform simple arithmetic

operations (addition, subtraction, multiplication, division) using registers.

 Assignment 4: Implement a basic interrupt service routine (ISR) to handle a keyboard

interrupt.

Week 5-6: Protected Mode Programming

 Assignment 5: Explain the differences between real and protected modes in terms of

memory management, multitasking, and protection.

 Assignment 6: Create a simple multi-tasking system using protected mode features.

Week 7-8: Memory and I/O Interfacing

 Assignment 7: Design an address decoding circuit for a 16-bit microprocessor.

 Assignment 8: Write an assembly language program to read and write data from/to a

memory-mapped I/O device.

Week 9-10: Peripheral Devices Interfacing

 Assignment 9: Interface an 8255 PPI chip to a microprocessor and write a program to

control its output ports.

 Assignment 10: Implement a serial communication interface using an 8251 UART.

Week 11-12: Instruction Set and Assembly Language Programming

6
 Assignment 11: Write a comprehensive assembly language program to sort an array of

numbers.

 Assignment 12: Analyze and optimize a given assembly language program for

performance.

Week 13-14: System Architecture and Case Studies

 Assignment 13: Research and write a report on the architecture of a specific

microprocessor-based system (e.g., IBM PC, Raspberry Pi).

 Assignment 14: Design a simple embedded system using a microcontroller (e.g.,

Arduino, PIC).

Week 15: Course Review and Final Exam

 Assignment 15: Prepare for the final exam by reviewing course materials and

practicing past assignments.

7
Week 1: Introduction to Microprocessors and Basic Architecture

1. Definition and Purpose of Microprocessors

A microprocessor, often referred to as the "brain" of a computer system, is an integrated circuit

(IC) that executes instructions stored in computer memory. It is the central processing unit

(CPU) of a microcomputer. Microprocessors have revolutionized the world of technology,

enabling the creation of a vast array of devices, from smartphones and laptops to industrial

automation systems and medical equipment.

Basic architecture of a microprocessor

Key functions of a microprocessor include:

a) Instruction execution: Fetching instructions from memory, decoding them, and

executing the corresponding operations.

b) Data processing: Manipulating data according to the instructions provided.

c) Control flow: Managing the sequence of instruction execution and making decisions

based on conditions.

d) I/O operations: Interacting with input/output devices to receive data and send results.

8
2. CPU, Memory, I/O, and Bus Subsystems

MICROPROCESSOR SYSTEMS CONSIST OF SEVERAL INTERCONNECTED

SUBSYSTEMS:

1). Central Processing Unit (CPU):

i) The core component that executes instructions and performs data processing.

ii) Typically includes an arithmetic logic unit (ALU) for arithmetic and logical operations,

a control unit for managing the instruction execution process, and registers for storing

temporary data.

2). Memory:

i) Stores data and instructions that the CPU needs to access.

ii) Types of memory include:

a) Random Access Memory (RAM): Volatile memory used for temporary data

storage.

b) Read-Only Memory (ROM): Non-volatile memory used for storing

permanent data and programs.

3). Input/Output (I/O) Subsystem:

i) Handles communication between the microprocessor and external devices (e.g.,

keyboard, monitor, hard drive).

ii) Includes I/O controllers that manage the transfer of data between the CPU and I/O

devices.

4). Bus Subsystem:

i) A collection of electrical conductors that provide a communication channel between

the CPU, memory, and I/O devices.

9
ii) Types of buses include:

a) Address bus: Carries memory addresses to the memory subsystem.

b) Data bus: Carries data between the CPU, memory, and I/O devices.

c) Control bus: Carries control signals that coordinate the operations of the

system.

These subsystems work together to form a complete microprocessor system, enabling the

execution of programs and interaction with the external world.

3. Purposes of Microprocessors

Microprocessors serve a wide range of purposes in modern technology. Below are some of the

key applications:

1). Computers and Embedded Systems:

i) Personal Computers (PCs): Microprocessors power computers, enabling them to run

various software applications and perform tasks like word processing, web browsing,

and gaming.

ii) Servers: High-performance microprocessors are used in servers to handle large

workloads, such as running websites, databases, and email systems.

10
iii) Embedded Systems: Microprocessors are embedded in a variety of devices, including

smartphones, tablets, gaming consoles, digital cameras, and appliances. They control

the functionality and operation of these devices.

2). Industrial Automation and Control:

i) Factory Automation: Microprocessors are used in programmable logic controllers

(PLCs) to automate industrial processes, such as assembly lines, manufacturing

equipment, and quality control systems.

ii) Robotics: Microprocessors control the movement and actions of robots in various

industries, including manufacturing, healthcare, and exploration.

iii) Process Control: Microprocessors are used to monitor and control industrial processes,

such as temperature, pressure, and flow rates.

3. Automotive Industry:

i) Engine Control Units (ECUs): Microprocessors in ECUs manage engine

performance, fuel efficiency, emissions control, and safety features in modern vehicles.

ii) Infotainment Systems: Microprocessors power the infotainment systems in cars,

providing features like navigation, audio systems, and connectivity.

iii) Advanced Driver Assistance Systems (ADAS): Microprocessors are used in ADAS

technologies, such as adaptive cruise control, lane departure warning, and automatic

emergency braking.

4. Consumer Electronics:

i) Smart Appliances: Microprocessors enable smart appliances to connect to the internet,

be controlled remotely, and provide advanced features.

11
Examples of Smart Appliances

Kitchen Appliances:

 Smart Refrigerators: Can track food inventory, suggest recipes based on available

ingredients, and even order groceries automatically.

 Smart Ovens: Allow you to preheat remotely, monitor cooking progress, and set

custom cooking modes.

 Smart Coffee Makers: Can be programmed to brew coffee at a specific time or

controlled remotely.

 Smart Dishwashers: Can adjust the wash cycle based on the load size.

Laundry Appliances:

 Smart Washing Machines: Can detect the type of fabric and adjust the wash cycle

accordingly.

 Smart Dryers: Can automatically adjust the drying time based on the moisture level

of the clothes.

Security Systems:

 Smart Doorbells: Can capture video and audio when someone presses the doorbell.

 Smart Security Cameras: Allow you to monitor your home remotely and receive

alerts for suspicious activity.

Other Smart Appliances:

 Smart TVs: Can be controlled remotely, access streaming services, and interact with

voice assistants.

 Smart Light Bulbs: Can be controlled remotely, changes colours, and programmed to

create different lighting scenes.

12
ii) Digital Cameras and Camcorders: Microprocessors handle image processing,

autofocus, and video recording in digital cameras and camcorders.

iii) Gaming Consoles: Microprocessors provide the processing power for high-

performance gaming experiences.

5. Medical Devices:

i) Medical Imaging: Microprocessors are used in medical imaging equipment, such as

MRI machines, CT scanners, and ultrasound devices.

ii) Patient Monitoring Systems: Microprocessors monitor vital signs, such as heart rate,

blood pressure, and oxygen levels, in hospitals and clinics.

iii) Prosthetic Devices: Microprocessors can be integrated into prosthetic limbs to provide

more natural and functional movement.

6. Internet of Things (IoT):

i) IoT Devices: Microprocessors are essential components of IoT devices, enabling them

to collect, process, and transmit data over networks.

13
Week 2: Basic Operation of the Microprocessor System
I) Fetch-Decode Cycle

The fetch-decode cycle is the fundamental process by which a microprocessor executes

instructions. It involves fetching an instruction from memory, decoding its meaning, and

executing the corresponding operation. This cycle is repeated continuously until the program

terminates. The fetch-decode cycle dictates how computer systems retrieves instructions from

the memory for the Central Processing Unit (CPU) to interpret and execute accordingly for

different programs. The cycle is split into parts of instruction time(i-time) and execution

time(e-time), with the cycle also including the four steps of Fetch-Decode-Execute-Store. The

fetch decode execute cycle is the process the computer goes through when processing

instructions. The cycle is performed constantly from boot up, until the computer is shutdown.

Instruction Time (i-time) – instructions are retrieved from memory and decoded by the CPU

Execution Time (e-time) – program instructions are executed by the CPU with processed

data(information) being stored.

Fetch-Decode Cycle Steps:

Fetch:

o The Program Counter (PC) holds the address of the next instruction to be

executed.

o The PC's value is sent to the memory address bus.

o The memory system fetches the instruction at the specified address and places

it on the data bus.

o The instruction is transferred to the instruction register within the CPU.

14
Decode:

 The control unit decodes the instruction to determine the operation to be performed and

the operands (data) required.

 The opcode (operation code) of the instruction is analyzed to identify the specific

operation.

 The addressing modes used to access operands are determined.

15
Execute:

 The control unit generates control signals to execute the decoded instruction.

 The ALU performs the specified operation on the operands.

 The result of the operation is stored in a register or memory location.

Increment PC:

 The PC is incremented to point to the next instruction to be fetched.

Repeat: The cycle then repeats, fetching, decoding, and executing the next instruction until the

program terminates or an interrupt occurs.

Key Points:

 The fetch-decode cycle is the fundamental building block of microprocessor operation.

 The control unit plays a crucial role in coordinating the various steps of the cycle.

 The ALU performs the actual computations and data manipulation.

 The PC keeps track of the program's execution flow.

16
FURTHER READING

Instruction address Program counter to Memory Address Register

Instruction Address is copied from the PC to the MAR

In the diagram above, you will see a number of registers, two areas of memory, and the stages

of the Fetch-Decode-Execute cycle. Let me explain them :

ACC – This is the Accumulator, and is the register where intermediate arithmetic and

logic results are stored. This saves the data being written and read twice into main memory.

Main memory tends to be slower than the accumulator or any other register, and it is cheaper.

MBR – A memory buffer register (MBR) (also known as memory data register (MDR)) is

the register in a computer’s processor, or central processing unit, that stores the data being

transferred to and from the immediate access storage. It contains the copy of designated

memory locations specified by the memory address register.

MAR – memory address register (MAR) – holds the address of the current instruction that is

to be fetched from memory, or the address in memory to which data is to be transferred.

17
CIR – Current Instruction Register – In computing, the instruction register (IR) or current

instruction register (CIR) is the part of a CPU’s control unit that holds the instruction

currently being executed or decoded.

PC – Program Counter – The program counter (PC), commonly called the instruction

pointer (IP) is a processor register that indicates where a computer is in its program sequence.

Memory – This consists of the address of the the memory location, and the contents of that

location. The Trick is to use the memory address to find the data of that location, and then

move that data (whatever it is) into the required register for it to be operated on (The Operand).

In the first diagram above, the program counter is read into the MAR.

Executing the first Instruction…..

Instruction read into MBR (Memory Buffer Register)

In the diagram above, With the MAR contain “1”, the processor will then fetch the contents of

that address, which is the first line of our program. This 1st instruction is read into the MBR –

Memory buffer Register. The Memory Address Register and program counter contain the

address of the 1st instruction.

18
The Diagram below shows the Instruction in the MBR now being loaded to the CIR (Current

Instruction Register. This is the fetch phase of the cycle

Instruction Loaded into Current Instruction Register (CIR)

The program counter is now incremented and will point to the next instruction in the program

memory.

The program Counter is Incremented

19
In the diagram below, the address part of the current instruction is placed in the MAR. It

indicates the location of the next piece of data to be loaded. This is the decoding phase of the

cycle.

Operand and Operator. The Instruction LDA 34 consists of an operator and a operand. In

this case LDA is the operator, and 34 is the operand. In all computer

languages, expressions consist of two types of components: operands and operators. Operands

are the objects that are manipulated ( in this case “34”, and operators are the symbols that

represent specific actions (LDA performs a specific action).

The Instruction is decoded and loaded into MBR

In this diagram, The contents of this MAR register will be loaded into the MBR Register for

some operation to occur on that data.

20
Memory Contents moved into the MBR, address by MAR.

In this diagram, the contents of the MBR are now loaded into the ACC. At this point we can

see that the instruction has now been executed.

In this diagram it shows that the status register is checked to see if there have been any

interrupts. But what is an interrupt?

21
In digital computers, an interrupt is a response by the processor to an event that needs attention

from the software. An interrupt condition alerts the processor and serves as a request for the

processor to interrupt the currently executing code when permitted, so that the event can be

processed in a timely manner. If the request is accepted, the processor responds by suspending

its current activities, saving its state, and executing a function called an interrupt handler (or

an interrupt service routine, ISR) to deal with the event.

The program counter contents are copied to the Memory Address Register. so to retrieve the

data to be found in that location.

22
The 2nd instruction is read into the MBR. This 2nd instruction is contained in the contents of

the program address “2”

The contents of the MBR are now moved to the Current Instruction Register

23
The program counter is now updated to point to the next instruction in the program memory

The Address part of the Current Instruction Register (The Operand) is placed into the MAR

24
The Address which is in the MAR, the contents of this register are then loaded into the MBR.

The contents of the MBR are then added to the ACC. This will give us an accumulator value

of 90 – remember that the previous value was 28, and adding 62 we get 90!

25
Following a successful instruction completion, the Status register is checked for Interrupts

Status Register Checked for Interrupts

A new instruction is now ready to be fetched, decoded, and executed. The Address of the

program counter now goes to the MAR.

26
The third instruction is read/loaded into the Memory Buffer register

The third instruction is copied into the CIR.

27
The program counter is now incremented for the next instruction to come along from the

program memory.

The address part of the CIR (the operand) is placed into the MAR – Memory Address Register

28
We have a STA 88, which means that the contents of the ACC will be stored in memory

location 88. So in this diagram, the contents of the ACC are moved to the MBR.

Here the contents of the MBR are now copied into the memory location 88.

29
This diagram shows how the contents of the MBR are now copied into the location 88, and

the contents change from 135 to 90.

Status Registers Are checked

The status register will now check for interrupts as the Fetch Decode Execute cycle is now

complete, for this instruction, and our program.

30
II) Architecture of 8-Bit Microprocessors [Intel 8080 and Motorola 6800]

a) Intel Architecture

Intel's 8080 microprocessor was one of the first commercially successful microprocessors and

set the standard for many subsequent 8-bit architectures. A microprocessor integrates the

functions of computers CPU on a single IC. It is a programmable device that accepts the digital

data as input, processes according to the commands stored in its memory and gives results as

output. An 8080 microprocessor is an 8-bit parallel CPU, and this microprocessor is used in

general purpose digital computer systems.It is made up on a single large-scale integration chip

using Intel’s N-channel silicon gate MOS process. The microprocessor 8080 consists of 40 pins

and it microprocessor transfers internal information and data through an 8- bit, bidirectional 3-

state data bus (D0-D7). The peripheral device addresses and memory addresses are transmitted

over a 16-bit 3-state address bus (A0-A15).

31
Six control and timing outputs WAIT, HLDA, WAIT, DBIN, SYNC and WR derive from the

microprocessor 8080, while control inputs (HOLD, READY, RESET, (WR) ̅ and INT), power

inputs (+12, +5, -5 and GND), and clock inputs ( ∅1 and ∅2 ) are accepted by the 8080.

Key features of Intel's 8080 architecture:

 8-bit data bus: Can process and transfer 8 bits of data at a time.

 16-bit address bus: Can address up to 64KB of memory.

 General-purpose registers: A set of 8-bit registers (A, B, C, D, E, H, L) used for

general-purpose data storage.

 Accumulator: A special-purpose register used for arithmetic and logical operations.

 Stack pointer: Points to the top of the stack, used for function calls and local variable

storage.

 Program counter: Holds the address of the next instruction to be executed.

 Flag register: Stores status flags indicating the results of arithmetic and logical

operations.

8080 Microprocessor’s Architecture

The functional blocks of the microprocessor 8080 is shown in the architecture below, and its

CPU consists of the following functional units:

 Address Logic and Register Array

 Arithmetic and Logic Unit

 Control Section and Instruction Register

 Bi directional, 3 State Data Bus Buffer

32
Intel 8080 microprocessor block diagram

Further Reading
Arithmetic and Logic Unit
The ALU includes the following registers:

 An 8-bit Accumulator

 An 8-bit Temporary Accumulator (TMP)

 An 8-bit Temporary Register

 A Flag Register

Arithmetic, logical and rotate operations are performed in the ALU. The arithmetic and logic

unit is fed by the registers’ temporary accumulator, carry flip flop and TMP register. The result

of the process can be transmitted to the accumulator; similarly, the ALU also feeds the flag

register. The TMP register gets information from the internal bus, and then sends the data to

the ALU and also to the flag register. The accumulator can be loaded from the internal bus, and

the ALU and it transfers data to the temporary accumulator. The inside of the auxiliary carry

33
flip flop and accumulator are tested for decimal correction by executing a Decimal Adjust for

Addition instruction.

Instruction Set

The 8080 microprocessor instruction set includes five different categories of instructions:

 Data Moving Group: Data moving instruction transfers data between registers or among

memory and registers.

 Arithmetic Group: Arithmetic group instructions Add, subtract, increment, or decrement

data into memory or in registers.

 Logical Group: Logical group instruction AND, OR, EX-OR, compare, complement or

rotates data into registers or in memory.

 Branch group: It is also called as control transfer instruction. It includes Conditional,

unconditional, return instructions, and sub routine call instructions and restarts.

 Stack, machine and I/O group: This instruction includes I/O instructions, as well as

instructions for maintaining the stack and internal control flags

Instruction and Data Formats

The memory of 8080 microprocessor is organized into 8-bit quantities, called bytes. Each byte

has an exclusive 16-bit binary address related to its sequential position in the memory. The

8080 may also consist of ROM (read only memory) elements and RAM (random access

memory) elements, and the microprocessor can directly address up to 65,536 bytes of memory.

Data in 8080 microprocessor is stored in the form of 8-bit binary digits.

When a register includes a binary number, it is essential to find the order in which bits of the

number are written. In the Intel 8080 microprocessor, BIT 0 is refered to as LSB, and the BIT

7 as the MSB.

34
The 8080 microprocessor program instructions may be one byte, two or three bytes in length.

Different byte instructions have to store in successive memory locations. The address of the

first byte is always used as the address of the instructions. The correct instruction format

depends on the particular operation to be executed.

Memory

The total addressable memory of the microprocessor is 64KB, and the stack program and data

memories occupy the same memory space.

 In program memory, program can be placed anywhere in the memory; call, jump and branch

instruction can use 16-bit addresses, i.e., they can be used to branch/jump anywhere within

the 64KB memory. All these instructions use complete addressing.

 In the data memory, the processor always uses 16-bit addresses so that the data can be

located anywhere.

 Stack memory is incomplete only by the size of memory, stack raises down.

Condition Flags

Flag is an 8-bit register having five 1-bit flags. There are five types of flags associated with the

implementation of instructions on the microprocessor 8080. They are sign, zero, parity, carry

35
and auxiliary carry, and these flags are represented by a 1-bit register in the CPU. A flag is set

by forcing the bit to 1, and reset by forcing the bit to 0.

 Zero Flag: If the result of an instruction has the value ‘0’, this zero flag is set; or else, it is

reset.

 Sign Flag: If the MSB bit of an instruction has the value ‘1’, this flag is set; or else, it is

reset.

 Parity Flag: If the number of the set bits in the result has even value, this flag is set; or else,

it is reset.

 Carry Flag: If there was a carry during borrow, addition, subtraction or comparison, this

flag is set; or else, it is reset.

 Auxiliary Carry: If there was a carry out from 3-bit to 4-bit of the result, this flag is set;

otherwise, it is reset.

Interrupts

The processor maintains maskable interrupts. When an interrupt arises, the processor fetches

one instruction from the bus; frequently one of these instructions:

 In RST instructions (RST0 – RST7), the processor saves current program counter into stack

and branches to memory location N * 8 (where N is a 3-bit number from 0 to 7 supplied

with the RST instruction).

 CALL instruction is a 3-byte instruction, wherein the processor calls the subroutine, address

of which is particular in the second and third bytes of the instruction.

By using EI and DI instructions, the interrupts can be enabled or disabled.

Intel 8080 microprocessor is a successor to the Intel 8008 CPU. The original version of the

microprocessor had a fault. After the error was noticed, Intel released updated version of the

CPU which could drive standard TTL devices. This is about the 8080 microprocessor, and its

36
architecture. Based on the information given here in this article, the readers are encouraged to

post their suggestions, feedbacks and comments in the comment section given below.

b) Motorola Architecture

Motorola's 6800 microprocessor was another popular 8-bit architecture, known for its

simplicity and ease of use.

Key features of Motorola's 6800 architecture:

 8-bit data bus: Can process and transfer 8 bits of data at a time.

 16-bit address bus: Can address up to 64KB of memory.

 General-purpose registers: A set of 8-bit registers (A, B, X, Y) used for general-

purpose data storage.

 Accumulator: A special-purpose register used for arithmetic and logical operations.

 Index registers: Used for addressing and data manipulation.

 Stack pointer: Points to the top of the stack, used for function calls and local variable

storage.

 Program counter: Holds the address of the next instruction to be executed.

 Condition code register: Stores status flags indicating the results of arithmetic and

logical operations.

Block diagram of the 6800 microprocessor:

37
Motorola 6800 microprocessor block diagram

Similarities and Differences between 8-bit Intel 8080 and Motorola 6800:

 Both architectures have an 8-bit data bus and a 16-bit address bus.

 Both have general-purpose registers, an accumulator, a stack pointer, and a program

counter.

 The 8080 has a flag register, while the 6800 has a condition code register.

 The 6800 has index registers for addressing, while the 8080 does not.

38
III) Architecture of 16-Bit Microprocessors [Intel 8080 and Motorola 6800]

a) Intel Architecture

Intel's 8086 microprocessor was a significant advancement over 8-bit microprocessors,

offering a 16-bit data bus and a larger address space.

Key features of Intel's 8086 architecture:

 16-bit data bus: Can process and transfer 16 bits of data at a time.

 20-bit address bus: Can address up to 1 megabyte of memory.

 General-purpose registers: A set of 16-bit registers (AX, BX, CX, DX, SP, BP, SI,

DI) used for general-purpose data storage.

 Segment registers: Used to define memory segments and provide a segmented

memory model.

 Instruction pointer: Holds the address of the next instruction to be executed.

 Flag register: Stores status flags indicating the results of arithmetic and logical

operations.

b) Motorola Architecture

Motorola's 68000 microprocessor was another popular 16-bit architecture, known for its

powerful instruction set and modular design.

Key features of Motorola's 68000 architecture:

 16-bit data bus: Can process and transfer 16 bits of data at a time.

 24-bit address bus: Can address up to 16 megabytes of memory.

 General-purpose registers: A set of 32-bit registers (D0-D7, A0-A7) used for general-

purpose data storage.

 Address registers: Used for addressing and data manipulation.

39
 Program counter: Holds the address of the next instruction to be executed.

 Status register: Stores status flags indicating the results of arithmetic and logical

operations.

Block diagram of the motorola 68000 microprocessor:

Motorola 68000 microprocessor block diagram

Similarities and Differences between 16-bit Intel 8080 and Motorola 6800::

 Both architectures have a 16-bit data bus and a larger address space compared to 8-bit

microprocessors.

 Both have general-purpose registers and a program counter.

 The 8086 uses a segmented memory model, while the 68000 uses a linear memory

model.

40
 The 8086 has a flag register, while the 68000 has a status register.

 The 68000 has a more powerful instruction set and is often considered more versatile

than the 8086.

Execution of whole 8086 Architecture:

1. All instructions are stored in memory hence to fetch any instruction first task is to obtain

the Physical address of the instruction is to be fetched. Hence this task is done by Bus

Interface Unit (BIU) and by Segment Registers. Suppose the Code segment has a Segment

address and the Instruction pointer has some offset address then the physical address

calculator circuit calculates the physical address in which our instruction is to be fetched.

2. After the address calculation instruction is fetched from memory and it passes through C-

Bus (Data bus) as shown in the figure, and according to the size of the instruction, the

instruction pre-fetch queue fills up. For example MOV AX, BX is 1 Byte instruction so it

will take only the 1st block of the queue, and MOV BX,4050H is 3 Byte instruction so it

will take 3 blocks of the pre-fetch queue.

3. When our instruction is ready for execution, according to the FIFO property of the queue

instruction comes into the control system or control circuit which resides in the Execution

unit. Here instruction decoding takes place. The decoding control system generates an

opcode that tells the microprocessor unit which operation is to be performed. So the

control system sends signals all over the microprocessor about what to perform and what

to extract from General and Special Purpose Registers.

4. Hence after decoding microprocessor fetches data from GPR and according to

instructions like ADD, SUB, MUL, and DIV data residing in GPRs are fetched and put

as ALU’s input. and after that addition, multiplication, division, or subtraction whichever

calculation is to be carried out.

41
5. According to arithmetic, flag register values change dynamically.

6. While Instruction was decoding and executing from step-3 of our algorithm, the Bus

interface Unit doesn’t remain idle. it continuously fetches an instruction from memory

and put it in a pre-fetch queue and gets ready for execution in a FIFO manner

whenever the time arrives.

7. So in this way, unlike the 8085 microprocessor, here the fetch, decode, and execution

process happens in parallel and not sequentially. This is called pipelining, and because of

the instruction pre-fetch queue, all fetching, decoding, and execution process happen

side-by-side. Hence there is partitioning in 8086 architecture like Bus Interface Unit and

Execution Unit to support Pipelining phenomena.

Advantages of Architecture of 8086:

The architecture of the 8086 microprocessor provides several advantages, including:

1. Wide range of instructions: The 8086 microprocessor supports a wide range of

instructions, allowing programmers to write complex programs that can perform many

different operations.

2. Segmented memory architecture: The segmented memory architecture allows the 8086

microprocessor to address large amounts of memory, up to 1 MB, while still using a 16-

bit data bus.

3. Powerful instruction set: The instruction set of the 8086 microprocessor includes many

powerful instructions that can perform multiple operations in a single instruction,

reducing the number of instructions needed to perform a given task.

4. Multiple execution units: The 8086 microprocessor has two main execution units, the

execution unit and the bus interface unit, which work together to efficiently execute

instructions and manage data transfer.

42
5. Rich set of registers: The 8086 microprocessor has a rich set of registers, including

general-purpose registers, segment registers, and special registers, allowing programmers

to efficiently manipulate data and control program flow.

6. Backward compatibility: The architecture of the 8086 microprocessor is backward

compatible with earlier 8-bit microprocessors, allowing programs written for these earlier

microprocessors to be easily ported to the 8086 microprocessor.

Dis-advantages of Architecture of 8086:

The architecture of the 8086 microprocessor has some disadvantages, including:

1. Complex programming: The architecture of the 8086 microprocessor is complex and can

be difficult to program, especially for novice programmers who may not be familiar with

the assembly language programming required for the 8086 microprocessor.

2. Segmented memory architecture: While the segmented memory architecture allows the

8086 microprocessor to address a large amount of memory, it can be difficult to program

and manage, as it requires programmers to use both segment registers and offsets to

address memory.

3. Limited performance: The 8086 microprocessor has a limited performance compared to

modern microprocessors, as it has a slower clock speed and a limited number of execution

units.

4. Limited instruction set: While the 8086 microprocessor has a wide range of instructions,

it has a limited instruction set compared to modern microprocessors, which can limit its

functionality and performance in certain applications.

5. Limited memory addressing: The 8086 microprocessor can only address up to 1 MB of

memory, which can be limiting in applications that require large amounts of memory.

43
6. Lack of built-in features: The 8086 microprocessor lacks some built-in features that are

commonly found in modern microprocessors, such as hardware floating-point support

and virtual memory management.

44

You might also like