The circuit is straight forward. The 10k LIN variable resistor is at the ends connected to the + and - so that the PIC input can cover the full range. This because the AD routine can only convert a voltage. So whatever you want to measure the resistance of it has to be connected in such a way that it acts as a voltage divider.
Since it took a lot of trouble to turn multi IO ports into digital inputs I assumed that making them analog would be rather easy. Well almost, it took a lot of peeking at other people's sources (especially Stef's and Wouter's) before I got it right. First of all the analog to digital converter needs settings.
-- AD converter settings
const PIC_ADC_Nchan = 5
const PIC_ADC_NVref = 0
const PIC_ADC_Rsource = 20_000
const PIC_ADC_high_resolution = false
I simply copied these from other sources. The number of channels is the number of pins from the AD convertor on the A port that are actually going to be used (I agree that one would have been enough...). Vref stands for an external reference voltage, which we're not using. The Rsource is the maximum resistance of the source. Since I use a 10k LIN variable resistor the value of 20.000 should be more than enough. Then certain variables must be declared. The addresses can be found in the data sheet for the 16F877, but also in libraries. Libraries are JAL code also, so you can search the library files that you have for the 16F877 quite easily.
I wrote a small program in Visual Basic which displays the measurements it a time graph. The operation is very simple, just turn it on. The little scroll bar controls the horizontal speed in a range from 1 pixel per measurement (or per interrupt call rather) to 100 pixels.
http://members.home.nl/b.vandam/lonely/pagina7.html