User`s guide
C/C++ Library 63
@ Argument
int_mode: A/D conversion by interrupt data transfer
INT_MODE_0: Internal timer pacer trigger A/D conversion,
EOC( end of conversion ) trigger interrupt,
and get A/D converted data through I/O port.
INT_MODE_1: Internal timer pacer trigger A/D conversion,
FIFO_HF( FIFO half full ready ) trigger interrupt, and
get 512 A/D converted data through I/O port.
INT_MODE_2: External Trigger A/D conversion , and EOC( end of
conversion ) trigger interrupt,
and get A/D converted data through I/O port.
INT_MODE_3: External trigger A/D conversion,
FIFO_HF( FIFO half full ready ) trigger interrupt, and
get 512 A/D converted data through I/O port.
auto_scan: 0: auto-scan is disabled
1: auto-scan is enabled
ad_ch_no: A/D channel number
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
irq_ch_no: IRQ channel number, used to stop DMA
Note:
Make sure your hardware configuration is set to right IRQ interrupt
level.
int_count:
the number of A/D conversion
ad_buf: the start address of the memory buffer to store the AD data, the
buffer size must large than the number of AD conversion.
@ Return Code
ERR_NoError, ERR_BoardNoInit , ERR_InvalidADChannel
ERR_AD_InvalidGain, ERR_InvalidIRQChannel,
ERR_InvalidTimerValue
@ Example
See Demo Program 'AD_DEMO2.C'