ADLINK ACL-8216 User Manual

Page 62

Advertising
background image

54 C/C++ Library

5.15 _8216_AD_DMA_Start

@ Description

The function will perform A/D conversion N times with DMA data
transfer by using the pacer trigger ( internal timer trigger). It will takes
place in the background which will not stop until the N-th conversion
has completed or your program execute _8216_AD_DMA_Stop()
function to stop the process. After executing this function, it is
necessary to check the status of the operation by using the function
_8216_AD_DMA_Status(). The function is performed on single A/D
channel with fixed gain. The sampling rate is 2 MHz/(c1xc2).

@ Syntax

int _8216_DMA_Start( int ad_ch_no, int ad_range,

intdma_ch_no, int irq_ch_no

int count , int *ad_buffer

unsigned int c1, unsigned int c2)

@ Argument

ad_ch_no:

A/D channel number

ad_gain:

A/D range value

Input Range (V)

Gain

Range Code

±10 V

X 1

0

±5 V

X 2

1

±2.5 V

X 4

2

±1.25 V

X 8

3


dma_ch_no:

DMA channel number, DMA_CH_1 or

DMA_CH_3. This should be the same as

the setting of JP8 and JP9 on hardware.

irq_ch_no:

IRQ channel number, used to stop DMA.

This should be the same as the setting
of JP7 on hardware.

count:

the numbers of A/D conversion

ad_buffer:

the start address of the memory buffer
to store the AD data, the buffer size
must large than the number of AD
conversion.

c1:

the 16-bit timer frequency divider of
timer channel #1

c2:

the 16-bit timer frequency divider of
timer channel #2

@ Return Code

ERR_NoError
ERR_BoardNoInit, ERR_InvalidADChannel,

Advertising