Functional Block Diagram of 8085 Microprocessor

Fig: Functional Block Diagram of 8085 Microprocessor

1. 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 ALU consists of accumulator, flag register and temporary register.
    a. 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.
    b. Flag register
  • 8085 has 8-bit flag register. There are only 5 active flags.
S
Z

AC

P

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. 
        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. 
2. Timing and control unit
  • This unit produces all the timing and control signal for all the operation.
  • This unit synchronizes all the MP operations with the clock and generates the control signals necessary for communication between the MP and peripherals. 
3. Instruction register and decoder
  • The instruction register and decoder are part of ALU. When an instruction is fetched from memory, it is loaded in the instruction register.
  • The decoder decodes the instruction and establishes the sequence of events to follow.
  • The IR is not programmable and cannot be accessed through any instruction. 
4. 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) 
  • The six general-purpose registers are used to store 8-bit data. They can be combined as register pairs BC, DE, and HL to perform some 16-bit operations.
  • The two internal registers W and Z are used to hold 8-bit data during the execution of some instructions, CALL and XCHG instructions.
  • SP is 16-bit registers used to point the address of data stored in the stack memory. It always indicates the top of the stack.
  • PC is 16-bit register used to point the address of the next instruction to be fetched and executed stored in the memory. 
5. System bus
    a. Data bus
  • It carries ‘data’, in binary form, between MP 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 MP operations.
  • E.g.: Read/Write control line. 
6. Interrupt Control
  • Interrupt is a signal, which suspends the routine what the MP 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).
  • E.g. INTR, TRAP, RST 7.5, RST 6.5, RST 5.5 
7. Serial I/O Control 
  • The MP 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.
  • The 8085 has two signals to implement the serial transmission: SID (serial input data) and SOD (serial output data).

7 comments: