I suspect a wiring problem since your conversion is dead straight(see ADcurve.gif) with an offset of about 0,75v. That's close to a normal voltage drop over a diode or transistor.
I suspect a wiring problem since your conversion is dead straight(see ADcurve.gif) with an offset of about 0,75v. That's close to a normal voltage drop over a diode or transistor.
Problem solved! Indeed it was wirring problem! Another question now, What do the values for Define ADC_CLOCK repesent and how are they different?
I know that you can have ADC_CLOCK 0,1,2 or 3...What does its number correspond to?
The value selects the source of the ADC conversion clock. For a detailed answer to this, look at "Selecting the ADC Conversion Clock" sub-section, in the ADC section of your chosen PICs Datasheet. Some newer PICs have a wider selection range than provided by the DEFINE, in those cases it's best to select by presetting the Registers yourself. If you are unsure what source to use, the RC option (which is an internal ADC option and nothing whatsoever to do with the PICs main Oscillator) is always a safe bet.
Bookmarks