BACKGROUND OF THE INVENTION
(1) Field of the Invention
The present invention relates to a one-chip semiconductor device such as a one-chip microcomputer incorporating a power-supply-potential detecting circuit for resetting the device when the power supply potential is lower than a predetermined value.
(2) Description of the Prior Art
In a semiconductor device or integrated circuit such as a one-chip microcomputer, if the rated power supply potential is 5 V, the device normally operates at its rated accuracy in the range of ±5% to ±10% of the rated potential. When the power supply potential deviates from the above-mentioned range, the device may perform a logically erroneous operation and may overrun.
To prevent the device from erroneously operating, a power-supply-potential detecting circuit is provided. When the power supply potential becomes lower than a detection potential of the circuit, the circuit generates a signal for resetting the device.
In a one-chip semiconductor device incorporating such a power-supply-potential detecting circuit, it is naturally checked whether the device operates normally in the predetermined range of the rated power supply potential. In addition, it is necessary to check whether the device operates normally when the power supply potential is between the lower limit of the above-mentioned range and the detection potential, since customers may use the device below the lower limit.
In the above-mentioned one-chip semiconductor device incorporating such a power-supply-potential detecting circuit, however, there is an area between the lower limit of the above-mentioned range and the detection potential of the power-supply-potential detecting circuit which cannot be checked. For example, if the detection potential of the circuit is about 4.0 V, the circuit can check whether the device operates normally only when the power supply potential is higher than, 4.1 V due to the manufacturing fluctuation. That is, the area between 4.0 V to 4.1 V cannot be checked.
SUMMARY OF THE INVENTION
It is an object of the present invention to provide a one-chip semiconductor device incorporating a power-supply-potential detecting circuit, in which it is possible to check whether the device operates normally when the power supply potential is equal to or higher than the detection potential of the circuit.
It is another object of the present invention to provide improved power-supply-potential detecting circuits use with a one-chip semiconductor device.
According to the present invention, a circuit is provided for inhibiting transmission of a reset signal from a power-supply-potential detecting circuit even when the power supply potential becomes lower than the detection potential of the circuit. That is, such an inhibiting circuit is operated during the check mode so that the device is not reset.
The present invention will be more clearly understood from the description as set forth below with reference to the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a diagram of the voltage waveforms during a reset operation of a one-chip semiconductor device incorporating a power-supply-potential detecting circuit;
FIG. 2 is a block diagram of an emobodiment of the one-chip semiconductor device incorporating a power-supply-potential detecting circuit according to the present invention;
FIG. 3 is a circuit diagram of a first example of the power-supply-potential detecting circuit of FIG. 2;
FIG. 4 is a waveform diagram of the signals of the circuit of FIG. 3;
FIG. 5 is a circuit diagram of a second example of the power-supply-potential detecting circuit of FIG. 2;
FIG. 6 is a waveform diagram of the signals of the circuit of FIG. 5;
FIG. 7 is a circuit diagram of a third example of the power-supply-potential detecting circuit of FIG. 2;
FIG. 8 is a waveform diagram of the signals of the circuit of FIG. 7;
FIG. 9 is a circuit diagram of a fourth example of the power-supply-potential detecting circuit of FIG. 2;
FIG. 10 is a circuit diagram of a fifth example of the power-supply-potential detecting circuit of FIG. 2;
FIG. 11 is a waveform diagram of the signals of the circuit of FIG. 10;
FIG. 12 is a circuit diagram of a sixth example of the power-supply-potential detecting circuit of FIG. 2;
FIG. 13 is a circuit diagram of a seventh example of the power-supply-potential detecting circuit of FIG. 2;
FIG. 14 is a diagram of the threshold potential Vth of a complementary metal oxide semiconductor (CMOS) inverter;
FIG. 15 is a waveform diagram of the signals of the circuit of FIG. 13;
FIG. 16 is a circuit diagram of an eighth example of the power-supply-potential detecting circuit of FIG. 2; and
FIG. 17 is a waveform diagram of the signals of the circuit of FIG. 16.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
First, the reset operation of a one-chip semiconductor device incorporating a power-supply-potential detecting circuit will be explained with reference to FIG. 1. In FIG. 1, VCC designates a power supply potential, and VD designates a predetermined detection potential. Here, it is assumed that the rated potential of the power supply VCC is 5 V and its allowance or range R is 4.5 to 5.5 V, as indicated by the shaded portion. If the power supply potential VCC deviates from the range R, it may be necessary to reset the device so that a logically-erroneous operation is not performed. For this purpose, it is preferable that the detection potential VD always be consistent with the lower limit of the range R, i.e., 4.5 V. Actually, the detection potential VD is, however, set lower than the lower limit in view of manufacturing fluctuations. For example, the detection potential VD is set at 4.0 V, as shown in FIG. 1.
During the test or check mode, first, the device is checked for normal operation when the power supply potential VCC is within the range R. Second, the device is checked for whether a reset operation is performed when the power supply potential VCC reaches the detection potential VD. That is, as illustrated by X1 in FIG. 1, it is checked whether the device normally operates when the power supply potential VCC is within the range R. In addition, as illustrated by X2 in FIG. 1, it is checked whether a reset operation is performed when the power supply potential VCC becomes lower than the detection potential VD.
It should be also noted that customers may use the above-mentioned semiconductor device within a range R' between the lower limit of the rated range R and the detection potential VD. Therefore, it is necessary to check whether the device normally operates when the power supply potential VCC is within the range R' as indicated by X3 in FIG. 1. However, due to the presence of the detection potential VD, it is not completely possible to check whether the device normally operates within the range R' in the proximity of VD, since a reset operation may be performed.
According to the present invention, it is possible to check whether the device normally operates within the entire range R' as well as the range R.
In FIG. 2, which is an embodiment of the present invention, a one-chip microcomputer is illustrated. The one-chip microcomputer comprises a central processing unit 1 (CPU) including a micro program controller, registers, such as a command register and a data register; an arithmetic logic unit (ALU) connected to the registers for performing an arithmetic logic operation; an address counter; an address register connected to the address counter; and the like.
The one-chip microcomputer further comprises an address bus 2, a data bus 3, a read-only memory (ROM) 4 for storing program sequences, constants, etc., a random access memory (RAM) 5 for storing temporary data, input/output (I/O) interfaces 6, a clock generator 7 for generating interruption signals, etc., a power supply circuit 8 for applying power potentials to each portion of the microcomputer, a power-supply-potential detecting circuit 9, an AND circuit 10, and a flip-flop 11.
In the microcomputer illustrated in FIG. 2, when the power supply potential VCC temporarily becomes lower than the power limit allowance thereof, the content of the RAM 5 may be inverted from "1" to "0" or vice versa. In addition, the contents of the registers and the program counter of the CPU 1 may be changed. In this case, although the microcomputer continues to operate without changing its appearance, the program may overrun, so that the following operation will not be guaranteed.
The above-mentioned state in which program overruns are generated can be avoided by the power-supply-potential detecting circuit 9. That is, the power-supply-potenital detecting circuit 9 detects the power supply potential VCC and generates a reset signal RST when the power supply potential VCC becomes lower than a predetermined detection potential VD. Upon receipt of the reset signal RST through the AND circuit 10, the micro program controller of the CPU 1 resets, i.e., initializes the registers and the program counter thereof by using a clock signal of the clock generator 7. Thus, the microcomputer is initialized to restart the operation from the beginning.
The AND circuit 10 and the flip-flop 11 are provided for inhibiting the transmission of the reset signal RST of the power-supply-potential detecting circuit 9 during the check mode. That is, during the check mode, a control signal is supplied from a check-mode terminal CT so as to reset the flip-flop 11, which, in turn, generates a low-potential signal "0". As a result, the AND circuit 10 inhibits the transmission of the reset signal RST of the power-supply-potential detecting circuit 9. During the usual mode, another control signal is supplied from the check terminal CT so as to set the flip-flop 11 which, in turn, generates a high-potential signal "1". As a result, the reset signal RST of the power-supply-potential detecting circuit 9 is transmitted through the AND circuit 10 to the micro program controller of the CPU 1, thereby resetting the registers and the program counter thereof.
Thus, during the check mode, it is possible to check whether the one-chip microcomputer normally operates even when the power supply potential VCC is lower than the detection potential VD.
In the embodiment, note that the flip-flop 11 can be omitted. In this case, a control signal having a low potential or a high potential is transmitted directly to the AND circuit 10.
The check-mode terminal CT can also be omitted. In this case, a decoder 12 is provided. The CPU 1 generates a specified address so that the decoder 12 resets the flip-flop 11. As a result, the transmission of the reset signal RST is inhibited. After the check mode, the CPU 1 sets the flip-flop 11.
In addition, in order to reset the device from the exterior, a reset terminal and an OR circuit is provided between the output of the AND circuit 10 and the CPU 1. In this case, a reset signal is supplied from the reset terminal via the OR circuit to the CPU 1.
The power-supply-potential detecting circuit 9 will now be explained in more detail with reference to FIGS. 3 through 17.
In FIG. 3, an enhancement/depletion (E/D) MOS circuit is used. That is, the power-supply-potential detecting circuit 9 comprises depletion-type MOS transistors Q1 through Q5 and enhancement-type MOS transistors Q6 through Q11. The gate of the transistor Q1 is grounded, and, accordingly, transistor Q1 serves as a resistance. The transistors Q6 and Q7 have gates connected to the drains thereof and, accordingly, serve as MOS diodes. The serial configuration of the two transistors Q6 and Q9 is helpful in effectively driving the following stage transistor Q8 which, in combination with the transistor Q2, forms an inverter INV1.
The following transistors Q3 and Q9, Q4 and Q10, and Q5 and Q11 also form inverters INV2, INV3, INV4, respectively, which are, however, used for shaping the output Vout of the inverter INV1 so as to generate a reset signal RST.
Note that the threshold potential of the inverter INV1 is the same as the threshold potential Vth of the transistor Q8.
As illustrated in FIG. 4, when the power supply potential VCC is low, the transistors Q6 and Q7 are cut off, so that the potential Va follows the power supply potential VCC. In addition, when the power supply potential VCC becomes higher than the threshold potential of the transistor Q6 plus that of the transistor Q7, the potential Va is a definite value Va0 in accordance with the potential characteristics of the MOS diodes. Since the saturation characteristics of the potential Va are better when the load transistor Q1 has a larger resistance, it is preferable that the conductance gm of the transistor Q1 be small. In the inverter INV1 receiving the potential Va, since its threshold potential Vth is dependent on the power supply potential VCC, the potential Va intersects the threshold potential Vth of the inverter INV1 at the times t1, t2, and t3, so that the output V.sub. out of the inverter INV1 is changed from high to low or vice versa. Thus, a reduction of the power supply potential VCC can be detected. Accordingly, when the output Vout of the inverter INV1 is shaped by the following inverters INV2, INV3, and INV4, a stepwise reset signal RST is obtained.
Note that the value of the power supply potential VCC at the time t1, t2, or t3 is called a detection potential VD, which is, for example, 4 V.
In FIG. 5, depletion-type transistors Q21, Q22 and Q23 and enhancement-type transistors Q24, Q25, Q26, and Q27 are added to the elements of FIG. 3, so as to compensate for manufacturing fluctuation. The transistors Q21, Q24, and Q25 have the same characteristics as those of the transistors Q1, Q6, and Q7, respectively. Therefore, the potential Vb is about the same as the potential Va. The transistors Q22, Q23, and Q26 form an inverting-amplifier AMP. In this case, the transistor Q23 is a feedback resistance. Accordingly, the gain of the inverting-amplifier AMP is set by the feedback resistance transistor Q23. Further, the transistor Q27 is interposed between the source of the transistor Q8 and ground, so that the threshold potential Vth of the inverter INV1 is also controlled by the conductance gm of the transistor Q27, which is controlled by the output Vc of the inverting-amplifier AMP.
Referring to FIG. 6, when the potential Va rises up to Va ' due to manufacturing fluctuation of the transistors Q1, Q6, and Q7, the intersecting point is moved from P1 to P2 if the threshold potential Vth of the inverter INV1 remains unchanged, so that the detection potential is also moved from VD to VD '. However, in FIG. 5, the potential Vb changes in the same way as the potential Va and, accordingly, the potential Vc of the inverting-amplifier AMP changes in the opposite direction of the potential Va. Therefore, if the potential Va rises, the potential Vc falls so as to reduce the conductance gm of the transistor Q27, i.e., to increase the threshold potential Vth of the inverter INV1. As a result, the intersecting point is actually moved from P1 to P3, so that the detection potential remains at VD.
In FIG. 5, note that the gate of the transistor Q26 can be also connected directly to the source of the transistor Q1. In this case, the transistors Q21, Q24, and Q25 are omitted.
In FIG. 7, resistors R1 and R2 are provided instead of the transistors Q1, Q6, and Q7 of FIG. 3. In addition, the inverter INV4 of FIG. 3 is omitted. In this case, the output Vout of the inverter INV1 changes as shown in FIG. 8 in the opposite way as in FIG. 4.
In FIG. 9, resistors R1 ' and R2 ', and the transistors Q22, Q23, Q26, and Q27 are added to the elements of FIG. 7, so as to compensate for the manufacturing fluctuation of the circuit of FIG. 7. That is, the circuits of FIGS. 7 and 9 correspond to the circuits of FIGS. 3 and 5, respectively.
In FIG. 10, enhancement-type transistors Q31 and Q32 and a depletion-type transistor Q33 are provided instead of the resistors R1 and R2 of FIG. 7. The transistors Q31 and Q32 have gates connected to the drains thereof and, accordingly, serve as MOS diodes, while the transistor Q33 has a gate connected to he source thereof and, accordingly, serves as a load.
As illustrated in FIG. 11, when the power supply potential Vcc is low, the transistors Q31 and Q32 are cut off, so that the potential Va remains at the ground potential. In addition, when the power supply potential VCC becomes higher than the threshold potential of the transistor Q31 plus that of the transistor Q32, the potential Va is a definite value Va0 in accordance with the MOS diode characteristics. In this case, it is also preferable that the conductance gm of the transistor Q33 be small. Thus, the output Vout of the inverter INV1 changes in the same way as in FIG. 8.
In FIG. 12, enhancement-type transistors Q34 and Q35 and a depletion-type transistor Q36 are provided instead of the resistors R1 ' and R2 ' of FIG. 9, so as to compensate for the manufacturing fluctuation of the circuit of FIG. 10.
In FIG. 13, a CMOS circuit is used. That is, the power-supply-potential detecting circuit 9 comprises P-channel transistors Q41 through Q45 and N-channel transistors Q46 through Q51. The gate of the transistor Q41 is grounded and, accordingly, this transistor Q41 serves as a resistance. The transistors Q46 and Q47 have gates connected to the drains thereof and, accordingly, serve as MOS diodes. The serial configuration of the two transistors Q46 and Q47 is also helpful in effectively driving the following stage CMOS inverter INV11 formed by the transistors Q42 and Q48.
The transistors Q43 and Q49, Q44 and Q50, and Q45 and Q51 also form CMOS inverters INV12, INV13, and INV14, respectively, which are used for shaping the output Vout of the inverter INV11 so as to generate a reset signal RST.
Note that the threshold potential Vth of a standard CMOS inverter is half of the power supply potential VCC, i.e., VCC /2, which will be explained with reference to FIG. 14. In FIG. 14, the ordinate represents a current I, while the abscissa represents a potential such as the potential Va of FIG. 13. Vthn is the threshold potential of the N-channel transistor Q48, while Vthp is the threshold potential of the P-channel transistor Q42. If the inverter INV11 is a standard CMOS inverter, Va equals the threshold potential Vth when the current Ip flowing through the P-channel transistor Q42 is the same as the current In flowing through the N-channel transistor Q48. That is, if |Vthn |=|Vthp | and the current In has the same characteristics as the current Ip, Vth is always VCC /2 even when the power supply potential VCC is changed.
Therefore, as illustrated in FIG. 15, after the potential Va reaches a predetermined value Va0 due to the fact that the gate-to-source potential of each of the transistors Q46 and Q47 is definite, the transistor Q48 has approximately the same conductance. However, even when the potential Va is definite, the transistor Q42 becomes more forward biased as the power supply potential VCC rises. As a result, the conductance of the transistor Q42 becomes large, and, accordingly, the output Vout is pulled up at the time t1. Even in this case, since the transistor Q48 remains conductive, the change of the output Vout of the inverter INV11 is slow. Therefore, the following inverters INV12, INV13, and INV14 shape the output Vout so as to generate a stepwise reset signal RST.
Note that the threshold potential Vth of the CMOS inverter such as INV11 can be changed by changing the size of the P-channel transistor Q42 or the N-channel transistor Q47. For example, when the size of the N-channel transistor Q47 is increased, the current In flowing therethrough is increased as indicated by a dotted line in FIG. 14. As a result, the intersecting point is moved from P11 to P12, so as to reduce the threshold potential Vth. Therefore, the detection potential VD is also reduced. However, when the size of the P-channel transistor Q42 is increased, the current Ip flowing therethrough is increased as indicated by a dash-dotted line in FIG. 14. As a result, the intersecting point is moved from P11 to P13, so as to increase the threshold potential Vth. Therefore, the detection potential VD is also increased. Thus, the threshold potential Vth can be arbitrarily set within Vthn to (VCC -Vthp) in FIG. 4, so as to obtain a desired value of VD.
In FIG. 16, P-channel transistors Q52 through Q54 and N-channel transistors Q56 through Q60 are added to the elements of FIG. 13, so as to compensate for the manufacturing fluctuation of the circuit of FIG. 13, especially the manufacturing fluctuation of the transistors Q46 and Q47. If the threshold potential of each of the transistors Q46 and Q47 is changed by 10%, the potential Va is changed as indicated by Va ' in FIG. 17. In this state, if the threshold potential Vth of the inverter INV11 remains unchanged, the intersecting point is moved from P21 to P22, so that the detection potential is also moved from VD to VD '. In FIG. 16, however, the added transistors Q52 through Q60 increase the threshold potential Vth, so that the intersecting point is actually moved from P21 to P23. Therefore, the detection potential VD remains at VD.
The transistors Q52, Q56, and Q57 have the same characteristics as those of the transistors Q41, Q46, and Q47, respectively. Therefore, the potential Vb is the same as the potential Va. The transistors Q53, Q58, Q59, and Q55 form an inverting-amplifier AMP. In this case, the transistors Q59 and Q55 in combination form a feedback resistance and, accordingly, the gain of the inverting-amplifier AMP is set by this feedback resistance. Further, the transistor Q54 is interposed between the power supply Vcc and the drain of the transistor Q42, and the transistor Q60 is interposed between the source of the transistor Q48 and ground. The gates of these transistors Q54 and Q60 are commonly controlled by the output Vc of the inverting-amplifier AMP.
Referring to FIG. 17, when the potential Va rises up to Va ' due to the manufacturing fluctuation of the transistors Q41, Q46, and Q47, the intersecting point is moved from P21 to P22 if the threshold potential Vth of the inverter INV11 remains unchanged, so that the detection point is also moved from VD to VD '. However, in FIG. 16, the potential Vb changes in the same way as the potential Va and, accordingly, the potential Vc of the inverting-amplifier AMP changes in the opposite direction of the potential Va. Since the potential Vb is applied to the transistors Q54 and Q60, the conductance gm of the transistor Q54 is reduced, while the conductance of the transistor Q60 is increased. As a result, the resistance on the P-channel transistors Q54 and Q42 is reduced, while the resistance on the N-channel transistors Q48 and Q60 is increased. That is, the slope of the current Ip becomes large, while the slope of the current In becomes small, so that the intersecting point (FIG. 14) of the current Ip and In is moved to the right side. Thus, the threshold potential of the inverter INV11 is moved from Vth to Vth ', so that the intersecting point of the threshold potential of the inverter INV11 and the output Va is moved from P21 to P23. Thus, the detection potential is stabilized at VD.
Note that the increase ΔVth from Vth to Vth ' is adjusted by the gain of the inverting-amplifier AMP or the parameters of the transistors Q54 and Q60. In addition, the fluctuation of the threshold potential Vth of the inverter INV11 due to the transistors thereof invites the change of the slope of Vth, which is, not as large as that due to the manufacturing fluctuation of the transistors Q41, Q46, and Q47. In view of both of the changes, the feedback resistance formed by the transistors Q59 and Q55 and the like are adjusted.
In FIG. 16, the input of the inverting-amplifier AMP can be also connected directly to the source of the transistor Q41 so as to omit the transistors Q52, Q56, and Q57.
As explained hereinbefore, the present invention has an advantage in that it is completely possible to check whether or not the one-chip semiconductor device incorporating a power-supply-potential detecting circuit operates normally.