Peripheral device activates interrupt by activating the respective pin.
In response to the interrupt request, microprocessor completes the current instruction execution in main program and transfer program control to interrupt service routine.
In ISR routine, required task is completed. Task …