Information
-
Patent Grant
-
5943635
-
Patent Number
5,943,635
-
Date Filed
Friday, December 12, 199727 years ago
-
Date Issued
Tuesday, August 24, 199925 years ago
-
Inventors
-
Original Assignees
-
Examiners
Agents
-
CPC
-
US Classifications
Field of Search
US
- 702 60
- 702 64
- 702 189
- 702 190
- 395 75008
- 365 226
- 365 229
- 327 143
- 327 50
- 326 8081
- 326 162
-
International Classifications
-
Abstract
A system and method for detecting brown-out conditions in a microcontroller, enabling a user to program the brown out detection system, and distinguishing between real brown-out events and transitory voltage swings without requiring expensive and time consuming logic. The invention compares a sense voltage to a reference voltage and filters the resulting signal to distinguish between a true-brown out signal and transitory voltage swings. The invention uses one or more program bits that vary the ratio of the supply voltage and the sense voltage. That is, the sense voltage is programmable and is dependent upon the value of the supply voltage and the value of the program bits. The present invention generates a comparison output signal based upon the comparison of the supply voltage and the sense voltage. The comparison output signal is filtered to distinguish between a real brown-out event and transitory voltage swings.
Description
BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention relates to the field of computer microcontrollers and more particularly to the field of programmable brown-out detection in a microcontroller environment.
2. Description of Background Art
Recent advances in technology have led to an increase in performance and a decrease in size of semiconductor microcontroller or microprocessor chips. Microcontrollers are devices that can control the operation of many items, e.g., braking systems in automobiles, automatic water sprinklers, and cellular telephones. Microcontrollers generally receive power from a supply voltage that is external to the microcontroller. In order to ensure proper operation, many conventional microcontrollers employ a brown-out detection system for detecting drops in the voltage level of a signal received from the supply voltage.
Brown-out detection systems detect when a supply voltage level drops below a minimum level that is necessary for proper operation of the microcontroller and/or the item using the microcontroller. Brown-out detection systems protect the microcontroller against total power failure and against "dips" in the received voltage signal.
In some conventional brown-out systems the received voltage signal is compared with a predetermined voltage reference signal. If the received voltage signal drops below the predetermined voltage reference signal the microcontroller issues a reset signal which ensures that the microcontroller will not operate with a low input voltage which, otherwise, can result in a malfunction of the microcontroller. A problem with such conventional systems is the requirement that the reference voltage and the ratio between the supply voltage and a voltage supply comparison voltage be predetermined.
Another problem with conventional brown-out detection systems is that they are not capable of distinguishing between a real brown-out condition from mere signal noise without expensive circuitry which requires additional elements, e.g., hysteresis logic. As an example, a true brown-out event may correspond to a sustained drop in the level of the received voltage signal or may correspond to a fast deep drop in the voltage signal level. However, transitory noise from input/output (I/O) switching, for example, can cause relatively shallow dips of the supply voltage which drop below the reference voltage and quickly return to an acceptable voltage level. Conventional brown-out detection circuits immediately initiates a microcontroller reset after the first instance of the voltage level dropping below the voltage reference. The operation of the microcontroller begins again only if the received voltage signal level exceeds the reference voltage after the expiration of a set period. Such conventional systems cause an unnecessary disruption in the microcontroller operation.
Some conventional systems disclose a device that purports to distinguish between real brown-out events and transitory voltage swings. However, such systems require expensive logic including multiple filters and hysteresis. Specifically, U.S. Pat. No. 5,606,511 to Yach (hereafter referred to as "Yach"), which is incorporated by reference herein in its entirety, describes a brown-out detection system that purports to distinguish between real brown-out conditions and transitory noise signals. Yach describes a system in which at least two voltages are sampled and filtered from the voltage supply signal (V.sub.DD), see FIG. 2, 5A, and 5B in Yach, for example. Yach requires two separate filtered voltage sample signals (V1 and V2). The V1 signal is filtered once and the V2 signal is filtered twice, see FIGS. 5A and 5B in Yach. The voltage level of V1 and V2 with respect to V.sub.DD is based solely upon the filters and upon the resistors 36, 37, and 38 in FIG. 5B, i.e., the values of V1 and V2 are not programmable and are used merely to provide hysteresis boundaries. The hysteresis voltages (V1, V2) are both compared to a reference voltage and a reset signal is only generated if the voltage level of both V1 and V2 are less than the reference voltage. Similarly, the Yach system only clears the reset (begins normal operation) after the voltage level of both V1 and V2 exceed the reference voltage. Yach states beginning at column 2, line 53 that "�h!ysteresis greatly assists the dual comparator to distinguish a true brown-out event from normal noise or other slight perturbations, and is achieved be dual sampling of the power supply and establishing a pair of trip points for comparison with excursion of the supply voltage level." It is apparent that the Yach system is a complex and expensive technique.
What is needed is a system and method: (1) for detecting brown-out conditions in a microcontroller; (2) for enabling a user to program the brown out detection system; and (3) for distinguishing between real brown-out events and transitory voltage swings without requiring expensive and time consuming logic.
SUMMARY OF THE INVENTION
The invention is a system and method for detecting brown-out conditions in a microcontroller, enabling a user to program the brown out detection system, and distinguishing between real brown-out events and transitory voltage swings without requiring expensive and time consuming logic. The invention compares a sense voltage to a reference voltage and filters the resulting signal to distinguish between a true-brown out signal and transitory voltage swings. The invention uses one or more program bits that vary the ratio of the supply voltage and the sense voltage. That is, the sense voltage is programmable and is dependent upon the value of the supply voltage and the value of the program bits. The present invention generates a comparison output signal based upon the comparison of the supply voltage and the sense voltage. The comparison output signal is filtered to distinguish between a real brown-out event and transitory voltage swings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of a brown-out detection circuit according to one embodiment of the present invention.
FIG. 2 is a more detailed illustration of the brown-out detection circuit according to one embodiment of the present invention.
FIG. 3 are timing diagrams illustrating the voltage levels at various nodes of the brown-out detection circuit illustrated in FIG. 2 for a supply voltage signal according to one embodiment of the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
A preferred embodiment of the present invention is now described with reference to the figures where like reference numbers indicate identical or functionally similar elements. Also in the figures, the left most digits of each reference number corresponds to the figure in which the reference number is first used.
FIG. 1 is a block diagram of a brown-out detection circuit according to one embodiment of the present invention. The brown-out detection circuit of one embodiment includes a programmable voltage module 102, a reference voltage module 104, a comparator 106, a filter 108, and an optional buffer amplifier 110. The programmable voltage module 102 receives the supply voltage V.sub.DD and one or more program bits. In one embodiment of the present invention two program bits (P1 and P2) are used. The programmable voltage module 102 outputs a voltage V.sub.SENSE that is received by the comparator 106. The value of V.sub.SENSE is dependent upon the value of V.sub.DD and the value of the program bits (P1, P2). The reference voltage module 104 generates a reference voltage (V.sub.REF) that is received by the comparator 106. The comparator 106 compares V.sub.SENSE and V.sub.REF to generate a signal V.sub.COMPOUT that is filtered by the filter 108 to distinguish between a true brown-out condition and a transient voltage drop. The filtered signal can be received by a buffer and amplifier 110 that translates V.sub.COMPOUT to logic levels compatible with the system in which the brown out system is used.
FIG. 2 is a more detailed illustration of the brown-out detection circuit according to one embodiment of the present invention. In this embodiment the programmable voltage module 102 includes five resistors and two transistors. The resistors are R1A, R1B, R2A, R2B, and R2C. The transistors are n-channel metal oxide semiconductor field effect transistors (nmos) and are referred to as MN7A, MN7B in FIG. 2. In this embodiment R1A is a 4 kilo-ohm (k) resistor, R1B is a 28 k resistor, R2C is a 20 k resistor, R2B is a 10 k resistor, and R2A is a 10 k resistor. The two transistors have a width of 10 microns (U) and a length of 1 U. MN7A receives the first program signal (P1) at its gate and operates in parallel with resistor R2B. MN7B receives the second program signal (P2) at its gate and operates in parallel with resistor R2A.
The output of the programmable voltage module (V.sub.SENSE) appears at the node between resistor R1B and R2C. The programmable voltage module receives a signal from the supply voltage (V.sub.DD) and divides the voltage using the resistors (R1A-B, R2A-C) to generate the output voltage V.sub.SENSE that is proportional to the supply voltage V.sub.DD. However, the ratio of V.sub.SENSE /V.sub.DD is programmable by the user. Specifically, if the user sets the first program signal (P1) high, the gate of MN7A will exceed its source and the transistor MN7A conducts to effectively form a short circuit in parallel to resistor R2B. The result is that the ratio of V.sub.SENSE /V.sub.DD decreases and the output voltage V.sub.SENSE decreases for a given supply voltage.
Similarly, if the user sets the second program signal (P2) high, the gate of MN7B will exceed its source and the transistor MN7B conducts to effectively form a short circuit in parallel to resistor R2A. The result is that the ratio of V.sub.SENSE /V.sub.DD decreases and the output voltage V.sub.SENSE decreases for a given supply voltage. If both P1 and P2 are set high, the ratio further decreases. It will be apparent to persons skilled in the art that various resistor values and transistor strengths can be used without departing from the scope of the present invention. In alternate embodiments, additional transistor/resistor pairs are present and additional program signals are received in order to enable the user to more precisely set the V.sub.SENSE /V.sub.DD ratio.
The reference voltage module 104 includes three transistors and a resistor. The three transistors are nmos transistors MN1A and MN1B and p-channel metal oxide semiconductor field effect transistor (pmos) MP9. The resistor is reference number R5. In this embodiment transistors MN1A and MN1B each have a length of 5 U and a width of 10 U. Transistor MP9 has a length of 2 U and a width of 15 U. Resistor R5 has a resistance of 400 k, which can be accomplished using a transistor having a length of 250 U and having a width of 2.5 U, for example. The reference signal V.sub.REF is the signal at the node between the drain of MN1A and the drain of MP9. It will be apparent that the reference voltage is substantially constant and does not substantially vary based upon variations in the supply voltage V.sub.DD because the impedance of resistor R5 is so great when compared to the incremental impedance across MN1A and MN1B.
The comparator 106 includes five transistors. nmos transistors MN3 and MN4 and pmos transistors MP6, MP7, and MP8. In this embodiment, transistors MN3 and MN4 have a width of 20 U and a length of 4 U. Transistors MP6 and MP7 have length of 2 U and a width of 20 U and transistor MP8 has a length of 2 U and a width of 10 U. When the gate of MP8 is low compared to its source, MP8 conducts and biases MP6 and MP7. When V.sub.SENSE exceeds V.sub.REF MP7 is conducting while MP6 is not significantly conducting and V.sub.COMPOUT begins rising. When V.sub.REF exceeds V.sub.SENSE MP6 is conducting while MP6 is not significantly conducting and V.sub.COMPOUT begins decreasing. The output of the comparator 106 is a signal at the drain of MN3, i.e., V.sub.COMPOUT.
The output of the comparator 106 (V.sub.COMPOUT) is filtered using, in this embodiment, an RC filter 108 comprising capacitor C1 and resistor R3. In the embodiment illustrated in FIG. 2 the resistor is a 2000 k resistor and the capacitor has a capacitance of approximately 3 picofarads. The filter 108 reduces the effect of transient voltage variations. For example, a small voltage variation or a small voltage spike is filtered so that a brown out signal is not generated to eliminate unnecessary brown out signals. However, the filter 106 does not prevent the detection of a large voltage variation, e.g., a large voltage spike. That is, the filter 108 distinguishes between a real brown-out condition and a transient voltage variation. The output of the filter 106 is received by the buffer 110.
The buffer 110 includes two transistors identified as MP5 and MN2. Transistor MP5 is a pmos transistor having a length of 2 U and a width of 10 U. Transistor MN2 is an nmos transistor having a length of 2 U and a width of 10 U. The buffer 110 illustrated in FIG. 2 is an inverter that buffers the output of the comparator 106 and filter 108. The output of the buffer 110 is a brown out signal (BR.sub.-- OUT). In one embodiment, the brown out signal is transmitted through additional logic (not shown) such that the signal (BR.sub.-- OUT) transitions quickly between a "low" voltage and a "high" voltage and vice versa. One example of such logic is a series of inverters. The operation of the brown-out circuit illustrated in FIG. 2 is described in additional detail below with reference to the timing diagram example illustrated in FIG. 3.
Although optional for the present invention, FIG. 2 illustrates an additional shut down function that will cause the present invention to generate a brown-out signal (BR.sub.-- OUT). The shutdown function logic includes transistors MP1, MP2, MP3, and MN5. In one embodiment, MP1 is a pmos transistor having a length of 2 U and a width of 10 U, MP2 is a pmos transistor having a length of 3 U and a width of 20 U, MP3 is a pmos transistor having a length of 1 U and a width of 5 U, and MN5 is an nmos transistor having a length of 1 U and a width of 5 U. The shutdown signal (SHDN) and its complementary value (SHDN.sub.-- N) are received in the locations illustrated in FIG. 2. In shutdown mode the SHDN signal is high which causes transistor MP3 to conduct and brings the gate of transistor MP5 to a voltage low enough to cause MP5 to conduct. Transistor MP5 conducts and the brown-out signal is proportional to V.sub.DD.
FIG. 3 are timing diagrams illustrating the voltage levels at various nodes of the brown-out detection circuit illustrated in FIG. 2 for a supply voltage signal according to one embodiment of the present invention. One example of a supply voltage signal (V.sub.DD) is illustrated in the timing diagram 3(a). The voltages received by the comparator 106 (V.sub.REF and V.sub.SENSE) are illustrated in the timing diagram 3(b). The filtered voltage signal V.sub.COMPOUT is illustrated in the timing diagram 3(c). The brown out signal (BR.sub.-- OUT) output from the buffer 110 is illustrated in the timing diagram 3(d).
At time T.sub.0 the supply voltage signal begins a voltage spike. At this time V.sub.SENSE begins decreasing, while V.sub.REF remains substantially constant. At T.sub.1 V.sub.SENSE drops below V.sub.REF and the value of V.sub.COMPOUT begins to drop. The supply voltage V.sub.DD begins to increase at T.sub.2 and is back to its normal value, e.g., 5 volts or 3.3. volts, at time T.sub.3. Due to the filter 110, the voltage level of the filtered signal V.sub.COMPOUT drops slowly until it drops below a minimum required voltage level at time T.sub.2 which causes the brown out signal (BR.sub.--OUT) to begin rising. At time T.sub.3 V.sub.COMPOUT begins rising and reaches its original voltage level at time T.sub.4. The brown out signal reaches its peak at T.sub.5 and is back to its original voltage level at time T.sub.4.
While the invention has been particularly shown and described with reference to a preferred embodiment and several alternate embodiments, it will be understood by persons skilled in the relevant art that various changes in form and details can be made therein without departing from the spirit and scope of the invention.
Claims
- 1. A system for detecting a brown-out condition in a microcontroller, the microcontroller receiving a supply voltage signal, the system comprising:
- a programmable voltage generator, disposed to receive the supply voltage signal and a first programming signal, for generating a first voltage signal having a voltage level that is substantially equal to a first percentage of said supply voltage if said first programming signal has a first value, and is substantially equal to a second percentage of said supply voltage if said first programming signal has a second value; said programmable voltage generator includes:
- one or more drop resistors having a first input node and a first output node for receiving said supply voltage at said first input node;
- a first switch resistor positioned between said output node and a low voltage node; and
- a first programmable switch coupled in parallel to said first switch resistor and receiving said first programming signal, said first programmable switch forming a low impedance path across said first switch resistor when said first programming signal has said first value, said first programmable switch forming a high impedance path across said first switch resistor when said first programming signal has said second value;
- a voltage reference generator for generating a voltage reference signal;
- a comparator, disposed to receive said first voltage signal and said reference voltage signal, for comparing voltage levels of said first voltage signal and said reference voltage signal and generating a comparator output signal representing the result of said comparison; and
- a filter for filtering said comparator output signal and for distinguishing between real brown-out condition from a transient voltage swings that do not represent a real brown-out event.
- 2. The system of claim 1, wherein said first percentage is less than said second percentage.
- 3. The system of claim 2, further comprising:
- a second switch resistor positioned between said output node and a low voltage node; and
- a second programmable switch coupled in parallel to said second switch resistor and receiving a second programming signal, said second programmable switch forming a low impedance path across said second switch resistor when said second programming signal has said first value, said second programmable switch forming a high impedance path across said second switch resistor when said second programming signal has said second value.
- 4. The system of claim 3, wherein said first and second switch resistors are coupled serially.
- 5. The system of claim 1, further comprising:
- a buffer, coupled to said filter, for generating a brown out signal.
- 6. The system of claim 1, further comprising:
- a shutdown module, for receiving a shutdown signal and for setting a reset signal in response to said shutdown signal.
- 7. A method for detecting a brown-out condition in a microcontroller comprising the steps of:
- receiving a voltage supply signal;
- receiving a first programming signal;
- generating a first voltage signal in response to said supply signal and said first programming signal, said first voltage signal having a voltage level that is substantially equal to a first percentage of said supply voltage if said first programming signal has a first value, and is substantially equal to a second percentage of said supply voltage if said first programming signal has a second value;
- forming a low impedance path via a first programmable switch across a first switch resistor when said first programming signal has said first value;
- forming a high impedance path via said first programmable switch across said first switch resistor when said first programming signal has said second value;
- generating a voltage reference signal;
- comparing voltage levels of said first voltage signal and said reference voltage signal and generating a comparator output signal representing the result of said comparison; and
- filtering said comparator output signal and for distinguishing between real brown-out condition from a transient voltage swings that do not represent a real brown-out event;
- wherein a first input node of a first of one or more drop resistor receives said supply voltage, said one or more drop resistors having a first output node;
- wherein said first switch resistor is positioned between said output node and a low voltage node and is coupled in parallel to said first programmable switch.
- 8. The method of claim 7, wherein said first percentage is less than said second percentage.
- 9. The method of claim 7, further comprising the steps of:
- receiving a second programming signal at a second programmable switch that is coupled in parallel to a second switch resistor,
- forming a low impedance path via said second programmable switch across said second switch resistor when said second programming signal has said first value; and
- forming a high impedance path via said second programmable switch across said second switch resistor when said second programming signal has said second value.
- 10. The method of claim 9, wherein said first and second switch resistors are coupled serially.
- 11. The method of claim 7, further comprising the step of:
- buffering said filtered signal to generate a brown out signal.
- 12. A system for detecting a brown-out condition in a microcontroller comprising:
- first means for receiving a voltage supply signal;
- second means for receiving a first programming signal;
- first generating means for generating a first voltage signal in response to said supply signal and said first programming signal, said first voltage signal having a voltage level that is substantially equal to a first percentage of said supply voltage if said first programming signal has a first value, and is substantially equal to a second percentage of said supply voltage if said first programming signal has a second value;
- first impedance means for forming a low impedance path via a first programmable switch across a first switch resistor when said first programming signal has said first value and for forming a high impedance path via said first programmable switch across said first switch resistor when said first programming signal has said second value;
- second generating means for generating a voltage reference signal;
- comparison means for comparing voltage levels of said first voltage signal and said reference voltage signal and generating a comparator output signal representing the result of said comparison;
- filter means for filtering said comparator output signal and for distinguishing between real brown-out condition from a transient voltage swings that do not represent a real brown-out event;
- wherein a first input node of a first of one or more drop resistor receives said supply voltage, said one or more drop resistors having a first output node;
- wherein said first switch resistor is positioned between said output node and a low voltage node and is coupled in parallel to said first programmable switch.
- 13. The system of claim 12, wherein said first percentage is less than said second percentage.
- 14. The system of claim 12, further comprising:
- third means for receiving a second programming signal at a second programmable switch that is coupled in parallel to a second switch resistor; and
- second impedance means for forming a low impedance path via said second programmable switch across said second switch resistor when said second programming signal has said first value and for forming a high impedance path via said second programmable switch across said second switch resistor when said second programming signal has said second value.
- 15. The system of claim 14, wherein said first and second switch resistors are coupled serially.
- 16. The system of claim 15, further comprising:
- shutdown means, for receiving a shutdown signal and for setting a reset signal in response to said shutdown signal.
- 17. The system of claim 12, further comprising:
- buffering means for buffering said filtered signal to generate a brown out signal.
- 18. The system of claim 17, further comprising:
- shutdown means, for receiving a shutdown signal and for setting a reset signal in response to said shutdown signal.
US Referenced Citations (47)
Foreign Referenced Citations (1)
Number |
Date |
Country |
54-162577 |
Dec 1979 |
JPX |