Hi guys,

There's a unittest related to 18f2553:
http://code.google.com/p/jallib/source/browse/trunk/test/unittest/18f2x5X_adc.jalt
(ok, I know, this is not real life...)

Considering our case (2 ADC channels, no Vref), ADCON1 should be set to
0b_0000_1101 (ie. 0x0D, ie. 13). This is what I have in metadata used to
generate ADC libs (tools/adc/adc_pcfg.py). And this is what's successfully
checked in corresponding unittest (though ADCON1 is initliased to 0 to
actually test setting of some specific bits during unittests). See
attachment.

As far I can tell, it seems ok to me. What (correct) ADCON1 value was
printed during your tests ?

Also note ADC libs doesn't handle 12-bits conversion. I don't think this is
a problem, as it's already been used in other 12-bit ADC enabled targets
(IIRC).


Cheers,
Seb

2011/2/1 Joep Suijs <[email protected]>

> Hi Seb,
>
> > I thought last changes fixed this issue!
> I'm not sure what fix for what issue. Iirc it was a compiler issue,
> lookup of constants used for configuration. First time I ran into this
> (last autumn) it was persistent. Last week, I was intermittent;
> printing the configuration register fixed it and after adding some
> unrelated code, printing was not required any more. The corresponding
> sample worked okay.
>
> Joep
>
> --
> 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]<jallib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jallib?hl=en.
>
>

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

Attachment: 18f2553_test_adc.jal
Description: Binary data

Reply via email to