Microprocessor - Lecture 3.pdf - 2022.12.21 - 01.54.34pm
Microprocessor - Lecture 3.pdf - 2022.12.21 - 01.54.34pm
Second Stage
Microprocessor Architecture
Lecture 3
𝑆1
8085 Microprocessor Architecture
The main functional components of 8085 microprocessor are as given below:
Registers
Arithmetic logic unit
Address buffer
Incrementer/decrementer address latch
Interrupt control
Serial I/O control
Timing and control circuitry
Instructions decoder and machine cycle.
Internal block diagram of 8085
Registers
The 8085 microprocessor has the following registers:
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 (register). 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 a address pointer (also known as
memory 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: 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.
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.
• Sign Flag (SF) : – If the MSB of the result of an operation is 1, this flag is set, otherwise it is
reset.
Example :
01010011 10110001
𝟎𝟏𝟎𝟏𝟎𝟏𝟎𝟏 𝟏𝟎𝟏𝟎𝟏𝟎𝟎𝟏
𝟎𝟎𝟏𝟎𝟏𝟎𝟎𝟏 + 𝟎𝟎𝟏𝟎𝟏𝟎𝟏𝟎 +
𝟎𝟏𝟏𝟏𝟏𝟏𝟏𝟎 𝟏𝟏𝟎𝟏𝟎𝟎𝟏𝟏
𝟎𝟏𝟎𝟏𝟎𝟎𝟏𝟏 𝟏𝟎𝟏𝟏𝟎𝟏𝟎𝟏
𝟎𝟎𝟎𝟎𝟏𝟎𝟏𝟏 + 𝟏𝟏𝟎𝟎𝟎𝟏𝟎𝟏 +
𝟎𝟏𝟎𝟏𝟏𝟏𝟏𝟎 𝟎𝟏𝟏𝟏𝟏𝟎𝟏𝟎
𝟏𝟎𝟎𝟎𝟏𝟏𝟏𝟎
𝟎𝟎𝟏𝟏𝟏𝟎𝟎𝟏 +
𝟏𝟏𝟎𝟎𝟎𝟏𝟏𝟏
SF=1
ZF=0
PF=0
AF=1
CF=0
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. These buffers are then used to drive the external address
bus and address data bus.
Interrupt control:
Sometimes it is necessary to interrupt the execution of the main program. For this an
interrupt request is obtained 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 also the reset section.
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 are used when talking about
memory, Reading is getting a value from memory and Writing is putting a value into
memory.
Busses associated with the memory subsystem, these busses transport data and
addresses everywhere. 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. The reason instructions are read sequentially, is because the program counter
automatically increments after fetching the current instruction.
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).