JPH0517722U - Power failure compensator for computer - Google Patents

Power failure compensator for computer

Info

Publication number
JPH0517722U
JPH0517722U JP6313491U JP6313491U JPH0517722U JP H0517722 U JPH0517722 U JP H0517722U JP 6313491 U JP6313491 U JP 6313491U JP 6313491 U JP6313491 U JP 6313491U JP H0517722 U JPH0517722 U JP H0517722U
Authority
JP
Japan
Prior art keywords
time
power
power failure
computer
checksum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6313491U
Other languages
Japanese (ja)
Inventor
純 三輪
Original Assignee
河村電器産業株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 河村電器産業株式会社 filed Critical 河村電器産業株式会社
Priority to JP6313491U priority Critical patent/JPH0517722U/en
Publication of JPH0517722U publication Critical patent/JPH0517722U/en
Pending legal-status Critical Current

Links

Landscapes

  • Power Sources (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Electric Clocks (AREA)

Abstract

(57)【要約】 【目的】 コンピュ−タの電源が停電し、復電した場合
に、コンピュ−タの記憶デ−タ、時刻デ−タが正常な状
態でコンピュ−タをリスタ−トさせるとともに、デ−タ
を修復する必要が生じても修復時間を短くすることを目
的とする。 【構成】 コンピュ−タの電源が停電し、ある時間後復
電したとき、マイクロプロセッサCPUは、スタティッ
クラム1のチェックサムの計算を行い、その計算結果が
停電時のチェックサムと一致していると判断した場合に
は、復電時刻と停電時刻の時間差とバッテリ3による電
源バックアップ時間との時間比較を行い、上記時間差が
電源バックアップ時間より長いと判断したときには時刻
異状フラグを立てて、時計IC2の時刻デ−タが狂って
いることを判別する。
(57) [Abstract] [Purpose] When the power of the computer is cut off and the power is restored, restart the computer with the memory data and time data of the computer in a normal state. At the same time, the purpose is to shorten the repair time even if it is necessary to repair the data. [Configuration] When the power supply of the computer is cut off and the power is restored after a certain time, the microprocessor CPU calculates the checksum of the static ram 1, and the calculation result matches the checksum at the time of power failure. If it is determined that the time difference between the power recovery time and the power failure time and the power supply backup time by the battery 3 are compared with each other, and if it is determined that the time difference is longer than the power supply backup time, a time abnormality flag is set and the clock IC2 It is determined that the time data of is wrong.

Description

【考案の詳細な説明】[Detailed description of the device]

【0001】[0001]

【産業上の利用分野】[Industrial applications]

本考案は、電池等でスタティックラムと時計集積回路(時計IC)とを停電補 償する電源バックアップ回路を備えたコンピュ−タの停電補償装置に関する。 The present invention relates to a power failure compensator for a computer having a power supply backup circuit for power failure compensation of a static ram and a timepiece integrated circuit (timepiece IC) with a battery or the like.

【0002】[0002]

【従来の技術】[Prior Art]

従来、電池等でスタティックラム、及び時計集積回路等を停電補償するマイク ロコンピュ−タの停電補償装置は、図2に示すような電源バックアップ回路を備 えている。 図2に示すようにスタティックラム1と時計IC2はバッテリ3に接続されて いるが、通常はマイクロプロセッサCPUの電源端子Vccに印加される5ボル ト電圧がトランジスタTR1を介して供給されている。そして、マイクロコンピ ュ−タの電源が停電した場合、マイクロプロセッサCPUの電源端子Vccに印 加される5ボルト電圧が低下するため、トランジスタTR2がオフの状態になり 、その結果、トランジスタTR1もオフの状態になるため、スタティックラム1 と時計IC2は上記5ボルト電圧ではなく、バッテリ3からの5ボルト電圧の供 給を受ける。しかしながら、バッテリ3の充電量に限界があるため、所定時間が 経過するとスタティックラム1のメモリ状態がランダムになり、また時計IC2 の時刻が狂ってくる。 2. Description of the Related Art Conventionally, a power failure compensating device of a micro computer for compensating for a power failure of a static ram, a timepiece integrated circuit, etc. with a battery has a power supply backup circuit as shown in FIG. As shown in FIG. 2, the static ram 1 and the timepiece IC2 are connected to the battery 3, but normally a 5-volt voltage applied to the power supply terminal Vcc of the microprocessor CPU is supplied through the transistor TR1. Then, when the power supply of the microcomputer is cut off, the voltage of 5 V applied to the power supply terminal Vcc of the microprocessor CPU decreases, so that the transistor TR2 is turned off, and as a result, the transistor TR1 is also turned off. Therefore, the static ram 1 and the timepiece IC2 are supplied with the 5 volt voltage from the battery 3 instead of the above 5 volt voltage. However, since the amount of charge of the battery 3 is limited, the memory state of the static ram 1 becomes random after a lapse of a predetermined time, and the time of the timepiece IC2 becomes incorrect.

【0003】 図3はマイクロコンピュ−タの停電補償装置の停電時における割込処理を示し たもので、図4は従来の停電補償フロ−を示したものである。 マイクロコンピュ−タの電源が停電した場合、図3に示すように割込処理が行 われる。即ち、停電であることが検出されると、スタティックラム1のチェック サムを計算し、その計算結果をスタティックラム1に記録したあとレジスタ類を 退避させ、ホ−ルト状態にする。次に、図4に示すように、マイクロコンピュ− タの電源が復電したとき、その復電が検出されると、スタティックラム1のチェ ックサムを計算し、その計算結果が、停電時に前記割込処理において計算された スタティックラム1のチェックサムの計算結果と一致していると判断した場合、 退避させたレジスタ類を復帰させる一方、スタティックラム1のチェックサムの 計算結果が停電時のそれと一致していない場合は、メモリ、レジスタ類の初期設 定を行ったあとメインル−チンにリタ−ンする。FIG. 3 shows an interruption process at the time of a power failure of the power failure compensating device of the microcomputer, and FIG. 4 shows a conventional power failure compensating flow. When the power supply of the microcomputer is cut off, an interrupt process is performed as shown in FIG. That is, when a power failure is detected, the checksum of the static ram 1 is calculated, the calculation result is recorded in the static ram 1, the registers are saved, and the halt state is set. Next, as shown in Fig. 4, when the power of the microcomputer is restored, when the restoration is detected, the checksum of the static ram 1 is calculated, and the calculation result is the above-mentioned division at the time of power failure. When it is determined that the checksum calculation result of static ram 1 calculated in the plug-in process matches, the saved registers are restored, while the checksum calculation result of static ram 1 is the same as that at the time of power failure. If not, make initial settings for memory and registers and then return to the main routine.

【0004】[0004]

【考案が解決しようとする課題】[Problems to be solved by the device]

上記従来のマイクロコンピュ−タの停電補償装置は、上記のような動作により 停電補償をしているが、図4の停電補償動作はスタティックラム1を対象とした ものであり、時計IC2の狂いを判別することができない。 そのため、復電状態においてスタティックラム1は正常であるにもかかわらず 時計IC2の時刻が狂っていることがある。これは、スタティックラム1と時計 IC2のデ−タ保持電圧に差があるからである。 そこで本考案では、コンピュ−タの電源が停電したあと、復電したときに、ス タティックラムの記憶デ−タが正常に保持されているか否かを調べ、その記憶デ −タが正常に保持されていると判断した場合には、時計集積回路の時刻デ−タの 狂いを判別できるようにして、復電時の記憶デ−タ、時刻デ−タ両方が正常な状 態でコンピュ−タをリスタ−トさせることを解決すべき技術的課題とするもので ある。 The conventional power failure compensating device for a microcomputer described above compensates for power failure by the above-described operation. However, the power failure compensating operation in FIG. I can't tell. Therefore, in the power recovery state, the time of the clock IC2 may be incorrect although the static ram 1 is normal. This is because there is a difference in the data holding voltage between the static ram 1 and the timepiece IC2. Therefore, in the present invention, when the computer power is restored after power failure, it is checked whether or not the memory data of the static ram is normally retained, and the memory data is normally recovered. When it is judged that the data is held, it is possible to discriminate the deviation of the time data of the clock integrated circuit so that both the memory data and the time data at the time of power recovery are in the normal state. The technical issue to be solved is to restart the data.

【0005】[0005]

【課題を解決するための手段】[Means for Solving the Problems]

上記課題解決のための技術的手段は、停電時にスタティックラムと時計集積回 路とを、所定時間、電源バックアップするように構成したコンピュ−タの停電補 償装置を、停電したことを検出する手段と、停電時刻を検出する手段と、復電し たことを検出する手段と、復電時刻を検出する手段と、復電時に前記スタティッ クラムのチェックサムを行い、停電時のチェックサムと一致しているか否かを判 断する手段と、復電時のチェックサムが停電時のチェックサムと一致していると 判断された状態で、停電時刻から復電時刻までの時間が前記電源バックアップ時 間より長いと判断した場合に時刻異状フラグを立てて前記時計集積回路の狂いを 判別させる時刻異状判別手段とを備えた構成にすることである。 The technical means for solving the above-mentioned problems is a means for detecting a power failure of a power failure compensation device of a computer configured to backup the power supply to the static ram and the clock integrated circuit for a predetermined time at the time of power failure. Then, the means for detecting the power failure time, the means for detecting the power recovery, the means for detecting the power recovery time, and the checksum of the above-mentioned static ram at the time of power recovery are performed. The power backup time is the time from the power failure time to the power recovery time, with the method to determine whether the power is on and the checksum at power recovery is determined to match the checksum at power failure. When it is judged that the time is longer, the time abnormality flag is set and the time abnormality determining means for determining the deviation of the clock integrated circuit is provided.

【0006】[0006]

【作用】[Action]

上記構成のコンピュ−タの停電補償装置によれば、コンピュ−タの電源が停電 し、ある時間経過後に復電したとき、復電時にスタティックラムのチェックサム 計算を行い、その結果、復電時のチェックサムが停電時のチェックサムと一致し ていると判断されると、時刻異状判別手段は、停電時刻から復電時刻までの時間 を演算し、その時間が電源バックアップ時間より長いと判断した場合に時刻異状 フラグを立てて時計集積回路の狂いを判別する。 According to the computer power failure compensator having the above configuration, when the power supply of the computer is interrupted and the power is restored after a certain period of time, the static ram checksum is calculated when the power is restored, and as a result, when the power is restored. If it is determined that the checksum of the power supply coincides with the checksum at the time of power failure, the time abnormality determination means calculates the time from the power failure time to the power recovery time and determines that the time is longer than the power supply backup time. In this case, a time abnormality flag is set to discriminate the deviation of the clock integrated circuit.

【0007】[0007]

【実施例】【Example】

次に、本考案の一実施例を図1のフロ−チャ−ト、及び図2の電源バックアッ プ回路を参照しながら説明する。 尚、図1のフロ−チャ−トは、コンピュ−タの電源が停電し、ある時間経過後 に復電したときの停電補償フロ−を示したものである。 前記図2に示したマイクロプロセッサCPUは、コンピュ−タの電源が停電し 、ある時間経過後に復電したと判断すると、スタティックラム1のチェックサム 計算を行い、その値が、前記図3に示した停電時の割込処理において計算された スタティックラム1のチェックサムと一致しているか否かを判断する。 その判断の結果、復電後のチェックサムと停電時のチェックサムとが一致して いない場合には、スタティックラム1の記憶デ−タ、及び時計IC2の時刻デ− タをクリアし、更に初期値設定したあと、メインル−チンにリタ−ンする。 An embodiment of the present invention will now be described with reference to the flow chart of FIG. 1 and the power supply backup circuit of FIG. The flow chart of FIG. 1 shows a power failure compensation flow when the power source of the computer is interrupted and the power is restored after a lapse of a certain time. When the microprocessor CPU shown in FIG. 2 judges that the power of the computer is cut off and the power is restored after a certain time, the checksum of the static RAM 1 is calculated, and the value is shown in FIG. It is determined whether or not the checksum of the static RAM 1 calculated in the interrupt processing at the time of power failure matches. If the checksum after power recovery and the checksum after power failure do not match as a result of the judgment, the memory data of the static RAM 1 and the time data of the clock IC2 are cleared, and the initial value is reset. After setting the value, return to the main routine.

【0008】 一方、前記復電後のチェックサムと停電時のチェックサムとが一致していると 判断した場合には、スタティックラム1のデ−タは正常に保持されているため、 時計IC2のチェックフロ−に入る。そこで、復電時刻を読出し、更に復電時刻 と停電時刻の時間差を計算したうえ、その時間差が前記バッテリ3による電源バ ックアップ時間より短いと判断した場合には正常状態と判断してメインル−チン にリタ−ンする。逆に上記時間差が電源バックアップ時間より長いと判断した場 合には、時計IC2の時刻デ−タが狂っていると判断して時刻異状フラグを立て たあと、メインル−チンにリタ−ンする。On the other hand, when it is determined that the checksum after the power recovery and the checksum after the power failure match, the data of the static ram 1 is normally held, so that the clock IC 2 Enter the check flow. Therefore, the power recovery time is read, the time difference between the power recovery time and the power failure time is calculated, and if it is determined that the time difference is shorter than the power-up time by the battery 3, the main routine is judged to be normal. Return to. On the contrary, when it is determined that the time difference is longer than the power source backup time, it is determined that the time data of the clock IC2 is out of order, a time abnormality flag is set, and then the main routine is returned.

【0009】 以上のように、スタティックラム1のデ−タは正常に保持されているにもかか わらず、時刻以上フラグが立っている場合には、スタティックラム1のデ−タを クリアし、更に初期設定をする必要が無く、時計IC2の時刻デ−タを修正する のみで良い。As described above, if the static ram 1 data is normally retained, but the flag is set for the time or more, the static ram 1 data is cleared. Further, it is not necessary to perform further initial setting, and it is sufficient to correct the time data of the clock IC2.

【0010】[0010]

【考案の効果】[Effect of the device]

以上のように本考案によれば、コンピュ−タの電源が停電したあと、復電した ときに、スタティックラムの記憶デ−タが正常に保持されているか否かを調べ、 その記憶デ−タが正常に保持されていると判断した場合には、時計集積回路の時 刻デ−タの狂いを判別できるように構成したため、その時刻デ−タのみを修正す るだけでコンピュ−タをリスタ−トさせることができることから、停電による修 復時間を短くすることができるという効果がある。 As described above, according to the present invention, when power is restored after the power of the computer is restored, it is checked whether or not the memory data of the static RAM is normally retained, and the memory data is stored. If it is determined that the clock data is normally held, the time integrated data of the clock integrated circuit can be discriminated so that the computer can be reset by correcting only the time data. -There is an effect that the recovery time due to a power outage can be shortened.

【図面の簡単な説明】[Brief description of drawings]

【図1】本考案の一実施例の停電補償フロ−図である。FIG. 1 is a flowchart of power failure compensation according to an embodiment of the present invention.

【図2】電源バックアップ回路図である。FIG. 2 is a power supply backup circuit diagram.

【図3】停電時の割込フロ−図である。FIG. 3 is an interrupt flow chart at the time of power failure.

【図4】従来の停電補償フロ−図である。FIG. 4 is a conventional power failure compensation flowchart.

【符号の説明】[Explanation of symbols]

1 スタティックラム 2 時計IC 3 バッテリ CPU マイクロプロセッサ TR1 トランジスタ TR2 トランジスタ 1 Static RAM 2 Watch IC 3 Battery CPU Microprocessor TR1 transistor TR2 transistor

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.5 識別記号 庁内整理番号 FI 技術表示箇所 G06F 12/16 340 L 7629−5B ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 5 Identification code Internal reference number FI technical display location G06F 12/16 340 L 7629-5B

Claims (1)

【実用新案登録請求の範囲】[Scope of utility model registration request] 【請求項1】 停電時にスタティックラムと時計集積回
路とを、所定時間、電源バックアップするように構成し
たコンピュ−タの停電補償装置であって、 停電したことを検出する手段と、停電時刻を検出する手
段と、復電したことを検出する手段と、復電時刻を検出
する手段と、復電時に前記スタティックラムのチェック
サムを行い、停電時のチェックサムと一致しているか否
かを判断する手段と、復電時のチェックサムが停電時の
チェックサムと一致していると判断された状態で、停電
時刻から復電時刻までの時間が前記電源バックアップ時
間より長いと判断した場合に時刻異状フラグを立てて前
記時計集積回路の狂いを判別させる時刻異状判別手段と
を備えたことを特徴とするコンピュ−タの停電補償装
置。
1. A power failure compensating device for a computer configured to backup the power supply of a static ram and a clock integrated circuit for a predetermined time in the event of a power failure, wherein a means for detecting a power failure and a power failure time are detected. Means, a means for detecting a power recovery, a means for detecting a power recovery time, and a checksum of the static ram at the time of power recovery to determine whether or not the checksum at the time of power failure matches. And the checksum at power recovery is judged to be the same as the checksum at power failure, and if the time from power failure to power recovery is longer than the power backup time, the time difference A power failure compensating device for a computer, comprising: a time abnormality determining means for setting a flag to determine whether the clock integrated circuit is out of order.
JP6313491U 1991-08-09 1991-08-09 Power failure compensator for computer Pending JPH0517722U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6313491U JPH0517722U (en) 1991-08-09 1991-08-09 Power failure compensator for computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6313491U JPH0517722U (en) 1991-08-09 1991-08-09 Power failure compensator for computer

Publications (1)

Publication Number Publication Date
JPH0517722U true JPH0517722U (en) 1993-03-05

Family

ID=13220500

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6313491U Pending JPH0517722U (en) 1991-08-09 1991-08-09 Power failure compensator for computer

Country Status (1)

Country Link
JP (1) JPH0517722U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006026441A (en) * 2005-10-11 2006-02-02 Takao:Kk Game machine
JP2007236987A (en) * 2007-06-27 2007-09-20 Sankyo Kk Game machine
JP2010005446A (en) * 2009-10-13 2010-01-14 Sophia Co Ltd Game machine

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006026441A (en) * 2005-10-11 2006-02-02 Takao:Kk Game machine
JP2007236987A (en) * 2007-06-27 2007-09-20 Sankyo Kk Game machine
JP2010005446A (en) * 2009-10-13 2010-01-14 Sophia Co Ltd Game machine
JP4723019B2 (en) * 2009-10-13 2011-07-13 株式会社ソフイア Game machine

Similar Documents

Publication Publication Date Title
US7103738B2 (en) Semiconductor integrated circuit having improving program recovery capabilities
US20090013198A1 (en) Electronic apparatus with improved memory power management
CN103823769A (en) Computer system and data recovery method
JP3617877B2 (en) Computer system and automatic start method thereof
JPH0527880A (en) System restart device
JPH0517722U (en) Power failure compensator for computer
US7047565B2 (en) Method and system for capturing in-service date information
JP4812699B2 (en) Power control device
JPH08178976A (en) Power breakage detector
CN111042932B (en) Method and device for obtaining downtime and electronic control unit
EP1516256B1 (en) Method and base chip for monitoring the operation of a microcontroller unit
TW201908916A (en) Electronic device and methods for calculating power on hours
JP3357777B2 (en) Program control system
JP2967219B2 (en) External power supply for digital computer
JP2720756B2 (en) Heater control device
JP2869833B2 (en) Power failure time detection control device
JP2687520B2 (en) Battery maintenance device for auxiliary battery
JP2876487B2 (en) Handy type information processing device
JPS6310463B2 (en)
JP2665410B2 (en) Electronic devices with backup memory
JPH0736574A (en) Initializing device and method for electronic equipment
JP3921168B2 (en) Electronic device operation mode setting device and setting method
JP2578467Y2 (en) Power failure detection timer
JP2852156B2 (en) Self-diagnosis method for IC inspection device
JP3175962B2 (en) Calendar device