Skip to main content

Control methods for interface communication

Short answer

Programmed I/O (polling) uses a busy-wait loop, wasting CPU time but simple. Interrupt-driven I/O lets the peripheral signal readiness via an interrupt, causing the CPU to run an ISR and then resume, improving efficiency. DMA transfers blocks directly between peripheral and memory with minimal CPU involvement, providing high speed for large transfers.

Explain the control methods used for communication in interfacing.

Interfacing connects a processor to a peripheral, and the control method decides how the transfer is controlled. The main methods are:

1. Programmed I/O (polling)

The processor repeatedly reads the status register of the peripheral (busy-wait loop) and transfers data when the device is ready. Simple, but wastes CPU time while polling.

2. Interrupt-driven I/O

The peripheral sends an interrupt request when it is ready; the processor suspends the main program, runs the ISR for the transfer and then resumes. Uses the CPU efficiently. Two forms: fixed ISR location and vectored interrupt (the device supplies the vector).

3. Direct memory access (DMA)

A DMA controller transfers blocks of data between the peripheral and memory without CPU involvement for every byte. Best for large, fast transfers; the CPU only sets up the transfer and handles completion.

Handshaking and timing control

The transfer is also controlled by protocol: strobe (data valid pulse) and handshake (Req/Ack).

Bus access control

When multiple masters exist, arbitration (priority or daisy chain) decides who controls the bus.

MethodCPU involvementSpeedUse
PollingFull (busy wait)LowSimple devices
InterruptDuring ISR onlyMediumKeyboard, serial
DMASetup and end onlyHighDisk, network

✓ Answer checked by Claude Opus 5.5 (high effort)

All Embedded System chapter 5 questions →