I am using the AN9 ADC input on a PIC16F886 to read a DC voltage. For some reason, I don't get what I expect, so either I do something wrong or my expectation is wrong
I am sending a DC voltage of 1.000VDC into pin 25. Reference is set to 'Ref+pin', that pin is at 4.102 (a nominal 4.096 ref.). The ADC zero ref pin is at 0.25mV.
My expectation: since 10 bits = 1024 counts, and the ref is 4.096V (nom), one count = 4mV.
A 1V input should thus give 250 counts.
However, I see a consistently low value of 239/240 counts. What's wong?
Jan Didden
Linear Audio