ADin Declares.
Declare Adin_Tad c1_FOSC, c2_FOSC, c4_FOSC, c8_FOSC, c16_FOSC, c32_FOSC, c64_FOSC, or cFRC. Sets the ADC's clock source.
All compatible devices have multiple options for the clock source used by the ADC peripheral. 1_FOSC, 2_FOSC, 4_FOSC, 8_FOSC, 16_FOSC, 32_FOSC, and 64_FOSC are ratios of the external oscillator, while FRC is the device's internal RC oscillator.
Care must be used when issuing this Declare, as the wrong type of clock source may result in poor accuracy, or no conversion at all. If in doubt use FRC which will produce a slight reduction in accuracy and conversion speed, but is guaranteed to work first time, every time. FRC is the default setting if the Declare is not issued in the BASIC listing.
Declare Adin_Stime 0 to 65535 microseconds (us). Allows the internal capacitors to fully charge before a sample is taken. This may be a value from 0 to 65535 microseconds (us).
A value too small may result in a reduction of resolution. While too large a value will result in poor conversion speeds without any extra resolution being attained.
A typical value for Adin_Stime is 2 to 100. This allows adequate charge time without loosing too much conversion speed. But experimentation will produce the right value for your particular requirement. The default value if the Declare is not used in the BASIC listing is 50.