Circuit for realizing ADC (Analog to Digital Converter) through DAC and comparator

Through the DAC and comparator module in the GVM08F003 microcontroller combined with the reference voltage, the precise measurement of the chip power supply voltage is achieved, the problem of voltage division resistance error and power loss is solved, and a high-precision and low-power voltage detection solution is provided.

CN222029918UActive Publication Date: 2024-11-19GIGADEVICE SEMICON (BEIJING) INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420614202.4
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2024-11-19
Estimated Expiration
2034-03-28

AI Technical Summary

Technical Problem

The prior art causes a deviation in the measured voltage value when detecting the chip power supply voltage due to errors in the voltage division resistance, and there is additional power loss.

Method used

The DAC module and comparator module in the GVM08F003 microcontroller are used to output analog quantities through the DAC and combine them with the reference voltage. The comparator is used to monitor the voltage changes and adjust the output value through the dichotomy method to achieve accurate measurement of the VCC voltage.

Benefits of technology

Without relying on internal VCC measurement units and ADC resources, accurate measurement of chip power supply voltage is achieved, reducing errors and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222029918U_ABST
    Figure CN222029918U_ABST
Patent Text Reader

Abstract

The utility model discloses a circuit for realizing an ADC by a DAC and a comparator, comprising a GVM08F003 single-chip microcomputer, the GVM08F003 single-chip microcomputer is internally provided with a DAC module capable of outputting analog quantity and a comparator module capable of comparing analog quantity, the output end of the DAC module is in communication connection with one input end of the comparator, and the output end of the comparator is in communication connection with the other input end of the DAC module. One end of the comparator is in communication connection with an input analog quantity, the other end of the comparator is in communication connection with an input analog quantity, the DAC module is externally connected with an independent reference voltage VREF, the VREF is larger than the input voltage, and the output frequency of an output value of the DAC module is adjusted through a dichotomy method in the output process. According to the utility model, under the condition that the chip is not provided with an internal VCC measurement unit and ADC resources are not used, the chip uses' DAC + reference voltage + CMP 'to complete a VCC voltage measurement function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of circuits, in particular to a circuit for realizing ADC by using a DAC and a comparator. Background Art

[0002] Regardless of the type of embedded system, chip power supply voltage detection is essential for the normal operation of the entire system. By detecting the change in voltage, we can determine whether the system is operating normally. If the power supply is abnormal, or the chip is abnormal due to other reasons, we can troubleshoot and accurately locate the problem based on the change in VCC.

[0003] In the past, the voltage of VCC / VDD of the test chip was measured by using a voltage divider resistor to divide the power supply voltage proportionally to the ADC, and then reversely calculate the VCC voltage through the resistor value. Because the resistor itself has errors, the measured voltage value will have a certain deviation and cause additional power loss. Utility Model Content

[0004] The utility model aims to provide a circuit for realizing ADC by using a DAC and a comparator, comprising a GVM08F003 single-chip microcomputer, wherein a DAC module capable of outputting analog quantities and a comparator module capable of comparing analog quantities are arranged inside the GVM08F003 single-chip microcomputer, wherein the output end of the DAC module is communicatively connected to an input end of the comparator, and the other end of the comparator is communicatively connected to the input analog quantity.

[0005] As a further preferred embodiment, the DAC module is externally connected to an independent reference voltage VREF, and the VREF is greater than the input voltage.

[0006] As a further preferred embodiment, the output value of the DAC module adjusts the output times by binary division during the output process.

[0007] Through the above technical solution, the beneficial effects of the utility model are:

[0008] In the case that the chip does not have an internal VCC measurement unit and does not use ADC resources, the chip uses "DAC+reference voltage+CMP" to complete the measurement function of the VCC voltage. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a schematic diagram of the circuit structure of the DAC and comparator realizing the ADC in Example 1 of the utility model;

[0010] Figure 2 This is a flow chart of a control algorithm for measuring analog quantities in Embodiment 1 of the present utility model;

[0011] Figure 3This is a schematic diagram of the circuit structure of the DAC and comparator realizing the ADC in Example 2 of the utility model;

[0012] Figure 4 This is a flowchart of a control algorithm for measuring analog quantities in Example 2 of the utility model.

[0013] In the figure: 1 input voltage, 2 DAC analog output, 3 comparator, 4 comparison result of comparator output. DETAILED DESCRIPTION

[0014] The following will be combined with the drawings in the embodiments of the utility model to clearly and completely describe the technical solutions in the embodiments of the utility model. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of the embodiments. Based on the embodiments in the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.

[0015] Example 1

[0016] See also Figure 1 As shown, the connection method and control process of the utility model are further explained:

[0017] The single-chip microcomputer used in the utility model is a GVM08F003 single-chip microcomputer, which has a hardware DAC module and a comparator module inside the chip. It only needs to connect the analog quantity to be measured to the pin of the single-chip microcomputer. Figure 1 As shown in , other connections can be made through software.

[0018] The test principle is as follows: the positive end of the comparator is connected to the DAC output, the negative end of the comparator is connected to the chip power supply, the comparator output is connected to the GPI0 input pin, and the change of the comparator level is monitored. The output value of the DAC is adjusted by binary division and successive approximation method to make it close to the VCC voltage. During this process, the comparator output is always 0; when the DAC output is greater than VCC, the comparator output changes from 0 to 1, and the DAC output is close to the VCC power supply voltage.

[0019] In order to improve the measurement speed, the utility model adopts the additional software algorithm in the measurement process Figure 2 For DACs with lower precision, a direct polling control method can also be used.

[0020] Furthermore, for application scenarios where the measurement speed requirement is not very high, multiple measurements can be performed and then the average value can be taken to reduce the error.

[0021] Example 2

[0022] As attached Figure 3 and 3As shown, another connection method and control process of the utility model are further described:

[0023] The single-chip microcomputer used in the utility model is a GVM08F003 single-chip microcomputer, which has a hardware DAC module and a comparator module inside the chip. It only needs to connect the analog quantity to be measured to the pin of the single-chip microcomputer. Figure 3 The other connections shown in can be implemented through software.

[0024] In order to improve the measurement speed, the utility model adopts the additional software algorithm in the measurement process Figure 4 For DACs with lower precision, a direct polling control method can also be used.

[0025] Furthermore, for application scenarios where the measurement speed requirement is not very high, multiple measurements can be performed and then the average value can be taken to reduce the error.

[0026] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A circuit for implementing ADC using a DAC and a comparator, characterized in that: The invention comprises a GVM08F003 single chip microcomputer, wherein a DAC module capable of outputting analog quantity and a comparator module capable of comparing analog quantity are arranged inside the GVM08F003 single chip microcomputer, the output end of the DAC module is communicatively connected with an input end of the comparator, and the other end of the comparator is communicatively connected with the input analog quantity.

2. The circuit of implementing ADC by using a DAC and a comparator according to claim 1, characterized in that: The DAC module is externally connected to an independent reference voltage VREF, and the VREF is greater than the input voltage.

3. The circuit of implementing ADC by using a DAC and a comparator according to claim 1, characterized in that: The output value of the DAC module adjusts the output times by binary division during the output process.