JPH0745085A - Data writer and reader - Google Patents

Data writer and reader

Info

Publication number
JPH0745085A
JPH0745085A JP18972293A JP18972293A JPH0745085A JP H0745085 A JPH0745085 A JP H0745085A JP 18972293 A JP18972293 A JP 18972293A JP 18972293 A JP18972293 A JP 18972293A JP H0745085 A JPH0745085 A JP H0745085A
Authority
JP
Japan
Prior art keywords
data
bits
eprom
memory
state
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
JP18972293A
Other languages
Japanese (ja)
Inventor
Fusao Hori
房生 保里
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.)
TEC CORP
Original Assignee
TEC CORP
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 TEC CORP filed Critical TEC CORP
Priority to JP18972293A priority Critical patent/JPH0745085A/en
Publication of JPH0745085A publication Critical patent/JPH0745085A/en
Pending legal-status Critical Current

Links

Landscapes

  • Read Only Memory (AREA)

Abstract

PURPOSE:To reduce the changing frequency of bit states at the time of program writing and to extend the service life of a rewritable ROM by counting the number of bits '0' and the number of bits '1', and when the number of bits '0' is less than the number of bits '1', writing data without inverting them. CONSTITUTION:The number of bits '0' out of all program data obtained from data lines D0 to D7 connected from a data bus 15 to an EPROM 14 is counted, and when the number of bits '0' is smaller than a half of all bits constituting the EPROM 14, all program data are written in the EPROM 14 while holding the output of an inversion control circuit 17 at a low level. When the number of bits '0' is larger than a half of all the bits, the output of the circuit 17 is turned to a high level and all the program data are inverted and written in the EPROM 14. Since the changing frequency of bits constituting the EPROM 14 from '1' to '0' can be reduced, stress can be reduced and the life of the EPROM 14 can be extended.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、再書込み可能なRO
M(read only memory)にプログラム等のデータを書込
む、例えばROMライタ及びこのROMライタでプログ
ラムが書込まれた再書込み可能なROMを使用するシス
テム等のデータ書込装置及びデータ読取装置に関する。
BACKGROUND OF THE INVENTION The present invention is a rewritable RO.
The present invention relates to a data writing device and a data reading device such as a system for writing data such as a program in an M (read only memory), for example, a system using a ROM writer and a rewritable ROM in which the program is written by the ROM writer.

【0002】[0002]

【従来の技術】一般的なマスクROM等は再書込みが不
可能であるが、不揮発性メモリでも、紫外線や電気的に
メモリ内容を消去して、再びデータを書込むことができ
るEPROM( erasable programmable read only mem
ory )やEEPROM(electrically erasable progra
mmable read only memory )及びフラッシュメモリが知
られている。このような不揮発性メモリは、再書込み可
能なROMとして使用することができる。
2. Description of the Related Art Although a general mask ROM cannot be rewritten, an EPROM (erasable programmable) capable of rewriting data even if it is a nonvolatile memory can be erased electrically by ultraviolet rays or electrically. read only mem
ory) and EEPROM (electrically erasable progra
mmable read only memory) and flash memory are known. Such a non-volatile memory can be used as a rewritable ROM.

【0003】従来、このような再書込み可能なROM
は、例えば図5に示す概略構成のROMライタを使用し
て、プログラム等のデータが書込まれるようになってい
た。
Conventionally, such a rewritable ROM
For example, a ROM writer having the schematic configuration shown in FIG. 5 is used to write data such as a program.

【0004】再書込み可能なROMとしてのEPROM
1は、コネクタを介してデータバス2に接続される。こ
のデータバス2を介して、制御部本体を構成するCPU
(central processing unit )3は、ROM4及びRA
M(random access memory)5と接続されている。前記
ROM4には、前記CPU3が行う処理のプログラムデ
ータが記憶され、前記RAM5には、前記CPU3が処
理を行う時に使用する各種メモリのエリアが形成されて
いる。
EPROM as rewritable ROM
1 is connected to the data bus 2 via a connector. CPU that constitutes the main body of the control unit via the data bus 2
(Central processing unit) 3 includes ROM 4 and RA
It is connected to an M (random access memory) 5. The ROM 4 stores program data for processing performed by the CPU 3, and the RAM 5 has areas for various memories used when the CPU 3 performs processing.

【0005】このようなROMライタでは、CPU3の
制御により、ROM4又はRAM5に記憶されたプログ
ラムデータ、あるいはフロッピーディスク又はハードデ
ィスク等の外部記憶装置に記憶されたプログラムデータ
が、データバス2を介してEPROM1に記憶されるよ
うになっている。
In such a ROM writer, the program data stored in the ROM 4 or the RAM 5 or the program data stored in an external storage device such as a floppy disk or a hard disk is controlled by the CPU 3 via the data bus 2 to the EPROM 1 It will be remembered in.

【0006】ところで、EPROM等の再書込み可能な
ROMは、書込み回数が、例えば100000回などの
制限がある。それは、各メモリのビットの状態を1(ハ
イレベル)から0(ローレベル)へ変化させるときに、
又は0から1へ変化させるときに、上記再書込み可能R
OMの各ビットを構成する素子にストレスがかかるため
である。そして、一般的に再書込み可能なROMは、全
てのビットの状態(データ)を1にして初期化される。
By the way, the rewritable ROM such as the EPROM has a limit of the number of times of writing, for example, 100,000 times. When changing the state of each memory bit from 1 (high level) to 0 (low level),
Or when changing from 0 to 1, the above rewritable R
This is because stress is applied to the elements forming each bit of the OM. In general, the rewritable ROM is initialized by setting the state (data) of all bits to 1.

【0007】[0007]

【発明が解決しようとする課題】上述したように、再書
込み可能なROMは、全てのビットが1の状態で初期化
され、再書込み可能なROMを構成するビットを1の状
態から0の状態に変化させるときに発生するストレスに
より、書込み回数(寿命)が制限される。
As described above, in the rewritable ROM, all the bits are initialized in the state of 1, and the bits constituting the rewritable ROM are set from the state of 1 to the state of 0. The number of times of writing (lifetime) is limited by the stress generated when changing to.

【0008】従って、プログラム等のデータを書込むと
きに、ビットを1の状態から0の状態に変化させる数を
少なくすることにより、ストレスを減少させて再書込み
可能なROMの寿命を延ばすことが考えられる。
Therefore, when writing data such as a program, it is possible to reduce the stress and extend the life of the rewritable ROM by reducing the number of changing the bit from the 1 state to the 0 state. Conceivable.

【0009】そこでこの発明は、プログラム等のデータ
を書込むときに、ビットを1の状態から0の状態に変化
させる数を少なくすることができ、従って再書込み可能
なROMの寿命を延ばすことができるデータ書込装置及
びデータ読取装置を提供することを目的とする。
Therefore, according to the present invention, when writing data such as a program, it is possible to reduce the number of bits to be changed from the state of 1 to the state of 0, so that the life of a rewritable ROM can be extended. An object of the present invention is to provide a data writing device and a data reading device that can be used.

【0010】[0010]

【課題を解決するための手段】請求項1対応の発明は、
再書込み可能なリード・オンリ・メモリへプログラム等
のデータを書込むデータ書込装置において、再書込み可
能なリード・オンリ・メモリに書込む全データのうちの
0の状態又は1の状態のビット数を計数する計数手段
と、この計数手段により計数されたビット数に基づい
て、全データにおける0の状態のビット数が1の状態の
ビット数より大きいか否かを判断する判断手段と、この
判断手段により全データにおける0の状態のビット数が
1の状態のビット数以下のときには、全データを反転せ
ずに再書込み可能なリード・オンリ・メモリに書込み、
0の状態のビット数が1の状態のビット数より大きいと
きには、全データを反転して再書込み可能なリード・オ
ンリ・メモリに書込む書込手段とを設けたものである。
The invention according to claim 1 is
In a data writing device that writes data such as a program to a rewritable read-only memory, the number of bits in the 0 state or 1 state of all the data written to the rewritable read-only memory And counting means for judging whether the number of bits in the state of 0 in all data is larger than the number of bits in the state of 1 based on the number of bits counted by the counting means. When the number of bits in the 0 state in all data is equal to or less than the number of bits in the 1 state by the means, the entire data is written in the rewritable read-only memory without being inverted,
When the number of bits in the state of 0 is larger than the number of bits in the state of 1, writing means for inverting all the data and writing the data in the rewritable read only memory is provided.

【0011】請求項2対応の発明は、再書込み可能なリ
ード・オンリ・メモリからプログラム等のデータを読取
るデータ読取装置において、再書込み可能なリード・オ
ンリ・メモリに対してメモリチェックを行うメモリチェ
ック手段と、このメモリチェック手段によるメモリチェ
ック結果がエラーとなったときには、再書込み可能なリ
ード・オンリ・メモリからその全データを反転して読取
る反転読取手段とを設けたものである。
According to a second aspect of the present invention, in a data reading device for reading data such as a program from a rewritable read-only memory, a memory check is performed for the rewritable read-only memory. Means and reversal reading means for reversing and reading all the data from the rewritable read only memory when the memory check result by the memory checking means results in an error.

【0012】[0012]

【作用】請求項1対応の発明においては、計数手段によ
り、再書込み可能なリード・オンリ・メモリに書込む全
データのうちの0の状態又は1の状態のビット数が計数
され、判断手段により、この計数されたビット数に基づ
いて、再書込み可能なリード・オンリ・メモリに書込む
全データにおける0の状態のビット数が1の状態のビッ
ト数より大きいか否かが判断される。
In the invention according to claim 1, the counting means counts the number of bits in the 0 state or the 1 state of all the data to be written in the rewritable read only memory, and the judging means. Based on the counted number of bits, it is judged whether or not the number of bits in the 0 state in all the data to be written in the rewritable read-only memory is larger than the number of bits in the 1 state.

【0013】書込み手段により、その判断で再書込み可
能なリード・オンリ・メモリに書込む全データにおける
0の状態のビット数が1の状態のビット数以下のときに
は、全データは、反転されずそのまま再書込み可能なリ
ード・オンリ・メモリに書込まれ、0の状態のビット数
が1の状態のビット数より大きいと判断されたときに
は、全データは、反転されて再書込み可能なリード・オ
ンリ・メモリに書込まれる。
When the number of bits in the 0 state of all data to be written in the rewritable read-only memory by the writing means is equal to or less than the number of bits in the 1 state, the entire data is not inverted and remains as it is. When it is written to the rewritable read-only memory and it is determined that the number of bits in the 0 state is larger than the number of bits in the 1 state, all data is inverted and rewritable in the read-only memory. Written to memory.

【0014】請求項2対応の発明においては、メモリチ
ェック手段により、再書込み可能なリード・オンリ・メ
モリのメモリチェックが行われ、そのメモリチェック結
果がエラーとなったときには、反転読取手段により、再
書込み可能なリード・オンリ・メモリからその全データ
が、反転して読取られる。
According to the second aspect of the invention, the memory check means performs the memory check of the rewritable read-only memory, and when the result of the memory check results in an error, the reversal read means rewrites it. All of its data is read inverted from the writable read-only memory.

【0015】[0015]

【実施例】以下、この発明の実施例を図面を参照して説
明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0016】図1及び図2は、請求項1対応の発明(デ
ータ書込装置)の実施例を示すもので、請求項1対応の
発明をROM(read only memory)ライタに適用したも
のである。
FIGS. 1 and 2 show an embodiment of the invention (data writing device) corresponding to claim 1, wherein the invention corresponding to claim 1 is applied to a ROM (read only memory) writer. .

【0017】図1は、前記ROMライタの要部回路構成
を示すブロック図である。
FIG. 1 is a block diagram showing a circuit configuration of a main part of the ROM writer.

【0018】11は、制御部本体を構成するCPU(ce
ntral processing unit )である。このCPU11が行
う処理のプログラムデータが記憶されたROM12、前
記CPU11が処理を行うときに使用する各種メモリの
エリアが形成されたRAM(random access memory)1
3及び再書込み可能なリード・オンリ・メモリとしての
EPROM(erasable programmable read only memor
y)14は、それぞれデータバス15及びアドレスバス
(図示せず)等を介して前記CPU11と接続されてい
る。
Reference numeral 11 denotes a CPU (ce
ntral processing unit). A ROM 12 in which program data for processing performed by the CPU 11 is stored, and a RAM (random access memory) 1 in which areas of various memories used when the CPU 11 performs processing are formed.
3 and EPROM (erasable programmable read only memory) as rewritable read-only memory
y) 14 are connected to the CPU 11 via a data bus 15 and an address bus (not shown), respectively.

【0019】前記CPU11、前記ROM12及び前記
RAM13は、それぞれ前記データバス15と8本のデ
ータ線(D0〜D7)により接続されている。
The CPU 11, the ROM 12, and the RAM 13 are connected to the data bus 15 by eight data lines (D0 to D7), respectively.

【0020】前記EPROM14は、前記データバス1
5から引き出された8本のデータ線(D0〜D7)か
ら、それぞれエクスクルーシブOR回路160〜167
を介してデータを入力するように接続されている。この
エクスクルーシブOR回路160〜167の残る一方の
入力端子には、フリップフロップ回路からなる反転制御
回路17からのデータ出力信号が共通信号として入力さ
れている。
The EPROM 14 is the data bus 1
From the eight data lines (D0 to D7) drawn from No. 5, the exclusive OR circuits 160 to 167, respectively.
Connected to enter data via. A data output signal from the inversion control circuit 17, which is a flip-flop circuit, is input as a common signal to the remaining one input terminal of each of the exclusive OR circuits 160 to 167.

【0021】前記反転制御回路17のデータ入力端子
(D)、クロック入力端子及び負論理のリセット入力端
子は、それぞれ前記データバス15のデータ線(D
0)、前記CPU11の負論理のIOWR−N出力端子
(IOW)及びリセット信号線(RS)と接続されてい
る。なおリセット信号線は、前記CPU11の負論理の
リセット入力端子にも接続されている。
The data input terminal (D), the clock input terminal and the negative logic reset input terminal of the inversion control circuit 17 are respectively connected to the data line (D) of the data bus 15.
0), a negative logic IOWR-N output terminal (IOW) of the CPU 11 and a reset signal line (RS). The reset signal line is also connected to the negative logic reset input terminal of the CPU 11.

【0022】なお、前記反転制御回路17からのデータ
出力信号は、この反転制御回路17に入力されるリセッ
ト信号線(RS)からのパルス信号により、ローレベル
となり、そのクロック入力端子に入力される信号の立ち
上がりにより、そのデータ入力端子(D)に入力されて
いる信号が出力されるようになっている。
The data output signal from the inversion control circuit 17 becomes low level by the pulse signal from the reset signal line (RS) input to the inversion control circuit 17, and is input to its clock input terminal. At the rising edge of the signal, the signal input to the data input terminal (D) is output.

【0023】従って、前記CPU11がIOWR−N出
力端子(IOW)から立上がり信号を出力しない限り、
前記エクスクルーシブOR回路160〜167からは、
通常データバス15で転送されてきたデータが、そのま
ま前記EPROM14に入力され書込まれる。
Therefore, unless the CPU 11 outputs a rising signal from the IOWR-N output terminal (IOW),
From the exclusive OR circuits 160 to 167,
The data transferred by the normal data bus 15 is directly input to and written in the EPROM 14.

【0024】図2に、前記CPU11が行うデータ書込
処理の流れを示す。
FIG. 2 shows the flow of the data writing process performed by the CPU 11.

【0025】まず、RAM13に形成されたアドレス格
納エリアN及びビット数格納エリアSを0に初期化し
て、ステップ1(ST1)の処理として、EPROM1
4のアドレス格納エリアNに格納されたアドレスNに書
込む1バイトデータのうちの0の状態のビット数を計数
し(計数手段)、この計数されたビット数をRAM13
に形成された一時格納エリアTに格納する。
First, the address storage area N and the bit number storage area S formed in the RAM 13 are initialized to 0, and the EPROM 1 is processed as the processing of step 1 (ST1).
The number of bits in the 0 state of the 1-byte data written in the address N stored in the address storage area 4 of 4 is counted (counting means), and the counted number of bits is stored in the RAM 13
It is stored in the temporary storage area T formed in.

【0026】次に、ビット数格納エリアSに格納された
ビット数Sに一時格納エリアTに格納されたビット数T
を加算し、この加算して得たビット数をビット数格納エ
リアSに格納すると共に、アドレス格納エリアNに格納
されたアドレスNに対して+1の加算処理を行い、この
加算処理により得たアドレスをアドレス格納エリアNに
格納する。
Next, the bit number S stored in the bit number storage area S and the bit number T stored in the temporary storage area T
Is added, the number of bits obtained by this addition is stored in the number-of-bits storage area S, and the address N stored in the address storage area N is added by +1 to obtain the address obtained by this addition processing. Is stored in the address storage area N.

【0027】次に、アドレス格納エリアNに格納された
アドレスNが、EPROM14の最終アドレスLに等し
いか否かを判断し、上記アドレスNが上記アドレスLに
等しくなければ、再び前述のステップ1の処理に戻るよ
うになっている。
Next, it is judged whether or not the address N stored in the address storage area N is equal to the final address L of the EPROM 14, and if the address N is not equal to the address L, the above step 1 is repeated. It is designed to return to processing.

【0028】また、上記アドレスNが上記アドレスLに
等しいならば、ビット数格納エリアに格納されたビット
数Sが、1バイトデータを構成するビット数WにEPR
OM14の全バイト数Lを乗算して2で除算した数(1
/2)WLより大きいか否かを判断する(判断手段)。
すなわち、EPROM14に書込む全データのうちの0
の状態のビット数が、EPROM14を構成する全ビッ
ト数の半分より大きいか否かにより、書込む0の状態の
ビット数が1の状態のビット数より大きいか否かを判断
する。
If the address N is equal to the address L, the number S of bits stored in the number-of-bits storage area becomes EPR to the number W of bits forming 1-byte data.
Number obtained by multiplying the total number of bytes L of OM14 and dividing by 2 (1
/ 2) It is judged whether it is larger than WL (judgment means).
That is, 0 of all the data written in the EPROM 14
It is determined whether the number of bits in the 0 state to be written is larger than the number of bits in the 1 state, depending on whether or not the number of bits in the state of is larger than half of all the bits configuring the EPROM 14.

【0029】ここで、上記ビット数Sが、上記数(1/
2)WLより大きいならば、反転制御回路17へのデー
タ線(D0)にハイレベルの信号を出力したのち、IO
WR−N出力端子(IOW)から反転制御回路17へ立
上がり信号を出力し、反転制御回路17の出力をハイレ
ベルにして、EPROM14に書込む全データを反転
し、その反転した全データをEPROM14に書込む
(書込手段)。
Here, the number of bits S is equal to the number (1 /
2) If it is larger than WL, a high level signal is output to the data line (D0) to the inversion control circuit 17, and then IO
A rising signal is output from the WR-N output terminal (IOW) to the inversion control circuit 17, the output of the inversion control circuit 17 is set to a high level, all the data to be written in the EPROM 14 are inverted, and all the inverted data are written to the EPROM 14. Write (writing means).

【0030】また、上記ビット数Sが上記数(1/2)
WL以下ならば、そのままEPROM14に書込む全デ
ータをEPROM14に書込む(書込手段)。
Further, the number of bits S is the above number (1/2).
If it is less than WL, all the data to be written in the EPROM 14 as it is is written in the EPROM 14 (writing means).

【0031】EPROM14への全データの書込みが終
了すると、このデータ書込処理を終了するようになって
いる。
When the writing of all data to the EPROM 14 is completed, this data writing process is completed.

【0032】このような構成の本実施例においては、R
OM12又はRAM13あるいはフロッピーディスク等
の外部記憶装置に記憶されたプログラムデータは、EP
ROM14の各アドレス毎に、すなわち書込む1バイト
データのアドレス毎に、0の状態(データ)のビット数
が計数され、書込む全プログラムデータについて、EP
ROM14の全エリア(アドレス0〜アドレスL)にわ
たって、0の状態のビット数の合計が算出される。この
算出された0の状態の合計ビット数が、EPROM14
の全エリアを構成するビット数の半分(1/2)WL以
下の場合には、反転制御回路17の出力をローベルのま
まにして、全プログラムデータをEPROM14に書込
む。
In this embodiment having such a structure, R
The program data stored in the external storage device such as the OM 12 or the RAM 13 or the floppy disk is EP
The number of bits in the 0 state (data) is counted for each address of the ROM 14, that is, for each address of 1-byte data to be written.
The total number of bits in the 0 state is calculated over the entire area (address 0 to address L) of the ROM 14. The calculated total number of bits in the 0 state is the EPROM 14
If the number of bits constituting the entire area is less than half (1/2) WL, the output of the inversion control circuit 17 remains low and all program data is written in the EPROM 14.

【0033】また、算出された0の状態の合計ビット数
が、EPROM14の全エリアを構成するビット数の半
分(1/2)WLより大きい場合には、反転制御回路1
7の出力をハイレベルにし、全プログラムデータを反転
してEPROM14に書込む。
If the calculated total number of bits in the 0 state is larger than half (1/2) WL of the number of bits forming the entire area of the EPROM 14, the inversion control circuit 1
The output of 7 is set to the high level, all the program data are inverted and written in the EPROM 14.

【0034】このように本実施例によれば、データバス
15からEPROM14へ接続された8本のデータ線
(D0〜D7)に介挿されたエクスクルーシブOR回路
160〜167と、この各エクスクルーシブOR回路1
60〜167の残る一方の入力端子へ共通に信号を出力
する反転制御回路17とを設け、EPROM14に書込
む全プログラムデータのうちの0の状態のビット数を計
数し、0の状態のビット数がEPROM14を構成する
全ビット数の半分以下の場合には、反転制御回路17の
出力をローレベルのまま全プログラムデータをEPRO
M14に書込み、0の状態のビット数がEPROM14
を構成する全ビット数の半分より大きい場合には、反転
制御回路17の出力をハイレベルにして全プログラムデ
ータを反転させてEPROM14に書込むことにより、
EPROM14を構成するビットを1の状態から0の状
態に変化させる数を少なくすることができる。従って、
EPROM14の寿命を延ばすことができる。
As described above, according to this embodiment, the exclusive OR circuits 160 to 167 inserted in the eight data lines (D0 to D7) connected from the data bus 15 to the EPROM 14 and the exclusive OR circuits are provided. 1
An inversion control circuit 17 for commonly outputting a signal to the other input terminal of 60 to 167 is provided, and the number of bits in the 0 state of all program data written in the EPROM 14 is counted, and the number of bits in the 0 state is counted. Is less than half the total number of bits forming the EPROM 14, the output of the inversion control circuit 17 remains at the low level, and all program data is changed to EPRO.
Writing to M14, the number of bits in the 0 state is EPROM14
If it is larger than half of the total number of bits that make up, the output of the inversion control circuit 17 is set to a high level to invert all program data and write it into the EPROM 14.
The number of bits that make up the EPROM 14 can be reduced from a 1 state to a 0 state. Therefore,
The life of the EPROM 14 can be extended.

【0035】なお、この実施例においては、フリップフ
ロップ回路からなる反転制御回路17とエクスクルーシ
ブOR回路160〜167とを設けたものについて説明
したが、この発明はこれに限定されるものではなく、書
込むデータのうち0の状態(データ)のビット数が1の
状態のビット数より大きいときに、その書込むデータを
反転する回路及び反転処理を行うものならば適用できる
ものである。
Although the inversion control circuit 17 formed of a flip-flop circuit and the exclusive OR circuits 160 to 167 have been described in this embodiment, the present invention is not limited to this. If the number of bits in the 0 state (data) of the data to be written is larger than the number of bits in the 1 state, a circuit that inverts the written data and an inversion process can be applied.

【0036】図3及び図4は、請求項2対応の発明(デ
ータ読取装置)の実施例を示すもので、請求項2対応の
発明を前記第1の実施例のROMライタでプログラムを
書込んだEPROMを使用するシステムに適用したもの
である。
3 and 4 show an embodiment of the invention (data reading device) corresponding to claim 2, in which the program corresponding to claim 2 is written by the ROM writer of the first embodiment. It is applied to a system using EPROM.

【0037】図3は、前記システムのEPROMの読取
部の要部回路構成を示すブロック図である。
FIG. 3 is a block diagram showing a circuit configuration of a main part of the reading section of the EPROM of the system.

【0038】21は、制御部本体を構成するCPUであ
る。このCPU21が行う処理のプログラムデータが記
憶されたROM22、前記CPU21が処理を行うとき
に使用する各種メモリのエリアが形成されたRAM23
及び再書込み可能なリード・オンリ・メモリとしてのE
PROM24は、それぞれデータバス25及びアドレス
バス(図示せず)等を介して前記CPU21と接続され
ている。
Reference numeral 21 is a CPU which constitutes the main body of the control unit. A ROM 22 in which program data for processing performed by the CPU 21 is stored, and a RAM 23 in which areas for various memories used when the CPU 21 performs processing are formed.
And E as a rewritable read-only memory
The PROM 24 is connected to the CPU 21 via a data bus 25 and an address bus (not shown), respectively.

【0039】前記CPU21、前記ROM22及び前記
RAM23は、それぞれ前記データバス25と8本のデ
ータ線(D0〜D7)により接続されている。
The CPU 21, the ROM 22, and the RAM 23 are connected to the data bus 25 by eight data lines (D0 to D7), respectively.

【0040】前記EPROM24は、前記データバス2
5から引き出された8本のデータ線(D0〜D7)へ、
それぞれエクスクルーシブOR回路260〜267を介
してデータを出力するように接続されている。このエク
スクルーシブOR回路260〜267の残る一方の入力
端子には、フリップフロップ回路からなる反転制御回路
27からのデータ出力信号が共通信号として入力されて
いる。
The EPROM 24 corresponds to the data bus 2
To 8 data lines (D0 to D7) drawn from 5,
Each of them is connected to output data via the exclusive OR circuits 260 to 267. A data output signal from the inversion control circuit 27 including a flip-flop circuit is input as a common signal to the remaining one input terminal of each of the exclusive OR circuits 260 to 267.

【0041】前記反転制御回路27のデータ入力端子
(D)、クロック入力端子及び負論理のリセット入力端
子は、それぞれ前記データバス25のデータ線(D
0)、前記CPU21の負論理のIOWR−N出力端子
(IOW)及びリセット信号線(RS)と接続されてい
る。なおリセット信号線は、前記CPU21の負論理の
リセット入力端子にも接続されている。
The data input terminal (D), the clock input terminal and the negative logic reset input terminal of the inversion control circuit 27 are respectively connected to the data line (D) of the data bus 25.
0), the negative logic IOWR-N output terminal (IOW) and the reset signal line (RS) of the CPU 21. The reset signal line is also connected to the negative logic reset input terminal of the CPU 21.

【0042】従って、前記CPU21がIOWR−N出
力端子(IOW)から立上がり信号を出力しない限り、
前記エクスクルーシブOR回路260〜267からは、
通常EPROM24から読取られたデータが、そのま
ま、前記データバス25に出力される。
Therefore, unless the CPU 21 outputs a rising signal from the IOWR-N output terminal (IOW),
From the exclusive OR circuits 260 to 267,
The data read from the normal EPROM 24 is directly output to the data bus 25.

【0043】図4に、前記CPU21が行うデータ読取
処理の流れを示す。
FIG. 4 shows the flow of the data reading process performed by the CPU 21.

【0044】まず、RAM23に形成されたアドレス格
納エリアN及びビット数格納エリアSを0に初期化し
て、ステップ2(ST2)の処理として、EPROM2
4のアドレス格納エリアに格納されたアドレスNに書込
まれている1バイトデータのうちの0の状態のビット数
を計数し、この計数値をRAM23に形成された一時格
納エリアTに格納する。
First, the address storage area N and the bit number storage area S formed in the RAM 23 are initialized to 0, and the EPROM 2 is processed as the processing of step 2 (ST2).
The number of bits in the 0 state of the 1-byte data written in the address N stored in the address storage area 4 is counted, and this count value is stored in the temporary storage area T formed in the RAM 23.

【0045】次に、ビット数格納エリアSに格納された
ビット数Sに一時格納エリアTに格納されたビット数T
を加算し、この加算して得たビット数をビット数格納エ
リアSに格納すると共に、アドレス格納エリアNに格納
されたアドレスNに対して+1の加算処理を行い、この
加算処理により得たアドレスをアドレス格納エリアNに
格納する。
Next, the number of bits S stored in the number of bits storage area S and the number of bits T stored in the temporary storage area T
Is added, the number of bits obtained by this addition is stored in the number-of-bits storage area S, the address N stored in the address storage area N is added by +1, and the address obtained by this addition processing is added. Is stored in the address storage area N.

【0046】次に、アドレス格納エリアNに格納された
アドレスNが、EPROM24の最終アドレスLの1つ
前のアドレスL−1に等しいか否かを判断し、上記アド
レスNが上記アドレスL−1に等しくなければ、再び前
述のステップ2の処理に戻るようになっている。
Next, it is determined whether the address N stored in the address storage area N is equal to the address L-1 immediately before the final address L of the EPROM 24, and the address N is the address L-1. If not equal to, the process returns to the above-mentioned step 2 again.

【0047】また、上記アドレスNが上記アドレスL−
1に等しいならば、ビット数格納エリアに格納されたビ
ット数Sに+1した数値S+1が、EPROM24のア
ドレスLに書込まれている1バイトデータの内容(チェ
ックサム値)に一致したか否か判断する(メモリチェッ
ク手段)。すなわち、EPROM24のアドレスLに書
込まれたチェックサムデータによりメモリチェックを行
う。
Further, the address N is the address L-
If it is equal to 1, whether or not the numerical value S + 1 obtained by adding 1 to the bit number S stored in the bit number storage area matches the content (checksum value) of the 1-byte data written in the address L of the EPROM 24. Judge (memory check means). That is, the memory check is performed by the checksum data written in the address L of the EPROM 24.

【0048】ここで、上記数値S+1が、上記アドレス
Lのチェックサム値と一致すれば、反転制御回路27の
出力をローベルのままにして、EPROM24から全デ
ータを読取る。
If the numerical value S + 1 matches the checksum value of the address L, the output of the inversion control circuit 27 remains low and all data is read from the EPROM 24.

【0049】また、上記数値S+1が、上記アドレスL
のチェックサム値と等しくなければ、EPROM24に
は反転データが書込まれていると判断して、反転制御回
路27へのデータ線(D0)にハイレベルの信号を出力
したのち、IOWR−N出力端子(IOW)から反転制
御回路27へ立上がり信号を出力し、反転制御回路27
の出力をハイレベルにして、EPROM24から全デー
タを反転して読取る(反転読取手段)。
Further, the numerical value S + 1 is the address L
If it is not equal to the checksum value of, the EPROM 24 judges that inverted data is written, outputs a high level signal to the data line (D0) to the inversion control circuit 27, and then outputs IOWR-N. A rising signal is output from the terminal (IOW) to the inversion control circuit 27,
The output of is set to a high level, and all the data is inverted and read from the EPROM 24 (inversion reading means).

【0050】上述したEPROM24からの全データの
読取りが終了すると、このデータ読取処理を終了するよ
うになっている。
When the reading of all the data from the EPROM 24 described above is completed, this data reading process is completed.

【0051】このような構成の本実施例においては、E
PROM24に記憶されたプログラムデータは、EPR
OM24の各アドレス毎に、すなわち読取る1バイトデ
ータのアドレス毎に、0の状態(データ)のビット数が
計数され、EPROM24のアドレスL−1のデータま
での0の状態のビット数の合計が算出される。
In the present embodiment having such a structure, E
The program data stored in the PROM 24 is the EPR.
The number of bits in the 0 state (data) is counted for each address of the OM 24, that is, for each address of 1-byte data to be read, and the total number of bits in the 0 state up to the data of the address L-1 of the EPROM 24 is calculated. To be done.

【0052】さらにこのアドレスL−1までの0の状態
の合計ビット数に+1加算して、チェックサムの照合す
るためのデータが算出される。チェックサムの正値デー
タは、EPROM24のアドレスLに記憶されており、
メモリチェックとして、上述した合計ビット数に+1加
算したデータ(数値)とEPROM24のアドレスLに
記憶されているデータ(数値)とが一致したか否かを判
断する。
Further, +1 is added to the total number of bits in the 0 state up to the address L-1, and the data for checking the checksum is calculated. Positive value data of the checksum is stored in the address L of the EPROM 24,
As a memory check, it is determined whether or not the data (numerical value) obtained by adding +1 to the total number of bits described above and the data (numerical value) stored in the address L of the EPROM 24 match.

【0053】この判断で一致したと判断された場合に
は、反転制御回路27の出力をローレベルのままにし
て、EPROM24からプログラムデータを読取る。
If it is determined that they coincide with each other, the program data is read from the EPROM 24 while keeping the output of the inversion control circuit 27 at the low level.

【0054】また、その判断で、一致しないと判断され
た場合、すなわちメモリチェックによりエラーと判断さ
れた場合には、反転制御回路27の出力をハイレベルに
して、EPROM24からプログラムデータを反転して
読取る。
If it is determined that they do not match, that is, if an error is determined by the memory check, the output of the inversion control circuit 27 is set to the high level and the program data is inverted from the EPROM 24. Read.

【0055】このように本実施例によれば、EPROM
24からデータバス25へ接続された8本のデータ線
(D0〜D7)に介挿されたエクスクルーシブOR回路
260〜267の各残る一方の入力端子へ共通に信号を
出力する反転制御回路27とを設け、チェックサムの結
果が正常と判断された場合には、反転制御回路27の出
力をローレベルのまま、EPROM24からプログラム
データを読取り、チェックサムの結果がエラーと判断さ
れた場合には、反転制御回路27の出力をハイレベルに
してEPROM24からプログラムデータを反転して読
取ることにより、前述の第1の実施例のROMライタに
よりデータを書き込んだ再書込み可能なROM(EPR
OM)から、正確にプログラムデータを読取ることがで
きる。従って、EPROM24の寿命を延ばすことがで
きる。
Thus, according to this embodiment, the EPROM
24 and an inversion control circuit 27 that outputs a signal in common to each of the remaining one input terminals of the exclusive OR circuits 260 to 267 connected to the eight data lines (D0 to D7) connected to the data bus 25. If the checksum result is determined to be normal, the program data is read from the EPROM 24 while the output of the inversion control circuit 27 remains at the low level, and if the checksum result is determined to be an error, the inversion is performed. By setting the output of the control circuit 27 to a high level and inverting and reading the program data from the EPROM 24, the rewritable ROM (EPR) in which the data is written by the ROM writer of the first embodiment described above.
The program data can be read accurately from the OM). Therefore, the life of the EPROM 24 can be extended.

【0056】なお、この実施例においては、フリップフ
ロップ回路からなる反転制御回路27とエクスクルーシ
ブOR回路260〜267とを設けたものについて説明
したが、この発明はこれに限定されるものではなく、メ
モリチェックによりエラーと判断されたときに、読取る
データを反転する回路又は反転処理を行うものならば適
用できるものである。
Although the inversion control circuit 27 formed of the flip-flop circuit and the exclusive OR circuits 260 to 267 are provided in this embodiment, the present invention is not limited to this, and the memory is not limited thereto. Any circuit that inverts the data to be read or an inversion process when it is determined to be an error by the check can be applied.

【0057】また、上述した2つの実施例においては、
再書込み可能なROMとしてEPROM14,24につ
いて説明したが、この発明はこれに限定されるものでは
なく、例えばEEPROM(electrically erasable pr
ogrammable read only memory )やフラッシュメモリ
等についても適用できるものである。
Further, in the above two embodiments,
Although the EPROMs 14 and 24 have been described as the rewritable ROM, the present invention is not limited to this, and for example, an EEPROM (electrically erasable pr
ogrammable read only memory) and flash memory can also be applied.

【0058】[0058]

【発明の効果】以上詳述したようにこの発明によれば、
プログラム等のデータを書込むときに、ビットを1の状
態から0の状態に変化させる数を少なくすることがで
き、従って再書込み可能なROMの寿命を延ばすことが
できるデータ書込装置及びデータ読取装置を提供でき
る。
As described above in detail, according to the present invention,
When writing data such as a program, the number of bits changing from a 1 state to a 0 state can be reduced, and therefore, the life of a rewritable ROM can be extended, and a data writing device and a data reading device. A device can be provided.

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

【図1】この発明の第1の実施例のROMライタの要部
回路構成を示すブロック図。
FIG. 1 is a block diagram showing a circuit configuration of a main part of a ROM writer according to a first embodiment of the present invention.

【図2】同実施例を示すデータ書込処理の流れを示す
図。
FIG. 2 is a diagram showing a flow of a data writing process according to the embodiment.

【図3】この発明の第2の実施例のシステムのEPRO
Mの読取部の要部回路構成を示すブロック図。
FIG. 3 is an EPRO of the system of the second embodiment of the present invention.
FIG. 4 is a block diagram showing a circuit configuration of a main part of an M reading unit.

【図4】同実施例を示すデータ読取処理の流れを示す
図。
FIG. 4 is a diagram showing a flow of a data reading process according to the embodiment.

【図5】従来例のデータ書込装置の要部回路構成を示す
ブロック図。
FIG. 5 is a block diagram showing a circuit configuration of a main part of a conventional data writing device.

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

11,21…CPU、14,24…EPROM、15,
25…データバス、160〜167,260〜267…
エクスクルーシブOR回路、17,27…反転制御回
路。
11, 21 ... CPU, 14, 24 ... EPROM, 15,
25 ... Data bus, 160-167, 260-267 ...
Exclusive OR circuit, 17, 27 ... Inversion control circuit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 再書込み可能なリード・オンリ・メモリ
へプログラム等のデータを書込むデータ書込装置におい
て、前記再書込み可能なリード・オンリ・メモリに書込
む全データのうちの0の状態又は1の状態のビット数を
計数する計数手段と、この計数手段により計数されたビ
ット数に基づいて、前記全データにおける0の状態のビ
ット数が1の状態のビット数より大きいか否かを判断す
る判断手段と、この判断手段により前記全データにおけ
る0の状態のビット数が1の状態のビット数以下のとき
には、前記全データを反転せずに前記再書込み可能なリ
ード・オンリ・メモリに書込み、0の状態のビット数が
1の状態のビット数より大きいときには、前記全データ
を反転して前記再書込み可能なリード・オンリ・メモリ
に書込む書込手段とを設けたことを特徴とするデータ書
込装置。
1. A data writing device for writing data such as a program to a rewritable read only memory, wherein 0 of all data written to the rewritable read only memory or Based on the counting means for counting the number of bits in the 1 state and the number of bits counted by this counting means, it is determined whether or not the number of bits in the 0 state in all the data is larger than the number of bits in the 1 state. And a determination means for determining that the number of bits in the 0 state in the total data is less than or equal to the number of bits in the 1 state, the entire data is written to the rewritable read-only memory without being inverted. , 0 when the number of bits in the state of 0 is larger than the number of bits in the state of 1, write means for inverting all the data and writing the data in the rewritable read-only memory. A data writing device comprising:
【請求項2】 再書込み可能なリード・オンリ・メモリ
からプログラム等のデータを読取るデータ読取装置にお
いて、前記再書込み可能なリード・オンリ・メモリに対
してメモリチェックを行うメモリチェック手段と、この
メモリチェック手段によるメモリチェック結果がエラー
となったときには、前記再書込み可能なリード・オンリ
・メモリからその全データを反転して読取る反転読取手
段とを設けたことを特徴とするデータ読取装置。
2. In a data reading device for reading data such as a program from a rewritable read only memory, a memory check means for performing a memory check on the rewritable read only memory, and this memory. A data reading device comprising: an inversion reading unit which inverts and reads all the data from the rewritable read only memory when the result of the memory check by the checking unit is an error.
JP18972293A 1993-07-30 1993-07-30 Data writer and reader Pending JPH0745085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18972293A JPH0745085A (en) 1993-07-30 1993-07-30 Data writer and reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18972293A JPH0745085A (en) 1993-07-30 1993-07-30 Data writer and reader

Publications (1)

Publication Number Publication Date
JPH0745085A true JPH0745085A (en) 1995-02-14

Family

ID=16246100

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18972293A Pending JPH0745085A (en) 1993-07-30 1993-07-30 Data writer and reader

Country Status (1)

Country Link
JP (1) JPH0745085A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336203B1 (en) 1995-05-30 2002-01-01 Mitsubishi Denki Kabushiki Kaisha Error correction coding and decoding method, and circuit using said method
US6996660B1 (en) * 2001-04-09 2006-02-07 Matrix Semiconductor, Inc. Memory device and method for storing and reading data in a write-once memory array
US7003619B1 (en) * 2001-04-09 2006-02-21 Matrix Semiconductor, Inc. Memory device and method for storing and reading a file system structure in a write-once memory array
US7051251B2 (en) 2002-12-20 2006-05-23 Matrix Semiconductor, Inc. Method for storing data in a write-once memory array using a write-many file system
US7062602B1 (en) 2001-04-09 2006-06-13 Matrix Semiconductor, Inc. Method for reading data in a write-once memory device using a write-many file system
US7398348B2 (en) 2004-08-24 2008-07-08 Sandisk 3D Llc Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable/rewritable memory
JP2008257850A (en) * 2007-04-04 2008-10-23 Samsung Electronics Co Ltd Flash memory device and method for driving the same
JP2010262640A (en) * 2009-04-30 2010-11-18 Internatl Business Mach Corp <Ibm> Method and system for adaptive endurance coding of non-volatile memory
JP2011508358A (en) * 2007-12-27 2011-03-10 インディリンクス カンパニー., リミテッド. Flash memory device for leveling wear level at bit level and flash memory programming method
JP2011204304A (en) * 2010-03-25 2011-10-13 Toshiba Corp Data memory device, and method of writing the same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62162299A (en) * 1986-01-10 1987-07-18 Mitsubishi Electric Corp Method for writing and reading semiconductor non-volatile memory data
JPS62239500A (en) * 1986-04-10 1987-10-20 Mitsubishi Electric Corp Semiconductor nonvolatile memory data writing device
JPS62241199A (en) * 1986-04-11 1987-10-21 Mitsubishi Electric Corp Semiconductor memory device
JPH05298894A (en) * 1992-04-16 1993-11-12 Sharp Corp Controller for writing and reading data in nonvolatile memory
JPH06267283A (en) * 1993-03-16 1994-09-22 Mitsubishi Electric Corp Read-only memory writable data and method for writing/ reading data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62162299A (en) * 1986-01-10 1987-07-18 Mitsubishi Electric Corp Method for writing and reading semiconductor non-volatile memory data
JPS62239500A (en) * 1986-04-10 1987-10-20 Mitsubishi Electric Corp Semiconductor nonvolatile memory data writing device
JPS62241199A (en) * 1986-04-11 1987-10-21 Mitsubishi Electric Corp Semiconductor memory device
JPH05298894A (en) * 1992-04-16 1993-11-12 Sharp Corp Controller for writing and reading data in nonvolatile memory
JPH06267283A (en) * 1993-03-16 1994-09-22 Mitsubishi Electric Corp Read-only memory writable data and method for writing/ reading data

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336203B1 (en) 1995-05-30 2002-01-01 Mitsubishi Denki Kabushiki Kaisha Error correction coding and decoding method, and circuit using said method
US6996660B1 (en) * 2001-04-09 2006-02-07 Matrix Semiconductor, Inc. Memory device and method for storing and reading data in a write-once memory array
US7003619B1 (en) * 2001-04-09 2006-02-21 Matrix Semiconductor, Inc. Memory device and method for storing and reading a file system structure in a write-once memory array
US7062602B1 (en) 2001-04-09 2006-06-13 Matrix Semiconductor, Inc. Method for reading data in a write-once memory device using a write-many file system
US7051251B2 (en) 2002-12-20 2006-05-23 Matrix Semiconductor, Inc. Method for storing data in a write-once memory array using a write-many file system
US7398348B2 (en) 2004-08-24 2008-07-08 Sandisk 3D Llc Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable/rewritable memory
US7689805B2 (en) 2004-08-24 2010-03-30 Sandisk 3D Llc Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable/rewriteable memory
US8209476B2 (en) 2004-08-24 2012-06-26 Sandisk 3D Llc Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable-rewriteable memory
JP2008257850A (en) * 2007-04-04 2008-10-23 Samsung Electronics Co Ltd Flash memory device and method for driving the same
JP2011508358A (en) * 2007-12-27 2011-03-10 インディリンクス カンパニー., リミテッド. Flash memory device for leveling wear level at bit level and flash memory programming method
JP2010262640A (en) * 2009-04-30 2010-11-18 Internatl Business Mach Corp <Ibm> Method and system for adaptive endurance coding of non-volatile memory
JP2011204304A (en) * 2010-03-25 2011-10-13 Toshiba Corp Data memory device, and method of writing the same

Similar Documents

Publication Publication Date Title
KR100375217B1 (en) Microcontroller incorporating an electrically rewritable non-volatile memory
US4612640A (en) Error checking and correction circuitry for use with an electrically-programmable and electrically-erasable memory array
US5414825A (en) Method of programming a semiconductor memory device within a microcomputer address space
JPS61267846A (en) Integrated circuit device with memory
US7305514B2 (en) Command sequence for optimized power consumption
JPH0745085A (en) Data writer and reader
US6944093B2 (en) Semiconductor memory device
US5206866A (en) Bit error correcting circuit for a nonvolatile memory
US5883831A (en) Serial access memory with securing of write operations
JP4327626B2 (en) Nonvolatile semiconductor memory device
US5226015A (en) Semiconductor memory system
US5355336A (en) Memory device and a method for prohibiting writing to the memory device
JP2720013B2 (en) Electrically changeable nonvolatile memory with write check function
US5381556A (en) Semiconductor device having externally programmable memory
US6137717A (en) Nonvolatile memory and writing circuit for same
JPH06215590A (en) Flash erasure type nonvolatile memory
JPH0636578A (en) Eeprom
JP3663043B2 (en) Method for determining the end of writing in a microcomputer
JPH0799636B2 (en) Semiconductor memory device
JP2660697B2 (en) Writing method of nonvolatile storage element
JP3702016B2 (en) Microcomputer with built-in nonvolatile memory
JP3711691B2 (en) Microcontroller
KR100504064B1 (en) Microcomputer
JP3090093B2 (en) Memory test circuit
JPH0757453A (en) Memory card and memory card system including this and method for rewriting data for memory card