JPH0749815A - Data storage device - Google Patents

Data storage device

Info

Publication number
JPH0749815A
JPH0749815A JP19565693A JP19565693A JPH0749815A JP H0749815 A JPH0749815 A JP H0749815A JP 19565693 A JP19565693 A JP 19565693A JP 19565693 A JP19565693 A JP 19565693A JP H0749815 A JPH0749815 A JP H0749815A
Authority
JP
Japan
Prior art keywords
data
area
address
stored
written
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.)
Withdrawn
Application number
JP19565693A
Other languages
Japanese (ja)
Inventor
Hiroshi Kamata
博史 鎌田
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP19565693A priority Critical patent/JPH0749815A/en
Priority to US08/283,998 priority patent/US5523915A/en
Publication of JPH0749815A publication Critical patent/JPH0749815A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Read Only Memory (AREA)

Abstract

PURPOSE:To provide a data storage device which can store data even when a data storage area becomes defective in writing. CONSTITUTION:A preliminary data area 12 is provided in addition to a data area 11 and when a specific data storage area 11Ai of the data area 11 becomes defective in writing, its data are written in a free area of the preliminary data area 12 indicated by the free painter 10e for the preliminary area. For example, when the data can not be written in an address '3' of the data area 11, the data are written in an address '401' that the free painter 10e for the preliminary area indicates.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データの書き込み回数
に制限がある不揮発性メモリを用いたデータ記憶装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data storage device using a non-volatile memory having a limited number of times of writing data.

【0002】[0002]

【従来の技術及び発明が解決しようとする課題】RAM
等の揮発性メモリにデータを記憶させる装置では、装置
の電源をオフされたときにもRAMのデータを保持して
おくために電池等より常にRAMをバックアップするよ
うにしている。他方、不揮発性のメモリ、例えば電気的
書き込み・消去可能なEEPROMにデータを記憶さ
せ、電池等によるメモリのバックアップを不要としたデ
ータ記憶装置もある。
2. Description of the Related Art RAM
In such a device that stores data in a volatile memory, the RAM is always backed up by a battery or the like in order to retain the RAM data even when the power of the device is turned off. On the other hand, there is also a data storage device in which data is stored in a non-volatile memory, for example, an electrically writable / erasable EEPROM, and backup of the memory by a battery or the like is unnecessary.

【0003】EEPROMは、現状ではデータの書き込
み回数に制限があり、一定回数以上書き込みを行うとデ
ータが正しく書き込めなくなる場合がある。そのため、
何回もデータの書き込みを繰り返し特定のデータ記憶領
域が書き込み不良となると、記憶できるデータ数が少な
くなり入力したデータを記憶させることができなくなる
という問題が生じる。
At present, the EEPROM has a limited number of times of writing data, and if writing is performed a certain number of times or more, the data may not be written correctly. for that reason,
When writing of data is repeated many times and writing failure occurs in a specific data storage area, the number of pieces of data that can be stored becomes small, which causes a problem that input data cannot be stored.

【0004】本発明の目的は、不揮発性メモリのデータ
記憶領域が書き込み不良となったときにもデータを確実
に保存できるデータ記憶装置を提供することである。
An object of the present invention is to provide a data storage device capable of reliably storing data even when a data storage area of a non-volatile memory becomes defective in writing.

【0005】[0005]

【課題を解決するための手段】本発明のデータ記憶装置
は、データを記憶する複数のデータ記憶領域と、複数の
予備のデータ記憶領域と、データ記憶領域に正常にデー
タが書き込めたか否かを判別する判別手段と、この判別
手段によりデータを正常に書き込めなかったと判別され
たとき、そのデータを予備のデータ記憶領域に書き込む
書き込み手段とを備える。
A data storage device of the present invention determines a plurality of data storage areas for storing data, a plurality of spare data storage areas, and whether or not data can be normally written in the data storage area. And a writing unit that writes the data to the spare data storage area when the data is not normally written by the determination unit.

【0006】[0006]

【作用】本発明では、データ記憶領域と別に予備のデー
タ記憶領域を設け、データ記憶領域にデータを書き込め
なかったときには、予備のデータ領域にそのデータを保
存するようにした。従って、データ記憶領域が書き込み
不良となってもデータを確実に保存することができる。
In the present invention, a spare data storage area is provided separately from the data storage area, and when data cannot be written in the data storage area, the data is saved in the spare data area. Therefore, the data can be surely saved even if the data storage area has a write error.

【0007】[0007]

【実施例】以下、本発明の実施例を図面を参照しながら
説明する。図1は、本発明の一実施例のデータ記憶装置
の回路ブロック図であり、このデータ記憶装置は、入力
された氏名及び住所データを順に記憶するようになって
いる。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a circuit block diagram of a data storage device according to an embodiment of the present invention. The data storage device is designed to sequentially store inputted name and address data.

【0008】同図において、制御部1は、ROM2に格
納されている制御プログラムに従って、キー入力部3か
ら入力される名前、住所からなるデータをRAM4へ一
時格納すると共に、データの書き込みが指示されたと
き、RAM4に記憶してあるデータを不揮発性メモリで
あるEEPROM5へ保存する。このEEPROM5に
格納されたデータは、データ読み出し時にキー入力部3
の図示しないカーソルキーの操作に応じて、例えばアル
ファベットの正順またはその逆の順序で読み出され液晶
表示部6に表示される。
In FIG. 1, the control unit 1 temporarily stores in the RAM 4 the data consisting of the name and address input from the key input unit 3 in accordance with the control program stored in the ROM 2, and is instructed to write the data. At this time, the data stored in the RAM 4 is stored in the EEPROM 5, which is a non-volatile memory. The data stored in the EEPROM 5 is stored in the key input unit 3 when reading the data.
In accordance with the operation of the cursor key (not shown), the data is read out in the normal order of the alphabet or in the reverse order and displayed on the liquid crystal display unit 6.

【0009】電源回路部7は、例えば太陽電池8の出力
電圧を安定化して回路各部に供給する回路である。ま
た、電源回路部7は、EEPROM5へデータの書き込
みを行うときに、外部入力端子9から供給される太陽電
池8より高い外部電圧を安定化してEEPROM5に出
力する。
The power supply circuit section 7 is, for example, a circuit which stabilizes the output voltage of the solar cell 8 and supplies it to each section of the circuit. In addition, the power supply circuit unit 7 stabilizes an external voltage higher than that of the solar cell 8 supplied from the external input terminal 9 and outputs it to the EEPROM 5 when writing data to the EEPROM 5.

【0010】ここで、EEPROM5の記憶領域の構成
を図2を参照して説明する。この実施例では、EEPR
OM5のアドレス1〜100を後述するシステム領域1
0に、アドレス101〜400をデータ領域11に、ア
ドレス401〜512を予備のデータ領域12にそれぞ
れ割り当てている。
The structure of the storage area of the EEPROM 5 will be described with reference to FIG. In this example, the EEPR
System area 1 which will be described later with addresses 1 to 100 of OM5
0, addresses 101 to 400 are allocated to the data area 11, and addresses 401 to 512 are allocated to the spare data area 12.

【0011】データ領域11は複数(計300)のデー
タ記憶領域11A1 、11A2 ・・11Ai からなる。
この実施例では、1組の氏名及び住所データのデータ量
が多く、1つのデータ記憶領域11Ai に入りきれない
ときには、そのデータを複数のデータ記憶領域11Ai
に分割して記憶するようにしている。
The data area 11 is composed of a plurality (total 300) of data storage areas 11A 1 , 11A 2 ... 11A i .
In this embodiment, when the data amount of one set of name and address data is too large to fit in one data storage area 11A i , the data is stored in a plurality of data storage areas 11A i.
It is divided into and stored.

【0012】各データ記憶領域11Ai は、同一のデー
タを複数の領域に分割して記憶したときに、同じデータ
が記憶されている次のアドレスを指す残りポインタを記
憶する領域11aと、アルファベット順で1つ前のデー
タの格納アドレスを指す前ポインタを記憶する領域11
bと、氏名及び住所データを記憶する領域11cと、ア
ルファベット順で1つ後のデータの格納アドレスを指す
後ポインタを記憶する領域11dとで構成されている。
なお、予備のデータ領域12も複数(計112)のデー
タ記憶領域12A1 、12A2 ・・12Ai からなり、
データ領域11と同じ構成となっている。
Each data storage area 11A i is arranged in alphabetical order with an area 11a for storing a remaining pointer that points to the next address where the same data is stored when the same data is divided into a plurality of areas and stored. 11 for storing the previous pointer that points to the storage address of the immediately preceding data
b, an area 11c for storing name and address data, and an area 11d for storing a rear pointer that points to a storage address of the next data in alphabetical order.
The spare data area 12 also includes a plurality (total 112) of data storage areas 12A 1 , 12A 2 ... 12A i ,
It has the same structure as the data area 11.

【0013】また、システム領域10は、データ領域1
1のアドレス情報を記憶する複数(計100)のシステ
ムデータ記憶領域10A1 、10A2 ・・・10Ai
らなる。各システムデータ記憶領域10Ai は、データ
領域11に所定の順序で記憶されているデータの中の先
頭のデータ即ち、アルファベット順の最初の名前のデー
タの格納アドレスを指すトップポインタを記憶する領域
10aと、所定の順序で記憶されているデータの中のア
ルファベット順で最後のデータの格納アドレスを指すボ
トムポインタを記憶する領域10bと、現在表示してい
るアドレスを指す現在ポインタを記憶する領域10c
と、データ領域11の空き領域の先頭アドレスを指すデ
ータ空きポインタを記憶する領域10dと、予備のデー
タ領域の空き領域の先頭アドレスを指す予備領域の空き
ポインタを記憶する領域10eとで構成されている。
The system area 10 is a data area 1
It is composed of a plurality (100 in total) of system data storage areas 10A 1 , 10A 2 ... 10A i that store one address information. Each system data storage area 10A i is an area 10a for storing a top pointer that points to the storage address of the first data among the data stored in the data area 11 in a predetermined order, that is, the data of the first name in alphabetical order. An area 10b for storing a bottom pointer that points to a storage address of the last data in alphabetical order among the data stored in a predetermined order, and an area 10c for storing a current pointer that points to a currently displayed address.
An area 10d for storing a data free pointer that points to the start address of the free area of the data area 11, and an area 10e that stores a free pointer for the spare area that points to the start address of the free area of the spare data area. There is.

【0014】この実施例では、システム領域10にシス
テムデータを書き込む場合、同じ領域に繰り返しデータ
が書き込まれないように、複数のシステムデータ記憶領
域10Ai からなるシステム領域10に順にデータを書
き込むようにしている。
In this embodiment, when the system data is written in the system area 10, the data is sequentially written in the system area 10 composed of a plurality of system data storage areas 10A i so that the data is not repeatedly written in the same area. ing.

【0015】今、図2に示すようにデータ領域11に
「AIDA・・」、「KAMATA・・」、「YAGI
・・」の3個のデータが記憶されていて、「AIDA・
・」のデータはデータ量が多いのでアドレス「101」
と「102」に分割されて記憶されているものとする。
Now, as shown in FIG. 2, in the data area 11, "AIDA ...", "KAMATA ...", "YAGI."
.. "is stored, and" AIDA.
The amount of data for "..." is large, so address "101"
And “102” are divided and stored.

【0016】アドレス「101」にアルファベット順の
先頭のデータ「AIDA・・」が記憶されており、その
残りポインタ11aには、分割された残りのデータの格
納アドレス「102」が記憶され、前ポインタ11bに
は、アルファベット順の1つ前のデータ、この場合、ア
ルファベット順の最後のデータである「YAGI・・」
の格納アドレス「104」が記憶されている。また、後
ポインタ11dには、アルファベット順の次のデータで
ある「KAMATA・・」の格納アドレス「103」が
記憶されている。
The first data "AIDA ..." In alphabetical order is stored in the address "101", and the storage address "102" of the remaining divided data is stored in the remaining pointer 11a, and the previous pointer is stored. 11b is the previous data in alphabetical order, in this case, the last data in alphabetical order, "YAGI ...".
The storage address “104” is stored. The rear pointer 11d stores the storage address "103" of "KAMATA ...", which is the next data in alphabetical order.

【0017】次のアドレス「102」にアルファベット
順の2番目のデータ「KAMATA・・」が記憶されて
いる。このデータは複数のデータ記憶領域11Ai に分
割されていないので、残りポインタ11aにはアドレス
は記憶されていない。前ポインタ11aには、1つ前の
データである「AIDA・・」の格納アドレス「10
1」が記憶され、後ポインタ11cには、1つ後のデー
タである「YAGI・・」の格納アドレス「104」が
記憶されている。
The second data "KAMATA ..." In alphabetical order is stored at the next address "102". Since this data is not divided into a plurality of data storage areas 11A i , no address is stored in the remaining pointer 11a. The previous pointer 11a contains the storage address "10" of the preceding data "AIDA ...".
1 ”is stored, and the rear pointer 11c stores the storage address“ 104 ”of the next data“ YAGI ... ”.

【0018】一方、システム領域10のトップポインタ
10aには、記憶されているデータの中のアルファベッ
ト順の先頭のデータである「AIDA・・」の格納アド
レス「101」が記憶され、ボトムポインタ10bに
は、アルファベット順に記憶されているデータの中の最
後のデータである「YAGI・・」の格納アドレス「1
04」が記憶されている。また、データ空きポインタ1
0dには、データ領域11の空き領域の先頭アドレス
「105」が記憶されている。予備領域の空きポインタ
10eには、予備のデータ領域12の先頭アドレスの
「401」が記憶されている。
On the other hand, the top pointer 10a of the system area 10 stores the storage address "101" of "AIDA ...", which is the first data in the alphabetical order among the stored data, and the bottom pointer 10b. Indicates the storage address "1" of the last data "YAGI ..." Of the data stored in alphabetical order.
04 ”is stored. In addition, data empty pointer 1
The start address “105” of the free area of the data area 11 is stored in 0d. The free area pointer 10e in the spare area stores "401" which is the start address of the spare data area 12.

【0019】次に、以上のような構成の実施例のデータ
記憶装置のデータ書き込み時の動作を図3のフローチャ
ートを参照して説明する。図3のステップS1におい
て、キー入力部3から入力されたデータをRAM4に格
納する。そして、ステップS2で図示しない書き込みキ
ーが操作されたのを検出したなら、ステップS3で外部
入力端子9に外部電圧が供給されているか否かを判別す
る。外部から書き込み用の電圧が供給されているときに
は、ステップS4に進みデータ空きポインタ10cの指
すアドレスが「401」以上か否かを判別する。データ
空きポインタ10cの指すアドレスが「401」以上の
ときは、データ領域11の使用可能な全ての領域に既に
データが書き込まれている場合であるので、ステップS
5に進みEEPROM5に新たなデータを記憶する領域
が無いことを液晶表示部6に表示する。また、ステップ
S3の判別でデータの書き込み時に外部電圧が供給され
ていないときには、ステップS6に進みエラー表示を行
う。
Next, the data writing operation of the data storage device of the embodiment having the above configuration will be described with reference to the flowchart of FIG. In step S1 of FIG. 3, the data input from the key input unit 3 is stored in the RAM 4. If it is detected in step S2 that the write key (not shown) is operated, it is determined in step S3 whether or not an external voltage is supplied to the external input terminal 9. When the voltage for writing is supplied from the outside, the process proceeds to step S4 and it is determined whether or not the address pointed to by the data free pointer 10c is "401" or more. If the address pointed to by the data free pointer 10c is "401" or more, it means that the data has already been written in all the usable areas of the data area 11, so step S
5, the liquid crystal display section 6 displays that the EEPROM 5 has no area for storing new data. If it is determined in step S3 that the external voltage is not supplied at the time of writing data, the process proceeds to step S6 to display an error.

【0020】一方、ステップS4の判別でデータ空きポ
インタ10dの指すアドレスが「400」以下のとき
は、データ領域11に空き領域が存在する場合であるの
で、ステップS7に進み、今回書き込もおとしているデ
ータに対してアルファベット順で順番が1つ前のデータ
と1つ後のデータをサーチする。このステップS7の処
理では、例えば書き込むべき氏名データの先頭の文字と
データ領域11に既に記憶されている氏名データの先頭
の文字とを順に比較して、アルファベット順の1つ前の
データと1つ後のデータを検索する。
On the other hand, if it is determined in step S4 that the address pointed to by the data free pointer 10d is equal to or less than "400", it means that there is a free area in the data area 11. Therefore, the process proceeds to step S7 and writing is performed this time. The data in alphabetical order is searched for the data one before and one after. In the processing of this step S7, for example, the first character of the name data to be written and the first character of the name data already stored in the data area 11 are compared in order, and one character before the alphabetical data and one data Search later data.

【0021】そして、次のステップS8でデータ空きポ
インタ10dで指定されるアドレスにデータを書き込
み、さらにそのアドレスの前ポインタ11aに1つ前の
データの格納アドレスを、後ポインタ11cに1つ後の
データの格納アドレスをそれぞれ書き込む。その後、ス
テップS9で書き込み前のデータとEEROM5に実際
に書き込まれたデータとが一致するか否かを判別する。
このとき、データが一致しない場合には、再度データの
書き込み及び読み出しを行い、書き込み前と書き込み後
のデータの比較を行う。
Then, in the next step S8, the data is written to the address designated by the data free pointer 10d, and the front pointer 11a at that address is set to the storage address of the previous data and the rear pointer 11c is set to the next one. Write each data storage address. Then, in step S9, it is determined whether or not the data before writing and the data actually written in the EEPROM 5 match.
At this time, if the data do not match, the data is written and read again, and the data before the writing and the data after the writing are compared.

【0022】ステップS9の判別でデータの書き込みが
正常に行われた場合には、ステップS10に進み次にシ
ステム領域10のデータの書き替えを行う。ここで、ス
テップS10のシステム領域10の書き替え処理を図4
〜図7をを参照して説明する。
If the data is normally written in the determination in step S9, the process proceeds to step S10, and the data in the system area 10 is rewritten. Here, the rewriting process of the system area 10 in step S10 will be described with reference to FIG.
~ It demonstrates with reference to FIG.

【0023】先ず、EEPROM5に図2に示すような
データが記憶されているときに、キー入力によって図4
に示すようにRAM4に記憶されたデータ「NAKAN
O・・」を書き込む場合について説明する。
First, when the data shown in FIG. 2 is stored in the EEPROM 5, the data shown in FIG.
The data “NAKAN” stored in the RAM 4 as shown in
A case of writing "O ..." will be described.

【0024】この場合、データ空きポインタ10dはア
ドレス「105」を指しているので、データ「NAKA
NO・・」はそのアドレス「105」に書き込まれる。
アドレス「105」にデータが書き込まれると、データ
領域11の空き領域の先頭アドレスが「105」から
「106」に変化するのでシステムデータの書き替えが
行われる。システムデータを書き替える場合、前回、図
2に示すようにシステム領域10のアドレス「1」にシ
ステムデータを書き込んでいるので、今回は、次のアド
レス「2」に新たなシステムデータを書き込む。
In this case, since the data free pointer 10d points to the address "105", the data "NAKA"
"NO ..." is written to the address "105".
When the data is written to the address “105”, the start address of the empty area of the data area 11 changes from “105” to “106”, so that the system data is rewritten. When rewriting the system data, since the system data was written in the address "1" of the system area 10 last time as shown in FIG. 2, new system data is written in the next address "2" this time.

【0025】これにより図5に示すようにシステム領域
10のアドレス「2」のデータ空きポインタ10dに空
きアドレスの「106」が書き込まれる。なお、この場
合、現在ポインタ10cの値が図2の状態と異なってい
る他は他のポインタの内容は変化していないので前回の
値がそのまま書き込まれる。
As a result, as shown in FIG. 5, the empty address "106" is written in the data empty pointer 10d of the address "2" in the system area 10. In this case, since the contents of the other pointers have not changed except that the value of the current pointer 10c is different from the state of FIG. 2, the previous value is written as it is.

【0026】次に、EEPROM5に記憶されているデ
ータを書き替える場合のシステム領域10の書き替え動
作について図6及び図7を参照して説明する。図6に示
すようにEEPROM5のデータ領域11には「AID
A・・」、「KAMATA・・」、「YAGI・・」、
「NAKANO・・」の4人の氏名及び住所データが記
憶されているものとする。そして、システム領域10の
トップポインタ10aにアルファベット順の先頭のデー
タの格納アドレス「101」が、ボトムポインタ10b
にアルファベット順の最後のデータの格納アドレス「1
04」が、現在ポインタ10cにアドレス「105」
が、データ空きポインタ10dにデータ領域11の空き
領域の先頭アドレス「106」が、予備領域の空きポイ
ンタ10eに予備のデータ領域12の空き領域の先頭ア
ドレス「401」がそれぞれ記憶されている。
Next, the rewriting operation of the system area 10 when rewriting the data stored in the EEPROM 5 will be described with reference to FIGS. 6 and 7. As shown in FIG. 6, in the data area 11 of the EEPROM 5, "AID
"A ...", "KAMATA ...", "YAGI ...",
It is assumed that the name and address data of four persons "NAKANO ..." are stored. Then, the storage address "101" of the top data in the alphabetical order is stored in the top pointer 10a of the system area 10 as the bottom pointer 10b.
The storage address of the last data in alphabetical order "1
04 "is the address" 105 "at the current pointer 10c.
However, the start address "106" of the free area of the data area 11 is stored in the data free pointer 10d, and the start address "401" of the free area of the spare data area 12 is stored in the free pointer 10e of the spare area.

【0027】今、アドレス「103」に記憶されている
データ「KAMATA・・」を表示させた状態でデータ
「OGAWA・・」が入力され、そのデータの書き込み
が指示されたとする。このとき、データ空きポインタ1
0dにより空き領域のアドレスとして「106」が指定
されているので、そのアドレス「106」にデータ「O
GAWA・・」を書き込む。同時にデータ領域11に記
憶さているデータ(「KAMATA・・」を除く)の中
でアルファベット順で「OGAWA・・」の1つ前のデ
ータと1つ後のデータをサーチして、前後のデータの格
納アドレスをアドレス「106」の前ポインタ11bと
後ポインタ11dに設定する。さらに、1つ前のデータ
の後ポインタ11dと1つ後のデータの前ポインタ11
bに「OGAWA・・」の格納アドレス「106」を設
定する。その後、アドレス「103」のデータ「KAM
ATA・・」を削除する。
Now, it is assumed that the data "OGAWA ..." Is input while the data "KAMATA ..." Stored at the address "103" is displayed, and the writing of the data is instructed. At this time, data empty pointer 1
Since "106" is designated as the address of the empty area by 0d, the data "O" is assigned to the address "106".
Write "GAWA ..." At the same time, the data stored in the data area 11 (excluding “KAMATA ...”) is searched in alphabetical order for the data immediately before and after “OGAWA ... The storage addresses are set in the front pointer 11b and the rear pointer 11d at the address "106". Further, the back pointer 11d of the previous data and the front pointer 11 of the next data
The storage address "106" of "OGAWA ..." Is set in b. After that, the data "KAM" at the address "103"
ATA ... "is deleted.

【0028】データの書き替えによりデータの空き領域
の先頭アドレスが変化したので、システムデータの書き
替えを行う。このシステムデータの書き替えでは、前回
システム領域10のアドレス「2」にシステムデータを
書き込んだので、今回はその次のアドレス「3」にシス
テムデータを書き込む。
Since the start address of the empty area of the data is changed by rewriting the data, the system data is rewritten. In this rewriting of system data, since the system data was written to the address "2" of the system area 10 last time, the system data is written to the next address "3" this time.

【0029】この結果、図7に示すようにシステム領域
10のアドレス「3」にそれぞれのポインタが書き込ま
れる。この場合、アドレス「103」が空きとなったの
でデータ空きポインタ10dに「103」が設定され、
さらに現在ポインタ10cに書き替えたデータ「OGA
WA・・」の格納アドレス「106」が設定される。以
下、同様にシステムデータに変更が生じる毎にシステム
領域10に順にシステムデータを書き込む。
As a result, as shown in FIG. 7, the respective pointers are written in the address "3" of the system area 10. In this case, since the address "103" becomes empty, "103" is set in the data empty pointer 10d,
Furthermore, the data "OGA" rewritten to the current pointer 10c
The storage address "106" of "WA ..." Is set. Similarly, the system data is sequentially written in the system area 10 every time the system data is changed.

【0030】図3に戻り、ステップS9の判別で2回と
も正常にデータを書き込めなかった場合には、そのデー
タ記憶領域11Ai を不良と判断し、ステップS11に
進み予備領域の空きポインタ10eの指すアドレスをデ
ータの書き込みアドレスとして設定する。そして、ステ
ップS8に戻り、入力された氏名及び住所データとサー
チした前後のデータのアドレスを、予備領域の空きポイ
ンタ10eの指すアドレスに書き込む。さらに、1つ前
のデータの後ポインタ11dに今回データを書き込んだ
予備のデータ領域12のアドレスを設定し、同様に1つ
後のデータの前ポインタ11bにデータを書き込んだ予
備のデータ領域12のアドレスを設定する。
Returning to FIG. 3, if it is determined in step S9 that the data could not be written normally twice, it is determined that the data storage area 11A i is defective, and the process proceeds to step S11, where the empty pointer 10e of the spare area is The address pointed to is set as the data write address. Then, returning to step S8, the input name and address data and the addresses of the data before and after the search are written in the address indicated by the empty pointer 10e in the spare area. Further, the address of the spare data area 12 in which the data was written this time is set in the back pointer 11d of the data immediately before, and similarly, the address of the spare data area 12 in which the data is written in the front pointer 11b of the data immediately after is set. Set the address.

【0031】これにより、データ記憶領域11Ai が書
き込み不良となった場合でも、予備のデータ領域12に
そのデータを書き込むことで、データ領域11に記憶可
能な個数分のデータ(実施例では、計300個のデー
タ)を常に記憶させることができる。また、予備のデー
タ領域12は、データ領域11が書き込み不良となった
場合のみ使用されるので、データ領域11に比べて書き
込み不良となる確率が少なく、必要なデータを確実に保
存することができる。
As a result, even if the data storage area 11A i becomes defective in writing, the data can be stored in the data area 11 by writing the data in the spare data area 12 (in the embodiment, the total number of data can be stored). 300 pieces of data) can always be stored. Further, since the spare data area 12 is used only when the data area 11 has a write failure, the probability of a write failure is lower than that of the data area 11, and necessary data can be reliably stored. .

【0032】ここで、データ領域11の特定のデータ記
憶領域11Ai が不良となって予備のデータ領域12に
データを書き込む場合の動作を図8を参照して説明す
る。今、図8に示すようにデータ空きポインタ10dに
よりデータ領域11の空き領域の先頭アドレスとして
「3」が指示され、その領域に対してデータ「TANA
KA・・」の書き込みを2回行って、2回ともデータを
正常に書き込めなかったものとする。この場合、予備領
域の空きポインタ10eで指定される予備のデータ領域
12のアドレス「401」にそのデータ「TANAKA
・・」が書き込まれる。
Here, the operation when the specific data storage area 11A i of the data area 11 becomes defective and data is written in the spare data area 12 will be described with reference to FIG. Now, as shown in FIG. 8, "3" is designated by the data free pointer 10d as the start address of the free area of the data area 11, and the data "TANA" is sent to that area.
It is assumed that the writing of "KA ..." Was performed twice and the data could not be written normally both times. In this case, the data "TANAKA" is stored in the address "401" of the spare data area 12 designated by the empty pointer 10e of the spare area.
.. "is written.

【0033】そして、アルファベット順で「TANAK
A・・」の前後のデータがサーチされ、アドレス「40
1」の前ポインタ11bに「TANAKA・・」の1つ
前のデータである「OGAWA・・」の格納アドレス
「106」が設定され、後ポインタ11dに1つ後のデ
ータである「YAGI・・」の格納アドレス「104」
が設定される。さらに、1つ前のデータ「OGAWA・
・」の後ポインタ11dに「TANAKA・・」の格納
アドレス「401」が設定され、1つ後のデータ「YA
GI・・」の前ポインタ11bに「TANAKA・・」
の格納アドレス「401」が設定される。
Then, in alphabetical order, "TANAK
The data before and after "A ..." is searched and the address "40
The storage address “106” of “OGAWA ...”, which is the data immediately before “TANAKA ... Storage address of "104"
Is set. Furthermore, the previous data "OGAWA
The storage address "401" of "TANAKA ..." Is set to the rear pointer 11d of ".
"TANAKA ..." to the front pointer 11b of "GI ..."
Storage address "401" is set.

【0034】上述した実施例では、データ記憶領域11
i が書き込み不良となった場合には、予備のデー記憶
領域12Ai にデータが書き込まれるので、データ記憶
装置に記憶可能な個数分のデータの記憶領域を常に確保
することができる。
In the above embodiment, the data storage area 11
When the write failure occurs in A i , the data is written in the spare data storage area 12A i , so that it is possible to always secure the storage area for the number of data that can be stored in the data storage device.

【0035】なお、システムデータ及び氏名、住所デー
タを記憶するシステム領域10及びデータ領域11の構
成は、実施例に述べたものに限らず他の構成でもよい。
また、上述した実施例では、データをアルファベット順
にEEPROM5に記憶しているが、順序づけて記憶し
ない場合にも本発明は適用できる。さらに、本発明のデ
ータ記憶装置は、小型電子式計算機、電子手帳、ワープ
ロ、パーソナルコンピュータ等に適用できる。
The configurations of the system area 10 and the data area 11 for storing the system data, the name, and the address data are not limited to those described in the embodiment and may be other configurations.
Further, in the above-mentioned embodiment, the data is stored in the EEPROM 5 in alphabetical order, but the present invention can be applied to the case where the data is not stored in order. Further, the data storage device of the present invention can be applied to a small electronic calculator, an electronic notebook, a word processor, a personal computer and the like.

【0036】[0036]

【発明の効果】本発明では、データ記憶領域と別に予備
のデータ記憶領域を設け、データ記憶領域にデータが書
き込めなかった場合には、その予備のデータ記憶領域に
データを書き込むようにしている。これによりデータ記
憶領域が書き込み不良となってもデータを確実に保存す
ることができる。
According to the present invention, a spare data storage area is provided separately from the data storage area, and if the data cannot be written in the data storage area, the data is written in the spare data storage area. As a result, the data can be surely saved even if the data storage area has a write error.

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

【図1】本発明の実施例のデータ記憶装置の回路ブロッ
ク図である。
FIG. 1 is a circuit block diagram of a data storage device according to an embodiment of the present invention.

【図2】EEPROMの記憶領域の構成を示す図であ
る。
FIG. 2 is a diagram showing a configuration of a storage area of an EEPROM.

【図3】書き込み処理のフローチャートである。FIG. 3 is a flowchart of a writing process.

【図4】追加するデータの一例を示す図である。FIG. 4 is a diagram showing an example of data to be added.

【図5】EEPROMに記憶されているデータの一例を
示す図である。
FIG. 5 is a diagram showing an example of data stored in an EEPROM.

【図6】書き替え前のEEPROMの内容を示す図であ
る。
FIG. 6 is a diagram showing the contents of an EEPROM before rewriting.

【図7】書き替え後のEEPROMの内容を示す図であ
る。
FIG. 7 is a diagram showing the contents of an EEPROM after rewriting.

【図8】データ記憶領域が書き込み不良となった場合の
説明図である。
FIG. 8 is an explanatory diagram of a case where a data storage area has a write failure.

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

10 システム領域 11 データ領域 12 予備のデータ領域 10 system area 11 data area 12 spare data area

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】不揮発性メモリにデータを記憶するデータ
記憶装置において、 データを記憶する複数のデータ記憶領域と、 複数の予備のデータ記憶領域と、 前記データ記憶領域に正常にデータが書き込めたか否か
を判別する判別手段と、 この判別手段によりデータが正常に書き込めなかったと
判別されたとき、該データを予備のデータ領域に書き込
む書き込み手段とを備えることを特徴とするデータ記憶
装置。
1. A data storage device for storing data in a non-volatile memory, comprising: a plurality of data storage areas for storing data; a plurality of spare data storage areas; and whether or not data has been normally written to the data storage area. A data storage device comprising: a determining unit that determines whether or not the data is written, and a writing unit that writes the data in a spare data area when the data is not normally written by the determining unit.
JP19565693A 1993-08-03 1993-08-06 Data storage device Withdrawn JPH0749815A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP19565693A JPH0749815A (en) 1993-08-06 1993-08-06 Data storage device
US08/283,998 US5523915A (en) 1993-08-03 1994-08-01 Data storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19565693A JPH0749815A (en) 1993-08-06 1993-08-06 Data storage device

Publications (1)

Publication Number Publication Date
JPH0749815A true JPH0749815A (en) 1995-02-21

Family

ID=16344809

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19565693A Withdrawn JPH0749815A (en) 1993-08-03 1993-08-06 Data storage device

Country Status (1)

Country Link
JP (1) JPH0749815A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018136735A (en) * 2017-02-22 2018-08-30 三菱電機株式会社 Memory controller and memory control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018136735A (en) * 2017-02-22 2018-08-30 三菱電機株式会社 Memory controller and memory control method

Similar Documents

Publication Publication Date Title
KR940002755B1 (en) One-chip microcomputer
US5943692A (en) Mobile client computer system with flash memory management utilizing a virtual address map and variable length data
JPH03250499A (en) Data storage circuit
EP0369829B1 (en) Information searching apparatus
US4633432A (en) System for transferring document data to non-volatile memory in a word processing apparatus
US5523915A (en) Data storage system
JPH10105519A (en) Electronic equipment
JPS6129016B2 (en)
JPH0749815A (en) Data storage device
JP2661131B2 (en) Information storage and reading method and apparatus
JPH0744453A (en) Data storage device
KR20210038834A (en) Back-up and restoration of register data
JPH0744451A (en) Data storage device
JPH0764851A (en) Data storage device
US6515891B2 (en) Random access memory with hidden bits
EP0369819B1 (en) Desk top calculator
JP2733596B2 (en) Data erasing method in data storage device
JPH08115297A (en) Electronic device
JPH0715623B2 (en) Display device
JPH01207841A (en) Condition history storage device
JPH11161248A (en) Microcomputer for display
JPH0373958B2 (en)
JP2788765B2 (en) Semiconductor storage device
JP2758745B2 (en) Memory circuit
JPS6057381A (en) Display system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20001031