What are DMA and IRQ and What are They Used for in GPIB?

Updated Jan 12, 2023

Reported In

Driver

  • GPIB Software
  • Miscellaneous GPIB Software (Legacy)

Issue Details

What are DMA and IRQ and what are they used for in the context of GPIB?

Solution

DMA stands for direct memory access. Personal computers have DMA controllers (DMAC) that are used to transfer data directly to or from a device and the computer's memory. National Instruments GPIB products are designed to program the DMAC to transfer data to and from memory. DMA is not necessary when using GPIB and can be disabled in the GPIB Configuration Utility.

IRQ stands for interrupt request. Interrupts are used to perform automatic serial polling and to implement asynchronous (background) data transfers. Our handler serial polls all devices on the bus when the service request (SRQ) line is asserted. If interrupts are disabled and you have automatic serial polling enabled, the handler polls the devices only when a GPIB call is made. With interrupts disabled, asynchronous transfers are treated synchronously. Like DMA, interrupts are not necessary when using GPIB.
 

Additional Information

National Instruments products use programmed I/O to do the GPIB transfers when DMA is disabled. Programmed I/O polls status registers on the GPIB board to determine the status of the transfer on a byte-by-byte basis. Additionally, the handler can interrupt the CPU every time the GPIB board is ready to process another byte for input or output.

The advantage of using DMA is that the DMAC performs the data transfer. The CPU is not tied up for the entire duration of the transfer; however it must still program the DMAC. In general DMA is faster than programmed I/O and therefore useful for large data transfers.