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

2 8085 Microprocessor Architecture

Uploaded by

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

2 8085 Microprocessor Architecture

Uploaded by

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

The 8085 Microprocessor Architecture

The 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. A microcomputer can be designed based on any of the two models:
1. Von Neumann architecture
2. Havard architecture
Von Neumann Architecture
The Von Neumann architecture consists of a single shared memory (primary memory), a single
bus for memory access, an input, and output unit, an arithmetic unit, and a program control unit.
Harvard Architecture
The Harvard architecture is based on the concept where there are separate storage and separate
buses (signal path) for instruction and data. It was basically developed to overcome the bottleneck
of Von Neumann Architecture.

Fig. 2.1 Harvard versus Von Neumann architectures


The basic microcomputer block diagram

CPU
Input Output
Device (ALU + Register array Device
+ Control Unit)

Memory

Fig. 2.2 Block diagram of a basic microcomputer

1
Fig. 2.3 Block diagram of a microcomputer
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. 2.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
Arithmetic and Logic Unit (ALU)
This unit perform arithmetic operations like +, -, *, / and logical operations like AND, OR, NOT etc.

2
Fig. 2.4 ALU block diagram
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.

3
Fig. 2.5 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.

4
Fig. 2.6 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.
Address buffer and Address-Data buffer
The contents of the SP and PC 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. As the memory and I/O chips are connected
to these buses, the CPU can exchange desired data to the memory and I/O chips.
The address-data buffer is not only connected to the external data bus but also to the internal data bus which
consists of 8-bits. The address data buffer can both send and receive data from internal data bus.

The status or flag register

5
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. 2.7.

Fig. 2.7 The Flag register


The flag register is a group of flip flops used to give the status of different operations results. The flag
register is connected to ALU. Once an operation is performed by ALU the result is transferred on internal
data bus and status of result will be stored in flip flops. These flags are:
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.

Address bus and Data bus:


The 8085 is an 8-bit microprocessor. So, the data bus present in the microprocessor is also 8-bits wide. But
the 8085 processor requires 16-bit address bus as the memory addresses are 16-bit wide. The 8 most
significant bits of the address are transmitted with the help of address bus and the 8 least significant bits
are transmitted with the help of multiplexed address/data bus. The 8-bit data bus is multiplexed with the
eight least significant bits of address bus. The address/data bus is time multiplexed. This means for few
microseconds, the 8 least significant bits of address are generated, while for next few seconds the same pin
generates the data. This is called Time multiplexing.
But there are situations where there is a need to transmit both data and address simultaneously. For this
purpose a signal called ALE (address latch enable) is used. ALE signal holds the obtained address in its
latch for a long time until the data is obtained and so when the microprocessor sends the data next time the
address is also available at the output latch. This technique is called Address/Data demultiplexing.
Timing and control unit
It provides timing and control signal to the microprocessor to perform operations. Following are the timing
and control signals, which control external and internal circuits −
 Control Signals: READY, RD’, WR’, ALE
 Status Signals: S0, S1, IO/M’
 DMA Signals: HOLD, HLDA
 RESET Signals: RESET IN, RESET OUT

6
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.

Fig 2.8 Machine Cycle


Four steps of Machine cycle
1. Fetch - Retrieve an instruction from the memory.
2. Decode - Translate the retrieved instruction into a series of computer commands.
3. Execute - Execute the computer commands.
4. Store - Send and write the results back in memory.
Fetching an opcode
This is the first operation in any operation. To fetch an instruction, the microprocessor places a memory
address on the address bus and reads binary information using the data bus. Therefore, it needs a register
that can hold memory addresses (memory address buffer or memory address register) and increment these
addresses after the fetching is completed (a memory pointer).
Decoding an instruction
Once an instruction byte is fetched, it needs to be decoded to answer the following:
 Is it a complete instruction? If not, how many more bytes need to be fetched?
 What type of operation is required and on what data?
To perform these functions, the microprocessor needs an instruction decoder that can interpret the fetched
binary information.
Executing an instruction
The type of data manipulation the microprocessor can perform depends on its internal microprograms, that
is, on its instruction set. The operation can be classified as data transfer (copy), arithmetic/logic operations,
and decision making.
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).

You might also like