Lec2 معالجات
Lec2 معالجات
1
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
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.
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.
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.
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).
2. The MPU sends a control signal (I/O Read or I/O Write) to enable the
I/O device.
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.
8
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
Comparison between 8085 and 8086 Microprocessor
Architecture
• .
9
Lecture 2
Computer Science Dept. / 2nd year / 1st Course (2024-2025)
Microprocessor
Dr.Haleema Essa
10