Programming The Mite For Different Dma Transfers - National Instruments PCI E Series Programmer's Manual

Register-level programmer manual, multifunction i/o boards for pci bus computers, register-level
Hide thumbs Also See for PCI E Series:
Table of Contents

Advertisement

Chapter 4
Programming
PCI E Series RLPM
13. The function
AI_Start_The_Acquisition
process.
AI_Command_2_Register
AI START1 Pulse = 1;
14. Call the function
15. Loop to check the status about how many bytes still remain in process.
This loop stops when the number of transfers remaining exceeds the
number of buffers. When DMA finishes transferring data to each
buffer, transfers remaining becomes 0. Thus, there are at least n
transfers remaining for n buffer transfers.
do {
Call the
MITE_DMAgettransfersRemaining
number of bytes remaining
if (transfersRemaining==0) increase transfersendcount;
} while (transfersendount<=NumberOfBuffer);
16. Print out the data in the buffers
17. Call the function
18. Release the memory storage used by the buffer information linked list.

Programming the MITE for Different DMA Transfers

To use DMA transfer for Analog Output, store the output data in the buffers
and construct the output buffer information linked list. Then, perform all
the steps above but pass OUTPUT for the direction parameter to the
function
MITE_DMAProgram
To perform two or more DMA transfers at the same time, use different
DMA and DRQ channels for different DMA transfers. For example, you
want to have DMA transfers for analog input and analog output at the same
time. Use DRQ channel 0 and DMA channel 0 for analog input, and DRQ
channel 1 and DMA channel 1 for analog output. In other words, use only
one DMA channel and one DRQ channel to perform either analog input or
analog output. When using two or more channels for DMA transfers, call
the functions
MITE_DMAProgram
operate analog input and analog output at the same time, call the function
and pass the input buffer information linked list head
MITE_DMAProgram
node pointer, number of buffers, 0 for drqnum, INPUT for direction,
FALSE for continuous and 0 for dmachannel. Call the function
again and pass the output buffer information linked
MITE_DMAProgram
list head node pointer, number of buffer, 1 for drqnum, OUTPUT for
direction, FALSE for continuous and 1 for dmachannel. Then call
twice for DMA channel 0 and channel 1. After the DMA
MITE_DMAarm
to start the DMA transfer.
MITE_DMAarm
to disarm the MITE for DMA.
MITE_DMAdisarm
.
,
MITE_DMAarm
4-20
starts the acquisition
to check the
two or more times. To
© National Instruments Corporation

Advertisement

Table of Contents
loading

Table of Contents