The 16F877 has a 10 Bit ADC (decimal 1024 possible values, 0-1023)
Your Range is 2.8 Volts (4.8-2)
The max resolution you can achieve with this range is about 3 mV (2,8V / 1024 = 2,73mV)
I have not played with different Vref's yet,
but anyway you will need a well tuned and temperature compensated source for Vref
to make your ADC conversion result accurate.
rgds
Ralph
Bookmarks