Hi,

My guess is that you have forgotten to right justify the AD conversion, on the 877 and a 10-bit AD the highest number would be 1024. Start by checking the setup since the numbers coming out seems tooo big.

There was a post some time ago with a similar problem, search and see if you can find it.

The bug is probably not in the PIC :-)

/