You are on page 1of 8

EXPERIMENT NO-

Aim To study architecture and pin diagram of 8085 microprocessor


system.

Apparatus 8085 Microprocessor trainer kit.


Theory
The Architecture of the 8085
Before we begin with the main architectural block diagram of the 8085, let us
discuss the key features of this processor.

• The Intel 8085 is an 8-bit general-purpose microprocessor.


• It has an 8-bit data bus. This means that 8 bits of data can flow around
in the innards of the microprocessor.
• Apart from the data bus, it also has a 16-bit address bus, which
addresses up to 64KB.
• It also has a 16-bit program counter & a 16-bit stack pointer.
• There are six 8-bit registers which are arranged in pairs: BC, DE, HL.
• It requires a voltage supply of +5V to operate at 3.2MHZ single-phase
clock frequency
• The Intel 8085 comes as a 40-pin IC package.

Clearly, we can see the different functional units in the architecture:

• Accumulator
• Arithmetic and Logic Unit
• General-purpose register
• Program counter
• Stack pointer
• Temporary register
• Flag register
• Instruction register and decoder
• Timing and control unit
• Serial Input/output control
• Interrupt Control
• Address buffer and address-data buffer
• Address bus and data bus
Accumulator
The accumulator sometimes referred to as ‘Acc’, is an 8-bit register which is
connected to the internal data bus and the ALU. The outcome of the
operations carried out by the ALU (the Arithmetic and Logical Operations) is
stored in the accumulator. The accumulator is also referred to as register A.
Arithmetic Logical Unit
The primary functioning of the ALU is arithmetic & logical operations – these
include addition, incrementing, subtraction, decrementing, logical tasks like
OR, AND, XOR, complement, left shift or the right shift. It uses the data from
memory and always stores the result of all operations in the Accumulator.
Address bus and data bus
The data bus carries data to be stored in the system. It is a bidirectional bus,
whereas the address bus carries the location to where the data should be
stored and is unidirectional.
Instruction Register and Decoder

• The instruction register and decoder can be considered as a part of the


ALU.
• This is an 8-bit register which is linked to the instruction cycle of the
microprocessor.
• When an instruction is fetched from memory, it is loaded into the
instruction register.
• The decoder decodes this instruction and establishes the corresponding
sequence of events to be followed.
• The IR is non-programmable and cannot be accessed through any
instructions.

General-Purpose Registers
The Intel 8085 has six general-purpose registers, namely B, C, D, E, H and L.
Each register can hold data of 8-bits. We can also use these registers in pairs
– BC, DE and HL. When in pairs, these registers can contain 16-bit data.
Program Counter
Let us consider that an instruction is being executed by the microprocessor.
When the ALU finishes executing one instruction, it begins searching for the
next instruction to be performed. Thus, there is a requirement of keeping the
next instruction’s address ready to be executed, in order to save time. This is
taken care of by the program counter.
The Program Counter (PC) is a 16-bit register which is used to store the
memory location of the next instruction in line for execution.
Stack Pointer
The Stack Pointer (SP) is a 16-bit register which works similar to the stack
and is used to hold line memory address for next instruction to be executed
Flag Register
The 8085 has an 8-bit flag register, but there are only five active flag bits.
They are – S, Z, AC, P and CY. Flags are basically flip-flops which are used to
show the status of some units of the 8085 after the completion of their
respective operations. These flip-flops are either set or reset as per the
condition of the result in the registers.
1. Sign Flag (S)

• The sign flag indicates whether the result of an arithmetic / logical


operation is positive or negative.
• If the flag is set, i.e. S = 1, the result of the recently carried out operation
is negative; whereas if the result turns out to be positive, the flag is
reset, i.e. S=0.

2. Zero Flag (Z)

• The zero flag indicates whether the output of an arithmetic / logical


operation turns out to be zero or not.
• If the result of the most recent operation is zero, the flag will be set (i.e.
Z=1). Else, the flag will be simply reset (Z=0).
• This flag’s value is changed after the ALU operation by the result stored
in the accumulator and other registers.

3. Auxiliary Carry Flag (AC):

• This flag comes into consideration only during BDC arithmetic


operations.
• In BCD operations, when a carry is generated by the D3 bit and is
passed on to the D4th bit, the AC flag will be set. Else, the AC flag will
be reset.
• The programmer cannot change the sequence of the program using the
jump instruction.

4. Parity Flag (P):

• Parity is used to indicate whether a number is of even parity (has even


number of 1’s in the binary number) or of odd parity (has an odd number
of 1’s in the binary number).
• Thus, the parity flag in the flag register indicates if the most recent result
of the ALU operation is of even parity or odd parity.
• If it follows even parity, the P flag will be set to 1; else it remains zero.

5. Carry flag (CY):

• The Carry flag indicates a carry or borrow generated during any


arithmetic operations carried out in the ALU.
• If a carry or borrow has been generated, the flag will be set to 1; else it
is reset.
Timing and Control Unit

• This component produces all the timing & control signal for all the
microprocessor operation.
• This unit synchronizes all the microprocessor operations with the
internal clock and generates the necessary control signals for
communication between the 8085 and the peripherals.
• Given below are the timing & control signals which control the 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

Interrupt Control
As the name goes, this component controls the interrupts popping up during a
process. Basically, an interrupt suspends the normal course of execution of
the microprocessor, shifts the control to the subroutine, completes the
interrupt handling and then goes back to the main program. When a
microprocessor is executing a set of instructions and an interrupt pops up, the
8085 shifts control from the main program to process the incoming interrupt
request. After the request has been processed, the control shifts back to the
main program. This interrupt might be hardware or software interrupt. Some
interrupts can be ignored (or maskable) while some cannot (non-maskable).
There are five interrupt signals in 8085 microprocessor: INTR, RST 7.5, RST
6.5, RST 5.5, and TRAP.
Increment or Decrement Register
The ‘8-bit register contents’ or a ‘memory position’ can be increased or
decreased by one. The 16-bit register is useful for incrementing/decrementing
the PC or the SP registers content by one.
Address-Buffer & Address-Data-Buffer
The contents stored in the Stack Pointer Register and the Program Counter
Register is loaded in the address buffer and the address-data buffer to
communicate with the processor. The memory and I/O chips are connected
with these buses; the CPU can exchange the required data with the memory
and I/O chips.
Serial Input / Output control
This unit controls the serial data communication by using two instructions: SID
(Serial Input Data) and the SOD (Serial Output Data). In serial data
transmission, the data bits are sent over a single line, one bit at a time.
Pin Description of the 8085
The pins of an 8085 microprocessor can be classified into seven groups −

Address bus
A15-A8, it carries the most significant 8-bits of memory/IO address.

Data bus
AD7-AD0, it carries the least significant 8-bit address and data bus.

Control and status signals


These signals are used to identify the nature of operation. There are 3 control signal
and 3 status signals.
Three control signals are RD, WR & ALE.
• RD − This signal indicates that the selected IO or memory device is to be read
and is ready for accepting data available on the data bus.
• WR − This signal indicates that the data on the data bus is to be written into a
selected memory or IO location.
• ALE − It is a positive going pulse generated when a new operation is started by
the microprocessor. When the pulse goes high, it indicates address. When the
pulse goes down it indicates data.
Three status signals are IO/M, S0 & S1.

IO/M
This signal is used to differentiate between IO and Memory operations, i.e. when it is
high indicates IO operation and when it is low then it indicates memory operation.

S1 & S0
These signals are used to identify the type of current operation.

Power supply
There are 2 power supply signals − VCC & VSS. VCC indicates +5V power supply and
VSS indicates ground signal.

Clock signals
There are 3 clock signals, i.e. X1, X2, CLK OUT.
• X1, X2 − A crystal (RC, LC N/W) is connected at these two pins and is used to
set frequency of the internal clock generator. This frequency is internally divided
by 2.
• CLK OUT − This signal is used as the system clock for devices connected with
the microprocessor.
Interrupts & externally initiated signals
Interrupts are the signals generated by external devices to request the microprocessor
to perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5,
and INTR. We will discuss interrupts in detail in interrupts section.
• INTA − It is an interrupt acknowledgment signal.
• RESET IN − This signal is used to reset the microprocessor by setting the
program counter to zero.
• RESET OUT − This signal is used to reset all the connected devices when the
microprocessor is reset.
• READY − This signal indicates that the device is ready to send or receive data. If
READY is low, then the CPU has to wait for READY to go high.
• HOLD − This signal indicates that another master is requesting the use of the
address and data buses.
• HLDA (HOLD Acknowledge) − It indicates that the CPU has received the
HOLD request and it will relinquish the bus in the next clock cycle. HLDA is set
to low after the HOLD signal is removed.

Serial I/O signals


There are 2 serial signals, i.e. SID and SOD and these signals are used for serial
communication.
• SOD (Serial output data line) − The output SOD is set/reset as specified by the
SIM instruction.
• SID (Serial input data line) − The data on this line is loaded into accumulator
whenever a RIM instruction is executed.

You might also like