User`s guide

ADC-10,12,40,42 User's Guide12
Copyright © 1995-2007 Pico Technology. All rights reserved.adc1042.en-2
This routine closes the ADC-10 driver.
Arguments
port The number of the parallel or USB port
4.2.4
adc10_set_unit
short adc10_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.
4.2.5
adc10_get_value
short adc10_get_value (void)
This routine reads the current value of one channel. Depending on your computer, it
will take approx 100 µs to take one reading.
See also adc10_get_value_and_time, which reports the exact time at which the
reading was taken.
4.2.6
adc10_get_value_and_time
void adc10_get_value_and_time
(
unsigned long * sample_time,
short * value
)
This routine reads the current value from the currently selected ADC-10, and the time
in microticks at which the reading was taken. Depending on your computer, it will
take approx 100 µs to take one reading.
sample_time is the time in microticks for the reading. There are 2
32
microticks per
hour or 1,193,046 per second. The sample time therefore wraps around once an hour.
Value is scaled in ADC counts.