Академический Документы
Профессиональный Документы
Культура Документы
1
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture
Table of Contents
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
3.1 Introduction
Register unit
(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
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
4
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture
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:
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.
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.
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.
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.
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.
7
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture
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.
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.
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.
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
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.
HLDA: - Hold Acknowledge. This signal is used to acknowledge the HOLD request.
RESET OUT: This signal indicates that the microprocessor is being reset. It can be
used to reset other devices also.
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.
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:
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.
11
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture
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:
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
(a) PC (b) SP
(a) 4 (b) 6
(c) 5 (d) 7
(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?
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
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
3 Subjective questions
17
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture
GLOSSARY
18
Institute of Lifelong Learning, University of Delhi
Microprocessor 8085 architecture
References
1. Suggested readings
19
Institute of Lifelong Learning, University of Delhi