Sebastien Lelong wrote:
> 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 :(
Indeed the current group classification (for the baseline and midrange)
is good enough for its current use: generate the proper statements for
enable_digital_io(), but apparently it is too global for the type of
differences above. Refinement of the classification (defining
subgroups) or another type of classification might be an option.
>
> 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
The timing may not be the only issue. I have also seen differences in
channel selection. Note: the way the channel selection bits in ADCON0
are set must be improved because different PICs have not only different
number of channels, but also the CHS bits may have a different position
in Adcon0. We should possibly do a thorough research on differences.
Since I've done some research on ADC registers in the past for the
device file generation, I'll see if I can refine one of my scripts to
obtain an overview of differences.
> 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 ?
Preferrably a single person must take the lead about ADC lib
development. Since most of us are busy with one or another aspect of
Jallib, and ADC seems not to have a high priority with one of us, we
must find a new person to take care of ADC. Or the priorities must be
shuffled (but that may have a bad influence on motivation!).
Regards, Rob.
--
Rob Hamerling, Vianen, NL (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
-~----------~----~----~----~------~----~------~--~---