JPH1185620A - Microcomputer with built-in non-volatile memory - Google Patents

Microcomputer with built-in non-volatile memory

Info

Publication number
JPH1185620A
JPH1185620A JP9247334A JP24733497A JPH1185620A JP H1185620 A JPH1185620 A JP H1185620A JP 9247334 A JP9247334 A JP 9247334A JP 24733497 A JP24733497 A JP 24733497A JP H1185620 A JPH1185620 A JP H1185620A
Authority
JP
Japan
Prior art keywords
signal
mode
circuit
data
write
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
JP9247334A
Other languages
Japanese (ja)
Inventor
Hirotake Hayashi
裕▲たけ▼ 林
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP9247334A priority Critical patent/JPH1185620A/en
Publication of JPH1185620A publication Critical patent/JPH1185620A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily and surely inhibit the third person from reading and writing memory data and to enable read or write in a test mode. SOLUTION: This microcomputer is provided with a security dedicated flash memory 6 for storing end signals 21, 22 and 23 based on plural kinds of write modes in respective prescribed bits, control part 1 for controlling plural kinds of write modes so as to respectively write data from the outside into a flash memory cell 10 and storing the end signals 21, 22 and 23 based on the respective write modes into the respective prescribed bits of the security dedicated flash memory 6 at the time of write end, NOR circuit 7, OR circuit 8 and tristate buffer 9 for inhibiting the write and read of data to the flash memory cell 10 based on the prescribed bits stored in the security dedicated flash memory 6 and a read inhibit cancel signal 42 outputted from the control part 1.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、不揮発性メモリを
内蔵し1チップからなる不揮発性メモリ内蔵マイクロコ
ンピュータに関し、特に、該不揮発性メモリのメモリデ
ータにおける第三者の読み出しを禁止するメモリデータ
保護に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer with a built-in nonvolatile memory and a one-chip nonvolatile memory, and more particularly to a memory data protection for preventing a third party from reading the memory data of the nonvolatile memory. It is about.

【0002】[0002]

【従来の技術】フラッシュメモリ等の不揮発性メモリを
内蔵した1チップマイクロコンピュータでは、例えば、
初期にプログラム等のデータをフラッシュメモリヘ書き
込む際には、以下に示す3種類の方法の何れか(以下、
「選択モード」という)とその選択モードに対する専用
ボードを使用することにより実現される。
2. Description of the Related Art In a one-chip microcomputer incorporating a nonvolatile memory such as a flash memory, for example,
When data such as a program is initially written to the flash memory, one of the following three methods (hereinafter, referred to as
"Selection mode") and a dedicated board for the selection mode.

【0003】上記選択モードには、例えば、外部のPR
OM(Programable Read Only Memory)ライタによるデー
タの書き込みを専用アダプタを使用して行うPROMモ
ードと、PROM等の外部メモリから内蔵フラッシュメ
モリヘ専用ボードを使用してデータのコピーを行うコピ
ーモードと、製品としてプリント基板に実装されたフラ
ッシュメモリを内蔵した1チップマイクロコンピュータ
デバイスに対してシリアルポート等を介して行うオンボ
ード書き込みモード(以下、「シリアル転送モード」と
いう)とがある。
The selection mode includes, for example, an external PR.
A PROM mode in which data is written by an OM (Programmable Read Only Memory) writer using a dedicated adapter, and a copy mode in which data is copied from an external memory such as a PROM to a built-in flash memory using a dedicated board, There is an on-board write mode (hereinafter, referred to as "serial transfer mode") in which a one-chip microcomputer device having a built-in flash memory mounted on a printed circuit board is connected via a serial port or the like.

【0004】上記の各選択モードにおいて、データをフ
ラッシュメモリヘ書き込むときには、各選択モードに合
致するアルゴリズムを内蔵しているプログラムが起動
し、CPUや動作に関連するコマンド等を認識する識別
制御回路、及び制御レジスタ等を介してフラッシュメモ
リヘのアクセスが行われ、書き込みが行われる。
In each of the above selection modes, when data is written to the flash memory, a program containing an algorithm corresponding to each selection mode is started, and an identification control circuit for recognizing the CPU, commands related to operations, and the like. Then, the flash memory is accessed via the control register and the like, and writing is performed.

【0005】ところで、上記選択モードにおいて、書き
込まれたメモリデータの機密保持を行う必要がある場合
には、その機密保持を実現するための機能、即ちメモリ
データの読み込み又は書き込みを禁止する機能を備えて
いなければならない。
In the selection mode, when it is necessary to keep the written memory data confidential, a function for realizing the confidentiality, that is, a function for inhibiting reading or writing of the memory data is provided. Must be.

【0006】従来の機密保持を実現するための機能とし
ては、次の4つが挙げられ、例えば特開平8−1377
57号公報に開示されている。
The following four functions are known as conventional functions for realizing confidentiality. For example, JP-A-8-1377
No. 57 is disclosed.

【0007】 PROMライタによるデータ書き込み
時に、セキュリティモード信号を設定し、セキュリティ
ビット信号の入力を行う。これにより、読み出し又は書
き込みが禁止となり、メモリデータの機密保持を図る。 PROMライタによるデータの書き込みを行う際
に、特定端子を設定する。これにより、PROMライタ
での再度の書き込み及び読み出しが不可能になる。 コピーモードによる書き込みにおいても、と同様
に、セキュリティモード信号を設定し、セキュリティビ
ット信号を入力する。これにより、読み出し又は書き込
みが禁止となりメモリデータの機密保護が図れる。 シリアル転送モードでは、所定のフォーマットに基
づき、プログラムにパスワードを予め設定し、ユーザプ
ログラム書き込み時にこのパスワードを入力する。これ
により、メモリデータの機密が保護される。
When data is written by a PROM writer, a security mode signal is set and a security bit signal is input. As a result, reading or writing is prohibited, and confidentiality of the memory data is maintained. A specific terminal is set when data is written by the PROM writer. This makes it impossible for the PROM writer to write and read again. In writing in the copy mode, a security mode signal is set and a security bit signal is input in the same manner as described above. As a result, reading or writing is prohibited, and security of memory data can be secured. In the serial transfer mode, a password is previously set in a program based on a predetermined format, and this password is input when writing a user program. Thereby, the confidentiality of the memory data is protected.

【0008】上記の機能を有する従来の不揮発性メモリ
を内蔵した1チップマイクロコンピュータのデータメモ
リ保護に対する具体的な概略構成例を図5に示す。
FIG. 5 shows a specific schematic configuration example for protecting a data memory of a one-chip microcomputer having a built-in nonvolatile memory having the above-described function.

【0009】同図に示すように、1チップマイクロコン
ピュータ80は、不揮発性メモリとしてのフラッシュメ
モリセル85を内蔵している。ここで、フラッシュメモ
リセル85におけるメモリデータの読み出し又は書き込
みを禁止するために、出力部81には、フラッシュメモ
リセル85のデータに対して読み出し及び/又は書き込
みを禁止とするモードを設定するためのセキュリティモ
ード信号91と、読み出し及び書き込みを設定するため
のセキュリティビット信号92とが入力される。
As shown in FIG. 1, the one-chip microcomputer 80 has a built-in flash memory cell 85 as a nonvolatile memory. Here, in order to prohibit reading or writing of memory data in the flash memory cell 85, the output unit 81 sets a mode for prohibiting reading and / or writing of data in the flash memory cell 85. A security mode signal 91 and a security bit signal 92 for setting reading and writing are input.

【0010】これら信号91・92は、High信号又
はLow信号により、通常、特定端子から出力部81に
入力される。
[0010] These signals 91 and 92 are normally input to the output unit 81 from a specific terminal by a High signal or a Low signal.

【0011】出力部81から出力された信号は、選択部
82にて選別されて記憶部83の特定ビットに記憶され
るが、セキュリティモード信号91とセキュリティビツ
ト信号92との両方に読み出し又は書き込みに対する所
定の信号が設定されていない場合には、データバス読み
出し制御回路84にてフラッシュメモリセル85のメモ
リデータ内容を読み出すことが可能な状態となってい
る。
The signal output from the output unit 81 is selected by the selection unit 82 and stored in a specific bit of the storage unit 83, and both the security mode signal 91 and the security bit signal 92 are used for reading or writing. When the predetermined signal is not set, the data bus read control circuit 84 can read the memory data content of the flash memory cell 85.

【0012】読み出し禁止又は/及び書き込み禁止の何
れであるかは、読み出し禁止若しくは書き込み禁止又は
読み出し及び書き込みの両方禁止のモードを決めるセキ
ュリティモード信号91で読み出す。
Whether the mode is read-inhibited and / or write-inhibited is read by a security mode signal 91 which determines a mode in which read-inhibition or write-inhibition or both read-out and write-inhibition modes are set.

【0013】そして、上記セキュリティモード信号91
による設定信号と、セキュリティビット信号92による
読み出し又は書き込みに対する信号とが入力されること
により、記憶部83からデータバス読み出し制御回路8
4に対して出力信号が出力されると共に、記憶部83か
らモード別書き込み読み出し部86に対してメモリ読み
出しの制御のための信号が出力され、これによって、フ
ラッシュメモリセル85への読み出し又は書き込みの禁
止が実現される。
The security mode signal 91
, And a signal for reading or writing by the security bit signal 92 are inputted, so that the data bus read control circuit 8
4 and a signal for controlling memory reading is output from the storage unit 83 to the mode-specific writing / reading unit 86, thereby reading or writing data to or from the flash memory cell 85. Prohibition is realized.

【0014】[0014]

【発明が解決しようとする課題】しかしながら、上記従
来の不揮発性メモリ内蔵マイクロコンピュータでは、メ
モリデータの機密保持の方法として、以下のような問題
点があった。
However, the above-mentioned conventional microcomputer with a built-in nonvolatile memory has the following problems as a method for maintaining the security of memory data.

【0015】の場合、書き込み時にセキュリティ
モード信号とセキュリティビット信号とを入力する等の
作業が必要となると共に、特定端子に所定の設定をする
必要がある等の書き込み操作以外の端子設定による作業
が必要となる。
In the case of writing, it is necessary to perform operations such as inputting a security mode signal and a security bit signal at the time of writing, and also to perform operations by terminal setting other than the writing operation such as a necessity of making predetermined settings to specific terminals. Required.

【0016】の場合、パスワードは固定となっている
ので、パスワードが見つけられると簡単にメモリ内容を
読み出される危険性がある。
In this case, since the password is fixed, there is a risk that if the password is found, the contents of the memory can be easily read.

【0017】ところで、不揮発性メモリの機密保持のた
めに、一律に絶対的な機密保持機構を設けたのでは、例
えば、メンテナンス等を行う場合において、サービスマ
ンがテストモード時にそのメモリの内容を読み出すこと
ができないという不都合が生じる。
By the way, if a non-volatile memory is provided with an absolute confidentiality maintaining mechanism for maintaining confidentiality, for example, when performing maintenance or the like, a serviceman reads out the contents of the memory in the test mode. The inconvenience of being unable to do so occurs.

【0018】本発明は、上記従来の問題点に鑑みなされ
たものであって、その目的は、第三者のメモリデータの
読み出し及び書き込みを簡便かつ確実に禁止する一方、
テストモード時の読み出し又は書き込みを可能とする不
揮発性メモリ内蔵マイクロコンピュータを提供すること
にある。
The present invention has been made in view of the above-mentioned conventional problems, and an object of the present invention is to simply and reliably prohibit reading and writing of memory data by a third party.
An object of the present invention is to provide a microcomputer with a built-in nonvolatile memory that enables reading or writing in a test mode.

【0019】[0019]

【課題を解決するための手段】請求項1に係る発明の不
揮発性メモリ内蔵マイクロコンピュータは、上記課題を
解決するために、不揮発性メモリを内蔵し、1チップか
らなる不揮発性メモリ内蔵マイクロコンピュータにおい
て、複数種類の書き込みモードによる終了信号を各所定
ビットに格納する不揮発性記憶手段と、外部からの上記
不揮発性メモリへのデータの複数種類の書き込みモード
による各書き込みを行うべく制御し、かつその書き込み
終了時に上記不揮発性記憶手段に対して、各書き込みモ
ードによる終了信号を各所定ビットに格納させる制御手
段と、上記不揮発性記憶手段に格納された所定ビット
と、上記制御手段から出力される読み出し禁止解除信号
とに基づき、上記不揮発性メモリへのデータの書き込み
及び読み出しを禁止する禁止手段とが設けられているこ
とを特徴としている。
According to a first aspect of the present invention, there is provided a microcomputer having a built-in non-volatile memory and comprising one chip of a non-volatile memory. A non-volatile storage means for storing end signals in a plurality of types of write modes in respective predetermined bits, and controlling to write data from the outside to the non-volatile memory in a plurality of types of write modes, and writing the data. Control means for causing the nonvolatile storage means to store an end signal in each write mode in each predetermined bit at the time of termination; predetermined bits stored in the nonvolatile storage means; and read inhibition output from the control means Prohibits writing and reading of data to and from the nonvolatile memory based on the release signal And inhibiting means is characterized in that provided that.

【0020】上記の発明によれば、不揮発性メモリにデ
ータを書き込むときには、制御手段が、外部からの不揮
発性メモリへのデータの複数種類の書き込みモードによ
る各書き込みを行うべく制御する。そして、不揮発性メ
モリへのデータの書き込みが終了すると、制御手段は、
その書き込み終了時に不揮発性記憶手段に対して、各書
き込みモードによる終了信号を各所定ビットに格納させ
る。
According to the above invention, when writing data to the nonvolatile memory, the control means controls to perform each write of data from the outside into the nonvolatile memory in a plurality of types of write modes. When the writing of the data to the nonvolatile memory is completed, the control unit
At the end of the writing, the non-volatile storage means stores an end signal in each writing mode in each predetermined bit.

【0021】次いで、禁止手段は、上記の不揮発性記憶
手段に格納された所定ビットと、上記制御手段から出力
される読み出し禁止解除信号とに基づいて、不揮発性メ
モリへのデータの書き込み及び読み出しを禁止する。
Next, the prohibition means writes and reads data to and from the non-volatile memory based on the predetermined bit stored in the non-volatile storage means and a read prohibition release signal output from the control means. Ban.

【0022】従って、不揮発性メモリへのデータの書き
込み及び読み出しは、書き込み終了時の終了信号と、制
御手段から出力される読み出し禁止解除信号とを制御す
ることにより禁止することが可能となる。
Therefore, the writing and reading of data to and from the nonvolatile memory can be inhibited by controlling the end signal at the end of writing and the read inhibition release signal output from the control means.

【0023】このため、第三者は、この終了信号を解除
するか又は読み出し禁止解除信号を解読するかしなけれ
ば、不揮発性メモリへのデータの書き込み及び読み出し
ができない。
Therefore, a third party cannot write or read data to or from the nonvolatile memory unless the end signal is released or the read inhibition release signal is decoded.

【0024】一方、上記の読み出し禁止解除信号は、不
揮発性メモリのデータ内容をメンテナンスすべく読み出
しを可能とするテストモード時のみ、サービスマンが指
示できるものとすることができる。
On the other hand, the read prohibition release signal can be instructed by a service person only in a test mode in which reading is possible to maintain the data content of the nonvolatile memory.

【0025】この結果、第三者のメモリデータの読み出
し及び書き込みを簡便かつ確実に禁止する一方、テスト
モード時の読み出し又は書き込みを可能とする不揮発性
メモリ内蔵マイクロコンピュータを提供することができ
る。
As a result, it is possible to provide a microcomputer with a built-in nonvolatile memory that can easily and reliably prohibit the reading and writing of the memory data of a third party while enabling the reading or writing in the test mode.

【0026】請求項2に係る発明の不揮発性メモリ内蔵
マイクロコンピュータは、上記課題を解決するために、
請求項1記載の不揮発性メモリ内蔵マイクロコンピュー
タにおいて、上記の禁止手段は、負論理和回路と、論理
和回路と、上記不揮発性メモリの読み出し及び書き込み
の出力をON/OFFするON/OFF回路とからな
り、上記負論理和回路には、上記不揮発性記憶手段から
出力される各所定ビットに基づく全ての書き込みモード
ロック信号が入力される一方、上記論理和回路には、上
記負論理和回路の出力信号と、上記読み出し禁止解除信
号と、不揮発性メモリのデータの実行時に制御手段から
出力される実動作モード信号とが入力されると共に、上
記の論理和回路の出力が上記ON/OFF回路に入力さ
れていることを特徴としている。
According to a second aspect of the present invention, there is provided a microcomputer with a built-in nonvolatile memory.
2. The microcomputer with built-in nonvolatile memory according to claim 1, wherein said prohibiting means includes a negative OR circuit, an OR circuit, and an ON / OFF circuit for turning on / off the read and write outputs of said nonvolatile memory. In the negative OR circuit, all the write mode lock signals based on the respective predetermined bits output from the nonvolatile storage means are input, while the OR circuit has the negative OR circuit of the negative OR circuit. An output signal, the read inhibit release signal, and an actual operation mode signal output from the control unit when executing data in the nonvolatile memory are input, and the output of the OR circuit is sent to the ON / OFF circuit. It is characterized by being input.

【0027】上記の発明によれば、負論理和回路には不
揮発性記憶手段から出力される各所定ビットに基づく全
ての書き込みモードロック信号が入力されるので、ある
一つの書き込みモードのものがHigh信号になってお
り、これによって、負論理和回路の出力はLow信号と
なる。
According to the above invention, all the write mode lock signals based on each predetermined bit output from the non-volatile storage means are input to the negative OR circuit. Therefore, the output of the negative OR circuit becomes a Low signal.

【0028】この負論理和回路の出力は論理和回路に入
力されると共に、論理和回路には、さらに、読み出し禁
止解除信号と、不揮発性メモリのデータの実行時に制御
手段から出力される実動作モード信号とが入力されてい
る。
The output of the negative OR circuit is input to the OR circuit, and the OR circuit further outputs a read inhibition release signal and an actual operation output from the control means when executing data in the nonvolatile memory. The mode signal is input.

【0029】ここで、読み出し禁止解除信号は、サービ
スマンが不揮発性メモリのメンテナンスをするときにの
みHigh信号となるが、通常はLow信号である。ま
た、実動作モード信号も、不揮発性メモリのデータの実
行時にのみHigh信号となり、通常は、Low信号で
ある。
Here, the read prohibition release signal becomes a High signal only when a service person performs maintenance of the nonvolatile memory, but is usually a Low signal. The actual operation mode signal is also a High signal only when executing data in the nonvolatile memory, and is usually a Low signal.

【0030】従って、論理和回路の出力はLow信号と
なり、これがON/OFF回路に入力されるので、不揮
発性メモリの出力はOFFとなって、不揮発性メモリを
読み出し又は書き込みできない状態となる。
Accordingly, the output of the OR circuit becomes a Low signal, which is input to the ON / OFF circuit, so that the output of the nonvolatile memory is turned off, and the nonvolatile memory cannot be read or written.

【0031】一方、サービスマンが不揮発性メモリのメ
ンテナンスをするときには、読み出し禁止解除信号はH
igh信号となるので、これによって、論理和回路の出
力はHigh信号となり、これがON/OFF回路に入
力されるので、不揮発性メモリの出力がONとなって、
不揮発性メモリの読み出し及び書き込みができる状態と
なる。
On the other hand, when the service person performs maintenance on the nonvolatile memory, the read inhibition release signal is set to H level.
Since the signal becomes a high signal, the output of the OR circuit becomes a high signal, which is input to the ON / OFF circuit, so that the output of the nonvolatile memory is turned on.
The nonvolatile memory is ready for reading and writing.

【0032】この結果、禁止手段を、負論理和回路、論
理和回路及びON/OFF回路という簡単な構成にて形
成することができる。
As a result, the prohibiting means can be formed with a simple configuration of a negative OR circuit, an OR circuit, and an ON / OFF circuit.

【0033】請求項3に係る発明の不揮発性メモリ内蔵
マイクロコンピュータは、上記課題を解決するために、
請求項1又は2記載の不揮発性メモリ内蔵マイクロコン
ピュータにおいて、上記の読み出し禁止解除信号は、上
記不揮発性メモリのデータ内容をメンテナンスすべく読
み出しを可能とするテストモード時に、制御手段に対し
て入力されるテストモード入力信号に基づき、制御手段
から出力されるものであることを特徴としている。
According to a third aspect of the present invention, there is provided a microcomputer with a built-in nonvolatile memory.
3. The microcomputer with built-in nonvolatile memory according to claim 1, wherein the read inhibition release signal is input to a control unit in a test mode in which reading is possible to maintain data contents of the nonvolatile memory. The test means is output from the control means based on a test mode input signal.

【0034】上記の発明によれば、読み出し禁止解除信
号は、不揮発性メモリのデータ内容をメンテナンスすべ
く読み出しを可能とするテストモード時に、制御手段に
対して入力されるテストモード入力信号に基づき、制御
手段から出力されるものである。
According to the above invention, the read inhibition release signal is generated based on the test mode input signal input to the control means in the test mode in which reading is possible to maintain the data contents of the nonvolatile memory. It is output from the control means.

【0035】このため、読み出し禁止解除信号を第三者
は操作することができない。この結果、第三者が不揮発
性メモリのデータを読み出し又は書き込みすることを確
実に禁止することができる。
Therefore, a third party cannot operate the read prohibition cancel signal. As a result, it is possible to reliably prohibit a third party from reading or writing data in the nonvolatile memory.

【0036】請求項4に係る発明の不揮発性メモリ内蔵
マイクロコンピュータは、上記課題を解決するために、
請求項3記載の不揮発性メモリ内蔵マイクロコンピュー
タにおいて、上記テストモード入力信号は、テストモー
ドであることを示すテストモード信号と、所定パルス幅
を有しかつ所定個数からなるパルスにて形成される入力
タイミング信号からなる一方、制御手段は、上記テスト
モード信号の所定タイミング内において、所定パルス幅
を有しかつ所定個数からなるパルスによる入力タイミン
グ信号が該制御手段に入力されたときに、真のテストモ
ードであることを認識して読み出し禁止解除信号を出力
することを特徴としている。
According to a fourth aspect of the present invention, there is provided a microcomputer with a built-in nonvolatile memory,
4. The microcomputer with built-in nonvolatile memory according to claim 3, wherein the test mode input signal is a test mode signal indicating a test mode, and an input formed of a predetermined number of pulses having a predetermined pulse width. On the other hand, when the control means receives an input timing signal having a predetermined pulse width and a predetermined number of pulses within the predetermined timing of the test mode signal, the control means performs a true test. It is characterized in that a read inhibition release signal is output upon recognition of the mode.

【0037】上記の発明によれば、読み出し禁止解除信
号は、サービスマンが制御手段に対して入力するテスト
モード入力信号によって制御手段から出力される。ま
た、テストモード入力信号は、テストモードであること
を示すテストモード信号と、所定パルス幅を有しかつ所
定個数からなるパルスにて形成される入力タイミング信
号との2つからなっている。
According to the above invention, the read prohibition release signal is output from the control means by the test mode input signal input to the control means by the service person. The test mode input signal includes two signals: a test mode signal indicating the test mode, and an input timing signal formed of a predetermined number of pulses having a predetermined pulse width.

【0038】さらに、これらテストモード信号及び入力
タイミング信号は、テストモード信号の所定タイミング
内において、所定パルス幅を有しかつ所定個数からなる
パルスによる入力タイミング信号が該制御手段に入力さ
れたときに、真のテストモードであることを制御手段が
認識し、これにより、制御手段は読み出し禁止解除信号
を出力するものとなっている。
Further, the test mode signal and the input timing signal are generated when an input timing signal having a predetermined pulse width and a predetermined number of pulses is input to the control means within a predetermined timing of the test mode signal. , The control means recognizes that the test mode is a true test mode, whereby the control means outputs a read prohibition release signal.

【0039】従って、サービスマンがテストモード時に
不揮発性メモリのデータの読み出し又は書き込みを行う
場合においても、このような複雑なテストモード入力信
号を採用しているので、第三者がこの条件に合致するテ
ストモード入力信号を入力して制御手段に読み出し禁止
解除信号を出力させることは、絶対に不可能である。
Therefore, even when a service person reads or writes data in the non-volatile memory in the test mode, since a complicated test mode input signal is employed, a third party can meet this condition. It is absolutely impossible to input a test mode input signal and output a read inhibition release signal to the control means.

【0040】この結果、第三者が不揮発性メモリのデー
タを読み出し又は書き込みすることを確実に禁止するこ
とができる。
As a result, it is possible to reliably prohibit a third party from reading or writing data in the nonvolatile memory.

【0041】[0041]

【発明の実施の形態】本発明の実施の一形態について図
1ないし図4に基づいて説明すれば、以下の通りであ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to FIGS.

【0042】本実施の形態の1チップマイクロコンピュ
ータは、図1に示すように、不揮発性メモリとしてのフ
ラッシュメモリセル10を内蔵すると共に、制御手段と
しての制御部1を備えている。
As shown in FIG. 1, the one-chip microcomputer according to the present embodiment includes a flash memory cell 10 as a nonvolatile memory and a control unit 1 as a control unit.

【0043】上記の制御部1は、フラッシュメモリセル
10ヘのアクセスを行うものであり、CPU(Central
Processing Unit)2とアルゴリズム内蔵部3と制御レジ
スタブロック4と識別制御回路5とからなっている。
The control unit 1 accesses the flash memory cell 10 and has a CPU (Central).
Processing unit 2, built-in algorithm unit 3, control register block 4, and identification control circuit 5.

【0044】アルゴリズム内蔵部3は、フラッシュメモ
リセル10に対して書き込み動作、読み出し動作及び消
去動作を行わせるためのプログラムを内蔵するものであ
る。
The algorithm built-in section 3 contains a program for causing the flash memory cell 10 to perform a write operation, a read operation and an erase operation.

【0045】ここで、書き込み動作等は、3種類の方法
(以下、「選択モード」という)の何れかを選択するこ
とにより行われる。この3種類の選択モードは、PRO
M(Programable Read Only Memory)モード、コピーモー
ド、及びオンボード書き込みモード(以下、「シリアル
転送モード」という)である。
Here, the writing operation or the like is performed by selecting one of three methods (hereinafter, referred to as "selection mode"). The three selection modes are PRO
An M (Programmable Read Only Memory) mode, a copy mode, and an on-board write mode (hereinafter, referred to as “serial transfer mode”).

【0046】上記のPROMモードとは、外部に設けら
れた図示しないPROMライタによりデータの書き込
み、消去及び読み出しを専用アダプタを使用して行うモ
ードである。
The PROM mode is a mode in which data is written, erased, and read by a PROM writer (not shown) provided externally using a dedicated adapter.

【0047】コピーモードは、PROM等の外部メモリ
から1チップマイクロコンピュータのフラッシュメモリ
セル10へ専用ボードを使用してデータのコピーを行う
モードである。
The copy mode is a mode in which data is copied from an external memory such as a PROM to the flash memory cell 10 of a one-chip microcomputer using a dedicated board.

【0048】また、シリアル転送モードは、製品として
プリント基板に実装されたフラッシュメモリセル10を
内蔵した1チップマイクロコンピュータデバイスに対し
てシリアルポート等を介して行うオンボード書き込みモ
ードである。
The serial transfer mode is an on-board write mode for performing, via a serial port or the like, a one-chip microcomputer device having a built-in flash memory cell 10 mounted on a printed circuit board as a product.

【0049】次に、上記の制御レジスタブロック4は、
上記CPU2が、フラッシュメモリセル10をアクセス
すべく、アルゴリズム内蔵部3に格納された書き込み、
読み出し及び消去プログラムを実行する際に使用される
レジスタである。
Next, the above-mentioned control register block 4
The CPU 2 writes data stored in the algorithm built-in unit 3 to access the flash memory cell 10,
This is a register used when executing a read and erase program.

【0050】識別制御回路5は、外部の例えば図示しな
いPROMライタからPROMライタインタフェイス信
号11を通して送られてくるコマンド、データ及び制御
データを認識する回路である。
The identification control circuit 5 is a circuit for recognizing commands, data and control data sent from an external PROM writer (not shown) through a PROM writer interface signal 11.

【0051】ここで、制御部1に対しては、外部から上
記のPROMライタインタフェイス信号11の他に、テ
ストモード入力信号としてのテストモード信号12と入
力タイミング信号13とが入力されるようになってい
る。
Here, in addition to the above-described PROM writer interface signal 11, a test mode signal 12 and an input timing signal 13 as test mode input signals are input to the control unit 1 from outside. Has become.

【0052】一方、1チップマイクロコンピュータに
は、外部からの第三者のフラッシュメモリセル10への
メモリデータの読み出しや書き込み及び消去を禁止する
ために使用される不揮発性記憶手段としてのセキュリテ
ィ専用フラッシュメモリ6が設けられている。このセキ
ュリティ専用フラッシュメモリ6は不揮発性メモリにて
なっており、各選択モードによるフラッシュメモリセル
10へのデータ格納の終了時に、そのフラッシュメモリ
セル10へのデータの読み出し等を禁止するために使用
すべく、制御部1から出力される終了信号としてのPR
OMモード終了信号21、コピーモード終了信号22、
シリアル転送モード終了信号23の情報を格納するよう
になっている。
On the other hand, the one-chip microcomputer has a security-dedicated flash as a non-volatile storage means used to prohibit reading, writing, and erasing of memory data from a third party to the flash memory cell 10 from the outside. A memory 6 is provided. The security-dedicated flash memory 6 is a non-volatile memory, and is used to prohibit reading data from the flash memory cell 10 when data storage in the flash memory cell 10 in each selection mode is completed. Therefore, PR as an end signal output from the control unit 1
OM mode end signal 21, copy mode end signal 22,
The information of the serial transfer mode end signal 23 is stored.

【0053】また、セキュリティ専用フラッシュメモリ
6には、上記のPROMモード終了信号21、コピーモ
ード終了信号22及びシリアル転送モード終了信号23
による格納情報を消去するためのメモリクリア信号24
が制御部1から入力されるようになっている。
The security-dedicated flash memory 6 has a PROM mode end signal 21, a copy mode end signal 22, and a serial transfer mode end signal 23.
Memory clear signal 24 for erasing stored information due to
Is input from the control unit 1.

【0054】上記のセキュリティ専用フラッシュメモリ
6からは、モードロック信号としてのPROMモードロ
ック信号31、コピーモードロック信号32及びシリア
ル転送モードロック信号33が出力されるようになって
おり、これら各信号31・32・33は、負論理和回路
(以下、「NOR回路」という)7に入力されると共
に、制御部1にフィードバックされるようになってい
る。
The security flash memory 6 outputs a PROM mode lock signal 31, a copy mode lock signal 32 and a serial transfer mode lock signal 33 as mode lock signals. 32 and 33 are inputted to a negative OR circuit (hereinafter referred to as a “NOR circuit”) 7 and fed back to the control unit 1.

【0055】上記NOR回路7は、PROMモードロッ
ク信号31、コピーモードロック信号32及びシリアル
転送モードロック信号33の何れかがHigh信号にな
るとLow信号のNOR信号7aを出力し、上記信号3
1・32・33の何れもがLow信号のときHigh信
号のNOR信号7aを出力する回路である。
When any one of the PROM mode lock signal 31, the copy mode lock signal 32 and the serial transfer mode lock signal 33 becomes a High signal, the NOR circuit 7 outputs a NOR signal 7a of a Low signal, and outputs the signal 3
This is a circuit that outputs a NOR signal 7a of a High signal when any of 1, 32, and 33 is a Low signal.

【0056】次に、上記のNOR信号7aは、論理和回
路(以下、「OR回路」という)8に入力されると共
に、OR回路8には、実動作モード信号41及び読み出
し禁止解除信号42が入力されるようになっている。
Next, the NOR signal 7a is input to an OR circuit (hereinafter, referred to as an "OR circuit") 8, and the OR circuit 8 receives an actual operation mode signal 41 and a read inhibition release signal 42. Is to be entered.

【0057】実動作モード信号41は、制御部1がフラ
ッシュメモリセル10に格納されたプログラムを実行す
るときに、フラッシュメモリセル10のプログラムの読
み出しを指示するための信号である。また、読み出し禁
止解除信号42は、フラッシュメモリセル10に格納さ
れたプログラムのメンテナンス等を行う場合において、
サービスマンがテストすべくそのメモリの内容を読み書
きする際に、制御部1に前記テストモード信号12及び
入力タイミング信号13を入力したときに、制御部1か
らOR回路8に出力される信号である。
The actual operation mode signal 41 is a signal for instructing reading of the program of the flash memory cell 10 when the control unit 1 executes the program stored in the flash memory cell 10. The read inhibition release signal 42 is used when performing maintenance or the like of a program stored in the flash memory cell 10.
This signal is output from the control unit 1 to the OR circuit 8 when the test mode signal 12 and the input timing signal 13 are input to the control unit 1 when a serviceman reads and writes the contents of the memory for testing. .

【0058】上記のOR回路8では、NOR信号7a、
実動作モード信号41又は読み出し禁止解除信号42の
何れかがHigh信号になるとHigh信号のOR信号
8aを出力し、上記各信号7a・41・42の何れもが
Low信号のときLow信号のOR信号8aを出力す
る。
In the OR circuit 8, the NOR signal 7a,
When either the actual operation mode signal 41 or the read inhibition release signal 42 becomes a High signal, the OR signal 8a of the High signal is output. When all of the signals 7a, 41, and 42 are the Low signals, the OR signal of the Low signal is output. 8a is output.

【0059】上記のOR信号8aは、ON/OFF回路
としてのトライステートバッファ9に入力されており、
これによって、トライステートバッファ9にHigh信
号が入力されたときに、フラッシュメモリセル10のメ
モリの内容が読み出し又は書き込み及び消去が行われる
ようになっている。
The above OR signal 8a is input to a tristate buffer 9 as an ON / OFF circuit.
Thus, when a High signal is input to the tri-state buffer 9, the contents of the memory of the flash memory cell 10 are read, written, and erased.

【0060】この結果、NOR回路7、OR回路8及び
トライステートバッファ9とによって禁止手段が形成さ
れている。
As a result, the NOR circuit 7, the OR circuit 8, and the tri-state buffer 9 form the inhibiting means.

【0061】上記の構成を有する1チップマイクロコン
ピュータにおける各書き込みの選択モードによるセキュ
リティの動作を説明する。最初にPROMモードについ
て説明する。
The security operation in each write selection mode in the one-chip microcomputer having the above configuration will be described. First, the PROM mode will be described.

【0062】PROMモードにおける書き込みの動作時
には、先ず、外部に設けられた図示しないPROMライ
タから出力されるPROMライタインタフェイス信号1
1に含まれるコマンド、データ及び制御データの認識を
識別制御回路5にて行う。これにより、データ書き込み
コマンドに対する処理が制御部1にて実行され、フラッ
シュメモリセル10にデータが書き込まれる。
At the time of a write operation in the PROM mode, first, a PROM writer interface signal 1 output from a PROM writer (not shown) provided outside is provided.
The identification control circuit 5 recognizes the command, data, and control data included in the information. As a result, the processing for the data write command is executed by the control unit 1, and the data is written to the flash memory cell 10.

【0063】次いで、フラッシュメモリセル10への最
後のデータの書き込み終了後、制御部1から、PROM
モード終了信号21をHigh信号としてセキュリティ
専用フラッシュメモリ6へ出力させる。
Then, after the end of writing the last data to the flash memory cell 10, the control unit 1
The mode end signal 21 is output to the security flash memory 6 as a High signal.

【0064】このとき、コピーモード終了信号22及び
シリアル転送モード終了信号23は、PROMモードの
みがアクティブで実行されたので、非アクティブとなっ
ており、これによって、コピーモード終了信号22及び
シリアル転送モード終了信号23には、何れもLow信
号が出力される。そして、上記のPROMモード終了信
号21のHigh信号、並びにコピーモード終了信号2
2及びシリアル転送モード終了信号23のLow信号
が、それぞれの終了信号としてセキュリティ専用フラッ
シュメモリ6に記憶される。
At this time, the copy mode end signal 22 and the serial transfer mode end signal 23 are inactive because only the PROM mode is active and executed. As the end signal 23, a low signal is output. Then, the High signal of the PROM mode end signal 21 and the copy mode end signal 2
2 and the Low signal of the serial transfer mode end signal 23 are stored in the security flash memory 6 as respective end signals.

【0065】次いで、セキュリティ専用フラッシュメモ
リ6から、PROMモードロック信号31のみHigh
信号が出力され、コピーモードロック信号32及びシリ
アル転送モードロック信号33は何れもLow信号が出
力される。
Next, only the PROM mode lock signal 31 from the security flash memory 6 is set to High.
A signal is output, and both the copy mode lock signal 32 and the serial transfer mode lock signal 33 output a Low signal.

【0066】これら信号31・32・33は、PROM
モードロック信号31のみHigh信号の出力となって
いるので、NOR回路7の出力であるNOR信号7aは
Low信号となり、OR回路8へ入力される。
These signals 31, 32, and 33 are output from the PROM
Since only the mode lock signal 31 is a High signal output, the NOR signal 7a output from the NOR circuit 7 becomes a Low signal and is input to the OR circuit 8.

【0067】一方、OR回路8による残り2つの入力信
号のうちの一方の実動作モード信号41は、ユーザプロ
グラムが起動する信号であるので、書き込みモード時に
はLow信号となっている。
On the other hand, one actual operation mode signal 41 of the remaining two input signals from the OR circuit 8 is a signal for activating the user program, and is therefore a Low signal in the write mode.

【0068】また、OR回路8への第3番目の入力信号
である読み出し禁止解除信号42もテストモード設定に
よる制御がなされたときのみアクティブのHigh信号
となる信号であるので、PROMモード時では、読み出
し禁止解除信号42はディセーブルなLow信号となっ
ている。
Also, the read inhibit release signal 42, which is the third input signal to the OR circuit 8, is a signal that becomes an active high signal only when control is performed by setting the test mode. Therefore, in the PROM mode, The read inhibition release signal 42 is a disabled Low signal.

【0069】これら信号7a・41・42が入力される
OR回路8では、Low信号がOR信号8aとして出力
され、トライステートバッファ9のコントロールゲート
に入力されるので、トライステートバッファ9の出力は
フローティング状態になる。
In the OR circuit 8 to which these signals 7a, 41 and 42 are input, the Low signal is output as the OR signal 8a and input to the control gate of the tri-state buffer 9, so that the output of the tri-state buffer 9 is floating. State.

【0070】この結果、フラッシュメモリセル10のデ
ータを書き込んだ後は、フラッシュメモリセル10のデ
ータを第三者がPROMライタから読み出すことは不可
能となる。
As a result, after writing the data in the flash memory cell 10, it becomes impossible for a third party to read the data in the flash memory cell 10 from the PROM writer.

【0071】また、このPROMモードで書き込まれた
メモリデータ内容をPROMモード以外のコピーモード
又はシリアル転送モードにて読み出すことも不可能とな
る。
Further, it becomes impossible to read out the contents of the memory data written in the PROM mode in a copy mode or a serial transfer mode other than the PROM mode.

【0072】即ち、コピーモード又はシリアル転送モー
ドにて読み出そうとしても、セキュリティ専用フラッシ
ュメモリ6からのPROMモードロック信号31がHi
gh信号となり、これにより、NOR信号7aがLow
信号となっている。この結果、実動作モード信号41
は、書き込みの選択モード時には必ずLow信号である
ので、読み出し禁止解除信号42がアクティブなHig
h信号にならない限り、OR信号8aはHigh信号に
ならないためである。
That is, even if an attempt is made to read data in the copy mode or the serial transfer mode, the PROM mode lock signal 31 from the security flash memory 6 becomes Hi.
gh signal, so that the NOR signal 7a becomes Low.
Signal. As a result, the actual operation mode signal 41
Is always a Low signal in the write selection mode, so that the read inhibit release signal 42 is active High.
This is because the OR signal 8a does not become a High signal unless it becomes an h signal.

【0073】尚、このPROMモードにおいて、フラッ
シュメモリセル10に対して、新たに書き込みや消去を
行う際は、PROMモードに対するメモリクリア信号2
4がセキュリティ専用フラッシュメモリ6に出力され、
セキュリティ専用フラッシュメモリ6のPROMモード
に対するビットをクリアしてから、PROMモード時の
書き込み動作が行われる。即ち、セキュリティ専用フラ
ッシュメモリ6のPROMモードに対するビットをクリ
アすることにより、PROMモードロック信号31はL
ow信号となり、これによって、ロック信号31・32
・33の何れもがLow信号となり、NOR信号7aは
High信号となる。従って、OR信号8aがHigh
信号となり、トライステートバッファ9がアクティブ状
態となり、フラッシュメモリセル10に対して書き込み
等が可能な状態となる。
In the PROM mode, when newly writing or erasing the flash memory cell 10, the memory clear signal 2 for the PROM mode is used.
4 is output to the security flash memory 6,
After the bit for the PROM mode of the security flash memory 6 is cleared, a write operation in the PROM mode is performed. That is, by clearing the bit for the PROM mode of the security flash memory 6, the PROM mode lock signal 31 becomes L level.
ow signal, whereby the lock signals 31 and 32
Each of 33 becomes a Low signal, and the NOR signal 7a becomes a High signal. Therefore, the OR signal 8a becomes High.
As a result, the tri-state buffer 9 becomes active, and the flash memory cell 10 is ready for writing.

【0074】次に、コピーモードによる書き込みの選択
モードについて説明する。
Next, the write selection mode in the copy mode will be described.

【0075】コピーモードにおける書き込みの動作時に
は、PROMモード時と同様、最後のデータ書き込み終
了後、制御部1からコピーモード終了信号22をHig
h信号として出力させる。このとき、PROMモード終
了信号21及びシリアル転送モード終了信号23は、コ
ピーモードがアクティブにて実行されるので、非アクテ
ィブとなり、何れもLow信号が出力され、セキュリテ
ィ専用フラッシュメモリ6にてそれぞれの終了信号が記
憶される。
In the write operation in the copy mode, the control unit 1 sends a copy mode end signal 22 to the high level after the end of the last data write, as in the PROM mode.
Output as the h signal. At this time, the PROM mode end signal 21 and the serial transfer mode end signal 23 become inactive because the copy mode is executed, so that a Low signal is output, and the security dedicated flash memory 6 ends each of them. The signal is stored.

【0076】次いで、セキュリティ専用フラッシュメモ
リ6の出力信号として、コピーモードロック信号32が
High信号、PROMモードロック信号31がLow
信号、及びシリアル転送モードロック信号33がLow
信号としてそれぞれ出力される。
Next, as output signals of the security flash memory 6, the copy mode lock signal 32 is a high signal, and the PROM mode lock signal 31 is a low signal.
Signal and the serial transfer mode lock signal 33 are Low.
Each is output as a signal.

【0077】これら信号31・32・33は、コピーモ
ードロック信号32の出力がHigh信号であるので、
NOR回路7からのNOR信号7aはLow信号として
OR回路8へ入力される。
These signals 31, 32, and 33 are output because the output of the copy mode lock signal 32 is a high signal.
The NOR signal 7a from the NOR circuit 7 is input to the OR circuit 8 as a Low signal.

【0078】OR回路8による残り2つの入力信号は、
PROMモード時と同様に、実動作モード信号41がL
ow信号であり、読み出し禁止解除信号42もこのコピ
ーモード時ではディセーブルなLow信号である。
The remaining two input signals from the OR circuit 8 are
As in the PROM mode, the actual operation mode signal 41 is low.
The read inhibition release signal 42 is a low signal which is disabled in the copy mode.

【0079】従って、これら信号7a・41・42が入
力されるOR回路8は、Low信号のOR信号8aが出
力され、トライステートバッファ9のコントロールゲー
トに入力される。このため、トライステートバッファ9
の出力はフローティング状態になり、フラッシュメモリ
セル10のデータをデータバス上に出力できない。
Accordingly, the OR circuit 8 to which these signals 7a, 41, and 42 are input outputs the OR signal 8a of the Low signal and inputs the signal to the control gate of the tri-state buffer 9. Therefore, the tri-state buffer 9
Is in a floating state, and the data of the flash memory cell 10 cannot be output onto the data bus.

【0080】また、このコピーモードにて書き込まれた
メモリデータ内容をコピーモード以外のPROMモード
又はシリアル転送モードにて読み出すことも、前記PR
OMモードと同じ理由によって不可能となる。
The memory data written in the copy mode can be read in a PROM mode other than the copy mode or in a serial transfer mode.
This is impossible for the same reason as in the OM mode.

【0081】また、新たにこのコピーモードにて、フラ
ッシュメモリセル10への書き込み又は消去を行う際
は、メモリクリア信号24が制御部1から出力され、セ
キュリティ専用フラッシュメモリ6のコピーモードに対
するビットをクリアしてから、コピーモード時の書き込
み動作が行われる。
When writing or erasing data to or from the flash memory cell 10 in this copy mode, a memory clear signal 24 is output from the control unit 1 and the bit for the copy mode of the security flash memory 6 is set. After clearing, a write operation in the copy mode is performed.

【0082】最後に、シリアル転送モードにおける書き
込みの選択モードについて説明する。
Finally, the write selection mode in the serial transfer mode will be described.

【0083】シリアル転送モード時においても、前述し
たと同様に、最後のデータ書き込み終了後、制御部1か
らシリアル転送モード終了信号23をHigh信号とし
て出力させる。このとき、PROMモード終了信号21
及びコピーモード終了信号22は、シリアル転送モード
がアクティブで実行されるので何れも非アクティブとな
ってLow信号がそれぞれ出力され、セキュリティ専用
フラッシュメモリ6に各終了信号21・22・23が記
憶される。
Also in the serial transfer mode, the controller 1 outputs the serial transfer mode end signal 23 as a High signal after the end of the last data writing, as described above. At this time, the PROM mode end signal 21
Since the serial transfer mode is active and executed, the copy mode end signal 22 becomes inactive and a low signal is output, and the end signals 21, 22 and 23 are stored in the security flash memory 6. .

【0084】そして、セキュリティ専用フラッシュメモ
リ6からは、シリアル転送モードロック信号33がHi
gh信号、PROMモードロック信号31がLow信
号、及びコピーモードロック信号32がLow信号とし
て出力される。
Then, the serial transfer mode lock signal 33 is output from the security flash memory 6 to Hi.
The gh signal, the PROM mode lock signal 31 is output as a Low signal, and the copy mode lock signal 32 is output as a Low signal.

【0085】これら信号31・32・33は、シリアル
転送モードロック信号33の出力がHigh信号となっ
ているので、NOR回路7の出力であるNOR信号7a
をLow信号としてOR回路8に入力させる。
Since the output of the serial transfer mode lock signal 33 is a High signal, the NOR signal 7a, which is the output of the NOR circuit 7,
Is input to the OR circuit 8 as a Low signal.

【0086】OR回路8への残り2つの入力信号は、前
述のPROMモード及びコピーモード時と同様に、実動
作モード信号41がLow信号であり、読み出し禁止解
除信号42もこのシリアル転送モード時ではディセーブ
ルなLow信号である。
The remaining two input signals to the OR circuit 8 are, as in the PROM mode and the copy mode, the actual operation mode signal 41 is a Low signal, and the read inhibition release signal 42 is also in the serial transfer mode. This is a disabled Low signal.

【0087】従って、これら信号7a・41・42が入
力されるOR回路8は、Low信号がOR信号8aとし
て出力され、トライステートバッファ9のコントロール
ゲートに入力される。このため、トライステートバッフ
ァ9の出力はフローティング状態になりフラッシュメモ
リセル10のデータをデータバス上に出力できない。
Therefore, the OR circuit 8 to which these signals 7a, 41, and 42 are input outputs the Low signal as the OR signal 8a and inputs it to the control gate of the tri-state buffer 9. For this reason, the output of the tri-state buffer 9 is in a floating state, and the data of the flash memory cell 10 cannot be output on the data bus.

【0088】以上の動作により、各書き込みの選択モー
ドの何れにおいても、フラッシュメモリセル10のメモ
リデータは、読み出し及び書き込みが禁止される状態と
なる。
By the above operation, reading and writing of the memory data of the flash memory cell 10 are prohibited in any of the write selection modes.

【0089】一方、このような各書き込みの選択モード
によるメモリデータ内容の読み出し禁止状態を唯一解除
する動作として、本実施の形態では、テストモード信号
12と入力タイミング信号13とを特定端子に割り当て
て必要信号を入力するテストモードが用意されている。
従って、フラッシュメモリセル10に格納されたプログ
ラムのメンテナンス時においては、このテストモード状
態からアルゴリズム内蔵部3の起動による読み出し禁止
解除ルーチンヘ移行してその動作が行われる。
On the other hand, in the present embodiment, the test mode signal 12 and the input timing signal 13 are assigned to specific terminals as the only operation to release the read prohibition state of the memory data contents in each write selection mode. A test mode for inputting necessary signals is provided.
Therefore, at the time of maintenance of the program stored in the flash memory cell 10, the operation shifts from the test mode state to the read prohibition release routine by the activation of the built-in algorithm unit 3, and the operation is performed.

【0090】この読み出し禁止解除ルーチンにおける動
作について、図2のタイミングチャート、及び図3のフ
ローチャートに基づいて説明する。
The operation in the read prohibition releasing routine will be described with reference to the timing chart of FIG. 2 and the flowchart of FIG.

【0091】先ず、図2に示すように、本実施の形態に
おいては、テストモードと認識されるテストモード信号
12の入力信号TESTtと、パルスTtの入力タイミ
ング信号13とが同時に入力されなければ、読み出し禁
止解除ルーチンの内蔵されているアルゴリズム内蔵部3
に起動がかからないようになっている。
First, as shown in FIG. 2, in the present embodiment, if the input signal TESTt of the test mode signal 12 recognized as the test mode and the input timing signal 13 of the pulse Tt are not input simultaneously, Algorithm built-in section 3 with built-in read prohibition release routine
Is not started.

【0092】そして、上記のテストモード信号12の入
力信号TESTtと、パルスTtの入力タイミング信号
13とが同時に入力されると、このテストモード状態が
制御部1で認識され、アルゴリズム内蔵部3内の読み出
し禁止解除ルーチンヘ移行される。
When the input signal TESTt of the test mode signal 12 and the input timing signal 13 of the pulse Tt are input simultaneously, the test mode state is recognized by the control unit 1 and The process proceeds to the read inhibition release routine.

【0093】上記の読み出し禁止解除ルーチンでは、図
3のフローチャートに示すように、先ず、書き込みモー
ドが判別される(S1)。
In the read prohibition releasing routine, as shown in the flowchart of FIG. 3, first, the write mode is determined (S1).

【0094】次いで、テストモード信号12におけるタ
イミングAt期間のHigh信号、タイミングBt期間
のLow信号及びタイミングCt期間のHigh信号の
各期間内での入力タイミング信号13の数とパルス幅と
が同時にモニタリングされる。
Next, the number and pulse width of the input timing signals 13 in each of the High signal in the timing At period, the Low signal in the timing Bt period, and the High signal in the timing Ct period in the test mode signal 12 are simultaneously monitored. You.

【0095】具体的には、テストモード信号12におけ
るタイミングAt期間のHigh信号内において入力タ
イミング信号13におけるパルス幅atのパルスが2個
あるか否かが判断される(S2)。
Specifically, it is determined whether or not there are two pulses of the pulse width at in the input timing signal 13 in the High signal in the timing At period in the test mode signal 12 (S2).

【0096】この2個のパルス以外の入力信号であると
判断されると、その時点でS1に戻って、テストモード
信号12と入力タイミング信号13とを再度設定しなけ
ればならない。
If it is determined that the input signal is other than the two pulses, the process returns to S1 at that point and the test mode signal 12 and the input timing signal 13 must be set again.

【0097】同様にして、テストモード信号12におけ
るタイミングBt期間のLow信号内において入力タイ
ミング信号13におけるパルス幅atのパルスが3個あ
るか否かが判断され(S3)、さらに、テストモード信
号12におけるタイミングCt期間のHigh信号内に
おいて入力タイミング信号13におけるパルス幅atの
Highパルスが4個あるか否かが判断される(S
4)。
Similarly, it is determined whether there are three pulses of the pulse width at in the input timing signal 13 in the Low signal of the timing Bt period in the test mode signal 12 (S3). It is determined whether there are four High pulses of the pulse width at in the input timing signal 13 in the High signal of the timing Ct period in (S).
4).

【0098】そして、これらタイミングBt期間及びタ
イミングCt期間についても所定期間内に入力タイミン
グ信号13としてパルス幅atのHighパルスが所定
回数分入って来なければ、何れもS1に戻り、いつまで
立っても読み出し禁止解除ルーチンによるメモリデータ
の読み出しは不可能となる。
If the High pulse having the pulse width at as the input timing signal 13 does not enter the predetermined number of times as the input timing signal 13 within the predetermined period also in the timing Bt period and the timing Ct period, the process returns to S1 and continues forever. Reading of memory data by the read prohibition release routine becomes impossible.

【0099】このように各書き込み選択モード状態並び
に所定期間内のテストモード信号12の状態と入力タイ
ミング信号13とが解析されて、テストモード状態であ
ることを判別した後、セキュリティ専用フラッシュメモ
リ6からの出力信号であるPROMモードロック信号3
1、コピーモードロック信号32及びシリアル転送モー
ドロック信号33の何れかのHigh信号が判断され、
メモリクリア信号24にて該当する各書き込みモードに
対するビットのクリアが行われると同時に、読み出し禁
止解除信号42をHigh信号とする制御が行われる
(S5)。
As described above, the state of each write selection mode, the state of the test mode signal 12 within a predetermined period, and the input timing signal 13 are analyzed to determine the test mode state. PROM mode lock signal 3 which is the output signal of
1. Any one of the High signal of the copy mode lock signal 32 and the serial transfer mode lock signal 33 is determined,
At the same time that the bit for each applicable write mode is cleared by the memory clear signal 24, control for setting the read inhibition release signal 42 to a High signal is performed (S5).

【0100】これによって、該当していた書き込み選択
モードのロック信号はLow信号が出力されてNOR信
号7aはHigh信号となる。また、実動作モード信号
41は非アクティブな状態としてのLow信号であり、
かつ読み出し禁止解除信号42はHigh信号である。
従って、OR回路8による出力であるOR信号8aはH
igh信号となる。このため、トライステートバッファ
9のコントロールゲートがアクティブになるので、メモ
リデータの内容が読み出し可能となる。
As a result, a Low signal is output as the lock signal of the corresponding write selection mode, and the NOR signal 7a becomes a High signal. The actual operation mode signal 41 is a low signal as an inactive state,
In addition, the read inhibition release signal 42 is a High signal.
Therefore, the OR signal 8a output from the OR circuit 8 is high.
It becomes an high signal. Therefore, the control gate of the tri-state buffer 9 becomes active, so that the contents of the memory data can be read.

【0101】最後に、図4における読み出し禁止ルーチ
ンのフローチャートに示すように、該当していた書き込
み選択モードが何れであるかを判別した後(S11〜S
13)、その終了信号にHigh信号を再度出力させる
と共に、読み出し禁止解除信号42としてLow信号を
出力させる(S14)。
Finally, as shown in the flowchart of the read prohibition routine in FIG. 4, after determining which write selection mode is applicable (S11 to S11).
13) The High signal is output again as the end signal, and the Low signal is output as the read inhibition release signal 42 (S14).

【0102】これにより、このテストモード時の実動作
モード信号41は、非アクティブであるためLow信号
となっており、OR回路8に入力される信号7a・41
・42の何れもがLow信号であるので、OR回路8か
らLow信号のOR信号8aが出力される。このため、
トライステートバッファ9がフローティング状態とな
り、フラッシュメモリセル10のメモリデータの読み出
しが不可能になる。
As a result, the actual operation mode signal 41 in the test mode is a low signal because it is inactive, and the signals 7a and 41 input to the OR circuit 8 are output.
Since all of the signals 42 are Low signals, the OR circuit 8 outputs the OR signal 8a of the Low signal. For this reason,
The tri-state buffer 9 enters a floating state, so that reading of memory data from the flash memory cell 10 becomes impossible.

【0103】尚、本実施の形態においては、図3のフロ
ーチャートに示す読み出し禁止解除ルーチンのS5にお
いて、メモリクリア信号24にてセキュリティ専用フラ
ッシュメモリ6の該当する各書き込みモードに対するビ
ットのクリアを行っているが、これは必ず必要であると
いうものではない。なぜなら、OR回路8に入力される
3つの入力信号の内、少なくとも1つの信号がHigh
信号となれば、OR信号8aはHigh信号となり、ト
ライステートバッファ9は読み出し可能状態となるの
で、読み出し禁止解除信号42がHigh信号であれ
ば、その条件を満足するためである。
In this embodiment, in S5 of the read prohibition release routine shown in the flowchart of FIG. 3, the bit for each of the corresponding write modes of the security flash memory 6 is cleared by the memory clear signal 24. However, this is not absolutely necessary. This is because at least one of the three input signals input to the OR circuit 8 is High.
If the signal becomes a signal, the OR signal 8a becomes a High signal and the tristate buffer 9 becomes a readable state. Therefore, if the read inhibition release signal 42 is a High signal, the condition is satisfied.

【0104】但し、実際問題としては、最終的な書き込
み選択モードが何であるかを分かるようにしておくのが
好ましいので、本実施の形態では、セキュリティ専用フ
ラッシュメモリ6の該当する各書き込みモードに対する
ビットは、何れかの選択モードの1つを残すようにして
いる。
However, as a practical matter, it is preferable to know what the final write selection mode is. Therefore, in this embodiment, the bit for each corresponding write mode of the security flash memory 6 is set. Is to leave one of the selection modes.

【0105】以上説明したように、各書き込み選択モー
ドの際、セキュリティ専用フラッシュメモリ6ヘデータ
書き込み終了信号を記憶させ、このセキュリティ専用フ
ラッシュメモリ6から出力される各選択モードのロック
信号とテストモードによるメモリデータの読み出し可能
にする信号とを制御し、書き込み選択モードの最終デー
タを書き込み後、自動的に読み出しを禁止でき、唯一メ
モリ内容を読み出すことのできるテストモードのみによ
るテストモード状態の入力タイミングからメモリ読み出
し禁止解除ルーチンへの移行による識別が行われるの
で、他者が容易にメモリデータの内容を読み出すことが
不可能になる。
As described above, in each write selection mode, a data write end signal is stored in the security flash memory 6, and the lock signal of each selection mode output from the security flash memory 6 and the memory in the test mode are used. After the last data of the write selection mode is written, the read operation can be automatically inhibited after the last data in the write selection mode has been written. Since the identification is performed by shifting to the read prohibition release routine, it becomes impossible for another person to easily read the contents of the memory data.

【0106】従って、単なるセキュリティのモードの設
定ではなく、不法解除を防ぐためテストモード時に入力
する信号のタイミングや個数によりメモリデータ読み出
し機能と読み出し禁止を行うのでセキュリティが確実に
行える。
Therefore, the memory data read function and read prohibition are performed based on the timing and the number of signals input in the test mode in order to prevent illegal release, rather than merely setting the security mode, so that security can be ensured.

【0107】このように、本実施の形態の不揮発性メモ
リ内蔵マイクロコンピュータでは、フラッシュメモリセ
ル10にデータを書き込むときには、制御部1が、外部
からのフラッシュメモリセル10へのデータの複数種類
の書き込みモード、即ちPROMモード、コピーモード
又はシリアル転送モードによる各書き込みを行うべく制
御する。そして、フラッシュメモリセル10へのデータ
の書き込みが終了すると、制御部1は、その書き込み終
了時にセキュリティ専用フラッシュメモリ6に対して、
各書き込みモードによる終了信号を各所定ビットに格納
させる。
As described above, in the microcomputer with a built-in nonvolatile memory according to the present embodiment, when writing data to the flash memory cell 10, the control unit 1 writes a plurality of types of data from the outside to the flash memory cell 10. Control is performed to perform each write in a mode, that is, a PROM mode, a copy mode, or a serial transfer mode. When the writing of the data to the flash memory cell 10 is completed, the control unit 1 sends the data to the security flash memory 6 at the end of the writing.
An end signal in each write mode is stored in each predetermined bit.

【0108】次いで、禁止手段としてのNOR回路7、
OR回路8及びトライステートバッファ9は、セキュリ
ティ専用フラッシュメモリ6に格納された所定ビット
と、制御部1から出力される読み出し禁止解除信号42
とに基づいて、フラッシュメモリセル10へのデータの
書き込み及び読み出しを禁止する。
Next, a NOR circuit 7 as a prohibiting means,
The OR circuit 8 and the tri-state buffer 9 are provided with a predetermined bit stored in the dedicated security flash memory 6 and a read inhibition release signal 42 output from the control unit 1.
And writing and reading of data to and from the flash memory cell 10 are prohibited.

【0109】従って、セキュリティ専用フラッシュメモ
リ6へのデータの書き込み及び読み出しは、書き込み終
了時のPROMモード終了信号21、コピーモード終了
信号22及びシリアル転送モード終了信号23と、制御
部1から出力される読み出し禁止解除信号42とを制御
することにより禁止することが可能となる。
Therefore, the writing and reading of data to and from the security flash memory 6 are output from the control unit 1 and the PROM mode end signal 21, the copy mode end signal 22 and the serial transfer mode end signal 23 at the end of writing. By controlling the read prohibition release signal 42, the prohibition can be achieved.

【0110】このため、第三者は、この終了信号21・
22・23を解除するか又は読み出し禁止解除信号42
を解読するかしなければ、フラッシュメモリセル10へ
のデータの書き込み及び読み出しができない。
For this reason, the third party sends the end signal 21.
22 or 23 or read inhibit release signal 42
, Data cannot be written to or read from the flash memory cell 10.

【0111】一方、読み出し禁止解除信号42は、フラ
ッシュメモリセル10のデータ内容をメンテナンスすべ
く読み出しを可能とするテストモード時のみ、サービス
マンが指示入力できるものとすることができる。
On the other hand, the read prohibition release signal 42 can be a signal that can be input by a serviceman only in the test mode in which reading is possible to maintain the data content of the flash memory cell 10.

【0112】この結果、第三者のメモリデータの読み出
し及び書き込みを簡便かつ確実に禁止する一方、テスト
モード時の読み出し又は書き込みを可能とする不揮発性
メモリ内蔵マイクロコンピュータを提供することができ
る。
As a result, it is possible to provide a microcomputer with a built-in nonvolatile memory that can easily and reliably prohibit reading and writing of memory data by a third party, while enabling reading or writing in the test mode.

【0113】また、本実施の形態の不揮発性メモリ内蔵
マイクロコンピュータは、禁止手段は、NOR回路7と
OR回路8とフラッシュメモリセル10の読み出し及び
書き込みの出力をON/OFFするトライステートバッ
ファ9とからなっている。
Further, in the microcomputer with a built-in nonvolatile memory according to the present embodiment, the inhibiting means includes a NOR circuit 7, an OR circuit 8, and a tri-state buffer 9 for turning on / off the read / write output of the flash memory cell 10. Consists of

【0114】従って、NOR回路7にはセキュリティ専
用フラッシュメモリ6から出力される各所定ビットに基
づく全ての書き込みモードロック信号、即ちPROMモ
ードロック信号31、コピーモードロック信号32及び
シリアル転送モードロック信号33が入力されるので、
ある一つの書き込みモードのものがHigh信号となっ
ており、これによって、NOR回路7の出力であるNO
R信号7aはLow信号となる。
Therefore, the NOR circuit 7 has all the write mode lock signals based on each predetermined bit outputted from the security flash memory 6, that is, the PROM mode lock signal 31, the copy mode lock signal 32 and the serial transfer mode lock signal 33. Is entered,
One of the write modes is a High signal, and the output signal of the NOR circuit 7 is NO.
The R signal 7a becomes a Low signal.

【0115】このNOR回路7の出力であるNOR信号
7aはOR回路8に入力されると共に、OR回路8に
は、さらに、読み出し禁止解除信号42と、フラッシュ
メモリセル10のデータの実行時に制御部1から出力さ
れる実動作モード信号41とが入力されている。
The NOR signal 7a, which is the output of the NOR circuit 7, is input to the OR circuit 8, and the OR circuit 8 further supplies the read inhibit release signal 42 and the control unit when executing the data of the flash memory cell 10. 1 is input.

【0116】ここで、読み出し禁止解除信号42は、サ
ービスマンがフラッシュメモリセル10のメンテナンス
をするときにのみHigh信号となるが、通常はLow
信号である。また、実動作モード信号41も、フラッシ
ュメモリセル10のデータの実行時にのみHigh信号
となり、通常は、Low信号である。
Here, the read prohibition release signal 42 becomes a High signal only when a service person performs maintenance on the flash memory cell 10, but is normally Low.
Signal. The actual operation mode signal 41 also becomes a high signal only when data of the flash memory cell 10 is executed, and is usually a low signal.

【0117】従って、OR回路8の出力はLow信号と
なり、これがトライステートバッファ9に入力されるの
で、フラッシュメモリセル10の出力はOFFとなっ
て、フラッシュメモリセル10を読み出し又は書き込み
できない状態となる。
Therefore, the output of the OR circuit 8 becomes a Low signal, which is input to the tri-state buffer 9, so that the output of the flash memory cell 10 is turned off and the flash memory cell 10 cannot be read or written. .

【0118】一方、サービスマンがフラッシュメモリセ
ル10のメンテナンスをするときには、読み出し禁止解
除信号42はHigh信号となるので、これによって、
OR回路8の出力であるOR信号8aはHigh信号と
なり、これがトライステートバッファ9に入力されるの
で、フラッシュメモリセル10の出力がONとなって、
フラッシュメモリセル10の読み出し及び書き込みがで
きる状態となる。
On the other hand, when the service person performs maintenance on the flash memory cell 10, the read inhibition release signal 42 becomes a High signal.
The OR signal 8a output from the OR circuit 8 becomes a High signal, which is input to the tri-state buffer 9, so that the output of the flash memory cell 10 is turned on,
The flash memory cell 10 is ready for reading and writing.

【0119】この結果、禁止手段を、NOR回路7、O
R回路8及びトライステートバッファ9という簡単な構
成にて形成することができる。
As a result, the prohibiting means is changed to the NOR circuit 7, O
It can be formed with a simple configuration of the R circuit 8 and the tri-state buffer 9.

【0120】また、本実施の形態の不揮発性メモリ内蔵
マイクロコンピュータでは、読み出し禁止解除信号42
は、フラッシュメモリセル10のデータ内容をメンテナ
ンスすべく読み出しを可能とするテストモード時に、制
御部1に対して入力されるテストモード入力信号である
テストモード信号12及び入力タイミング信号13に基
づき、制御部1から出力されるものである。
In the microcomputer with a built-in nonvolatile memory according to the present embodiment, the read inhibit release signal 42
Is controlled based on a test mode signal 12 and an input timing signal 13, which are test mode input signals input to the control unit 1, in a test mode in which data can be read out for maintenance of the data content of the flash memory cell 10. This is output from the unit 1.

【0121】このため、読み出し禁止解除信号42を第
三者は操作することができない。この結果、第三者がフ
ラッシュメモリセル10のデータを読み出し又は書き込
みすることを確実に禁止することができる。
Therefore, the read prohibition cancel signal 42 cannot be operated by a third party. As a result, it is possible to reliably prohibit a third party from reading or writing data in the flash memory cell 10.

【0122】また、本実施の形態の不揮発性メモリ内蔵
マイクロコンピュータでは、読み出し禁止解除信号42
は、サービスマンが制御部1に対して入力するテストモ
ード入力信号によって制御部1から出力される。また、
テストモード入力信号は、テストモードであることを示
すテストモード信号12と、所定パルス幅atを有しか
つ所定個数からなるパルスにて形成される入力タイミン
グ信号13との2つからなっている。
In the microcomputer with a built-in nonvolatile memory according to the present embodiment, the read inhibit release signal 42
Is output from the control unit 1 by a test mode input signal input to the control unit 1 by a serviceman. Also,
The test mode input signal includes two signals: a test mode signal 12 indicating the test mode, and an input timing signal 13 formed of a predetermined number of pulses having a predetermined pulse width at.

【0123】さらに、これらテストモード信号12及び
入力タイミング信号13は、テストモード信号12の所
定タイミングAt・Bt・Ct期間内において、所定パ
ルス幅atを有しかつ所定個数からなるパルスによる入
力タイミング信号13が該制御部1に入力されたとき
に、真のテストモードであることを制御部1が認識し、
これにより、制御部1は読み出し禁止解除信号42を出
力するものとなっている。
The test mode signal 12 and the input timing signal 13 are input timing signals having a predetermined pulse width at and a predetermined number of pulses within a predetermined timing At, Bt, Ct period of the test mode signal 12. When 13 is input to the control unit 1, the control unit 1 recognizes that the test mode is a true test mode,
As a result, the control unit 1 outputs the read inhibition release signal 42.

【0124】従って、サービスマンがテストモード時に
フラッシュメモリセル10のデータの読み出し又は書き
込みを行う場合においても、このような複雑なテストモ
ード入力信号であるテストモード信号12及び入力タイ
ミング信号13を採用しているので、第三者がこの条件
に合致するテストモード信号12及び入力タイミング信
号13を入力して制御部1に読み出し禁止解除信号42
を出力させることは、絶対に不可能である。
Therefore, even when a service person reads or writes data in the flash memory cell 10 in the test mode, the test mode signal 12 and the input timing signal 13 which are such complicated test mode input signals are employed. Therefore, the third party inputs the test mode signal 12 and the input timing signal 13 that meet this condition, and sends the read inhibition release signal 42 to the control unit 1.
Is absolutely impossible.

【0125】この結果、第三者がフラッシュメモリセル
10のデータを読み出し又は書き込みすることを確実に
禁止することができる。
As a result, it is possible to reliably prohibit a third party from reading or writing data in the flash memory cell 10.

【0126】[0126]

【発明の効果】請求項1に係る発明の不揮発性メモリ内
蔵マイクロコンピュータは、以上のように、複数種類の
書き込みモードによる終了信号を各所定ビットに格納す
る不揮発性記憶手段と、外部からの上記不揮発性メモリ
へのデータの複数種類の書き込みモードによる各書き込
みを行うべく制御し、かつその書き込み終了時に上記不
揮発性記憶手段に対して、各書き込みモードによる終了
信号を各所定ビットに格納させる制御手段と、上記不揮
発性記憶手段に格納された所定ビットと、上記制御手段
から出力される読み出し禁止解除信号とに基づき、上記
不揮発性メモリへのデータの書き込み及び読み出しを禁
止する禁止手段とが設けられているものである。
As described above, the microcomputer with built-in nonvolatile memory according to the first aspect of the present invention has a nonvolatile storage means for storing end signals in a plurality of types of write modes in respective predetermined bits, and Control means for controlling the writing of data to the nonvolatile memory in a plurality of types of write modes, and for storing, at the end of the write, the nonvolatile storage means with an end signal in each write mode in each predetermined bit Prohibiting means for prohibiting writing and reading of data to and from the non-volatile memory based on a predetermined bit stored in the non-volatile storage means and a read prohibition release signal output from the control means. Is what it is.

【0127】それゆえ、不揮発性メモリへのデータの書
き込み及び読み出しは、書き込み終了時の終了信号と、
制御手段から出力される読み出し禁止解除信号とを制御
することにより禁止することが可能となる。
Therefore, writing and reading of data to and from the non-volatile memory are performed by an end signal at the end of writing, and
By controlling the read prohibition release signal output from the control means, the prohibition can be achieved.

【0128】このため、第三者は、この終了信号を解除
するか又は読み出し禁止解除信号を解読するかしなけれ
ば、不揮発性メモリへのデータの書き込み及び読み出し
ができない。
Therefore, a third party cannot write or read data to or from the nonvolatile memory unless the end signal is released or the read inhibition release signal is decoded.

【0129】一方、上記の読み出し禁止解除信号は、不
揮発性メモリのデータ内容をメンテナンスすべく読み出
しを可能とするテストモード時のみ、サービスマンが指
示できるものとすることができる。
On the other hand, the read prohibition release signal can be instructed by a service person only in the test mode in which reading is possible to maintain the data content of the nonvolatile memory.

【0130】この結果、第三者のメモリデータの読み出
し及び書き込みを簡便かつ確実に禁止する一方、テスト
モード時の読み出し又は書き込みを可能とする不揮発性
メモリ内蔵マイクロコンピュータを提供することができ
るという効果を奏する。
As a result, it is possible to provide a microcomputer with a built-in nonvolatile memory that can easily and reliably prohibit reading and writing of memory data by a third party while enabling reading or writing in the test mode. To play.

【0131】請求項2に係る発明の不揮発性メモリ内蔵
マイクロコンピュータは、以上のように、請求項1記載
の不揮発性メモリ内蔵マイクロコンピュータにおいて、
上記の禁止手段は、負論理和回路と、論理和回路と、上
記不揮発性メモリの読み出し及び書き込みの出力をON
/OFFするON/OFF回路とからなり、上記負論理
和回路には、上記不揮発性記憶手段から出力される各所
定ビットに基づく全ての書き込みモードロック信号が入
力される一方、上記論理和回路には、上記負論理和回路
の出力信号と、上記読み出し禁止解除信号と、不揮発性
メモリのデータの実行時に制御手段から出力される実動
作モード信号とが入力されると共に、上記の論理和回路
の出力が上記ON/OFF回路に入力されているもので
ある。
The microcomputer with built-in nonvolatile memory according to the second aspect of the present invention is the microcomputer with built-in nonvolatile memory according to claim 1 as described above.
The prohibiting means turns on the negative OR circuit, the OR circuit, and the read and write outputs of the nonvolatile memory.
And an ON / OFF circuit for turning on / off all the write mode lock signals based on each predetermined bit output from the non-volatile storage means. Receives the output signal of the negative OR circuit, the read inhibit release signal, and the actual operation mode signal output from the control means when executing data in the nonvolatile memory; The output is input to the ON / OFF circuit.

【0132】それゆえ、禁止手段を、負論理和回路、論
理和回路及びON/OFF回路という簡単な構成にて形
成することができるという効果を奏する。
Therefore, there is an effect that the inhibiting means can be formed with a simple configuration of a negative OR circuit, an OR circuit and an ON / OFF circuit.

【0133】請求項3に係る発明の不揮発性メモリ内蔵
マイクロコンピュータは、以上のように、請求項1又は
2記載の不揮発性メモリ内蔵マイクロコンピュータにお
いて、上記の読み出し禁止解除信号は、上記不揮発性メ
モリのデータ内容をメンテナンスすべく読み出しを可能
とするテストモード時に、制御手段に対して入力される
テストモード入力信号に基づき、制御手段から出力され
るものである。
The microcomputer with built-in nonvolatile memory according to the third aspect of the present invention is the microcomputer with built-in non-volatile memory according to claim 1 or 2, wherein the read-inhibition canceling signal is transmitted to the nonvolatile memory. The data is output from the control means based on a test mode input signal input to the control means in a test mode in which reading is possible to maintain the data contents.

【0134】それゆえ、読み出し禁止解除信号を第三者
は操作することができない。この結果、第三者が不揮発
性メモリのデータを読み出し又は書き込みすることを確
実に禁止することができるという効果を奏する。
Therefore, the read prohibition cancel signal cannot be operated by a third party. As a result, it is possible to reliably prevent a third party from reading or writing data in the nonvolatile memory.

【0135】請求項4に係る発明の不揮発性メモリ内蔵
マイクロコンピュータは、以上のように、請求項3記載
の不揮発性メモリ内蔵マイクロコンピュータにおいて、
上記テストモード入力信号は、テストモードであること
を示すテストモード信号と、所定パルス幅を有しかつ所
定個数からなるパルスにて形成される入力タイミング信
号からなる一方、制御手段は、上記テストモード信号の
所定タイミング内において、所定パルス幅を有しかつ所
定個数からなるパルスによる入力タイミング信号が該制
御手段に入力されたときに、真のテストモードであるこ
とを認識して読み出し禁止解除信号を出力するものであ
る。
According to a fourth aspect of the present invention, there is provided the microcomputer with the built-in nonvolatile memory according to the third aspect of the present invention.
The test mode input signal includes a test mode signal indicating a test mode, and an input timing signal formed of a predetermined number of pulses having a predetermined pulse width. Within a predetermined timing of the signal, when an input timing signal having a predetermined pulse width and a predetermined number of pulses is input to the control unit, the control unit recognizes that the test mode is a true test mode and generates a read inhibition release signal. Output.

【0136】それゆえ、サービスマンがテストモード時
に不揮発性メモリのデータの読み出し又は書き込みを行
う場合においても、このような複雑なテストモード入力
信号を採用しているので、第三者がこの条件に合致する
テストモード入力信号を入力して制御手段に読み出し禁
止解除信号を出力させることは、絶対に不可能である。
Therefore, even when a service person reads or writes data in the non-volatile memory in the test mode, since a complicated test mode input signal is employed, a third party can meet this condition. It is absolutely impossible to input a matching test mode input signal and cause the control means to output a read inhibition release signal.

【0137】この結果、第三者が不揮発性メモリのデー
タを読み出し又は書き込みすることを確実に禁止するこ
とができるという効果を奏する。
As a result, there is an effect that a third party can be reliably prohibited from reading or writing data in the nonvolatile memory.

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

【図1】本発明における不揮発性メモリ内蔵マイクロコ
ンピュータの実施の一形態を示す構成図である。
FIG. 1 is a configuration diagram showing an embodiment of a microcomputer with a built-in nonvolatile memory according to the present invention.

【図2】上記不揮発性メモリ内蔵マイクロコンピュータ
におけるテストモード信号と入力タイミング信号との関
係を示すタイミングチャートである。
FIG. 2 is a timing chart showing a relationship between a test mode signal and an input timing signal in the microcomputer with a built-in nonvolatile memory.

【図3】上記不揮発性メモリ内蔵マイクロコンピュータ
における読み出し禁止解除ルーチンの制御動作を示すフ
ローチャートである。
FIG. 3 is a flowchart showing a control operation of a read prohibition release routine in the microcomputer with built-in nonvolatile memory.

【図4】上記不揮発性メモリ内蔵マイクロコンピュータ
における読み出し禁止ルーチンの制御動作を示すフロー
チャートである。
FIG. 4 is a flowchart showing a control operation of a read prohibition routine in the microcomputer with built-in nonvolatile memory.

【図5】従来の不揮発性メモリ内蔵マイクロコンピュー
タを示す構成図である。
FIG. 5 is a configuration diagram showing a conventional microcomputer with built-in nonvolatile memory.

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

1 制御部(制御手段) 6 セキュリティ専用フラッシュメモリ(不揮発性記
憶手段) 7 NOR回路(負論理和回路、禁止手段) 7a NOR信号 8 OR回路(論理和回路、禁止手段) 8a OR信号 9 トライステートバッファ(ON/OFF回路、禁
止手段) 10 フラッシュメモリセル(不揮発性メモリ) 12 テストモード信号(テストモード入力信号) 13 入力タイミング信号(テストモード入力信号) 21 PROMモード終了信号(終了信号) 22 コピーモード終了信号(終了信号) 23 シリアル転送モード終了信号(終了信号) 24 メモリクリア信号 31 PROMモードロック信号(モードロック信
号) 32 コピーモードロック信号(モードロック信号) 33 シリアル転送モードロック信号(モードロック
信号) 41 実動作モード信号 42 読み出し禁止解除信号
DESCRIPTION OF SYMBOLS 1 Control part (control means) 6 Flash memory for exclusive use of security (nonvolatile storage means) 7 NOR circuit (negative OR circuit, inhibition means) 7a NOR signal 8 OR circuit (OR circuit, inhibition means) 8a OR signal 9 tristate Buffer (ON / OFF circuit, prohibiting means) 10 Flash memory cell (non-volatile memory) 12 Test mode signal (Test mode input signal) 13 Input timing signal (Test mode input signal) 21 PROM mode end signal (End signal) 22 Copy Mode end signal (end signal) 23 Serial transfer mode end signal (end signal) 24 Memory clear signal 31 PROM mode lock signal (mode lock signal) 32 Copy mode lock signal (mode lock signal) 33 Serial transfer mode lock signal (mode lock) Signal) 41 Actual operation mode signal 42 Read inhibit release signal

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】不揮発性メモリを内蔵し、1チップからな
る不揮発性メモリ内蔵マイクロコンピュータにおいて、 複数種類の書き込みモードによる終了信号を各所定ビッ
トに格納する不揮発性記憶手段と、 外部からの上記不揮発性メモリへのデータの複数種類の
書き込みモードによる各書き込みを行うべく制御し、か
つその書き込み終了時に上記不揮発性記憶手段に対し
て、各書き込みモードによる終了信号を各所定ビットに
格納させる制御手段と、 上記不揮発性記憶手段に格納された所定ビットと、上記
制御手段から出力される読み出し禁止解除信号とに基づ
き、上記不揮発性メモリへのデータの書き込み及び読み
出しを禁止する禁止手段とが設けられていることを特徴
とする不揮発性メモリ内蔵マイクロコンピュータ。
1. A microcomputer having a built-in nonvolatile memory and comprising one chip of nonvolatile memory, comprising: a nonvolatile storage means for storing end signals in a plurality of types of write modes in predetermined bits; Control means for controlling each write in a plurality of types of write modes of data to the non-volatile memory, and, when the write is completed, causing the nonvolatile storage means to store an end signal in each write mode in each predetermined bit. Prohibiting means for prohibiting writing and reading of data to and from the non-volatile memory based on a predetermined bit stored in the non-volatile storage means and a read prohibition release signal output from the control means; A microcomputer with a built-in nonvolatile memory.
【請求項2】上記の禁止手段は、負論理和回路と、論理
和回路と、上記不揮発性メモリの読み出し及び書き込み
の出力をON/OFFするON/OFF回路とからな
り、 上記負論理和回路には、上記不揮発性記憶手段から出力
される各所定ビットに基づく全ての書き込みモードロッ
ク信号が入力される一方、 上記論理和回路には、上記負論理和回路の出力信号と、
上記読み出し禁止解除信号と、不揮発性メモリのデータ
の実行時に制御手段から出力される実動作モード信号と
が入力されると共に、 上記の論理和回路の出力が上記ON/OFF回路に入力
されていることを特徴とする請求項1記載の不揮発性メ
モリ内蔵マイクロコンピュータ。
2. The above-mentioned prohibiting means comprises a negative OR circuit, an OR circuit, and an ON / OFF circuit for turning ON / OFF the read and write outputs of the nonvolatile memory. Receives all the write mode lock signals based on each predetermined bit output from the nonvolatile storage means, while the OR circuit outputs an output signal of the negative OR circuit,
The read inhibit release signal and the actual operation mode signal output from the control means when executing the data in the nonvolatile memory are input, and the output of the OR circuit is input to the ON / OFF circuit. The microcomputer with a built-in nonvolatile memory according to claim 1.
【請求項3】上記の読み出し禁止解除信号は、上記不揮
発性メモリのデータ内容をメンテナンスすべく読み出し
を可能とするテストモード時に、制御手段に対して入力
されるテストモード入力信号に基づき、制御手段から出
力されるものであることを特徴とする請求項1又は2記
載の不揮発性メモリ内蔵マイクロコンピュータ。
3. The control means according to claim 2, wherein said read inhibit release signal is supplied to said control means based on a test mode input signal inputted to said control means in a test mode in which reading is possible to maintain data contents of said nonvolatile memory. The microcomputer with a built-in nonvolatile memory according to claim 1, wherein the microcomputer outputs the data.
【請求項4】上記テストモード入力信号は、テストモー
ドであることを示すテストモード信号と、所定パルス幅
を有しかつ所定個数からなるパルスにて形成される入力
タイミング信号とからなる一方、 制御手段は、上記テストモード信号の所定タイミング内
において、所定パルス幅を有しかつ所定個数からなるパ
ルスによる入力タイミング信号が該制御手段に入力され
たときに、真のテストモードであることを認識して読み
出し禁止解除信号を出力することを特徴とする請求項3
記載の不揮発性メモリ内蔵マイクロコンピュータ。
4. The test mode input signal comprises: a test mode signal indicating a test mode; and an input timing signal formed of a predetermined number of pulses having a predetermined pulse width. The means recognizes that the test mode is a true test mode when an input timing signal having a predetermined pulse width and a predetermined number of pulses is input to the control means within a predetermined timing of the test mode signal. And outputting a read prohibition cancel signal.
A microcomputer with a built-in nonvolatile memory as described in the above.
JP9247334A 1997-09-11 1997-09-11 Microcomputer with built-in non-volatile memory Pending JPH1185620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9247334A JPH1185620A (en) 1997-09-11 1997-09-11 Microcomputer with built-in non-volatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9247334A JPH1185620A (en) 1997-09-11 1997-09-11 Microcomputer with built-in non-volatile memory

Publications (1)

Publication Number Publication Date
JPH1185620A true JPH1185620A (en) 1999-03-30

Family

ID=17161870

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9247334A Pending JPH1185620A (en) 1997-09-11 1997-09-11 Microcomputer with built-in non-volatile memory

Country Status (1)

Country Link
JP (1) JPH1185620A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7895406B2 (en) 2006-12-18 2011-02-22 Spansion Llc Memory device and password storing method thereof
US7944876B2 (en) 2004-06-02 2011-05-17 Integrated Device Technology, Inc Time slot interchange switch with bit error rate testing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7944876B2 (en) 2004-06-02 2011-05-17 Integrated Device Technology, Inc Time slot interchange switch with bit error rate testing
US7895406B2 (en) 2006-12-18 2011-02-22 Spansion Llc Memory device and password storing method thereof

Similar Documents

Publication Publication Date Title
EP0420994B1 (en) Memory cartridge
JP3891539B2 (en) Semiconductor device and control device thereof
US6088262A (en) Semiconductor device and electronic equipment having a non-volatile memory with a security function
EP0851358B1 (en) Processing system security
US5826007A (en) Memory data protection circuit
US9524250B2 (en) Block or page lock features in serial interface memory
US20090113114A1 (en) Implementation of One Time Programmable Memory with Embedded Flash Memory in a System-on-Chip
US6453397B1 (en) Single chip microcomputer internally including a flash memory
JP2001256460A (en) One-chip microcomputer and ic card using the same
KR0142033B1 (en) Micro computer
KR20020025793A (en) Memory device and memory access control method
US6510501B1 (en) Non-volatile memory read/write security protection feature selection through non-volatile memory bits
US6996006B2 (en) Semiconductor memory preventing unauthorized copying
JP2004287541A (en) Nonvolatile memory access control system
JPH1185620A (en) Microcomputer with built-in non-volatile memory
US7089427B1 (en) Security system method and apparatus for preventing application program unauthorized use
JPH07175725A (en) Semiconductor memory device
KR100341424B1 (en) Microcomputer
JPS5894195A (en) One chip microcomputer
JP3028567B2 (en) Microcomputer with built-in EEPROM
JP2000347944A (en) Microcomputer with built-in nonvolatile memory
JPS6329859A (en) Memory protection circuit
JP2002007372A (en) Semiconductor device
JPH08292915A (en) Integrated circuit device having built-in nonvolatile memory
KR940006823B1 (en) Circuit for protecting memory write