Searching \ for '[PIC] A/D TAD on 18F23k22' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.org/techref/microchip/ios.htm?key=a%2Fd
Search entire site for: 'A/D TAD on 18F23k22'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] A/D TAD on 18F23k22'
2012\05\13@101628 by Neil

flavicon
face
Hi all,

I'm tinkering with an 18F23K22 and the A/D has changed a bit from the 16F devices I've used previously.  This A/D can now automatically wait for the holding capacitor to charge, rather than manually waiting the required charge time as before.  But I'm confused how to set this.

I'm using this datasheet -- http://ww1.microchip.com/downloads/en/DeviceDoc/41412E.pdf

The second paragraph of 17.1.4 explains that the acquisition time will be done automatically with this newer A/D, and says it can be set anywhere from 2 to 20 Tad.  But 17.1.5 explains that a full 10-bit conversion required 11 Tad.  So why is Tad configurable from 2 to 20?  IE: what would be by reasoning for setting it anything other than say 12Tad?

In my specific example, I'm running at 16Mhz, so from Table 17-1 I'll use Fosc/16 or Fosc/32, giving me 1.0us or 2.0us Tad.  But then I set Tacq to 12 Tad again, right?

Only reason I can see for the Tad adjustability is that it allows for source impedances that are higher or lower than the ideal range... ???

Cheers,
-Neil.

2012\05\13@113004 by Jan-Erik Soderholm

face picon face


Neil wrote 2012-05-13 16:16:
> Hi all,
>
> I'm tinkering with an 18F23K22 and the A/D has changed a bit from the
> 16F devices I've used previously.  This A/D can now automatically wait
> for the holding capacitor to charge, rather than manually waiting the
> required charge time as before.  But I'm confused how to set this.
>
> I'm using this datasheet --
> http://ww1.microchip.com/downloads/en/DeviceDoc/41412E.pdf
>
> The second paragraph of 17.1.4 explains that the acquisition time will
> be done automatically with this newer A/D, and says it can be set
> anywhere from 2 to 20 Tad.  But 17.1.5 explains that a full 10-bit
> conversion required 11 Tad.  So why is Tad configurable from 2 to 20?

If you need the higher speed and can live with the slightly lesser
precision, I guess.

And with a lower source imp then the specified 5, 10 or 20 kohm (or
whatever it is on these devices), it might be OK with a shorter
Tacq anyway.

The main point is that you do not (efter configuring) have to time
this Tacq in your code at each conversion.




{Quote hidden}

2012\05\13@120715 by Philippe Paternotte

flavicon
face
Hi Neil, Jan-Erik.

I think that 11 Tad is for conversion only, the acquisition time is a delay
*before* conversion...
 
Best regards,
 
Philippe Paternotte
 
{Quote hidden}

2012\05\13@202136 by Neil

flavicon
face
You are correct sir.  I completely forgot that, though I used it extensively with the 16F's.  So after further digging, the correct answer is apparently this...
(a)  Equation 17.1 (in section 17.3) shows how to calculate Tacq, taking figure 17-5 (analog input model) into account.
(b)  Table 17-1 shows the Tad time for given processor-clock frequencies and valid ADC-clock frequencies.
(c)  Divide Tacq in (a) by Tad in (b) to get the number of Tad cycles required to get Tacq.  Set that in ADCON2.

Cheers,
-Neil.



On 5/13/2012 12:07 PM, Philippe Paternotte wrote:
> Hi Neil, Jan-Erik.
>
> I think that 11 Tad is for conversion only, the acquisition time is a delay
> *before* conversion...
>  
> Best regards,
>  
> Philippe Paternotte
>
>

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