You are on page 1of 26

Microprocessor?

8085(8 bit microprocessors)


INTA RST 6.5
TRAP
RST 5.5 RST 7.5
INTR
SI SOD
D

Interrupt Control

8-bit internal data


bus

Accumula Temp. IR MUX


tor Reg.
W Z
B C
Flags
D E

Instructio H L
n Stack Pointer
Decoder
ALU & m/c Program Counter
cycle Inc/Dec Address
encoding Latch

Address Data/adr
Timing and Control Buffer Buffer
X0

X1 CLK
GEN Control Status DMA Reset
A15 A8
Address Bus AD0 AD7
Address/Dat
a Bus
Clk RD WR ALE S0 S1 IO/M HOLD HLDA RESET OUT
out

READY RESET IN
Architecture of 8085 Microprocessor

8085 Architecture consists of following blocks:


Registers
ALU logic
Instruction decoder and machine cycle encoder
Address buffer
Address/Data Buffer
Increment/Decrement address latch
Interrupt Control
Serial I/O Logic
Timing and Control Logic Circuitry
Registers
The 8085/8080A-programming model includes six registers,
one accumulator, and one flag register, as shown in Figure. In
addition, it has two 16-bit registers: the stack pointer and the
program counter.

The 8085/8080A has six general-purpose registers to store 8-


bit data; these are identified as B,C,D,E,H, and L. They can be
combined as register pairs - BC, DE, and HL - to perform some
16-bit operations. The programmer can use these registers to
store or copy data into the registers by using data copy
instructions.
Accumulator
The accumulator is an 8-bit register that is a part of
arithmetic/logic unit (ALU). This register is used to
store 8-bit data and to perform arithmetic and
logical operations. The result of an operation is
stored in the accumulator. The accumulator is also
identified as register A.
The Flags register
There is also the flags register whose bits are
affected by the arithmetic & logic operations.
S-sign flag
The sign flag is set if bit D7 of the accumulator is set after an arithmetic or logic
operation. 1-when msb of result is 1, otherwise 0
Z-zero flag
Set if the result of the ALU operation is 0. Otherwise is reset. This flag is affected
by operations on the accumulator as well as other registers. (DCR B).
AC-Auxiliary Carry
This flag is set when a carry is generated from bit D3 and passed to D4 . This flag
is used only internally for BCD operations. (Section 10.5 describes BCD addition
including the DAA instruction).
P-Parity flag
After an ALU operation if the result has an even # of 1s the p-flag is set.
Otherwise it is cleared. So, the flag can be used to indicate even parity.
CY-carry flag
When result having carry.

7
Flag

S Z X AC X P X C

Sign Carry

Zero Parity

Auxiliary X-
Carry Unspecified
Sixteen bit registers

Program Counter (PC)


-This 16-bit register deals with sequencing the execution of
instructions. This register is a memory pointer. Memory
locations have 16-bit addresses, and that is why this is a 16-
bit register.
- The microprocessor uses this register to sequence the
execution of the instructions. The function of the program
counter is to point to the memory address from which the
next byte is to be fetched. When a byte (machine code) is
being fetched, the program counter is incremented by one to
point to the next memory location
Contd.
Stack Pointer (SP)
- The stack pointer is also a 16-bit register used as a memory
pointer. It points to a memory location in R/W memory, called
the stack. The beginning of the stack is defined by loading 16-
bit address in the stack pointer.
The ALU
In addition to the arithmetic & logic circuits,
the ALU includes the accumulator, which is
part of every arithmetic & logic operation.
(20-airthmetic, 14-logic)

Also, the ALU includes a temporary register


used for holding data temporarily during
the execution of the operation. This
temporary register is not accessible by the
programmer.
11
Instruction
Register/Decoder
The Microprocessor first fetches the opcode of
instruction from memory and stores this opcode
in the instruction register. It is then sent to the
instruction decoder. The instruction decoder
decodes it and accordingly gives the timing and
control signals which control the register, the
data buffer, ALU depending upon the nature of
the instruction.
Address Buffer
This is an 8-bit unidirectional buffer. It is used to
drive external high order address bus (A15-A8). It is
also used to tristhe higher order address buses under
certain conditions such as reset, hold, halt and when
address lines are not in use.
Address/Data Buffer
This is an 8-bit bidirectional buffer. It is used to
drive multiplexed address/data bus, i.e., lower
order address bus (A7-A0) and data bus (D7-D0).
It is also used to tristate the multiplexed
address/data bus under certain conditions such
as reset, hold, halt and when bus is not in use.
Incrementer /Decrementer Address Latch
A 16-bit register is used to increment
or decrement the contents of program
counter or stack pointer as a part of
execution of instructions related to
them.
Interrupt Control
This block accepts different interrupt request inputs such as
TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR.

INTA is an acknowledge pin for maskable and non-vectored


interrupt i.e. INTR.

When a valid interrupt request is present it informs control


logic to take action in response to each signal. In such a case the
processor has to be interrupted in order to service the
interrupt.

The interrupt control units job is to service the interrupt and


after completing the interrupt service routine return back the
control to the main program where it was interrupted.
Serial I/O Logic
During data transmission over a long distances, it is necessary to
transmit data bit by bit, to reduce the cost of cabling.
In serial communication one bit is transferred at a time over a
single line.
8085 implements this by using SID and SOD signals.
The serial output data (SOD) line is used to send data serially
and serial input data (SID) line is used to receive data serially.
Timing and Control Logic
Circuitry
The control circuitry of the 8085
processor is responsible for all the
operations.
The control circuitry and hence the
operations in 8085 are synchronized
with the help of clock signal.
Contd

Timing and Control Logic Circuitry

Instruction
Register

Instruction
Decoder

Timing and Control Unit

Control Signals
The 8085 and Its Busses
The 8085 is an 8-bit general purpose
microprocessor that can address 64K Byte of
memory.
It has 40 pins and uses +5V for power. It can
run at a maximum frequency of 3 MHz.
The pins on the chip can be grouped into 6 groups:
Address Bus.
Address/Data Bus.
Control and Status Signals.
Power supply and frequency.
Externally Initiated Signals.
Serial I/O ports.

20
Pin Diagram

21
Pin diagram of 8085
Microprocessor
VCC VSS

Interrupt
Signals Address Bus

DMA Signals
Address/Data
8085
Bus
Serial I/O p
Signals

Timing and Control & Status


Synchronization Signals Signals
The Address and Data
Busses
The address bus has 8 signal lines A8 A15 which
are unidirectional.
The other 8 address bits are multiplexed (time
shared) with the 8 data bits.(used for dual
purpose)
bits AD0 AD7 are bi-directional and serve as A0 A7
and D0 D7 at the same time.
So, the during the execution of the instruction, these lines carry
the address bits during the early part, then during the late parts
of the execution, they carry the 8 data bits.
In order to separate the address from the data, we can
use a latch to save the value before the function of the
bits changes.

23
Power Supply and
Frequency Signals
Vcc: +5 V power supply
Vss: Ground Reference.

There are 3 important pins in the frequency


control group.
X0 and X1 are the inputs from the crystal or clock
generating circuit.
The frequency is internally divided by 2.
So, to run the microprocessor at 3 MHz, a clock running at 6 MHz should
be connected to the X0 and X1 pins.
CLK (OUT): An output clock pin to drive the clock of
the rest of the system.
We will discuss the rest of the control signals as
we get to them.
24
Externally Initiated signals, Including
interrupts

Interrupts

Externally initiated signal

25
Serial Input/output Port
SIDserialinputdata:
SODSerialoutputdata:
Thesetwosignalsareusedtoestablishserial
communicationbetweenthemicroprocessorand
externalserialI/Odevices.

26

You might also like