Hi Rob,
I'm obviously not a big fan of manual maintenance, Knowing max value can be
interesting in other contexts, though, if so, I'm wondering why this
question didn't pop up ealier. I'm wondering if it's worth it.
To sum up:
1. enrich devicespecific.json when PICs have 12 bits only resolution or
10/12bits selectable, or 16bits
2. enrich device file with this information (constant storing #bits +
shortcut to bit in config register to know if running 10 or 12 bits
2. add a adc_get_max_value() in adc.jal. This function:
a. check if ADRESH exists. No means 8bits (we assume you can't even
compile something when PIC has no ADC)
b. If yes, we need to know if it's running with 10 or 12 or 16. If
selectable, check config bits, else just read constant from device file.
Rob, how would you go with 1 ? Extract something from product selection
tools and then enrich ? I can do it if you like.
But... is it really worth it ? I could also ask lib users to specify tthis
max value...
Cheers
Seb
On 2 March 2013 19:02, Rob Hamerling <[email protected]> wrote:
>
> hi Kiste, Seb,
>
>
> On 2-03-13 14:37, Oliver Seitz wrote:
>
>>
>> That leaves only to specify something with PICs with 8 and 12 bits.
>> Is doable....
>>
>> ThePIC18F47J13 family for example can be configured for 10 or 12 bits,
>> so the fuse settings would have to be considered in certain cases, too.
>>
>
> Indeed. When a device can be configured for different ADC resolutions the
> library should determine the actual value.
> As far as I've seen only the 18f??j13 and 18f??j53 have this possiblity.
> The default is 10-bits, but when the ADCSEL bit in CONFIG3H is cleared (0)
> it is 12-bits. So the library should read configuration bits! But
> configuration bits have no name, and the library cannot know which
> configuration bit means what (without knowing the device).
>
> Dilemma: should the device file specify 10 or 12 in this case?
>
> So Seb, what's your suggestion?
>
>
> 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
> jallib+unsubscribe@**googlegroups.com<jallib%[email protected]>
> .
> To post to this group, send email to [email protected].
> Visit this group at
> http://groups.google.com/**group/jallib?hl=en<http://groups.google.com/group/jallib?hl=en>
> .
> For more options, visit
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>
>
>
--
Sébastien Lelong
--
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.