Oscillating circuit
By adopting the self-return comparison module and a single output unit in the RC oscillation circuit, the problem of poor stability and reliability of the existing RC oscillation circuit is solved, and a more stable oscillation signal output is achieved.
Patent Information
- Application Number
- CN202411580142.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-07
AI Technical Summary
When the existing RC oscillation circuit generates oscillation signals, the offset voltage is large, the output frequency varies greatly with temperature, and the stability and reliability are poor.
An oscillation circuit is designed, using a self-return-zero comparison module, and the comparison of the triangle wave signal and the threshold voltage is achieved through an output unit, reducing the impact of the offset voltage, and loading the offset voltage of the output unit in the memory unit to further reduce the impact on the comparison signal.
By reducing the number of comparators and optimizing the offset voltage, the offset voltage of the oscillating circuit is reduced, the stability and reliability of the output signal is improved, and the temperature dependence of the frequency is reduced.
Smart Images

Figure CN119543890A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oscillation circuits, and in particular to an oscillation circuit. Background Art
[0002] The oscillation circuit can generate an oscillation signal that changes periodically. The oscillation circuit can be an inductor-capacitor LC oscillation circuit or a resistor-capacitor RC oscillation circuit.
[0003] In the RC oscillator circuit, the capacitor is charged and discharged through a current source, for example, the power supply voltage is connected to the first end of the capacitor through a first current source, and the second end of the capacitor is grounded through a second current source. When the capacitor is charged by the power supply voltage, the voltage at the first end of the capacitor increases from zero to the power supply voltage. When the capacitor is discharged, the voltage at the first end of the capacitor drops from the power supply voltage to zero. As a result, the first end of the capacitor outputs a triangular wave voltage.
[0004] In the existing RC oscillation circuit, the first comparator compares the triangular wave voltage with the high voltage threshold. When the triangular wave voltage is greater than the high voltage threshold, it outputs a high level and the latch outputs a high level. The second comparator compares the triangular wave voltage with the low voltage threshold. When the triangular wave voltage is less than the low voltage threshold, the first comparator outputs a low level, the second comparator outputs a high level, and the latch outputs a low level, thereby outputting high and low level oscillation signals.
[0005] However, two comparators are provided in the existing RC oscillation circuit to generate an oscillation signal, which results in a large offset voltage of the oscillation circuit, causing the output frequency of the oscillation circuit to vary greatly with temperature, and the stability and reliability of the oscillation circuit to be poor. Summary of the invention
[0006] The present invention provides an oscillating circuit to solve the problem of poor stability and reliability of the oscillating circuit.
[0007] The present invention provides an oscillating circuit, which comprises: a charging and discharging module, an energy storage module, a self-zeroing comparison module and an output module; the self-zeroing comparison module comprises a storage unit and an output unit;
[0008] The charging and discharging module is connected to the power supply voltage, and the charging and discharging module is connected to the energy storage module. The charging and discharging module is used to charge and discharge the energy storage module according to the power supply voltage, so that the energy storage module outputs a triangular wave signal;
[0009] The energy storage module is connected to the self-zero comparison module, the storage unit is connected to the first threshold voltage, the second threshold voltage and the offset voltage of the output unit, and the output unit is used to output a comparison signal based on the comparison result between the triangular wave signal and the first threshold voltage when the feedback voltage is at the second level, and output a comparison signal based on the comparison result between the triangular wave signal and the second threshold voltage when the feedback voltage is at the first level; wherein the feedback voltage is the voltage of the oscillation signal outputted by the output module last time;
[0010] The output module is connected to the self-zero comparison module, the output module is connected to the feedback voltage, and the output module is used to output an oscillation signal according to the comparison signal and the feedback voltage.
[0011] Optionally, the charging and discharging module includes a first selector, at least two first switches and at least two first resistors; the power supply voltage includes a first power supply voltage and a second power supply voltage; the first power supply voltage is greater than the second power supply voltage;
[0012] The enable terminal of the first selector is connected to the feedback voltage, the first input terminal of the first selector is connected to the first power supply voltage, and the second input terminal of the first selector is connected to the second power supply voltage;
[0013] The first end of the first switch is connected to the output end of the first selector, the second end of the first switch is connected to the first end of the energy storage module through the first resistor, and the second end of the energy storage module is connected to the second power supply voltage.
[0014] Optionally, the storage unit is used based on a first level of an inverting voltage,
[0015] storing a first difference between the voltage of the triangular wave signal and a second threshold voltage; storing a second difference between the first threshold voltage and the voltage of the triangular wave signal based on a second level of the anti-phase voltage; wherein the anti-phase voltage and the feedback voltage are in opposite phases to each other;
[0016] The output unit is connected to the storage unit, and is used to output the comparison signal according to the first difference based on the first level of the inverting voltage when the self-return-to-zero comparison module is in a working state; and output the comparison signal according to the second difference based on the second level of the inverting voltage.
[0017] Optionally, the oscillation circuit further includes a first input module, a second input module, a third input module and a fourth input module;
[0018] The control end of the first input module is connected to the inverted voltage, the first input end of the first input module is connected to the second power supply voltage, the second input end of the first input module is connected to the first end of the energy storage module, and the first input module is used to output the voltage of the triangular wave signal based on the first level of the inverted voltage; and output the second power supply voltage based on the second level of the inverted voltage;
[0019] The control end of the second input module is connected to the inverted voltage, the first input end of the second input module is connected to the first end of the energy storage module, the second input end of the second input module is connected to the second power supply voltage, and the second input module is used to output the second power supply voltage based on the first level of the inverted voltage; and output the voltage of the triangular wave signal based on the second level of the inverted voltage;
[0020] The control end of the third input module is connected to the inverting voltage, the first input end of the third input module is connected to the second power supply voltage, the second input end of the third input module is connected to the second threshold voltage, and the third input module is used to output the second threshold voltage based on the first level of the inverting voltage; and output the second power supply voltage based on the second level of the inverting voltage;
[0021] The control end of the fourth input module is connected to the inverting voltage, the first input end of the fourth input module is connected to the first threshold voltage, the second input end of the fourth input module is connected to the second power supply voltage, and the fourth input module is used to output the second power supply voltage based on the first level of the inverting voltage; and output the first threshold voltage based on the second level of the inverting voltage;
[0022] The storage unit is connected to output ends of the first input module, the second input module, the third input module and the fourth input module respectively.
[0023] Optionally, the storage unit includes a first storage capacitor, a second storage capacitor, a second switch, a third switch, a fourth switch and a fifth switch;
[0024] The second switch is connected between the output terminal of the first input module and the first terminal of the first storage capacitor;
[0025] The third switch is connected between the output end of the second input module and the first end of the second storage capacitor, and the second switch and the third switch are used to be turned on when the self-zero comparison module is in a working state, and turned off when the self-zero comparison module is in a reset state;
[0026] The fourth switch is connected between the output end of the third input module and the first end of the first storage capacitor;
[0027] The fifth switch is connected between the output end of the fourth input module and the first end of the second storage capacitor. The fourth switch and the fifth switch are used to be turned on when the self-zero comparison module is in a reset state, and turned off when the self-zero comparison module is in a working state.
[0028] Optionally, the output unit includes: a first transistor, a second transistor, a second resistor, a third resistor, a sixth switch, a seventh switch, a third transistor, a fourth transistor, a fifth transistor, a sixth transistor and a NOR device;
[0029] The control end of the first transistor is connected to the second end of the second storage capacitor, the first end of the first transistor is connected to the first power supply voltage through the second resistor, and the second end of the first transistor is connected to the second power supply voltage;
[0030] The sixth switch is connected between the control terminal of the first transistor and the first terminal of the first transistor;
[0031] The control end of the second transistor is connected to the first end of the first storage capacitor, the first end of the second transistor is connected to the first power supply voltage through the third resistor, and the second end of the second transistor is connected to the second power supply voltage;
[0032] The seventh switch is connected between the control terminal of the second transistor and the first terminal of the second transistor, and the sixth switch and the seventh switch are used to be turned on when the self-zero comparison module is in a reset state, and turned off when the self-zero comparison module is in a working state;
[0033] The control end of the third transistor is connected to the first end of the second transistor, the first end of the third transistor is connected to the control end of the fifth transistor and the first end of the fifth transistor, the second end of the fifth transistor is connected to the first power supply voltage, and the second end of the third transistor is connected to the second power supply voltage;
[0034] The control end of the fourth transistor is connected to the first end of the first transistor, the first end of the fourth transistor is connected to the first end of the sixth transistor, the second end of the sixth transistor is connected to the first power supply voltage, the control end of the sixth transistor is connected to the control end of the fifth transistor, and the second end of the fourth transistor is connected to the second power supply voltage;
[0035] The first input terminal of the OR-NON device is connected to the first terminal of the sixth transistor, the second input terminal of the OR-NON device is used to access the state control signal of the self-return-to-zero comparison module, and the OR-NON device is used to output the comparison signal based on the voltage of the first terminal of the sixth transistor and the voltage of the state control signal.
[0036] Optionally, the self-zero comparison module further includes a state control unit;
[0037] The state control unit is connected to the triangular wave signal, the third threshold voltage and the feedback voltage, and the state control unit is connected to the self-zero comparison module. The state control unit is used to output a state control signal to the self-zero comparison module based on the triangular wave signal, the third threshold voltage and the feedback voltage, so that the self-zero comparison module is in a working state or a reset state.
[0038] Optionally, the state control unit includes: a comparator and an XOR device;
[0039] The first input terminal of the comparator is connected to the first terminal of the energy storage module, and the second input terminal of the comparator is connected to the third threshold voltage;
[0040] The first input terminal of the XOR device is connected to the feedback voltage, the second input terminal of the XOR device is connected to the output terminal of the comparator, and the output terminal of the XOR device is connected to the self-zero comparison module.
[0041] Optionally, the output module includes a second selector, a third selector and a latch;
[0042] The first input terminal of the second selector is connected to the second power supply voltage, the second input terminal of the second selector is connected to the output unit, and the enable terminal of the second selector is connected to the inverting voltage;
[0043] The first input terminal of the third selector is connected to the second power supply voltage, the second input terminal of the third selector is connected to the output unit, and the enable terminal of the third selector is connected to the feedback voltage;
[0044] The first input end of the latch is connected to the output end of the second selector, the second input end of the latch is connected to the output end of the third selector, the first output end of the latch outputs the oscillation signal, and the second output end of the latch outputs an inverted signal of the oscillation signal;
[0045] The control terminal of the latch is connected to the inverted signal of the reset signal.
[0046] Optionally, the oscillation circuit further includes a reset module;
[0047] The control end of the reset module is connected to a reset signal, the first end of the reset module is connected to the first end of the energy storage module, and the second end of the reset module is connected to a second power supply voltage; the reset module is used to reset the first end of the energy storage module in response to the first level of the reset signal.
[0048] The technical solution of the embodiment of the present invention, the oscillation circuit includes: a charging and discharging module, an energy storage module, a self-zeroing comparison module and an output module; the charging and discharging module charges and discharges the energy storage module, so that the energy storage module outputs a triangular wave signal. The self-zeroing comparison module can receive the triangular wave signal, and the storage unit of the self-zeroing comparison module can load the first threshold voltage and the second threshold voltage. When the feedback voltage is the second level, the output unit compares the triangular wave signal with the first threshold voltage and outputs the comparison signal. When the feedback voltage is the first level, the output unit compares the triangular wave signal with the second threshold voltage and outputs the comparison signal. The output module can output an oscillation signal according to the comparison signal. In this way, the comparison signal can be output through one output unit, without setting two comparators, reducing the offset voltage in the oscillation circuit. And when the storage unit in the self-zeroing comparison module loads the first threshold voltage and the second threshold voltage, it can load the offset voltage of the output unit, further reducing the influence of the offset voltage of the output unit on the comparison signal, thereby avoiding the influence of the offset voltage of the output unit on the oscillation signal, and improving the stability and reliability of the oscillation circuit.
[0049] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 is a schematic structural diagram of an oscillation circuit provided by an embodiment of the present invention;
[0052] Figure 2 is a structural schematic diagram of another oscillation circuit provided by an embodiment of the present invention;
[0053] Figure 3 1 is a schematic diagram of a circuit structure of a self-zeroing comparison module provided by an embodiment of the present invention;
[0054] Figure 4is a schematic diagram of a circuit structure of a comparator provided by an embodiment of the present invention;
[0055] Figure 5 It is a timing diagram of an oscillation circuit provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] An embodiment of the present invention provides an oscillating circuit. Figure 1 is a schematic diagram of the structure of an oscillator circuit provided by an embodiment of the present invention, with reference to Figure 1 The oscillation circuit includes: a charging and discharging module 110, an energy storage module 120, a self-zeroing comparison module 130 and an output module 140; the self-zeroing comparison module 130 includes a storage unit 131 and an output unit 132;
[0059] The charge and discharge module 110 is connected to the power supply voltage V0, and the charge and discharge module 110 is connected to the energy storage module 120. The charge and discharge module 110 is used to charge and discharge the energy storage module 120 according to the power supply voltage, so that the energy storage module 120 outputs a triangular wave signal Vosc;
[0060] The energy storage module 120 is connected to the self-zero comparison module 130, and the storage unit 131 is connected to the first threshold voltage V1, the second threshold voltage V2 and the offset voltage of the output unit 132. The output unit 132 is used to Q1 When the feedback voltage VQ1 When the feedback voltage V Q1 is the voltage of the oscillation signal outputted by the output module 140 last time;
[0061] The output module 140 is connected to the self-zero comparison module 130, and the output module 140 is connected to the feedback voltage V Q1 The output module 140 is used to output the voltage according to the comparison signal Vosc and the feedback voltage V Q1 Output oscillation signal Vout.
[0062] The power supply voltage V0 may include a first power supply voltage and a second power supply voltage, the first power supply voltage may be a positive voltage, and the second power supply voltage may be a ground or negative voltage. Therefore, the charge and discharge module 110 may charge the energy storage module 120 through the first power supply voltage and discharge the energy storage module 120 through the second power supply voltage.
[0063] For example, the first end of the energy storage module 120 is connected to the charge and discharge module 110, and the second end of the energy storage module 120 is grounded GND. In the process of charging the energy storage module 120, the voltage of the second end of the energy storage module 120 remains unchanged, and the voltage of the first end of the energy storage module 120 increases from zero to the first power supply voltage. In the process of discharging the energy storage module 120, the voltage of the first end of the energy storage module 120 decreases from the first power supply voltage to zero, so that the first end of the energy storage module 120 outputs the triangular wave signal Vosc.
[0064] Specifically, the energy storage module 120 is connected to the self-zero comparison module 130, so that the self-zero comparison module 130 can obtain the triangular wave signal Vosc generated by the energy storage module 120, for example, the storage unit 131 can store the triangular wave signal Vosc and the threshold voltage (the first threshold voltage V1 and the second threshold voltage V2) in a time-sharing manner. In this way, it is convenient for the output unit 132 to compare the triangular wave signal Vosc with the first threshold voltage V1, or to compare the triangular wave signal Vosc with the second threshold voltage V2. For example, the first threshold voltage V1 is less than the second threshold voltage V2.
[0065] For example, when the feedback voltage is at the second level, the output unit 132 compares the triangular wave signal Vosc with the first threshold voltage V1. When the output unit 132 determines that the voltage value of the triangular wave signal Vosc is greater than the first threshold voltage V1, the output unit 132 outputs the first level. When the feedback voltage is at the second level and the output unit 132 outputs the first level, the output module 140 outputs the first level signal. Therefore, the feedback voltage V Q1The output unit 132 compares the triangular wave signal Vosc with the second threshold voltage V2. When the output unit 132 determines that the triangular wave signal Vosc is less than the second threshold voltage V2, the output unit 132 outputs the first level signal. The output module 140 generates a first level signal when the feedback voltage V Q1 When the output unit 132 outputs the first level, the second level signal is output. In this way, the first level signal and the second level signal are alternately output, and this is repeated to achieve the output of the oscillation signal Vout. For example, the first level is a high level and the second level is a low level; in some other implementations, the first level may also be a low level and the second level may be a high level, which is not limited in this embodiment.
[0066] Therefore, the triangle wave signal Vosc can be compared with the first threshold voltage V1 or the second threshold voltage V2 through one output unit 132, without setting two comparators, which can reduce the problem of oscillation signal fluctuation caused by comparator output delay and offset voltage. In addition, the storage unit 131 can load the offset voltage of the output unit 132 in the process of loading the first threshold voltage V1 and the second threshold voltage V2, which can further reduce the influence of the offset voltage of the output unit 132 on the comparison signal, thereby avoiding the influence of the offset voltage of the output unit 132 on the oscillation signal Vout, and improving the stability and reliability of the oscillation circuit.
[0067] The technical solution of this embodiment, the oscillation circuit includes: a charging and discharging module, an energy storage module, a self-zeroing comparison module and an output module; the charging and discharging module charges and discharges the energy storage module, so that the energy storage module outputs a triangular wave signal. The self-zeroing comparison module can receive a triangular wave signal, and the storage unit of the self-zeroing comparison module can load a first threshold voltage and a second threshold voltage. When the feedback voltage is at the second level, the output unit compares the triangular wave signal with the first threshold voltage and outputs a comparison signal. When the feedback voltage is at the first level, the output unit compares the triangular wave signal with the second threshold voltage and outputs a comparison signal. The output module can output an oscillation signal according to the comparison signal. In this way, the comparison signal can be output through one output unit, without setting two comparators, reducing the offset voltage in the oscillation circuit. And when the storage unit in the self-zeroing comparison module loads the first threshold voltage and the second threshold voltage, it can load the offset voltage of the output unit, further reducing the influence of the offset voltage of the output unit on the comparison signal, thereby avoiding the influence of the offset voltage of the output unit on the oscillation signal, and improving the stability and reliability of the oscillation circuit.
[0068] Based on the above technical solutions, Figure 2 is a schematic diagram of the structure of another oscillator circuit provided by an embodiment of the present invention. Figure 2, the charge and discharge module 110 includes a first selector U1, at least two first switches S1 and at least two first resistors R1; the power supply voltage V0 includes a first power supply voltage VDD and a second power supply voltage; the first power supply voltage VDD is greater than the second power supply voltage;
[0069] The enable terminal of the first selector U1 is connected to the feedback voltage V Q1 , a first input terminal of the first selector U1 is connected to a first power supply voltage VDD, and a second input terminal of the first selector U1 is connected to a second power supply voltage;
[0070] A first end of the first switch S1 is connected to the output end of the first selector U1 , a second end of the first switch S1 is connected to a first end of the energy storage module 120 via a first resistor R1 , and a second end of the energy storage module 120 is connected to a second power supply voltage.
[0071] The second power supply voltage may be a negative voltage or a ground GND. Figure 2 2 shows the case where the second power supply voltage is ground GND, which is not limited in this embodiment. The first selector U1 is a two-to-one multiplexer.
[0072] Specifically, the first selector U1 can be configured to generate a voltage according to the feedback voltage V Q1 Output the first power supply voltage VDD or the second power supply voltage. For example, when the feedback voltage V Q1 When the feedback voltage V Q1 When the voltage is at the first level, the first selector U1 outputs the second power supply voltage, so that the energy storage module 120 discharges through at least two first resistors R1 and the first switch S1, and the voltage at the first end of the energy storage module 120 decreases to zero. In this way, the first end of the energy storage module 120 generates a triangular wave signal Vosc.
[0073] By setting at least two first switches S1 and at least two first resistors R1, a plurality of resistance paths are formed. By controlling the number of first switches S1 that are turned on, the number of first resistors R1 in the access circuit can be controlled, thereby controlling the charge and discharge current of the energy storage module 120, and further controlling the charging rate and discharge rate of the energy storage module 120. In this way, the frequency of the triangular wave signal Vosc can be controlled, thereby controlling the frequency of the comparison signal, and further controlling the frequency of the oscillation signal. In this way, there is no need to set a constant current source, and there is no need to adjust the frequency of the oscillation signal by adjusting the current value of the constant current source. The problem that the constant current source is greatly affected by temperature, which makes the frequency of the oscillation signal greatly affected by temperature, can be avoided, so that a stable oscillation signal can be output, further improving the reliability and stability of the oscillation circuit.
[0074] The first switch S1 may be controlled by a controller or a user, which is not limited in this embodiment.
[0075] On the basis of the above technical solutions, optionally, the storage unit 131 is used to store a first difference between the voltage of the triangular wave signal Vosc and the second threshold voltage V2 based on the first level of the inverting voltage; based on the second level of the inverting voltage, store a second difference between the first threshold voltage V1 and the voltage of the triangular wave signal Vosc; wherein the inverting voltage and the feedback voltage V Q1 They are opposite to each other;
[0076] The output unit 132 is connected to the storage unit 131, and is used to output a comparison signal according to the first difference based on the first level of the inverting voltage when the self-zeroing comparison module 130 is in working state; and output a comparison signal according to the second difference based on the second level of the inverting voltage.
[0077] Among them, the reverse voltage and the feedback voltage V Q1 are inverse to each other, that is, the feedback voltage V Q1 When it is high, the inverting voltage is low; the feedback voltage V Q1 When it is low, the inverting voltage is high.
[0078] Specifically, the storage unit 131 can receive the triangular wave signal Vosc and the second threshold voltage V2 in a time-sharing manner when the reverse voltage is at the first level, so that the voltage stored in the storage unit 131 is the difference between the voltage of the triangular wave signal Vosc and the second threshold voltage V2, that is, the first difference. Similarly, the storage unit 131 can receive the first threshold voltage V1 and the triangular wave signal Vosc in a time-sharing manner when the reverse voltage is at the second level, so as to store the second difference between the first threshold voltage V1 and the voltage of the triangular wave signal Vosc.
[0079] In this way, the output unit 132 can compare the triangular wave signal Vosc with the first threshold voltage V1, or compare the triangular wave signal Vosc with the second threshold voltage V2, thereby outputting a comparison signal.
[0080] On the basis of the above technical solution, optionally, refer to Figure 2 , the oscillation circuit further includes a first input module 133, a second input module 134, a third input module 135 and a fourth input module 136;
[0081] The control terminal of the first input module 133 is connected to the reverse voltage The first input terminal of the first input module 133 is connected to the second power supply voltage, and the second input terminal of the first input module 133 is connected to the first terminal of the energy storage module 120. The first input module 133 is used to The first level outputs the voltage of the triangular wave signal Vosc; based on the inverted voltage outputting a second power supply voltage at a second level;
[0082] The control terminal of the second input module 134 is connected to the reverse voltage The first input terminal of the second input module 134 is connected to the first terminal of the energy storage module 120, and the second input terminal of the second input module 134 is connected to the second power supply voltage. The first level outputs the second power supply voltage; based on the inverting voltage A voltage of a second level output triangle wave signal Vosc;
[0083] The control terminal of the third input module 135 is connected to the reverse voltage The first input terminal of the third input module 135 is connected to the second power supply voltage, the second input terminal of the third input module 135 is connected to the second threshold voltage V2, and the third input module 135 is used to generate a voltage based on the inverted voltage. The first level outputs the second threshold voltage V2; based on the inverting voltage outputting a second power supply voltage at a second level;
[0084] The control terminal of the fourth input module 136 is connected to the reverse voltage The first input terminal of the fourth input module 136 is connected to the first threshold voltage V1, and the second input terminal of the fourth input module 136 is connected to the second power supply voltage. The fourth input module 136 is used to The first level outputs the second power supply voltage; based on the inverting voltage The second level outputs a first threshold voltage V1;
[0085] The storage unit 131 is connected to the output ends of the first input module 133 , the second input module 134 , the third input module 135 , and the fourth input module 136 , respectively.
[0086] The storage unit 131 is respectively connected to the output terminal vinp of the first input module 133 , the output terminal vinm of the second input module 134 , the output terminal voffp of the third input module 135 , and the output terminal voffm of the fourth input module 136 .
[0087] Specifically, the reverse voltage When it is at the first level, the first input module 133 outputs the triangular wave signal Vosc to the storage unit 131, the second input module 134 outputs the second power supply voltage to the storage unit 131, the third input module 135 outputs the second threshold voltage V2 to the storage unit 131, and the fourth input module 136 outputs the second power supply voltage to the storage unit 131, so that the storage unit 131 stores the difference between the voltage of the triangular wave signal Vosc and the second threshold voltage V2.
[0088] In reverse voltage When it is at the second level, the first input module 133 outputs the second power supply voltage to the storage unit 131, the second input module 134 outputs the triangular wave signal Vosc to the storage unit 131, the third input module 135 outputs the second power supply voltage to the storage unit 131, and the fourth input module 136 outputs the first threshold voltage V1 to the storage unit 131, so that the storage unit 131 stores the difference between the first threshold voltage V1 and the voltage of the triangular wave signal Vosc.
[0089] Optionally, refer to Figure 2 The first input module 133 includes a fourth selector U4, and the control end of the fourth selector U4 is connected to the reverse voltage The first input terminal of the fourth selector U4 is connected to the second power supply voltage, and the second input terminal of the fourth selector U4 is connected to the first terminal of the energy storage module 120;
[0090] The second input module 134 includes a fifth selector U5, the control end of which is connected to an inverting voltage A first input terminal of the fifth selector U5 is connected to a first terminal of the energy storage module 120, and a second input terminal of the fifth selector U5 is connected to a second power supply voltage;
[0091] The third input module 135 includes a sixth selector U6, and the control end of the sixth selector U6 is connected to the reverse voltage A first input terminal of the sixth selector U6 is connected to the second power supply voltage, and a second input terminal of the sixth selector U6 is connected to the second threshold voltage V2;
[0092] The fourth input module 136 includes a seventh selector U7, and the control terminal of the seventh selector U7 is connected to the reverse voltage The first input terminal of the seventh selector U7 is connected to the first threshold voltage V1, and the second input terminal of the seventh selector U7 is connected to the second power supply voltage. The fourth selector U4, the fifth selector U5, the sixth selector U6 and the seventh selector U7 can all be two-to-one multiplexers.
[0093] On the basis of the above technical solutions, the circuit structure of the self-zero comparison module 130 is described below, but it is not intended to limit the present application.
[0094] Figure 3 is a circuit structure diagram of a self-zero comparison module provided by an embodiment of the present invention. Optionally, refer to Figure 3 , the storage unit 131 includes a first storage capacitor C1, a second storage capacitor C2, a second switch S2, a third switch S3, a fourth switch S4 and a fifth switch S5;
[0095] The second switch S2 is connected between the output terminal vinp of the first input module 133 and the first terminal of the first storage capacitor C1;
[0096] The third switch S3 is connected between the output terminal vinm of the second input module 134 and the first terminal of the second storage capacitor C2. The second switch S2 and the third switch S3 are used to be turned on when the self-zero comparison module 130 is in the working state, and turned off when the self-zero comparison module 130 is in the reset state.
[0097] The fourth switch S4 is connected between the output terminal voffp of the third input module 135 and the first terminal of the first storage capacitor C1;
[0098] The fifth switch S5 is connected between the output terminal voffm of the fourth input module 136 and the first end of the second storage capacitor C2. The fourth switch S4 and the fifth switch S5 are used to be turned on when the self-zero comparison module 130 is in the reset state and turned off when the self-zero comparison module 130 is in the working state.
[0099] Specifically, when the self-zero comparison module 130 is in the working state, the second switch S2 and the third switch S3 are turned on, so that the first storage capacitor C1 can receive the voltage output by the first input module 133, and the second storage capacitor C2 can receive the voltage output by the second input module 134. When the first level is reached, the first storage capacitor C1 can receive the triangular wave signal Vosc output by the first input module 133. When the voltage is at the second level, the first storage capacitor C1 can receive the second power supply voltage output by the first input module 133. When the voltage is at the first level, the second storage capacitor C2 can receive the second power supply voltage output by the second input module 134. When the voltage level is at the second level, the second storage capacitor C2 can receive the triangular wave signal Vosc output by the second input module 134 .
[0100] When the self-reset comparison module 130 is in the reset state, the fourth switch S4 and the fifth switch S5 are turned on, so that the first storage capacitor C1 can receive the voltage output by the third input module 135, and the second storage capacitor C2 can receive the voltage output by the fourth input module 136. When the first voltage level is the first level, the first storage capacitor C1 can receive the second threshold voltage V2 output by the third input module 135. When the voltage is at the second level, the first storage capacitor C1 can receive the second power supply voltage output by the third input module 135. When the voltage is at the first level, the second storage capacitor C2 can receive the second power supply voltage output by the fourth input module 136. When the voltage level is the second level, the second storage capacitor C2 can receive the first threshold voltage output by the fourth input module 136 .
[0101] Thus, in the reverse voltage When the voltage of the self-return-to-zero comparison module 130 is at the first level, if the self-return-to-zero comparison module 130 is in the reset state, the first storage capacitor C1 receives the second threshold voltage V2, and the second storage capacitor C2 receives the second power supply voltage; when the self-return-to-zero comparison module 130 switches to the working state, the first storage capacitor C1 receives the triangular wave signal Vosc, and the second storage capacitor C2 receives the second power supply voltage. The first storage capacitor C1 stores the first difference between the voltage of the triangular wave signal Vosc and the second threshold voltage V2, so that the output unit 132 can determine whether the first difference between the voltage of the triangular wave signal Vosc and the second threshold voltage V2 is greater than 0, and compare the triangular wave signal Vosc with the second threshold voltage V2, and output the comparison signal VO1.
[0102] In reverse voltage When the self-zero comparison module 130 is in the second level, if the self-zero comparison module 130 is in the reset state, the second storage capacitor C2 stores the first threshold voltage V1, and the first storage capacitor C1 stores the second power supply voltage; when the self-zero comparison module 130 is switched to the working state, the second storage capacitor C2 stores the triangular wave signal Vosc, and the first storage capacitor C1 stores the second power supply voltage. Then, the second storage capacitor C2 stores the second difference between the first threshold voltage V1 and the triangular wave signal Vosc, so that the output unit 132 can determine whether the second difference between the first threshold voltage V1 and the triangular wave signal Vosc is greater than 0, realize the comparison between the triangular wave signal Vosc and the first threshold voltage V1, and output the comparison signal VO1.
[0103] Optionally, refer to Figure 3 The control end of the second switch S2 and the control end of the third switch S3 are connected to the state control signal PH1, and the control end of the fourth switch S4 and the control end of the fifth switch S5 are connected to the inverted signal of the state control signal The state control signal PH1 can control the state of the self-zero comparison module 130. For example, when the state control signal PH1 is at a high level, the self-zero comparison module 130 is in a working state, and when the state control signal PH1 is at a low level, the self-zero comparison module 130 is in a reset state. In this way, the second switch S2 and the third switch S3 can be turned on when the self-zero comparison module 130 is in a reset state, and the fourth switch S4 and the fifth switch S5 can be turned on when the self-zero comparison module 130 is in a working state.
[0104] Optionally, refer to Figure 3 , the output unit 132 includes: a first transistor M1, a second transistor M2, a second resistor R2, a third resistor R3, a sixth switch S6, a seventh switch S7, a third transistor M3, a fourth transistor M4, a fifth transistor M5, a sixth transistor M6 and a NOR device U8;
[0105] The control end of the first transistor M1 is connected to the second end of the second storage capacitor C2, the first end of the first transistor M1 is connected to the first power supply voltage VDD through the second resistor R2, and the second end of the first transistor M1 is connected to the second power supply voltage;
[0106] The sixth switch S6 is connected between the control terminal of the first transistor M1 and the first terminal of the first transistor M1;
[0107] The control end of the second transistor M2 is connected to the first end of the first storage capacitor C1, the first end of the second transistor M2 is connected to the first power supply voltage VDD through the third resistor R3, and the second end of the second transistor M2 is connected to the second power supply voltage;
[0108] The seventh switch S7 is connected between the control terminal of the second transistor M2 and the first terminal of the second transistor M2. The sixth switch S6 and the seventh switch S7 are used to be turned on when the self-zero comparison module 130 is in a reset state, and turned off when the self-zero comparison module 130 is in a working state.
[0109] The control end of the third transistor M3 is connected to the first end of the second transistor M2, the first end of the third transistor M3 is connected to the control end of the fifth transistor M5 and the first end of the fifth transistor M5, the second end of the fifth transistor M5 is connected to the first power supply voltage VDD, and the second end of the third transistor M3 is connected to the second power supply voltage;
[0110] The control end of the fourth transistor M4 is connected to the first end of the first transistor M1, the first end of the fourth transistor M4 is connected to the first end of the sixth transistor M6, the second end of the sixth transistor M6 is connected to the first power supply voltage VDD, the control end of the sixth transistor M6 is connected to the control end of the fifth transistor M5, and the second end of the fourth transistor M4 is connected to the second power supply voltage;
[0111] The first input terminal of the NOR device U8 is connected to the first terminal of the sixth transistor M6, and the second input terminal of the NOR device U8 is used to access the inverted signal of the state control signal of the self-zero comparison module 130. The NOR device U8 is used to output a comparison signal VO1 based on the voltage of the first terminal of the sixth transistor M6 and the voltage of the state control signal.
[0112] The control terminal of the sixth switch S6 is connected to the inverted signal of the state control signal The control terminal of the seventh switch S7 is connected to the inverted signal of the state control signal
[0113] Specifically, when the state control signal PH1 is at a low level, the inverted signal of the state control signal is high level, the self-zero comparison module 130 is in a reset state, the sixth switch S6 and the seventh switch S7 are turned on, so that the offset voltage of the first transistor M1 and the second resistor R2 can be loaded to the second storage capacitor C2 through the sixth switch S6, and the offset voltage of the second transistor M2 and the third resistor R3 can be loaded to the first storage capacitor C1 through the seventh switch S7, so that the first storage capacitor C1 and the second storage capacitor C2 can load the offset voltage of the output unit 132 while loading the threshold voltage. This avoids the influence of the offset voltage on the comparison signal of the output unit 132, and further avoids the influence on the oscillation signal.
[0114] When the self-reset comparison module 130 is in the reset state, the inverted signal of the state control signal is high level, the fourth switch S4 and the fifth switch S5 are turned on, the first capacitor C1 is loaded with the voltage voffp output by the output terminal voffp of the third input module 135, and the second capacitor C2 is loaded with the voltage voffm output by the output terminal voffm of the fourth input module 136. When the self-zero comparison module 130 is in the working state, the state control signal PH1 is high level, the second switch S2 and the third switch S3 are turned on, the first capacitor C1 is loaded with the voltage vinp output by the output terminal vinp of the first input module 133, and the second capacitor C2 is loaded with the voltage vinm output by the output terminal vinm of the second input module 134. Then the voltage at the control terminal of the second transistor M2 is vinp-voffp, and the voltage at the control terminal of the first transistor M1 is vinm-voffm. The first transistor M1 and the second transistor M2 form a differential transistor, and it can be compared whether (vinp-voffp)-(vinm-voffm) is greater than 0, that is, it can be compared whether (vinp-vinm)-(voffp-voffm) is greater than 0. In this way, the self-zero comparison module 130 can implement multi-input comparison.
[0115] When the feedback voltage is low, the inverting voltage is a high level, the first input module 133 outputs a triangular wave signal Vosc, the second input module 134 outputs a second power supply voltage, the third input module 135 outputs a second threshold voltage V2, and the fourth input module 136 outputs a second power supply voltage. For example, if the second power supply voltage is grounded GND, the self-zero comparison module 130 can compare whether (Vosc-GND)-(V2-GND) is greater than 0, that is, the voltage of the triangular wave signal Vosc is compared with the second threshold voltage V2. When the voltage of the triangular wave signal Vosc is greater than the second threshold voltage V2, the first difference is greater than zero, the second transistor M2 is turned on, and the first end of the second transistor M2 is a low level. The first transistor M1 is turned off, and the first end of the first transistor M1 is a high level. Then the fourth transistor M4 is turned on, and the first end of the fourth transistor M4 is a low level. The inverting signal of the state control signal When the voltage of the triangle wave signal Vosc is greater than the second threshold voltage V2, the comparison signal of high level is output.
[0116] When the first difference is less than zero, the first transistor M1 is not conducting, the second transistor M2 is not conducting, the first end of the second transistor M2 is at a high level, the third transistor M3 is conducting, the first end of the third transistor M3 is at a low level, the fifth transistor M5 and the sixth transistor M6 are conducting, the first end of the sixth transistor M6 is at a high level, and the NOR device U8 outputs a low level signal. In this way, when the voltage of the triangular wave signal Vosc is less than the second threshold voltage V2, a low level comparison signal is output.
[0117] When the feedback voltage is at a high level, the first input module 133 outputs the second power supply voltage, the second input module 134 outputs the triangular wave signal Vosc, the third input module 135 outputs the second power supply voltage, and the fourth input module 136 outputs the first threshold voltage V1. For example, if the second power supply voltage is grounded GND, the self-zero comparison module 130 can compare whether (GND-Vosc)-(GND-V1) is greater than 0, that is, it can compare whether V1-Vosc is greater than 0, and thus compare the voltage of the triangular wave signal Vosc with the second threshold voltage V2. When the voltage of the triangular wave signal Vosc is less than the first threshold voltage V1, the second transistor M2 is turned on, the first end of the second transistor M2 is at a low level, the fourth transistor M4 is turned on, and the first end of the fourth transistor M4 is at a low level. Inverting signal of the state control signal When the voltage of the triangular wave signal Vosc is lower than the first threshold voltage V1, the OR device U8 outputs a high level signal. In this way, when the voltage of the triangular wave signal Vosc is lower than the first threshold voltage V1, a high level comparison signal is output. Similarly, when the voltage of the triangular wave signal Vosc is higher than the first threshold voltage V1, the OR device U8 can output a low level signal, thereby outputting a low level comparison signal.
[0118] Optionally, refer to Figure 3 The output unit 132 further includes a first current source I1 and a second current source I2, the second end of the first transistor M1 and the second end of the second transistor M2 are connected to the second power supply voltage through the first current source I1, and the second end of the third transistor M3 and the second end of the fourth transistor M4 are connected to the second power supply voltage through the second current source I2. In this way, by setting the first current source I1 and the second current source I2, the current in the output unit 132 is relatively stable, thereby improving the stability of the comparison signal.
[0119] Optionally, refer to Figure 2 , the oscillation circuit further includes a state control module 150;
[0120] The state control module 150 receives the triangular wave signal Vosc, the third threshold voltage V3 and the feedback voltage V Q1 The state control module 150 is connected to the self-return-to-zero comparison module 130, and the state control module 150 is used to generate a voltage signal based on the triangular wave signal Vosc, the third threshold voltage V3 and the feedback voltage V Q1 , outputs a state control signal PH1 to the self-zero comparison module 130 to put the self-zero comparison module 130 in a working state or a reset state.
[0121] Specifically, the state control module 150 can compare the triangular wave signal Vosc with the third threshold voltage V3, and output the state control signal PH1 according to the comparison result of the voltage of the triangular wave signal Vosc and the third threshold voltage V3, combined with the level of the feedback voltage, to achieve the control of the state of the self-zero comparison module 130. For example, when the feedback voltage V Q1 When the triangular wave signal Vosc is low, if the triangular wave signal Vosc is less than the third threshold voltage V3, the state control signal PH1 is low, so that the self-zero comparison module 130 is in a reset state, which is convenient for the storage unit 131 to load the threshold voltage (for example, the second threshold voltage) and the offset voltage. When the triangular wave signal Vosc rises to a value greater than the third threshold voltage V3, the state control signal PH1 is high, so that the self-zero comparison module 130 is in a working state, so that the output unit 132 compares the triangular wave signal Vosc with the second threshold voltage V2 and outputs a comparison signal. When the feedback voltage V Q1 When the triangular wave signal Vosc is high, if the triangular wave signal Vosc is greater than the third threshold voltage V3, the state control signal PH1 is low, so that the self-zero comparison module 130 is in a reset state, which is convenient for the storage unit 131 to load the threshold voltage (for example, the first threshold voltage) and the offset voltage. When the triangular wave signal Vosc decreases to less than the third threshold voltage V3, the state control signal PH1 is high, so that the self-zero comparison module 130 is in a working state, so that the output unit 132 compares the triangular wave signal Vosc with the first threshold voltage V1 and outputs the comparison signal VO1.
[0122] Optionally, refer to Figure 2 , the state control module 150 includes: a comparator 151 and an XOR device 152;
[0123] The first input terminal of the comparator 151 is connected to the first terminal of the energy storage module 120, and the second input terminal of the comparator 151 is connected to the third threshold voltage V3;
[0124] The first input terminal of the XOR device 152 is connected to the feedback voltage V Q1 The second input terminal of the XOR device 152 is connected to the output terminal VO2 of the comparator 151 , and the output terminal of the XOR device 152 is connected to the self-zero comparison module 130 .
[0125] Specifically, the comparator 151 can compare the triangular wave signal Vosc with the third threshold voltage V3. When the voltage of the triangular wave signal Vosc is less than the third threshold voltage V3, the comparator 151 outputs a low level; when the voltage of the triangular wave signal Vosc is greater than the third threshold voltage V3, the comparator 151 outputs a high level.
[0126] XOR device 152 can generate a signal based on the output of comparator 151 and feedback voltage V Q1Output state control signal PH1. When the feedback voltage is high and the comparator 151 outputs a high level, the XOR device 152 outputs a low level; when the feedback voltage is high and the comparator 151 outputs a low level, the XOR device 152 outputs a high level; when the feedback voltage is low and the comparator 151 outputs a low level, the XOR device 152 outputs a low level; when the feedback voltage is low and the comparator 151 outputs a high level, the XOR device 152 outputs a high level. In this way, the output state control signal is realized, and the state of the self-zero comparison module 130 can be controlled. In addition, the comparator 151 does not participate in the frequency adjustment of the oscillation signal, so the offset voltage of the comparator 151 does not affect the frequency of the oscillation signal, so that the comparator 151 can use a device with lower precision, which is conducive to reducing costs and reducing the difficulty of circuit design.
[0127] Based on the above technical solutions, Figure 4 is a schematic diagram of a circuit structure of a comparator provided by an embodiment of the present invention, such as Figure 4 The comparator 151 includes: a seventh transistor M7, an eighth transistor M8, a ninth transistor M9, a tenth transistor M10, an eleventh transistor M11, a twelfth transistor M12, a fourth resistor R4, a fifth resistor R5, an inverter U9, a third current source I3 and a fourth current source I4; the control end of the seventh transistor M7 is connected to the third threshold voltage V3, the control end of the eighth transistor M8 is connected to the first end of the energy storage module 120, the first end of the seventh transistor M7 is connected to the first power supply voltage VDD through the fourth resistor R4, and the second end of the seventh transistor M7 is connected to the second power supply voltage through the third current source I3; the first end of the eighth transistor M8 is connected to the first power supply voltage VDD through the fifth resistor R5, and the second end of the eighth transistor M8 is connected to the second power supply voltage through the third current source I3; the control end of the ninth transistor M9 is connected to the first end of the eighth transistor M8 The first end of the ninth transistor M9 is connected to the first end of the eleventh transistor M11 and the control end of the eleventh transistor M11, the second end of the eleventh transistor M11 is connected to the first power supply voltage VDD, and the second end of the ninth transistor M9 is connected to the second power supply voltage through the fourth current source I4; the control end of the tenth transistor M10 is connected to the first end of the seventh transistor M7, the first end of the tenth transistor M10 is connected to the first end of the twelfth transistor M12, the second end of the twelfth transistor M12 is connected to the first power supply voltage VDD, the control end of the twelfth transistor M12 is connected to the control end of the eleventh transistor M11, and the second end of the tenth transistor M10 is connected to the second power supply voltage through the fourth current source I4; the first end of the twelfth transistor M12 is connected to the input end of the inverter U9, and the output end VO2 of the inverter U9 is connected to the second input end of the XOR device 152.
[0128] Specifically, when the voltage of the triangular wave signal Vosc is greater than the third threshold voltage V3, the eighth transistor M8 is turned on and the seventh transistor M7 is turned off, then the first end of the eighth transistor M8 is at a low level, the first end of the seventh transistor M7 is at a high level, the ninth transistor M9 is not turned on, the tenth transistor M10 is turned on, the first end of the tenth transistor M10 is at a low level, and a high level is output after passing through the inverter U9, so that when the voltage of the triangular wave signal Vosc is greater than the third threshold voltage V3, a high level signal is output.
[0129] When the voltage of the triangular wave signal Vosc is less than the third threshold voltage V3, the eighth transistor M8 is turned off, the seventh transistor M7 is turned on, the first end of the seventh transistor M7 is at a low level, the first end of the eighth transistor M8 is at a high level, the ninth transistor M9 is turned on, the tenth transistor M10 is not turned on, the first end of the ninth transistor M9 is at a low level, the eleventh transistor M11 and the twelfth transistor M12 are turned on, so that the first end of the twelfth transistor M12 is at a high level, and a low level is output after passing through the inverter U9, so that when the voltage of the triangular wave signal Vosc is less than the third threshold voltage V3, a low level signal is output.
[0130] Optionally, refer to Figure 2 , the output module 140 includes a second selector U2, a third selector U3 and a latch U10;
[0131] The first input terminal of the second selector U2 is connected to the second power supply voltage, the second input terminal of the second selector U2 is connected to the output unit 132, and the enable terminal of the second selector U2 is connected to the reverse voltage
[0132] The first input terminal of the third selector U3 is connected to the second power supply voltage, the second input terminal of the third selector U3 is connected to the output unit 132, and the enable terminal of the third selector U3 is connected to the feedback voltage V Q1 ;
[0133] The first input end of the latch U10 is connected to the output end of the second selector U2, the second input end of the latch U10 is connected to the output end of the third selector U3, the first output end of the latch U10 outputs the oscillation signal Vout, and the second output end of the latch U10 outputs the inverted signal Vout1 of the oscillation signal;
[0134] The control terminal of latch U10 is connected to the inverted signal of the reset signal
[0135] Among them, the latch U10 can be an RS latch. When the first input terminal of the latch U10 is connected to a high level, the first output terminal of the latch U10 outputs a high level, and the second output terminal of the latch U10 outputs a low level. When the second input terminal of the latch U10 is connected to a high level, the first output terminal of the latch U10 outputs a low level, and the second output terminal of the latch U10 outputs a high level.
[0136] Specifically, when the feedback voltage is at a low level, the second selector U2 outputs the comparison signal of the self-zero comparison module 130, and the third selector U3 outputs the second power supply voltage. If the voltage of the triangular wave signal Vosc is greater than the second threshold voltage V2, the second selector U2 outputs a high-level comparison signal, and the first output terminal of the latch U10 outputs a high level. Therefore, the feedback voltage is switched to a high level, the second selector U2 outputs the second power supply voltage, and the third selector U3 outputs the comparison signal of the self-zero comparison module 130. If the triangular wave signal Vosc is less than the first threshold voltage V1, the third selector U3 outputs a high-level comparison signal, and the first output terminal of the latch U10 outputs a low level. This is repeated, so that the first output terminal of the latch U10 outputs high and low level oscillation signals, and the second output terminal of the latch U10 outputs an inverted signal of the oscillation signal.
[0137] In addition, the control terminal of latch U10 is connected to the inverted signal of the reset signal The inverted signal of the reset signal When it is low, latch U10 is reset.
[0138] Optionally, refer to Figure 2 , the oscillation circuit further includes a reset module 160;
[0139] The control end of the reset module 160 is connected to the reset signal RST, the first end of the reset module 160 is connected to the first end of the energy storage module 120, and the second end of the reset module 160 is connected to the second power supply voltage; the reset module 160 is used to reset the first end of the energy storage module 120 in response to the first level of the reset signal RST.
[0140] Specifically, when the reset signal RST is at the first level, the reset module 160 is turned on, so that the reset module 160 transmits the second power supply voltage to the first end of the energy storage module 120 to reset the first end of the energy storage module 120. The second power supply voltage is, for example, grounded. In some other embodiments, the second power supply voltage may be a negative voltage.
[0141] Optionally, refer to Figure 2 The energy storage module 120 includes an energy storage capacitor C0, a first end of the energy storage capacitor C0 is connected to the charge and discharge module 110, and a second end of the energy storage capacitor C0 is connected to the second power supply voltage.
[0142] Optionally, refer to Figure 2 The reset module 160 includes a reset transistor 161, a control terminal of the reset transistor 161 is connected to the reset signal RST, a first terminal of the reset transistor 161 is connected to a first terminal of the energy storage module 120, and a second terminal of the reset transistor 161 is connected to a second power supply voltage. For example, if the reset transistor 161 is an N-type transistor, the first level is a high level; if the reset transistor 161 is a P-type transistor, the first level is a low level. Figure 2 2 shows a case where the reset transistor 161 is an N-type transistor, but this is not limiting.
[0143] For example, Figure 5 is a timing diagram of an oscillator circuit provided by an embodiment of the present invention. Optionally, as Figure 5 As shown, in the t1 phase, the reset signal RST is at a high level, and the inverted signal of the reset signal is low level, the energy storage module 120 and the latch U10 are reset, the oscillation signal is low level, that is, the feedback voltage is low level, and the state control signal PH1 is low level. In the t2 stage, the charge and discharge module 110 charges the energy storage module 120, so that the triangular wave signal Vosc gradually increases, the state control signal PH1 is low level, the self-zero comparison module 130 is in a reset state, and the first storage capacitor C1 is loaded with the second threshold voltage V2. In the t3 stage, the voltage of the triangular wave signal Vosc increases to be greater than the third threshold voltage V3, the voltage of the output terminal VO2 of the comparator 151 is high level, so that the state control signal PH1 is high level, the self-zero comparison module 130 is in a working state, and the output unit 132 determines that the voltage of the triangular wave signal Vosc is greater than the second threshold voltage V2, after a delay time td, in the t4 stage, a high-level comparison signal is output, the second selector U2 outputs a high-level comparison signal, and the latch U10 outputs a high-level oscillation signal, so that the feedback voltage becomes a high level. At stage t5, the voltage of the triangular wave signal Vosc is greater than the first threshold voltage V1, and the third selector U3 outputs a low-level comparison signal, so that the latch U10 keeps outputting a high level. At stage t6, the voltage of the triangular wave signal Vosc is less than the first threshold voltage V1, and the third selector U3 outputs a high-level comparison signal, so that the latch U10 outputs a low-level oscillation signal. At stage t7, the voltage of the triangular wave signal Vosc is less than the second threshold voltage V2, and the second selector U2 outputs a low-level comparison signal, and the latch U10 keeps outputting a low level. This is repeated to achieve the output of the oscillation signal.
[0144] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An oscillator circuit, characterized in that: include: A charging and discharging module, an energy storage module, a self-zeroing comparison module and an output module; the self-zeroing comparison module includes a storage unit and an output unit; The charging and discharging module is connected to the power supply voltage, and the charging and discharging module is connected to the energy storage module. The charging and discharging module is used to charge and discharge the energy storage module according to the power supply voltage, so that the energy storage module outputs a triangular wave signal; The energy storage module is connected to the self-zero comparison module, the storage unit is connected to the first threshold voltage, the second threshold voltage and the offset voltage of the output unit, and the output unit is used to output a comparison signal based on the comparison result between the triangular wave signal and the first threshold voltage when the feedback voltage is at the second level, and output a comparison signal based on the comparison result between the triangular wave signal and the second threshold voltage when the feedback voltage is at the first level; wherein the feedback voltage is the voltage of the oscillation signal outputted by the output module last time; The output module is connected to the self-zero comparison module, the output module is connected to the feedback voltage, and the output module is used to output an oscillation signal according to the comparison signal and the feedback voltage.
2. The oscillation circuit according to claim 1, characterized in that: The charging and discharging module includes a first selector, at least two first switches and at least two first resistors; the power supply voltage includes a first power supply voltage and a second power supply voltage; the first power supply voltage is greater than the second power supply voltage; The enable terminal of the first selector is connected to the feedback voltage, the first input terminal of the first selector is connected to the first power supply voltage, and the second input terminal of the first selector is connected to the second power supply voltage; The first end of the first switch is connected to the output end of the first selector, the second end of the first switch is connected to the first end of the energy storage module through the first resistor, and the second end of the energy storage module is connected to the second power supply voltage.
3. The oscillation circuit according to claim 1, characterized in that: The storage unit is used to store a first difference between the voltage of the triangular wave signal and a second threshold voltage based on a first level of the inverted voltage; Based on the second level of the inverted voltage, a second difference between the first threshold voltage and the voltage of the triangular wave signal is stored; wherein the inverted voltage and the feedback voltage are in opposite phases to each other; The output unit is connected to the storage unit, and is used to output the comparison signal according to the first difference based on the first level of the inverting voltage when the self-return-to-zero comparison module is in a working state; and output the comparison signal according to the second difference based on the second level of the inverting voltage.
4. The oscillation circuit according to claim 3, characterized in that: The oscillation circuit further comprises a first input module, a second input module, a third input module and a fourth input module; The control end of the first input module is connected to the inverted voltage, the first input end of the first input module is connected to the second power supply voltage, the second input end of the first input module is connected to the first end of the energy storage module, and the first input module is used to output the voltage of the triangular wave signal based on the first level of the inverted voltage; outputting the second power supply voltage based on the second level of the inverted voltage; The control end of the second input module is connected to the inverted voltage, the first input end of the second input module is connected to the first end of the energy storage module, the second input end of the second input module is connected to the second power supply voltage, and the second input module is used to output the second power supply voltage based on the first level of the inverted voltage; outputting a voltage of the triangular wave signal based on a second level of the inverted voltage; The control end of the third input module is connected to the inverting voltage, the first input end of the third input module is connected to the second power supply voltage, the second input end of the third input module is connected to the second threshold voltage, and the third input module is used to output the second threshold voltage based on the first level of the inverting voltage; outputting the second power supply voltage based on the second level of the inverted voltage; The control end of the fourth input module is connected to the inverting voltage, the first input end of the fourth input module is connected to the first threshold voltage, the second input end of the fourth input module is connected to the second power supply voltage, and the fourth input module is used to output the second power supply voltage based on the first level of the inverting voltage; outputting the first threshold voltage based on a second level of the inverted voltage; The storage unit is connected to output ends of the first input module, the second input module, the third input module and the fourth input module respectively.
5. The oscillation circuit according to claim 4, characterized in that: The storage unit includes a first storage capacitor, a second storage capacitor, a second switch, a third switch, a fourth switch and a fifth switch; The second switch is connected between the output terminal of the first input module and the first terminal of the first storage capacitor; The third switch is connected between the output end of the second input module and the first end of the second storage capacitor, and the second switch and the third switch are used to be turned on when the self-zero comparison module is in a working state, and turned off when the self-zero comparison module is in a reset state; The fourth switch is connected between the output end of the third input module and the first end of the first storage capacitor; The fifth switch is connected between the output end of the fourth input module and the first end of the second storage capacitor. The fourth switch and the fifth switch are used to be turned on when the self-zero comparison module is in a reset state, and turned off when the self-zero comparison module is in a working state.
6. The oscillation circuit according to claim 5, characterized in that: The output unit includes: a first transistor, a second transistor, a second resistor, a third resistor, a sixth switch, a seventh switch, a third transistor, a fourth transistor, a fifth transistor, a sixth transistor and a NOR device; The control end of the first transistor is connected to the second end of the second storage capacitor, the first end of the first transistor is connected to the first power supply voltage through the second resistor, and the second end of the first transistor is connected to the second power supply voltage; The sixth switch is connected between the control terminal of the first transistor and the first terminal of the first transistor; The control end of the second transistor is connected to the first end of the first storage capacitor, the first end of the second transistor is connected to the first power supply voltage through the third resistor, and the second end of the second transistor is connected to the second power supply voltage; The seventh switch is connected between the control terminal of the second transistor and the first terminal of the second transistor, and the sixth switch and the seventh switch are used to be turned on when the self-zero comparison module is in a reset state, and turned off when the self-zero comparison module is in a working state; The control end of the third transistor is connected to the first end of the second transistor, the first end of the third transistor is connected to the control end of the fifth transistor and the first end of the fifth transistor, the second end of the fifth transistor is connected to the first power supply voltage, and the second end of the third transistor is connected to the second power supply voltage; The control end of the fourth transistor is connected to the first end of the first transistor, the first end of the fourth transistor is connected to the first end of the sixth transistor, the second end of the sixth transistor is connected to the first power supply voltage, the control end of the sixth transistor is connected to the control end of the fifth transistor, and the second end of the fourth transistor is connected to the second power supply voltage; The first input terminal of the OR-NON device is connected to the first terminal of the sixth transistor, the second input terminal of the OR-NON device is used to access the inverted signal of the state control signal of the self-return-to-zero comparison module, and the OR-NON device is used to output the comparison signal based on the voltage of the first terminal of the sixth transistor and the voltage of the inverted signal of the state control signal.
7. The oscillation circuit according to claim 3, characterized in that: The oscillation circuit also includes a state control module; The state control module is connected to the triangular wave signal, the third threshold voltage and the feedback voltage, and is connected to the self-zero comparison module. The state control module is used to output a state control signal to the self-zero comparison module based on the triangular wave signal, the third threshold voltage and the feedback voltage, so that the self-zero comparison module is in a working state or a reset state.
8. The oscillation circuit according to claim 7, characterized in that: The state control module includes: a comparator and an XOR device; The first input terminal of the comparator is connected to the first terminal of the energy storage module, and the second input terminal of the comparator is connected to the third threshold voltage; The first input terminal of the XOR device is connected to the feedback voltage, the second input terminal of the XOR device is connected to the output terminal of the comparator, and the output terminal of the XOR device is connected to the self-zero comparison module.
9. The oscillation circuit according to claim 1, characterized in that: The output module includes a second selector, a third selector and a latch; The first input terminal of the second selector is connected to the second power supply voltage, the second input terminal of the second selector is connected to the output unit, and the enable terminal of the second selector is connected to the inverting voltage; The first input terminal of the third selector is connected to the second power supply voltage, the second input terminal of the third selector is connected to the output unit, and the enable terminal of the third selector is connected to the feedback voltage; The first input end of the latch is connected to the output end of the second selector, the second input end of the latch is connected to the output end of the third selector, the first output end of the latch outputs the oscillation signal, and the second output end of the latch outputs an inverted signal of the oscillation signal; The control terminal of the latch is connected to the inverted signal of the reset signal.
10. The oscillation circuit according to claim 1, characterized in that: The oscillation circuit also includes a reset module; The control end of the reset module is connected to a reset signal, the first end of the reset module is connected to the first end of the energy storage module, and the second end of the reset module is connected to a second power supply voltage; the reset module is used to reset the first end of the energy storage module in response to the first level of the reset signal.
Citation Information
Patent Citations
Triangular wave oscillating circuit
CN102361446A
RC (Resistance Capacitance) relaxation oscillator of comparator offset
CN107332541A
High-precision oscillator without reference clock
CN112311360A
Oscillation circuit, control method, chip and electronic equipment
CN116647189A
Relaxation oscillator
US20120086515A1
Cited By
Square wave generating circuit and system
CN120639063A