Minimum Tad is 1.6uS.
If you're using a 20MHz osc, then you'll want to change the A/D conversion
clock setting. Change DEFINE ADC_CLOCK 1 to DEFINE ADC_CLOCK 2.
My example uses a 4MHz osc, so DEFINE ADC_CLOCK 1 works. This selects
8Tosc which is fine up to 5MHz. 8/5MHz = 1.6uS which is right at the cut
off point of 1.6uS min Tad.
Above 5MHz you want 32Tosc. Anything below this, and your A/D clock is
too fast. For example: 8/20MHz = 400nS = 4 times too fast for min Tad.
Also make sure you're never applying > Vref to any A/D input. If you have
+Vref set to 2.55V, you should never exceed 2.55V input on any A/D pin.
Bookmarks