Summary of PC Based Digital Voltmeter Using PIC 16F877A
This project is a PC-interfaced 0–5 V digital voltmeter using the PIC16F877A 10-bit ADC, providing ~4.8828 mV resolution. It reads analog on AN0, configures ADCON0/ADCON1 for channel, result format, and reference selection, starts conversions via ADCON0, and sends measured voltages over UART to a computer. A MAX232 serial level-shifter is required for RS-232 interfacing (not shown in the circuit). The design typically uses high-level language ADC routines (e.g., adc_read) to obtain conversion results.
Parts used in the PC Based Digital Voltmeter Using PIC 16F877A:
- PIC16F877A microcontroller
- Analog input source (0–5 V)
- MAX232 level shifter (for RS-232 interface to PC)
- Serial cable (RS-232) to computer
- Power supply (suitable for PIC16F877A)
- Decoupling capacitors
- Clock oscillator/crystal for PIC
- PCB or breadboard and wiring
This is a simple voltmeter which measures 0-5V at a precision of 4.8 mV. This is a simple design using inbuilt ADC of PIC 16F877A. PIC 16F877A have 8 channel 10bit ADC. This is a computer interfaced project. Measured voltage is output in serial interface software in computer. There is a serial interface circuit (MAX232) is necessary for interfacing with computer, which is not included in the circuit. Please check PIC Serial Communication Tutorial (UART) for the circuit and more details.

The ADCON0
As we can see this registers are 8 bit registers where.
– bit6 and bit 7 are used to set the frequency of the conversions.
– bits 3, 4 and 5 are used to select the pins of the microcontroller enabled to the adc conversions.
– bit 2 represents the status of the conversion procedure.
– bit 0 starts the conversion.

This circuit uses AN0 channel of ADC. The voltage conversion is employed in a logic, 16F877A have 10 bit ADC. That is, it can have 1024 levels. Reference voltage is fixed at
0 – 5 V Analog I/P is mapped to one of the 1024 levels (0-1023 Digital Count)
Resolution = 5/(1024) (as it is 10 bit ADC)
= 5/1024
= 4.8828 mV It means that for a change in 4.8828mV, the binary output changes by 1.
For more detail: PC Based Digital Voltmeter Using PIC 16F877A
- What voltage range does this voltmeter measure?
It measures 0–5 V analog inputs as stated in the article. - What resolution does the voltmeter provide?
The resolution is 5/1024 = 4.8828 mV per ADC step. - Which ADC channel is used in the circuit?
The circuit uses the AN0 channel of the PIC16F877A ADC. - Which PIC microcontroller is used?
The project uses the PIC16F877A microcontroller. - Do I need a MAX232 for computer interfacing?
Yes, a MAX232 serial interface circuit is necessary for interfacing with a computer and is not included in the provided circuit. - How many bits is the ADC in the PIC16F877A?
The ADC is 10 bit, providing 1024 discrete levels (0–1023 counts). - Which registers control the ADC in PIC16F877A?
The ADC is controlled by ADCON0 and ADCON1 registers as described in the article. - What does ADCON0 bit 0 do?
ADCON0 bit 0 starts the conversion according to the article. - What does ADCON1 configure?
ADCON1 sets result format, reference voltage selection, and port configuration control bits. - Is the ADC result handled automatically in high level languages?
Yes, high level language routines like adc_read typically store results in a variable so the programmer does not manage result registers directly.