JPH05197627A - Eeprom write protecting method and information processor - Google Patents

Eeprom write protecting method and information processor

Info

Publication number
JPH05197627A
JPH05197627A JP4008709A JP870992A JPH05197627A JP H05197627 A JPH05197627 A JP H05197627A JP 4008709 A JP4008709 A JP 4008709A JP 870992 A JP870992 A JP 870992A JP H05197627 A JPH05197627 A JP H05197627A
Authority
JP
Japan
Prior art keywords
eeprom
write
cpu
register
memory control
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
JP4008709A
Other languages
Japanese (ja)
Inventor
Etsuro Odan
悦朗 大段
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.)
NEC Software Shikoku Ltd
Original Assignee
NEC Software Shikoku 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 NEC Software Shikoku Ltd filed Critical NEC Software Shikoku Ltd
Priority to JP4008709A priority Critical patent/JPH05197627A/en
Publication of JPH05197627A publication Critical patent/JPH05197627A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent data in an EEPROM from being destroyed by the run-away of a program or the like by canceling a write inhibit state only when a specified key is set from a central processing unit. CONSTITUTION:This information processor with the built-in EEPROM is composed of a CPU 1, EEPROM 2 readable/writable from the CPU 1, decoder 3 to control read/write to the EEPROM 2 and register 4 to be set from the CPU 1 and only when a specified key code (Rxx) 15 is set from the CPU 1 to the register 4, a write signal (WE) 16 to the EEPROM 2 is outputted.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、EEPROM(Ele
ctric Erasable Programabl
e Read Only Memory、電気的に消去
・書込み可能な読出し専用メモリ)を有する情報処理装
置に利用され、特に、中央処理装置からのキー設定によ
り制御するEEPROM書込み保護方法に関する。
BACKGROUND OF THE INVENTION The present invention relates to an EEPROM (Ele
ctric Erasable Programmable
The present invention relates to an EEPROM write protection method which is used in an information processing apparatus having an e-Read Only Memory (electrically erasable / writable read-only memory) and is controlled by key setting from a central processing unit.

【0002】[0002]

【従来の技術】EEPROMは、電気的に消去・書込み
可能なROMである。このため、システムに組込んだ状
態でプロセサから簡単に書き込むことができ、また、電
源を落とした後も、書き込んだデータを記憶しているた
め、不揮発性メモリとして広く利用されている。
2. Description of the Related Art An EEPROM is an electrically erasable / writable ROM. Therefore, it can be easily written from a processor in a state where it is incorporated in a system, and since the written data is stored even after the power is turned off, it is widely used as a non-volatile memory.

【0003】EEPROMの制御回路は、他の一般のメ
モリデバイスと同様に簡単に作ることができるため、そ
の書込み保護回路については、従来、設けられていなか
った。
Since the control circuit of the EEPROM can be easily manufactured like other general memory devices, the write protection circuit has not been conventionally provided.

【0004】[0004]

【発明が解決しようとする課題】前述したように、従来
のEEPROM制御回路では、プロセサからの書込み動
作に対して、特に、保護回路を設けていなかったため、
プログラムの暴走等によって、EEPROMの領域を誤
書込みした場合、EEPROM内のデータを破壊してし
まう可能性がある欠点があった。
As described above, in the conventional EEPROM control circuit, no protection circuit is provided for the write operation from the processor.
If the EEPROM area is erroneously written due to a program runaway or the like, there is a drawback that the data in the EEPROM may be destroyed.

【0005】本発明の目的は、前記の欠点を除去するこ
とにより、プログラム暴走等によるEEPROMのデー
タ破壊を防止するEEPROM書込み保護方法およびそ
れを用いた情報処理装置を提供することにある。
An object of the present invention is to provide an EEPROM write protection method and a data processing apparatus using the same, which eliminates the above-mentioned drawbacks and prevents data destruction of the EEPROM due to program runaway or the like.

【0006】[0006]

【課題を解決するための手段】本発明のEEPROM書
込み保護方法は、中央処理装置、メモリ制御装置および
EEPROMを備えた情報処理装置におけるEEPRO
M書込み保護方法において、前記メモリ制御装置は、前
記中央処理装置からの書込みを許可する特定信号を入力
したときに、前記EEPROMへの書込み信号を出力す
ることを特徴とする。
According to the EEPROM write protection method of the present invention, an EEPROM in an information processing apparatus including a central processing unit, a memory control unit and an EEPROM is provided.
In the M write protection method, the memory control device outputs a write signal to the EEPROM when a specific signal for permitting writing is input from the central processing unit.

【0007】本発明の情報処理装置は、中央処理装置
と、この中央処理装置から読出し・書込み可能なEEP
ROMと、このEEPROMへの読出し・書込み信号を
出力するメモリ制御装置とを備えた情報処理装置におい
て、前記中央処理装置により設定され前記メモリ制御装
置に対して書込みを許可する特定信号を出力する特定信
号発生回路を備え、前記メモリ制御装置は、前記特定信
号を入力したときに前記EEPROMへの書込信号を出
力する手段を含むことを特徴とする。
The information processing apparatus of the present invention comprises a central processing unit and an EEP which can be read and written by the central processing unit.
In an information processing device comprising a ROM and a memory control device for outputting a read / write signal to and from the EEPROM, a specific signal which is set by the central processing unit and permits the memory control device to write is specified. The memory control device includes a signal generating circuit, and the memory control device includes means for outputting a write signal to the EEPROM when the specific signal is input.

【0008】また、本発明の情報処理装置は、前記メモ
リ制御装置はデコーダであり、前記特定信号発生回路は
レジスタであることが好ましい。
In the information processing device of the present invention, it is preferable that the memory control device is a decoder and the specific signal generating circuit is a register.

【0009】[0009]

【作用】メモリ制御装置は中央制御装置からの書込みを
許可する特定信号を入力したときのみ、EEPROMへ
の書込み信号を出力する。
The memory controller outputs the write signal to the EEPROM only when the specific signal for permitting the write is input from the central controller.

【0010】これにより、プログラムの暴走等によるE
EPROMへの誤書込みがなくなり、EEPROMのデ
ータ破壊を防止することが可能となる。
As a result, E due to program runaway, etc.
Erroneous writing to the EPROM is eliminated, and data destruction of the EEPROM can be prevented.

【0011】なお、これを適用した情報処理装置として
は、メモリ制御装置として例えばデコーダを用い、中央
処理装置からの設定により書込みを許可する特定信号を
発生する特定信号発生回路として例えばレジスタを設け
ることで実現される。
As an information processing apparatus to which this is applied, for example, a decoder is used as a memory control device, and a register is provided as a specific signal generating circuit for generating a specific signal for permitting writing by setting from a central processing unit. Will be realized in.

【0012】[0012]

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

【0013】図1は本発明の情報処理装置の一実施例の
要部を示すブロック構成図である。
FIG. 1 is a block diagram showing the essential parts of an embodiment of the information processing apparatus of the present invention.

【0014】本実施例は、中央処理装置(以下、CPU
という。)1と、このCPU1から読出し・書込み可能
なEEPROM2と、このEEPROM2への読出し信
号(RE)17および書込み信号(WE)16を出力す
るメモリ制御装置としてのデコーダ3とを備えた情報処
理装置において、本発明の特徴とするところの、CPU
1により設定されデコーダ3に対して書込みを許可する
特定信号としてのキーコード(RXX)15を出力する特
定信号発生回路としてのレジスタ4を備え、デコーダ3
は、キーコード15を入力したときにEEPROM2へ
の書込み信号16を出力する手段を含んでいる。
In this embodiment, a central processing unit (hereinafter, CPU
Say. ) 1, an EEPROM 2 readable / writable from the CPU 1, and a decoder 3 as a memory control device for outputting a read signal (RE) 17 and a write signal (WE) 16 to the EEPROM 2, CPU, which is a feature of the present invention
The decoder 3 is provided with a register 4 as a specific signal generating circuit that outputs a key code (R XX ) 15 as a specific signal which is set by 1 and permits writing to the decoder 3.
Includes means for outputting a write signal 16 to the EEPROM 2 when the key code 15 is input.

【0015】なお、CPU1は、アドレスバス11、デ
ータバス12および読出し・書込み信号(RW)14を
有している。
The CPU 1 has an address bus 11, a data bus 12 and a read / write signal (RW) 14.

【0016】次に、本実施例の動作について説明する。Next, the operation of this embodiment will be described.

【0017】本実施例では、CPU1のアドレスマップ
上にEEPROM2の領域が割当てられており、デコー
ダ3によって、アドレス上位をデコードしてEEPRO
M2のアドレス空間か否かを判別する。さらに、CPU
1のアドレスマップ上にはレジスタ4の領域が割り当て
られており、CPU1は、データバス12を介してレジ
スタ4に任意のデータを設定することができ、レジスタ
4はその設定値を記憶する。レジスタ4の記憶値はキー
コード15としてデコーダ3に入力され、特定のデコー
ダ3内のキーコードと比較される。CPU1のアセクス
がEEPROM2のアドレス空間であり、かつ、書込み
動作であり、かつ、レジスタ4からのキーコード15が
デコーダ3内のキーコードと一致した場合は、EEPR
OM2に書込み信号16を出力する。
In the present embodiment, the area of the EEPROM 2 is allocated on the address map of the CPU 1, and the decoder 3 decodes the upper address to decode the EEPROM.
It is determined whether the address space is M2. Furthermore, CPU
The area of the register 4 is allocated on the address map 1 and the CPU 1 can set arbitrary data in the register 4 via the data bus 12, and the register 4 stores the set value. The value stored in the register 4 is input to the decoder 3 as the key code 15 and compared with the key code in the specific decoder 3. If the access code of the CPU 1 is the address space of the EEPROM 2 and the write operation is performed, and the key code 15 from the register 4 matches the key code in the decoder 3, the EEPR
The write signal 16 is output to OM2.

【0018】一方、CPU1のアクセスがEEPROM
2のアドレス空間であり、かつ、書込み動作であり、か
つ、レジスタ4からのキーコード15がデコーダ3内の
キーコードと一致しなかった場合は、EEPROM2へ
の書込み信号16を出力しない。
On the other hand, the CPU 1 accesses the EEPROM
If the address space is 2, the write operation is performed, and the key code 15 from the register 4 does not match the key code in the decoder 3, the write signal 16 to the EEPROM 2 is not output.

【0019】また、CPU1のアクセスがEEPROM
2のアドレス空間であり、かつ、読出し動作であった場
合は、レジスタ4の値に無関係に、EEPROM2に読
出し信号17を出力する。
The access of the CPU 1 is EEPROM
In the case of the address space of 2 and the read operation, the read signal 17 is output to the EEPROM 2 regardless of the value of the register 4.

【0020】さらに、レジスタ4の初期値はリセット信
号14により「0」クリアされていて、キーコードを
「0」以外の値に設定しておくことにより、立上げ時の
EEPROM誤書込みを防止している。
Further, the initial value of the register 4 is cleared to "0" by the reset signal 14, and the key code is set to a value other than "0" to prevent erroneous writing of the EEPROM at the time of start-up. ing.

【0021】次に、EEPROMアクセス手順を図2に
示す。
Next, the EEPROM access procedure is shown in FIG.

【0022】ステップS1で書込みの場合、CPU1
は、まずレジスタ4にキーコードを設定する(ステップ
S2)。次にEEPROM2の任意のアドレスにデータ
を書き込む(ステップS3)。最後にレジスタ4をクリ
アする(ステップS4)。
In the case of writing in step S1, CPU1
First sets a key code in the register 4 (step S2). Next, the data is written to an arbitrary address of the EEPROM 2 (step S3). Finally, the register 4 is cleared (step S4).

【0023】読出しの場合、CPU1は、レジスタ4の
操作は行わずに、単にEEPROM2の任意のアドレス
のデータを読み出す(ステップS5)。
In the case of reading, the CPU 1 does not operate the register 4 and simply reads the data at any address of the EEPROM 2 (step S5).

【0024】以上のEEPROMアクセス手順を守るこ
とにより、EEPROM2のデータを誤書込みから保護
することができる。
By observing the above EEPROM access procedure, the data in the EEPROM 2 can be protected from erroneous writing.

【0025】例えば、プログラムが暴走した場合、CP
U1は未定義アドレスをアクセスすることが多い。CP
U1が未定義アドレスをアクセスするとバスエラーとな
り、CPU1は例外処理を行うため、スタックセーブを
行うが、このとき、スタックポインタ値が不正であった
場合は、そのスタックセーブ動作がさらに未定義アクセ
スを引き起こし、バスエラーとなる。バスエラー例外の
繰返しによりスタックセーブを無限に行うため、スタッ
クアドレスが順次インクリメントされて行く。やがてE
EPROM2のアドレスに到達し、EEPROM2の内
容を破壊する。
For example, if the program runs out of control, CP
U1 often accesses an undefined address. CP
When U1 accesses an undefined address, a bus error occurs, and the CPU 1 performs exception processing, so stack saving is performed. At this time, if the stack pointer value is invalid, the stack saving operation causes further undefined access. Cause a bus error. Stack addresses are sequentially incremented because stack saving is performed indefinitely due to repeated bus error exceptions. Eventually E
The address of EPROM2 is reached and the contents of EEPROM2 are destroyed.

【0026】しかし、本実施例によると、たとえEEP
ROM2への書込み動作を行っても、デコーダ3の論理
式は、 WE=AXX・RW1 ・RXX (ただし、AXXはEEPROM2のアドレスデータ、R
1 はRWの反転信号)、で与えられ、レジスタ4へキ
ーコードが設定されていないため、EEPROM2への
書込み信号16を発生しない。これにより、EEPRO
M2への誤書込みを防止することができる。
However, according to this embodiment, even if the EEP
Even if the writing operation to the ROM 2 is performed, the logical expression of the decoder 3 is as follows: WE = A XX · RW 1 · R XX (where A XX is the address data of the EEPROM 2, R
W 1 is an inverted signal of RW), and since the key code is not set in the register 4, the write signal 16 to the EEPROM 2 is not generated. This allows EEPRO
It is possible to prevent erroneous writing to M2.

【0027】[0027]

【発明の効果】以上説明したように、本発明によれば、
CPUから設定可能なレジスタを備え、このレジスタの
値がキーコードと一致した場合のみ、EEPROMへの
書込み信号を出力できるデコーダを構成したことによ
り、プログラムの暴走等によるEEPROMのデータ破
壊を防止することができ、その効果は大である。
As described above, according to the present invention,
To prevent the data destruction of the EEPROM due to the program runaway etc. by providing the register which can be set by the CPU and configured the decoder that can output the write signal to the EEPROM only when the value of this register matches the key code. Can be done, and the effect is great.

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

【図1】本発明の情報処理装置の一実施例を示すブロッ
ク構成図。
FIG. 1 is a block configuration diagram showing an embodiment of an information processing apparatus of the present invention.

【図2】そのEEPROMのアクセス手順を示す流れ
図。
FIG. 2 is a flowchart showing an access procedure of the EEPROM.

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

1 中央処理装置(CPU) 2 EEPROM 3 デコーダ 4 レジスタ 11 アドレスバス 12 データバス 13 読出し・書込み信号(RW) 14 リセット信号 15 キーコード(RXX) 16 書込み信号(WE) 17 読出し信号(RE)1 central processing unit (CPU) 2 EEPROM 3 decoder 4 register 11 address bus 12 data bus 13 read / write signal (RW) 14 reset signal 15 key code (R XX ) 16 write signal (WE) 17 read signal (RE)

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置、メモリ制御装置およびE
EPROMを備えた情報処理装置におけるEEPROM
書込み保護方法において、 前記メモリ制御装置は、前記中央処理装置からの書込み
を許可する特定信号を入力したときに、前記EEPRO
Mへの書込み信号を出力することを特徴とするEEPR
OM書込み保護方法。
1. Central processing unit, memory control unit and E
EEPROM in information processing device having EPROM
In the write protection method, the memory control device receives the specific signal from the central processing unit to permit writing, and the memory control device receives the EEPRO.
EEPR characterized by outputting a write signal to M
OM write protection method.
【請求項2】 中央処理装置と、この中央処理装置から
読出し・書込み可能なEEPROMと、このEEPRO
Mへの読出し・書込み信号を出力するメモリ制御装置と
を備えた情報処理装置において、 前記中央処理装置により設定され前記メモリ制御装置に
対して書込みを許可する特定信号を出力する特定信号発
生回路を備え、 前記メモリ制御装置は、前記特定信号を入力したときに
前記EEPROMへの書込信号を出力する手段を含むこ
とを特徴とする情報処理装置。
2. A central processing unit, an EEPROM readable / writable from the central processing unit, and this EEPROM.
In a data processing device including a memory control device for outputting a read / write signal to M, a specific signal generation circuit for outputting a specific signal set by the central processing unit and permitting writing to the memory control device is provided. The information processing apparatus, comprising: the memory control device including means for outputting a write signal to the EEPROM when the specific signal is input.
【請求項3】 前記メモリ制御装置はデコーダであり、
前記特定信号発生回路はレジスタである請求項2記載の
情報処理装置。
3. The memory controller is a decoder,
The information processing apparatus according to claim 2, wherein the specific signal generation circuit is a register.
JP4008709A 1992-01-21 1992-01-21 Eeprom write protecting method and information processor Pending JPH05197627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4008709A JPH05197627A (en) 1992-01-21 1992-01-21 Eeprom write protecting method and information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4008709A JPH05197627A (en) 1992-01-21 1992-01-21 Eeprom write protecting method and information processor

Publications (1)

Publication Number Publication Date
JPH05197627A true JPH05197627A (en) 1993-08-06

Family

ID=11700470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4008709A Pending JPH05197627A (en) 1992-01-21 1992-01-21 Eeprom write protecting method and information processor

Country Status (1)

Country Link
JP (1) JPH05197627A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08101798A (en) * 1994-09-30 1996-04-16 Nec Corp Backup data protection circuit
US5881002A (en) * 1997-09-29 1999-03-09 Mitsubishi Denki Kabushiki Kaisha Nonvolatile memory control circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08101798A (en) * 1994-09-30 1996-04-16 Nec Corp Backup data protection circuit
US5881002A (en) * 1997-09-29 1999-03-09 Mitsubishi Denki Kabushiki Kaisha Nonvolatile memory control circuit

Similar Documents

Publication Publication Date Title
JP3461234B2 (en) Data protection circuit
US6088262A (en) Semiconductor device and electronic equipment having a non-volatile memory with a security function
KR940002754B1 (en) Control method in a semiconductor integrated circuit device
EP0661642B1 (en) Microcomputer with memory read protection
KR920701981A (en) Digital sound source device and external memory cartridge used in it
JPH08124380A (en) Semiconductor memory and accessing method for semiconductor memory
JPH04219823A (en) Method and apparatus for protecting rom data
JPH05197627A (en) Eeprom write protecting method and information processor
JPS63305444A (en) Storage device
JPH0765586A (en) Access system for eeprom
JPS623520B2 (en)
JPH05225361A (en) Register rewriting system
JPH01123342A (en) Writing protecting circuit for memory
JPS595496A (en) Memory protect system
JP3039479B2 (en) Extended BIOS protection system
JP2684664B2 (en) Information processing device
JPH05198095A (en) Floppy disk controller
JPH01118974A (en) Card module
JPH0715641B2 (en) System parameter setting guard device
JP2002304329A (en) Semiconductor device
JPS6368948A (en) Data protecting system for ic card
JP2000207235A (en) Information processor
JPH04304540A (en) Semiconductor memory circuit
JPH0512892A (en) Nonvolatile memory device
JPH04367955A (en) Memory protecting system