Hello, my name is Ron and I'm new to the forum, but not new to PICs and or PBP.

I'm currently using PBP 2.50c, bought my first copy of PBP back in '99.

My current project is a constant current dummy load. I'm having some problems with the ADCin command and wondering if someone here could help.

I'm ussing a PIC16F873A running at 20 Mhz, the Vdd is 5.013 Vdc.

Trying to read a voltage between 0 and 5 Vdc at AN0.

I would expect to see an ADC count of 0 at 0.00 Vdc, 512 at 2.500 Vdc, and 1023 at 5.000 Vdc.

Here is the problem.... the ADC count is 0 from 0.000 to 0.063 Vdc, and at 2.500 Vdc it display 505, and 1023 at 5.00 Vdc.

Any takers on what I'm doing wrong?

Attached is my code...

Thanks,
Ron

DummyLoad2.bas