APPARATUS AND METHOD FOR PRESERVING COMPUTER HELD DATA FOLLOWING POWER-OFF

Abstract: A computer has a power supply unit (19) comprising a main power supply for receiving AC power and an auxiliary power supply arranged to provide computer power in the event of an AC power failure. The computer has a detector for detecting failure of AC power and for generating in response to such a failure an AC fail signal which causes switch over from the main power supply to the auxiliary power supply. The computer has a use operable switch (17) which is coupled to a microprocessor (16), the microprocessor (16) being arranged to generate "power-on" and "power-off" logic control signals in response to "on" and "off" signals received from the user operable switch (17). The "power-on" and "power-off" signals are transmitted to a logic controlled switch for turning the power supply unit on and off. The microprocessor (16) is also coupled to the detector to receive therefrom said AC fail signal and to generate in response a "power-off" signal for transmission to the logic controlled switch to turn off the power supply unit (19). The microprocessor (16) is arranged to transfer data held in volatile memory into non-volatile memory following receipt of an AC fail signal or an "off" logic control signal prior to transmission of a "power-off" signal to the power supply unit for the purpose of preserving "working" data.

Description: APPARATUS AND METHOD FOR PRESERVING COMPUTER HELD DATA FOLLOWING POWER-OFF The present invention relates to an apparatus and method for preserving data held in volatile memory of a computer following a power-off operation, by transferring the data into non-volatile memory. It is often extremely desirable to be able to save data stored in volatile memory of a computer in the event that the computer is switched off by the operator. The operator may not realise for example that amendments made to a document have not been saved onto the computer's hard disk prior to turning off the computer. The operator may also wish to be able to return immediately to the situation which existed prior to turning off the computer, e.g. with particular files opened and displayed, once the computer is turned back on again. There are currently available a number of computers and corresponding software packages which perform this function. One example is the "MICROSOFT" "WINDOWS '95" (trademarks) operating system running on the "IBM" "APTIVA" (trademarks) range of computers. In common with many other currently available computer ranges, the "APTIVA" range are provided on their front panel with a momentary interrupt switch which, when operated by the user, delivers a logic "ON" or "OFF" interrupt signal to the computer's microprocessor. The microprocessor in turn delivers a corresponding "POWER-ON" or "POWER-OFF" logic control signal to the power supply unit which comprises a semiconductor power switch for controlling the power supply to the computer. When the microprocessor receives an "ON" interrupt signal, a "POWER-ON" signal is immediately transmitted to the power supply. However, when a "POWER-OFF" interrupt signal is received, rather than causing the power supply to the computer to be turned off immediately, the software operating system delays the microprocessor delivering an "OFF" signal to the power supply until the data presently held in volatile memory has been stored to the computer's hard disk (or to some other form of non-volatile memory) . Only after this data transfer operation has been performed, typically after ten seconds, is a "POWER-OFF" signal transmitted to the power supply unit. Whilst the solution provided by the combination of "WINDOWS '95" software and "APTIVA" computers represent a significant advance over conventional computers, a problem remains in that, in the event of a failure of AC utility power, the microprocessor does not receive the appropriate interrupt signal from the momentary interrupt switch and the microprocessor does not have the opportunity to store data held in volatile memory into non-volatile memory. Rather, all data held in volatile memory is lost. It is an object of the present invention to overcome or at least mitigate at least one of the aforesaid disadvantages of known computers. According to a first aspect of the present invention there is provided a computer comprising a power supply unit having: a main power supply for receiving AC power; an auxiliary power supply arranged to provide computer power in the event of an AC power failure; a detector for detecting failure of AC power and for generating in response to such a failure an AC fail signal for causing a switch over from the main power supply to the auxiliary power supply; and a logic controlled switch for turning the power supply unit on and off, the computer further comprising a microprocessor coupled to a control switch and arranged to receive therefrom "ON" and "OFF" logic control signals and to generate in response respective "POWER-ON" and "POWER-OFF" logic control signals for transmission to the logic controlled switch of the power supply unit, the microprocessor being coupled to the power supply unit for receiving therefrom said AC fail signal and being arranged to generate in response a "POWER-OFF" logic control signal, wherein in use the microprocessor is arranged to transfer data held in volatile memory into non-volatile memory following receipt of an AC fail signal or an "OFF" logic control signal and prior to transmission of said "POWER- OFF" signal to the power supply unit. This arrangement makes it possible to avoid loss of data following either operation of the control switch or failure of AC utility power. Given that data held in volatile memory may be stored into non-volatile memory extremely quickly, typically in less than ten seconds, the auxiliary power supply does not need to be capable of supplying large amounts of power and can therefore be made extremely compact, e.g. so as to fit entirely within the computer casing. In one embodiment of the present invention, the control switch is a user operable switch. However, in other embodiments the control switch may comprise an automatic timer or may be controllable remotely, e.g. by a network system controller. Where the control switch is a user operable switch, the AC fail signal is preferably fed to the same microprocessor interrupt pin as the logic interrupt signal provided by the control switch. With this arrangement, little or no modification is required to the computer mother-board and the lead coupling the AC fail signal from the power supply can be soldered or otherwise connected to the mother-board at the same point as the lead from the user operable switch. Moreover, standard operating system software, e.g. "WINDOWS '95" can be used. Alternatively however, the AC fail signal may be coupled to an interrupt pin different from that to which the user operable switch is coupled. This arrangement may be advantageous where it is required that the microprocessor be able to distinguish between a user selected shut-down and a loss of AC utility power. For example, in the event of AC utility power failure, it may be appropriate to keep the computer running to enable a warning to be displayed to the user. Disadvantages of this arrangement are that the mother-board will require layout changes and the microprocessor will have to run specialised software. According to a second aspect of the present invention there is provided a power supply unit for use with a computer of the type comprising a microprocessor coupled to a control switch and arranged to receive therefrom "ON" and "OFF" logic control signals and to generate in response respective "POWER-ON" and "POWER-OFF" logic control signals for transmission to the power supply unit, the power supply unit comprising: a main power supply for receiving AC power; an auxiliary power supply arranged to provide computer power in the event of an AC power failure; a detector for detecting failure of AC power and for generating in response to such a failure an AC fail signal for causing a switch over from the main power supply to the auxiliary power supply; a logic controlled switch for turning the power supply unit on and off; means for coupling the logic controlled switch to the microprocessor for receiving therefrom said "POWER-ON" and "POWER-OFF" logic control signals; and means for coupling the detector to the computer's microprocessor to enable transmission of the AC fail signal thereto, wherein in use the microprocessor is arranged to generate in response to an AC fail signal a "POWER-OFF" signal, the microprocessor being further arranged to transfer data held in volatile memory into non-volatile memory following receipt of an AC fail signal or an "OFF" signal and prior to transmission of said "POWER-OFF" signal to the power supply unit. According to a third aspect of the present invention there is provided a method of operating a computer to enable data held in volatile memory to be transferred to non-volatile memory following receipt of an "OFF" signal from a control switch or an AC power failure, the method comprising detecting the level of available AC power and, in the event that the level drops below a predetermined threshold level, generating an AC fail signal to switch from an AC fed power supply to an auxiliary power supply and, in the event that an "OFF" signal is received or an AC fail signal generated, transferring data held in volatile memory to non-volatile memory and subsequently transmitting a logic "POWER-OFF" signal to the computer's power supply unit to switch the unit off. For a better understanding of the present invention and in order to show how the same may be carried into effect reference will now be made, by way of example, to the accompanying drawings, in which: Figure 1 shows schematically a circuit diagram of an interruptible power supply in accordance with an embodiment of the present invention; and Figure 2 illustrates diagrammatically how a power supply based on the circuit of Figure l is incorporated into a personal computer tower. There is shown in Figure 1 a circuit for implementing an uninterruptible power supply function. This circuit will not be described in detail as its basic construction and function is known from WO91/07803. However, in brief, the circuit comprises an AC to DC converter 1 which receives AC power from the mains 2 via a filter 3. The DC output of the converter 1 is provided by way of a transformer 4 to a set of regulated DC outputs 5. One of these outputs 5 provides power to charge a pair of 12 volt batteries 6, 7 via a charging unit 8. A comparator 9 receives at a first input a five volt reference signal whilst its other input is coupled via a voltage divider 10 to a tap on one of the transformer's 4 secondary windings. The voltage divider 10 is arranged such that when the nominal 25 volt output of the diode 11 drops below 15.68 volts, the output from the comparator 9, which is normally low, goes high. A high output from the comparator 9 triggers a ten second one-shot multi-vibrator circuit 12, which, while the output of the multivibrator circuit remains high, enables a power switch 23, coupling power from the batteries 6, 7 to the regulated DC outputs 5 of the power supply unit. The provision of the one-shot circuit 12 enables a test to be conducted for return of AC utility power every ten seconds. The power supply unit 19 is turned on and off by logic controlled switches 13a, 13b the operation of which will be described further hereinbelow. There are shown in Figure 2 certain components of a personal computer which incorporates the power supply unit described above. The computer is assumed to be running "WINDOWS'95" or any other operating system capable of performing the shut-down procedure described below. The computer includes a main tower-style computer casing 14 which contains a mother-board 15 on which is mounted the computers microprocessor 16, for example a "PENTIUM" (trademark) microprocessor. Mounted in the front panel of the casing 14 is a momentary interrupt switch 17 which is electrically connected to a track 18 on the mother-board 15, the track 18 in turn being coupled to a selected pin of the microprocessor 16. Depressing the momentary interrupt switch 17 transmits a logic interrupt signal to the microprocessor, causing the state of the computer to be toggled, i.e. turning it off when it is on and turning it on when it is off. The mother-board is coupled to the power supply unit 19 via power supply lines 20, a logic control line 21, and an interrupt line 22. Upon receipt of an interrupt signal from the momentary interrupt switch 17, when the computer is on, the microprocessor 16 is arranged to store all data held in volatile memory into non-volatile memory (not shown in the interests of clarity) . This operation takes approximately ten seconds. Once all volatile data has been so stored, the microprocessor transmits a logic "POWER-OFF" signal to the switches 13a, 13b of the power supply unit causing the supply of power to the computer to be terminated. When the momentary interrupt switch 17 is subsequently depressed to turn the computer on again, the microprocessor 16 issues a logic "POWER-ON" signal of the power supply unit 19 via logic control line 21 to close switches 13a, 13b causing the power supply unit 19 to begin resupplying power to the computer. The microprocessor 16 then recalls the data which was stored into non-volatile memory during the most recent shut-down operation, and restores it to the appropriate areas of volatile memory so that the computer is returned to the state which existed immediately prior to shut-down. In addition to the connection to the one shot circuit 12, the output of the comparator 9 is coupled, via line 22, to the track 18 on the computer's mother-board 15 to which the momentary interrupt switch 17 is coupled. As described above, when a failure of AC utility power occurs, the output of the comparator 9 goes high and thiε "AC fail" signal causes the loss of AC utility power to be compensated for by drawing power from the batteries. Thus, at the moment of power failure, there is little or no change in the level of power supplied to the computer. However, the microprocessor 16 receives the AC fail signal via the track 18 and will be unable to distinguish this signal from a logic interrupt signal provided by the momentary interrupt switch 17. The microprocessor commences its normal shut-down operation, storing data held in volatile memory into non-volatile memory. Once this operation is completed, the microprocessor transmits a "POWER-OFF" signal via line 21 to the power supply unit 19 to turn off the power supply unit. As the power required by the microprocessor to perform the shut-down operation, following power failure, will be relatively small, the power supply unit can be made extremely compact. Typically, the power supply can be incorporated completely within a standard computer tower casing such as by casing 14. It will be appreciated by the skilled person that various modifications may be made to the present invention without departing from the scope of the present invention. For example, in certain circumstances, it may be desirable to enable the microprocessor to distinguish a user selected shut-down from an AC power failure. In this case, for example, the AC fail signal provided by the comparator 9 may be coupled to a separate pin of the microprocessor. Alternatively, the AC fail signal may be coupled to the same pin as the momentary interrupt switch but it may have a different form from the interrupt signal provided by the switch. In either case, the microprocessor would require special software to detect the presence of an AC fail interrupt signal.

Claims: CLAIMS : 1. A computer comprising a power supply unit having: a main power supply for receiving AC power; an auxiliary power supply arranged to provide computer power in the event of an AC power failure; a detector for detecting failure of AC power and for generating in response to such a failure an AC fail signal for causing a switch over from the main power supply to the auxiliary power supply; and a logic controlled switch for turning the power supply unit on and off, the computer further comprising a microprocessor coupled to a control switch and arranged to receive therefrom "ON" and "OFF" logic control signals and to generate in response respective "POWER-ON" and "POWER-OFF" logic control signals for transmission to the logic controlled switch of the power supply unit, the microprocessor being coupled to the power supply unit for receiving therefrom said AC fail signal and being arranged to generate in response a "POWER-OFF" logic control signal, wherein in use the microprocessor is arranged to transfer data held in volatile memory into non-volatile memory following receipt of an AC fail signal or an "OFF" logic control signal and prior to transmission of said "POWER- OFF" signal to the power supply unit. 2. A computer according to claim 1, wherein the control switch is a user operable switch. 3. A computer according to claim 1, wherein the control switch comprises an automatic timer for automatically turning the computer on and off. 4. A computer according to claim 1, wherein the control switch is a remotely controlled switch. 5. A computer according to any one of the preceding claims, wherein the AC fail signal is fed to the same microprocessor interrupt pin as the logic interrupt signals provided by said control switch. 6. A computer according to any one of claims 1 to 4, wherein the AC fail signal is coupled to an interrupt pin different from that to which the control switch is coupled. 7. A power supply unit for use with a computer of the type comprising a microprocessor coupled to a control switch and arranged to receive therefrom "ON" and "OFF" logic control signals and to generate in response respective "POWER-ON" and "POWER-OFF" logic control signals for transmission to the power supply unit, the power supply unit comprising: a main power supply for receiving AC power; an auxiliary power supply arranged to provide computer power in the event of an AC power failure; a detector for detecting failure of AC power and for generating in response to such a failure an AC fail signal for causing a switch over from the main power supply to the auxiliary power supply; a logic controlled switch for turning the power supply unit on and off; means for coupling the logic controlled switch to the microprocessor for receiving therefrom said "POWER-ON" and "POWER-OFF" logic control signals; and means for coupling the detector to the computer's microprocessor to enable transmission of the AC fail signal thereto, wherein in use the microprocessor is arranged to generate in response to an AC fail signal a "POWER-OFF" signal, the microprocessor being further arranged to transfer data held in volatile memory into non-volatile memory following receipt of an AC fail signal or an "OFF" signal and prior to transmission of said "POWER-OFF" signal to the power supply unit. 8. A method of operating a computer to enable data held in volatile memory to be transferred to non-volatile memory following receipt of an "OFF" signal from a control switch or an AC power failure, the method comprising detecting the level of available AC power and, in the event that the level drops below a predetermined threshold level, generating an AC fail signal to switch from an AC fed power supply to an auxiliary power supply and, in the event that an "OFF" signal is received or an AC fail signal generated, transferring data held in volatile memory to non-volatile memory and subsequently transmitting a logic "POWER-OFF" signal to the computer's power supply unit to switch the unit off.

Inventors: PUCHIANU SILVIU, PUCHIANU, SILVIU
Applicants: MAGNUM POWER SOLUTIONS LTD, PUCHIANU SILVIU, MAGNUM POWER SOLUTIONS LIMITED, PUCHIANU, SILVIU
Application year: 1996
Main classification: G06F11
IPC codes: G06F11