Basics of Intel 8085

We now know about various Generations of Microprocessors. Lets take a look towards one of the most important microprocessors, The Intel 8085.

The Intel 8085 is an 8-bit microprocessor produced by Intel and introduced in 1976. It is a software-binary compatible with the more-famous Intel 8080 with only two minor instructions added to support its added interrupt and serial input/output features.

Features of 8085

  • It is a 8-bit, NMOS microprocessor.
  • It is a 40 pin IC fabricated on a single chip.
  • It operates on +5V dc supply.
  • Its clock speed is about 3 Mhz
  • It has 80 basic instructions and 246 opcodes.
  • It consists of three main sections: ALU, a timing and control unit and a set of registers.
8085 Architecture
8085 Architecture

The Architecture of 8085

The Various components of 8085 are as follows:

Arithmetic and Logical Unit

ALU performs following operations:

  • Addition, Subtraction
  • Logical AND, OR, XOR, NOT –Increment and Decrement
  • Left shift, Rotate left, Rotate Right –Clear, etc.

Timing and Control Unit:

  • It is a section of CPU.
  • It generates timing and control signals which are necessary for the execution of instructions.
  • It controls the flow of data between CPU and peripherals.
  • It provides status , control and timing signals for the operation of memory and I/O device.

Registers

These are used by microprocessor for temporary storage and manipulation of data and instructions. 8085 contains following registers.

  • One 8 bit accumulator i.e. register A
  • Six 8 bit general purpose registers . These are B,C,D,E,H and L
  • One 16 bit stack pointer.
  • One 16 bit program counter.
  • Instruction Register.
  • Temporary Register.

Accumulator

  • Accumulator is a 8 bit register associated with ALU.
  • It is used to hold one of the operands of an arithmetic and logic operation.
  • The other operand for the arithmetic operation may be stored in the memory location or any of the general purpose register.
  • The final result is stored in the accumulator (except for single operand instruction or DAD rp instruction)

General Purpose Registers

  • The 8085 contains six 8-bit general purpose registers: B,C,D,E,H,L
  • To hold 16 bit data a combination of two 8-bit registers is employed.
  • The combination of two registers is called register pair.
  • The valid register pairs are B-C, D-E, H-L. The programmer cannot form a register pair of his own choice.
  • The H-L pair is used to act as memory pointer so it holds the address of the 16 bit memory location.
  • The general purpose registers and accumulator are accessible to programmer.

Program Counter

  • Program Counter is a 16 bit special register.
  • It is used to hold the memory address of the next instruction to be executed.
  • It keep tracks of the memory addresses of the instructions in a program while they are executed.
  • The microprocessor increments the content of the program counter during the execution of the instruction so that it points to the address of the next instruction to be executed.

Stack Pointer

  • Stack is a sequence of memory locations set aside by the programmer to store/retrieve the contents of accumulator, general purpose registers, flags, program counter.
  • During the execution of the program sometimes it becomes necessary to save the contents of registers which are needed for some other subsequent steps of the program.
  • The contents of such registers are saved in the stack.
  • After completing the needed operations the contents are saved back to the registers.
  • Stack Pointer is a special purpose 16 bit register that stores the address of the top element of the stack.
  • The stack is defined and the stack pointer is initialized by the programmer at the beginning of the program that needs stack.

Instruction and Temporary Register

  • Instruction Register holds the opcode (operation code) of the instruction which is being decoded and executed.
  • Temporary Register: It is an 8 bit register associated to ALU.
    • It holds data during an arithmetic or logic unit.
    • It is used by the microprocessor and not accessible by the programmer.

Status Flags

Intel 8085 consists of five flip-flops to serve as status flags. The flip-flops are set or reset according to the conditions which arise during an arithmetic or logical operation. If a flip-flop for a particular flag is set, it indicates 1. When it is reset, it indicates 0.

  • Carry Status Flag (CS): If in the result of the arithmetic operation carry is produced then this flag is set to 1 otherwise it is set to 0.
  • Parity Flag (P): If the result of the arithmetic or logical operation contains even number of one then this flag is set to 1 otherwise it is set to zero.
  • Auxiliary Carry Flag (AC): It holds carry out of the bit number 3 to bit number 4 resulting out of the arithmetic operation.
  • Zero Flag (Z): If the result of the arithmetic and logical operation is zero, then it is set to 1, otherwise it is set to 0.
  • Sign Flag (S): If the result of the arithmetic operation is negative then it is set to 1, otherwise 0.

For example, In case of Addition of CB and E9 CB = 11001011

E9 = 11101001
Result = 10110100 (01 B4)

CS=1, P=1, AC=1, Z=0, S=0

Data and Address Bus

  • Intel 8085 has 8 bit data bus. So 8 bits can be transferred in parallel from or to the microprocessor.
  • It requires 16 bits wide address bus to address 64 K of memory locations.
  • The 8 most significant bits of the address are transmitted by the Address bus (A8 to A15).
  • The 8 least significant bits of address are transferred through address/data bus (AD0 –AD7).
  • The AD bus works in time shared mode. This process is called multiplexing.

Program Status Word (PSW)

  • The combination of five status bits and three undefined bits is called Program Status Word.
  • PSW and accumulator are treated as 16 bit unit for stack operation.

You can Learn about pin diagram of 8085 here.

Sahil Gupta

A budding Entrepreneur, Thinker, Writer and most importantly a Seeker... Read More

Comments

%d bloggers like this: