ADLINK ACL-8216 User Manual
Page 65

C/C++ Library • 57
5.18 _8216_AD_INT_Start
@ Description
The function will perform A/D conversion N times with interrupt data
transfer by using pacer trigger. It takes place in the background which
will not stop until the N-th conversion has completed or your program
execute _8216_AD_INT_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_INT_Status(). The function
is perform on single A/D channel with fixed gain. The sampling rate is
2 MHz/(c1xc2).
@ Syntax
int _8216_INT_Start( int ad_ch_no, int ad_range,
int irq_ch_no, int count, int
*ad_buffer,
unsigned int c1, unsigned int c2)
@ Argument
ad_ch_no:
A/D channel number
ad_range:
A/D range value
irq_ch_no:
IRQ channel number used to transfer AD
data, the possible value is defined in
'8216.h'. 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 A/D data, the buffer size
must be large
than the numbers of A/D 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_Board_NoInit, ERR_AD_InvalidChannel,
ERR_AD_InvalidGain, ERR_InvalidIRQChannel,
ERR_InvalidTimerValue
@ Example
See demo program 'AD_Demo2.C'