8085 Microprocessor Architecture

In this article we will discuss about 8085 microprocessor architecture. The 8085 microprocessor architecture consists of five parts which are as follows:

  • Register unit
  • Control unit
  • Arithmetic and logical unit
  • Interrupt unit
  • Serial IO unit

These five units consist of other internal parts. These units of 8085 microprocessor architecture are helpful in understanding the microprocessor. The following section gives a detail view of microprocessor.

8085 microprocessor architecture
8085 microprocessor architecture

Register Unit

The register unit consists of six general purpose data registers and these are B, C, D, E, H and L two internal registers W and Z. Two 16-bit address registers PC and SP. It has also a increment or Decrement counter register and one MUX or DEMUX unit.

Resigter unit of 8085 Microprocessor
Resigter unit of 8085 Microprocessor

General purpose data register

8085 consists of six general-purpose data registers to store 8-bit data. It is very important section in 8085 microprocessor Architecture. These registers named as B, C, D, E, H, and L as shown in figure. During the execution of a program the user can use these registers to store a data or copy a data temporarily by using data transfer instructions. Though these registers are of 8 bits but whenever the microprocessor has to handle 16-bit data. They can work as register pairs BC,DE and HL.

The 8085 microprocessors architecture also have two 8-bit internal data registers. These registers are W and Z. These registers are for internal operation of the microprocessor and not available to the user. Microprocessor uses these registers internally. For example in the case of CALL and XCHG instructions.

Program counter (PC)

It is a 16-bit register which deals with sequencing the execution of instructions. This register is a memory pointer. Memory locations have 16-bit addresses which is why this is a 16-bit register. The microprocessor uses program counter to sequence the execution of the instructions.

The function of this register is to point to the memory address from which the next byte is to be fetch. When a data byte (machine code) is being fetched, and the program counter is incremented by one to point to the next memory location.

Stack pointer (SP)

This register is of 16-bit. Microprocessor uses this register 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 1000-bit address in the stack pointer.

Increment/Decrement counter

The microprocessor uses this counter register to increment or decrement the contents of the various register available in the register unit. For instance, every time microprocessor accesses a memory, its PC register increments by one.

MUX/DEMUX unit

The 8085 microprocessor uses MUX or DEMUX unit to select a register out of all the available registers. This unit works as a MUX when data is going from the register to the internal data bus.

It works as a DEMUX when data is coming to a register from the internal data bus of the microprocessor. The register select unit will work as the function selection, lines of the MUX/DEMUX.

Address buffer register and data/address buffer register

These registers hold the address or data received from PC/internal data bus and then loads the external address and data buses. These registers actually work as the buffer stage between the microprocessor and external system buses.

 Control Unit

This is also important unit in 8085 microprocessor Architecture analysis. This unit generates signals within microprocessor to carry out the instruction, which has been decoded. Practically it causes certain connections between blocks of the microprocessor to be opened or closed. so that the data goes where it is required and the ALU operations occur.

The control unit itself consists of three parts; the instructions register (IR). Instruction decoder and machine cycle encoder and control and timing unit.

Instruction registers

The Instruction register holds the machine code of the instruction. When microprocessor executes a program, it reads the machine code or opcode from the memory. This opcode is stored in the instruction register.

Instruction decoder and machine cycle encoder

The Instruction register sends the machine code to this unit. It decodes the opcode and finds out what is to be done in response of the coming opcode and how many machine cycles are required to execute this instruction.

Control and timing unit

The control unit generates signals internally in the microprocessor to carry out the instruction, which has been decoded. Practically, it causes certain connections between blocks of the microprocessor to be opened or closed. So that the data goes where it is required to be fetch and the ALU operations occur.

Arithmetic and Logical Unit

The ALU is one of the important unit in 8085 microprocessor Architecture. The ALU performs the numerical and logical operation such as “ADD”, “SUBTRACT”, “AND”, “OR”, etc. ALU uses data from memory and from accumulator to perform the arithmetic operation. It always stores the result of the operation in accumulator. The ALU has accumulator, flag register and temporary register.

Accumulator

The accumulator is an 8-bit register. It is a part of arithmetic/logic unit (ALU). The microprocessor uses this register to store 8-bit data. It performs arithmetical and logical operations. The microprocessor stores result of every ALU operation in the accumulator. You can identify an accumulator as register A.

Flags

The ALU also has five flip-flops. They becomes set or reset after an operation. The value is according to the data conditions of the result in the accumulator and other registers. The different types of flags are ZERO (Z), CARRY (CY), SIGN (S), PARITY (P) and AUXILIARY CARRY (AC) flags. The bit positions in the flag register are in Figure below.

The microprocessor uses these flags to set and to test data conditions. For example, after an addition of two numbers. If the sum in the accumulator is larger than 8-bit. Then the flip-flop indicates a carry called the carry flag (CY) to set to one. When an arithmetic operation like add or subtract results in zero. Then the flip-flop called the zero (Z) flag is set to one.

Figure shows this 8-bit flag register, adjacent to the accumulator.

Format of the flag register
Format of the flag register

Format of the flag register

The flags are stored in the 8-bit register so that the programmer can examine these flags by accessing the register through some instructions. These flags are important in the decision-making process of the microprocessor.

The conditions set or reset of the flags are check by the software instructions. For instance, the instruction JC (jump on carry) runs to change the sequence of a program when CY flag is set. Proper understanding of flag is essential in writing assembly language programs.

Z (Zero) flag:

This flag indicates whether the result of a mathematical or logical operation is zero or not. If the result of the current operation is zero, then this flag will be set or reset.

CY (Carry) flag:

The carry flag indicates whether, during an addition or subtraction operation a carry or a borrow is there or not. If carry is generated then this flag bit will be set. This flag can also be set before a mathematical operation as an extra operand to certain instruction.

AC (Auxiliary carry) flag:

It shows carry propagation from position D3 to position D4. You can  understand it better by considering Figure below.

Auxiliary carry flag
Auxiliary carry flag

Here, a carry generates from D3, bit position and propagates to the D4 position. This carry is called auxiliary carry. This flag is never used for setting or testing a condition.

S (Sign) flag:

This flag indicates whether the result of a mathematical operation is negative or positive. If the result is negative then sign flag will be set and if the result is positive, then this flag will reset. Actually, this bit is a replica of the D7 bit.

P (Parity) flag:

Parity means the number of 1’s in a number. If the number of ones (1’s) in a number is even, then that number is even parity number. If the number of ones (1’s) in a number is odd then that number is an odd parity number. This flag shows or indicates whether current result is of even parity (1) or of odd parity (0).

Read Also: Introduction to microprocessor