Nevermind! Sorry to waste your time. It was an issue of a poor ground on my breadboard. -- Sincerely, James Burkart *925.667.7175* On Fri, Nov 22, 2019 at 4:54 PM James Burkart wrote: > Hey everyone! > > PIC18F27K40, XC8 v2.05, MPLAB 5.10, MCC v3 > > I am monitoring the battery voltage of a circuit using the ADC of the > PIC18F27K40 via a resistor voltage divider of 0.1% precision. I don't > really need that much precision, but there is virtually no cost differenc= e > between them and 1%. The positive reference of the ADC is the FVR buffer = 1 > at 4.096V, and the negative reference is VSS. It's a 10-bit ADCC set to > right alignment so I assume each bit represents 0.004V. The clock used fo= r > the ADCC is FOSC/64, making 1 TAD =3D 1us, conversion time of 11.5us, and > sampling frequency of 86.9565kHz. When I measure the voltage at the pin, > for example, I get 1.612 volts (which I assume should be 1.612/0.004 =3D = 403, > or 0x0193, but when I sample the voltage and check the value it's value I > get 0x0168, or 360, which I guess is 1.44V. > > What might I be doing wrong? > -- > Sincerely, > > James Burkart > *925.667.7175* > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .