Hi, I also had a look at VCFG bits. These bits are used to configured Vref+/Vref-, or just Vref when only one available. These can only be found when Vref config is not handled in PCFG bits. That is, when ADC pins are independent from each other (you can precisely define which pin will be analog).
Currently, VCFG bits can be found as: ADCON0_VCFG ADCON1_VCFG ADCON1_VCFG0 ADCON1_VCFG1 The "problem" is sometime VCFG corresponds to only one bit (there's only one VRef), and sometime these are defined as "bit*2". I think it would be better to have VCFG0 and VCFG1 instead of a "bit*2 VCFG". See for instance: - datasheet 41302B : one VCFG bit, one VRef - datasheet 41303D : bit*2 VCFG bits, two VRef In 41303D, VCFG bits are referred as VCFG0 and VCFG1 bits. For now, in the library itself, if I'm able to determine if it's a single bit or bit*2 (using count ?), I can't deal with this anyway. Cheers, Seb Hi Rob, > > There are even ADCON0_ANSx bits... (see 10f220, 10f222, 12f510, 16f506, > 16f526). The naming convention where ANS is prefixed with ANSEL0 or ANSEL1 > can only be found in 2 PICs: 16f785 and its little brother 16hv785. > > I need more time to have a better overview of these ANSx/ANSELx bits. Maybe > there's a good reason for this segregation. Like PCFG vs. PCFGx bits, which > appears to know if ADC pins are configured through combination (PCFG: pins > are dependent from each other, there's always a table in datasheets showing > these) or if ADC pins are configured independently (relation 1..1 between > PCFGx <=> ANx). > > Cheers, > Seb > > > >> Hi Seb, >> >> Sebastien Lelong wrote: >> >> > I may need your help about normalizing ANS bits... In some device files, >> you >> > can find ANS bits, like ANSEL_ASN2, in some other device files, you can >> find >> > ANSEL bits, like ANSEL_ANSEL2. Ex: for PIC 18lf13k22 (DS ref. 41365A), >> > device file defines ANSEL_ANSEL0, ..., ANSEL_ANSEL7, but in DS they are >> > referenced as ANS0, ..., ANS7 (see table page 213). >> > >> > Is it possible to normalize them either to ANSEL_ANSx or ANSEL_ANSELx ? >> >> I have done some reading.... It seems ANSEL_ANSx will be the better >> naming convention, and there are a number of issues to be solved....(as >> expected!). Some that came to mind: >> >> Should ANSEL0 and ANSEL1 (e.g. of 16HV785) be renamed to ANSEL and >> ANSELH (and of course the bits accordingly ANSEL_ANS0 etc)? >> >> What about the bits in ANSELH? Should these be called >> ANSEL_ANS8..ANSEL_ANS11 (as the bitnames are called in the DS of the >> 18lf13k20). >> >> How to name the bits of ANSELA/B/D/E of the 16f72x? >> >> Regards, Rob. >> >> >> >> >> > > > -- > Sébastien Lelong > http://www.sirloon.net > http://sirbot.org > -- 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 -~----------~----~----~----~------~----~------~--~---
