User`s guide
42 • C/C++ Library for DOS
5.9 _8111_AD_Set_Gain
@ Description
This function is used to set the A/D analog input range by means of
writing data to the A/D range control register. The initial value of
gain is “1’ which is set by the ACL-8111 harware. The relationship
between gain and input voltage ranges is specified by following
tables:
The initial value of gain is '1‘ and input type is bipolar, which are pre-
set by the ACL-8111 hardware. The relationship between analog
input voltage range, gain and input mode are specified by following
tables:
Input Range (V)
Gain Gain Code
±5 V X 1 AD_GAIN_1
±2.5 V X 2 AD_GAIN_2
±1.25 V X 4 AD_GAIN_4
±0.625 V X 8 AD_GAIN_8
±0.3125V X 16 AD_GAIN_16
@ Syntax
int _8111_AD_Set_Gain( int ad_range )
@ Argument:
ad_range: the programmable range of A/D conversion,
please refer to above tabbs for the possible
values .
@ Return Code:
ERR_NoError
ERR_BoardNoInit
ERR_AD_InvalidRange
@ Example:
#include “aclerr.h”
#include “8111.h”
main()
{
_8111_Initial( CARD_1, 0x220 );
/* Assume NoError when Initialize ACL-8111
*/