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

Standard XII Computer Science II

8085 Microprocessor

Three Units of 8085

1. Processing Unit
2. Instruction Unit
3. Storage and Interface Unit

1. Processing Unit
i. Arithmetic and Logic Unit
ii. Accumulator
iii. Status Flags
iv. Temporary Register

2. Instruction Unit
i. Instruction Register
ii. Instruction Decoder
iii. Timing and Control Unit

3. Storage and Interface Unit


i. General Purpose Registers
ii. Stack Pointer
iii. Program Counter
iv. Increment/Decrement Register
v. Address Latch
vi. Address/Data Latch

4. Three Other Units


i. Interrupt Controller
ii. Serial I/O Controller
iii. Power Supply

8085 microprocessor
Standard XII Computer Science II
 Introduced in 1977.
 It is 8-bit MP.
 It is a 40 pin dual-in-line chip.
 It uses a single +5V supply for its operations.
 Its clock speed is about 3MHz.

ALU(Arithmetic Logic Unit)

 The ALU performs the actual numerical and logic operation such as ‘add’, ‘subtract’, ‘AND’, ‘OR’
etc.
 The data is available in accumulator and temporary/general purpose registers.
 Uses data from memory and from Accumulator to perform arithmetic operation and always stores
result of operation in Accumulator.
 The ALU consists of accumulator, flag register and temporary register.

Accumulator

 It the main register of microprocessor.


 It is also called register ‘A’.
 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.
 After the arithmetic/logic operation, the contents of accumulator are replaced by the result.
 It always contains one of the operands on which arithmetic/logic has to be performed.
 The result of an operation is stored in the accumulator.

Flag register

 8085 has 8-bit flag register. There are only 5 active flags.

S Z x AC x P x CY
Fig: 8085 flag register

 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.

i. Sign flag(S):

 Sign flag indicates whether the result of a mathematical or logical operation is negative or positive.
 If the result is negative, this flag will be set (i.e. S=1) and if the result is positive, the flag will be
reset (i.e. S=0).

ii. Zero flag (Z):

 Zero flag indicates whether the result of a mathematical or logical operation is zero or not.
 If the result of current operation is zero, the flag will be set (i.e. Z=1) otherwise the flag will be reset
(Z=0).
 This flag will be modified by the result in the accumulator as well as in the other register.

iii. Auxiliary carry flag (AC):

 In operation when a carry is generated by bit D3 and passes on to bit D4, the AC flag will be set
otherwise AC flag will be reset.
 This flag is used only internally for BCD operation and is not available for the programmer to
change the sequence of program with the jump instruction.

8085 microprocessor
Standard XII Computer Science II
iv. Parity flag (P):

 This flag indicates whether the current result is of even parity (no. of 1’s is even) or odd parity (no.
of 1’s is odd).
 If even parity, P flag will be set otherwise reset.

v. Carry flag (CY):

 This flag indicates whether during an addition or subtraction operation carry or borrow is generated
or not.
 If carry or borrow is generated, the flag will be set otherwise reset.

Temporary Register

 It is an 8-bit register.
 It is used to store temporary 8-bit operand from general purpose register.
 It is also used to store intermediate results.

Timing and control unit

 This unit produces all the timing and control signal for all the operation.
 It controls all the operations of microprocessor and peripheral devices.
 Depending upon the machine cycles received from Instruction Decoder, it generates 12 control
signals:

 S0 and S1 (Status Signals).


 ALE (Address Latch Enable).
 RD (Read, active low).
 WR (Write, active low).
 IO/M (Input-Output/Memory).
 READY
 RESET IN
 RESET OUT
 CLK OUT
 HOLD and HLDA

Instruction register

 The instruction register and decoder are part of ALU.


 When an instruction is fetched from memory, it is loaded in the instruction register.
 The Instruction register (IR) is not programmable and cannot be accessed through any instruction.
 It is an 8-bit register.

Decoder

 The decoder decodes the instruction and establishes the sequence of events to follow.
 It interprets the instruction stored in instruction register.
 It generates various machine cycles depending upon the instruction.
 The machine cycles are then given to the Timing and Control Unit.

Register array

The register unit of 8085 consists of

-Six general-purpose data registers B,C,D,E,H,L


-Two internal registers W and Z
-Two 16-bit address registers PC (program counter) and SP (stack pointer)
-One increment/decrement counter register
-And, one multiplexer (MUX)

8085 microprocessor
Standard XII Computer Science II
General-purpose registers

 There are 6 general purpose registers, namely B, C, D, E, H, L.


 Each of the them is 8-bit register.
 They are used to hold data and results.
 To hold 16-bit data, combination of two 8-bit registers can be used.
 This combination is known as Register Pair.
 The valid register pairs are:
 B – C, D – E, H – L.

Two internal registers

 The two internal registers W and Z are used to hold 8-bit data during the execution of some
instructions, CALL and XCHG instructions.

Program Counter

 Program Counter is 16-bit register


 It is used to point the address of the next instruction to be fetched and executed stored in the
memory.
 The microprocessor increments the value of Program Counter after the execution of the current
instruction, so that, it always points to the next instruction

Stack Pointer

 It is used to point the address of data stored in the stack memory.


 It is also 16-bit register.
 Any portion of memory can be used as stack.
 It always indicates the top of the stack.

Increment/Decrement Register

 This register is used to increment or decrement the value of Stack Pointer.


 During PUSH operation, the value of Stack Pointer is incremented.
 During POP operation, the value of Stack Pointer is decremented.

Program Status Word (PSW)

 The contents of Accumulator and Status Flags clubbed together is known as Program Status Word
(PSW).
 It is a 16-bit word.

Address Latch

 It is group of 8 buffers.
 The upper-byte of 16-bit address is stored in this latch.
 And then it is made available to the peripheral devices.

8085 microprocessor
Standard XII Computer Science II
Address/Data Latch

 The lower-byte of address and 8-bit of data are multiplexed.


 It holds either lower-byte of address or 8-bits of data.
 This is decided by ALE (Address Latch Enable) signal.
 If ALE = 1 then Address/Data Latch contains lower-byte of address.
 If ALE = 0 then It contains 8-bit data.

System bus
a. Data bus
 It carries ‘data’, in binary form, between microprocessor and other external units, such as
memory.
 Typical size is 8 or 16 bits.
b. Address bus
 It carries ‘address’ of operand in binary form.
 Typical size is 16-bit.
c. Control Bus
 Control Bus are various lines which have specific functions for coordinating and controlling
microprocessor operations.
 E.g.: Read/Write control line.
Interrupt Control

 Interrupt is a signal, which suspends the routine what the microprocessor is doing, brings the
control to perform the subroutine, completes it and returns to main routine.
 May be hardware or software interrupts. Some interrupts may be ignored (maskable), some cannot
(non-maskable).
 It is used to handle the interrupts.
 Interrupt controller receives these interrupts according to their priority and applies them to the
microprocessor.
 There is one outgoing signal INTA which is called Interrupt Acknowledge.
 E.g. INTR, TRAP, RST 7.5, RST 6.5, RST 5.5

Serial I/O Control

 The microprocessor performs serial data input or output (one bit at a time). In serial transmission,
data bits are sent over a single line, one bit at a time.
 It is used to convert serial data into parallel and parallel data into serial.
 Microprocessor works with 8-bit parallel data.
 The 8085 has two signals to implement the serial transmission: SID (serial input data) and SOD
(serial output data).
 Serial I/O devices works with serial transfer of data.
 Therefore, this unit is the interface between microprocessor and serial I/O devices.

Power Supply

 This unit provides +5V power supply to the microprocessor.


 The microprocessor needs +5V power supply for its operation.

8085 microprocessor

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