1 8085 Microprocessor Architecture
1 8085 Microprocessor Architecture
Microcomputer
A microcomputer is a small, relatively inexpensive computer with a microprocessor as its central processing
unit. It includes a microprocessor, memory, and minimal input/output circuitry mounted on a single printed
circuit board.
Microprocessor
Input Output
Device (ALU + Register array Device
+ Control Unit)
Memory
Fig. 1.2
Microprocessors
A microprocessor is an electronic component that is used by a computer to do its work. It is a central
processing unit on a single integrated circuit chip containing millions of very small components
including transistors, resistors, and diodes that work together. Common microprocessor types include:
8085, 8086, 8088, z80.
1
8085 Microprocessor
The 8085 microprocessor is an 8-bit microprocessor with a 40 pin dual in line package. The address and
data bus are multiplexed in this processor which helps in providing more control signals. The 8085
microprocessor has 1 Non-maskable interrupt and 3 maskable interrupts. It provides serial interfacing with
serial input data (SID) and serial output data (SOD). Fig. 1.3 shows the pin out diagram of 8085
microprocessor.
8085 Data Registers
The 8085 has a set of registers for performing various operations. These registers include:
Instruction register
Program counter
Store address register
General purpose registers
Accumulator
Stack pointer
ALU
Status register
Accumulator
The accumulator is a register which can hold 8-bit data and it aids in storing two quantities:
(1) Stores the data to be processed by arithmetic and logic unit
(2) Stores the result of the operation carried out by the Arithmetic and Logic unit.
The accumulator is also called an 8-bit register. The accumulator is connected to Internal Data bus and
ALU (arithmetic and logic unit). The accumulator can be used to send or receive data from the Internal
Data bus.
2
Fig. 1.4 8085 Pin Diagram
General Purpose Registers
In addition to the accumulator, the 8085 consists of six special types of registers called General Purpose
Registers. These registers are used to hold data like any other registers. The general-purpose registers in the
8085 processors are B, C, D, E, H and L. Each register can hold 8-bit data.
Additionally, these registers can also be used to work in pairs to hold 16-bit data. They can work in pairs
such as B-C, D-E and H-L to store 16-bit data. The H-L pair works as a memory pointer. A memory pointer
holds the address of a particular memory location. They can store 16-bit address as they work in pair.
Program Counter (PC)
The PC is a 16-bit special purpose register that stores the address of the next instruction. Consider that an
instruction is being executed by processor. As soon as the ALU finished executing the instruction, the
processor looks for the next instruction to be executed. So, there is a necessity for holding the address of
the next instruction to be executed in order to save time. This is taken care by the program counter.
3
Fig. 1.5 The 8085 Architecture
Stack Pointer (SP)
The SP is also a 16-bit register which is used as a memory pointer. A stack is the portion of RAM (Random
access memory). The SP maintains the address of the last byte that is entered into stack. Each time when
the data is loaded into stack, the SP gets decremented. Conversely it is incremented when data is retrieved
from stack.
The Instruction Register (IR)
The IR is a special purpose register that is used to receive the 8-bit opcode portion of an instruction. This
register is not accessible to the programmer. In other words, there are no instructions by which the
programmer can load this register with values of their values of choice.
The status or flag register
This is an 8-bit register in which five bit positions contain the status of five condition flags. These flags are
Zero (Z), Sign (S), Carry (CY), Parity (P) and Auxiliary carry (AC). The flag register format is shown in
Fig. 1.6.
4
They are called Zero (Z), Carry (CY), Sign (S), Parity (P), and Auxiliary Carry (AC) flags. Note: X
represent unspecified bits termed as "don't care".
Sign (S) flag: Indicates the sign of the ALU result. If the MSB of the result of an operation is 1, this
flag is set, otherwise it is reset.
Zero (Z) flag: Indicates if the result of the ALU operation is zero or not. If the result of an
instruction is zero, this flag is set, otherwise reset.
Auxiliary Carry (AC) flag: Indicates if there is carry from bit D3 to D4. If there is a carry out of bit
3 and into bit 4 resulting from the execution of an arithmetic operation, it is set otherwise reset. This
flag is used for BCD operation and is not available to the programmer to change the sequence of an
instruction.
Carry (CY) flag: Indicates if there is a carry or borrow out of bit D7. If an instruction results in a carry
(for addition operation) or borrow (for subtraction or comparison) out of bit D7, then this flag is set,
otherwise reset.
Parity (P) flag: Indicates the number of 1’s in the result. This flag is set when the result of an operation
contains an even number of 1’s and is reset otherwise.
5
The microprocessor as a processing unit
When the microprocessor executes instructions, it does so in a continuous sequence of fetch, decode and
execute operations.
Machine cycle
These are steps performed by the computer processor for each machine language instruction received.
The machine cycle is a 4-process cycle that includes reading and interpreting the machine language,
executing the code and then storing the results.
6
For example, to subtract two numbers, both numbers must be loaded into registers. After the After the
subtraction, it is necessary to indicate whether the result is positive, negative, or zero. This can be indicated
by setting or resetting flip flops called flags. To perform these arithmetic and logc operations, the
microprocesor needs a group of logic circuits called Arithmetic/Logic Unit (ALU).
Assignment
1. Explain the function of the following microprocessor pins:
(a) ALE
(b) ̅̅̅̅̅̅̅
𝐼𝑁𝑇𝐴
(c) ̅̅̅̅
𝑅𝐷
(d) ̅̅̅̅̅
𝑊𝐷
(e) 𝐼𝑂/𝑀 ̅
(f) RESET OUT
2. With regard to the microcomputer organization (Fig. 1.2), outline the functions of the following:
(a) The buses
(b) Memory
(c) Input devices
(d) Output devices