- Asked 2/20
- 2073 Chaitra · 3 marks
- 2075 Asoj · 1+5 marks
Interrupt driven data transfer
Short answer
Interrupt-driven I/O allows the CPU to execute its main program until a peripheral signals readiness via an interrupt request. The CPU saves context, vectors to an ISR, transfers one data byte, updates pointer/counter, clears the interrupt, and returns, maximizing CPU utilization for slow devices.
Explain the interrupt driven data transfer scheme with the flowchart of the interrupt subroutine and main program sequence.
In interrupt driven I/O, the peripheral informs the processor when it is ready by activating an interrupt request line. The processor works on its main program and transfers data only when interrupted, so no time is wasted in polling.
Sequence
- Main program initialises the port, loads pointers/counter, and enables interrupts (EI).
- The device becomes ready and sets INTR.
- The CPU finishes the current instruction, checks the request (and mask), and sends INTA'.
- The return address (PC) and flags are pushed on the stack; the PC is loaded with the ISR address (vector).
- The ISR saves registers, reads or writes the byte (IN/OUT), updates pointer and counter, clears the request, restores registers, enables interrupts, and executes RET/IRET.
- The main program continues from where it stopped.
Flowcharts
Main program Interrupt service routine
+----------+ +-------------------+
| Start | | Save registers |
+----+-----+ +---------+---------+
+----v-----+ +---------v---------+
| Initialise| | Read/write data |
| port, EI | | via port |
+----+-----+ +---------+---------+
+----v-----+ +---------v---------+
| Do other |<- INTR | Update pointer, |
| tasks | occurs | counter |
+----+-----+ +---------+---------+
| +---------v---------+
v | Restore registers |
(continue) | EI, RET |
+-------------------+
8085 skeleton
MVI A,0BH ; SIM: enable RST 7.5
SIM
EI
LOOP: ... ; main work
JMP LOOP
ISR: PUSH PSW
IN 80H ; read data
STA 2000H
POP PSW
EI
RET
Advantage: efficient CPU use. Disadvantage: interrupt latency and overhead per byte, so not suitable for very fast block transfers (use DMA).
✓ Answer checked by Claude Sonnet 5.5
Related questions
- Double handshake data transfer with 8255-PPI · Instrumentation II, chapter 2
- ADC804 with 8255 control word and program · Instrumentation II, chapter 4
- Interfacing 8-bit ADC using interrupt · Instrumentation II, chapter 4 · asked 2×
- Data transfer techniques for slow I/O · Instrumentation II, chapter 1 · asked 3×
- Basic data transfer mechanisms in USB · Instrumentation II, chapter 3
- USB standards and data transfer mechanisms · Instrumentation II, chapter 3
- Interrupt-driven I/O with vectored interrupt · Embedded System, chapter 5 · asked 3×
- Programmed vs interrupt-driven vs DMA · Computer Organization and Architecture, chapter 7 · asked 5×
- DMA vs programmed and interrupt-driven I/O · Computer Organization and Architecture, chapter 7 · asked 3×
- Sequence of steps when interrupt occurs · Microprocessor, chapter 5 · asked 2×