Digital voltmeters have been designed and developed in various types and styles. Traditional digital voltmeters each have their own characteristics; they are suitable for manual measurements in the field, but cannot perform remote measurements or further analysis and processing of the measurement data. However, PC-based digital voltmeters can both transmit measurement data and process it using a PC. Therefore, this type of digital voltmeter has unparalleled advantages over traditional digital voltmeters in both functionality and practical application, making its development and application promising. Overall Design of the New Digital Voltmeter This new digital voltmeter measures DC voltage within a range of -5 to +5V. The overall circuitry includes: a minimized microcontroller design for data acquisition, a microcontroller-PC interface circuit, a microcontroller clock circuit, and a reset circuit. The lower-level device uses an AT89S51 chip, and the A/D converter uses an AD678 chip. It communicates with the PC via an RS232 serial port to transmit the measured DC voltage data. The overall system circuit is shown in Figure 1. Data Acquisition Circuit Principle In the design of the microcontroller data acquisition circuit, the circuit design was minimized, meaning no additional logic devices were used for the interface circuit, enabling the microcontroller to operate the AD678 conversion chip. The AD678 is a high-end, multi-functional 12-bit ADC. Because it internally includes a sample-and-hold circuit, a high-precision reference power supply, an internal clock, and a tri-state buffered data output, only a few external components are needed to form a complete data acquisition system, and a single A/D conversion takes only 5ms. (Source: www.tede.cn) In circuit applications, the AD678 operates synchronously, and the 12-bit digital output uses an 8-bit operation mode. That is, the 12-bit digital value is read twice: first the high 8 bits, then the low 4 bits. According to the timing relationship, when the chip select /CS=0, the conversion terminal /SC changes from high to low once, initiating one A/D conversion. Then, the conversion end terminal /EOC is checked to see if the conversion has ended. If it has ended, the output enable /OE goes low, and the output is valid. Reading a 12-bit digital value requires controlling the high-byte valid input (HBE), reading the high byte first, then the low byte. This is the general A/D operation; adjustments can be made in actual development applications. Figure 1 shows the circuit diagram of the digital voltmeter. Since the circuit uses the AD678's bipolar input method, the input voltage range is -5 to +5V. The measured voltage Vx can be calculated using the formula Vx = 10 (V) / 4096 * Dx. In the formula, Dx is the 12-bit digital value after the DC voltage is converted. The RS232 interface circuit design uses the Max232 chip for the interface between the AT89S51 and the PC. The Max232 is a chip from Texas Instruments (TI) compatible with the RS232 standard. This device includes two drivers, two receivers, and one voltage generator circuit providing TIA/EIA-232-F levels. The Max232 chip performs level conversion, matching the microcontroller's TTL level with the PC's RS232 level. The RS232 serial communication interface uses a 9-pin DB9 serial port. Serial data transmission only requires a receive pin and a transmit pin: the receive and transmit pins of the same serial port can be directly connected with a wire; two serial ports can be connected together, or one serial port can be connected to multiple serial ports. In the experiment, timer T1 is used as a baud rate generator, and its initial count value X is calculated using the following formula: Baud rate = * (T1 overflow rate) = * The serial communication baud rate is set to 1200b/s, and SMOD=1, fosc=6MHz, resulting in an initial count value X=0f3H. This is then loaded into TL1 and TH1 in the programming. For ease of observation, an LED is used to indicate when the microcontroller has a port output during each voltage measurement and data acquisition. Software Programming The software program mainly includes: a lower-level data acquisition program, a higher-level visual interface program, and a microcontroller-PC serial communication program. The microcontroller is programmed using C51 language, and the higher-level operation display interface is visualized using VC++6.0. During serial communication debugging, the "Serial Port Debugging Assistant" tool is effectively utilized to improve the efficiency of the entire system. Microcontroller Programming The main program flow for data acquisition and communication of the lower-level microcontroller is shown in Figure 2, the interrupt subroutine in Figure 3, and the acquisition subroutine in Figure 4. Microcontroller programming simulation debugging utilizes the WAVE2000 emulator; this system has an integrated ISP simulation debugging environment. Figure 2: Microcontroller Acquisition and Communication Main Program. In the acquisition program, the microcontroller programming operations must fully comply with the timing specifications of AD678. Continuous debugging is required during actual development. Finally, the .bin file generated after successful lower-level machine debugging is burned into the Flash unit of the AT89S51. Figure 3: Interrupt Service Subroutine. Figure 4: Acquisition Subroutine . Human-Machine Interface Programming Open VC++ 6.0 and create a dialog-based MFC application. Serial communication is implemented using the MSComm control. Other operations are not detailed here; the goal is to program a user-friendly human-machine interface. The operation interface of the digital DC voltmeter is shown in Figure 5. Running a Windows program implemented in VC++ 6.0, the entire prototype's functionality was achieved. Functional Results Based on the working principle and implementation plan described above, the entire prototype's functionality was successfully implemented in practice, and all indicators met the pre-design requirements. The circuit operated stably, with LED indicators appearing for each measurement, and the visual interface displayed normally. Figure 5 shows the human-machine interface of the digital voltmeter. The AD678 has a 12-bit conversion accuracy and a resolution of 1/4096. This ensures the high precision of the entire system. To improve measurement accuracy, the AD678's built-in calibration circuit was used, further enhancing its A/D conversion accuracy. In actual measurements, the overall measurement accuracy reached 0.8%.