ADLINK ACL-8112 Series User Manual
Page 87
 
C Language Library
• 79
7.20 _8112_AD_Timer
Description
This function is used to setup Timer #1 and Timer #2.
Timer #1 & #2 are used as frequency dividers for generating constant 
A/D sampling rate. It is possible to stop the pacer trigger by setting any 
one of the dividers to 0. The AD conversion rate is limited by the 
conversion time of the AD converter, the highest sampling rate of the 
ACL-8112 can not exceed 100KHz, thus the multiplication of the 
dividers must be larger than 20. 
Syntax
int _8112_AD_Timer( unsigned int c1 , unsigned int 
c2 ) 
int _8112pg_AD_Timer( unsigned int c1 , unsigned int 
c2 ) 
Argument:
c1:
frequency divider of timer #1
c2:
frequency divider of timer #2,
Note: The A/D sampling rate is equal to: 2MHz / (c1 * c2), if c1 = 0 or c2 =
0, the pacer trigger will be stopped.
Return Code:
ERR_NoError 
ERR_BoardNoInit 
ERR_InvalidTimerValue 
Example:
main() 
{ 
 int 
ErrCode;
_8112_Initial( CARD_1, A8112B_HG, 0x220 ); 
/* Assume ERR_NoError when Initialize ACL-8112 */ 
 
_8112_AD_Timer( 10 , 10 ); 
/* set AD sampling rate to 2MHz/(10*10) */ 
.. 
 
_8112_AD_Timer( 0 , 0 );
/* stop the pacer trigger */ 
}