Background of the Invention
The present invention relates to circuitry for switching a microcomputer to a standby mode once the microcomputer is in a defined state, normally a reset state.
It is known that, if one wishes to retain information in a random access memory (RAM), it is necessary to provide a standby power supply connected to the RAM even when an associated microprocessor is switched off. Care must be taken, however, to ensure that the information contained in the RAM is not changed when the microcomputer is switched off in the middle of accessing a RAM.
Various circuits have been proposed for achieving a controlled switch-over to standby supply for a RAM. Unfortunately, many of these circuits utilize a number of components and occupy a relatively large amount of space. Until now, this has rendered them inappropriate for incorporation in hybrid devices used for multicircuit electronic equipment used in motor vehicles.
U.S. Pat. No. 4,512,019 describes a circuit for monitoring a microcomputer and, in particular, a circuit for resetting the microcomputer when a malfunction occurs or when the supply voltage drops to a value below a predetermined level.
In Patent Abstracts of Japan, Vol. 9, No. 214, p. 384 and JP 60-73 720 a device for preventing the destruction of stored data in a RAM is described. In this device the base of a switching transistor installed between the main power source and the power input terminal of the RAM is connected to the output terminal of a voltage-drop detecting element.
A device for maintaining operation as long as the voltage fluctuations of a main power source are within a predetermined range of recommended working source voltages of a CMOS-RAM is described in Patent Abstracts of Japan, Vol. 10, No. 389, P. 531 & JP 61-177 523. Therefore a relay contact for switching between the main power source and a chargeable type secondary backup battery is proposed.
Summary of the Invention
It is an object of the present invention to provide an apparatus for switching a random access memory of a microcomputer to standby power.
The present invention provides a power supply arrangement for a microcomputer comprising regulator means for supplying a regulated main voltage or a regulated standby voltage to a microcomputer, and a monitoring integrated circuit having a plurality of circuit elements which is connected to the microcomputer for sending a resetting signal to the microcomputer. A circuit element of the monitoring integrated circuit has an output connected to a control input of the regulator means via a threshold circuit. The monitoring integrated circuit is arranged to generate, in response to a resetting signal after a predetermined time delay, a control signal for switching the regulator means when the microcomputer has reached a defined state for switching to a standby mode. The advantage of the above-described arrangement is that an existing circuit can be utilized without any redesign of the circuit itself.
In more detail, the voltage regulator means has a control input for receiving an "on" signal to switch the voltage regulator means to supply the regulated main power to the microcomputer, but when the "on" signal is not present at the control input the regulated standby power is supplied. The "on" signal is delivered by means for providing the "on" signal which include an ignition switch so that, when the ignition switch is switched, the "on" signal is provided at the control input and the voltage regulator means delivers the main power to the microcomputer. The monitoring integrated circuit provides a resetting signal in response to the "on" signal which is also provided to it at a monitoring input. A time delay network including a capacitor and resistors is provided connected to the control input and to the monitoring integrated circuit. This time delay network provides a time interval during which the "on" signal is maintained at the control input of the voltage regulator means after switching the ignition switch to provide the standby power.
Brief Description of the Drawing
The objects, features and advantages of the present invention will now be illustrated in more detail by the following detailed description, reference being made to the accompanying drawing in which:
The sole FIGURE is a circuit diagram of a preferred embodiment of a power supply arrangement for a microcomputer according to the invention.
Detailed Description of the Preferred Embodiment
The present invention is based on an existing integrated circuit represented generally by the reference numeral 10, which comprises a number of operational amplifiers and components of a "watchdog circuit".
The structure and operation of the circuit 10 is described in more detail hereinbelow.
Associated with circuit 10 is a microcomputer 11 supplied with power from a voltage regulator 12 which, in turn, is connected via an input terminal 13 to the battery B of the vehicle. The voltage regulator 12 supplies two regulated voltages: a main regulated power supply voltage V.sub.out from the V.sub.out output terminal 12a during normal operation, and standby power supply voltage Stby from the output terminal 12b. The standby power supply is used to retain information in RAM R associated with the microcomputer 11. As is known, operation of the ignition switch I connected to terminal 15 is detected and a signal supplied to an ON input 12c which causes the voltage regulator to switch ON or OFF.
In the present embodiment, the terminal 15 connected to the ignition switch I is connected to the terminal 12c of the voltage regulator via diodes D2, D3 and resistor R4. A diode D1 is inserted in the connection between the terminal 13 and the main power supply to the regulator 12. The diodes D1 and D2 are used as polarity reversal protection diodes.
With the ignition switch I in its ON condition, a voltage signal is present at the terminal 15 and the voltage regulator 12 is in its normal operating condition supplying power to the microcomputer 11 from the output terminal 12a. A signal is also present on the VE input of the circuit 10 via resistor R2 which is connected to the output of the diode D2. The input terminal VE is the noninverting input of an operational amplifier 01 whose output is taken from the terminal VA and fed to the input terminal KE of an additional operational amplifier 02 having an open collector output KA. The output KA is of high impedance and enables via line 10a the watchdog circuit containing a part of the integrated circuit 10 and external components R6, R7, C3. The watchdog circuit is supplied with a watchdog signal WD shown with the dashed line in the FIGURE from the microcomputer 11 by which it monitors operation of the microcomputer and provides a reset signal in the event of a malfunction. It also provides a reset signal in response to a change in potential at input S. Thus a change in potential at the input S is reflected by a change in output potential at the output R (reset) which is connected to the microcomputer 11. The watchdog circuit may be a monitoring circuit of the type described in U.S. Pat. No 4,512,019 assigned to the same assignee. In normal operation, with the ignition switch closed, the potential at input S is high which means that the output at R is low and the microcomputer is not reset. The level of the signal at output R is fed to the inverting input XE of an additional operation amplifier 03 whose output XA is connected via a time delay network of resistors R5 and R4 and capacitor C1 to the control terminal 12c of the voltage regulator 12. Diode D3 decouples the output XA from the input VE.
When the ignition switch I is switched OFF. the voltage on terminal 15 disappears and after a capacitor C2 connected to the input terminal VE has discharged below a low triggering threshold, the output VA switches to a low potential which, in turn, switches the output KA to a low potential to turn off the watchdog circuit by lowering the potential at input S. In turn, the output R goes high which resets the microcomputer 11 and also provides a high potential input to the terminal XE. Because the amplifier connected between XE and XA is inverting, the potential at output XA goes low and this in turn causes the potential at 12c to drop to a low potential after a capacitor C1 of the time delay network connected thereto has discharged and the microcomputer has reached a defined state for switching to standby mode. A low potential at input 12c causes a first transistor in the regulator 12 to switch on thus removing voltage from the base of a main transistor and turning it off. This causes the voltage regulator 12 to switch to provide a standby voltage on the terminal 12b to maintain the RAM R with standby power.
It will be appreciated that the above arrangement can be modified for different types of monitoring integrated circuits 10. For example, the flip-flop between terminals S and R could provide a noninverted output which would result in a change for the amplifier connected between terminals XE and XA to be a noninverting amplifier. Further, as indicated by the dashed line the microcomputer itself, by detecting a low voltage at VA, can provide the necessary watchdog signal to cause the monitoring integrated circuit 10 to generate the appropriate change in potential at the terminal 12c of the voltage regulator to switch the voltage regulator to a standby mode.