ADC circuit and control method thereof
By designing an ADC circuit including an analog-to-digital conversion module and a calibration module, and using control signals to realize continuous conversion and calibration of differential and single-ended signals, the problem that the ADC circuit cannot continuously run multiple modes in the prior art is solved, and the accuracy and efficiency of the ADC circuit are improved.
Patent Information
- Application Number
- CN202210124222.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-10
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-02-10
AI Technical Summary
Existing ADC circuits cannot continuously run differential modes and single-ended modes, there is wasted mode switching time, and it cannot meet the continuous calibration requirements for high-precision ADCs.
An ADC circuit including an analog-to-digital conversion module and a calibration module is designed, and the level switching of the first control signal during sampling is performed to realize continuous conversion and calibration of the differential signal and the single-ended signal. The calibration module determines the calibration code based on the mismatch code and performs voltage compensation on the analog-to-digital conversion module.
Continuous calibration and conversion of differential mode and single-ended mode are realized, avoiding the waste of mode switching time and improving the accuracy and efficiency of the ADC circuit.
Smart Images

Figure CN114499520B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to an ADC circuit and a control method thereof. Background Art
[0002] In the field of electronic technology, analog-to-digital converter (ADC) circuits can be used for signal measurement to convert analog signals into digital signals.
[0003] In some application scenarios, it is necessary to support continuous measurement of differential signals and single-ended signals of different input channels. The current conventional practice is to switch the ADC working mode and use the differential mode and single-ended mode to process the differential signal and the single-ended signal respectively.
[0004] However, the existing ADC cannot run two working modes continuously. For example, the ADC needs to be reconfigured after the differential signal is processed, and then the single-ended signal is processed. There will be redundant mode switching time in between, and it cannot run continuously. And when the ADC accuracy requirements are relatively high, the ADC needs to be calibrated. The traditional method cannot meet the requirements of continuous calibration of the ADC differential mode and single-ended mode. Summary of the invention
[0005] In order to solve the problems of the prior art, an embodiment of the present invention provides an ADC circuit and a control method thereof. The technical solution is as follows:
[0006] According to one aspect of the present invention, there is provided an ADC circuit, the ADC circuit comprising at least: an analog-to-digital conversion module, a calibration module;
[0007] The analog-to-digital conversion module is configured to output a corresponding first digital signal based on the sampled first signal when the first control signal is at a first level during the conversion period, and output a corresponding second digital signal based on the sampled second signal when the first control signal is at a second level;
[0008] The calibration module is connected to the analog-to-digital conversion module and is configured to determine a calibration code based on the mismatch code obtained during calibration, and to perform calibration code backfilling on the analog-to-digital conversion module;
[0009] The first control signal is level-switched during the sampling period.
[0010] Optionally, the calibration module includes a calibration digital-to-analog conversion module, a calibration algorithm module, and a calibration control module;
[0011] The input end of the calibration algorithm module is connected to the analog-to-digital conversion module, and the output end is connected to the calibration control module, and is configured to determine a first calibration code corresponding to the first signal based on the mismatch code when the first control signal is at the first level; and determine a second calibration code corresponding to the second signal based on the mismatch code when the first control signal is at the second level;
[0012] The calibration control module is configured to transmit the calibration code currently output by the calibration algorithm module to the calibration digital-to-analog conversion module during the conversion period;
[0013] The calibration digital-to-analog conversion module is configured to perform voltage compensation on the digital-to-analog conversion module based on a currently received calibration code during the conversion period.
[0014] Optionally, the calibration algorithm module is further configured to store the mismatch code.
[0015] Optionally, the calibration control module is further configured to set the calibration code to a preset intermediate calibration code during the sampling period, and transmit the intermediate calibration code to the calibration digital-to-analog conversion module.
[0016] Optionally, the ADC circuit further includes an input preprocessing module, and an output end of the input preprocessing module is connected to an input end of the analog-to-digital conversion module;
[0017] The input preprocessing module is used to receive an input signal, and is configured to output the first signal based on the input signal when the second control signal is a third level matching the first level; and output the second signal based on the input signal when the second control signal is a fourth level matching the second level;
[0018] The second control signal performs level switching during the conversion period.
[0019] Optionally, the input preprocessing module includes at least a first switch;
[0020] The first switch is configured to switch the signal output by the input preprocessing module based on the second control signal.
[0021] Optionally, when the second control signal is at the third level, one end of the first switch is used to connect a negative input voltage to the negative end of the input preprocessing module, and the other end is connected to the analog-to-digital conversion module;
[0022] When the second control signal is at the fourth level, one end of the first switch is used to connect the first preset voltage to the negative end of the input preprocessing module, and the other end is connected to the analog-to-digital conversion module.
[0023] Optionally, the analog-to-digital conversion module includes a digital-to-analog conversion module, a comparison module and a logic module, and the digital-to-analog conversion module is used for sampling, holding and quantization;
[0024] The digital-to-analog conversion module is connected to the input preprocessing module and is configured to, during the conversion period, when the first control signal is at the first level, execute the first working mode corresponding to the first signal; and when the first control signal is at the second level, execute the second working mode corresponding to the second signal;
[0025] The input end of the comparison module is connected to the digital-to-analog conversion module, and the output end is connected to the logic module;
[0026] The logic module is configured to output a digital signal corresponding to the input signal.
[0027] Optionally, the digital-to-analog conversion module includes a positive-end digital-to-analog conversion module and a negative-end digital-to-analog conversion module, the positive-end digital-to-analog conversion module is adapted to the second switch, and the negative-end digital-to-analog conversion module is adapted to the third switch;
[0028] During the conversion,
[0029] When the first control signal is at the first level, the second switch and the third switch are adapted to the first working mode;
[0030] When the first control signal is at the second level, the second switch adapts to the second working mode, and the third switch is used to connect the second preset voltage to the negative end digital-to-analog conversion module.
[0031] Optionally, a difference between the second preset voltage and a first preset voltage connected to the input preprocessing module is not greater than a difference threshold.
[0032] Optionally, the logic module is further configured to quantize the error voltage of the digital-to-analog conversion module during calibration to obtain a mismatch code.
[0033] According to another aspect of the present invention, a control method for an ADC circuit is provided, wherein the ADC circuit at least comprises: an analog-to-digital conversion module and a calibration module, and the method comprises:
[0034] During the conversion period, when the first control signal is at a first level, a corresponding first digital signal is output based on the sampled first signal, and when the first control signal is at a second level, a corresponding second digital signal is output based on the sampled second signal;
[0035] During the conversion, the calibration module determines a calibration code based on the mismatch code obtained during the calibration period, and performs calibration code backfilling on the analog-to-digital conversion module;
[0036] The first control signal is level-switched during the sampling period.
[0037] Optionally, the calibration module includes a calibration digital-to-analog conversion module, a calibration algorithm module, and a calibration control module;
[0038] The step of determining a calibration code based on a mismatch code obtained during calibration by the calibration module and performing calibration code backfilling on the analog-to-digital conversion module includes:
[0039] When the first control signal is at the first level, determining a first calibration code corresponding to the first signal based on the mismatch code through the calibration algorithm module; when the first control signal is at the second level, determining a second calibration code corresponding to the second signal based on the mismatch code through the calibration algorithm module;
[0040] Transmitting the calibration code currently output by the calibration algorithm module to the calibration digital-to-analog conversion module;
[0041] Based on the calibration digital-to-analog conversion module, voltage compensation is performed on the analog-to-digital conversion module according to the currently received calibration code.
[0042] Optionally, the method further includes:
[0043] The mismatch code is stored based on the calibration algorithm module.
[0044] Optionally, the method further includes:
[0045] During the sampling period, the voltage of the calibration digital-to-analog conversion module is set to a preset intermediate calibration code.
[0046] Optionally, the ADC circuit further includes an input preprocessing module, and the method further includes:
[0047] receiving an input signal;
[0048] When the second control signal is at a third level matching the first level, obtaining a first signal based on the input signal through the input preprocessing module;
[0049] When the second control signal is at a fourth level matching the second level, obtaining a second signal based on the input signal through the input preprocessing module;
[0050] The second control signal performs level switching during the conversion period.
[0051] Optionally, the input preprocessing module includes at least a first switch;
[0052] The method further includes: controlling the first switch based on the second control signal to switch the signal output by the input preprocessing module.
[0053] Optionally, controlling the first switch based on the second control signal to switch the signal output by the input preprocessing module includes:
[0054] When the second control signal is at the third level, the first switch is controlled to connect the negative input voltage from the negative end of the input preprocessing module to the analog-to-digital conversion module; and the positive input voltage from the positive end of the input preprocessing module to the analog-to-digital conversion module;
[0055] When the second control signal is at the fourth level, the first switch is controlled to connect the first preset voltage from the negative end of the input preprocessing module to the analog-to-digital conversion module; and the positive input voltage from the positive end of the input preprocessing module to the analog-to-digital conversion module.
[0056] Optionally, the analog-to-digital conversion module includes a digital-to-analog conversion module, a comparison module and a logic module, and the digital-to-analog conversion module is used for sampling, holding and quantization;
[0057] The outputting of the first digital signal corresponding to the sampled first signal comprises: controlling the digital-to-analog conversion module to execute the first working mode corresponding to the first signal; and outputting the first digital signal corresponding to the first signal based on the logic module;
[0058] The outputting of a second digital signal corresponding to the sampled second signal comprises: controlling the digital-to-analog conversion module to execute a second working mode corresponding to the second signal; and outputting a second digital signal corresponding to the second signal based on the logic module.
[0059] Optionally, the digital-to-analog conversion module includes a positive-end digital-to-analog conversion module and a negative-end digital-to-analog conversion module, the positive-end digital-to-analog conversion module is adapted to the second switch, and the negative-end digital-to-analog conversion module is adapted to the third switch;
[0060] The method further comprises:
[0061] When the first control signal is at the first level, controlling the second switch and the third switch to adapt to the first working mode;
[0062] When the first control signal is at the second level, the second switch is controlled to adapt to the second working mode, and the third switch is controlled to connect the second preset voltage to the negative end digital-to-analog conversion module.
[0063] Optionally, a difference between the second preset voltage and a first preset voltage connected to the input preprocessing module is not greater than a difference threshold.
[0064] Optionally, the method further includes:
[0065] During calibration, the logic module is multiplexed to quantize the error voltage of the digital-to-analog conversion module to obtain a mismatch code.
[0066] According to another aspect of the present invention, a chip is provided, comprising the above-mentioned ADC circuit.
[0067] According to another aspect of the present invention, there is provided an electronic device, comprising:
[0068] The above ADC circuit;
[0069] Processor; and
[0070] Memory for storing programs,
[0071] The program includes instructions, and when the instructions are executed by the processor, the processor executes the control method of the ADC circuit.
[0072] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the control method of the ADC circuit described above.
[0073] In the embodiment of the present invention, the ADC circuit can realize continuous calibration of two different working modes through the first control signal, and there is no need to restart the ADC circuit to configure different working modes. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0075] Figure 1 A schematic diagram of the structure of an ADC circuit provided according to an exemplary embodiment of the present invention is shown;
[0076] Figure 2 A schematic diagram of the structure of an ADC circuit provided according to an exemplary embodiment of the present invention is shown;
[0077] Figure 3 A timing control schematic diagram provided according to an exemplary embodiment of the present invention is shown;
[0078] Figure 4 A schematic diagram of the structure of a SAR ADC circuit according to an exemplary embodiment of the present invention is shown;
[0079] Figure 5 A schematic diagram of the structure of an ADC circuit provided according to an exemplary embodiment of the present invention is shown;
[0080] Figure 6 A timing control schematic diagram provided according to an exemplary embodiment of the present invention is shown;
[0081] Figure 7 A schematic diagram of an input preprocessing module provided according to an exemplary embodiment of the present invention is shown;
[0082] Figure 8 A schematic diagram of the structure of an ADC circuit provided according to an exemplary embodiment of the present invention is shown;
[0083] Fig. 9 A schematic diagram of the structure of a SAR ADC circuit according to an exemplary embodiment of the present invention is shown;
[0084] Fig.10 A flow chart of a control method of an ADC circuit provided according to an exemplary embodiment of the present invention is shown;
[0085] Fig.11 A flow chart of a calibration control method for an ADC circuit according to an exemplary embodiment of the present invention is shown;
[0086] Fig.12 A flow chart of a control method of an ADC circuit provided according to an exemplary embodiment of the present invention is shown;
[0087] Fig.13 A schematic diagram of switch states during sampling according to an exemplary embodiment of the present invention is shown;
[0088] Fig.14 A schematic diagram of switch states during sampling according to an exemplary embodiment of the present invention is shown;
[0089] Fig.15 A schematic diagram of switch states during conversion according to an exemplary embodiment of the present invention is shown;
[0090] Fig.16 A schematic diagram of switch states during conversion according to an exemplary embodiment of the present invention is shown;
[0091] Fig.17 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0092] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0093] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0094] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0095] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0096] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0097] An embodiment of the present invention provides an ADC circuit, such as Figure 1 As shown, the ADC circuit at least includes: an analog-to-digital conversion module and a calibration module.
[0098] The analog-to-digital conversion module is configured to output a corresponding first digital signal based on the sampled first signal when the first control signal is at a first level during the conversion period, and to output a corresponding second digital signal based on the sampled second signal when the first control signal is at a second level;
[0099] The calibration module is connected to the analog-to-digital conversion module and is configured to determine a calibration code based on the mismatch code obtained during calibration and to perform calibration code backfilling on the analog-to-digital conversion module;
[0100] The first control signal performs level switching during the sampling period.
[0101] In a possible implementation, the input signal of the first signal may be a differential signal, and the first signal may be a corresponding differential signal; the input signal of the second signal may be a single-ended signal, and the second signal may be a corresponding pseudo differential signal.
[0102] Optional, such as Figure 2 The ADC circuit shown in FIG. 1 may include a calibration digital-to-analog conversion module, a calibration algorithm module, and a calibration control module. The ADC circuit may include: Figure 3 The timing shown is controlled, where sar_clk refers to the clock control signal, sar_sample refers to the sampling control signal, DIFF_EN1 refers to the first control signal, CALCODE_I <m:1>Refers to the calibration code output by the calibration algorithm module, CALCODE_P / N <m:1>It refers to the calibration code output by the calibration control module. The number of M bits is determined by the number of bits of the calibration digital-to-analog conversion module.
[0103] The input end of the calibration algorithm module is connected to the analog-to-digital conversion module, and the output end is connected to the calibration control module, and is configured to determine a first calibration code corresponding to the first signal based on the mismatch code when the first control signal is at a first level; and determine a second calibration code corresponding to the second signal based on the mismatch code when the first control signal is at a second level;
[0104] The calibration control module is configured to transmit the calibration code currently output by the calibration algorithm module to the calibration digital-to-analog conversion module during the conversion period;
[0105] The calibration digital-to-analog conversion module is configured to perform voltage compensation on the digital-to-analog conversion module based on the currently received calibration code during the conversion period.
[0106] In a possible implementation manner, when the ADC circuit is a SAR ADC circuit, the corresponding circuit after adding the calibration module is as follows: Figure 4 As shown. The input of the calibration algorithm module is connected to the successive approximation search logic module. The calibration digital-to-analog conversion module can be a calibration differential capacitor array (CALDACP / CALDACN), which is connected to the input of the comparator and can be configured to compensate the voltage of the comparator input based on the currently received calibration code during conversion.
[0107] Apart from Figure 4 The calibration differential capacitor array shown, the calibration digital-to-analog conversion module may also adopt other circuit structures, such as a capacitor resistor array, and this embodiment does not limit the specific circuit structure of the calibration digital-to-analog conversion module.
[0108] Optionally, the calibration algorithm module is further configured to store the mismatch code.
[0109] Optionally, the calibration control module is further configured to set the calibration code to a preset intermediate calibration code during sampling, and transmit the intermediate calibration code to the calibration digital-to-analog conversion module.
[0110] Optional, such as Figure 5 The ADC circuit structure diagram shown in FIG. 1 further includes an input preprocessing module, and the output end of the input preprocessing module is connected to the input end of the analog-to-digital conversion module. The ADC circuit can be composed of Figure 6 The timing shown is controlled, wherein DIFF_EN2 refers to the second control signal.
[0111] The input preprocessing module is used to receive an input signal, and is configured to output the first signal based on the input signal when the second control signal is a third level matching the first level; and output the second signal based on the input signal when the second control signal is a fourth level matching the second level;
[0112] The second control signal performs level switching during the conversion period.
[0113] Optionally, the input preprocessing module may include at least a first switch;
[0114] The first switch is configured to switch the signal output by the input preprocessing module based on the second control signal.
[0115] like Figure 7 As shown in the schematic diagram of the input preprocessing module, the first switch can be arranged at the negative end of the input preprocessing module.
[0116] In a possible implementation, the positive end of the input preprocessing module may also be provided with a switch identical to the first switch, so as to reduce the output voltage imbalance between the positive and negative ends of the input preprocessing module and improve the accuracy of analog-to-digital conversion.
[0117] In another possible implementation, the positive terminal of the input preprocessing module may not be provided with a switch, and the positive terminal input voltage is connected to the analog-to-digital conversion module. This embodiment does not limit whether a switch is provided at the positive terminal of the input preprocessing module.
[0118] Optionally, when the second control signal is at a third level, one end of the first switch is used to connect a negative input voltage to the negative end of the input preprocessing module, and the other end is connected to the analog-to-digital conversion module;
[0119] When the second control signal is at the fourth level, one end of the first switch is used to connect the first preset voltage to the negative end of the input preprocessing module, and the other end is connected to the analog-to-digital conversion module.
[0120] Optional, such as Figure 8 In the ADC circuit shown, the analog-to-digital conversion module may include a digital-to-analog conversion module, a comparison module, and a logic module, and the digital-to-analog conversion module may be used for sampling, holding, and quantization. The quantization may be performed in a successive approximation manner or in other manners, which is not limited in this embodiment.
[0121] The digital-to-analog conversion module is connected to the input preprocessing module and is configured to, during the conversion period, execute a first working mode corresponding to the first signal when the first control signal is at a first level; and execute a second working mode corresponding to the second signal when the first control signal is at a second level;
[0122] The input end of the comparison module is connected to the digital-to-analog conversion module, and the output end is connected to the logic module;
[0123] The logic module is configured to output a digital signal corresponding to the input signal.
[0124] In a possible implementation, Fig. 9 In the SAR ADC (Successive Approximation Register Analog-to-Digital Converter) circuit shown, the digital-to-analog conversion module may be a digital-to-analog conversion differential capacitor array (DAC), the comparison module may be a comparator (COMP), and the logic module may be a SAR logic module.
[0125] Optionally, the digital-to-analog conversion module includes a positive-end digital-to-analog conversion module and a negative-end digital-to-analog conversion module, the positive-end digital-to-analog conversion module is adapted to the second switch, and the negative-end digital-to-analog conversion module is adapted to the third switch;
[0126] During the conversion period,
[0127] When the first control signal is at a first level, the second switch and the third switch are adapted to a first working mode;
[0128] When the first control signal is at the second level, the second switch is adapted to the second working mode, and the third switch is used to connect the second preset voltage to the negative end digital-to-analog conversion module.
[0129] During sampling, the second switch is used to connect the positive output voltage of the input preprocessing module to the positive digital-to-analog conversion module, and the third switch is used to connect the negative output voltage of the input preprocessing module to the negative digital-to-analog conversion module.
[0130] The ADC circuit can realize continuous conversion between differential signals and single-ended signals under the control of the first control signal and the second control signal.
[0131] Optionally, the above logic module is also configured to quantize the error voltage of the digital-to-analog conversion module during calibration to obtain a mismatch code. That is to say, during calibration, the existing logic module in the analog-to-digital conversion module can be reused to calculate the mismatch code, without adding an additional logic module in the subsequent calibration module, thereby optimizing the logic complexity of the calibration module and reducing the area of the ADC circuit.
[0132] The ADC circuit can realize continuous conversion of differential signals and single-ended signals based on the continuous calibration of differential signals and single-ended signals. In particular, since the logic module is reused, there is no need to add another logic module, which optimizes the logic complexity of the calibration module and reduces the area of the ADC circuit.
[0133] The embodiment of the present invention provides a control method of an ADC circuit, which can be used to control the above ADC circuit. Fig.10 The control method flow chart of the ADC circuit shown in the figure introduces the control method.
[0134] First of all Figure 3 , 6 The timing control relationship shown in is introduced.
[0135] In the electronic device, a clock control signal sar_clk, a sampling control signal sar_sample, a first control signal DIFF_EN1, and a second control signal DIFF_EN2 may be set in advance for the ADC circuit.
[0136] When the sampling control signal is at a high level, the ADC circuit is in the sampling period and performs sampling-related processing; when the sampling control signal is at a low level, the ADC circuit is in the conversion period and performs conversion-related processing. Figure 3 , 6 As shown, sar_sample can be initially at a low level, and switches from a low level to a high level at the second rising edge of sar_clk, and switches from a high level to a low level at the fourth rising edge, and the sampling period is 2 clock cycles; it switches from a high level to a low level at the fourth rising edge of sar_clk, and switches from a low level to a high level at the 16th rising edge, and the conversion period is 12 clock cycles. This embodiment does not limit the initial level of the sampling control signal, the specific position of the switching level, the sampling period, and the conversion period.
[0137] In this embodiment, the first control signal can be used to control the working mode of the ADC circuit during the conversion period, specifically, it can be used to control the working mode of the digital-to-analog conversion module (DAC) in the analog-to-digital conversion module during the conversion period, and when the ADC circuit includes a calibration module, it can control the working mode of the calibration module. In order to ensure that the ADC circuit can be configured with the corresponding working mode in advance before the conversion, the first control signal can be switched before the sampling control signal is switched to a low level, that is, the first control signal can be level-switched during the sampling period, and the switching of the first control signal does not affect the sampling function of the digital-to-analog conversion module.
[0138] In a preferred embodiment, the first control signal can switch levels earlier than the sampling control signal to avoid affecting the conversion. Figure 3 , 6 As shown, DIFF_EN1 can switch earlier than sar_sample during the sampling period, for example, at the third rising edge of sar_clk, DIFF_EN1 switches from a low level to a high level, or at the second or third falling edge. This embodiment does not limit the position where the first control signal switches levels.
[0139] In this embodiment, the second control signal can be used to control the output voltage mode of the input preprocessing module. In order to ensure that the external input signal can be processed in advance before the ADC circuit samples, the second control signal can be switched before the sampling control signal is switched to a high level, that is, the second control signal can be switched in level during the conversion period.
[0140] In a preferred embodiment, the second control signal can switch the level one clock cycle or multiple clock cycles earlier than the sampling control signal to avoid affecting the sampling. Figure 6 As shown, DIFF_EN2 can be switched one clock cycle or multiple clock cycles earlier than sar_sample during the conversion period, for example, at the first rising edge of sar_clk, DIFF_EN2 switches from a low level to a high level; during the conversion period of the ADC circuit, DIFF_EN2 can switch from a high level to a low level at the fifth rising edge of sar_clk, or from a high level to a low level at the fifteenth rising edge. This embodiment does not limit the position where the second control signal switches the level.
[0141] Secondly Fig.10 A control method of the ADC circuit shown in FIG. 1 is introduced.
[0142] Step 1001, during the conversion period, when the first control signal is at a first level, a corresponding first digital signal is output based on the sampled first signal, and when the first control signal is at a second level, a corresponding second digital signal is output based on the sampled second signal.
[0143] Among them, the first control signal can control the working mode of the ADC circuit, so that the ADC circuit can execute the first working mode corresponding to the differential signal or the second working mode corresponding to the single-ended signal, and output the digital signal corresponding to the differential signal or the single-ended signal. The first level can be a high level or a low level, which is not limited in this embodiment. The second level is opposite to the first level. When the first level is a high level, the second level is a low level; when the first level is a low level, the second level is a high level.
[0144] In a possible implementation, the ADC circuit can collect signals from multiple channels outside the circuit, wherein the collected signals can include at least differential signals and single-ended signals. For differential signals, there can be two channel inputs, such as channel X and channel X-1, and the signal of channel X can be used as the positive input signal VINP of the digital-to-analog conversion module, and the signal of channel X-1 is the negative input signal VINN of the digital-to-analog conversion module. For single-ended signals, there can be one channel input, such as channel X-2, and the signal of channel X-2 can be used as the positive input signal VINP of the digital-to-analog conversion module.
[0145] During the sampling period, the acquired signal can be sampled based on the digital-to-analog conversion module. During different sampling periods, the differential signal and the single-ended signal can be sampled alternately based on the digital-to-analog conversion module, that is, if the differential signal is sampled during the current sampling period, the single-ended signal is sampled during the next sampling period; if the single-ended signal is sampled during the current sampling period, the differential signal is sampled during the next sampling period.
[0146] During the conversion period, if the differential signal (i.e., the first signal) is sampled during the corresponding sampling period, the sampled differential signal can be converted to output the corresponding first digital signal; if the single-ended signal (i.e., the second signal) is sampled during the corresponding sampling period, the sampled single-ended signal can be converted to output the corresponding second digital signal.
[0147] Step 1002: During the conversion period, a calibration code is determined by a calibration module based on the mismatch code obtained during the calibration period, and the calibration code is supplemented to the analog-to-digital conversion module.
[0148] In a possible implementation, during the calibration period, the error voltage of the digital-to-analog conversion module can be quantized to obtain a mismatch code. Furthermore, during the conversion period, the calibration code can be input into the analog-to-digital conversion module through the calibration module to compensate for the error voltage of the digital-to-analog conversion module, thereby calibrating the digital signal output by the analog-to-digital conversion module to improve the accuracy of the ADC circuit.
[0149] Optionally, the calibration module includes a calibration digital-to-analog conversion module, a calibration algorithm module, and a calibration control module. Fig.11 As shown in the flow chart of the calibration control method of the ADC circuit, the above step 1002 can be as follows: steps 1101-1103.
[0150] Step 1101, when the first control signal is at a first level, a first calibration code corresponding to the first signal is determined based on the mismatch code through a calibration algorithm module; when the first control signal is at a second level, a second calibration code corresponding to the second signal is determined based on the mismatch code through a calibration algorithm module.
[0151] In a possible implementation, the first control signal can control the working mode of the calibration algorithm module so that the calibration algorithm module calculates and outputs a first calibration code corresponding to the differential signal or a second calibration code corresponding to the single-ended signal. The working mode of the calibration algorithm module corresponds to the working mode of the ADC circuit during the above conversion period.
[0152] When the first control signal is at the first level, the operating mode is the first operating mode corresponding to the differential signal. During the conversion, the calibration algorithm module can calculate the first calibration code of the differential signal based on the offset of the digital-to-analog conversion module and the error voltage of the capacitor mismatch, and store the first calibration code in the calibration algorithm module.
[0153] When the first control signal is at the second level, the operating mode is the second operating mode corresponding to the single-ended signal. During the conversion, the calibration algorithm module can calculate the second calibration code of the single-ended signal based on the offset of the digital-to-analog conversion module and the error voltage of the capacitor mismatch, and store the second calibration code in the calibration algorithm module.
[0154] Step 1102: Transmit the calibration code currently output by the calibration algorithm module to the calibration digital-to-analog conversion module.
[0155] In a possible implementation, the SAR logic control signal can control the calibration of the differential capacitor array by controlling the calibration control module, and the output of the calibration control module is determined by the output of the calibration algorithm module. Fig. 9 In the SAR ADC circuit shown in FIG. 1 , during the conversion period, when the first control signal is at the first level, the calibration code CALCODE_I output by the calibration algorithm module is <m:1>is a differential calibration code (i.e., the first calibration code). At this time, the calibration control module can output the positive end calibration code CALCODE_P <m:1>And negative terminal calibration code CALCODE_N <m:1>, transmitted to the calibration differential capacitor array. Among them, the positive end calibration code CALCODE_P <m:1>You can input the positive end capacitance array of the calibration differential capacitance array, the negative end calibration code CALCODE_N <m:1>The negative terminal capacitance array of the calibrated differential capacitance array can be input.
[0156] When the first control signal is at the second level, the calibration code CALCODE_I output by the calibration algorithm module <m:1>It is a single-ended calibration code (ie, the second calibration code), and the subsequent processing of the calibration control module is the same as above, which will not be repeated here.
[0157] Step 1103: Based on the calibration of the digital-to-analog conversion module, voltage compensation is performed on the analog-to-digital conversion module according to the currently received calibration code.
[0158] In a possible implementation, Figure 4 In the SAR ADC circuit shown in FIG. 1 , during the conversion period, when the first control signal is at the first level, the positive end capacitor array of the calibration differential capacitor array can receive the differential calibration code CALCODE_P <m:1>, the calibration code value CALCODE_P <m:1>The voltage that is replenished to the positive input of the comparator; the negative end capacitor array of the calibration differential capacitor array can receive the differential calibration code CALCODE_N <m:1>, the calibration code value CALCODE_N <m:1>The voltage fed back to the negative input of the comparator.
[0159] When the first control signal is at the second level, the calibration differential capacitor array can receive the single-ended calibration code to compensate the voltage at the comparator input terminal. The specific processing is the same as above and will not be repeated here.
[0160] During the sampling period before the above step 1103, a backfill reset can also be performed to set the voltage of the calibration digital-to-analog conversion module to a preset intermediate calibration code. Figure 3 CALCODE_P / N shown <m:1>,During the sampling period, the calibration control module outputs a preset intermediate calibration code according to the sampling control signal, and transmits the intermediate calibration code to the calibration ,differential capacitor array, and sets the calibration differential capacitor array to the intermediate calibration code value, so as to prepare for compensating the error voltage that may be positive or negative during the normal conversion period.
[0161] The control method described above can realize continuous calibration of differential signals and single-ended signals. In addition, Fig.12 The control method flow chart of the ADC circuit shown in the figure realizes the continuous conversion of the differential signal and the single-ended signal. At this time, the ADC circuit also includes an input preprocessing module, and the control method includes the following steps 1201-1203.
[0162] Step 1201, receiving an input signal;
[0163] Step 1202, when the second control signal is at a third level matching the first level, obtaining a first signal based on the input signal through an input preprocessing module;
[0164] Step 1203: when the second control signal is at a fourth level matching the second level, a second signal is acquired based on the input signal through an input preprocessing module.
[0165] The third level can be a high level or a low level, which is not limited in this embodiment. The fourth level is opposite to the third level, when the third level is a high level, the fourth level is a low level; when the third level is a low level, the fourth level is a high level.
[0166] In a possible implementation, referring to the introduction of step 1001, for a differential signal, there may be two channels of input, such as channel X and channel X-1, and the signal of channel X may be used as the positive input signal VINP of the input preprocessing module, and the signal of channel X-1 may be used as the negative input signal VINN of the input preprocessing module. For a single-ended signal, there may be one channel of input, such as channel X-2, and the signal of channel X-2 may be used as the positive input signal VINP of the input preprocessing module.
[0167] The second control signal can control the output voltage mode of the input preprocessing module, so that the input preprocessing module can output a first signal corresponding to a differential signal, or a second signal corresponding to a single-ended signal.
[0168] When the second control signal is at the third level, the output voltage mode of the input preprocessing module can be a differential mode. At this time, the positive output signal VIN+ of the input preprocessing module can be the signal VINP of channel X, and the negative output signal VIN- can be the signal VINN of channel X-1.
[0169] When the second control signal is at the fourth level, the output voltage mode of the input preprocessing module can be a single-ended mode. At this time, the positive output signal VIN+ of the input preprocessing module can be the signal VINP of the channel X-2, and the negative output signal VIN- can be a first preset voltage. The first preset voltage can be a built-in positive reference voltage VREFN, a negative reference voltage VREFP, or other fixed voltage values. The second preset voltage described below is similar. The first preset voltage and the second preset voltage can be the same or different, and this embodiment does not limit this.
[0170] Optionally, the input preprocessing module includes at least a first switch, and the first switch can be used to switch the output of the first signal or the second signal. Specifically, the first switch can be controlled based on the second control signal to switch the signal output by the input preprocessing module.
[0171] The control method for the first switch may be as follows:
[0172] When the second control signal is at a third level, the first switch is controlled to connect the negative input voltage from the negative end of the input preprocessing module to the analog-to-digital conversion module; and the positive input voltage from the positive end of the input preprocessing module to the analog-to-digital conversion module;
[0173] When the second control signal is at the fourth level, the first switch is controlled to connect the first preset voltage from the negative end of the input preprocessing module to the analog-to-digital conversion module; and the positive input voltage from the positive end of the input preprocessing module to the analog-to-digital conversion module.
[0174] Specifically, Fig.13 , 14 The switch state during the sampling period shown is taken as an example that both the positive and negative ends of the input preprocessing module include switches, wherein the switch at the positive end is used to connect the positive input voltage to the analog-to-digital conversion module; the switch at the negative end is used to connect the negative input voltage or the first preset voltage to the analog-to-digital conversion module. The switch at the negative end corresponds to the first switch mentioned above.
[0175] A specific implementation of the output voltage mode of the first control signal controlling the input preprocessing module is as follows:
[0176] When the second control signal is at the third level, one end of the switch at the positive end can be used to receive the positive input voltage, and the other end can be connected to the analog-to-digital conversion module; one end of the switch at the negative end can be used to receive the negative input voltage, and the other end can be connected to the analog-to-digital conversion module. At this time, the output voltage mode is a differential mode, VIN+=VINP, VIN-=VINN, the input preprocessing module outputs a first signal corresponding to the differential signal, and VINP is input to the positive end of the digital-to-analog conversion module, and VINN is input to the negative end of the digital-to-analog conversion module.
[0177] When the second control signal is at the fourth level, one end of the switch at the positive end can be used to receive the positive input voltage, and the other end can be connected to the analog-to-digital conversion module; one end of the switch at the negative end can be used to receive the first preset voltage, and the other end can be connected to the analog-to-digital conversion module. At this time, the output voltage mode is a single-ended mode, VIN+=VINP, VIN-=first preset voltage, the input preprocessing module outputs a second signal corresponding to the single-ended signal, and VINP is input to the positive end of the digital-to-analog conversion module, and the first preset voltage is input to the negative end of the digital-to-analog conversion module.
[0178] Optionally, the analog-to-digital conversion module may include a digital-to-analog conversion module, a comparison module and a logic module, and the digital-to-analog conversion module is used for sampling, holding and quantization. The analog-to-digital conversion module can sample and convert the input analog signal to output a corresponding digital signal.
[0179] During sampling, no matter in differential mode or single-ended mode, the digital-to-analog conversion module can sample the signal output by the input preprocessing module without modifying the circuit structure of the digital-to-analog conversion module.
[0180] During the conversion, for the above step 1001, when the first control signal is at the first level, the control method for the analog-to-digital conversion module can be as follows: control the digital-to-analog conversion module to execute the first working mode corresponding to the first signal; based on the logic module, output the first digital signal corresponding to the first signal. When the first control signal is at the second level, the control method for the analog-to-digital conversion module can be as follows: control the digital-to-analog conversion module to execute the second working mode corresponding to the second signal; based on the logic module, output the second digital signal corresponding to the second signal.
[0181] Optionally, the digital-to-analog conversion module may include a positive-end digital-to-analog conversion module and a negative-end digital-to-analog conversion module, the positive-end digital-to-analog conversion module is adapted to the second switch, and the negative-end digital-to-analog conversion module is adapted to the third switch. The second switch and the third switch can be used to switch the working mode of the digital-to-analog conversion module.
[0182] The control method is as follows: when the first control signal is at the first level, the second switch and the third switch are controlled to adapt to the first working mode; when the first control signal is at the second level, the second switch is controlled to adapt to the second working mode, and the third switch is controlled to connect the second preset voltage to the negative end digital-to-analog conversion module.
[0183] In a possible implementation, Fig.15 , 16 In the switching state during the conversion shown, when the first control signal is at the first level, each switch of the digital analog conversion differential capacitor array can be controlled separately based on the successive approximation search logic module. At this time, the positive and negative terminal capacitor arrays of the digital analog conversion differential capacitor array are simultaneously controlled by the successive approximation search logic module.
[0184] When the first control signal is at the second level, each switch of the positive capacitor array of the digital analog conversion differential capacitor array is controlled based on the successive approximation search logic module; each switch of the negative capacitor array of the digital analog conversion differential capacitor array receives the second preset voltage at one end and is connected to the negative capacitor at the other end. At this time, only the positive capacitor array of the digital analog conversion differential capacitor array is controlled by the successive approximation search logic module, and the negative capacitor array is fixedly connected to the above-mentioned second preset voltage, that is, the positive reference voltage VREFN, the negative reference voltage VREFP or other fixed voltage values.
[0185] Optionally, the difference between the second preset voltage and the first preset voltage connected to the input preprocessing module may not be greater than a difference threshold, wherein the difference threshold may be equal to (VREFN+VREFP) / 2. In a preferred embodiment, the second preset voltage is equal to the first preset voltage.
[0186] In another possible implementation, when the second preset voltage is not equal to the first preset voltage, the digital signal output by the ADC circuit can be processed based on the voltage difference. Specifically, the second preset voltage can be subtracted from the first preset voltage to obtain the voltage difference; based on the principle of analog-to-digital conversion in the ADC circuit, the voltage difference is converted into a difference code value; and the digital signal code value output by the ADC circuit is subtracted from the difference code value to obtain the final digital signal code value.
[0187] Exemplarily, when the ADC circuit processes a single-ended signal, if the first preset voltage is 0V and the second preset voltage is 1 / 2*VREFP, the voltage difference can be obtained by the following formula: voltage difference = second preset voltage - first preset voltage = 1 / 2*VREFP. The voltage difference is converted into a difference code value by the following formula: difference code value = voltage difference / VREFP * 2^N = 2^(N-1). The digital signal code value is calculated by the following formula: final digital signal code value = digital signal code value - difference code value.
[0188] When the ADC circuit processes a differential signal, if the first preset voltage is 0V and the second preset voltage is 1 / 2*VREFP, the voltage difference can be obtained by the following formula: voltage difference = second preset voltage - first preset voltage = 1 / 2*VREFP. The voltage difference is converted into a difference code value by the following formula: difference code value = voltage difference / VREFP * 2^ (N-1) = 2^ (N-2). The digital signal code value is calculated by the following formula: final digital signal code value = digital signal code value - difference code value.
[0189] Wherein, N is the number of bits of the ADC circuit, and the difference code value can be positive or negative. In addition, the above-mentioned process of converting the difference code value can be processed in the circuit or by software during use, which is not limited in this embodiment.
[0190] In a preferred embodiment, the mismatch code of step 1002 can be calculated by the logic module in the analog-to-digital conversion module, and the specific process is as follows: during calibration, the multiplexing logic module quantizes the error voltage of the digital-to-analog conversion module to obtain the mismatch code. Fig. 9 The SAR ADC circuit shown can reuse the existing successive approximation search logic module in the analog-to-digital conversion module during the error calibration stage. The SAR logic control signal controls the calibration control module to control the calibration differential capacitor array, quantize the digital-to-analog conversion of the offset of the differential capacitor array and the error voltage of the capacitor mismatch, and transmit the obtained mismatch code to the calibration algorithm module, which stores the mismatch code.
[0191] Optionally, the ADC circuit may further include a reset switch, and the reset switch may be used to connect the bias voltage to the digital-to-analog conversion module.
[0192] In a possible implementation, Fig.13 , 14 As shown, during the sampling period, the reset switch SWCM1 / 2 can be closed to reset one plate of the capacitor in the digital-to-analog conversion differential capacitor array to the bias voltage VCM. Fig.15 , 16 As shown, during the conversion period, the reset switch SWCM1 / 2 can be opened.
[0193] The embodiments of the present invention can achieve the following beneficial effects:
[0194] (1) Through the first control signal, the ADC circuit can realize continuous calibration of two different working modes, without restarting the ADC circuit to configure different working modes.
[0195] (2) Through the ADC circuit and corresponding timing control provided by the present invention, continuous switching can be achieved on the basis of achieving continuous calibration of the differential mode and the single-ended mode.
[0196] (3) In the error calibration stage, the quantized error voltage is realized by multiplexing the logic module, without adding another logic module, thus optimizing the logic complexity of the calibration module and reducing the area of the ADC circuit.
[0197] An exemplary embodiment of the present invention further provides a chip, including the ADC circuit provided by the embodiment of the present invention.
[0198] The exemplary embodiment of the present invention further provides an electronic device, comprising: an ADC circuit provided by an embodiment of the present invention; at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present invention when executed by the at least one processor.
[0199] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.
[0200] refer to Fig.17 , now a block diagram of an electronic device 1700 that can be used as the present invention will be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer equipment, such as data center servers, notebook computers, thin clients, laptop computers, desktop computers, workstations, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0201] like Fig.17 As shown, the electronic device 1700 includes a computing unit 1701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1702 or a computer program loaded from a storage unit 1708 into a random access memory (RAM) 1703. In the RAM 1703, various programs and data required for the operation of the device 1700 can also be stored. The computing unit 1701, the ROM 1702, and the RAM 1703 are connected to each other via a bus 1704. An input / output (I / O) interface 1705 is also connected to the bus 1704.
[0202] Multiple components in the electronic device 1700 are connected to the I / O interface 1705, including: an input unit 1706, an output unit 1707, a storage unit 1708, and a communication unit 1709. The input unit 1706 can be any type of device that can input information to the electronic device 1700, and the input unit 1706 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device. The output unit 1707 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1704 can include but is not limited to a disk, an optical disk. The communication unit 1709 allows the electronic device 1700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0203] The computing unit 1701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1701 performs the various methods and processes described above. For example, in some embodiments, the control method of the ADC circuit may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1700 via the ROM 1702 and / or the communication unit 1709. In some embodiments, the computing unit 1701 may be configured to perform the control method of the ADC circuit by any other appropriate means (e.g., by means of firmware).
[0204] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0205] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0206] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0207] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0208] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0209] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. An analog-to-digital converter (ADC) circuit, characterized in that: The ADC circuit at least includes: an analog-to-digital conversion module and a calibration module; The analog-to-digital conversion module is configured to output a corresponding first digital signal based on the sampled first signal when the first control signal is at a first level during the conversion period, and output a corresponding second digital signal based on the sampled second signal when the first control signal is at a second level; The calibration module is connected to the analog-to-digital conversion module and is configured to determine a calibration code based on the mismatch code obtained during calibration, and to perform calibration code backfilling on the analog-to-digital conversion module; Among them, the first control signal performs level switching during the sampling period and is used to control the working mode of the analog-to-digital conversion module during the conversion period and the working mode of the calibration module. The working mode of the analog-to-digital conversion module during the conversion period includes a first working mode corresponding to the first signal and a second working mode corresponding to the second signal. The working mode of the calibration module corresponds to the working mode of the analog-to-digital conversion module during the conversion period.
2. The ADC circuit according to claim 1, characterized in that: The calibration module includes a calibration digital-to-analog conversion module, a calibration algorithm module, and a calibration control module; The input end of the calibration algorithm module is connected to the analog-to-digital conversion module, and the output end is connected to the calibration control module, and is configured to determine a first calibration code corresponding to the first signal based on the mismatch code when the first control signal is at the first level; and determine a second calibration code corresponding to the second signal based on the mismatch code when the first control signal is at the second level; The calibration control module is configured to transmit the calibration code currently output by the calibration algorithm module to the calibration digital-to-analog conversion module during the conversion period; The calibration digital-to-analog conversion module is configured to perform voltage compensation on the digital-to-analog conversion module based on a currently received calibration code during the conversion period.
3. The ADC circuit according to claim 2, characterized in that: The calibration algorithm module is further configured to store the mismatch code.
4. The ADC circuit according to claim 2, characterized in that: The calibration control module is further configured to set the calibration code as a preset intermediate calibration code during the sampling period, and transmit the intermediate calibration code to the calibration digital-to-analog conversion module.
5. The ADC circuit according to claim 1, characterized in that: The ADC circuit further comprises an input preprocessing module, the output end of the input preprocessing module is connected to the input end of the analog-to-digital conversion module; The input preprocessing module is used to receive an input signal, and is configured to output the first signal based on the input signal when the second control signal is at a third level matching the first level; When the second control signal is at a fourth level matching the second level, outputting the second signal based on the input signal; The second control signal performs level switching during the conversion period.
6. The ADC circuit according to claim 5, characterized in that: The analog-to-digital conversion module includes a digital-to-analog conversion module, a comparison module and a logic module, and the digital-to-analog conversion module is used for sampling, holding and quantization; The digital-to-analog conversion module is connected to the input preprocessing module and is configured to, during the conversion period, when the first control signal is at the first level, execute the first working mode corresponding to the first signal; and when the first control signal is at the second level, execute the second working mode corresponding to the second signal; The input end of the comparison module is connected to the digital-to-analog conversion module, and the output end is connected to the logic module; The logic module is configured to output a digital signal corresponding to the input signal.
7. The ADC circuit according to claim 6, characterized in that: The logic module is further configured to quantize the error voltage of the digital-to-analog conversion module during calibration to obtain a mismatch code.
8. A control method for an ADC circuit, characterized in that: The ADC circuit at least includes: an analog-to-digital conversion module and a calibration module, and the control method includes: During the conversion period, when the first control signal is at a first level, a corresponding first digital signal is output based on the sampled first signal, and when the first control signal is at a second level, a corresponding second digital signal is output based on the sampled second signal; During the conversion, the calibration module determines a calibration code based on the mismatch code obtained during the calibration period, and performs calibration code backfilling on the analog-to-digital conversion module; Among them, the first control signal performs level switching during the sampling period and is used to control the working mode of the analog-to-digital conversion module during the conversion period and the working mode of the calibration module. The working mode of the analog-to-digital conversion module during the conversion period includes a first working mode corresponding to the first signal and a second working mode corresponding to the second signal. The working mode of the calibration module corresponds to the working mode of the analog-to-digital conversion module during the conversion period.
9. The control method of the ADC circuit according to claim 8, characterized in that: The calibration module includes a calibration digital-to-analog conversion module, a calibration algorithm module, and a calibration control module; The step of determining a calibration code based on a mismatch code obtained during calibration by the calibration module and performing calibration code backfilling on the analog-to-digital conversion module includes: When the first control signal is at the first level, determining a first calibration code corresponding to the first signal based on the mismatch code through the calibration algorithm module; when the first control signal is at the second level, determining a second calibration code corresponding to the second signal based on the mismatch code through the calibration algorithm module; Transmitting the calibration code currently output by the calibration algorithm module to the calibration digital-to-analog conversion module; Based on the calibration digital-to-analog conversion module, voltage compensation is performed on the analog-to-digital conversion module according to the currently received calibration code.
10. The control method of the ADC circuit according to claim 8, characterized in that: The control method further comprises: The mismatch code is stored based on the calibration algorithm module.
11. The control method of the ADC circuit according to claim 8, characterized in that: The control method further comprises: During the sampling period, the voltage of the calibration digital-to-analog conversion module is set to a preset intermediate calibration code.
12. The control method of the ADC circuit according to claim 8, characterized in that: The ADC circuit further includes an input preprocessing module, and the control method further includes: receiving an input signal; When the second control signal is at a third level matching the first level, obtaining a first signal based on the input signal through the input preprocessing module; When the second control signal is at a fourth level matching the second level, obtaining a second signal based on the input signal through the input preprocessing module; The second control signal performs level switching during the conversion period.
13. The control method of the ADC circuit according to claim 12, characterized in that: The analog-to-digital conversion module includes a digital-to-analog conversion module, a comparison module and a logic module, and the digital-to-analog conversion module is used for sampling, holding and quantization; The outputting of the first digital signal corresponding to the sampled first signal comprises: controlling the digital-to-analog conversion module to execute the first working mode corresponding to the first signal; and outputting the first digital signal corresponding to the first signal based on the logic module; The outputting of a second digital signal corresponding to the sampled second signal comprises: controlling the digital-to-analog conversion module to execute a second working mode corresponding to the second signal; and outputting a second digital signal corresponding to the second signal based on the logic module.
14. The control method of the ADC circuit according to claim 13, characterized in that: The control method further comprises: During calibration, the logic module is multiplexed to quantize the error voltage of the digital-to-analog conversion module to obtain a mismatch code.
15. A chip, characterized in that: The method comprises the ADC circuit as claimed in any one of claims 1 to 7.
16. An electronic device, comprising: The ADC circuit according to any one of claims 1 to 7; processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the control method according to any one of claims 8 to 14.
17. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the control method according to any one of claims 8-14.
Citation Information
Patent Citations
Calibration logic control circuit and method and successive approximation analog-to-digital converter
CN112838866A
Successive Approximation Register Analog-to-Digital Converter With Single-Ended Measurement
US20150091746A1