User`s guide

ADC-10,12,40,42 User's Guide14
Copyright © 1995-2007 Pico Technology. All rights reserved.adc1042.en-2
4.2.8
adc10_set_interval
unsigned long adc10_set_interval
(
unsigned long us_for_block,
unsigned long ideal_no_of_samples
)
This routine specifies the time interval per sample and the channels to be used for
calls to adc10_get_values or adc10_get_times_and_values.
Arguments
us_for_block target total time in which to collect ideal_no_of samples,
in micro seconds.
ideal_no_of_samples specifies the number of samples that you intend to collect.
This number is only used for timing calculations: you can
actually collect a different number of samples when you call
adc10_get_values.
An example of a call to this routine to set for 100 readings in 10000 µs is:
actual = adc10_set_interval (10000, 100);
The routine returns the actual time to collect this number of samples. This actual time
may be greater than the target time if you specified a sampling interval that is faster
than your computer can manage. If the specified sampling rate was too fast, you have
the following choices:
If the total time is important, collect fewer than the ideal number of samples so
that the total block time is correct.
If the number of samples is important, collect the same number of samples then
allow for the fact that they took longer to collect.
4.2.9
adc10_is_streaming
short adc10_is_streaming (void)
This routine can be used to determine whether the device is capable of supporting
streaming. If so, it will return TRUE (1). A streaming device collects data
asynchronously. USB devices generally support streaming, whereas parallel port
devices do not.