Relaxation oscillator and electronic device including relaxation oscillator
10819347 ยท 2020-10-27
Assignee
Inventors
Cpc classification
H03L1/027
ELECTRICITY
H03K3/011
ELECTRICITY
G06F1/04
PHYSICS
International classification
Abstract
Provided is a relaxation oscillator that is very small in temperature deviation of an oscillation period. The relaxation oscillator includes an oscillation circuit, a variable frequency divider, and a counter. The oscillation circuit is configured to switch between a first clock signal having a negative value as a first-order temperature coefficient of an oscillation period, and a second clock signal having a positive value as a first-order temperature coefficient of an oscillation period, based on a signal from the counter, and to output the switched-to clock signal as a third clock signal. The variable frequency divider is configured to divide the frequency of the third clock signal that is output from the oscillation circuit, and to output the frequency-divided third clock signal as a clock signal. The counter is reset by the clock signal.
Claims
1. A relaxation oscillator, comprising: an oscillation circuit; a variable frequency divider; and a counter, the oscillation circuit including: a clock generation circuit configured to generate a first clock signal having a first oscillation period having a positive value as a first-order temperature coefficient and having a second oscillation period having a negative value as a second-order temperature coefficient; and an output terminal configured to output the first clock signal, the variable frequency divider including a divider setting terminal from which a division number is provided, the variable frequency divider being configured to divide a frequency of the first clock signal into a number determined by the division number provided from the divider setting terminal, and to output a second clock signal obtained by dividing the frequency of the first clock signal as an output of the relaxation oscillator, the counter including a counter setting terminal from which count data is provided and a reset terminal from which the second clock signal is provided, the counter being configured to output one of a first and second switching signals, the first switching signal being switched in accordance with a result of counting the first clock signal with reference to the count data provided from the counter setting terminal, the second switching signal being switched in accordance with the second clock signal provided from the reset terminal.
2. The relaxation oscillator according to claim 1, further comprising a temperature sensor, a first circuit, and a second circuit, wherein the temperature sensor is configured to supply temperature data to the first circuit, wherein the first circuit is configured to supply a correction value for correcting the count data to the second circuit, and wherein the second circuit is configured to supply the division number to the variable frequency divider, and to supply the count data corrected with the correction value to the counter.
3. The relaxation oscillator according to claim 2, wherein the first circuit includes a second memory and a calculation circuit, wherein the second circuit includes a first memory and an adder, wherein the first memory is configured to hold the division number to be set to the variable frequency divider and the count data to be set to the counter, wherein the second memory is configured to hold a value to be used to calculate the correction value in the calculation circuit, wherein the first circuit is configured to calculate the correction value in the calculation circuit, based on the temperature data from the temperature sensor and on the value held in the second memory, and to output the correction value to the second circuit, and wherein the second circuit is configured to supply, to the counter, a calculation value obtained by the adder by adding the correction value and a value of the first memory.
4. The relaxation oscillator according to claim 2, wherein the temperature sensor includes a second oscillation circuit configured to output a third clock signal and a second counter to which the third clock signal is supplied.
5. The relaxation oscillator according to claim 3, wherein the temperature sensor includes a second oscillation circuit configured to output a third clock signal and a second counter to which the third clock is supplied.
6. The relaxation oscillator according to claim 3, wherein the calculation circuit includes a subtracter.
7. The relaxation oscillator according to claim 1, wherein the clock generation circuit includes a first resistor to generate the first clock signal.
8. The relaxation oscillator according to claim 1, wherein the clock generation circuit includes a second resistor to generate the second clock signal.
9. The relaxation oscillator according to claim 1, wherein a ratio between a product that obtained by multiplying the second oscillation period by the second-order temperature coefficient for a temperature change in the second oscillation period and a product that obtained by multiplying the first oscillation period by the first-order temperature coefficient for a temperature change in the first oscillation period, is equal in absolute value to, and is opposite in terms of plus and minus signs from, a ratio between the first oscillation period and the second oscillation period.
10. An electronic device, comprising: the relaxation oscillator of claim 1; and a clock signal generation circuit configured to generate a clock signal based upon the clock of the relaxation oscillator and a value to be set.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
(14) Now, a relaxation oscillator according to at least one embodiment of the present invention is described with reference to the drawings.
(15) (First Embodiment)
(16)
(17) If a signal MODE input to an IN terminal 91 is at the High level, the relaxation oscillation circuit 1 outputs a clock signal having an oscillation period. P.sub.1 to an OUT terminal 92. The oscillation period P.sub.1 is an oscillation period having a negative value as a first-order temperature coefficient. If the signal MODE is at the Low level, the relaxation oscillation circuit 1 outputs a clock signal having an oscillation period P.sub.2 to the OUT terminal 92. The oscillation period P.sub.2 is an oscillation period having a positive value as a first-order temperature coefficient. Switching from the oscillation period P.sub.1 to the oscillation period P.sub.2, or switching from the oscillation period P.sub.2 to the oscillation period P.sub.1, is synchronized with the rise or fall of a clock signal of the relaxation oscillation circuit 1 itself, and the oscillation periods are switched seamlessly without stopping outputting the clock signal.
(18) The variable frequency divider 2 divides the frequency of a clock signal that has been input from the OUT terminal 92 of the relaxation oscillation circuit 1 to a DIN terminal 93 and that has the oscillation period P.sub.1 or the oscillation period P.sub.2 into N, and outputs the processed clock signal to a DOUT terminal 94 as a clock signal TIME having an oscillation period P. The DOUT terminal 94 is connected to a reset terminal of the counter 3. i.e., an RST terminal 98. The division number N of the variable frequency divider 2 is set with a signal input to an NVAL terminal 95 serving as a setting input terminal of the divider 2.
(19) The counter 3 outputs the signal MODE at the High level to an MSIG terminal 96 in synchronization with the rise of the signal input to the RST terminal 98, clears a count value on the counter, and executes counting in synchronization with the rise of a clock signal input to a CIN terminal 97. When the count value on the counter reaches count data set to an NlVAL terminal 99, the counter 3 outputs the signal MODE at the Low level. The count data set to the NlVAL terminal 99 of the counter 3 serves as a clock number of clock signals that are output in an oscillation period P.sub.1 from the relaxation oscillation circuit 1.
(20)
(21) The current source circuit 11 includes a variable resistor 16, an operation amplifier 17, and PMOS transistors 18 and 19. The reference voltage V.sub.REF is supplied to the current source circuit 11 from the reference voltage source 10, and a power supply voltage VDD is supplied to the current source circuit 11 from the outside. The current source circuit 11 forms a negative feedback loop through the action of the operation amplifier 17 and the PMOS transistor 18, so that a voltage applied to the variable resistor 16 is always equal to the reference voltage V.sub.REF. This means that, when a resistance value of the variable resistor 16 is represented by R.sub.1, a current I.sub.01 flowing through the variable resistor 16 is expressed as reference voltage V.sub.REF/resistance value R.sub.1. The current I.sub.01 flowing through the variable resistor 16 is multiplied by n.sub.1 which is a channel width ratio n.sub.1 of the PMOS transistor 18 and the PMOS transistor 19 to generate a current I.sub.1 which is output from the current source circuit 11. The resistance value R.sub.1 of the variable resistor 16 varies depending on temperature, and may be expressed with the use of a first-order temperature coefficient al and a second-order temperature coefficient .sub.2 which are described later. The first-order temperature coefficient .sub.1 of the resistance value R.sub.1 of the variable resistor 16 takes a negative value.
(22) The current source circuit 12 includes a variable resistor 20, an operation amplifier 21, and PMOS transistors 22 and 23. The reference voltage V.sub.REF is supplied to the current source circuit 12 from the reference voltage source 10, and the power supply voltage VDD is supplied to the current source circuit 12 from the outside. The current source circuit 12 has the same configuration as that of the current source circuit 11. The only difference is that the variable resistor 20 of the current source circuit 12 and the variable resistor 16 of the current source circuit 11 have first-order temperature coefficients opposite from each other in terms of the plus and minus signs. A principle of generation of a current I.sub.02 flowing through the variable 20 of the current source circuit 12 and a principle of generation of a current I.sub.2 output from the current source circuit 12 are the same as in the current source circuit 11, and descriptions thereof are accordingly omitted. A resistance value R.sub.2 of the variable resistor 20 varies depending on temperature, and may be expressed with the use of a first-order temperature coefficient .sub.1 and a second-order temperature coefficient .sub.2 which are described later. The first-order temperature coefficient .sub.1 of the resistance value R.sub.2 of the variable resistor 20 takes a positive value.
(23) The capacitor charge/discharge circuit 13 includes switches 24 to 29, a variable capacitor 30, and a variable capacitor 31. The switch 24 is controlled with a signal CLKB1 from the gating circuit 15 described later. The switch 25 is controlled with a signal CLK1 from the gating circuit 15 described later, and has a role of supplying the current I.sub.1 to one of the variable capacitor 30 and the variable capacitor 31. The switch 26 is controlled with a signal CLK2 from the gating circuit 15 described later. The switch 27 is controlled with a signal CLKB2 from the gating circuit 15 described later, and has a role of supplying the current 12 which is output from the current source circuit 12, to one of the variable capacitor 30 and the variable capacitor 31. The switch 28 is controlled with a signal CLK from an oscillation output terminal 40 of the charge voltage detection circuit 14 described later, and is used to discharge charges with which the variable capacitor 30 has been charged. The switch 29 is controlled with a signal CLKB from an oscillation output terminal 41 of the charge voltage detection circuit 14 described later, and discharges charges with which the variable capacitor 31 has been charged.
(24) The charge voltage detection circuit 14 includes a comparator 32; a comparator 33; an RS latch circuit including a NAND gate 38 and a NAND gate 39; a reference voltage source 34; and a reference voltage source 35. Output from an output terminal 36 of the comparator 32 is at the Low level when a charge voltage of the variable capacitor 30 exceeds the reference voltage V.sub.REF of the reference voltage source 34. Output from an output terminal 37 of the comparator 33 is at the Low level when a charge voltage of the variable capacitor 31 exceeds the reference voltage V.sub.REF of the reference voltage source 35. The RS latch circuit includes the NAND gate 38 and the NAND gate 39. In the RS latch circuit, when one of the oscillation output terminal 40 and the oscillation output terminal 41 is at the High level, the other is at the Low level. The states of the oscillation output terminal 40 and the oscillation output terminal 41 are switched with each other at the instant of change to the Low level at one of the output terminal 36 of the comparator 32 and the output terminal 37 of the comparator 33. The reference voltage source 34 and reference voltage source 35 included in the charge voltage detection circuit 14 are the same power source as the reference voltage source 10. The three reference voltage sources are individual expressions of the same reference voltage source on the drawing.
(25) The gating circuit 15 serving as the control circuit switches the oscillation mode of the relaxation oscillation circuit 1 as indicated by the signal MODE that is input to the IN terminal 91. The gating circuit 15 controls the switching on and off of the switches 24 to 27 of the charge voltage detection circuit 13 by outputting the signal CLK from the oscillation output terminal 40 of the RS latch circuit as one of the signal CLK1 used to control the switch 25, and the signal CLK2 used to control the switch 26, and by outputting the signal CLKB from the oscillation output terminal 41 of the RS latch circuit as one of the signal CLKB1 used to control the switch 24, and the signal CLKB2 used to control the switch 27.
(26)
(27) The relaxation oscillation circuit 1 enters an oscillation mode when the signal MODE is at the High level. In the I.sub.1 oscillation mode, the signal CLK is output as the signal CLK1, the signal CLKB is output as the signal CLKB1, and the signal CLK2 and the signal CLKB2 are fixed at the Low level. In short, the current I.sub.1 output from the current source circuit 11 is alternately supplied to the variable capacitor 30 and the variable capacitor 31 through control in which the switch 24 and the switch 25 are alternately switched on. The current 12 output from the current source circuit 12 is not supplied to the variable capacitor 30 and the variable capacitor 31 because the signal CLK2 and the signal CLKB2 respectively are fixed at the Low level. The capacitor charge/discharge circuit 13 operates solely on the current I.sub.1 from the current source circuit 11.
(28) The relaxation oscillation circuit 1 enters an 12 oscillation mode when the signal MODE is at the Low level. In the 12 oscillation mode, the signal CLK is output as the signal CLK2, the signal CLKB is output as the signal CLKB2, and the signal CLK1 and the signal CLKB1 are fixed at the Low level. In short, the current I.sub.2 output from the current source circuit 12 is alternately supplied to the variable capacitor 30 and the variable capacitor 31 through control in which the switch 26 and the switch 27 are alternately switched on. The current I.sub.1 output from the current source circuit 11 is not supplied to the variable capacitor 30 and the variable capacitor 31 because the signal CLK1 and the signal CLKB1 respectively are fixed at the Low level. The capacitor charge/discharge circuit 13 operates solely on the current I.sub.2 from the current source circuit 12.
(29) The operation of the relaxation oscillation circuit 1 of
(30) In a case where the signal CLK at the oscillation output terminal 40 is at the Low level and the signal CLKB at the oscillation output terminal 41 is at the High level, the signal CLK1 is at the Low level, the signal CLKB1 is at the High level, the signal CLK2 and the signal CLKB2 are fixed at the Low level, the signal CLK is at the Low level, and the signal CLKB is at the High level. In this case, the switch 25 is switched off, the switch 24 is switched on, the switches 26 and 27 are switched off, the switch 28 is switched off, and the switch 29 is switched on. The variable capacitor 30 is charged with the current I.sub.1 output from the current source circuit 11. The charges in the variable capacitor 31 are discharged by the flipping of the switch 29 to zero.
(31) When the charging of the variable capacitor 30 progresses and the charge potential V.sub.C1 of the variable capacitor 30 reaches the reference voltage V.sub.REF, the potential of the signal CO1 at the output terminal 36 of the comparator 32 drops to the Low level for an instant, with the result that the logic levels of the signal CLK at the oscillation output terminal 40 and the signal CLKB at the oscillation output terminal 41 are inverted in the RS latch circuit including the NAND gates 38 and 39, thereby changing the ON/OFF state of the switch 24 to OFF, the ON/OFF state of the switch 25 to ON, the ON/OFF state of the switch 28 to ON, and the ON/OFF state of the switch 29 to OFF. The logic level inversion of the signal CLK at the oscillation output terminal 40 to the High level and the logic level inversion of the signal CLKB at the oscillation output terminal 41 to the Low level cause the charges with which the variable capacitor 30 has been charged to discharge by the flipping of the switch 28, and the charge potential V.sub.C1 decreases to zero, and cause the current I.sub.1 output from the current source circuit 11 to charge the variable capacitor 31.
(32) When the charging of the variable capacitor 31 progresses and the charge potential V.sub.C2 of the variable capacitor 31 reaches the reference voltage V.sub.REF, the potential of the signal CO2 at the output terminal 37 of the comparator 33 drops to the Low level for an instant, with the result that the logic levels of the signal CLK at the oscillation output terminal 40 and the signal CLKB at the oscillation output terminal 41 are inverted in the RS latch circuit including the NAND gates 38 and 39, thereby changing the ON/OFF state of the switch 24 to ON, the ON/OFF state of the switch 25 to OFF, the ON/OFF state of the switch 28 to OFF, and the ON/OFF state of the switch 29 to OFF. The logic level inversion of the signal CLK at the oscillation output terminal 40 to the Low level and the logic level inversion of the signal CLKB at the oscillation output terminal 41 to the High level cause the charges with which the variable capacitor 31 has been charged to discharge by the flipping of the switch 29, and the charge potential V.sub.C2 decreases to zero, and cause the current I.sub.1 output from the current source circuit 11 to charge the variable capacitor 30.
(33) The relaxation oscillation circuit 1 repeats the series of operations described above, to thereby alternate between a period (P.sub.1P) in which the variable capacitor 30 is charged with the current I.sub.1 and a period (P.sub.1N) in which the variable capacitor 31 is charged with the current I.sub.1, and maintain the oscillation state throughout the oscillation period P.sub.1 which is expressed by P.sub.1=P.sub.1P+P.sub.1N.
(34) When a signal input through the IN terminal 91 to the gating circuit 15 is at the Low level, the oscillation operation of the relaxation oscillation circuit 1 in the I.sub.2 oscillation mode is similar to the operation described above that is executed when a signal input through the IN terminal 91 is at the High level, except that the current I.sub.1, the signal CLK1, and the signal CLKB1 in the description described above are replaced by the current I.sub.2, the signal CLK2, and the signal CLKB2, respectively. A detailed description on the oscillation operation in the I.sub.2 oscillation mode is therefore omitted. The relaxation oscillation circuit 1 alternates between a period (P.sub.2P) in which the variable capacitor 30 is charged with the current I.sub.2 and a period (P.sub.2N) in which the variable capacitor 31 is charged with the current I.sub.2, and maintains the oscillation state throughout the oscillation period P.sub.2 which is expressed by P.sub.2=P.sub.2P+P.sub.2N.
(35) A description complemented by mathematical expressions is described below on a compensation principle to compensate for a deviation of the oscillation period that is induced by a temperature change in the relaxation oscillator according to the first embodiment of the present invention. The premise here is that the capacitors are so much smaller in temperature coefficient than resistors that the temperature coefficients of the capacitors are negligible.
(36) Expression (2) is an expression that expresses the resistance value R.sub.1 of the variable resistor 16 taking the first-order and second-order temperature coefficients into consideration. Expression (3) is an expression that expresses the resistance value R.sub.2 of the variable resistor 20 taking the first-order and second-order temperature coefficients into consideration.
R.sub.1=R.sub.01(1+.sub.1T+.sub.2T.sup.2) (2)
R.sub.2=R.sub.02(1+.sub.1T+.sub.2T.sup.2) (3)
(37) In Expression (2) and Expression (3):
(38) T represents a temperature variation amount from a reference temperature T.sub.0,
(39) R.sub.01 represents a resistance value of the variable resistor 16 at the reference temperature,
(40) R.sub.02 represents a resistance value of the variable resistor 20 at the reference temperature,
(41) .sub.1 represents a first-order temperature coefficient of the variable resistor 16,
(42) .sub.2 represents a second-order temperature coefficient of the variable resistor 16,
(43) .sub.1 represents a first-order temperature coefficient of the variable resistor 20, and
(44) .sub.2 represents a second-order temperature coefficient of the variable resistor 20.
(45) The relaxation oscillation circuit 1 has the oscillation period P.sub.1 as the oscillation period in the I.sub.1 oscillation mode (in which the signal MODE is at the High level), and has the oscillation period P.sub.2 as the oscillation period in the I.sub.2 oscillation mode (in which the signal MODE is at the Low level). The oscillation period P.sub.1 and the oscillation period P.sub.2 are expressed by Expression (4) and Expression (5), respectively.
P.sub.1=P.sub.01(1+.sub.1T+.sub.2T.sup.2) (4)
P.sub.2=P.sub.02(1+.sub.1T+.sub.2T.sup.2) (5)
(46) In Expression (4) and Expression (5), P.sub.01 represents the value of the oscillation period P.sub.1 at the reference temperature T.sub.0 and P.sub.02 represents the value of the oscillation period P.sub.2 at the reference temperature T.sub.0. The values P.sub.01 and P.sub.02 are expressed by Expression (6) and Expression (7), respectively.
(47) Expression (6) and Expression (7) indicate that the oscillation period P.sub.1 and the oscillation period P.sub.2 are changeable at the same ratio by varying the sum of the capacitances of the variable capacitor 30 and the variable capacitor 31, that the oscillation period P.sub.1 is changeable by varying the resistance value R.sub.1 of the variable resistor 16, and that the oscillation period P.sub.2 is changeable by varying the resistance value R.sub.2 of the variable resistor 20.
(48)
(49) In Expression (6) and Expression (7):
(50) C.sub.1 represents a capacitance value of the variable capacitor 30,
(51) C.sub.2 represents a capacitance value of the variable capacitor 31,
(52) n.sub.1 represents a ratio in channel width of the current-mirror circuit of the current source circuit 11 ((gate width of PMOS transistor 19)/(gate width of PMOS transistor 18)), and
(53) n.sub.2 represents a ratio in channel width of the current-mirror circuit of the current source circuit 12 ((gate width of PMOS transistor 23)/(gate width of PMOS transistor 22)).
(54) As indicated by Expression (2) and Expression (4), the temperature coefficient of the oscillation period P.sub.1 of the relaxation oscillation circuit 1 is the same as the temperature coefficient of the resistance value R.sub.1 of the variable resistor 16. As indicated by Expression (3) and Expression (5), the temperature coefficient of the oscillation period P.sub.2 of the relaxation oscillation circuit 1 is the same as the temperature coefficient of the resistance value R.sub.2 of the variable resistor 20.
(55) The relaxation oscillation circuit 1 illustrated in
(56) A compensation principle to compensate for a deviation of the oscillation period that is induced by a temperature change in the relaxation oscillation circuit 1 in the first embodiment is described with reference to a timing chart illustrated in
(57) A principle of compensation for a first-order temperature deviation of the oscillation period of the relaxation oscillation circuit 1 is described first. The relaxation oscillation circuit 1 outputs the signal CLK having the oscillation period P.sub.1 from the OUT terminal 92 when a signal input to the IN terminal 91 is at the High level. The counter 3 executes counting in synchronization with the rise of the signal CLK output from the relaxation oscillation circuit 1.
(58) The clock number N.sub.1 in the oscillation period P.sub.1 is set as count data to the counter 3 from the outside through the N1VAL terminal 99 serving as a setting terminal of the counter 3. When the count value on the counter 3 reaches the count data, the signal MODE output from the MSIG terminal 96 is changed to the Low level. The signal MODE at the Low level is input to the IN terminal 91, and the relaxation oscillation circuit 1 switches from the oscillation period P.sub.1 to the oscillation period P.sub.2 when the next oscillation period begins.
(59) The variable frequency divider 2 divides the frequency of a clock signal of the relaxation oscillation circuit 1 into N and, at the time the sum of counted clock numbers of clock signals in the oscillation period P.sub.1 and the oscillation period P.sub.2 reaches N, outputs the clock signal TIME at the High level to the DOUT terminal 94. An output signal from the variable frequency divider 2 is input to the RST terminal 98 of the counter 3 to reset the count value on the counter 3 to zero. At the same time, the counter 3 updates the level of the signal MODE at the MSIG terminal 96 to the High level, and starts the next counting operation cycle.
(60) As is clear from
N=N.sub.1+N.sub.2 (8)
(61) The oscillation period P of output from the relaxation oscillator according to the first embodiment of the present invention is expressed by Expression (9) because the oscillation period P.sub.1 and oscillation period P.sub.2 of the relaxation oscillation circuit 1 are expressed by Expression (4) and Expression (5) described above.
(62)
(63) A condition for canceling the first-order temperature deviation of the oscillation period P is the value of the third term (term with T) of Expression (9) being zero. The condition is expressed by Expression (10).
(64)
(65) A condition under which Expression (10) is established is the right side of Expression (10) being a positive value. In other words, a condition for canceling the first-order temperature deviation of the oscillation period P corresponds to a case in which one of a first-order temperature coefficient .sub.1 of the oscillation period P.sub.1 (i.e., the first-order temperature coefficient .sub.1 of the resistance value of the variable resistor 16) and a first-order temperature coefficient .sub.1 of the oscillation period P.sub.2 (i.e., the first-order temperature coefficient .sub.1 of the resistance value of the variable resistor 20) is a negative value whereas the other is a positive value and, on top of that, the ratio between the clock number N.sub.1 in the oscillation period P.sub.1 of the relaxation oscillation circuit 1 and the clock number N.sub.2 in the oscillation period P.sub.2 thereof (clock number N.sub.2 in the oscillation period P.sub.2 is a value obtained by subtracting the clock number N.sub.1 in the oscillation period P.sub.1 from the division number N) is equal to the ratio between a product that is obtained by multiplying the first-order temperature coefficient .sub.1 of the oscillation period P.sub.2 of the relaxation oscillation circuit 1 by the oscillation period value P.sub.02 and a product that is obtained by multiplying the first-order temperature coefficient .sub.1 of the oscillation period P.sub.1 of the relaxation oscillation circuit 1 by the oscillation period value P.sub.01 at the reference temperature T.sub.0.
(66) A principle of compensation for a second-order temperature deviation of the oscillation period of the relaxation oscillation circuit 1 is described next. The clock number N.sub.1 in the oscillation period P.sub.1 and the clock number N.sub.2 in the oscillation period P.sub.2 that cause the first-order temperature deviation of the oscillation period to be zero at the reference temperature T.sub.0 (T=0) are defined as a clock number N.sub.01 and a clock number N.sub.02, respectively. The sum of the clock number N.sub.01 and the clock number N.sub.02 has a relationship expressed by Expression (11) as in Expression (8). The clock number N.sub.01 and the clock number N.sub.02 are expressed by Expression (12) and Expression (13), respectively.
(67)
(68) A condition for cancelling the first-order and second-order temperature deviations of the oscillation period at the same time is the values of the third term (the term with T) and the fourth term (the term with T.sup.2) in Expression (9) being both zero. Incidentally, the third and fourth terms in Expression (9) vary depending on temperature. Approximate solutions for conditions of the clock number N.sub.1 in the oscillation period P.sub.1 and the clock number N.sub.2 in the oscillation period P.sub.2 under which the third term and the fourth term in Expression (9) are zero are expressed by Expression (14) and Expression (15).
(69)
(70)
(71) In Expression (14) and Expression (15), .sub.1, .sub.2, N.sub.1, and N.sub.2 are defined as follows:
(72) .sub.1: a temperature coefficient of the clock number N.sub.1 in the oscillation period P.sub.1 for compensating for the second-order temperature deviation of the oscillation period P.
(73)
(74) .sub.2: a temperature coefficient of the clock number N.sub.2 in the oscillation period P.sub.2 for compensating for the second-order temperature deviation of the oscillation period P.
(75)
(76) N.sub.1: a variable amount of the clock number N.sub.1 in the oscillation period P.sub.1 for compensating (for reducing to zero by cancellation) for the second-order temperature variation of the oscillation period P.sub.1.
(77) N.sub.2: a variable amount of the clock number N.sub.2 in the oscillation period P.sub.2 for compensating (for reducing to zero by cancellation) for the second-order temperature variation of the oscillation period P.sub.2.
(78) Expression (14) and. Expression (15) indicate that the second-order temperature deviation of the oscillation period P can be reduced to zero through compensation by setting the value of N.sub.1 to the clock number N.sub.01 at which the first-order temperature deviation of the oscillation period P is zero, varying N.sub.1 by N.sub.1 (=N.sub.01.sub.1T) in proportion to the temperature variation amount, setting the value of N.sub.2 to the clock number N.sub.02 at which the first-order temperature deviation of the oscillation period P is zero, and varying N.sub.2 by N.sub.2 (=N.sub.02.sub.2T) in proportion to the temperature variation amount.
(79) Expression (14) and Expression (15) described above express the conditions for compensating for the second-order temperature deviation of the oscillation period P. However, when Expression (14) and Expression (15) are substituted in Expression (9), a state in which the oscillation period P is constant regardless of temperature is not accomplished because the temperature change amount T is included in the second term in each of Expression (14) and Expression (15). Expression (9) in which Expression (14) and Expression (15) substituted shows that the magnitudes of the first term and the second term in Expression (9) vary depending on temperature. In short, a condition, for giving zero as the value of the third term (the term with T) in Expression (18) obtained by substituting Expression (14) and Expression (15) for the first term and the second term in Expression (9), is required as well in order to keep the oscillation period P constant regardless of temperature.
(80)
(81) A condition expressed by Expression (19) is derived as the condition for giving zero as the value of the third term in Expression (18). In other words, that the oscillation period P.sub.1 and oscillation period P.sub.2 of the relaxation oscillation circuit 1 are equal to each other at the reference temperature T.sub.0 is an indispensable condition. It is also analytically derived that a relationship expressed by Expression (20) is established when the condition of Expression (19) is guaranteed.
(82)
(83) N: the absolute value of a variable amount of the clock number N.sub.1 in the oscillation period P.sub.1 or the clock number N.sub.2 in the oscillation period P.sub.2 for compensation in which the second-order temperature deviation of the oscillation period P is reduced to zero by cancellation.
(84) The relationship expressed by Expression (20) indicates that the variable amount N.sub.1 of the clock number N.sub.1 in the oscillation period P.sub.1 for compensating for the second-order temperature deviation of the oscillation period P and the variable amount N.sub.2 of the clock number N.sub.2 in the oscillation period P.sub.2 for compensating for the second-order temperature deviation of the oscillation period P are equal to each other in magnification and are opposite from each other in terms of the plus and minus signs. The conditions for cancelling the first-order and second-order temperature deviations described above are summarized with reference to the configuration of
(85) First, the oscillation period P is adjusted at the reference temperature T.sub.0. The oscillation period value P.sub.01 and the oscillation period value P.sub.02 are adjusted to the same value as indicated by Expression (19) at the reference temperature T.sub.0. Specifically, the values of the variable resistor 16, variable resistor 20, variable capacitor 30, and variable capacitor 31 of the relaxation oscillation circuit 1 are adjusted. The oscillation period P of the relaxation oscillator 70 may be set to a desired oscillation period by adjusting the division number N of the variable frequency divider 2. The oscillation period P of the oscillator is independent of the ratio between the clock number N.sub.01 at the oscillation period value P.sub.01 and the clock number N.sub.02 at the oscillation period value P.sub.02.
(86) The clock number N.sub.1 at the oscillation period value P.sub.01 and the clock number N.sub.02 at the oscillation period value P.sub.02 are adjusted next. The ratio between the clock number N.sub.01 at the oscillation period value P.sub.01 and the clock number N.sub.02 at the oscillation period value P.sub.02 at the reference temperature T.sub.0 for canceling the first-order temperature deviation is calculated based on Expression (12) and Expression (13), and on the temperature coefficients of the resistance values of the variable resistor 16 and the variable resistor 20. This calculation uses the values of the temperature coefficients .sub.1, .sub.1, .sub.2, and .sub.2 of the variable resistors 16 and 20. The values of the temperature coefficients .sub.1, .sub.1 , .sub.2, and .sub.2 are obtained by changing the ambient temperature from the reference temperature T.sub.0 and directly measuring the resistance values of the variable resistors 16 and 20, or are indirectly obtained by measuring the oscillation periods P.sub.1 and P.sub.2 of the relaxation oscillation circuit 1. The measurement may be taken by, for example, operating the relaxation oscillation circuit 1 in the I.sub.1 oscillation mode, or the I.sub.2 oscillation mode, alone.
(87) Lastly, the second-order deviation of the oscillation period is compensated by calculating the value of N when the temperature changes from the reference temperature T.sub.0 by the temperature change amount T with the use of Expression (18) and the temperature coefficient .sub.1 expressed by Expression (16), or the temperature coefficient .sub.2 expressed by Expression (17), and adding N (N may take a negative value) to a set value that is set as the clock number N.sub.1 at the oscillation period value P.sub.01 to the N1VAL terminal 99 of the counter 3. In this case, the sum of the clock number N.sub.1 at the oscillation period value P.sub.01 and the clock number N.sub.2 at the oscillation period value P.sub.02 is equal to the division number N of the variable frequency divider 2. The value of N.sub.2 is uniquely determined once N.sub.1 is set because the division number N is constant, and there is no need to separately control N.sub.2.
(88) The relaxation oscillator according to the first embodiment of the present invention is not originally designed to generate an output waveform that has a constant duty ratio of 50%. In order for the relaxation oscillator according to the first embodiment to generate an output waveform that has a constant duty ratio of 50%, oscillation having an oscillation period that is, for example, times the desired oscillation period is executed, and the frequency of the clock signal TIME output from the variable frequency divider 2 is divided into two. In this way, the waveform having a constant duty ratio of 50% can be obtained.
(89)
(90) Conditions of
(91)
(92)
(93) A curve B in
(94) The curve B in
(95) In order to improve the precision of the compensation for a temperature-induced deviation of the oscillation period in the relaxation oscillation circuit in the first embodiment, the relaxation oscillation circuit is formed on a single semiconductor chip, and the variable resistor 16 and the variable resistor 20 are arranged next to each other. This uniformizes the temperature of the variable resistor 16 and the temperature of the variable resistor 20, and the precision of oscillation period deviation compensation is consequently improved.
(96) (Second Embodiment)
(97)
(98) The temperature sensor 50 measures the temperature and outputs the result of the measurement as temperature data to the calculation circuit 51. The calculation circuit 51 calculates the variable amount N (N may take a positive value and a negative value) of a set value that is set as the clock number N1 to the counter 3 for reducing the second-order temperature deviation of the oscillation period P.sub.1 of the relaxation oscillation circuit 1 to zero by compensation. The calculation circuit 51 calculates the variable amount N based on a signal from the temperature sensor 50 and the value of the second memory, and outputs the calculated variable amount as a correction value for correcting the set value of the clock number N.sub.1.
(99) The first memory 52 holds the value of the division number N of the variable frequency divider 2, and a set value set as the clock number N.sub.01 to the counter 3 at which the first-order temperature deviation of the relaxation oscillation circuit 1 is zero at the reference temperature T.sub.0. The value of the division number N of the variable frequency divider 2 is read out of the first memory 52 and input to the NVAL terminal 95 of the variable frequency divider 2.
(100) The second memory 53 holds data required by the calculation circuit 51 to calculate the variable amount N of a set value that is set as the clock number N.sub.1 to the counter 3, or holds the variable amount N that is associated with the temperature T. The calculation circuit 51 specifies an address in the second memory 53 to read data held in the second memory 53.
(101) The adder 54 adds a value that is set as the clock number N.sub.01 to the counter 3 and held in the first memory 52, and the variable amount N calculated by the calculation circuit 51 for a set value that is set as the clock number N.sub.1 to the counter 3, and hands a set value to be set as the clock number N.sub.1 over to the counter 3.
(102) The switch 55 controls whether the variable amount N of a set value that is set as the clock number N.sub.1 to the counter 3 is to be transmitted to the adder 54. Whether to compensate for the second-order temperature deviation of the oscillation period P.sub.1 is selectable by opening or closing the switch 55.
(103) According to the relaxation oscillator 70A of the second embodiment of the present invention, the second-order deviation of the oscillation period P of the clock signal TIME can be compensated automatically by the series of mechanisms described above. The relaxation oscillation circuit in the second embodiment keeps the oscillation period P very stable.
(104) (Third Embodiment)
(105)
(106) The temperature sensor 50 includes the second oscillation circuit 60 and a second counter 61. The relaxation oscillation circuit 101 (
(107) A description is made below on the detection of a temperature change in the relaxation oscillator 70B, and on the principle and procedure of compensation for a deviation of the oscillation period P that is induced by a temperature change.
(108) The premise here is that the second oscillation circuit 60 uses a resistor of the same material as that of the variable resistor 16 (meaning that the first-order temperature coefficient of the resistor is .sub.1) in the relaxation oscillation circuit 1 to generate an oscillation period P.sub.3 (alternatively, the second oscillation circuit 60 may use a resistor of the same material as that of the variable resistor 20 to generate the oscillation period P.sub.3). The oscillation period P.sub.3 of the second oscillation circuit 60 is expressed by Expression (21) when a first-order temperature coefficient of the resistor is taken into consideration. The oscillation period P.sub.3 varies greatly depending on temperature because no compensation is made for a deviation of the oscillation period P.sub.3 that is induced by a temperature change.
P.sub.3=P.sub.03 (1+.sub.1T)(21)
(109) In Expression (21):
(110) P.sub.03 represents an oscillation period of the second oscillation circuit 60 at the reference temperature T.sub.0,
(111) .sub.1 represents the first-order temperature coefficient of the resistor used in the second oscillation circuit 60 to generate a current, and
(112) T represents a temperature change amount of a change from the reference temperature T.sub.0.
(113) When measured against the oscillation period P.sub.3 of the second oscillation circuit 60, the oscillation period P of the clock signal TIME output from the relaxation oscillation circuit 1 can be deemed as a substantially constant value because the ratio between the clock number N.sub.01 at the oscillation period value P.sub.01 and the clock number N.sub.02 at the oscillation period value P.sub.02 is adjusted, and the first-order deviation is zero (in a state in which the switch 55 is open).
(114) Output from the variable frequency divider 2 is input to the second counter 61, and the second counter 61 counts oscillation clock of the second oscillation circuit 60 for the duration of one period (oscillation period P) of the output. A count value m of the second counter 61 in this case is expressed by Expression (22) when the first-order temperature coefficient of the resistor is taken into consideration.
(115)
(116) Expression (23) is obtained by obtaining an approximate solution about the temperature change amount T from Expression (22), and the temperature change amount T may be figured out by using the count value m of the second counter 61 as temperature data.
(117)
(118) The calculation circuit 51 calculates the variable amount N for compensating for the first-order temperature deviation of the oscillation period P of the relaxation oscillation circuit 1, from the count value m of the second counter 61, and outputs the calculated variable amount as a correction value. When the switch 55 is closed, count data obtained by adding the variable amount N to the clock number N.sub.01 is input to the N1VAL terminal 99 of the counter 3, and the second-order temperature deviation of the oscillation period P of the relaxation oscillation circuit 1 is corrected.
(119) The relaxation oscillator 70B described above is operated with the switch 55 opened during the detection of a temperature change by the temperature sensor 50 (namely, a case in which compensation is made only for the first-order deviation of the oscillation period P that is induced by a temperature change in the relaxation oscillation circuit 1). However, the relaxation oscillator 70B presents the same effect also when the switch 55 is closed during the detection of a temperature change (namely, a case in which compensation is extended to the second-order deviation of the oscillation period P that is induced by a temperature change in the relaxation oscillation circuit 1).
(120) This is because, compared to the oscillation period of the second oscillation circuit 60 (oscillation period P.sub.3), the oscillation period of the relaxation oscillation circuit 1 (oscillation period P) can be deemed as approximately constant regardless of temperature, in any of the case in which compensation is made only for the first-order deviation of the oscillation period P that is induced by a temperature change in the relaxation oscillation circuit 1 (case in which the switch 55 is open) and the case in which compensation is extended to the second-order deviation of the oscillation period P that is induced by a temperature change in the relaxation oscillation circuit 1 (case in which the switch 55 is closed).
(121) In order to enhance the precision of compensation for the second-order temperature deviation of the oscillation period P by enhancing the precision of temperature change detection with the configuration of the third embodiment, the relaxation oscillation circuit 1 in the relaxation oscillator 70B is formed on a single semiconductor chip, and the relaxation oscillation circuit 1 and the second oscillation circuit 60 are arranged as close to each other as possible. Alternatively, resistors having resistance values serving as references for the oscillation periods of the two oscillation circuits may be arranged next to each other as one of ways to uniformize the temperatures of the resistors. The uniformization of the temperatures of the resistors is effective in enhancing the precision.
(122) The relaxation oscillator 70B may also have a configuration in which the current source circuit 11 (or the current source circuit 12) of the relaxation oscillation circuit 1 is shared with the second oscillation circuit 60. This eliminates a relative error caused by a temperature change in the oscillation period P of the relaxation oscillation circuit 1 and the oscillation period P.sub.3 of the second oscillation circuit 60, and accordingly enhances the precision of temperature detection, thus improving the precision of compensation for a deviation of the oscillation period P that is induced by a temperature change.
(123) (Fourth Embodiment)
(124)
(125) In the configuration of
(126)
(127) The second term in Expression (24) is the variable amount N for compensating for a first-order temperature deviation of the oscillation period P in the clock signal TIME output from the relaxation oscillator 70C. The calculation of the variable amount N is simplified to (MP/P.sub.03) when the oscillation period value P.sub.03 of the second oscillation circuit 60 at the reference temperature T.sub.0 is set to a special value expressed by Expression (25) in Expression (24). In short, the relaxation oscillator 70C does not require multiplication, and can accordingly be reduced significantly in the circuit scale of the calculation circuit 51.
(128)
(129) The value P/P.sub.03 can approximately be deemed as substantially constant. When this is defined as a constant M as expressed in Expression (26), the calculation of the variable amount N takes the form of Expression (27). In other words, the calculation circuit 51 requires no other components than the subtracter 62 as illustrated in
(130)
(131)
(132) In each of the relaxation oscillators according to the first to fourth embodiments of the present invention, a temperature-induced deviation of an oscillation period of the relaxation oscillator is very small, and the relaxation oscillator can therefore be used as a reference clock signal source of the electronic device 72, such as a highly precise timer or clock, or a similar type device, while it is difficult for relaxation oscillators of the related art to be used.
(133) The description made above on the principle of compensation for a deviation that is induced by a temperature change in the oscillation period P of the clock signal TIME output from each of the relaxation oscillators according to the first to fourth embodiments of the present invention is focused on the temperature coefficients of only the variable resistor 16 and the variable resistor 20. The most significant feature of the present invention is that a temperature deviation of the oscillation period P that is generated for the clock signal TIME by taking into consideration the overall influence of the oscillator, including the influence from temperature coefficients of oscillator components other than the resistors (variable capacitors, a logical element, a power source, and the like), can be reduced to substantially zero by compensation.
(134) This compensation becomes possible under a condition in which the absolute values of the temperature coefficients of the oscillator components other than the variable resistors are sufficiently smaller than the absolute values of the first-order temperature coefficients .sub.1 and .sub.1 of the variable resistor 16 and the variable resistor 20 (as a guide, 1/10 or smaller of the first-order temperature coefficients of the variable resistors). Under this condition, the first-order temperature deviation of the oscillation period P that takes the overall influence of the oscillator into consideration can be adjusted to zero by independently adjusting the first-order temperature deviation through an adjustment of the ratio of the oscillation period values P.sub.01 and P.sub.02, because the temperature coefficients of the variable resistor 16 and the variable resistor 20 are dominant in variations of the oscillation period P that depend on temperature. The second-order temperature deviation of the oscillation period P that takes the overall influence of the oscillator into consideration can be adjusted to substantially zero by independently adjusting the second-order temperature deviation through an adjustment in which the oscillation period value P.sub.03 of the second oscillation circuit 60 in the third embodiment or the fourth embodiment at the reference temperature T.sub.0 is increased or decreased.
(135) It is noted that the present invention is not limited to the above-described embodiments as they are and, in an implementation phase, can be embodied in various forms other than the specific embodiments described above. Various omissions, additions, substitutions, and changes may be made without departing from the spirit and scope of the invention. These embodiments and modifications thereof are included within the sprit and scope of the invention and are included within the scope of the invention as disclosed in the claims and equivalents thereof.