Hi guys,

About 16f690, as pointed by Carlo on jallist, the problem seems to come from
"A/D convervsion clock select bits". For, say 16f88:

  - in register ADCON0<7-6> : ADCS<1:0> => 2 bits select the clock + another
value is taken from ADCS2, from register ADCON1, in order to know if clock
is divided by 2 or not. These are 2 bits from ADONC0 + 1 bit from ADCON1.

In 16f690, these bits are handled in ADCON1<6-4>: 3 bits, only in this
register to select the clock. No need of a second ADCS2 value.

I had a look at ADC_GROUP, both 16f88 and 16f690 claim to be part of ADC_V0
group. I guess this won't help us :(


Either we can:

  - quick-fix this clock selection bits

    if defined(ADCON1_ADCS2) then
        -- do as usual
    else
        -- add "special case" for PIC like 16f690
    end if


  - still searching for a generic way handle ADC module, if there's a
generic way


I don't have strong opinion on this. I would go on the "quick fix" way, but
this will add some more noise to the lib. The "generic" way is still full of
haze, as far as I'm concerned.

What's your point ?


Cheers,
Seb



>
> > I has a look at MPCC18 compiler and header files, but I wonder how it can
> > help us for non-18F PIC.
>
> I think we can do something similar (handle PICs in the same ADC-group
> the same).
>
> > I also searched, naively, for any adc.c or any
> > sources to understand how they did implement ADC feature, but then
> > remembered this is not an open source project... just a bad (good ?)
> habit
> > :)
> >
> > This ADC lib is currently too much fuzzy for me. I need some time to dig
> > into it. I was also thinking about diving into our servo controller
> > project... This ADC lib will definitely be a background job.
>
>  From what I have understood by looking in the current ADC lib and by
> reading the ADC chapters of a few datasheets it will be a challenge to
> build a general purpose ADC library. Users have to be patient. Maybe we
> should invite people (in Jallist) to help. So far there were not many
> new contributors.
>
> Regards, Rob.
>
>
> PS: I saw the buildbot failure! Stupid mistake of mine, I'll replace the
> device files ASAP!
>
>
>
> --
> Rob Hamerling, Vianen, NL (http://www.robh.nl/)
>
> >
>


-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to