This project describes how to make a digital voltmeter using a PIC microcontroller. A HD44780 based character LCD is used to display the measured voltage. The PIC microconotroller used in this project is PIC16F688 that has 12 I/O pins out of which 8 can serve as analog input channels for the in-built 10-bit ADC. The voltage to be measured is fed to one of the 8 analog channels. The reference voltage for AD conversion is chosen to be the supply voltage Vdd (+5 V). A resistor divider network is used at the input end to map the range of input voltage to the ADC input voltage range (0-5 V). The technique is demonstrated for input voltage ranging from 0-20 V, but it can be extended further with proper selection of resistors and doing the math described below.
PIC16F688 Digital Voltmeter - [Link]