Seb,

Sebastien Lelong wrote:
> I got something that could be considered as a potential yet hypothetical
> good news. From a first analysis, it seems the rule "ANSx corresponds to
> analog pin x" is somewhat honored in most cases. Few PICs don't honor them,
> and most of them as from 16f72X family.
> 
> This raises one proposal and one question:
> 
>   - another file could be created for this specific PICs, and would describe
> the relation between ANS and analog pins. From this file, we have two
> options:
>      1. either the relation between ANS bits and analog pins is directly put
> into device files. This means dev2jal script have to take this file as input
> so it knows what are the exceptions and produce correct JANSEL_ANSx
> declaration accordingly.
>      2. this exception is dealt with directly into ADC lib generator. I
> think this option makes more sens.

When the exception is limited to a few PICs then option 2 makes most 
sense to me. But on the other hand when it makes the ADC library 
considerably simpler, it's worth to consider changing the device files. 
I think you (Seb) are the one to come with the arguments pro/contra.


> 
> Here are the guilty PICs:
> 
> my scripts recognized them from all device files and said:
> """
> PIC 12f609.jal has more ANS bits (4) than total ADC channel 0
> PIC 12hv609.jal has more ANS bits (4) than total ADC channel 0
> PIC 16f610.jal has more ANS bits (6) than total ADC channel 0
> PIC 16f722.jal has more ANS bits (12) than total ADC channel 6
> PIC 16f723.jal has more ANS bits (12) than total ADC channel 6
> PIC 16f724.jal has more ANS bits (23) than total ADC channel 6
> PIC 16f726.jal has more ANS bits (12) than total ADC channel 6
> PIC 16f727.jal has more ANS bits (23) than total ADC channel 6
> PIC 16hv610.jal has more ANS bits (6) than total ADC channel 0
> PIC 16lf722.jal has more ANS bits (12) than total ADC channel 6
> PIC 16lf723.jal has more ANS bits (12) than total ADC channel 6
> PIC 16lf724.jal has more ANS bits (23) than total ADC channel 6
> PIC 16lf726.jal has more ANS bits (12) than total ADC channel 6
> PIC 16lf727.jal has more ANS bits (23) than total ADC channel 6
> """
> 
> Note: I also wonder why 12f609, for instance, has ANS bits while no ADC
> module at all...

The presence of a Comparator module may explain this!
A recent change in the device files says:
  - ANSEL of 12F609, 12HV609, 16F610, and 16HV610 rehabilitated.
    These chips have no ADC, but do have an analog comparator!

> Ooops: I think my script qualitatively identified the guilty PICs, but the
> quantitative part is wrong. For instance, 16f722 actually 11 ADC channels,
> while my last device files says 6. Since you guys have "decided" to PM these
> device files and not sharing on the group, I can't update these data...
> Please guys, share if you want everybody to help !

I don't want to commit a complete set of new device files with every 
change, especially when changes are still in preparation for a proposal, 
experimental or not (very well) tested. But when needed I can commit any 
moment (like now in a few minutes).

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

Reply via email to