Hi Seb,

On  2-03-13 12:55, Sebastien Lelong wrote:

    Currently there is no such constant and I don't see a possibility to
    derive such a constant from the MPLAB .dev files. So we would have
    to add it 'manually' (for example via the file devicespecific.json).

I could segment low/high resolution, checking if ADRESH exists. Still
I'd need to segment 10-bits/12-bits high resolution...
I'll give some thoughts about this, devicespecific.json, etc...

It seems to me that for a library the most simple (and maybe the safest) way to obtain the maximum ADC resolution of a device is to specify it in the device file. Adding it to devicespecific.json (and from there into the device files) will not be too difficult. The Product Selection Tool at Microchip allows to select on number of ADC bits. A quick check shows that most of the PICs have 10 bits resolution (which will become the default), several have no ADC at all, 2 have 16 bits. That leaves only to specify something with PICs with 8 and 12 bits. Is doable....

I might be useful for programs using the current ADC libraries too!

Regards, Rob.



--
R. Hamerling, Netherlands --- http://www.robh.nl

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to