User`s guide

60 C/C++ Library
5.22 _8316_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 take place in the
background which will not stop until the Nth conversion has completed or
your program executes _8316_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 _8316_AD_DMA_Status().
@ Syntax
I16 _8316_DMA_Start( U8 trig_src, Boolean auto_scan,
U8 ad_ch_no, U8 ad_range, U8 dma_ch_no, U8 irq_no,
U16 dma_count, I16 *ad_buf)
@ Argument
trig_src: Trigger source for DMA data transfer
DMA_MODE_0: Internal timer pacer trigger
DMA_MODE_1: External Trigger ( Ext_Trg)
auto_scan: 0: auto-scan is disabled
1: auto-scan is enabled
ad_ch_no: A /D channel number
* If the auto_scan is enabled, the A/D channel selection
sequence is: 0, 1, 2, 3, ...[ad_ch_no], 0, 1, 2,
3, ...[ad_ch_no], .......
* If the auto_ch_no is disabled, only the [ad_ch_no] will be
converted.
ad_range: A/D analog input range, the possible values are:
ad_range GAIN Input Range
AD_B_10_V 1
10V
AD_B_5_V 2
5V
AD_B_2_5_V 4
2.5V
AD_B_1_25_V 8
1.25V
dma_ch_no: DMA channel number, DMA_CH_5, DMA_CH_6 or
DMA_CH_7
Note:
Make sure your hardware configuration is set to right
DMA channel.