Hi Seb,
On 2011/02/04 10:05, Sebastien Lelong wrote:
IIRC I did have a warning but I didn't specify a ADC_MIN_TAD value.
Something I should dig when I get a chance.
Anyway, what I'm suggesting is to take care ADC_MIN_TAD value within
adc_clock.jal. When I write first version, I remembered 18F had Tad(min)
= 0.8盜 and 16F had Tad(min) = 1.6盜. Since 16F rules had less
restrictive rules, I kept these. But we could adjust according to the
family type (as well as for Tad(max)):
-- adc_clock.jal
if defined(ADC_MIN_TAD) == false then
if target_cpu = PIC_16 then -- 18F family
const ADC_MIN_TAD = 8 -- 0.8 usec minimum
else -- non-18F
const ADC_MIN_TAD = 16 -- 1.6 usec minimum
end if
end if
if defined(ADC_MAX_TAD) == false then
if target_cpu = PIC_16 then -- 18F family
const ADC_MAX_TAD = 250 -- 25 usec minimum
else -- non-18F
const ADC_MAX_TAD = 60 -- 6 usec maximum
end if
end if
Would that make sense to you ?
Can we be sure that these two sets of defaults are acceptable for all
PICs? Did you scan all datasheets for Tad limits?
Well, anyway this is better than we have at the moment and I'll update
adc_clock.jal. When we find safer limits we can always update the
library! (It is always nice to have room for improvements!)
Regards, Rob.
PS: if ... == ... (double '=' with comparisons)
--
R. Hamerling, Netherlands --- 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.