This application claims priority from Japanese Patent Application No. 2006-169831, the content of which is incorporated herein by reference in its entirety.
1. Field of the Invention
This invention relates to a low-voltage detection circuit to detect reduction in a power supply voltage that is supplied to a semiconductor integrated circuit.
2. Description of the Related Art
A microcomputer conventionally incorporates a low-voltage detection reset circuit that detects reduction in the power supply voltage and generates a reset signal and a low-voltage detection circuit to detect the reduction in the power supply voltage in advance of the generation of the reset signal in order to set various statuses of the microcomputer.
The first detection level from the first detection level setting circuit 13 can be set at any of 2n levels corresponding to n bits of control signals from a register 15. Control data is set in the register 15 through bus lines 16 of the microcomputer. If the first detection level is set so as to be the reference voltage Vref when the power supply voltage Vdd is 2.5 V, for example, the first comparator circuit 11 outputs a reset signal of a high level when the power supply voltage Vdd drops to 2.5 V or below. The microcomputer is reset by the reset signal.
A low-voltage detection circuit 20 is provided with a second comparator circuit 21 and a second detection level setting circuit 22 capable of variably setting a second detection level that corresponds to the power supply voltage Vdd. The reference voltage Vref is applied from the reference voltage generating circuit 14 to a positive terminal (+) of the second comparator circuit 21. The second detection level is applied from the second detection level setting circuit 22 to a negative terminal (−) of the second comparator circuit 21. The second detection level set by the second detection level setting circuit 22 is usually set to be larger than the first detection level set by the first detection level setting circuit 13. An output of the second comparator 21 is inputted to and retained in a register 23 which is connected to the bus lines 16.
With the circuit described above, when the power supply voltage Vdd is reduced so that the second detection level becomes equal to or lower than the reference voltage Vref, the low-voltage detection circuit 20 detects it and sets the register 23. And the statuses of the microcomputer are set using data set in the register 23 as a flag. For example, the microcomputer is set in a HALT mode or data is saved. When the power supply voltage Vdd is farther reduced so that the first detection level becomes equal to or lower than the reference voltage Vref, the programmable low-voltage detection reset circuit 10 generates the reset signal and the microcomputer is reset. Therefore, with the circuit described above, it is made possible that the reduction in the power supply voltage Vdd is detected to set the statuses of the microcomputer in advance of the generation of the reset signal.
With the circuit described above, however, there is a problem that a size of the circuit is increased because the low-voltage detection circuit 20 dedicated to detect the reduction in the power supply voltage Vdd is required.
This invention is directed to solve the problem addressed above, and offers a low-voltage detection circuit that includes a reference voltage generating circuit to generate a reference voltage which is independent of a power supply voltage and an A/D converter to convert the reference voltage to a digital value and detects the power supply voltage based on the digital value outputted by the A/D converter.
According to this invention, the power supply voltage can be detected from the converted value (the digital value) by the A/D converter since the reference voltage (an analog value) is independent of the power supply voltage and the converted value varies depending on the power supply voltage.
Next, a low-voltage detection circuit according to an embodiment of this invention will be described referring to the drawings. The low-voltage detection circuit according to the embodiment of this invention converts a reference voltage Vref generated by a reference voltage generating circuit to a converted value (a digital value) through an A/D conversion by an A/D converter, and detects a power supply voltage Vdd based on the converted value. A concrete structure of the circuit is described hereafter, referring to
A programmable low-voltage detection circuit 10 is provided with a comparator circuit 11 and a detection level setting circuit 13 capable of variably setting a detection level that corresponds to the power supply voltage Vdd, as shown in
The low-voltage detection circuit according to the embodiment of this invention detects a low voltage using a voltage follower type operational amplifier 30 and an A/D converter 32 instead of the conventional low-voltage detection circuit 20. That is, the reference voltage Vref is applied from the reference voltage generating circuit 14 to the A/D converter 32 through the voltage follower type operational amplifier 30. The voltage follower type operational amplifier 30 is used to reduce output impedance. The power supply voltage Vdd can be detected by a converted value (a digital value) by the A/D converter 32 since the reference voltage Vref is independent of the power supply voltage Vdd and the converted value varies depending on the power supply voltage Vdd. The converted value (the digital value) by the A/D converter 32 is set in a register 23 and statuses of a microcomputer are set as in the conventional art, using the converted value as a flag.
The voltage follower type operational amplifier 30 is activated when a PMOS 31 is turned on and deactivated when it is turned off. Turning on/off of the PMOS 31 is controlled by a control signal CSI from the register 15. The voltage follower type operation amplifier 30 is incorporated in the microcomputer for the purpose of testing and the A/D converter 32 is also incorporated in the microcomputer usually as a peripheral circuit. A low-voltage detection circuit that is small in size and high in accuracy can be offered by utilizing them.
An example circuit of the detection level setting circuit 13 will be described referring to
Next, an example circuit of the A/D converter 32 will be described referring to
The comparator has a function to compare the output voltage DAout with an analog input voltage ANIN (=the reference voltage Vref) and is composed of two stages of chopper type comparators. A first stage chopper type comparator is composed of a transmission gate TGY3 that is turned on in response to a data sampling signal DATASAMP to apply the analog input voltage ANIN (=the reference voltage Vref) to a first capacitor C1, a transmission gate TGY4 that is turned on in response to a reference sampling signal REFSAMP to apply the output voltage DAout to the first capacitor C1, a first inverter IV1 connected with the first capacitor C1, a transmission gate TGY1 that is turned on in response to a sampling signal SAMPTG to short-circuit an input and an output of the first inverter IV1 and a first NMOS M1 that is turned on and off in response to an A/D conversion start signal/ADSTART.
A second stage chopper type comparator is provided in order to amplify an output of the first stage chopper type comparator and is composed of a second capacitor C2 to which the output of the first inverter IV1 is applied, a second inverter IV2 connected with the second capacitor C2, a transmission gate TGY2 that is turned on in response to the sampling signal SAMPTG to short-circuit an input and an output of the second inverter IV2 and a second NMOS M2 that is turned on and off in response to the A/D conversion start signal/ADSTART.
And there is provided a latch circuit LH to latch an output of the second stage chopper type comparator based on an A/D conversion result sampling signal RESSAMP. The control circuit CONT turns on the transmission gates TGX1, TGX2 . . . TGXn-1 selectively in response to an output of the latch circuit LH.
Operation of the A/D converter 32 will be described referring to a timing chart shown in
After that, when the A/D conversion start signal/ADSTART turns to the low level, the first NMOS M1 and the second NMOS M2 are turned off. And when the data sampling signal DATASAMP and the sampling signal SAMPTG are turned to the high level sequentially, the transmission gate TGY3 is turned on to apply the analog input voltage ANIN (=the reference voltage Vref) to an input terminal of the first capacitor C1, and each of the transmission gates TGY1 and TGY2 is turned on to short-circuit the input and the output of each of the first and second inverters IV1 and IV2, respectively. As a result, the input of the first inverter IV1 is set at a threshold voltage Vt1 of the first inverter IV1 and the input of the second inverter IV2 is set at a threshold voltage Vt2 of the second inverter IV2. With this, the first capacitor C1 is charged to a voltage of (Vref-Vt1).
After that, when the data sampling signal DATASAMP and the sampling signal SAMPTG are turned to the low level sequentially, the transmission gate TGY3 and the transmission gates TGY1 and TGY2 are turned off. After that, when the reference sampling signal REFSAMP is turned to the high level, the transmission gate TGY4 is turned on to apply the output voltage DAout of the D/A converter to the input terminal of the first capacitor C1. At that time, the output voltage DAout is set at Vdd/2 by the control circuit CNT.
Since the input terminal of the first capacitor C1 varies from Vref to Vdd/2, an output terminal of the first capacitor C1, which is the input of the first inverter IV1, is thereby changed to (Vdd/2-Vref+Vt1). With this, Vref is compared with Vdd/2 by the first inverter IV1. That is, the first inverter IV1 outputs the high level in the case where Vref>Vdd/2, and outputs the low level in the case where Vref<Vdd/2. The output of the first inverter IV1 is amplified by the second stage chopper type comparator and latched in the latch circuit LH based on a rise of the A/D conversion result sampling signal RESSAMP. With this, a most significant bit (MSB) of Vref is determined.
After that, the reference sampling signal REFSAMP sequentially turns to the high level and the D/A converter sequentially outputs the output voltage DAout corresponding to the result of the A/D conversion of the higher bit, and Vref is compared with it sequentially. For example, if the result of the first comparison shows Vref>Vdd/2, the output voltage DAout in a second comparison becomes ¾Vdd which is compared with Vref to determine a bit of (MSB-1). Vref is converted to a digital value of n bits as described above. When the power supply voltage Vdd is reduced, the digital value becomes larger because the output voltage DAout becomes smaller. When the power supply voltage Vdd is increased, the digital value becomes smaller because the output voltage DAout becomes larger. Therefore, the power supply voltage Vdd can be detected based on the digital value obtained from the results of the A/D conversion.
According to the embodiment of this invention, it is made possible to realize the low-voltage detection circuit which is small in size and accurate in detecting the reduction in the power supply voltage, because it detects the reduction in the power supply voltage utilizing the A/D converter incorporated in a microcomputer or the like.
Number | Date | Country | Kind |
---|---|---|---|
2006-169831 | Jun 2006 | JP | national |