© Copyright 1991, 1994 National Instruments Corporation. All rights reserved.
The Software is the Instrument ®
Application Note 011
DMA Fundamentals on
Various PC Platforms
A. F. Harvey and Data Acquisition Division Staff
In computer-based data acquisition applications, data incoming or outgoing through computer I/O devices must
often be managed at high speeds or in large quantities. The three primary data transfer mechanisms for
computer-based data acquisition are polling, interrupts (also known as programmed I/O), and direct memory
access (DMA). Polling is a form of foreground data acquisition in which the processor is dedicated to
acquiring the incoming data, often by waiting in a loop. The main program calls an acquisition subroutine that
waits until the processor collects the required data. With interrupts, the processor is periodically interrupted
from executing the main program to store incoming data in a buffer for later retrieval and processing.
Interrupts are a form of background acquisition because the main program contains no code that reads data
from the input device. Instead, the processor is invisibly stolen periodically from the main program to perform
this function. With DMA, a dedicated data transfer device reads incoming data from a device and stores that
data in a system memory buffer for later retrieval by the processor. This DMA process occurs transparently
from the processor's point of view.
DMA has several advantages over polling and interrupts. DMA is fast because a dedicated piece of hardware
transfers data from one computer location to another and only one or two bus read/write cycles are required per
piece of data transferred. In addition, DMA is usually required to achieve maximum data transfer