What is Interrupt in Microprocessor 8085

In this course, we will study What is Interrupt in Microprocessor 8085 and the types of interrupts in Microprocessor 8085 – hardware and software interrupt, types of software interrupts, and ISR. So let us start.

What is Interrupt in Microprocessor 8085

An Interrupt in Microprocessor 8085 is nothing but the signals generated by the external devices that interrupts the normal flow of the program. Interrupts are generally the requests from the external device to the microprocessor for performing some actions. In case when an interrupt occurs the microprocessor shifts and starts working on a temporary work on a different task, and then later return to its previous task. Interrupts can be internal or external. When the interrupt occurs, the program stops executing and the microcontroller begins to execute the interrupt service routine (ISR).

What are the interrupt sources in Microprocessor 8085?

  1. Hardware interrupt occurs due to the change in the state of the microprocessor.
  2. The software interrupts are triggered by the execution of a machine instruction.

Types of interrupts in Microprocessor 8085?

There are two types of interrupt in Microprocessor 8085 –

  • Hardware interrupt
  • Software interrupt

Interrupt in Microprocessor 8085

Hardware interrupt in Microprocessor 8085

If the signal for the processor is from the external device or hardware is called a hardware interrupt.

Example: if we will press a key from the keyboard to do some action. This will generate a signal that is given to the processor to take action, we call such interrupts as hardware interrupts.

There are two types of hardware interrupt.

Maskable Interrupt

The hardware interrupts can be delayed when a much higher priority interrupt has occurred to the processor.

Non-Maskable Interrupt

The hardware interrupt cannot be delayed and should be processed by the processor immediately.

Software interrupt in Microprocessor 8085

Software interrupts are the interrupts that can be inserted into a desired location in the program. Software interrupts can also be divided into two types. They are

Normal Interrupts

the interrupts that are caused because of the software instructions are called software instructions.

Exception

The unplanned interrupts that occur while the execution of a program is called Exception.

Vector interrupt in Microprocessor 8085

The interrupt address is known to the processor in this kind of interrupt.

Non-Vector interrupt in Microprocessor 8085

The interrupt address is unknown to the processor, so we need to send the interrupt address externally by the device to perform interrupts.

Types of interrupts according to the relationship with the clock?

There are two types of interrupts according to the relationship with the clock.

  • Synchronous Interrupt
  • Asynchronous Interrupts

Synchronous Interrupt

The source of the interrupt is in phase with the system clock is called an asynchronous interrupt. Interrupts are dependent on the system clock. Example: timer service that uses the system clock.

Asynchronous Interrupts

Asynchronous interrupts, also known as external interrupts, are interrupt signals that are not synchronized with the clock of the microprocessor. In contrast to synchronous interrupts, which are triggered by specific points in the instruction execution cycle, asynchronous interrupts are generated externally to the microprocessor’s normal operation.

Types of software interrupts in Microprocessor 8085

Types of software interrupts in microprocessor 8085

TRAP

It is a non-maskable interrupt. It has the highest priority among all interrupts. By default, the interrupt is enabled until it gets acknowledged. In case of failure, the interrupt executes as ISR and sends the data to backup memory.

RST7.5

It is a maskable interrupt. It has the second-highest priority among all interrupts. During the execution of this interrupt, the processor saves the contents of the PC register to the stack and branches to address 003CH.

RST 6.5

It is a maskable interrupt. It has the third-highest priority among all interrupts. During the execution of this interrupt, the processor saves the contents of the PC register to the stack and branches to the address 0034H.

RST 5.5

It is a maskable interrupt. During the execution of this interrupt, the processor saves the contents of the PC register to the stack and branches to address 002CH.

INTR

It is a maskable interrupt. It has the lowest priority among all interrupts. It can be disabled by resetting the microprocessor.
When the INTR signal goes high, the following events can happen –

  • The microprocessor checks the status of the INTR signal during the execution of each instruction.
  • When the INTR signal is high, the microprocessor completes its current instruction and sends an active low interrupt to acknowledge the signal.
  • When the microprocessor receives instructions, it stores the address of the subsequent instruction on the stack before executing the received instruction.

What is ISR (interrupt service routine)?

ISR (interrupt service routine) which is also known as an interrupt handler. In case there is an interrupt present then it will immediately trigger the interrupt handler, the handler will stop the instruction which is being processed and its configuration will be saved in a register and will load the program counter of the interrupt from a location which is given by the interrupt vector table.

Upon completion of interrupt processing by the processor, the interrupt handler will retrieve the instruction and its associated settings from the preserved register. This allows the process to resume from where it was paused. This operation, involving the preservation of the previous instruction setup and the loading of the new interrupt setup, is commonly referred to as context switching.

The main features of the ISR are

  1. Interrupts can occur at any time, that is they are asynchronous. ISRs can call for asynchronous interrupts.
  2. Interrupt service mechanisms can call the ISRs from multiple sources.
  3. ISRs can handle both maskable and non-maskable interrupts. An instruction in a program capable of disabling or enabling an interrupt handler call.
  4. At the beginning of execution, it will disable other devices’ interrupt services. After the completion of ISR execution, it will resume interrupt services.
  5. Nested interrupts allow for diversion in the ISR.

Conclusion

In conclusion, the study of interrupts in Microprocessor 8085 provides a deep understanding of how the system efficiently handles external events and software instructions. Interrupts enable the microprocessor to temporarily shift focus, respond to urgent tasks, and seamlessly return to the interrupted process. By categorizing interrupts into hardware and software types, and delving into their priorities and functionalities, we gain insight into the intricate control mechanisms of the microprocessor. The Interrupt Service Routine (ISR) emerges as a pivotal component, orchestrating the smooth transition between tasks and ensuring optimal system performance. In essence, interrupts empower Microprocessor 8085 to be a versatile and responsive computing powerhouse.