0% found this document useful (0 votes)
36 views10 pages

Lec2 معالجات

Uploaded by

Ali Abdulla
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)
36 views10 pages

Lec2 معالجات

Uploaded by

Ali Abdulla
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/ 10

Lecture 2

Computer Science Dept. / 2nd year / 1st Course (2024-2025)


Microprocessor
Dr.Haleema Essa
 The Microprocessor-based Personal Computer System
Figure below shows the block diagram of the personal computer. The block
diagram is composed of four parts:

The Block Diagram of a Microprocessor-based Personal Computer System


 What is a Microprocessor?
• The word comes from the combination of micro and processor.
• Processor means a device that processes whatever. In this context
processor means a device that processes numbers, specifically binary
numbers, 0’s and 1’s.
• To process means to manipulate. It is a general term that describes all
manipulation. It means to perform certain operations on the numbers that
depend on the microprocessor’s design. It is a programmable device that
takes in numbers, performs on them arithmetic or logical operations
according to the program stored in memory and then produces other
numbers.
 As a Programmable device:
The microprocessor can perform different sets of operations on the data it
receives depending on the sequence of instructions supplied in the given
program.

 Basic Concepts of Microprocessors


Differences between: Microcomputer, Microprocessor and
Microcontroller.

1
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa

– Microcomputer is a computer with a microprocessor as its CPU


(microprocessor-based systems). In addition, it includes memory, I/O, etc.

– Microprocessor is a silicon chip which includes ALU, register circuits &


control circuits.

– Microcontroller is a silicon chip which includes microprocessor,


memory & I/O in a single package. This is a complete microprocessor-
based control system built onto a single chip.

 MPU and CPU:


A CPU is a Central Processing Unit. This is the central ‘brain’ of a
computer and can be (usually is) made from one or more
microprocessors (Microprocessor Unit). The IBM design for the ‘Blue
Gene’ supercomputer includes a million processors.
A CPU is a type of processor tasked with a variety of roles. A
microprocessor is generally tasked with one specific task and does that one
task exceedingly well. A CPU issues commands to microprocessors and in
return the microprocessors send data to the CPU or other component as
specified by the CPU. Microprocessors are tasked with executing specific
and repeatable actions whereas a CPU is tasked with executing a wide and
diverse range of tasks.
 The microprocessor performs three main tasks:
1- Data transfer between itself and the memory or I/O system.
2- Simple arithmetic and logic operations.
3- Program flow via simple decisions.

 Buses:
A bus is a number of wires organized to provide a means of
communication among different elements in a microcomputer
system. The figure below shows the buses of 8086
microprocessor, these buses are:
• Address bus: It is a group of wires or lines that are used to
transfer the addresses of Memory or I/O devices. The address bus
is unidirectional.
• Data bus: Data Bus is used to transfer data within
Microprocessor and Memory/Input or Output devices. It is
bidirectional as Microprocessor requires to send or receive data.
2
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
• Control bus: It contains lines that select the memory or I/O and
cause them to perform a read or write operation.

The Bus Structure of 8086 Microprocessor


 8085 Microprocessor Architecture
It is an 8-bit microprocessor produced by Intel and introduced in 1976
using NMOS (Negative-channel Metal-Oxide Semiconductor) technology,
enclosed with 40 pins DIP (Dual In line Package). NMOS is a type of
semiconductor that is negatively charges so that transistors are turned on
or off by the movement of electrons.

 The main features of 8085 μp are:


1. It is a 8-bit microprocessor. Data bus is a group of 8 lines D0-D7.
2. It has 16-bit address bus and hence can address up to 𝟐𝟏𝟔= 65536 bytes
(64KB) memory actions through A0-A15.
3. The first 8 lines of address bus and 8 lines of data bus are multiplexed
AD0-AD7.
4. It supports external interrupt request.
5. It has 16-bit program counter (PC) and 16-bit stack pointer (SP).
6. It has six 8-bit general purpose register arranged in pairs: B, C, D, E, H, L.

3
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
7. It requires a signal +5V power supply and operates at 3.2 MHZ single
phase clock.

Intel 8085 Microprocessor Pin Configuration

 The main functional components of 8085 microprocessor


are as given below:
1) Registers.
2) Arithmetic logic unit.
3) Address buffer.
4) Incrementer/Decrementer address latch.
5) Interrupt control.
6) Serial I/O control.
7) Timing and control circuitry.
8) Instructions decoder and machine cycle.
 Registers

4
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
1. Accumulator register
This 8-bit register is the most important one amongst all the registers of
8085. Any data input/output to/from the microprocessor takes place via the
accumulator. It is generally used for temporary storage of data and for the
placement of final result of arithmetic/logical operations. Accumulator
(ACC or A) register is extensively used for arithmetic, logical, store and
rotate operations.
2. Temporary data
Is an 8-bit temporary data register, which is not available to the
programmer, but is used internally for execution of most of the arithmetic
and logical operations.
3. General purpose registers
The general purpose registers of 8085 are: B, C, D, E, H and L . They are
all 8-bit registers but can also be used as 16-bit register pairs BC, DE and
HL.
4. Stack pointer (SP)
Is a 16-bit register which points to the stack (It is used as a memory
pointer). The stack is a memory location in read/write memory.
5. Program counter (PC)
Is a 16-bit register which contains the address of the instruction to be
executed just next. PC acts as an address pointer to the next instruction. As
the processor executes instructions one after another, the PC is
incremented. The number by which the PC increments depends on the
nature of the instruction. For example, for a 1-byte instruction, PC is
incremented by one, while for a 3-byte instruction, the processor
increments PC by three address locations.
6. Instruction register (IR)
Program written by the programmer resides in the R/W memory. When an
instruction is being executed by the system, the opcode of the instruction
is fetched from the memory and stored in the instruction register (8-bit IR).
7. Incrementer/Decrementer address latch register
This 16-bit register increments/decrements the contents of PC or SP when
instructions related to them are executed.
8. The (Status) flag register
It is an 8-bit register in which five-bit positions contain the status of five
condition flags which are: Zero (Z), Sign (S), Carry (CY), Parity (P) and
Auxiliary carry (AC). Each of these five flags is 1-bit.

HW: Give the Flags for (7E)16 + (49)16


5
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
 Arithmetic logic unit (ALU)
The ALU functions as a part which includes arithmetic logic group of
circuits. This includes accumulator, flags and temporary register blocks.
 Address buffer:
An 8-bit unidirectional buffer is used to buffer the higher order address bus
(A8-A15). A bidirectional buffer can be used to drive the bidirectional data
bus (D0-D7) after its demultiplexing. The contents of the stack pointer and
program counter are loaded into the address buffer and address-data buffer.
 Interrupt control:
Sometimes it is necessary to interrupt the execution of the main program.
For this, an interrupt request is sent from the I/O devices. After receiving
the interrupt request, processor temporarily stops what it was doing and
attends to the I/O device. After the work of the I/O device is complete, it
returns to what it was doing earlier.

 Serial I/O control:


It allows 8085 to communicate serially with external devices
 Timing and control circuitry:
It is very important unit as it synchronizes the registers and flow of data
through various registers and other units. It generates timing and control
signals for execution of instructions. This section includes Clock signals,
Control signals, Status signals, Direct Memory Access (DMA) signals, and
the reset signals.
 Instructions decoder and machine cycle encoder:
It decodes the information's present in the Instruction Register for further
processing.

 8085 Memory Addressing and Data Transfer


There are several different types of memory. One is Program memory
(ROM), this is where the program is located. Another is Data memory
(RAM), this is where data (that might be used by the program) is located.
Two terms used when talking about memory, Reading is getting a value
from memory and Writing is putting a value into memory.

6
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
Busses associated with the memory subsystem, these busses transport data
and addresses every where. In the 8085 microprocessor, the address bus
is 16-bits wide. It acts to select one of the unique 𝟐𝟏𝟔 (64KB) memory
locations. The control bus determines whether this will be a read or a write.
The steps to communicate with memory can be summarized as follows:
1. The MPU places an 16-bit memory address on address bus.
2. The MPU sends a control signal (Read or Write) to load or store data.
3. Data are placed on the data bus for transfer.
The Program Counter is what holds the address when the microprocessor
is executing instructions. Because of the automated program counter
incrementation that occurs after fetching the current instruction, the
instructions are read sequentially.
 8085 I/O addressing and data transfer
8085 microprocessor uses two instructions (IN & OUT) for data transfer.
MPU uses 8-address lines to send the address of I/O device (can identify
256 input devices / 256 output devices).

The steps in communicating with an I/O can be summarized as


follows:
1. The MPU places an 8-bit device address on address bus.

2. The MPU sends a control signal (I/O Read or I/O Write) to enable the
I/O device.

3. Data are placed on the data bus for transfer.

 8086 Microprocessor Architecture

It is a 16-bit microprocessor produced by Intel using HMOS (High


Performance Metal-Oxide Semiconductor) technology, It has
approximately 29,000 transistors and housed in a 40-pin DIP package. It
supports two modes of operation, Maximum mode and Minimum mode.

7
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
Maximum mode is suitable for system having multiple processors and
Minimum mode is suitable for system having a single processor. The main
features of 8086 μp are:
1. It is a 16-bit microprocessor. Data bus is a group of 16 lines D0-D15.
2. 8086 µP has a 20-bit address bus can access up to 𝟐𝟐𝟎 memory locations
(1 MB).
3. It has multiplexed address and data bus AD0-AD15.
4. It can support up to 64K I/O ports.
5. It provides 14 registers.
6. 8086 is designed to operate in two modes, Minimum and Maximum.
7. It can prefetches up to 6 instruction bytes from memory and queues
them in order to speed up instruction execution.

Intel 8086 Microprocessor Pin Configuration

8
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
 Comparison between 8085 and 8086 Microprocessor
Architecture

Simple Instruction Cycle

 Simple Instruction Cycle

• .

 The execution of one instruction requires the following


three steps to be performed by the CPU:
1. Fetch the contents of the memory location pointed at by the PC. The
content of this location are interpreted as an instruction to be executed.

9
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa

Therefore, they are stored in the Instruction Register (IR). Symbolically,


this can be written as:
IR [[PC]]
2. Increment the contents PC by 1.
PC [PC] + 1
3. Carry out the actions specified by the instruction stored in the IR.
Note: in cases where an instruction occupies more than one word, steps 1
and 2 can be repeated as many times as necessary to fetch the complete
instruction. These two steps are usually referred to as the fetch phase,
while step 3 constitutes the execution phase.

10

You might also like