Open In App
Related Articles

Instruction cycle in 8085 microprocessor

Improve Article
Improve
Save Article
Save
Like Article
Like

Inrtoduction :

The 8085 microprocessor is a popular 8-bit microprocessor that was first introduced by Intel in 1976. It has a set of instructions that it can execute, and the execution of each instruction involves a series of steps known as the instruction cycle.

The instruction cycle of the 8085 microprocessor consists of four basic steps, which are:

  1. Fetch: In this step, the microprocessor fetches the instruction from the memory location pointed to by the program counter (PC). The PC is incremented by one after the fetch operation.
  2. Decode: Once the instruction is fetched, the microprocessor decodes it to determine the operation to be performed and the operands involved.
  3. Execute: In this step, the microprocessor performs the operation specified by the instruction on the operands.
  4. Store: Finally, the result of the execution is stored in the appropriate memory location or register.

Once the execution of an instruction is complete, the microprocessor returns to the fetch step to fetch the next instruction to be executed. This cycle repeats until the program is complete or interrupted.

Why need the Instruction cycle in 8085 microprocessor ?

The instruction cycle is a fundamental concept in the operation of the 8085 microprocessor because it is the process by which the microprocessor fetches, decodes, and executes instructions. The execution of a program in a microprocessor involves a sequence of instructions, and each instruction is executed using the instruction cycle.

The instruction cycle is necessary in the 8085 microprocessor because it ensures that the instructions are executed in the correct sequence and that the correct operation is performed on the correct data. The fetch step ensures that the correct instruction is obtained from memory, the decode step ensures that the correct operation is determined, and the execute step ensures that the correct operation is performed on the correct data.

Furthermore, the instruction cycle allows the microprocessor to execute instructions at a very high speed, which is critical in applications where real-time performance is required. By efficiently executing instructions using the instruction cycle, the microprocessor can perform complex tasks and computations quickly and accurately.

Time required to execute and fetch an entire instruction is called instruction cycle. It consists:

  • Fetch cycle – The next instruction is fetched by the address stored in program counter (PC) and then stored in the instruction register.
  • Decode instruction – Decoder interprets the encoded instruction from instruction register.
  • Reading effective address – The address given in instruction is read from main memory and required data is fetched. The effective address depends on direct addressing mode or indirect addressing mode.
  • Execution cycle – consists memory read (MR), memory write (MW), input output read (IOR) and input output write (IOW)

The time required by the microprocessor to complete an operation of accessing memory or input/output devices is called machine cycle. One time period of frequency of microprocessor is called t-state. A t-state is measured from the falling edge of one clock pulse to the falling edge of the next clock pulse. Fetch cycle takes four t-states and execution cycle takes three t-states. Instruction cycle, machine cycle, and t-state Timing diagram for fetch cycle or opcode fetch: Timing diagram for opcode fetch Above diagram represents:

  • 05 – lower bit of address where opcode is stored. Multiplexed address and data bus AD0-AD7 are used.
  • 20 – higher bit of address where opcode is stored. Multiplexed address and data bus AD8-AD15 are used.
  • ALE – Provides signal for multiplexed address and data bus. If signal is high or 1, multiplexed address and data bus will be used as address bus. To fetch lower bit of address, signal is 1 so that multiplexed bus can act as address bus. If signal is low or 0, multiplexed bus will be used as data bus. When lower bit of address is fetched then it will act as data bus as the signal is low.
  • RD (low active) – If signal is high or 1, no data is read by microprocessor. If signal is low or 0, data is read by microprocessor.
  • WR (low active) – If signal is high or 1, no data is written by microprocessor. If signal is low or 0, data is written by microprocessor.
  • IO/M (low active) and S1, S0 – If signal is high or 1, operation is performing on input output. If signal is low or 0, operation is performing on memory.

8085 machine cycle status and control signals

Uses of Instruction cycle in 8085 microprocessor :

 Some of the key uses of the instruction cycle in the 8085 microprocessor include:

  1. Execution of instructions: The instruction cycle is used to execute the instructions in a program. Each instruction in the program is fetched, decoded, and executed using the instruction cycle.
  2. Control flow: The instruction cycle is used to control the flow of instructions in a program. Once an instruction is executed, the microprocessor moves on to the next instruction in the program.
  3. Real-time processing: The instruction cycle allows the 8085 microprocessor to execute instructions quickly and accurately, making it well-suited for real-time processing applications where speed and accuracy are critical.
  4. Resource management: The instruction cycle is used to manage the resources of the 8085 microprocessor, including the memory and registers. The fetch step retrieves instructions from memory, while the store step writes results back to memory or registers.
  5. Interrupt handling: The instruction cycle is used to handle interrupts in the 8085 microprocessor. When an interrupt occurs, the current instruction cycle is suspended, and the microprocessor jumps to a separate interrupt routine to handle the interrupt.

Issues of Instruction cycle in 8085 microprocessor :

Some of the key issues of the instruction cycle in the 8085 microprocessor include:

  1. Timing: The instruction cycle requires precise timing to ensure that each step is executed correctly. If the timing is off, it can lead to incorrect results or cause the microprocessor to malfunction.
  2. Instruction set limitations: The 8085 microprocessor has a limited instruction set, which can make it difficult to perform certain operations or tasks. This can lead to inefficient code and slower execution times.
  3. Data transfer: The instruction cycle is used to transfer data between memory and registers, but this process can be slow and inefficient. This can be a problem when working with large amounts of data or when real-time processing is required.
  4. Interrupt handling: Although the instruction cycle is used to handle interrupts, it can be challenging to ensure that the microprocessor returns to the correct point in the program after handling an interrupt.
  5. Instruction sequencing: The instruction cycle requires instructions to be executed in a specific sequence, which can limit the flexibility of the microprocessor and make it difficult to optimize code for specific tasks.
Last Updated : 21 Apr, 2023
Like Article
Save Article
Similar Reads