beautypg.com

ADLINK ACL-8111 User Manual

Page 53

background image

C/C++ Library for DOS 47

5.14 _8111_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 be stopped until the Nth conversion has been completed or your
program execute _8111_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 8111_AD_INT_Status(). The function is
perform on single A/D channel with fixed analog input range.

@ Syntax

int _8111_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 analog input range, please refer to

section 6.9 for the possible values.

irq_ch_no:IRQ channel number used to transfer AD data,

the possible value is defined in ' 8111.h '

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 number 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_InvalidTimerValue
ERR_BoardNoInit
ERR_InvalidADChannel

ERR_AD_InvalidRange
ERR_InvalidIRQChannel

@ Example:

See demo Program 'AD_Demo2.C'