1-Architecture of 8085
1-Architecture of 8085
1. Processing Unit
2. Storage and Interface Unit
3. Instruction Unit
4. Interrupt and Serial input/output unit
1. Processing Unit
ALU
Accumulator
Temporary Register
Flags
ALU
The ALU performs the actual numerical and logic operation such as ‘add’,
‘subtract’, ‘AND’, ‘OR’ etc.
Uses data from memory and from Accumulator to perform arithmetic
operation and always stores result of operation in Accumulator.
The sequence of operations in ALU are given below
One operand is in the A register
The other may be in one of the GPR or memory location, which will be transferred to the
temporary register(TR)
The contents of A and TR are the inputs of ALU on which specified operation is performed
The result of ALU operation is transferred in the A register through internal data bus
The content of the flag register will be changed depending on the result
Accumulator
8085 has 8-bit flag register. There are only 5 active flags.
Flags are flip-flops which are used to indicate the status of the accumulator and
other register after the completion of operation.
These flip-flops are set or reset according to the data condition of the result in the
accumulator and other registers.
2. Storage and Interface Unit
General Purpose Registers
Stack Pointer
Program Counter
Increment/Decrement Address Latch
Address Buffer
Address/Data Buffer
General Purpose Registers
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.
Program Counter
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.
It is another 16-bit internal register latch available in the register section for
internal operations and is not accessible to the user.
It selects an address to be sent out from the program counter, from the stack
pointer, or from one of the 16-bit register pairs.
It latches this address onto the address lines for the required time.
This 16-bit circuit is used to increment or decrement the contents of program
counter or stack pointer as a part of execution of instructions related to them
Address /Data buffer and Address buffer
E.g. if the instruction is ADI 04H, then the first binary code read by the µ𝑝 is C6H into
the (IR).
After decoding this, the decoder will recognize that another memory read cycle is
required to read 04H to be added to the number in the accumulator.
The decoder will direct the control circuit to send out another memory read pulse
and transfers the data coming on the data bus into the temporary register (Temp),
so that it can be added to the accumulator.
When the addition is completed the control circuit directs the result back to the
accumulator.
The program counter is then incremented to point the next memory address and
send out another memory read pulse to read the µ𝑝 code of next instruction from
memory.
Timing and Control Section
Contd.
Timing and control unit is a very important unit as it synchronizes the registers and flow
of data through various registers and other units.
It provides timing & control signals necessary to all the operations in the
microcomputer.
This unit consists of an oscillator and controller sequencer which sends control signals
needed for controls the flow of data between the microprocessor and peripherals
(input, output & memory).
The oscillator generates two-phase clock signals which aids in synchronizing all the
registers of 8085 microprocessor.
Signals that are associated with
Timing and control unit are:
1. Control Signals: READY, RD(active low), WR (active low), ALE
A clock generator is used to generate a clock, which is an oscillator that provides a square
wave output.
Clock cycle
The speed of a computer processor, or CPU, is determined by the clock
cycle, which is the amount of time between two pulses of an oscillator.
The higher number of pulses per second, the faster the computer
processor will be able to process information.
The frequency of a processor is measured in clock cycles per second
4. Interrupt Control Unit
Interrupts are the Signals generated by external devices to request the
microprocessor to perform a task. So it’s a mechanism by which an I/O device or
an instruction can suspend the normal execution of processor and get itself
serviced.
Consider that a microprocessor is executing the main program. Now whenever the
interrupt signal is enabled or requested the microprocessor shifts the control from
main program to process the incoming request and after the completion of
request, the control goes back to the main program.
On occurring of interrupt the microprocessor temporarily stops the execution of
main program and transfers control to specific special routine known as "Interrupt
Service Routine"(ISR). After ISR control is transferred back to main program.
Interrupt signals present in 8085 are Trap, RST 7.5, RST 6.5, RST 5.5, INTR.
Serial I/O control section