[go: up one dir, main page]

JPH0373958B2 - - Google Patents

Info

Publication number
JPH0373958B2
JPH0373958B2 JP16755483A JP16755483A JPH0373958B2 JP H0373958 B2 JPH0373958 B2 JP H0373958B2 JP 16755483 A JP16755483 A JP 16755483A JP 16755483 A JP16755483 A JP 16755483A JP H0373958 B2 JPH0373958 B2 JP H0373958B2
Authority
JP
Japan
Prior art keywords
division
data storage
storage area
updated
data
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.)
Expired - Lifetime
Application number
JP16755483A
Other languages
Japanese (ja)
Other versions
JPS6059454A (en
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 filed Critical
Priority to JP58167554A priority Critical patent/JPS6059454A/en
Publication of JPS6059454A publication Critical patent/JPS6059454A/en
Publication of JPH0373958B2 publication Critical patent/JPH0373958B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Read Only Memory (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Time Recorders, Dirve Recorders, Access Control (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は電気的に消去、書込みおよび読出しが
可能な不揮発性メモリであるEEPROMへのデー
タ収納方法、特に計数データの収納方法に関する
ものである。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a method of storing data in an EEPROM, which is a nonvolatile memory that can be electrically erased, written to, and read from, and particularly relates to a method of storing count data.

〔従来技術〕[Prior art]

近年、このようなEEPROMの開発が進み、周
辺デバイス制御と同一の5V単一電源で制御可能
なものも現われて、広範囲の利用、特に従来困難
の多かつた、専用のバツクアツプ電源をもたない
小形のシステムにおけるデータの保存の問題を解
決するものとしてその利用が大いに期待されてい
る。
In recent years, the development of such EEPROMs has progressed, and some devices that can be controlled with a single 5V power supply, which is the same as controlling peripheral devices, have appeared, making it possible to use them over a wide range of applications, especially without the need for a dedicated backup power supply, which was often difficult in the past. There are great expectations for its use as a solution to data storage problems in small systems.

しかしながら、停電時の一時退避用としてでは
なく、いわばRAMと同様に用いる場合には、
EEPROMは通常のRAMと異なり書込み(書換
え)が、消去および書込みの2段構えとなり10m
s程度と比較的長い時間を要することから、その
間に中断した場合の対策、すなわち、動作再開後
に読出したデータが中断した無意味なデータでは
なく正しい最終データであるか否かを判断し、あ
るいは中断直前の完全なデータが確実に得られる
ようにすることが必要で、例えば1種類のデータ
について複数の収納エリアを設け、多数決でその
最終データを判断する等の方法が提案されてい
る。
However, when used similarly to RAM, rather than as a temporary backup during power outages,
Unlike normal RAM, EEPROM has two stages of writing (rewriting): erasing and writing, and is 10m long.
Since it takes a relatively long time of about 20 seconds, there are measures to be taken in case of interruption during that time, i.e., to determine whether the data read after restarting the operation is the correct final data rather than the meaningless data that was interrupted, or It is necessary to ensure that complete data immediately before interruption is obtained, and for example, methods have been proposed in which multiple storage areas are provided for one type of data and the final data is determined by majority vote.

もう一点、EEPROMをRAMと同様の方法で
用いる場合に解決されなければならないことに、
書込み回数の制限の問題がある。すなわち、現在
EEPROMの消去・書込み可能回数は106回程度と
されている。したがつて、これをカウンタとして
利用する場合には、特定のエリアを設け、そこに
単純に計数して行く方法では上記消去・書込み可
能回数までの計数しかできないことになる。
Another point that must be solved if EEPROM is to be used in the same way as RAM is:
There is a problem with the limit on the number of writes. That is, currently
EEPROM can be erased and written to approximately 106 times. Therefore, when using this as a counter, if a specific area is provided and the numbers are simply counted there, it will only be possible to count up to the number of erasing/writing possible.

〔発明の概要〕[Summary of the invention]

本発明はこのような事情に鑑みてなされたもの
で、その目的は、書込み途中の動作中断にかかわ
らず常に確実な最終データが得られ、かつ個々の
エリアの消去・書込み可能回数の制限を上回る数
の計数が可能なEEPROMへの計数データ収納方
法を提供することにある。
The present invention was made in view of these circumstances, and its purpose is to always obtain reliable final data regardless of interruptions in writing operations, and to exceed the limit on the number of erasing and writing times for individual areas. The object of the present invention is to provide a method for storing counting data in an EEPROM that allows counting of numbers.

このような目的を達成するために、本発明は、
最大計数桁数を桁順に複数区分に分割し、上位区
分については区分ごとに計数データ収納エリアを
設けるとともに、最下位区分については当該区分
の最大計数値より少ない個数の計数データ収納エ
リアを設け、計数値の更新にあたつては、最下位
区分の計数データ収納エリアの内容から自然数列
が乱れる直前のものを最終データとして検索し、
その次の順位のエリアに更新値を収納し、その更
新値が「0」となる場合には、さらに上位区分の
内容の更新を行なうものである。
In order to achieve such an objective, the present invention
The maximum number of counting digits is divided into multiple categories in order of digits, and for the upper category, a counting data storage area is provided for each category, and for the lowest category, a counting data storage area is provided for the number of items smaller than the maximum count value of the relevant category, When updating the count value, search the contents of the count data storage area of the lowest division for the last data just before the natural number sequence is disturbed, and
The updated value is stored in the area of the next rank, and when the updated value becomes "0", the contents of the higher classification are further updated.

一般的に、最終データを確保する方法として、
収納すべきデータの種類ごとに3以上のn個のデ
ータ収納エリアと、これに対応するサイン収納エ
リアとを設け、サイン収納エリアには順位が特定
可能なn+1個以上の異なつたサイン、例えば連
続する自然数のいずれかを収納するようにし、デ
ータの更新にあたつては、サインのうち連続する
最後順位のものを最終データに対応するものとし
て検索し、対応するデータ収納エリアの次順位の
データ収納エリアに更新データを収納した後、そ
れに対応するサイン収納エリアのサインを上記最
後順位のサインより1順位後順位のサインに書換
える方法が考えられる。すなわち、新データの書
込みが完了した時点でサインの書換えを行ない、
このサインによつて、完全なデータのうちでは最
も新しい最終データが検出できるようにしたもの
であるが、この方法を計数データの収納に用いる
には、前述した書込み回数の制限の問題がある一
方で、計数データの場合には、データそのものが
連続する自然数であることから、これをそのまま
サインとしても兼用することができる。
Generally, as a way to ensure final data,
For each type of data to be stored, n data storage areas of 3 or more and corresponding sign storage areas are provided, and the sign storage areas contain n+1 or more different signs whose ranks can be specified, for example, consecutively. When updating data, the last consecutive sign of the sign is searched as corresponding to the final data, and the data of the next rank in the corresponding data storage area is stored. A possible method is to store the updated data in the storage area and then rewrite the signature in the corresponding signature storage area to a sign ranked one rank after the last ranked signature. In other words, the signature is rewritten once the new data has been written,
This signature makes it possible to detect the latest and final data among complete data, but using this method for storing count data has the problem of the limit on the number of writes mentioned above. In the case of count data, since the data itself is a continuous natural number, it can also be used as a sign as it is.

したがつて本発明は、最大計数桁数を分割し、
最下位区分については、多数([当該区分の最大
計数値−1]個以下)のデータ収納エリアを設け
るという方法により1エリア当りの書換え回数を
抑えるとともに、その収容している計数データそ
のものから最終データの検出が行なえるようにし
たものである。上位区分については、上述したよ
うに各区分ごとに3以上のデータ収納エリアおよ
びサイン収納エリアを設ける方法をとつてもよい
し、あるいは他の、例えば前述したような多数決
法により最終データを把握できるようにすればよ
い。以下、実施例を用いて本発明を詳細に説明す
る。
Therefore, the present invention divides the maximum number of digits,
For the lowest category, by providing a large number of data storage areas ([maximum count value of the category - 1] or less), the number of rewrites per area can be reduced, and the final This allows data to be detected. For upper divisions, as described above, it is possible to provide three or more data storage areas and signature storage areas for each division, or other methods, such as the majority voting method described above, can be used to determine the final data. Just do it like this. Hereinafter, the present invention will be explained in detail using Examples.

〔実施例〕〔Example〕

第1図は本発明を電子オドメータに適用した場
合の一実施例を示すシステムの構成図である。図
において、10はプロセツサで、具体的には例え
ば周知のマイクロプロセツサにより構成される。
20はRAM、30はEEPROMである。また4
0はセンサで、一定の走行距離ごとに発生するパ
ルス信号PSを入力インターフエース50を介し
てプロセツサ10に送出する。さらに60は走行
距離を表示する表示器、70はその駆動回路であ
り、プロセツサ10により制御される。
EEPROM30には、固定メモリとして用いるプ
ログラムエリア31と、RAMと同様に使用する
データエリア32とが設けてある。D1はプロセ
ツサ10と上記データエリア32との間でやり取
りされるデータ信号、D2は上記プログラムエリ
ア31から読出されるデータ信号、A1は上記デ
ータエリアもしくはプログラムエリアの特定番地
エリアを指定するアドレス信号、R1は読出し制
御信号、W1は書き込み制御信号である。
FIG. 1 is a block diagram of a system showing an embodiment of the present invention applied to an electronic odometer. In the figure, numeral 10 denotes a processor, specifically constituted by, for example, a well-known microprocessor.
20 is a RAM, and 30 is an EEPROM. Also 4
0 is a sensor which sends a pulse signal PS generated every fixed distance traveled to the processor 10 via the input interface 50. Furthermore, 60 is a display for displaying the distance traveled, and 70 is a driving circuit thereof, which is controlled by the processor 10.
The EEPROM 30 is provided with a program area 31 used as a fixed memory and a data area 32 used like a RAM. D1 is a data signal exchanged between the processor 10 and the data area 32, D2 is a data signal read from the program area 31, A1 is an address signal specifying a specific address area of the data area or program area. R1 is a read control signal, and W1 is a write control signal.

上記構成において、プログラムエリア31は、
例えば標準径タイヤ円周長(m)/タイヤ1回転
当りのパルス数=Aとし、n0=100/Aとして求
めた100m当りにセンサ40から入力するパルス
数など、固定的なデータを予め収納しておくのに
用い、データエリア32は、上記パルス数を計数
する計数データの収納に用いる。なお、80は例
えば上記固定データなど不用意に書換えが行なわ
れてはならないデータの書換えを防ぐための回路
で、特定のアドレス信号線に信号が送出されてい
ないことを条件として、すなわちナンド回路
NAND1の全入力が非能動であることを条件とし
て、書込み制御信号線上に設けたアンド回路
AND1を開くようにすることにより、上記特定の
アドレス信号線に対応する桁が“1”となるアド
レスの内容の書換えを防止するものである。ま
た、90はプロセツサ10が暴走した際に誤つた
データの書込みが行なわれるのを防ぐための回路
で、プロセツサ10が正常動作中は当該プロセツ
サから送出されるクロツクパルスにより放電を繰
返してその端子電圧が一定レベル以下に抑えられ
ているコンデンサC1の当該端子電圧が、上記一
定レベルより高い基準電圧Bを越えたことを比較
器により検出して、すなわちその場合に比較器
COM1の出力が“0”となることによりアンド回
路AND1を閉じ、書込みを禁止するものである。
In the above configuration, the program area 31 is
For example, fixed data is stored in advance, such as the number of pulses input from the sensor 40 per 100 m calculated by assuming standard diameter tire circumference (m)/number of pulses per tire rotation = A, and n 0 = 100/A. The data area 32 is used to store counting data for counting the number of pulses. Note that 80 is a circuit for preventing the rewriting of data that should not be rewritten carelessly, such as the above-mentioned fixed data, and is a NAND circuit provided that no signal is sent to a specific address signal line.
AND circuit installed on the write control signal line, provided that all inputs of NAND 1 are inactive.
By opening AND1 , it is possible to prevent the content of the address from being rewritten so that the digit corresponding to the specific address signal line becomes "1". Further, 90 is a circuit for preventing erroneous data from being written when the processor 10 goes out of control.During normal operation of the processor 10, the circuit is repeatedly discharged by the clock pulses sent from the processor, and its terminal voltage is reduced. The comparator detects that the terminal voltage of the capacitor C1 , which is suppressed below a certain level, exceeds the reference voltage B, which is higher than the above certain level, and in that case, the comparator
When the output of COM 1 becomes "0", the AND circuit AND 1 is closed and writing is prohibited.

そこで、EEPROM30の容量512バイトとし、
最大計数桁数を4バイト=32ビツトとして、
EEPROM30のエリアを第2図のように2分
し、その一方に最下位バイト用の計数データ収納
エリアR1
Therefore, the capacity of EEPROM30 is 512 bytes,
Assuming the maximum number of digits to be counted as 4 bytes = 32 bits,
The area of the EEPROM 30 is divided into two as shown in Figure 2, and one side has a count data storage area R 1 for the lowest byte.

Claims (1)

【特許請求の範囲】 1 最大計数桁数を桁順に複数区分に分割し、上
位区分については各区分ごとに計数データ収納エ
リアを設けるとともに、最下位区分については最
下位区分の最大計数値より少ない個数の計数デー
タ収納エリアを設け、計数値の更新は、最下位区
分の計数データ収納エリアの内容のうち自然数列
の乱れる直前のものを最終データとして検索し、
当該計数データ収納エリアの次順位の計数データ
収納エリアに更新値を収納するとともに、更新値
が「0」となる場合にはさらに、上位区分の計数
データ収納エリアの内容を更新することにより行
なうことを特徴とするEEPROMへの計数データ
収納方法。 2 桁上げが正しく行なわれたかを識別するため
のオーバーフローエリアを設け、最下位区分につ
いて検索された最終データが「0」であるときは
更新値の収納に先立つて上位区分中の最下位桁を
オーバーフローエリアの内容と比較して一致しな
ければ当該上位区分の計数値を更新し、他方、最
下位区分の更新値が「0」となる場合には上位区
分のデータ収納エリアの内容の更新に先だつて上
位区分中の最下位桁の更新値をオーバーフローエ
リアに収納しておくことを特徴とする特許請求の
範囲第1項記載のEEPROMへの計数データ収納
方法。
[Scope of Claims] 1. The maximum number of counted digits is divided into a plurality of divisions in digit order, and a counting data storage area is provided for each division for the upper division, and the maximum count value for the lowest division is smaller than the maximum count value of the lowest division. A count data storage area for the number of pieces is provided, and the count value is updated by searching the content of the count data storage area for the lowest division as the final data immediately before the natural number sequence is disturbed.
This shall be done by storing the updated value in the counting data storage area of the next rank after the concerned counting data storage area, and if the updated value becomes "0", further updating the contents of the counting data storage area of the higher category. A counting data storage method in EEPROM characterized by: 2. An overflow area is provided to identify whether the carry has been carried out correctly, and when the final data retrieved for the lowest division is "0", the lowest digit in the upper division is stored before storing the updated value. When compared with the contents of the overflow area, if they do not match, the count value of the upper division is updated, and on the other hand, if the updated value of the lowest division is "0", the contents of the data storage area of the upper division are updated. 2. A method for storing count data in an EEPROM according to claim 1, characterized in that the updated value of the least significant digit in the upper classification is stored in an overflow area in advance.
JP58167554A 1983-09-13 1983-09-13 Count data storing method to eeprom Granted JPS6059454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58167554A JPS6059454A (en) 1983-09-13 1983-09-13 Count data storing method to eeprom

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58167554A JPS6059454A (en) 1983-09-13 1983-09-13 Count data storing method to eeprom

Publications (2)

Publication Number Publication Date
JPS6059454A JPS6059454A (en) 1985-04-05
JPH0373958B2 true JPH0373958B2 (en) 1991-11-25

Family

ID=15851871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58167554A Granted JPS6059454A (en) 1983-09-13 1983-09-13 Count data storing method to eeprom

Country Status (1)

Country Link
JP (1) JPS6059454A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7190617B1 (en) 1989-04-13 2007-03-13 Sandisk Corporation Flash EEprom system
US5222109A (en) * 1990-12-28 1993-06-22 Ibm Corporation Endurance management for solid state files
JP4592280B2 (en) * 2003-12-08 2010-12-01 富士通テン株式会社 Data storage

Also Published As

Publication number Publication date
JPS6059454A (en) 1985-04-05

Similar Documents

Publication Publication Date Title
US4517663A (en) Method of rewriting data in non-volatile memory, and system therefor
US5987478A (en) Virtual small block file manager for flash memory array
US20160266831A1 (en) Method and apparatus for memory management
JP2755581B2 (en) Digital data processing system
US4638457A (en) Method and apparatus for the non-volatile storage of the count of an electronic counting circuit
EP1403771A1 (en) Non-volatile memory control method
EP0398545A1 (en) Method and apparatus for storing data in a non-volatile memory
CN113568579B (en) Memory, data storage method and data reading method
US4651307A (en) Non-volatile memory storage system
US4447887A (en) Method of rewriting data in non-volatile memory, and system therefor
CA2017298C (en) Electronic odometer
JPH01152311A (en) Electronic type odo/tripmeter for vehicle
JPH0373958B2 (en)
KR950010304B1 (en) Semiconductor integrated circuit device with nonvolatile memory device
EP0833129A2 (en) High security counter
JPS6060515A (en) Displaying method of run distance
CN114637626B (en) Method, device and equipment for reducing read-write errors of EEPROM (electrically erasable programmable read-only memory) data and readable storage medium
JPS62254013A (en) Electronic odometer
JPH0330877Y2 (en)
JP3003543B2 (en) Electronic odometer
CN1105976C (en) One-chip microcomputer mounted with nonvolatile storage
JPH09293025A (en) Method for controlling memory access and its device
JP2549454Y2 (en) Data bank device
KR830000625B1 (en) Time data processing device
JPH11110983A (en) Flash memory erase count management method and data processing device using the same