Hi Seb,

Sebastien Lelong wrote:

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

I shouldn't be a problem to declare VCFG as VCFG0 and VCFG1 if it is a 
2-bits field.  From your text above it seems only to appear in ADCON1, 
but I can check that myself.

---

About the ANS bits: would it be useful to declare aliases for these 
bits? For example:
  var volatile bit ADC_ANS0 is ANSEL : 0
and of course ANSEL:0 could be ADCON:0 or whatever is the real ANS0 bit?
In that way the ADC library can always use the same name, without a need 
to know which is the real bit.

Regards, Rob.




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