JPH0784894A - Method for writing nonvolatile memory - Google Patents

Method for writing nonvolatile memory

Info

Publication number
JPH0784894A
JPH0784894A JP5177701A JP17770193A JPH0784894A JP H0784894 A JPH0784894 A JP H0784894A JP 5177701 A JP5177701 A JP 5177701A JP 17770193 A JP17770193 A JP 17770193A JP H0784894 A JPH0784894 A JP H0784894A
Authority
JP
Japan
Prior art keywords
data
memory area
written
writing
memory
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
JP5177701A
Other languages
Japanese (ja)
Inventor
Hirotoshi Kawamura
博年 河村
Toshiaki Ikuma
俊明 井熊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shinko Electric Co Ltd
Original Assignee
Shinko Electric Co Ltd
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 Shinko Electric Co Ltd filed Critical Shinko Electric Co Ltd
Priority to JP5177701A priority Critical patent/JPH0784894A/en
Publication of JPH0784894A publication Critical patent/JPH0784894A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE:To eliminate the possibility of a defect in writing data, etc., even if a power source function is disabled during the rewriting of the nonvolatile memory. CONSTITUTION:The nonvolatile memory is provided with an in-operation memory area 5 and a backup memory area 4, which are written successively with time. In the memory area which is written precedently, a flag 4e is written after the writing and in the memory area which is written latter, the flag 4e is preferably reset after the data writing is completed; and at least write data 4a, the mark 4b of the write data, and check data 4d are preferably written in the backup memory area 4. Further, data are written in the backup memory area 4 preferably precedently to the in-operation memory 5.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明はコンピュ−タによるデ
−タ処理装置等に設けられた不揮発性メモリの書き込み
方法に係り,特に,不揮発性メモリの書き込み時に停電
が発生した場合等にも誤ったデ−タがメモリに書き込ま
れる恐れのない安全な不揮発性メモリの書き込み方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of writing to a non-volatile memory provided in a data processing device or the like by a computer, and in particular, it is erroneous even when a power failure occurs when writing to the non-volatile memory. The present invention relates to a safe non-volatile memory writing method in which data is not written to the memory.

【0002】[0002]

【従来の技術】各種のコンピュ−タを活用した機械類の
制御装置やデ−タ処理装置等には,その機械を運転する
制御定数をテンキ−等のデ−タ設定器から入力してこの
コンピュ−タに付属する不揮発性メモリに書き込む場合
がある。また,このようなシステムにおいては運転中の
デ−タを停電時の退避用等必要な時期に自動的に不揮発
性メモリに書き込む手段を備えている場合がある。この
ような不揮発性メモリに所定のデ−タ類を書き込み,ま
た,修正を行うには例えば図3に示すような構成によっ
て実行される。図3において,11は,例えば,EEP
ROM(electricalerasable pr
ogramable read onlymemor
y)等の不揮発性の記憶素子によって構成される不揮発
性メモリである。コンピュ−タ本体のデ−タ処理機能1
2で作成され,または,テンキ−等の設定器やセンサ−
類等の入力機器12aから入力され,書き込むためのデ
−タ類をコンピュ−タ本体に設けたレジスタ等のバッフ
ァ−記憶部13を介してメモリ11の指定番地に書き込
む。上述のように不揮発性メモリに書き込まれたデ−タ
類はこのコンピュ−タを使用したシステムの稼働用デ−
タ等に使用される。
2. Description of the Related Art A control constant for a machine or a data processor utilizing various computers inputs a control constant for operating the machine from a data setting device such as a numeric keypad. It may be written in the non-volatile memory attached to the computer. In addition, such a system may be provided with a means for automatically writing the operating data to a non-volatile memory at a necessary time such as for saving during a power failure. In order to write and modify predetermined data in such a non-volatile memory, for example, the configuration shown in FIG. 3 is used. In FIG. 3, 11 is, for example, EEP
ROM (electrical erasable pr
grammable read only memory
y) is a non-volatile memory configured by a non-volatile storage element such as y). Data processing function of computer body 1
Created in 2 or setter or sensor such as numeric keypad
Data input for writing from the input device 12a such as a computer is written in a specified address of the memory 11 via a buffer storage unit 13 such as a register provided in the computer main body. The data written in the non-volatile memory as described above is the data for operating the system using this computer.
Used for data etc.

【0003】[0003]

【発明が解決しようとする課題】ところで,上述したよ
うな不揮発性メモリの書き込み方法によると,デ−タの
書き込み動作中に停電等によって電源機能がダウンする
と,書き込み中のデ−タが破壊され,正しいデ−タがこ
のシステムから失われる恐れがある。即ち,例えば,設
定器によって新しいデ−タを設定するような場合は,設
定に時間がかかるために,このシステムに停電保護機能
を設けていても時間的に処理不能のために不揮発性メモ
リ11に誤ったデ−タが記憶される等の問題があって,
誤ったデ−タが記録されると,停電復帰後のシステム稼
働に混乱を来すことになる。本発明は上記従来の問題点
を除いて,不揮発性メモリに書き込み中に電源機能がダ
ウンするようなことがあっても,デ−タ類の書き込み不
良を起こす恐れの少ない不揮発性メモリの書き込み方法
を提供することを目的(課題)としている。
By the way, according to the above-described method for writing the non-volatile memory, when the power supply function is down due to a power failure or the like during the data writing operation, the data being written is destroyed. , The correct data may be lost from this system. That is, for example, when new data is set by the setter, since it takes time to set, even if the power failure protection function is provided in this system, the non-volatile memory 11 cannot be processed in time. There is a problem such as erroneous data being stored in
If incorrect data is recorded, it will cause confusion in system operation after a power failure is restored. The present invention is a method of writing to a non-volatile memory, which is less likely to cause a write failure of data even if the power supply function is down during writing to the non-volatile memory, except for the above-mentioned conventional problems. The purpose (issue) is to provide.

【0004】[0004]

【課題を解決するための手段】上記課題を解決するため
に,本発明に基づく不揮発性メモリの書き込み方法にお
いては,不揮発性メモリに運用メモリ領域とバックアッ
プ用メモリ領域とを設け,運用メモリ領域とバックアッ
プ用メモリ領域とを時間的に連続して書き込むようにし
た。上述した運用メモリ領域とバックアップ用メモリ領
域に対するデ−タ書き込み時には,先行して書き込むメ
モリ領域には,所定のデ−タ書き込み後にフラグをセッ
トし,後続して書き込むメモリ領域に所定のデ−タ書き
込み完了後に前記フラグをリセットするようにするのが
望ましく,また,バックアップ用メモリ領域に,少なく
とも,書き込みデ−タと,書き込みデ−タの標識と,チ
ェックデ−タとを書き込むようにするのが望ましい。さ
らに,バックアップ用メモリ領域に運用メモリ領域より
も先行してデ−タを書き込むようにするのが望ましい。
In order to solve the above-mentioned problems, in a method for writing a nonvolatile memory according to the present invention, an operating memory area and a backup memory area are provided in the nonvolatile memory, and The backup memory area and the backup memory area are written continuously in time. When writing data to the above-mentioned operational memory area and backup memory area, a flag is set in the memory area to be written in advance after the predetermined data is written, and a predetermined data is written in the memory area to be subsequently written. It is desirable to reset the flag after the writing is completed, and at least the write data, the write data indicator, and the check data are written in the backup memory area. Is desirable. Furthermore, it is desirable to write data in the backup memory area before the operational memory area.

【0005】[0005]

【作用】本発明は,上述のように,バックアップ用メモ
リ領域を設けたので,運用メモリ領域への書き込みに失
敗してもバックアップ用メモリ領域に記録したデ−タを
読出して正規の番地に書き込むことができる。先行して
書き込むメモリ領域に,少なくとも,書き込みデ−タ
と,フラグとを書き込み,後続して書き込むメモリ領域
に対する書き込みが完了した後フラグをリセットする
と,フラグを見てデ−タの書き込み完了状況が容易に判
定できる。さらに,バックアップ用メモリ領域に,書き
込みデ−タの他に,書き込みデ−タの標識を書き込むよ
うにすると,書き込みデ−タの種類数が多い場合にも,
書き込まれた標識の内容によって,このバックアップ用
メモリに記録されているデ−タがどの種類のものか,ま
たは,どの番地に書き込むべきデ−タなのかが容易に判
定できる。また,チェックデ−タを書き込み記録する
と,バックアップ用メモリに記録されたデ−タに誤りが
ないことが容易に判定できる。さらに,バックアップ用
メモリ領域に運用メモリ領域よりも先行してデ−タを書
き込むようにすると,バックアップ用メモリ領域の書き
込みに失敗しても,運用メモリの内容を保全できる確率
は高い。
According to the present invention, since the backup memory area is provided as described above, the data recorded in the backup memory area is read and written in the regular address even if the writing in the operation memory area fails. be able to. If at least the write data and the flag are written in the memory area to be written in advance and the flag is reset after the writing to the memory area to be subsequently written is completed, the write completion status of the data can be seen by looking at the flag. It can be easily determined. Furthermore, if a write data indicator is written in the backup memory area in addition to the write data, even if the number of types of write data is large,
It is possible to easily determine which kind of data is recorded in this backup memory or at which address the data should be written, based on the contents of the written marker. Further, by writing and recording the check data, it can be easily determined that the data recorded in the backup memory has no error. Furthermore, if the data is written in the backup memory area prior to the operation memory area, there is a high probability that the contents of the operation memory can be preserved even if the writing in the backup memory area fails.

【0006】[0006]

【実施例】本発明に基づく,コンピュ−タ等のデ−タ処
理装置や制御装置に適用する不揮発性メモリの書き込み
方法を図1,図2を参照して詳細に説明する。図1
(A)には,本発明を実現する主要機能要素の概要構成
例を示していて,コンピュ−タとしての構成やメモリの
制御線等の図示は省略している。図1(B)には,本発
明を適用するバックアップ用不揮発性メモリに記録する
デ−タ類の種類例を記している。図1(A)において,
1は,例えば,EEPROM(electricale
rasable programable read
onlymemory)等の不揮発性の記憶素子によっ
て構成した不揮発性メモリ(以下メモリと記す)であ
る。コンピュ−タ本体のデ−タ処理機能2で作成され,
または,テンキ−等の設定器やセンサ−類等の入力機器
2aから入力され,書き込むためのデ−タ類(以下デ−
タと記す)をコンピュ−タ本体に設けたレジスタ等のバ
ッファ−記憶部3を介してメモリ1の指定番地に書き込
む。即ち,メモリ1は,本発明を適用するバックアップ
用メモリ領域4と,このシステムの稼働に使用される従
来の装置に設けられていた,この不揮発性メモリを装備
する上位システムの稼働時に直接運用される運用メモリ
領域(以下メモリ領域と略称する)5によって構成され
ている。デ−タ処理機能2はまた,後述するこの発明を
実現するためのデ−タ書き込み作業の指令機能も有して
いる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A writing method of a nonvolatile memory applied to a data processing device such as a computer or a control device according to the present invention will be described in detail with reference to FIGS. Figure 1
FIG. 1A shows a schematic configuration example of the main functional elements for realizing the present invention, and the configuration as a computer, the control line of the memory, etc. are omitted. FIG. 1B shows an example of types of data recorded in the backup non-volatile memory to which the present invention is applied. In FIG. 1 (A),
1 is, for example, an EEPROM (electrical scale)
rasable programmable read
A non-volatile memory (hereinafter referred to as a memory) configured by a non-volatile storage element such as an online memory). Created by the data processing function 2 of the computer body,
Alternatively, data (hereinafter referred to as data) to be input and written from a setting device such as a numeric keypad or an input device 2a such as a sensor.
Data) is written to a specified address of the memory 1 via a buffer storage unit 3 such as a register provided in the computer main body. That is, the memory 1 is directly operated during the operation of the backup memory area 4 to which the present invention is applied and the host system equipped with this nonvolatile memory, which is provided in the conventional device used for the operation of this system. It is composed of an operational memory area (hereinafter abbreviated as a memory area) 5 that operates. The data processing function 2 also has a data writing operation command function for implementing the present invention described later.

【0007】バックアップ用メモリ領域4に記憶するデ
−タの種類例を図1(B)に示す。メモリ領域4には各
デ−タを記憶する夫々のデ−タ記憶領域を備えている。
図1(B)において,4aはメモリ領域5に転送し記憶
すべきデ−タ,4bはデ−タ4aの標識,例えば,メモ
リ領域5に転送する時に必要なこのデ−タ4aを記憶す
べきメモリ領域5内の番地(以下番地として説明す
る),4cはデ−タ4aを構成するバイト数,4dは上
述したデ−タの4aないし4cの内容に誤りがないかど
うかをチェックするパリティ−チェック等用に作成し記
憶するチェックデ−タである。4eは上述したデ−タ4
aないし4dを記憶した後で立てるフラグである。
An example of the kind of data stored in the backup memory area 4 is shown in FIG. The memory area 4 is provided with respective data storage areas for storing each data.
In FIG. 1B, 4a is data to be transferred to and stored in the memory area 5, 4b is an indicator of the data 4a, for example, this data 4a required when transferring to the memory area 5 is stored. The address in the memory area 5 (which will be described as an address below), 4c is the number of bytes forming the data 4a, and 4d is a parity for checking whether the contents of the above-mentioned data 4a to 4c have an error. -Check data created and stored for checking, etc. 4e is the above-mentioned data 4
This is a flag that is set after storing a to 4d.

【0008】次に,上述した構成の使用方法を図2に示
す概要フロ−を参照して詳細に説明する。図2に示す概
要フロ−には,バックアップ用メモリ領域に,メモリ領
域よりも先行して書き込む例について記している。この
不揮発性メモリを装備したシステムが作動中にデ−タ書
き込み動作が発生すると,デ−タ処理機能2に予め設定
された指令に従って,書き込むべきデ−タ4a,このデ
−タ4aの標識になるデ−タ4aのメモリ領域5に書き
込むべき番地4b,デ−タ4aのバイト数4cを夫々バ
ックアップ用メモリ領域4の所定番地に書き込む(ステ
ップA1)。次に,ステップA1で書き込み記憶したデ
−タに対し,予め設定されている条件に従って作成した
チェックデ−タ4dをバックアップ用メモリ領域4の所
定番地に書き込む(ステップA2)。上述の書き込みが
完了するとフラグ4eを立てる(ステップA3)。次
に,このシステムを稼働するときに使用するメモリ領域
5の所定番地にデ−タ4aと同一のデ−タを書き込み
(ステップA4),正常に記憶されたかどうかを予め設
定されている条件に従ってチェックし,正常ならばステ
ップA3で立てたフラグ4eをリセットする(ステップ
A5)。上述の書き込み動作が完了すると,次のデ−タ
書き込み要求が発生するまで,このシステムは通常運転
の動作を実行する。即ち,この不揮発性メモリに記録さ
れたデ−タが必要になった場合は,デ−タ処理機能2に
よってメモリ領域5から所定のデ−タがワ−クメモリ
(図示せず)に読み出されて使用される。上述したデ−
タ書き込み動作は,実行に時間が必要で,他に実行事項
がある場合等には,その実行の空時間に分割して実行す
る。
Next, a method of using the above-described structure will be described in detail with reference to the outline flow chart shown in FIG. The outline flow shown in FIG. 2 describes an example of writing in the backup memory area prior to the memory area. When a data writing operation occurs while the system equipped with this non-volatile memory is operating, the data 4a to be written and the marker of this data 4a are written according to a command preset in the data processing function 2. An address 4b to be written to the memory area 5 of the data 4a and a byte number 4c of the data 4a are written to predetermined addresses of the backup memory area 4 (step A1). Next, with respect to the data written and stored in step A1, the check data 4d created according to the preset condition is written in a predetermined address of the backup memory area 4 (step A2). When the above writing is completed, the flag 4e is set (step A3). Next, the same data as the data 4a is written in a predetermined address of the memory area 5 used when operating this system (step A4), and whether or not it is normally stored is determined according to a preset condition. If it is checked, the flag 4e set in step A3 is reset if normal (step A5). When the above write operation is completed, the system executes the operation of normal operation until the next data write request is generated. That is, when the data recorded in the non-volatile memory becomes necessary, the data processing function 2 reads out predetermined data from the memory area 5 to a work memory (not shown). Used. The data mentioned above
The data write operation requires time to execute, and if there are other items to be executed, the data write operation is executed by dividing it into idle time.

【0009】上述した書き込み動作中等,システムが運
転中に電源がダウンした後再復帰すると(ステップB
1)デ−タ処理機能2の指令に従って,まず,バックア
ップ用メモリ領域4に記憶されたチェックデ−タ4dに
よって記憶デ−タ4aないし4cに対するチェックをす
る(ステップB2)。チェック結果が異常であれば,予
めこのシステムに設定された処理機能に従った処理を実
行する。例えば,このデ−タ4aが書き込まれるべきメ
モリ領域5のデ−タをそのまま使用する。または,警報
を出してオペレ−タによる正しいデ−タの書き込みを要
求する。チェックデ−タ4dをチェックした結果が正常
ならば,フラグ4eをチェックする(ステップB3)。
フラグ4eが立っていなければ,このデ−タ4aは正常
にメモリ領域5に記憶されていることを示しているの
で,そのままこのシステムの運転を再開する(ステップ
B5)。フラグ4eが立っていれば,このデ−タ4aは
正常にメモリ領域5に記憶されず,バックアップ用メモ
リ領域4には正しいデ−タが記憶されていることを示し
ているので,バイト数4cを参照しバックアップ用メモ
リのデ−タ4aを4bに記載されたメモリ領域5の番地
に転送し書き込む(ステップB4)。上述した書き込み
が完了するとこのシステムの運転を再開する(ステップ
B5)。
When the system is in operation, such as during the above-mentioned writing operation, and the power is turned off and then restored again (step B).
1) In accordance with the command from the data processing function 2, first, the check data 4d stored in the backup memory area 4 checks the stored data 4a to 4c (step B2). If the check result is abnormal, the processing according to the processing function set in advance in this system is executed. For example, the data in the memory area 5 to which this data 4a is to be written is used as it is. Or, an alarm is issued and the operator is requested to write correct data. If the check result of the check data 4d is normal, the flag 4e is checked (step B3).
If the flag 4e is not set, it means that the data 4a is normally stored in the memory area 5, and the operation of this system is restarted as it is (step B5). If the flag 4e is set, this data 4a is not normally stored in the memory area 5 and the backup memory area 4 stores correct data. The data 4a of the backup memory is transferred to and written in the address of the memory area 5 described in 4b (step B4). When the above-mentioned writing is completed, the operation of this system is restarted (step B5).

【0010】上述の説明は本発明の技術思想を実現する
ための基本方法とその実施のための構成例を示したもの
であって,種々応用改変することができる。例えば,上
述の実施例では,バックアップ用メモリ領域4に記憶す
るデ−タは,メモリ領域に転送し記憶すべきデ−タ4
a,デ−タ4aをメモリ領域5に転送する時にこのデ−
タ4aを記憶すべきメモリ領域5内の番地4b,デ−タ
4aを構成するバイト数4c,デ−タの4aないし4c
に誤りがないかどうかをチェックするパリティ−チェッ
ク等用に作成し記憶するチェックデ−タ4d,および,
フラグ4eのように説明したが,このシステムのデ−タ
処理条件に対応してデ−タ4aを表示する適切な標識を
番地4bに換えて記憶させれば良い。ただし,デ−タ4
aを記憶すべきメモリ領域5内の番地が予め定まってい
る等,その他の手段でデ−タ4aが明確に判定できる場
合は番地等の標識は記憶する必要はない。また,デ−タ
処理やチェックの等にバイト数の確認その他が必要なけ
れば,バイト数4cを記憶する必要はない。また,チェ
ックデ−タ4dのためのチェック方法は,各種のパリテ
ィ−チェック方法等このシステムが採用しているチェッ
ク方法を使用すれば良い。運用メモリ領域,バックアッ
プ用メモリ領域には,上述した以外に運用上適切な補助
デ−タを記録するようにしても良い。バックアップ用メ
モリ領域に対する記憶動作中に書き込みミスが発生した
場合は,このシステムの条件に対応して予め設定した指
令に従って,再書き込みを行う等適切な処置を行えば良
い。また,チェックデ−タは,バックアップ用メモリ領
域から,メモリ領域5に転送した後,転送書き込みが正
常に行われたかどうかをチェックするためのチェック用
デ−タとして使用するようにしても良い。チェックデ−
タはバックアップ用メモリ領域のみではなく,運用メモ
リ領域に記録し活用しても良いことは当然である。上述
した実施例ではバックアップ用メモリ領域を運用メモリ
領域よりも先行して書き込む例について説明したが,バ
ックアップ用メモリ領域と運用メモリ領域との書き込む
順序を逆にしても,フラグを立てるメモリ領域を変更す
ることによって同様に実行できることは当然である。バ
ックアップ用メモリ領域は,実施例に説明した以外に,
この発明を適用するシステムとその制御機能やデ−タ処
理機能の条件に対応して適切に使用すれば良いことも当
然である。また,バックアップ用メモリ領域と本来の運
用メモリ領域とは同一の記憶素子を共通に使用しても個
別に設けても良いことも当然である。また,本発明は,
本発明を適用するシステムの条件等に対応して適切に選
択設定された種類の不揮発性メモリに対応することがで
きる。
The above description shows a basic method for realizing the technical idea of the present invention and a configuration example for its implementation, and can be variously modified. For example, in the above-mentioned embodiment, the data stored in the backup memory area 4 is transferred to the memory area and stored therein.
a, when the data 4a is transferred to the memory area 5, this data
Address 4b in memory area 5 for storing data 4a, number of bytes 4c constituting data 4a, data 4a to 4c
Check data 4d created and stored for parity check, etc. for checking whether or not there is an error, and
Although the flag 4e has been described, an appropriate indicator for displaying the data 4a corresponding to the data processing condition of this system may be stored instead of the address 4b. However, data 4
If the data 4a can be clearly determined by other means, such as when the address in the memory area 5 in which a is to be stored is predetermined, it is not necessary to store the indicator such as the address. Further, if it is not necessary to confirm the number of bytes for data processing or checking, it is not necessary to store the number of bytes 4c. As the check method for the check data 4d, the check method adopted by this system such as various parity check methods may be used. In addition to the above, auxiliary data suitable for operation may be recorded in the operation memory area and the backup memory area. If a write error occurs during the storage operation for the backup memory area, appropriate measures such as rewriting may be taken according to a command preset corresponding to the system condition. Further, the check data may be used as check data for checking whether or not transfer writing is normally performed after the transfer from the backup memory area to the memory area 5. Checked
It is natural that the data may be recorded and used not only in the backup memory area but also in the operation memory area. In the above-described embodiment, an example in which the backup memory area is written prior to the operation memory area has been described. However, even if the writing order of the backup memory area and the operation memory area is reversed, the memory area to be flagged is changed. Of course, the same can be done by The backup memory area is
It goes without saying that the system to which the present invention is applied may be appropriately used in accordance with the conditions of its control function and data processing function. In addition, it goes without saying that the same memory element may be used in common for the backup memory area and the original operation memory area or may be provided separately. Further, the present invention is
It is possible to deal with the type of non-volatile memory that is appropriately selected and set according to the conditions of the system to which the present invention is applied.

【0011】[0011]

【発明の効果】本発明は上述したように構成したので,
以下に記すような優れた効果を有する。 デ−タの書き込み中等に電源がダウンしても,電源復
活後に誤ったデ−タが使用される恐れがない。 先行して書き込むメモリ領域に,少なくとも,書き込
みデ−タと,フラグとを書き込み,後続して書き込むメ
モリ領域に対する書き込みが完了した後フラグをリセッ
トすると,フラグを見て,デ−タの書き込み完了状況が
容易に判定できる。 バックアップ用メモリ領域に,書き込みデ−タの他
に,書き込みデ−タの標識を書き込むようにすると,書
き込みデ−タの種類数が多い場合にも,書き込まれた標
識の内容によって,このバックアップ用メモリに記録さ
れているデ−タがどの種類のものか,または,どの番地
に書き込むべきデ−タなのかが容易に判定できる。 チェックデ−タを書き込み記録すると,バックアップ
用メモリに記録されたデ−タに誤りがないことが容易に
判定できる。 バックアップ用メモリ領域に運用メモリ領域よりも先
行してデ−タを書き込むようにすると,停電の影響が早
期に発生する等のためにバックアップ用メモリ領域の書
き込みに失敗しても,運用メモリの内容を保全できる確
率は高い。
Since the present invention is configured as described above,
It has excellent effects as described below. Even if the power is turned off while writing data, there is no risk that wrong data will be used after the power is restored. If at least the write data and the flag are written in the memory area to be written in advance and the flag is reset after the writing to the memory area to be subsequently written is completed, the flag is checked to see the write completion status of the data. Can be easily determined. By writing the write data indicator in the backup memory area in addition to the write data, even if the number of types of write data is large, the backup indicator will be written according to the contents of the written indicator. It is possible to easily determine what kind of data is recorded in the memory or at which address the data should be written. When the check data is written and recorded, it can be easily determined that the data recorded in the backup memory has no error. If data is written to the backup memory area before the operation memory area, the contents of the operation memory will be written even if writing to the backup memory area fails due to the effect of power failure occurring early. There is a high probability that the

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

【図1】図1は本発明を説明する説明図であって,図1
(A)は,本発明に基づく不揮発性メモリの書き込み方
法を実現する機能要素の概要構成例を示すブロック図で
あり,図1(B)は,本発明を適用するバックアップ用
不揮発性メモリに記録するデ−タの種類名を記している
概要マップ図である。
FIG. 1 is an explanatory diagram for explaining the present invention.
FIG. 1A is a block diagram showing a schematic configuration example of functional elements for realizing a writing method of a nonvolatile memory according to the present invention, and FIG. 1B is a block diagram showing recording in a backup nonvolatile memory to which the present invention is applied. It is an outline map figure in which the type name of data to be written is described.

【図2】本発明を説明する概要フロ−図である。FIG. 2 is a schematic flow chart illustrating the present invention.

【図3】従来の不揮発性メモリの書き込み方法を説明す
る機能要素の概要構成例を示すブロック図である。
FIG. 3 is a block diagram showing a schematic configuration example of functional elements for describing a conventional nonvolatile memory writing method.

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

1:不揮発性メモリ 2:デ−タ処理機能 4:バックアップ用メモリ領域 4a:(メモリ)デ−タ 4b:(メモリ)番地 4c:(メモリ)バイト数 4d:(メモリ)チェックデ−タ 4e:フラグ 5:運用メモリ領域 1: Non-volatile memory 2: Data processing function 4: Backup memory area 4a: (Memory) data 4b: (Memory) address 4c: (Memory) number of bytes 4d: (Memory) check data 4e: Flag 5: Operation memory area

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 不揮発性メモリの書き込み方法におい
て,不揮発性メモリに運用メモリ領域とバックアップ用
メモリ領域とを設け,デ−タ書き込み時には,運用メモ
リ領域とバックアップ用メモリ領域とを時間的に連続し
て書き込むようにしたことを特徴とする不揮発性メモリ
の書き込み方法。
1. A non-volatile memory writing method, wherein a non-volatile memory is provided with an operation memory area and a backup memory area, and when data is written, the operation memory area and the backup memory area are continuous in time. A method for writing to a non-volatile memory, which is characterized in that the writing is performed by writing.
【請求項2】 請求項1記載の運用メモリ領域とバック
アップ用メモリ領域に対するデ−タ書き込み時におい
て,先行して書き込むメモリ領域には,所定のデ−タ書
き込み後にフラグを立てて記録し,後続して書き込むメ
モリ領域に所定のデ−タ書き込み完了後に前記フラグを
リセットするようにした不揮発性メモリの書き込み方
法。
2. When data is written to the operation memory area and the backup memory area according to claim 1, a flag is set and recorded in the memory area to be written in advance after the predetermined data is written, The writing method of the non-volatile memory, wherein the flag is reset after the completion of writing of predetermined data in the memory area to be written.
【請求項3】 請求項1または請求項2記載のバックア
ップ用メモリ領域に,少なくとも,当該書き込みデ−タ
と,該書き込みデ−タの標識と,チェックデ−タとを書
き込むようにした不揮発性メモリの書き込み方法。
3. A non-volatile memory for writing at least the write data, an indicator of the write data, and check data in the backup memory area according to claim 1 or 2. How to write memory.
【請求項4】 請求項1ないし請求項3記載の不揮発性
メモリの書き込み方法において,バックアップ用メモリ
領域に運用メモリ領域よりも先行してデ−タを書き込む
ようにした不揮発性メモリの書き込み方法。
4. The non-volatile memory writing method according to claim 1, wherein data is written in the backup memory area prior to the operation memory area.
JP5177701A 1993-06-25 1993-06-25 Method for writing nonvolatile memory Pending JPH0784894A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5177701A JPH0784894A (en) 1993-06-25 1993-06-25 Method for writing nonvolatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5177701A JPH0784894A (en) 1993-06-25 1993-06-25 Method for writing nonvolatile memory

Publications (1)

Publication Number Publication Date
JPH0784894A true JPH0784894A (en) 1995-03-31

Family

ID=16035598

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5177701A Pending JPH0784894A (en) 1993-06-25 1993-06-25 Method for writing nonvolatile memory

Country Status (1)

Country Link
JP (1) JPH0784894A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200418A (en) * 1993-12-28 1995-08-04 Hitachi Maxell Ltd Data storage device and its control method
JPH1044567A (en) * 1996-08-05 1998-02-17 Seiko Epson Corp Printer equipment
JP2001265344A (en) * 2000-03-22 2001-09-28 Yamaha Corp Musical sound generator control method, timbre data transfer method, timbre data control device, and storage medium
US7181645B2 (en) 2001-12-27 2007-02-20 Denso Corporation Method and apparatus for storing main data with two checkup data
JP2009009602A (en) * 2008-08-25 2009-01-15 Dainippon Printing Co Ltd Ic card and ic card program
JP2016224937A (en) * 2015-05-26 2016-12-28 華邦電子股▲ふん▼有限公司 Methods and systems for nonvolatile memory data management

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200418A (en) * 1993-12-28 1995-08-04 Hitachi Maxell Ltd Data storage device and its control method
JPH1044567A (en) * 1996-08-05 1998-02-17 Seiko Epson Corp Printer equipment
JP2001265344A (en) * 2000-03-22 2001-09-28 Yamaha Corp Musical sound generator control method, timbre data transfer method, timbre data control device, and storage medium
US7181645B2 (en) 2001-12-27 2007-02-20 Denso Corporation Method and apparatus for storing main data with two checkup data
JP2009009602A (en) * 2008-08-25 2009-01-15 Dainippon Printing Co Ltd Ic card and ic card program
JP2016224937A (en) * 2015-05-26 2016-12-28 華邦電子股▲ふん▼有限公司 Methods and systems for nonvolatile memory data management

Similar Documents

Publication Publication Date Title
RU2146399C1 (en) Method for data storage in non-volatile memory unit, method for using integral circuit device, and integral circuit device
JP2990181B1 (en) Flash memory, microcomputer having flash memory, and method of storing program in flash memory
WO2005111812A1 (en) Memory control circuit, nonvolatile storage apparatus, and memory control method
JP4480815B2 (en) Memory rewriting method and computer system
US4447887A (en) Method of rewriting data in non-volatile memory, and system therefor
JP2004220068A (en) Memory card and method for writing data in memory
JPH0784894A (en) Method for writing nonvolatile memory
JPH086865A (en) Data processor
JPH0728707A (en) Data protecting method for nonvolatile memory
JP2000235483A (en) Information processor
JPH07122087A (en) Eeprom error check system
JP3314719B2 (en) Flash EEPROM and its test method
JP3019346B2 (en) Data processing device
JP2853593B2 (en) Download device
JPH0217550A (en) Trouble processing system for multiprocessor system
JP2904117B2 (en) Device storage unit redundancy method and device
JPH07168769A (en) Data updating method for nonvolatile memory
JP2713583B2 (en) Electronics
JP3178913B2 (en) Semiconductor file device
JP2003196114A (en) Management and confirmation method for internal data
JPH033051A (en) Information processor
JP3041007B2 (en) Non-volatile memory management method
JPS63278162A (en) Error correction device in information processor
JP2004348546A (en) Device and method for switching control program
JP3269150B2 (en) Sales data processing device