Searching \ for '[PIC]: Odd dual-ADC behaviour...' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=adc
Search entire site for: 'Odd dual-ADC behaviour...'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Odd dual-ADC behaviour...'
2002\03\03@124918 by Drew Vassallo

picon face
> >Any clues?
>
>Lack of acquisition time for the A/D converter is the problem; your code
>isn't providing ANY time at all for an input to be acquired once it's
>selected.

This is true, but you suggest 30 to 50 us delay.  This is excessive, in my
opinion.  The datasheets give a good example for calculating a 13us
acquisition time; I usually go up to 20us just in case.  20us at 4MHz seems
just fine.

So, after you select your channel in ADCON0, just make sure you wait ~20us
before you actually set the GO bit.

--Andrew

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\03@131905 by Dave Dilatush

picon face
Drew Vassallo wrote...

>This is true, but you suggest 30 to 50 us delay.  This is excessive, in my
>opinion.  The datasheets give a good example for calculating a 13us
>acquisition time; I usually go up to 20us just in case.  20us at 4MHz seems
>just fine.

Whether it's "excessive" or not depends entirely on the input impedance
feeding the ADC, and on the specs for the specific PIC being used.

According to the datasheet for the PIC16F872, which is what the OP is
actually using, the minimum acquisition time for 1/2 LSB accuracy with a
10K ohm input impedance is 19.7 microseconds.

If the OP's input impedance is higher, he'll need to provide more
acquisition time; if it's lower, he might be able to get away with
slightly less.

You may see my suggestion of 30-50 microseconds as "excessive"; I see it
as conservative.

DD

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...