ADLINK ACL-8216 User Manual

Page 67

Advertising
background image

C/C++ Library 59

5.21 _8216_AD_Timer

@ Description

This function is used to setup the Timer #1 and Timer #2.

Timer #1 & #2 are used as frequency divider for generating constant
A/D sampling rate dedicatedly. It is possible to stop the pacer trigger
by setting any one of the dividers as 0. Because the AD conversion
rate is limited to the conversion time of the AD converter, the highest
sampling rate of the ACL-8216 can not be exceeded 100 KHz. Thus
the multiplication of the dividers must be larger than 20.

@ Syntax

int _8216_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), when c1 = 0 or

c2 = 0, the pacer trigger will be stopped.

@ Return Code

ERR_NoError
ERR_BoardNoInit
ERR_InvalidTimerValue

@ Example

main()
{
intErrCode;

_8216_Initial( CARD_1, 0x220 );
/* Assume NoError when Initialize ACL-8216 */

_8216_AD_Timer( 10 , 10 );
/* set AD sampling rate to 2MHz/(10*10) */
_8216_AD_Timer( 0 , 0 );
/* stop the pacer trigger */
}

Advertising