[ detailed description ] embodiments
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic may be included in at least one implementation of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Unless otherwise specified, the terms connected, and connected as used herein mean electrically connected, directly or indirectly.
Fig. 1 is a circuit diagram of an oscillator according to an embodiment of the invention. The oscillator shown in fig. 1 includes a capacitor C1, a first current source I1, a second current source I2, a comparison circuit 110, a threshold voltage generation circuit 120, and a charge and discharge control circuit (not identified).
The first current source I1 is used to charge the capacitor C1. The second current source I2 is used to discharge the capacitor C1.
The comparison circuit 110 is configured to compare a voltage drop across the capacitor C1 with a low voltage threshold V1 (or a first voltage threshold) and a high voltage threshold V2 (or a second voltage threshold), where an output terminal of the comparison circuit 110 outputs a charging control signal (or a first level signal) when the voltage drop across the capacitor C1 is smaller than the low voltage threshold V1, and the output terminal of the comparison circuit 110 outputs a discharging control signal (or a second level signal) when the voltage drop across the capacitor C1 is larger than the high voltage threshold V2, where the low voltage threshold V1 is smaller than the high voltage threshold V2. In one embodiment, the charge control signal may be a high level signal and the discharge control signal may be a low level signal. In another embodiment, the charge control signal may be a low level signal and the discharge control signal may be a high level signal.
The control terminal of the threshold voltage generating circuit 120 is connected to the output terminal of the comparing circuit 110, and the output terminal thereof outputs the low voltage threshold V1 or the high voltage threshold V2 to the comparing circuit 110, when the output terminal of the comparing circuit 110 outputs the charging control signal, the output terminal of the threshold voltage generating circuit 120 outputs the high voltage threshold V2, and when the output terminal of the comparing circuit 110 outputs the discharging control signal, the output terminal of the threshold voltage generating circuit 120 outputs the low voltage threshold V1.
The charging and discharging control circuit is used for controlling charging and discharging of the capacitor C1, a control end of the charging and discharging control circuit is connected with an output end of the comparison circuit 110, when the output end of the comparison circuit 110 outputs a charging control signal, the capacitor C1 is charged by the first current source I1, and when the output end of the comparison circuit 110 outputs a discharging control signal, the capacitor C1 is discharged by the second current source I2.
In the embodiment shown in fig. 1, the cathode of the first current source I1 is connected to one end of the capacitor C1, and the other end of the capacitor C1 is grounded; the anode of the second current source I2 is connected to one end of the capacitor C1, and the cathode thereof is connected to the other end of the capacitor C1.
In the embodiment shown in fig. 1, the comparison circuit 110 may be a comparator or an operational amplifier, and a first input terminal of the comparison circuit 110 is connected to one terminal of the capacitor C1, and a second input terminal thereof is connected to the output terminal of the threshold voltage generation circuit 120. In the specific embodiment shown in fig. 1, the first input terminal and the second input terminal of the comparison circuit 110 are the non-inverting input terminal and the inverting input terminal of a comparator or an operational amplifier, respectively.
In the specific embodiment shown in fig. 1, the charge and discharge control circuit includes a first switch K1 and a second switch K2, a control terminal of the first switch K1 and a control terminal of the second switch K2 constitute a control terminal of the charge and discharge control circuit, wherein the first switch K1 is connected between a negative electrode of the first current source I1 and one end of the capacitor C1; a second switch K2 is connected in series with a second current source I2 between one end and the other end of the capacitor C1. When the output end of the comparison circuit 110 outputs the charging control signal, the first switch K1 is turned on, the second switch K2 is turned off, the capacitor C1 is charged by the first current source I1, and when the output end of the comparison circuit 110 outputs the discharging control signal, the first switch K1 is turned off, the second switch K2 is turned on, and the capacitor C1 is discharged by the second current source I2.
In the embodiment shown in fig. 1, the threshold voltage generation circuit 120 includes a first reference voltage Vref1, a second reference voltage Vref1, and a level-shifted voltage VF, and the low voltage threshold V1 output by the threshold voltage generation circuit 120 is the sum of the first reference voltage Vref1 and the level-shifted voltage VF (i.e., V1 equals Vref1+ VF); the high voltage threshold V2 output by the threshold voltage generation circuit 120 is the sum of the second reference voltage Vref2 and the level shift voltage VF (i.e., V2 is equal to Vref2+ VF), wherein the level shift voltage VF may be a positive value or a negative value.
In the specific embodiment shown in fig. 1, the threshold voltage generating circuit 120 further includes a level shifting circuit 122, a third switch K3 and a fourth switch K4, a control terminal of the third switch K3 and a control terminal of the fourth switch K4 constitute a control terminal of the threshold voltage generating circuit 120, wherein one terminal of the third switch K3 is connected to the second reference voltage Vref2, the other terminal thereof is connected to the input terminal of the level shifting circuit 122, and the control terminal thereof is connected to the output terminal of the comparing circuit 110; one end of the fourth switch K4 is connected to the first reference voltage Vref1, the other end thereof is connected to the input end of the level shift circuit 122, and the control end thereof is connected to the output end of the comparison circuit 110; the output terminal of the level shift circuit 122 serves as the output terminal of the threshold voltage generation circuit 120, and the level shift circuit 122 is configured to add the voltage at its input terminal to the level-shifted voltage VF generated inside thereof and output the result of the addition through its output terminal.
When the output terminal of the comparison circuit 110 outputs the charging control signal, the third switch K3 is turned on, the fourth switch K4 is turned off, and at this time, the second reference voltage Vref2 is level-shifted by the level shift circuit 122 and then sent to the second input terminal of the comparison circuit 110, that is, the threshold voltage generation circuit 120 outputs the high voltage threshold V2, where the high voltage threshold V2 is the sum of the second reference voltage Vref2 and the level-shifted voltage VF (that is, V2 is Vref2+ VF); when the output terminal of the comparison circuit 110 outputs the discharge control signal, the third switch K3 is turned off, and the fourth switch K4 is turned on, so that the first reference voltage Vref1 is level-shifted by the level shift circuit 122 and then sent to the second input terminal of the comparison circuit 110, that is, the threshold voltage generation circuit 120 outputs the low voltage threshold V1, where the low voltage threshold V1 is the sum of the first reference voltage Vref1 and the level-shifted voltage VF (that is, V1 is Vref1+ VF). In the embodiment shown in fig. 1, the level shift circuit 122 is a dc level shift circuit, and further includes a third current source I3, a cathode of the third current source I3 is connected to the output terminal of the level shift circuit 122, and the third current source I3 provides a bias current for the level shift circuit 122.
In summary, when the third switch K3 is turned on and the fourth switch K4 is turned off, the threshold voltage generation circuit 120 outputs the high voltage threshold V2; when the third switch K3 is turned off and the fourth switch K4 is turned on, the threshold voltage generating circuit 120 outputs the low voltage threshold V1, so that the voltage at the second input terminal of the comparing circuit 110 has two states, i.e., a low voltage threshold V1 and a high voltage threshold V2. The voltage at the first input terminal of the comparison circuit 110 is a voltage drop across the capacitor C1, and when the capacitor C1 is charged or discharged, and the voltage of the capacitor C1 reaches the threshold values of the low voltage threshold V1 and the high voltage threshold V2, the output state of the comparison circuit 110 is inverted, so as to switch the conduction state of the third switch K3 or the fourth switch K4, and send different reference voltages to the level shift circuit 122, so as to generate oscillation repeatedly.
Specifically, when the output end of the comparison circuit 110 outputs the charging control signal, the switches K1 and K3 are turned on, the switches K2 and K4 are turned off, the voltage at the inverting input end of the comparison circuit 110 is the high voltage threshold V2 (i.e., V2 ═ Vref2+ VF), and the capacitor C1 is charged by the first current source I1; when the voltage at the non-inverting input terminal of the comparison circuit 110 (i.e., the voltage of the capacitor C1) exceeds the high voltage threshold V2, the output of the comparison circuit 110 is inverted, that is, the output terminal of the comparison circuit 110 outputs the discharge control signal, so that the switches K1 and K3 are turned off, the switches K2 and K4 are turned on, the voltage at the inverting input terminal of the comparison circuit 110 becomes the low voltage threshold V1 (i.e., V1 is Vref1+ VF), and the capacitor C1 is discharged by the second current source I2; when the voltage at the non-inverting input terminal of the comparing circuit 110 (i.e., the voltage of the capacitor C1) is lower than the low voltage threshold V1, the output of the comparing circuit 110 is inverted again, the output terminal of the comparing circuit 110 outputs the charging control signal again, and the charging mode is entered again.
The oscillating waveform can be taken from the output of the comparison circuit 110 or its associated subsequent stage. In one embodiment, an oscillator output (not shown) is connected to the output of the comparison circuit 110, and the oscillating signal output by the oscillator output is a square wave signal.
In one embodiment, by adjusting the size and the ratio of the first current source I1 and the second current source I2, the adjustment of the frequency and the duty ratio of the oscillation signal can be realized; by adjusting the first reference voltage Vref1 and/or the second reference voltage Vref2, frequency adjustment of the oscillation signal can be achieved.
It should be noted that the first switch K1 and the second switch K2 can only be turned on one at the same time, the third switch K3 and the fourth switch K4 can only be turned on one at the same time, the inverters INV1 and INV2 are used to control the switches K1, K2, K3, and K4, and the specific number and type are not limited, and only one of the switches K1 and K2 and one of the switches K3 and K4 need to be turned on at the same time.
Fig. 2 is a schematic circuit diagram of an oscillator according to another embodiment of the invention. Fig. 2 is substantially the same as the oscillator circuit shown in fig. 1, except that: the charge and discharge control circuit shown in fig. 2 omits the switch K1 in fig. 1, and the first current source I1 is always in a conducting state; the first reference voltage Vref1 in fig. 2 selects the ground level (or ground); the comparator circuit 210 in fig. 2 employs a comparator.
Since the charge and discharge control circuit shown in fig. 2 eliminates the switch K1 in fig. 1, the charge and discharge control circuit shown in fig. 2 includes only the second switch K2. The second switch K2 and the second current source I2 are connected in series between one end and the other end of the capacitor C1, when the output end of the comparison circuit 110 outputs a charging control signal, the second switch K2 is turned off, the capacitor C1 is charged by the first current source I1, when the output end of the comparison circuit 110 outputs a discharging control signal, the second switch K2 is turned on, the capacitor C1 is discharged by the second current source I2, and since the first current source I1 is always in an on state, the discharging current is I2-I1, wherein I2 is the current value of the second current source I2, and I1 is the current value of the first current source I1.
It should be noted that, in the charge and discharge control circuit in fig. 2, the switch K1 in fig. 1 is eliminated, and only one switch K2 is provided, so that the current magnitudes of the first current source I1 and the second current source I2 need to be different, specifically, the current of the second current source I2 is greater than the current of the first current source I1. Since the charge and discharge control circuit in fig. 1 includes two switches K1 and K2, there is no limitation on the current magnitudes of the first current source I1 and the second current source I2. In yet another embodiment of the oscillator of the present invention, the charge and discharge control circuit may omit the switch K2 in fig. 1, and only have a switch K1, the current of the second current source I2 is smaller than the current of the first current source I1.
Since the first reference voltage Vref1 in fig. 2 selects the ground level, the low voltage threshold V1 of the inverting input of the comparator 210 is equal to the level-shifted voltage VF (i.e., V1 is equal to VF), and the high voltage threshold V2 is the sum of the second reference voltage Vref2 and the level-shifted voltage VF (i.e., V2 is equal to Vref2+ VF).
When the output end of the comparator 210 outputs the charging control signal, the switch K3 is turned on, the switches K2 and K4 are turned off, the voltage at the inverting input end of the comparator 210 is a high voltage threshold V2 (i.e., V2 — Vref2+ VF), and the capacitor C1 is charged by the first current source I1; when the voltage at the non-inverting input terminal of the comparator 210 (i.e., the voltage of the capacitor C1) exceeds the high voltage threshold V2, the output of the comparator 210 is inverted, that is, the output terminal of the comparator 210 outputs the discharge control signal, so that the switch K3 is turned off, the switches K2 and K4 are turned on, the voltage at the inverting input terminal of the comparator 210 becomes the low voltage threshold V1 (i.e., V1 is VF), the capacitor C1 is discharged by the second current source I2, and the discharge current is I2-I1 because the first current source I1 is always in the on state; when the voltage at the non-inverting input terminal of the comparator 210 (i.e., the voltage of the capacitor C1) is lower than the low voltage threshold V1, the output of the comparator 210 is inverted again, the output terminal of the comparator 210 outputs the charging control signal again, and the charging mode is entered again.
In one embodiment, by adjusting the size and the ratio of the first current source I1 and the second current source I2, the adjustment of the frequency and the duty ratio of the oscillation signal can be realized; by adjusting the second reference voltage Vref2, the frequency of the oscillation signal can be easily changed.
In the embodiment shown in fig. 1 and 2, due to the level shift circuit 122, the voltage jump of the oscillator will be isolated by the level shift circuit 122, and will not affect the reference voltages Vref1, Vref2 and their associated stability of the result.
The oscillator design of the invention can improve the stability of the oscillator (the reference voltages Vref1 and Vref2 are not interfered, and the stability of the oscillator is improved in turn); on the other hand, the frequency of the oscillation signal can be accurately controlled by adjusting the reference voltages Vref1, Vref 2; in addition, the structure has stable frequency output in a wide power supply voltage range.
In summary, the oscillator of the present invention integrates the advantages of the voltage-controlled oscillator and the current-controlled oscillator based on the conventional voltage-controlled or current-controlled oscillator, and introduces the level shift structure, so that the present invention has the following advantages:
the stability is higher, and the frequency can be basically not influenced by the power supply voltage (within a normal working range);
secondly, the precision is higher, and the adjustment is easy;
and thirdly, the isolation is performed by the level shift circuit 120, so that the influence on peripheral circuits is small, and particularly, the reference voltages Vref1 and Vref2 are not influenced.
And adjusting the frequency and the duty ratio of the oscillation signal by adjusting the size and the proportion of the current source I, I2.
In the present invention, the terms "connected", "connecting", and the like mean electrical connections, and direct or indirect electrical connections unless otherwise specified.
It should be noted that those skilled in the art can make modifications to the embodiments of the present invention without departing from the scope of the appended claims. Accordingly, the scope of the appended claims is not to be limited to the specific embodiments described above.