Today I had my last exam, so now I have some time!

I took an arduino - since I couldn't find my FT232 breakout board...
(and also because I wanted to avoid software usb for now). I first
tried the basic examples for adc conversion; still the same!
Then I've sent the ADCON registers together with the measurements
(ADRESH, ADRESL) over serial after a measurement with the library.
For 2,5V I got:

High: 0111 1111
Low:  1111 0000
AD0:  0000 0000 AD Off, AD Idle, Channel 0
AD1:  0000 1110 AN0 analog, Vref = supply
AD2:  0000 0000 Left justified, 0TAD, Fosc/2

Then I tried everything manually (trew out the ADC library), and set
the registers to these same values. Still the same problem (but also
the same output, so that's 'good').
Last thing to do was changing the values of the ADCON registers, to
ones I knew were working!
So now they are:

ADCON0 = 0b_0000_0000
ADCON1 = 0b_0000_1110
ADCON2 = 0b_0001_0110

And now it works perfectly! (but still completely manual - without the
library).
The only difference is the Aquisition Time and Conversion Clock.

I don't know much about those parameters (I should within a few weeks
for a project :-))
Toon

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