From the schematic above the input voltage divided by R1 and R2 (voltage divider).VR1 parallel with R2 use to adjust appropriate display full scale voltage.The divided input voltage will connected to AN3(RA4) which set as analog input.
RA0,RA1 and RA2 set as digital output to turn on/off the digits in scan dispay routine.
RA3 not use in this version and it was input only
RC0-RC5 and RA5 use to drives the segment of dispay(7-segment decoded by software)
This project I use CCS C compiler to programming.The main routine continually read the input voltage on RA3 and convert to 7-segment code while TIMER1 set to timer for interrupt every 5mS for scan all digit about 66Hz(only one digit turn on at every 5mS).In convert digital value to voltage routine we must scale the value with the full scale display in this project I want full scale display at 30V so the input voltage must scaled with 30 and display resolution is 29mV or 30/1023. source code and shematic available here.