Abstract:
A power-on-reset and watchdog circuit is disclosed which employs discrete bipolar transistors to provide reset capability for microprocessors in the event of power-up or microprocessor malfunction. The present invention has a watchdog detection circuit which monitors a pulsed microprocessor output signal. As long as the watchdog detection circuit receives the pulsed microprocessor output signal, the microprocessor will not reset. In the event of microprocessor malfunction the pulsed microprocessor output signal will latch either high or low, initiating an oscillator circuit to reset the microprocessor. Upon power-up, the watchdog detection circuit will be forced into the off state for a specified amount of time so as to invoke the oscillator circuit, thereby resetting the microprocessor.

Description:
This is a continuation of Ser. No. 08/316,246 filed Sep. 30, 1994, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     The present invention relates to a power-on-reset and watchdog circuit for microcomputer applications, and more particularly to a low cost and compact power-on-reset and watchdog circuit using discrete bipolar transistors. 
     Reset circuits are commonly employed in microprocessor applications to reset the microprocessor during either a power up initialization or a microprocessor malfunction. Reset circuits transmit a signal to a microprocessor reset line to reset the microprocessor. However, the prior art reset circuits typically employ logic gates in integrated circuit form, such as dual-in-line or single-in-line chips. One such logic gate typically employed is a Schmitt Trigger which uses commercially available logic gates, commonly found in the TO82 or similar dual-in-line package. A problem with using these types of integrated circuits is that they consume relatively large amounts of space on a circuit board which, in turn, presents design and manufacturing difficulties for applications having tight space constraints. Also, employing these types of logic gates is relatively expensive. In high sales volume industries, such as the automotive industry, such incremental cost savings may translate into sizable long term savings and economic advantage. 
     A need therefore exists for a low cost and compact reset circuit for microprocessor applications. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is a primary object of the present invention to provide a low cost method and circuit for resetting a microprocessor during power up initialization or in the event of microprocessor malfunction. 
     Another object of the present invention is to provide a method and circuit for resetting a microprocessor that facilitates reducing the use of expensive constituent components and minimizing the space consumed by the circuit. 
     According to one aspect of the invention, a power-on-reset and watchdog circuit for a microprocessor having a reset line and a watchdog output line comprises monitor means for monitoring the watchdog output line and for generating a reset signal in response to a malfunction signal generated by the microprocessor on the watchdog output line. 
     According to another aspect of the present invention, a method is disclosed for resetting a microprocessor, including the steps of: generating a microprocessor error signal in a microprocessor having a reset terminal; configuring a watchdog circuit to receive the microprocessor error signal and to generate a reset enable signal responsive thereto, wherein the watchdog circuit comprises a plurality of transistors; and resetting the microprocessor in response to the reset enable signal. 
     The above, and other objects, features and advantages of the present invention will become apparent from the following description read in conjunction with the accompanying drawings, in which like reference numerals designate the same elements. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     FIG. 1 is a block diagram of a power-on-reset and watchdog circuit of the present invention; 
     FIG. 2 is a circuit diagram illustrating one embodiment of a power-on-reset and watchdog circuit of the present invention; and 
     FIG. 3 is a timing diagram for the operation of the power-on-reset and watchdog circuit illustrated in FIG. 2. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, there is shown a block diagram of a power-on-reset and watchdog circuit 10 connected to a microprocessor 40. Circuit 10 includes a watchdog monitor circuit 30 and a reset enable circuit 20. Watchdog monitor circuit 30 generates a monitor signal during normal microprocessor operation and a monitor error signal during power up initialization or microprocessor malfunction. Reset enable circuit 20 generates a reset idle signal during normal microprocessor operation and a reset enable signal during power up initialization and/or microprocessor malfunction. 
     Microprocessor 40 has a reset line 50 and a watchdog output line 60. Microprocessor 40 receives either the reset idle signal or the reset enable signal, depending on the operational mode of microprocessor 40, via reset line 50. Microprocessor 40 generates a microprocessor standard signal during normal microprocessor operation and a microprocessor error signal during microprocessor malfunction, both of which are output on watchdog output line 60 and received by watchdog monitor circuit 30. 
     Watchdog monitor circuit 30 monitors the microprocessor standard signal on watchdog output line 60 to ensure that the microprocessor standard signal has a predetermined frequency. Reset enable circuit 20 remains inactive as long as the microprocessor standard signal is received by watchdog monitor 30, producing a reset idle signal. Microprocessor 40 will continue to operate without being reset as long as reset enable circuit 20 generates the reset idle signal. 
     During power-up initialization or microprocessor malfunction, microprocessor 40 generates the microprocessor error signal on watchdog output line 60. It should be noted that the microprocessor error signal can be either latched high or low. Either way, watchdog monitor circuit 30 generates a monitor error signal in response to the microprocessor error signal. 
     Upon receiving the monitor error signal, reset enable circuit 20 generates a reset enable signal on reset line 50. The microprocessor 40 receives the reset signal and resets microprocessor 40 in response thereto. Once microprocessor 40 is reset, microprocessor 40 may return to normal operation. 
     Referring now to FIG. 2, a power-on-reset and watchdog circuit 10 exists utilizing three bipolar junction transistors in combination with 7 resistors and 4 capacitors. Watchdog monitor circuit 30 is shown in dotted lines and described as follows. A first npn transistor Q1 is in a common-emitter configuration, with its emitter tied directly to ground and its base connected to ground through a first resistor R1. The base of transistor Q1 and resistor R1 are connected at a node N1. The collector of transistor Q1 is connected at a node N2 to a supply voltage (hereinafter Vcc) through the parallel combination of a second resistor R2 and a first capacitor C1. 
     Reset enable circuit 20 is shown in dotted lines and described as follows. A second npn transistor Q2 is in a common-emitter configuration, with its emitter tied directly to ground and its base tied to node N2. The collector of transistor Q2 is connected at a node N3 to Vcc through a third resistor R3, and to ground through a second capacitor C2. Notice that node N3 is connected directly to reset line 50 of the microprocessor 40 and to a base of a first pnp transistor Q3 (node N7) through a fourth resistor R4. The emitter of transistor Q3 is tied directly to Vcc, while the collector of transistor Q3 is tied at a node N5 to ground through a fifth resistor R5. 
     Node N5 is connected to a node N6 through a sixth resistor R6. Node N6 is tied to ground through a third capacitor C3 and to line 60 of microprocessor 40 through a seventh resistor R7 and a fourth capacitor C4. The operation of power-on-reset and watchdog circuit 10 will now be described as follows. 
     During normal operation, microprocessor 40 generates the microprocessor standard signal which periodically forward biases transistor Q1 at a rate sufficient to maintain capacitor C1 discharged through transistor Q1 to ground. With capacitor C1 discharged, the collector voltage of transistor Q1 (node N2) will remain low, which maintains transistor Q2 in the &#34;off&#34; state. 
     The &#34;off&#34; state of transistor Q2, in turn, causes the voltage at node N3 to remain high. Therefore, node N3 and reset line 50 of microprocessor 40 remain high, with the voltage approximately equal to the supply voltage at Vcc, as long as watchdog output line 60 provides the microprocessor standard signal to node N1. Microprocessor 40 will not reset as long as node N3 remains high. 
     Referring now to FIG. 2, upon system malfunction, microprocessor 40 stops generating the microprocessor standard signal on watchdog output line 60. Instead, microprocessor 40 generates the microprocessor error signal, which remains latched either high or low. In response to the microprocessor error signal, transistor Q1 remains off long enough for capacitor C1 to charge through R2 such that transistor Q2 turns on. As transistor Q2 turns on, capacitor C2 immediately discharges therethrough, forcing node N3 low. A low state at node N3 provides the reset enable signal on reset line 50 to reset microprocessor 40. 
     At this point, transistor Q1 is off which, as stated above, biases transistor Q2 on. The low voltage level at node N3 (due to transistor Q2 being on) causes transistor Q3 to turn on immediately. With transistor Q3 on, capacitor C3 then charges through resistor R6 until the voltage level across capacitor C3 biases transistor Q1 on. 
     Transistor Q2 will then turn off as transistor Q1 turns on, thereby allowing the voltage level at node N3 to go high again. Transistor Q3 remains on until capacitor C2 charges through resistors R3 and R4 to a voltage level approximately equal to the difference between the supply voltage and the diode voltage drop of transistor Q3. 
     When Q3 turns off, C3 discharges through R6 and R7 and transistor Q1 turns off. Transistor Q2 turns on at the point where capacitor C1 charges through resistor R2 to a voltage level approximately equal to the diode drop of transistor Q2. The voltage at node N3 decays immediately when transistor Q2 turns on, returning node N3 to the low state. 
     The aforementioned progression produces the reset enable signal having one pulse to reset line 50 of microprocessor 40. This progression repeats itself until a successful reset has been achieved at microprocessor 40. When reset has been achieved, microprocessor 40 resumes generating the microprocessor standard signal on watchdog output line 60, thereby causing reset enable circuit 20 to stop generating the reset enable signal and resume generating the reset idle signal. More specifically, transistor Q1 resumes being pulsed sufficiently into conduction so as to maintain transistor Q2 in the &#34;off&#34; state until another error requires the reset function to initiate. 
     In other words, the microprocessor error signal, the monitor error signal, and the reset enable signal all arise during the period between microprocessor malfunction and microprocessor reset. 
     Referring now to FIGS. 2 and 3, the operation of circuit 10 during power up initialization will be described. At the onset of initialization, microprocessor 40 produces the microprocessor standard signal on watchdog output line 60. However, to ensure proper operation of microprocessor 40, circuit 10 is designed to override the microprocessor standard signal to reset microprocessor 40 upon power up initialization by forcing node N3 low, thereby prompting the reset function detailed above. 
     Thus, upon the application of supply voltage Vcc to circuit 10, node N2 follows supply voltage Vcc as it ramps upward to a fully powered state. Node N2, however, is clamped by the base-emitter voltage (Vbe) of transistor Q2, thereby limiting the voltage at node N2 to approximately the diode drop voltage of transistor Q2. As such, transistor Q2 is turned on virtually immediately upon the application of supply voltage Vcc to circuit 10. 
     The on state of transistor Q2 causes node N3 to change from a zero voltage through resistors R3 and R4 to a voltage level limited by the collector-emitter saturation voltage (Vce sat) of transistor Q2, which is approximately 0.083 volts. This biasing of transistor Q2 effectively turns transistor Q3 on immediately upon the application of supply voltage Vcc to circuit 10. The on state of transistor Q3 causes node N6 to charge through resistor R6 in a ramped fashion until transistor Q3 turns off. 
     Transistor Q1 is off at the onset of power up initialization due to a lack of charge across capacitor C3, where the voltage level at node N6 is low. With transistor Q1 off, the voltage drop over resistor R2 maintains transistor Q2 on, thereby maintaining node N3 low. Node N3 will remain low until capacitor C3 charges through resistor R1 so as to turn transistor Q1 on. 
     Once transistor Q1 turns on, transistor Q2 immediately turns off. With transistor Q2 off, capacitor C2 charges through resistor R3, causing node N3 to ramp high toward supply voltage Vcc. This is the onset of one reset enable signal pulse to be supplied to reset line 50 of microprocessor 40. Transistor Q3 turns off when node N3 has reached a voltage level approximately equal to the difference between supply voltage Vcc and the diode drop voltage of transistor Q3. 
     Transistor Q1 turns off at the approximate point where the voltage at node N3 equals supply voltage Vcc. Transistor Q2 is then forward biased as capacitor C1 charges through resistor R2 to a voltage level approximately equal to the diode drop of transistor Q2. Node N3 then immediately decays from a high state to a low state, thereby completing one reset enable signal pulse to be supplied to reset line 50 of microprocessor 40. 
     The aforementioned progression repeats until microprocessor 40 resets and resumes producing the microprocessor standard signal on watchdog output line 60. The microprocessor standard signal on watchdog output line 60 turns on transistor Q1, thereby turning off transistor Q2 and Q3 to return node N3 to a high state. A high state at node N3 will disable the reset function until another error occurs. 
     In one embodiment, the various elements comprise the following values: 
     
         ______________________________________Element              Value______________________________________C1                   10 μFC2                   10 μFC3                   47 μFC4                   .022 μFR1                   10K ohmsR2                   10K ohmsR3                   1K ohmsR4                   10K ohmsR5                   1K ohmsR6                   10K ohmsR7                   10K ohmsQ1                   Q2N3904Q2                   Q2N3904Q3                   Q2N3906______________________________________ 
    
     As such, the present invention provides a compact and low cost power-on-reset and watchdog circuit which is capable of resetting a microprocessor during power up initialization or if an error in microprocessor operation causes a malfunction in its proper operation. 
     Having described preferred embodiments of the invention with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various changes and modifications may be effected therein by one skilled in the art without departing from the scope or spirit of the invention as defined in the appended claims.