I'm using a V3 Development board with a pic 16F887 but at full voltage the adc reads only 1021.
I've tested the program with a 16f876 & 16f877 and they both read 1023.
Anyone else having the same problem?
The meter will be measuring the analogue voltage at the input pin.
It may be the microcontroller is dragging the 5V down slightly?
What is the integer value if you disconnect variable resistor and just short the input directly to +5V?
I assume you are using an LCD or RS232 to display the ADC value?
The voltage at the input pin is 5.00V on the meter and stay the same with all three pic's but the lcd reads 1021 with the 887.
Is it possible for the config bits of the pic to cause this.
I have got a 16F883.
I will try that this morning and see what I get since they are from the same family and use same ADC files within Flowcode.
I will post results, so it can be determined if its chip or Flowcode causing the issue.
I have just tried with 16F883.
Using both FC4 and FC5 the results are the same.
I also can't get the value to exceed 1022.
Results are between 1021 and 1022.
Since simulator showed 1023 as stated in previous post, I would take an educated guess as its the chip at fault.
if your looking out for a number that's 1023, then it maybe best to use if >1020
You will be loosing 4 to 8 mV resolution.
Have you tried playing with the precharge time or the conversion speed via the ADC component properties. On an AVR you cannot get a sample at the limits unless you change the settings from the defaults. Once you do this it all works great.