User’s Manual
47
Reads the voltage of an analog input channel by serially clocking out an 8-bit command to the A/D con-
verter. The driver has been designed for the Texas Instruments TLC2543 A/D converter used on the
BL2100 and the BL2120.
PARAMETERS
cmd
is formatted as follows.
TLC2543 commands
D7–D4
Channel 0–10
Channel 11 = (V
ref+
- V
ref-
)/2
Channel 12 = V
ref-
Channel 13 = V
ref+
Channel 14 = software powerdown
D3–D2
Output data length:
01—8 bits
00—12 bits (normally used as default)
11—16 bits (not supported by driver)
D1
Output data format
0—MSB first
1—LSB first (not supported by driver)
D0
Mode of operation
0—Unipolar (normally used as default)
1—Bipolar
len
is the output data length:
0 = 12-bit mode
1 = 8-bit mode
RETURN VALUE
A value corresponding to the voltage on the A/D converter input channel, which will be:
0–4095 for 12-bit A/D conversions
0–255 for 8-bit A/D conversions
SEE ALSO
anaIn, anaInVolts, brdInit
EXAMPLE
Look at the sample programs in
SAMPLES\BL2100\ADC
.
int anaInDriver(unsigned char cmd, char len);
Summary of Contents for Smartcat
Page 6: ...Smartcat BL2100 ...
Page 14: ...8 Smartcat BL2100 ...
Page 60: ...54 Smartcat BL2100 ...
Page 78: ...72 Smartcat BL2100 ...
Page 84: ...78 Smartcat BL2100 ...
Page 118: ...112 Smartcat BL2100 ...
Page 124: ...118 Smartcat BL2100 ...
Page 132: ...126 Smartcat BL2100 ...
Page 134: ......