Oscillator circuit having a CMOS inverter and resonant element

Abstract: Disclosed herein is an oscillator circuit generating an oscillation signal in response to a resonant element in a first mode and to an external clock signal in a second mode. This oscillator circuit comprises a tri-state inverter circuit and a transfer circuit between the input and output nodes of the tri-state inverter circuit, and the output node of the tri-state inverter circuit is brought into a high impedance condition when an external clock signal is used and into an active state when the resonant element is employed.

Description: This invention relates to an oscillator circuit according to claim 1 and particularly to an oscillator circuit generating an oscillation signal in resonse to, in a first mode, a resonant element such as a crystal and, in a second mode, an external clock signal. Description of the Related Art A similar oscillator circuit is known from Patent Abstract of Japan Vol. 17, No. 401 (E-1404) July 27, 1993, and JP-A-05-075 342. This controller for an oscillator circuit comprises an inverter having a feedback circuit connected between its input and output, the inverter further having its input connected to a first terminal which is connected to a resonant element or to receive an external clock signal, and a detection circuit connected to the output of the inverter, and provides an internal oscillator circuit and a switch which is turned on for internal oscillation mode while it is turned off for external oscillation mode. A further oscillator circuit for a portable electronic device is known from GB-A-2 005 944. This circuit shows a quartz crystal oscillator circuit implementing a tri-state inverter as used in the present application and which comprises a P-MOS and N-MOS transistor and an inverter. By switching the transistors, the amplification can be switched on and off, and the quartz crystal vibrator element is driven into oscillation, or is left to oscillate substantially freely. An example of a conventional oscillator circuit is shown in FIG. 11. This circuit is constituted of an inverter circuit consisting of a P-type MOSFET M1 and an N-type MOSFET M2 and having an input node connected to a terminal V 1 and an output node connected to a terminal V 2 , a transfer circuit consisting of a P-type MOSFET M3 having its drain connected to the terminal V 1 and its source connected to the terminal V 2 , an N-type MOSFET M8 connected between the terminal V 1 and the ground, an inverter circuit 11 having its input connected to the terminal V 2 and its output connected to the output V O of the oscillator circuit, and an oscillation control circuit consisting of an inverter circuit 12 and a NOR circuit 13. A crystal X1 is optionally connected between the terminal V 1 and the terminal V 2 . In addition, the oscillator circuit includes a stop input signal V S and a switching input terminal V X from a data processing unit such as a CPU (not shown). This circuit operates as a crystal oscillator circuit when both of the oscillation stop input signal V S and the oscillation switching input signal V X are at the low level. This is because the N-type MOSFET M8 is turned off and both of the P-type MOSFET M3 and the N-type MOSFET M4 are turned on. On the other hand, when the signal V S is at the high level, the N-type MOSFET M8 is turned on because of the high level of its gate, and the transfer circuit is turned off by the shift of the gate of the P-type MOSFET M3 to the high level and the gate of the N-type MOSFET M4 to the low level, which brings the terminal V 1 to the low level and the terminal V 2 to the high level, stopping the oscillation. The frequency-gain characteristic of the inverter circuit consisting of the P-type MOSFET M1 and the N-type MOSFET M2 is as shown in FIG. 12(a), so that oscillation is possible at a frequency lower than frequency f 0 where the gain becomes 0dB. Since the frequency f 0 varies substantially in proportional to the gate width W of the MOSFET as shown in FIG. 12(b), the frequency f 0 has to be selected somewhat higher than a desired oscillation frequency. Since, however, at that time the consumed current I of the inverter circuit constituted of the P-type MOSFET M1 and the N-type MOSFET M2 is determined by the gate width W of the MOSFET with substantially proportional relation between the consumed current and the gate width as shown in FIG. 12(c), the gate width W should not be taken so large in order to reduce the power consumption. Therefore, a gate width W which gives rise to a frequency f 0 slightly higher than the desired frequency is adopted. In this oscillator circuit, the gain of the inverter circuit consisting of the P-type MOSFET M1 and the N-type MOSFET M2 decreases with the increasing load capacity C L as shown by the dependence of the load capacity on the gain as given in FIG. 13. When the oscillator circuit is operated for this reason by an external clock signal rather than by the use of the crystal oscillator, the P-type MOSFET M3 and the N-type MOSFET M4 are turned off by bringing the signal V X of the oscillation control circuit to the high level and an external clock signal V C is applied to the terminal V 1 alone. In that case, the clock signal V C is transmitted to the interior of the oscillator circuit through the inverter circuit constituted of the P-type MOSFET M1 and the N-type MOSFET M2 and the inverter circuit 11. If in this case a load capacity C L exists at the terminal V 2 due to wiring pattern or the like in the exterior of the LSI, the gain decreases as shown in FIG. 15, and the external clock signal is attenuated by the inverter circuit constituted of the P-type MOSFET M1 and the N-type MOSFET M2, resulting sometimes in a situation where the transmission of the signal to the interior fails. Moreover, if the external clock signal V C is applied to the terminal V 2 alone, the output voltage of the P-type MOSFET M1 and the N-type MOSFET M2 competes with the external clock signal V C , and results either in non-transmission of the external clock signal V C to the interior or a situation in which the MOSFETs become the sources of the noise due to the flow of a high through current. For this reason, in operating the oscillator circuit by an external clock signal, it would be necessary to externally install an inverter circuit 15 between the terminal V 1 and the terminal V 2 , as shown in FIG. 14. SUMMARY OF THE INVENTION It is therefore an object of this invention as defined in the appended claims to provide an oscillator circuit generating oscillation signal in response to a resonant element in a first mode and to an external clock signal without an external inverter circuit as well as large noises in a second mode. An oscillator circuit according to this invention includes a first terminal, a second terminal, a tri-state inverter circuit having an input node connected to the first terminal and an output node connected to the second terminal, a feedback circuit connected between the first and second terminals, a detection circuit and a control circuit operating in a first mode to activate each of the tri-state inverter circuit and the feedback circuit and in a second mode to deactivate each of the tri-state inverter circuit and the feedback circuit. The tri-state circuit presents, when deactivated, a high impedance state at the output node thereof. In the first mode, the tri-state inverter cooperates with a resonant element connected between the first and second terminals to generate an oscillation signal. In the second mode, an external clock signal is applied to the second terminal. BRIEF DESCRIPTION OF THE DRAWINGS The above-mentioned and other objects, features and advantages of this invention will become more apparent by reference to the following detailed description of the invention taken in conjunction with the accompanying drawings, wherein: FIG. 1 is a circuit diagram for a first embodiment of this invention; FIG. 2 is a circuit diagram for a clock detection circuit shown in FIG. 3; FIG. 3 is a signal waveform diagram for describing the operation of the circuit shown in FIG. 1; FIG. 4 is another signal waveform diagram for describing the operation of the circuit shown in FIG. 1; FIG. 5 is a circuit diagram for another example of a clock detection circuit shown in FIG. 1; FIG. 6 is a circuit diagram of a clock detection circuit for a second embodiment of this invention; FIG. 7 is a circuit diagram of the T-type flip-flop shown in FIG. 6; FIG. 8 is a circuit diagram of the R-S flip-flop shown in FIG. 6; FIG. 9 is a signal waveform diagram for describing the operation of the circuit shown in FIG. 6; FIG. 10 is another signal waveform diagram for describing the operation of the circuit shown in FIG. 6; FIG. 11 is a circuit diagram for a conventional oscillator circuit; FIG. 12 is a diagram showing the characteristics of the inverter circuit; FIG. 13 is a diagram showing a characteristic of the inverter circuit; and FIG. 14 is a circuit diagram for another example of the conventional oscillator circuit. DESCRIPTION OF THE PREFERRED EMBODIMENTS An oscillation circuit for the purpose of solving these problems are therefore shown in FIG. 1 as the first embodiment of this invention. This oscillator circuit 200 is fabricated on a single semiconductor chip 250 and includes a tri-state inverter circuit 50 formed of a series connection of P-type MOSFETs M1 and M6 and N-type MOSFETs M2 and M7 and having an input node connected to a terminal V 1 and an output node connected to a terminal V 2 , a transfer circuit 60 as a feedback circuit formed by a P-type MOSFET M3 and an N-type MOSFET M4 connected in parallel between the terminal V 1 and the terminal V 2 , a NAND circuit 16 having a first input connected to the terminal V 2 and an output connected to the output V 0 of the oscillator circuit, a clock detection circuit 20 having first and second inputs connected to the terminals V 2 and V R , and an oscillation control circuit 70 consisting of inverter circuits 12 and 17 and NOR circuits 13 and 18, and which further receives an oscillation stop input signal V S . Figure 2 is a circuit diagram for an example of the clock detection circuit in FIG. 1. This clock detection circuit is constituted of a P-type MOSFET M11 connected between the terminal V 2 and a power supply V DD , a P-type MOSFET M12 having its drain connected to a junction N1, its gate connected to the terminal V 2 and its source connected to the power supply V DD , an N-type MOSFET M13 having its drain connected to the junction N1, its gate connected to the terminal V R and its source connected to the ground potential, a capacitance element C11 connected between the junction N1 and the ground potential, a latch circuit 30 constituted of a tri-state inverter circuit consisting of P-type MOSFETs M14 and M15 and N-type MOSFETs M16 and M17, and a tri-state inverter circuit consisting of P-type MOSFETs M18 and M19 and N-type MOSFETs M20 and M21, having its input at the junction N1 and its output at a terminal V 3 , and an inverter circuit 22. The operation of this circuit will be described. First, in the case of oscillation using a crystal oscillator in which a crystal 80 as a resonant element is connected between the terminals V 1 and V 2 , the operation of the circuit is shown by the waveforms given in FIG. 3. In starting an LSI, it is general to use a reset signal V R to initialize the internal circuit. In that case, when the reset signal V R goes to the high level in the oscillator circuit, the output of the tri-state inverter circuit constituted of the MOSFETs M1, M2, M6 and M7 goes to the high impedance state, the transfer circuit constituted of the MOSFETs M3 and M4 is turned off, the tri-state inverter circuit constituted of the MOSFETs M14 to M17 operates as an inverter, the output of the tri-state inverter circuit constituted of the MOSFETs M18 to M21 toes to the high impedance state, and the MOSFETs M11 and M13 are turned on. Since the terminal V 2 is connected only to the crystal oscillator and has no dc current path, the terminal V 2 is sent to the high level by the MOSFET M11, which turns off the MOSFET M12 and brings the junction N1 to the low level, and the terminal V 3 is brought to the low level. As the reset signal V R returns to the low level later, the low level of the terminal V 3 is latched and the tri-state inverter circuit consisting of the MOSFETs M1, M2, M6 and M7 operates as an ac amplifier, the transfer circuit consisting of the MOSFETs M3 and M4 is turned on to a start the crystal oscillation operation, and the signal at the terminal V 2 is output to the terminal V 0 through the NAND circuit 16. Next, the operation by receiving an external clock signal V C at the terminal V 2 is shown by the waveform diagram in FIG. 4. As the reset signal V R goes to the high level the output of the tri-state inverter circuit consisting of the MOSFETs M1, M2, M6 and M7 goes to the high impedance state, the transfer circuit consisting of the MOSFETs M3 and M4 is turned off, the tri-state inverter circuit consisting of the MOSFETs M14 to M17 operates as an inverter, the output of the tri-state inverter circuit consisting of the MOSFETs M18 to M21 goes to the high impedance state, and the MOSFETs M11 and M13 are turned on. Here, the on-resistance of the MOSFET M11 is set to be sufficiently high compared with the internal resistance of the source (not shown) of the external clock signal V C , so that the voltage of the terminal V 2 oscillates in the same way as the external clock signal does, by which the MOSFET M12 repeats the on-and-off operation and charges up the capacitance element C11. By setting the mutual conductance of the MOSFET M13 to be sufficiently small compared with the mutual conductance of the MOSFET M12, and restricting the charge discharged by M13 to be small compared with the charge accumulated in C11, the junction N1 goes substantially to the high level and the terminal V 3 goes to the high level when a clock signal is input to the terminal V 2 from the outside. When the reset signal V R returns to the low level later, the high level of the terminal V 3 is latched, and the signal at the terminal V 2 is transmitted to the output VO of the oscillator circuit via the NAND circuit 16, while keeping the output of the tri-state inverter circuit consisting of the MOSFETs M1, M2, M6 and M7 in the high impedance state, and while keeping the transfer circuit consisting of the MOSFETs M3 and M4 turned off. As in the above, this embodiment obviates the signal for switching between the oscillation by means of an external clock signal and the oscillation by means of a crystal oscillator, and as a result of that it is possible to reduce the number of the signal pins and the bonding pads. It should be mentioned that the NAND circuit 16 employed in this embodiment is frequently that of the Schmitt type in order to eliminate malfunctions of the oscillator circuit output caused by the noise generated at the terminal V 2 . Another example of the clock detection circuit 20 is shown in FIG. 5. This circuit is obtained from the circuit in FIG. 2 by replacing the P-type MOSFET M12 by an N-type MOSFET M12a and the P-type MOSFET M11 by an N-type MOSFET M11a and connecting them between the terminal V 2 and the ground potential. Figure 6 is a circuit diagram for the second embodiment of this invention, which is another block diagram for the clock detection circuit in FIG. 1. An example of the circuit diagram for the T-type flip-flops Q1 to Q3 of this embodiment is shown in FIG. 7, an example of the circuit diagram for the RS flip-flop Q4 is shown in FIG. 10, and as an example of a latch circuit Q5 use is made of the latch circuit 30 shown in FIG. 2. This circuit counts signals input to the terminal V 2 with a binary counter constituted of three T-type flip-flop circuits Q1 to Q3, and when the output end Q of Q3 goes to the high level, the signal is latched by the RS flip-flop Q4 and the latch circuit Q5 in the next stage. In the case of oscillation by means of a crystal oscillator, the crystal oscillator is connected between the terminal V 1 and the terminal V 2 . The operation in that case is shown in FIG. 11. As the reset signal goes to the high level, the output of the tri-state inverter circuit consisting of the MOSFETs M1, M2, M6 and M7 goes to the high impedance state, and the transfer circuit consisting of the MOSFETs M3 and M4 is turned off. Since the terminal V 2 is connected to the crystal oscillator alone and the potential of V 2 undergoes no variation, the counter is not actuated, with the flip-flop Q3 remaining at the low level, and the terminal V 3 goes to the low level. When the reset signal V R returns to the low level later, the low level of the terminal V 3 is latched, the tri-state inverter circuit operates as an ac amplifier, the transfer circuit consisting of the MOSFETs M3 and M4 is turned on, the crystal oscillator starts operation, and the signal at the terminal V 2 is output to the terminal V 0 through the NAND circuit 16. Next, in the case of oscillation by means of an external clock signal, a clock signal is applied from the outside to the terminal V 2 . The operation or this case is shown in FIG. 10. As the reset signal V R goes to the high level the output of the tri-state inverter circuit including the MOSFETs M1 and M2 goes to the high impedance state, and the transfer circuit consisting of the MOSFETs M3 and M4 is turned off. Then, the counter circuit consisting of Q1, Q2 and Q3 starts counting, and when the flip-flop Q3 goes to the high level, the terminal V 3 goes to the high level. When the reset signal V R returns to the low level later, the high level of Q3 is latched, and the signal at the terminal V 2 is transmitted to the output VO of the oscillator circuit through the NAND circuit 16 while keeping the output of the tri-state inverter circuit including the MOSFETs M1 and M2 in the high impedance state, and while keeping the transfer circuit consisting of the MOSFETs M3 and M4 turned off. As described in the above, effects similar to the cases of other embodiments can be obtained by this embodiment. Moreover, signals are processed in the logic circuit so that it is possible to carry out clock detection without being affected by the duty cycle of the external clock signal input from the terminal V 2 . As in the above, this invention utilizes the inverter circuit which is an ac amplifier as a tri-state inverter circuit, and devised a scheme to convert its output to the high impedance state. Therefore, when using an external clock signal, the necessity for inputting inverted signals to the two input terminals can be obviated, so that there is an effect that an inverter circuit for preparing the inverted signals can be eliminated and that noise generation can be suppressed. Moreover, when a clock detection circuit is provided, it is possible to automatically switch between the external clock operation mode and the crystal oscillation mode by means of the output signal of the detection circuit. Therefore, there is an additional effect that the number of pins and bonding pads for the preparation of the switching signal can be reduced, and makes the switching signal from the outside unnecessary. Although the invention has been described with reference to specific embodiments, this description is not meant to be construed in a limiting sense. Various modifications of the disclosed embodiments, as well as other embodiments of the invention, will become apparent to persons skilled in the art upon reference to the description of the invention. It is therefore contemplated that the appended claims will cover any modifications or embodiments as fall within the scope of the invention.

Claims: An oscillator circuit comprising a first terminal (V 1 ), a second terminal (V 2 ), an inverter circuit (50) having an input node connected to said first terminal, and an output node connected to said second terminal (V 2 ), a feedback circuit (60) connected between said first and second terminals, a detection circuit for detecting whether said second terminal (V 2 ) is connected with a resonant element (80) or receives a clock signal (V c ), and for producing a detection signal (V 3 ), said detection signal (V 3 ) taking a first level when said second terminal (V 2 ) is connected with said resonant element (80) and a second level when said second terminal (V 2 ) receives said clock signal (V c ), and a control circuit (70) activating said feedback circuit in response to said first level of said detection signal (V 3 ) and deactivating said feedback circuit in response to said second level of said detection signal (V 3 ), wherein said inverter circuit (50) is a tri-state inverter (50) which is directly connected with its output to the second terminal (V 2 ), the clock detection circuit (20) is directly connected to the second terminal (V 2 ) and the detection signal (V 3 ) is also used for control of the state of the tri-state inverter (50). The circuit as claimed in claim 1, wherin said detection circuit (20) includes a capacitor (C11), means responsive to said second terminal (V 2 ) being connected to said resonant element (80) for discharging said capacitor to produce said detection signal (20) taking said first level, and means responsive to said second terminal (V 2 ) receiving said clock signal for charging said capacitor to produce said detection signal taking said second level. The circuit as claimed in claim 2, wherein said detection circuit (20) further includes a bi-stable circuit (30) which is brought into a first state by discharging said capacitor and into a second state by charging said capacitor, said detection signal taking said first level by said first state of said bi-stable circuit and said second level by said second state of said bi-stable circuit. The circuit as claimed in claim 1, wherein said detection circuit including a counter counting changes in level at said second terminal to produce said detection signal taking one of said first and second levels.

Inventors: NARAHARA TETSUYA, NARAHARA, TETSUYA
Applicants: NIPPON ELECTRIC CO, NEC CORPORATION
Application year: 1994
Main classification: H03B5
IPC codes: H03B5