
ADC-100 User's Guide14
© Copyright 2004-2007 Pico Technology Limited. All rights reserved.adc100.en
3.3.12
adc100_set_interval
PREF1 unsigned long PREF2 adc100_set_interval (
unsigned long us_for_block,
unsigned long ideal_no_of_samples,
short mode);
This routine specifies the time interval per sample and the channels to be used for
calls to adc100_get_values or adc100_get_times_and_values.
An example of a call to this routine using both channels A and B is:
adc100_set_interval (10000, 100, 2);
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.
- target total time in which to collect
ideal_no_of samples, in microseconds
- 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
adc100_get_values
0 - channel A only
1 - channel B only
2 - both channels
- specifies the number of channels to be used
Kommentare zu diesen Handbüchern