Hi Rob,

2010/11/3 Rob Hamerling <[email protected]>

>
> Hi Seb,
>
> Triggered by the issue Andre Schaap raised (per msg in Jallist) I've been
> looking in the device files. All these newer PICs of the 12/16F18/19xx
> group, but also e.g. 16f720/1, have their ADCS bits in ADCON1 enumerated.
> This will be fixed with the next version of the device files and declared as
> bit*3 variable in stead.
>

I didn't find enough time to dig this, but it seems, if you fix this in
devicefiles, that I don't need to update ADC libs, right ?


>
> I've also looked in the ADC library, in particular in adc_clock.jal  and
> found that it has a somewhat complicated construction for situations where
> the ADCS bits are split of ADCON0 and ADCON1.
>

This is also highly commented, with copy/paster command line illustrating mu
thoughts by the time I wrote  this ;)


> This applies to only a few PICs (I think the list below is complete), and
> this library might be simplified when the device file would contain a
> pseudo-variable which masks the split for the library so that all PICs can
> be handled similarly. In fact we did the same to mask the split of
> ADCON0_CHS bits for the 16f7x7 family. But I'm not 100% sure if this would
> make adc_clock.jal really better (simpler, better maintainable). Could you
> check please?
>

I can remember we've already talked about normalizing these ADCS bits in
device files, when I wrote new ADC libs. That's about a treshold when moving
this kind of information in device files instead of ADC libs. I don't know
if it'll be simpler, better, etc... Clearly the code will be simpler in ADC
libs, but just more complex in your device file generation script... What
will we gain in the end ? This code is just about conditional compilation, I
guess you won't improve performances and memory size.

Do you have the same analysis ?


Cheers,
Seb

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