Вы находитесь на странице: 1из 19

Microprocessor 8085 architecture

Paper: Microprocessor and Computer Programming


Lesson: Microprocessor 8085 architecture
Author: Priyamvada Bhardwaj
College/Department: Ramjas College / Dept. of Physics,
University of Delhi

1
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Table of Contents

Chapter 4: Microprocessor 8085 architecture

3.1 Introduction
3.2 Block diagram of 8085
3.3 8085 system bus
3.4 8085 Pin description
3.5 Microprocessor operations

Summary
Exercise
Glossary
References

2
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Chapter 3: Microprocessor 8085 Architecture

3.1 Introduction

Intel 8085 is the most popular 8-bit microprocessor. It is a 40-pin IC fabricated


on a single VLSI chip. It requires a single +5V power supply. It has in-built clock
generation, system control and interrupt circuitry. The 8085 P is a programmable
digital device which has got a set of instructions designed internally to manipulate the
data and communicate with peripherals. The internal logic organization or design is
called architecture of the P. It is important to know the architecture because it is the
internal architecture of a P which determines as to what happens to the data inside the
P and how and what type of operations can be performed with the data.

3.2 Block diagram of 8085

To understand the architecture of 8085 P it is necessary to discuss the block


diagram. Fig. 3.1 below shows the block diagram of 8085 P. It mainly consists of three
sections

(a) Register unit


(b) Arithmetic and logic unit
(c) Timing and control unit

These important sections will be discussed in detail in the subsequent sections.

Register unit

The micro processor 8085 consists of different types of registers

(a) Accumulator
(b) General purpose register
(c) Flag register
(d) Temporary register
(e) Program counter
(f) Stack pointer

Accumulator:

It is an 8-bit register which is used for performing all the arithmetics and logical
operations. Accumulator is also known as register A. During any mathematical or logical
operation one of the operands should be present in the accumulator. The final result is
also stored in the accumulator.

3
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

INTERRUPT SIGNALS
SOD SID

INTERRUPT SERIAL I/O


CONTROL CONTROL

INSTRUC B C
ACCUM TEMPOR STATUS
TION
ULATOR ARY FLAGS REGISTER D E
REGISTER

H L

STACK
INSTRUCTION POINTER
ARITHMETIC
DECODER
and
LOGIC UNIT PROGRAM
(ALU) COUNTER

X1
TIMING and CONTROL UNIT
X2

CONTROL
ADDRESS BUFFER DATA/ADDRESS
SIGNALS BUFFER
CLOCK

A8-A15
ADo-AD7

Fig. 3.1 Functional Block diagram

4
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

General purpose registers:

There are six 8-bit general purpose registers B, C, D, E, H & L. General purpose
registers are used for temporary storage of data and intermediate results while the
processor is executing the program. Two eight bit registers can be combined for handling
16-bit data. Combination of two 8-bit registers is known as pair. Valid register pairs are
B-C, D-E, H-L. The H-L pair is used to address memories.

Flag register:

It is an 8-bit register in which five flip flops are used for checking condition. These
flip flops are called flags. Each of these flags can have the value either one or zero to
indicate certain condition after arithmetic and and logical operation. The five flags
present in 8085 P are:

(a) Sign flag (b) Zero flag (c) Auxiliary carry flag (d) Parity flag (e) Carry flag

Sign flag (S): After the execution of an arithmetic or logical operation, if bit D7 of the
result is 1, the sign flag is set. This flag is used with signed numbers and has no
relevance for unsigned numbers. In a given byte, if D 7 is 1, the number is said to be
negative and if it is 0, the number is considered as positive.

Zero Flag (Z): This flag is set if the result after arithmetic or logical operation turns out
to be zero and is reset if the result is non-zero.

Auxiliary carry (AC): This flag is set if in an arithmetic operation a carry is generated at
bit D3 and passed onto D4. This flag is used internally for BCD operations and is not
available to the user unlike other flags.

Parity (P): After an arithmetic or logical operation, if the result has an even number of
1s, the flag is set and if there is odd number of 1s the flag is reset.

Carry (CY): If an arithmetic operation results in a carry, the flag is set otherwise it is
reset. It also serves as a borrow flag for subtraction.

The bit position reserved for these flags in the flag register are as follows:

S Z AC P CY

D0 D1 D2 D3 D4 D5 D6 D7

Temporary register:-

Register W and Z are known as temporary registers. They are used by the
P for storing the data temporarily during execution of a program. They are 8-bit
registers and are not accessible to the user.

5
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Program Counter:

It is a 16-bit register which holds the address of the instructions. Initially it


indicates towards the starting address of the program but after the first instruction is
fetched the program counter automatically gets incremented by one and points towards
the next instruction. This process continues till the end of the program.

Stack pointer:

The stack pointer is a 16-bit register which basically serves two purposes

(a) Points towards the stack memory. Initially it indicates the beginning of the stack
memory. Whenever something is added to the stack, the stack pointer is
decremented and whenever something is removed from the stack the stack pointer
is incremented. Hence the stack pointer always points to the top of the stack.
(b) Stack pointer also points towards the memory location where the P has to go
after attending an interrupt or a subroutine; therefore it acts as a bookmark.

Arithmetic and logic unit:

This is the unit where all the arithmetic operations like addition,
subtraction, multiplication and division and logical operations like AND, OR, Ex-OR,
complement, compare etc. are performed. It includes the accumulator, the temporary
register, the arithmetic and logic circuits and five flags. The temporary registers are used
to store data temporarily during an arithmetic/logical operation. The result is stored in
the accumulator and the flags are set or reset according to the result of the operation.

Timing and control unit:

The timing and control unit generates timing and control signals which are
necessary for the execution of instruction. It controls data flow between CPU and
peripherals. It provides status, control and timing signals which are required for the
operation of memory and I/O devices.

3.3 8085 System Bus

System bus is basically a group of communication lines/wires that are


responsible for transferring information between different units of the device or
peripherals. A typical microprocessor communicates with memory and other devices
using three buses: address bus, data bus and control bus.

Address bus: Address bus is a unidirectional group of 16 lines i.e. bits flow in one
direction from the P to the peripheral devices. The 8085 P with its 16 address lines is
capable of addressing 216=65536 (64K) memory locations.

Data bus: Data bus carries data in binary form, between microprocessor and peripheral
devices as well as memory. It is a group of 8-bits and is bidirectional. Data bus also
carries instructions from memory to the microprocessor. Size of the bus therefore limits
the number of possible instructions. The 8085 P has 246 bit patterns amounting to 74
different instructions. These 74 different instructions are therefore called its instruction
set.
6
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Control bus: The control bus is combination of various single lines that carry control
signals. The control lines are not group of lines like address and data bus but are
individual lines. Microprocessor generates specific control signals for every operation it
performs.

The bus system of 8085 is shown in figure 3.2.

Figure 3.2 8085 Bus Structure

Value addition:

Evolution of microprocessor:

With the advances in L.S.I. (Large Scale Integration) and V.L.S.I. (Very Large
scale integration) technology it became possible to build the whole CPU of a digital
computer on a single IC (Integrated circuit). A CPU built on a single chip is called
microprocessor.
The first microprocessor INTEL 4004 a 4-bit P was introduced in 1971 by
INTEL corporation. In 1972 INTEL introduced the first 8-bit microprocessor 8080. These
microprocessors used PMOS technology. A more powerful and faster P the INTEL 8080
using NMOS technology was introduced in 1973. A number of companies like Motorola,
Zilog, National Semiconductor etc. INTEL introduced 8-bit P 8085 in 1976. It is very
popular and most widely used microprocessor. 8-bit microprocessors were soon followed
by 16-bit microprocessors like INTEL 8086, 80186, 80286. Microprocessors like INTEL
80386, 80486 are 16-bit microprocessors that were introduced in 1980. The most powerful
P 80586 (PENTIUM) was introduced in 1989-1990. It is a 64-bit microprocessor. Since
then there has been a continuous development in this field of semiconductor technology.

3.4 8085 Pin Description

7
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

The 8085 P is an 8-bit microprocessor capable of addressing 64K of


memory. It is a 40-pin IC which requires a power supply of +5V and its operating
frequency is 3MHz. Fig. 3.3 shows the pin configuration of 8085 P .The pin
configuration of 8085 P can be classified into six groups namely:

High order Address bus


Multiplexed Address/Data bus
Control and status signals
Power supply and frequency signals
Externally initiated signals and
Serial I/O ports

Figure 3.2 Pin Configuration of 8085

(1) High order address bus:

The address bus is a group of 16-lines generally identified as A0-A15. The


address bus is split into two segments ADO-AD7 and A8-A15 .The buses from ADO-AD7 are
low order address buses and A8-A15 buses are high order address buses.

(2) Multiplexed Address/Data bus:

The data bus is a group of 8-lines used for transfer of data. These lines are
bidirectional i.e. data flows in both the directions from P to peripherals and vice-versa.
They are represented as ADO-AD7 because they serve dual purpose. They are used as
low-order address bus as well as data bus and therefore they are known as multiplexed
address/data bus.

(3) Control and status signals:

8
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

This group of signals includes two control signals, three status signals and
one special signal. These signals are as follows:

Control signal: - and are the two control signals which indicate that the data is
to be read from or written into a selected memory or I/O location. Both are active low
signals.

Status signal: - , S1 and SO are the three status signals. is used to


differentiate between I/O and memory operations. When it is high it indicates I/O
operation and when it is low it indicates memory operation. S1 and SO are also status
signals but are rarely used in small systems.

Special signal: - ALE (Address Latch Enable) is a special signal used for demultiplexing
address and data bus (ADO-AD7). It is a positive going pulse generated every time a
machine cycle begins and so long as it remains positive it indicates that the bits on AD O-
AD7 are address bits.

(4) Power supply and clock frequency:

The power supply required for 8085 P is +5V. As shown in pinout


diagram VCC is connected to +5V and VSS is connected to the ground of the power
supply. The P operates on frequency of 3MHz, therefore an oscillator of
frequency 6MHz is connected between pin no. 1 and 2 as the frequency is
internally divided by two. CLK (OUT) i.e. Pin no. 37 is used as a system clock for
other devices.

(5) Externally initiated signals:

There are certain operations which can be initiated by external devices (or
signals). For these externally initiated operations there are individual pins
assigned on the microprocessor chip. Interrupts are also considered as externally
initiated signal. Here is a brief explanation of interrupts and other externally
initiated signals.
Interrupts: - The 8085 has five interrupt signals that can be used to interrupt a
program execution. These interrupts are

(a) TRAP: The interrupt with highest priority. It is non-maskable and


vectored interrupt i.e. the P has to attend this interrupt immediately.
(b) RST 7.5, RST 6.5, RST 5.5: These are known as Restart interrupts and
have lower priority than TRAP but have higher priority than the INTR
interrupt. They are vectored and maskable interrupts. Among the three
the priority order is RST7.5>RST6.5>RST5.5
(c) INTR: It is a general purpose interrupt. It is maskable and non-vectored
interrupt and has the least priority.

Reset: - When RESET pin is activated, the P suspends all the internal operations
and the program counter is cleared. Now the program execution can again begin
at the zero memory address.

9
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Ready: - The Ready signal is used to synchronize slower peripherals with the
microprocessor. If the signal at READY pin is low the microprocessor enters into a
wait state.

Hold: - This signal is used by the external devices to request the microprocessor
for using the buses. When this signal is activated the P leaves is control over the
buses and makes them free for the peripherals to use.

: - Interrupt Acknowledge. This signal is used to acknowledge an interrupt.

HLDA: - Hold Acknowledge. This signal is used to acknowledge the HOLD request.

: - This is an active low signal. When it is activated the buses are


tristated, the program counter is cleared and the microprocessor is reset.

RESET OUT: This signal indicates that the microprocessor is being reset. It can be
used to reset other devices also.

(6) Serial I/O Ports:

To send and receive data serially microprocessor has two pins SID and SOD by
using these pins the P can communicate with other P and peripheral devices. In
serial transmission, data bits are sent over a single line, one bit at a time. SID is
Serial Input Data and SOD stands for Serial Output Data.

SID (Input) On execution of the RIM instruction the data on this line is loaded
into the seventh bit of the accumulator.

SOD(output)- When SIM instruction is executed the 7th bit of the accumulator is
output on SOD line.

3.5 Microprocessor operations


The process of data manipulation and communication with peripherals is
determined by the logic design of the microprocessor. This logic design is called
architecture. All the operations of microprocessor can be classified into following types:

(a) Microprocessor initiated operations


(b) Internal operations
(c) Peripheral or externally initiated operations

Microprocessor initiated operations

Microprocessor initiated operations are usually one of the following


operations :

(a) Memory read: Reads data from memory.


(b) Memory write: Writes data into the memory.
(c) I/O Read: Accepts data from input devices.
(d) I/O Write: Sends data to output devices

All these operations are initiated by microprocessor and executed by peripheral


devices as a part of communication process between microprocessor and memory or
10
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

peripheral devices. To perform these communication operations, the MPU needs to


perform following steps
(a) Identify the memory location or the peripheral devices.
(b) Provide synchronization signal i.e. timing signals.
(c) Transfer the binary information (data and instruction).

All these functions are performed with the help of communication lines called system
bus. The details of the three types of buses i.e. Address bus, data bus and control bus
have been discussed in section 3.1.2

Value addition:

Data flow between memory and MPU:

Figure below explains the flow of data between microprocessing unit and
memory. First of all the 16-bit address is placed on the address bus from the program
counter. In the figure it can be seen that the address is 2005H where the data is placed.
The higher order address i.e. 20H is placed on the address bus A 8-A15 while the lower order
address is placed on the multiplexed address and data bus AD O-AD7. The lower order
address continues to remain on this address bus so long as ALE (Address Latch Enable)
remains positive. Once ALE goes low it carries data. The control unit sends the signal to
indicate what type of operation is to be performed. Since the data is to be read from the
memory therefore it sends to enable the memory chip. The byte from the memory
location is then placed on the data bus i.e. 4F saved in location 2005H is placed on the
data bus and sent to the instruction decoder. The instruction is decoded and accordingly
the task is performed by the ALU i.e. Arithmetic and logic unit.

Figure: Data flow between memory and MPU

11
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Internal data operations

These are the operations which are internally performed by the


microprocessor. They are classified into five groups:
1) Store 8-bit data
2) Perform arithmetic and logical operation
3) Test for the conditions
4) Sequence the execution of instructions
5) Store data temporarily during execution in the R/W memory locations called the
stack.

To perform these operations microprocessor requires registers, Arithmetic and


logic unit, buses and control unit.
To store 8-bit data microprocessor has six general purpose registers. During
program execution, these registers are used to store 8- or 16-bit data. The details of
these registers i.e. B, C, D, E, H and L have already been discussed in register unit.
Arithmetic and logical operations are performed in accumulator and the
conditions are tested by the flag register. Program counter is used to sequence the
execution of instructions and stack memory is used for temporary storage of data during
execution and stack pointer is used to address the stack memory.

Peripheral or Externally initiated operations

There are four externally initiated operations, for which individual pins on
the microprocessor chip are assigned. These operations are RESET, READY, HOLD and
INTERRUPT. The details of all these operations have been discussed in section 3.1.2

12
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Value addition:

8085 Programming Model:

A programming model is a conceptual representation of a real object and can


be in the form of a text, a drawing or a built structure. Here is a programming model of
8085 which gives information required to write a program. It consists of some segments of
ALU and the registers. This model includes six general purpose registers, accumulator, flag
register, program counter and stack pointer. This model is not a reflection of physical
structure of the microprocessor but gives all the information that is relevant for writing an
assembly language program. Figure below shows the programming model specific to the
8085 microprocessor.

Figure: 8085 Programming model

13
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

SUMMARY

This chapter describes the architecture of the 8085 microprocessor. The important
concepts which have been explained in this chapter are summarized below:

Various functional units present in 8085 like register unit, arithmetic and logic
unit and timing and control unit have been explained with the help of block
diagram.
Register unit consists of six general purpose registers namely B, C, D, E, H and L,
two temporary registers W and Z, two 16-bit registers SP(stack pointer) and
PC(program counter).
Accumulator is register A where all the mathematical and logical operations are
performed and final result is stored
Besides pinout diagram the signals of microprocessor 8085 have been discussed.
The signals of 8085 P can be classified into six groups: High order Address bus,
Multiplexed Address/Data bus, Control and status signals, Power supply and
frequency signals, Externally initiated signals and Serial I/O ports.
The operations performed by microprocessor can be classified into three types (a)
Microprocessor initiated operations (b) Internal data operations (c) Externally
initiated operations.
This chapter also explains the process of data flow between microprocessor and
memory. The programming model which is very important to understand
programming of microprocessor has also been discussed.

14
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

EXERCISES

Question Number Type of question

1 Multiple choice questions

(1) What is the clock frequency for 8085 P?

(a). 2 MHz (b) 3 MHz

(c) 4 MHz (d) 6 MHz.

(2) Signal used for demultiplexing of address and data bus?

(a) HOLD (b) ALE

(c) READY (d) INTR

(3) Which of the following is 16 bit register ?

(a) PC (b) SP

(c) None of these (d). Both (a) and (b).

(4) How many flags are available in 8085?

(a) 4 (b) 6

(c) 5 (d) 7

(5) Stack pointer register is used for accessing

(a) Stack (b) Memory

(c) Strings (d) None of above

(6) Which of the following interrupt has the highest priority?

(a) RST 7.5 (b) RST 6.5

(c) RST 5.5 (d) TRAP

(7) Which register is not available for user in microprocessor?

(a) A (b) B

(c) D (d) W

15
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

(8) Which signal is used for synchronizing the speed of 8085 with slower peripheral
devices?

(a) RESET (b) READY

(c) HOLD (d) INTR

(9) The register used for sequencing the execution of instructions is

(a) Stack Pointer (b) Accumulator

(c) Program counter (d) W and Z

(10) Maximum memory which 8085 microprocessor can address

(a) 64KB (b) 32KB

(c) 4KB (d) 16KB

Correct answers (1) b (6) d


(2) b (7) d
(3) d (8) c
(4) c (9) c
(5) a (10) a

Question Number Type of question

2 Fill in the blanks

1) 8085 P in an__________ bit microprocessor. .

2) 8085 P is __________ pin microprocessor.

3) Which
(9) Thereof
are_______address lines as
the following IC is used in 8085 P.
programmable interrupt controller?

4) All (a)
the 8255
arithmetic and logical operations
(b) 8259Aare performed in________.

(c) 8279
5) ___________flag (d) operation.
is used for BCD 8257

(10) 8255 is a

(a) Programmable interrupt control IC (b) Programmable interval timer IC

(c) Keyboard and display interface IC (d) Programmable peripheral interface IC

16
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

Correct answers
(1) 8-bit
(2) 40
(3) 16
(4) Accumulator
(5) Auxiliary carry

Question Number Type of question

3 Subjective questions

1) Explain the function of ALE signal.


2) Explain the BUS structure in 8085 microprocessor.
3) Why are PC and SP 16-bit registers?
4) Name the various programmable registers used in microprocessor 8085.
5) Give the labeled pin-out diagram of microprocessor 8085.
6) Name the various programmable registers used in 8085.
7) What is stack pointer? State its function.
8) Explain the purpose of the flag register in microprocessor 8085 and show its bit
pattern.
9) What is the function of the following in microprocessor 8085.
(a) RESET (b) READY (c) HOLD (d) HALT
10) Give the programming model of 8085 microprocessor.

11) Write short notes on:


(a) 8257 DMA controller
(b) 8155 programmable I/O interfacing chip.

17
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

GLOSSARY

VLSI: Very Large Scale Integration Technology: In this technology a million


transistors are created on a single silicon chip. It was developed in 1980s.
Accumulator: It is an eight bit register in which all the arithmetic and logical
operations are performed. It is also known as register A. The final result is also
stored in this register.
Program counter: It is a 16- bit register which stores the address of the next
instruction to be executed. It helps in sequencing the execution of instruction.
Stack Pointer: It is a 16-bit register which stores the address of the stack
memory. It also acts as a bookmark incase of in case of interrupt and call of a
subroutine.
Flag register: It is an 8- bit register in which only five bits are used for testing
the various conditions like sign, carry, parity etc.
Interrupt: It is an externally initiated signal which alters the sequence of
execution by requesting the microprocessor to perform some task other than the
program it is executing.
Address bus: It is a group of lines used for sending address from the
microprocessor to the memory or the peripherals. There are 16 address lines in
8085 microprocessor. This is a unidirectional bus
Data bus: It ia group of lines used for transferring data between MPU and
memory or peripherals. It is bidirectional. There are 8 address lines in 8085P
Control bus: The control bus is a combination of various single lines that carry
control signals or synchronization signals. These control lines are not group of
lines like address or data buses but individual lines that provide a signal to
indicate P operation.
Assembly language: It is a language in which programs are written using
mnemonics (instructions in simple English language).

18
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture

References

1. Suggested readings

Microprocessor architecture, Programming and applications


with the 8085 Ramesh S. Gaonkar
Fundamentals of Microprocessor and Microcomputers B.Ram
Microprocessor 8085 and its interfacing Sunil Mathur
8085 microprocessor: Programing and interfacing
Srinath N. K.

19
Institute of Lifelong Learning, University of Delhi

Вам также может понравиться