Hi Seb,

A provisional solution would be to reset the ACQT bits (to 000) for example in adc_clock.jal. If I understand the datasheet correctly this is compatible with PICs without ACQT bits and thus would give adequate results (maybe Fabian or others prove differently).
If desired we can add active control of these bits later.

Regards, Rob.



On 2011/03/22 21:46, Sebastien Lelong wrote:
Hi Rob,

Setting ACQT to 0b000 typically would go into adc_init() procedure IMO.
That said, we could also provide an option to actually set these bits
for an actual Tad delay (so not setting manual acquisition delay
anymore). I don't know what value this would add though... Maybe better
optimized and more generic ?

Cheers,
Seb

2011/3/22 Rob Hamerling <[email protected]
<mailto:[email protected]>>


    Hi Seb (and others with ADC experience),

    With respect to a current discussion in Jallib about the adc lib and
    a 18f4550 at 48 MHz:  In adc_clock.jal only the ADCON2_ADCS bits are
    initialized, the ADCON2_ACQT bits are not. I think the ACQT bits are
    not touched by any of the adc libraries.
    In the device files ADCON2 is cleared (at least when
    enable_digial_io() is called by the user program), so with a little
    bit of luck the ACQT bits will be 000. But it may be better to have
    the ACQT bits handled by the ADC libraries (which?).
    What's your (or other reader's) opinion?

    BTW I'm not sure if setting these bits (to a non zero value) is the
    real solution of Fabian's problem.

    Regards, Rob.

    --
    R. Hamerling, Netherlands --- http://www.robh.nl

    --
    You received this message because you are subscribed to the Google
    Groups "jallib" group.
    To post to this group, send email to [email protected]
    <mailto:[email protected]>.
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:jallib%[email protected]>.
    For more options, visit this group at
    http://groups.google.com/group/jallib?hl=en.




--
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org

--
You received this message because you are subscribed to the Google
Groups "jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.

--
R. Hamerling, Netherlands --- http://www.robh.nl

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to