As you are left justifying and you only read ADRESH, you are effectively using the ADC as an 8 bit device and your conversion should be,
You may want to change the variable Vin to an int (or word) instead of a byte as the compiler may do 8 bit arithmetic and loose bits.
If you want to use the full 10 bit then change to right justification and change your code to fetch the result to,
HTH
Mike.
Code:
Vin = sample * 5 / 255
If you want to use the full 10 bit then change to right justification and change your code to fetch the result to,
Code:
sample = ADRESH * 256 + ADRESL 'Write conversion result
HTH
Mike.