JPH05276560A - Data storage method at momentary interruption in remote controller for hot water supply equipment - Google Patents
Data storage method at momentary interruption in remote controller for hot water supply equipmentInfo
- Publication number
- JPH05276560A JPH05276560A JP4101771A JP10177192A JPH05276560A JP H05276560 A JPH05276560 A JP H05276560A JP 4101771 A JP4101771 A JP 4101771A JP 10177192 A JP10177192 A JP 10177192A JP H05276560 A JPH05276560 A JP H05276560A
- Authority
- JP
- Japan
- Prior art keywords
- data
- ram
- microcomputer
- stored
- 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
Links
Landscapes
- Power Sources (AREA)
- Selective Calling Equipment (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、データを記憶するRA
Mを有するマイクロコンピュータ(以下マイコンとす
る)を備えた、給湯器のリモートコントローラ(以下リ
モコンとする)における瞬時停電時のデータ記憶方法に
関する。BACKGROUND OF THE INVENTION The present invention relates to an RA for storing data.
The present invention relates to a data storage method at a momentary power failure in a remote controller (hereinafter referred to as a remote controller) of a water heater including a microcomputer having M (hereinafter referred to as a microcomputer).
【0002】[0002]
【従来の技術】従来、マイコンを備えた給湯器のリモコ
ンにおいては、停電時に電源電圧がマイコンの動作限界
である例えば4.5Vを下回ると、リセット端子をロー
レベルにしてマイコンをハード的にリセットしていた。
そして、電源電圧が4.5V以上に復帰すると、全ての
メモリを初期化していたので、全てのデータが消失して
しまう。2. Description of the Related Art Conventionally, in a remote controller for a water heater equipped with a microcomputer, when the power supply voltage falls below the operation limit of the microcomputer, for example, 4.5 V, during a power failure, the reset terminal is set to low level and the microcomputer is reset by hardware. Was.
Then, when the power supply voltage returns to 4.5 V or higher, all the data has been lost because all the memories have been initialized.
【0003】このため、データの保持時間の延長を図る
べく、電源バックアップ用のキャパシタの容量を大きく
したり、停電検出時にマイコンを低消費電力モードに切
り換えたり、マイコンのリセットを2段階にするという
ような工夫がなされていた。Therefore, in order to extend the data retention time, the capacity of a capacitor for power supply backup is increased, the microcomputer is switched to a low power consumption mode when a power failure is detected, and the microcomputer is reset in two stages. Such a device was made.
【0004】[0004]
【発明が解決しようとする課題】しかし従来の方式で
は、キャパシタが大型化したり、リセット回路が複雑に
なるという問題があった。However, the conventional method has problems that the capacitor becomes large and the reset circuit becomes complicated.
【0005】本発明は、特別なハードウエアを用いるこ
となく、瞬時停電時のデータ保持時間を延長できる給湯
器のリモコンにおける瞬停時のデータ記憶方法を提供す
ることを目的とする。An object of the present invention is to provide a data storage method at the time of a momentary power failure in a remote controller of a water heater which can extend the data retention time at the time of a momentary power failure without using special hardware.
【0006】[0006]
【課題を解決するための手段】本発明は、データを記憶
するRAMを有するマイコンを備えた給湯器のリモコン
における瞬停時のデータ記憶方法であって、保持すべき
データのチェックサムを前記マイコンにより演算して予
め前記RAMに格納しておき、瞬時停電により前記マイ
コンの電源電圧が所定の電圧よりも低下したときにマイ
コンをリセットした後、前記電源電圧が前記所定の電圧
以上に復帰したときに、前記マイコンにより、前記RA
Mに格納されている前記保持すべきデータを読み出して
そのチェックサムを演算し、そのチェックサムと前記R
AMに格納されているチェックサムとを比較し、両者が
一致すれば前記RAMの内容のうち前記保持すべきデー
タ以外を初期化し、両者が一致しなければ前記RAMの
全内容を初期化することを特徴としている。SUMMARY OF THE INVENTION The present invention is a data storage method at the time of a momentary power failure in a remote controller of a water heater equipped with a microcomputer having a RAM for storing data, wherein the checksum of the data to be held is stored in the microcomputer. When the power supply voltage returns to the predetermined voltage or higher after resetting the microcomputer when the power supply voltage of the microcomputer drops below a predetermined voltage due to an instantaneous power failure, In addition, by the microcomputer, the RA
The data to be held, which is stored in M, is read and its checksum is calculated.
Comparing with the checksum stored in AM, if the two match, initialize the contents of the RAM other than the data to be held, and if the two do not match, initialize the entire contents of the RAM. Is characterized by.
【0007】[0007]
【作用】先ず、マイコンにより、保持すべきデータのチ
ェックサムを演算して、予めRAMに格納しておく。そ
して、瞬時停電などによりマイコンの電源電圧が所定の
電圧よりも低下したときに、マイコンをリセットする。
その後、電源電圧が所定の電圧以上に復帰したときに、
マイコンにより、RAMに格納されている保持すべきデ
ータを読み出してそのチェックサムを演算し、そのチェ
ックサムとRAMに格納されているチェックサムとを比
較して、両者が一致すればRAMの内容のうち保持すべ
きデータ以外を初期化し、両者が一致しなければRAM
の全内容を初期化する。したがって、瞬時停電時にRA
Mの記憶保持限界である例えば2V程度に低下するまで
に電源電圧が復帰すれば、保持すべきデータが消失する
ことはなく、瞬時停電時のデータ保持時間を良好に延長
できる。First, the microcomputer calculates the checksum of the data to be held and stores it in the RAM in advance. Then, when the power supply voltage of the microcomputer drops below a predetermined voltage due to an instantaneous power failure or the like, the microcomputer is reset.
After that, when the power supply voltage returns to above the specified voltage,
The microcomputer reads out the data to be held stored in the RAM, calculates the checksum of the data, compares the checksum with the checksum stored in the RAM, and if both match, the contents of the RAM are confirmed. Initialize data other than the data that should be held, and if both do not match, RAM
Initialize all contents of. Therefore, when there is an instantaneous power failure, RA
If the power supply voltage is restored before the storage limit of M drops to, for example, about 2 V, the data to be retained will not be lost and the data retention time at the momentary power failure can be favorably extended.
【0008】[0008]
【実施例】以下に本発明を図面に示す実施例に基づいて
説明する。図1は本発明の一実施例における瞬停時のデ
ータ記憶方法を採用したリモコンを備えた給湯器の概略
構成図で、給湯器本体1にはコントローラ2が設置され
ている。コントローラ2にはリモコン3が接続されてお
り、リモコン3にはマイコン4が設置されている。マイ
コン4にはRAM5が設置されている。コントローラ2
は、リモコン3などからの信号に応じて、給湯器本体1
の各種機器を制御する。リモコン3は、使用者の操作に
基づいて信号をコントローラ2に供給したり、給湯器本
体1の作動状態を表示したりする。マイコン4は、リモ
コン3の各種入力信号を演算処理する。RAM5は、保
持すべきデータなどを記憶する。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below based on the embodiments shown in the drawings. FIG. 1 is a schematic configuration diagram of a water heater equipped with a remote controller that employs a data storage method during an instantaneous power failure according to an embodiment of the present invention. A water heater body 1 is provided with a controller 2. A remote controller 3 is connected to the controller 2, and a microcomputer 4 is installed in the remote controller 3. A RAM 5 is installed in the microcomputer 4. Controller 2
Responds to signals from the remote controller 3 etc.
Control various equipment. The remote controller 3 supplies a signal to the controller 2 and displays the operating state of the water heater body 1 based on the operation of the user. The microcomputer 4 arithmetically processes various input signals of the remote controller 3. The RAM 5 stores data to be retained.
【0009】図2はRAM5の内容の説明図で、領域A
には保持すべきデータが、領域Bには保持すべきデータ
のチェックサムが、領域Cには保持すべきデータを反転
したデータが、領域Dには保持すべきデータを反転した
データのチェックサムがそれぞれ格納されている。FIG. 2 is an explanatory diagram of the contents of the RAM 5, area A
The checksum of the data to be held in the area B, the checksum of the data to be held in the area B, the inverted data of the data to be held in the area C, and the checksum of the data to be held in the area D. Are stored respectively.
【0010】次に上記マイコン4の瞬時停電時の動作に
ついて、図3のフローチャートを参照しながら説明す
る。予め、マイコン4は、RAM5の領域Aに格納され
ている保持すべきデータのチェックサムを演算して領域
Bに格納し、保持すべきデータを反転したデータを作成
して領域Cに格納し、保持すべきデータを反転したデー
タのチェックサムを演算して領域Dに格納する。そして
瞬時停電時に、電源バックアップ用のキャパシタが放電
してマイコン4の電源電圧がマイコン4の動作限界であ
る例えば4.5V未満に低下すると、マイコン4のリセ
ット端子がローレベルになり、マイコン4がリセットさ
れる。そして瞬時停電が解除され、電源電圧が4.5V
以上に復帰すると、マイコン4は、RAM5の領域Aか
ら保持すべきデータを読み出し、そのチェックサムを演
算すると共に、RAM5の領域Bからチェックサムを読
み出し、両チェックサムを比較して、さらにRAM5の
領域Cから保持すべきデータの反転データを読み出し、
そのチェックサムを演算すると共に、RAM5の領域D
からチェックサムを読み出し、両チェックサムを比較す
る(ステップS1)。次に、比較した2組のチェックサ
ムがいずれも等しいか否かを判断し(ステップS2)、
等しければRAM5の領域Aの保持すべきデータ以外の
データを初期化する(ステップS3)。すなわち、瞬時
停電時に電源電圧がRAM5の記憶保持限界である例え
ば2V未満まで低下しなかった場合には、RAM5のデ
ータが破壊されていないので、2組のチェックサムがそ
れぞれ等しい。したがって、2組のチェックサムがそれ
ぞれ等しければ、領域Aの保持すべきデータが正確に保
存されたとして、そのデータを初期化せず、それ以外の
データを初期化するのである。一方、ステップS2にお
いて、2組のチェックサムの少なくとも一方が等しくな
いと判断すれば、RAM5の全てのデータを初期化する
(ステップS4)。すなわち、瞬時停電時に電源電圧が
RAM5の記憶保持限界である2V以下に低下した場合
には、RAM5のデータが破壊されているので、2組の
チェックサムがそれぞれ等しい可能性は殆どない。した
がって、2組のチェックサムの少なくとも一方が等しく
なければ、領域Aの保持すべきデータが正確に保存され
ていないとして、全てのデータを初期化するのである。Next, the operation of the microcomputer 4 during an instantaneous power failure will be described with reference to the flowchart of FIG. In advance, the microcomputer 4 calculates a checksum of the data to be held stored in the area A of the RAM 5 and stores it in the area B, creates inverted data of the data to be held and stores it in the area C, A checksum of data that is the data to be held is inverted and stored in the area D. When the power backup capacitor is discharged during the momentary power failure and the power supply voltage of the microcomputer 4 drops below the operation limit of the microcomputer 4, for example, 4.5 V, the reset terminal of the microcomputer 4 becomes low level, Will be reset. Then the momentary power failure is released and the power supply voltage is 4.5V.
After returning to the above, the microcomputer 4 reads out the data to be held from the area A of the RAM 5, calculates the checksum thereof, reads the checksum from the area B of the RAM 5, compares both checksums, and further stores the checksum of the RAM 5. Read the inverted data of the data to be held from the area C,
The checksum is calculated and the area D of the RAM 5 is calculated.
The checksum is read from and the two checksums are compared (step S1). Next, it is determined whether the two checksums thus compared are equal to each other (step S2),
If they are equal, data other than the data to be held in the area A of the RAM 5 is initialized (step S3). That is, when the power supply voltage does not drop below the storage holding limit of the RAM 5, for example, 2 V during the momentary power failure, the data in the RAM 5 is not destroyed, and the two sets of checksums are equal. Therefore, if the two sets of checksums are equal to each other, it is determined that the data to be held in the area A has been correctly saved, and that data is not initialized, but the other data is initialized. On the other hand, if it is determined in step S2 that at least one of the two sets of checksums is not equal, then all the data in the RAM 5 is initialized (step S4). That is, when the power supply voltage drops below the storage holding limit of 2V of the RAM 5 during an instantaneous power failure, the data in the RAM 5 has been destroyed, so there is little possibility that the two sets of checksums are equal. Therefore, if at least one of the two sets of checksums is not the same, it is determined that the data to be held in the area A is not correctly stored, and all the data is initialized.
【0011】このように、瞬時停電後に、RAM5の領
域Aから保持すべきデータを読み出してそのチェックサ
ムを演算すると共に、RAM5の領域Bからチェックサ
ムを読み出して、両チェックサムを比較し、さらに、R
AM5の領域Cから保持すべきデータの反転データを読
み出し、そのチェックサムを演算すると共に、RAM5
の領域Dからチェックサムを読み出して、両チェックサ
ムを比較し、比較した2組のチェックサムがいずれも等
しければ、RAM5の領域Aの保持すべきデータを初期
化しないので、瞬時停電時にマイコン4がリセットされ
ても、電源電圧がRAM5の記憶保持限界未満にまで低
下してデータが破壊されない限り、保持すべきデータが
初期化されることはない。したがって、特別なハードウ
エアを用いることなく、瞬時停電時のデータ保持時間を
良好に延長できる。As described above, after the momentary power failure, the data to be held is read from the area A of the RAM 5 to calculate the checksum thereof, and the checksum is read from the area B of the RAM 5 to compare both checksums. , R
The inverted data of the data to be held is read from the area C of the AM5, the checksum thereof is calculated, and the RAM5
The checksum is read out from the area D of No. 2 and the two checksums are compared. If the two checksums compared are equal, the data to be held in the area A of the RAM 5 is not initialized. Even if is reset, the data to be held is not initialized unless the power supply voltage falls below the storage holding limit of the RAM 5 and the data is destroyed. Therefore, the data holding time at the time of momentary power failure can be favorably extended without using special hardware.
【0012】すなわち図4のように、時刻t1 において
瞬時停電が発生し、時刻t2 において電源電圧が5Vか
ら4.5Vに低下してマイコン4がリセットされたとし
ても、時刻t3 において電源電圧が2Vに低下するまで
に一点鎖線で示すように電源電圧が4.5V以上に復帰
すれば、保持すべきデータが初期化されることはなく、
従来と比べて時間t3 −t2 だけデータ保持時間を延長
できる。That is, as shown in FIG. 4, even if a momentary power failure occurs at time t 1 and the power supply voltage drops from 5V to 4.5V at time t 2 and the microcomputer 4 is reset, the power supply at time t 3 If the power supply voltage returns to 4.5 V or higher as indicated by the alternate long and short dash line before the voltage drops to 2 V, the data to be held will not be initialized,
The data holding time can be extended by the time t 3 -t 2 as compared with the conventional case.
【0013】また上記実施例のように、保持すべきデー
タのチェックサムと、保持すべきデータの反転データの
チェックサムとの双方を演算して、RAM5に格納して
いる各チェックサムと比較するようにすれば、データの
破壊をより確実に検出できる。Further, as in the above embodiment, both the checksum of the data to be held and the checksum of the inverted data of the data to be held are calculated and compared with each checksum stored in the RAM 5. By doing so, data destruction can be detected more reliably.
【0014】なお上記実施例では、保持すべきデータの
チェックサムと、保持すべきデータの反転データのチェ
ックサムとの双方を演算して、RAM5に格納している
各チェックサムと比較するようにしたが、本発明はこの
ような構成に限定されるものではなく、例えば反転デー
タのチェックサムの比較を省略してもよい。In the above embodiment, both the checksum of the data to be held and the checksum of the inverted data of the data to be held are calculated and compared with each checksum stored in the RAM 5. However, the present invention is not limited to such a configuration, and comparison of checksums of inverted data may be omitted, for example.
【0015】[0015]
【発明の効果】本発明は以上の構成よりなり、データを
記憶するRAMを有するマイコンを備えた給湯器のリモ
コンにおける瞬停時のデータ記憶方法であって、マイコ
ンにより保持すべきデータのチェックサムを演算して予
めRAMに格納しておき、瞬時停電によりマイコンの電
源電圧が所定の電圧よりも低下したときにマイコンをリ
セットした後、電源電圧が所定の電圧以上に復帰したと
きに、マイコンにより、RAMに格納されている保持す
べきデータを読み出してそのチェックサムを演算し、そ
のチェックサムとRAMに格納されているチェックサム
とを比較し、両者が一致すればRAMの内容のうち保持
すべきデータ以外を初期化し、両者が一致しなければR
AMの全内容を初期化するので、瞬時停電時にマイコン
がリセットされても、電源電圧がRAMの記憶保持限界
未満にまで低下してデータが破壊されない限り、保持す
べきデータが初期化されることはない。したがって、特
別なハードウエアを用いることなく、瞬時停電時のデー
タ保持時間を良好に延長できる。The present invention is configured as described above, and is a data storage method at the time of a momentary power failure in a remote controller of a water heater having a microcomputer having a RAM for storing data, which is a checksum of data to be held by the microcomputer. Is stored in RAM in advance, and when the power supply voltage of the microcomputer drops below a predetermined voltage due to an instantaneous power failure, the microcomputer is reset, and when the power supply voltage returns to a predetermined voltage or higher, , Read the data to be held stored in the RAM, calculate the checksum, compare the checksum with the checksum stored in the RAM, and hold the contents of the RAM if they match. Initialize data other than the expected data, and if both do not match, R
Since all the contents of AM are initialized, even if the microcomputer is reset during a momentary power failure, the data to be retained must be initialized unless the power supply voltage drops below the memory retention limit of RAM and the data is destroyed. There is no. Therefore, the data holding time at the time of momentary power failure can be favorably extended without using special hardware.
【図1】本発明の一実施例における瞬停時のデータ記憶
方法を採用したリモコンを備えた給湯器の概略構成図で
ある。FIG. 1 is a schematic configuration diagram of a water heater equipped with a remote controller that employs a data storage method during an instantaneous power failure according to an embodiment of the present invention.
【図2】RAMの内容の説明図である。FIG. 2 is an explanatory diagram of the contents of RAM.
【図3】マイコンの動作を説明するフローチャートであ
る。FIG. 3 is a flowchart illustrating the operation of a microcomputer.
【図4】瞬時停電時におけるマイコンの電源電圧の変化
の説明図である。FIG. 4 is an explanatory diagram of changes in the power supply voltage of the microcomputer during an instantaneous power failure.
1 給湯器本体 3 リモコン 4 マイコン 5 RAM 1 Water heater main body 3 Remote control 4 Microcomputer 5 RAM
Claims (1)
ンを備えた給湯器のリモコンにおける瞬停時のデータ記
憶方法であって、保持すべきデータのチェックサムを前
記マイコンにより演算して予め前記RAMに格納してお
き、瞬時停電により前記マイコンの電源電圧が所定の電
圧よりも低下したときにマイコンをリセットした後、前
記電源電圧が前記所定の電圧以上に復帰したときに、前
記マイコンにより、前記RAMに格納されている前記保
持すべきデータを読み出してそのチェックサムを演算
し、そのチェックサムと前記RAMに格納されているチ
ェックサムとを比較し、両者が一致すれば前記RAMの
内容のうち前記保持すべきデータ以外を初期化し、両者
が一致しなければ前記RAMの全内容を初期化すること
を特徴とする給湯器のリモコンにおける瞬停時のデータ
記憶方法。1. A data storage method at the time of an instantaneous power failure in a remote controller of a water heater including a microcomputer having a RAM for storing data, wherein a checksum of data to be held is calculated by the microcomputer and stored in the RAM in advance. The RAM is stored in the RAM by the microcomputer when the power supply voltage of the microcomputer is reset to a predetermined voltage or more after the power supply voltage of the microcomputer drops below a predetermined voltage due to an instantaneous power failure. The data to be held stored in the RAM is read out, its checksum is calculated, and the checksum is compared with the checksum stored in the RAM. Data other than the data to be retained is initialized, and if the two do not match, the entire contents of the RAM are initialized. Data storage method for remote control during momentary power failure.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4101771A JPH05276560A (en) | 1992-03-26 | 1992-03-26 | Data storage method at momentary interruption in remote controller for hot water supply equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4101771A JPH05276560A (en) | 1992-03-26 | 1992-03-26 | Data storage method at momentary interruption in remote controller for hot water supply equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH05276560A true JPH05276560A (en) | 1993-10-22 |
Family
ID=14309487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4101771A Pending JPH05276560A (en) | 1992-03-26 | 1992-03-26 | Data storage method at momentary interruption in remote controller for hot water supply equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH05276560A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006026441A (en) * | 2005-10-11 | 2006-02-02 | Takao:Kk | Game machine |
JP2007320456A (en) * | 2006-06-01 | 2007-12-13 | Denso Corp | On-vehicle electronic equipment control device |
JP2010015323A (en) * | 2008-07-02 | 2010-01-21 | Shindengen Electric Mfg Co Ltd | Power source instantaneous interruption storage device, ac/dc converter and power source instantaneous interruption storage method |
JP2012166073A (en) * | 2012-06-11 | 2012-09-06 | Sophia Co Ltd | Game machine |
JP2013029278A (en) * | 2011-07-29 | 2013-02-07 | Rinnai Corp | Water heater |
-
1992
- 1992-03-26 JP JP4101771A patent/JPH05276560A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006026441A (en) * | 2005-10-11 | 2006-02-02 | Takao:Kk | Game machine |
JP2007320456A (en) * | 2006-06-01 | 2007-12-13 | Denso Corp | On-vehicle electronic equipment control device |
JP2010015323A (en) * | 2008-07-02 | 2010-01-21 | Shindengen Electric Mfg Co Ltd | Power source instantaneous interruption storage device, ac/dc converter and power source instantaneous interruption storage method |
JP2013029278A (en) * | 2011-07-29 | 2013-02-07 | Rinnai Corp | Water heater |
JP2012166073A (en) * | 2012-06-11 | 2012-09-06 | Sophia Co Ltd | Game machine |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5382839A (en) | Power supply control circuit for use in IC memory card | |
US5414861A (en) | Data protection system using different levels of reserve power to maintain data in volatile memories for any period of time | |
US4777626A (en) | Memory device having backup power supply | |
US5475271A (en) | Power source control system for electronic device and expansion unit connected thereto | |
EP0426663B1 (en) | Apparatus for defined switching of a microcomputer to standby mode | |
JP2582489B2 (en) | Power failure recovery device for electronic equipment | |
US5237698A (en) | Microcomputer | |
JP3667920B2 (en) | IC card | |
JPH08249244A (en) | Data holding circuit | |
JPH05276560A (en) | Data storage method at momentary interruption in remote controller for hot water supply equipment | |
US5835706A (en) | Method of controlling data writing into on-board microcomputer | |
JPH0822422A (en) | Memory device | |
US6760672B2 (en) | Automatic detection of battery-backed data integrity in volatile memory | |
WO1990003611A3 (en) | Computer memory backup system | |
JP2765502B2 (en) | Backup power supply circuit | |
JP2508305B2 (en) | Initial value determination device | |
JP3094924B2 (en) | Communication device control circuit | |
JP2002099357A (en) | Semiconductor device | |
JPH0728712A (en) | Storage | |
JP3768565B2 (en) | DRAM controller | |
JPH02100743A (en) | Electronic equipment | |
JPH01128147A (en) | Arithmetic unit | |
JP3281113B2 (en) | Abnormality detection circuit of microcomputer system | |
JPH0329015A (en) | Instantaneous service interruption processor for equipment using computer | |
KR930004436B1 (en) | How to check learning data storage memory of learning remote control |