User`s manual
BL4S100 User’s Manual 80
4.4.5 A/D Converter Inputs
anaInConfig
void anaInConfig(int channel, int opmode);
FUNCTION DESCRIPTION
Configures an A/D converter input channel for a given mode of operation. This function
must be called before accessing the A/D converter chip.
The channel pairs for the differential mode are listed below.
AIN0 and AIN1
AIN2 and AIN3
AIN4 and AIN5
AIN6 and AIN7
The modes of operation are as follows:
Single-ended unipolar 0–20 V
Differential bipolar ±20 V
4-20 mA operation
NOTE: When a pin in a differential pair is reconfigured as a nondifferential pin, the
remaining paired pin is also reconfigured.
PARAMETERS
channel analog input channel, 0–7 (AIN0–AIN7)
opmode selects the mode of operation for the A/D converter channel pair.
The values are as follows:
SE0_MODE — single-ended unipolar (0–20 V)
DIFF_MODE — differential bipolar (±20 V)
mAMP_MODE — 4–20 mA operation
RETURN VALUE:
0 — success.
-EINVAL — invalid parameter.
SEE ALSO
brdInit, anaInCalib, anaIn, anaInVolts, anaInmAmps, anaInDiff