ADC-100 User's Guide
10
© Copyright 2004-2007 Pico Technology Limited. All rights reserved.
adc100.en
3.3.4
adc100_set_unit
PREF1 short PREF2 adc100_set_unit (
short port);
This routine is used to select the unit to use for subsequent operations. It is only
necessary to use this function if you wish to have more than one unit open at the
same time.
Arguments:
Returns:
3.3.5
adc100_set_range
PREF 1 void PREF2 adc100_set_range (
short mv_a,
short mv_b);
This routine sets the range for both channels. The two parameters are two index
entries in a lookup table (below), representing the input range for channels A and B.
The ADC-100 is bipolar, so 20,000 means that the input voltage range is 20 V.
Note: For the ADC-101, the actual voltage range is always five times the voltage
range specified. Thus, if
mv_a
is set to 20000, the actual voltage range is 100,000
mV, or 100V.
The values in the following table will give the expected result: intermediate values will
be rounded to the nearest above.
Location in index
Voltage range (ADC-100)
Voltage range (ADC-101)
20000
V
V
10000
V
V
5000
V
V
2000
V
V
1000
V
V
500
mV
mV
200
mV
mV
100
mV
mV
50
mV
mV
If you are not using a channel, we recommend setting the range to 20 V. This
prevents noise from the unconnected channel interfering with the channel that you
are using.
Arguments:
mv_a
mv_b
Returns:
none