JPH0689348A - Single-chip microcomputer - Google Patents

Single-chip microcomputer

Info

Publication number
JPH0689348A
JPH0689348A JP4042616A JP4261692A JPH0689348A JP H0689348 A JPH0689348 A JP H0689348A JP 4042616 A JP4042616 A JP 4042616A JP 4261692 A JP4261692 A JP 4261692A JP H0689348 A JPH0689348 A JP H0689348A
Authority
JP
Japan
Prior art keywords
operation mode
terminal
internal rom
level
chip microcomputer
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
JP4042616A
Other languages
Japanese (ja)
Inventor
Shinichi Iwamoto
伸一 岩元
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 Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP4042616A priority Critical patent/JPH0689348A/en
Publication of JPH0689348A publication Critical patent/JPH0689348A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To maintain the secrecy of the data contents of an internal ROM or internal E<2>PROM by preventing an operation mode in program execution from being changed into an internal ROM operation mode. CONSTITUTION:This microcomputer is equipped with at least an address decision circuit 2, an internal ROM 3, a selector 4, a CPU 5, and a latch circuit 6 corresponding to an external memory 7, and the data input from an operation mode specification terminal 51 and the output signal of a latch circuit 6 generated by the reset signal input from a reset terminal 52 are inputted to the address decision circuit 2. Consequently, the logical value at the operation mode specification terminal 41 at the time of reset mode releasing is held and the logical value at the operation mode specification terminal 51 at the time of a change from a reset level to a non-reset level is latched. The output of the latch circuit 6 does not vary. Therefore, the operation mode in program execution is never changed into the internal ROM operation mode at the start of operation in external memory operation moded.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はシングルチップ・マイク
ロコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a single chip microcomputer.

【0002】[0002]

【従来の技術】従来のシングルチップ・マイクロコンピ
ュータにおいて、外部端子を介して、外部メモリ動作モ
ードに設定することのできるシングルチップ・マイクロ
コンピュータの一例を図6に示す。図6に示されるよう
に、本従来例のシングルチップ・マイクロコンピュータ
1は、外部メモリ7に対応して、アドレス判定回路2
と、内部ROM3と、セレクタ4と、CPU5とを備え
て構成される。これ以外の内部RAMおよびタイマ回路
等を含む構成要素については、本発明に直接関係しない
ため、図6においては図示されていない。また、図7に
示されるのは、この従来例における、内部メモリの内容
読出し手順を示すフローチャートであり、図8は、従来
例における内部ROM読出しプログラムの配置を示す図
である。
2. Description of the Related Art FIG. 6 shows an example of a conventional single-chip microcomputer in which an external memory operation mode can be set via an external terminal. As shown in FIG. 6, the single-chip microcomputer 1 of the conventional example corresponds to the external memory 7 and corresponds to the address determination circuit 2.
And an internal ROM 3, a selector 4, and a CPU 5. Other components such as the internal RAM and the timer circuit are not shown in FIG. 6 because they are not directly related to the present invention. Further, FIG. 7 is a flow chart showing a procedure for reading the contents of the internal memory in this conventional example, and FIG. 8 is a diagram showing an arrangement of an internal ROM read program in the conventional example.

【0003】内部アドレス・バス201においては、シ
ングルチップ・マイクロコンピュータ1の各構成ブロッ
クに対してアドレス情報を供給するとともに、アドレス
・バス・インタフェース端子を通して外部メモリ7に対
してもアドレス情報を供給する。アドレス判定回路2
は、入力されたアドレス情報が、内部ROM3を示すア
ドレスであるか、または外部メモリ7を示すアドレスで
あるかを判定する回路であり、このアドレス判定回路2
においては、動作モード指定端子57におけるレベル
が、外部メモリ動作指定レベル(以下、Exレベルと呼
ぶ)であれば、アドレス情報の如何に関せず、外部メモ
リ7を選択するように作用するレベル信号が出力され
て、セレクタ4に送られる。セレクタ4においては、ア
ドレス判定回路2より出力される前記レベル信号を受け
て、内部ROM3の出力と、外部データ・バス203お
よびインタフェース端子とを介して、セレクタ4に入力
される外部メモリ出力との何れか一方が選択され、内部
データ・バス202に出力される。なお、内部データ・
バス202は、シングルチップ・マイクロコンピュータ
1の各構成ブロックに処理データを供給するとともに、
インタフェース端子を介して、外部データ・バス203
に接続されている。
The internal address bus 201 supplies address information to each constituent block of the single-chip microcomputer 1 and also supplies address information to the external memory 7 through the address bus interface terminal. . Address determination circuit 2
Is a circuit for determining whether the input address information is an address indicating the internal ROM 3 or an external memory 7, and this address determination circuit 2
In the case where the level at the operation mode designating terminal 57 is an external memory operation designating level (hereinafter referred to as Ex level), a level signal that operates to select the external memory 7 regardless of the address information. Is output and sent to the selector 4. The selector 4 receives the level signal output from the address determination circuit 2, and outputs the output of the internal ROM 3 and the external memory output input to the selector 4 via the external data bus 203 and the interface terminal. Either one is selected and output to the internal data bus 202. In addition, internal data
The bus 202 supplies processing data to each constituent block of the single-chip microcomputer 1, and
External data bus 203 via interface terminal
It is connected to the.

【0004】CPU5は、内部データ・バス202上の
プログラム・データおよび処理データ等の入力に対応し
て、それらの処理が実行される。この場合、動作モード
指定端子57におけるレベルに対応して、シングルチッ
プ・マイクロコンピュータ1の動作を内部ROM3から
の出力によって実行するのか、または外部メモリ7から
の出力によって実行するのかの選択が行われる。また、
リセット端子58からは、シングルチップ・マイクロコ
ンピュータ1の構成ブロックのCPU5およびその他の
ブロックを初期化するためのリセット信号が入力され
る。外部メモリ7からは、シングルチップ・マイクロコ
ンピュータ1におけるアドレス・バス・インタフェース
端子を介して外部メモリ7に供給されたアドレス情報に
応じた処理データが外部データ・バス203に出力され
る。外部データ・バス203においては、外部メモリ7
からの出力される処理データおよびシングルチップ・マ
イクロコンピュータ1のデータ・バス・インタフェース
端子からのデータを伝達する。
The CPU 5 executes the processing in response to the input of program data and processing data on the internal data bus 202. In this case, depending on the level at the operation mode designating terminal 57, the operation of the single-chip microcomputer 1 is selected by the output from the internal ROM 3 or the output from the external memory 7. . Also,
From the reset terminal 58, a reset signal for initializing the CPU 5 and other blocks of the constituent blocks of the single-chip microcomputer 1 is input. From the external memory 7, processing data according to the address information supplied to the external memory 7 via the address bus interface terminal in the single-chip microcomputer 1 is output to the external data bus 203. In the external data bus 203, the external memory 7
The processed data output from the device and the data from the data bus interface terminal of the single-chip microcomputer 1 are transmitted.

【0005】次に、本従来例のシングルチップ・マイク
ロコンピュータ1において、内部ROM3に格納されて
いるデータを読出す場合の動作につき説明する。
Next, the operation of reading data stored in the internal ROM 3 in the conventional single-chip microcomputer 1 will be described.

【0006】先ず、図8に示される読出しプログラムの
配置図に見られるように、シングルチップ・マイクロコ
ンピュータ1のアドレス可能領域が0〜FFFFHの6
4Kバイトで、内部ROM3の容量が16Kバイトであ
るものとすると、外部メモリ7に、内部ROM3のマッ
ピングされていないアドレス(図8において、5000
H番地から始まる番地)に対応して、内部ROM3の読
出しプログラムが格納される。また、リセット後のプロ
グラム・スタート番地を設定するリセットベクタテーブ
ルに、この読出しプログラムの先頭番地(図8におい
て、5000H)が設定される。
First, as can be seen from the layout diagram of the read program shown in FIG. 8, the addressable area of the single-chip microcomputer 1 is 6 from 0 to FFFFH.
Assuming that the capacity of the internal ROM 3 is 4 Kbytes and 16 Kbytes, the unmapped address of the internal ROM 3 (5000 in FIG. 8) is stored in the external memory 7.
The read program of the internal ROM 3 is stored corresponding to the address starting from the address H). Further, the start address (5000H in FIG. 8) of this read program is set in the reset vector table that sets the program start address after reset.

【0007】内部ROM3のデータを読出すためのプロ
グラムは極めて簡単であり、先ず、動作モード指定端子
57におけるレベルが、内部ROM3の動作レベルに変
更された後において、内部ROM3に対するリード命令
が実行され、読出されたデータは、外部データ・バス2
03を介して、外部RAM(図示されない)に格納され
るか、または所定の出力ポートを介して読出される。
The program for reading the data of the internal ROM 3 is extremely simple. First, after the level at the operation mode designating terminal 57 is changed to the operation level of the internal ROM 3, a read command for the internal ROM 3 is executed. , The read data is the external data bus 2
It is stored in an external RAM (not shown) via 03 or is read out through a predetermined output port.

【0008】このような読出しプログラムが外部メモリ
7に格納され、動作モード指定端子57を外部メモリ動
作モードに指定するExレベルとして、リセット端子5
8からは前述の初期化用のリセット信号が入力されて、
動作が開始される。なお、このExレベルの設定は、例
えば、ExレベルがLOWレベルである場合には、動作
モード指定端子57に対して、プルダウン抵抗を接続す
ることにより、実現することができる。
Such a read program is stored in the external memory 7, and the reset terminal 5 is set as the Ex level for designating the operation mode designation terminal 57 in the external memory operation mode.
The reset signal for initialization described above is input from 8,
The operation is started. The setting of the Ex level can be realized, for example, by connecting a pull-down resistor to the operation mode designation terminal 57 when the Ex level is the LOW level.

【0009】読出しプログラムは、外部メモリ7に格納
されたリセット・ベクター・テーブルの設定により、読
出しプログラムの先頭番地から、その実行が開始され
る。プログラムの実行中において、動作モード指定端子
57のレベルが、Exレベルから内部ROM3の動作モ
ード・レベル(以下、Intレベルと呼ぶ)に変更され
ても、当該プログラムの格納番地が内部ROM3の領域
外であるために、アドレス判定回路2においては、外部
データ・バス203からのデータ、即ち、外部メモリ7
に格納されているプログラム・データを選択するための
出力がセレクタ4に入力されるため、継続的に外部メモ
リ7に格納されている読出しプログラムが実行される。
The reading program is started to be executed from the head address of the reading program by setting the reset vector table stored in the external memory 7. Even when the level of the operation mode designation terminal 57 is changed from the Ex level to the operation mode level of the internal ROM 3 (hereinafter referred to as Int level) during execution of the program, the storage address of the program is outside the area of the internal ROM 3. Therefore, in the address determination circuit 2, the data from the external data bus 203, that is, the external memory 7
Since the output for selecting the program data stored in is input to the selector 4, the read program stored in the external memory 7 is continuously executed.

【0010】また、プログラムの実行中において、内部
ROM3に格納されているアドレス・データを順次読出
す命令が実行されると、読出しアドレスが内部ROM領
域であるため、アドレス判定回路2からは、内部ROM
3の出力を選択する信号が出力されてセレクタ4に入力
され、内部ROM3のデータは、内部データ・バス20
2を介して外部データ・バス203に出力される。こ
の、内部ROM3からのデータ読出しの動作手順が、図
7のフローチャートに示されている。
When an instruction to sequentially read the address data stored in the internal ROM 3 is executed during execution of the program, the read address is in the internal ROM area. ROM
A signal for selecting the output of the internal ROM 3 is output to the selector 4, and the data of the internal ROM 3 is transferred to the internal data bus 20.
2 to the external data bus 203. The operation procedure for reading data from the internal ROM 3 is shown in the flowchart of FIG.

【0011】即ち、外部メモリに格納されているプログ
ラムによって、動作モード指定端子57のレベルを操作
することにより、シングルチップ・マイクロコンピュー
タ1の内部ROM3に格納されているデータは、第3者
によっても、容易に読出すことが可能となる。
That is, the data stored in the internal ROM 3 of the single-chip microcomputer 1 is operated by a third party by operating the level of the operation mode designating terminal 57 by the program stored in the external memory. , And can be easily read.

【0012】[0012]

【発明が解決しようとする課題】上述した従来のシング
ルチップ・マイクロコンピュータにおいては、外部メモ
リに格納されているプログラムによって、動作モード指
定端子のレベルを操作することにより、シングルチップ
・マイクロコンピュータの内部ROMに格納されている
データを容易に読出すことができるため、第3者による
データ読出しも可能となり、ソフトウェアの機密性に欠
けるという欠点がある。
In the conventional single-chip microcomputer described above, the internal level of the single-chip microcomputer is controlled by operating the level of the operation mode designating terminal by the program stored in the external memory. Since the data stored in the ROM can be easily read out, the data can be read out by a third party, and there is a drawback that the confidentiality of the software is lacking.

【0013】[0013]

【課題を解決するための手段】第1の発明のシングルチ
ップ・マイクロコンピュータは、内部ROMを有し、所
定の動作モード指定端子の論理値による選択作用を介し
て、前記内部ROMと、所定のインタフェース端子を介
して接続される外部メモリの何れか一方をデータ格納手
段の一つとして稼働するシングルチップ・マイクロコン
ピュータにおいて、前記動作モード指定端子における論
理値を、リセット状態が解除される時点においてラッチ
するラッチ回路を備えて構成される。
A single-chip microcomputer according to a first aspect of the present invention has an internal ROM, and the internal ROM and a predetermined ROM are selected through a selection operation based on a logical value of a predetermined operation mode designating terminal. In a single-chip microcomputer that operates using either one of external memories connected via an interface terminal as one of data storage means, a logical value at the operation mode designating terminal is latched at the time when the reset state is released. It is configured to include a latch circuit that operates.

【0014】また、第2の発明のマイクロコンピュータ
は、内部ROMと電気的に書換え可能なメモリを有し、
所定の動作モード指定端子の論理値による選択作用を介
して、前記内部ROMと、所定のインタフェース端子を
介して接続される外部メモリの何れか一方をデータ格納
手段の一つとして稼働するシングルチップ・マイクロコ
ンピュータにおいて、前記動作モード指定端子における
リセット状態解除時点の論理値が、前記外部メモリを前
記データ格納手段を選択する論理値であった時に、前記
電気的に書換え可能なメモリに対するアクセスを許可/
禁止する第1のフラグと、前記動作モード指定端子にお
ける論理値を、リセット状態が解除される時点において
ラッチするラッチ回路と、を備えて構成される。
The microcomputer of the second invention has an internal ROM and an electrically rewritable memory,
A single chip operating either one of the internal ROM and an external memory connected through a predetermined interface terminal as one of the data storage means through a selection operation by a logical value of a predetermined operation mode designating terminal. In the microcomputer, when the logical value at the time of releasing the reset state at the operation mode designating terminal is the logical value for selecting the data storage means in the external memory, access to the electrically rewritable memory is permitted /
It is configured to include a first flag that is prohibited and a latch circuit that latches the logical value at the operation mode designating terminal at the time when the reset state is released.

【0015】なお、前記第1のフラグは、電気的に書換
え可能なメモリにより構成してもよく、またはマスク式
ROMにより構成してもよく、或はまた、半導体製造プ
ロセスの金属配線により構成してもよい。
The first flag may be composed of an electrically rewritable memory, a mask ROM, or metal wiring of a semiconductor manufacturing process. May be.

【0016】[0016]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.

【0017】図1は本発明の一実施例を示すブロック図
である。図1に示されるように、本実施例のシングルチ
ップ・マイクロコンピュータ1は、外部メモリ7に対応
して、アドレス判定回路2と、内部ROM3と、セレク
タ4と、CPU5と、ラッチ回路6と、を備えて構成さ
れる。なお、これ以外の内部RAMおよびタイマ回路等
を含む構成要素については、本発明に直接関係しないた
め、図1においては図示されていない。本発明と前述の
従来例との相違点は、従来例に対して、新たにラッチ回
路6が付加されていることであり、その他の構成要素に
ついては、従来例の場合と同様であり、また、その動作
についても同様であるため、それらの説明については省
略する。
FIG. 1 is a block diagram showing an embodiment of the present invention. As shown in FIG. 1, the single-chip microcomputer 1 of the present embodiment corresponds to the external memory 7, an address determination circuit 2, an internal ROM 3, a selector 4, a CPU 5, a latch circuit 6, and It is configured with. It should be noted that the other components including the internal RAM, the timer circuit, and the like are not shown in FIG. 1 because they are not directly related to the present invention. The difference between the present invention and the above-described conventional example is that a latch circuit 6 is newly added to the conventional example, and other components are the same as those in the conventional example, and Since the operation is the same, the description thereof will be omitted.

【0018】ラッチ回路6においては、動作モード指定
端子51からのD端子に対するデータ入力に対応して、
リセット端子52からT端子に入力されるリセット信号
をトリガ入力として、Q端子からの出力信号はアドレス
判定回路2に入力される。このラッチ回路6の作用は、
リセット解除時における、動作モード指定端子51にお
けるレベルをそのままに保持することにあり、トリガ入
力となるリセット信号のレベルが、リセット・レベルか
ら非リセット・レベルに変化する時点の動作モード指定
端子51におけるレベレをラッチする。
In the latch circuit 6, in response to the data input from the operation mode designating terminal 51 to the D terminal,
The reset signal input from the reset terminal 52 to the T terminal is used as a trigger input, and the output signal from the Q terminal is input to the address determination circuit 2. The operation of this latch circuit 6 is
Since the level at the operation mode designation terminal 51 is maintained as it is at the time of reset release, the level of the reset signal serving as the trigger input changes from the reset level to the non-reset level at the operation mode designation terminal 51. Latch the level.

【0019】このような構成をとることにより、リセッ
ト解除後における動作モード指定端子51のレベルが変
更されても、ラッチ回路6のQ端子の出力は変化せず、
これに伴ない、アドレス判定回路2の動作も変化するこ
とがない。従って、前述の従来例における読出しプログ
ラムのように、外部メモリ動作モードで動作が開始され
た場合、プログラム実行中において動作モードを内部R
OM動作モードに変更することができず、内部ROM3
に格納されているデータを読出すことは不可能となる。
このように、本実施例によれば、ラッチ回路6の付加に
より、極めて簡単に、内部ROM3のデータ内容に関わ
る機密性が保持される。
With this configuration, the output of the Q terminal of the latch circuit 6 does not change even if the level of the operation mode designating terminal 51 is changed after the reset is released.
Along with this, the operation of the address determination circuit 2 does not change. Therefore, when the operation is started in the external memory operation mode like the read program in the above-mentioned conventional example, the operation mode is set to the internal R during the execution of the program.
Cannot change to OM operation mode, internal ROM3
It becomes impossible to read the data stored in.
As described above, according to the present embodiment, by adding the latch circuit 6, the confidentiality of the data content of the internal ROM 3 can be maintained very easily.

【0020】次に、本発明の第2の実施例について説明
する。図2に示されるのは、本実施例を示すブロック図
である。図2に示されるように、本実施例のシングルチ
ップ・マイクロコンピュータ1は、外部メモリ7に対応
して、アドレス判定回路2と、内部ROM3と、セレク
タ4、10および11と、CPU5と、ラッチ回路6
と、出力ポートラッチ8および9と、メモリ拡張フラグ
12と、AND回路13とを備えて構成される。また、
図3に示されるのは、本実施例における内部ROMおよ
び外部メモリの配置を示す図である。
Next, a second embodiment of the present invention will be described. FIG. 2 is a block diagram showing this embodiment. As shown in FIG. 2, the single-chip microcomputer 1 of this embodiment corresponds to the external memory 7, an address determination circuit 2, an internal ROM 3, selectors 4, 10 and 11, a CPU 5, a latch. Circuit 6
, Output port latches 8 and 9, a memory expansion flag 12, and an AND circuit 13. Also,
FIG. 3 is a diagram showing the arrangement of the internal ROM and the external memory in this embodiment.

【0021】本実施例は、前述の第1の実施例よりも実
用的な回路構成例であるが、図2において、セレクタ1
0および11と、出力ポート8および9とを備え、外部
メモリ7を使用しない場合においては、インタフェース
端子をポートとして使用することができるように回路が
構成されている点と、メモリ拡張フラグ12を備え、よ
り一層きめ細かく外部に対する操作が可能な構成として
いる点が、前記第1の実施例の場合と異なる点である。
This embodiment is a more practical circuit configuration example than the first embodiment described above, but in FIG.
0 and 11 and output ports 8 and 9, and when the external memory 7 is not used, the circuit is configured so that the interface terminal can be used as a port, and the memory expansion flag 12 is set. This is different from the case of the first embodiment in that it is provided with a structure that enables more detailed operation to the outside.

【0022】図2および図3を参照して、動作モード指
定端子53とメモリ拡張フラグ12の組合せによる、ア
ドレス判定回路2と、セレクタ4、10および11の動
作について説明する。図3においては、従来例における
説明と同様に、アドレス範囲を0〜FFFFの64Kバ
イト、内部ROM3は0〜3FFFの16Kバイトにマ
ッピングされているものとする。
The operation of the address determination circuit 2 and the selectors 4, 10 and 11 depending on the combination of the operation mode designation terminal 53 and the memory expansion flag 12 will be described with reference to FIGS. 2 and 3. In FIG. 3, it is assumed that the address range is mapped to 64 Kbytes of 0 to FFFF and the internal ROM 3 is mapped to 16 Kbytes of 0 to 3FFF as in the conventional example.

【0023】リセット解除後において、動作モード指定
端子53のレベルが、Exレベルである“0”の時に、
アドレス判定回路2からセレクタ4に対して入力される
信号を介して、セレクタ4においては、アドレス情報に
無関係に外部データ・バス203からのデータが選択さ
れて出力され、内部データ・バス202に出力される。
また、その際には、AND回路13の出力も、メモリ拡
張フラグ12のレベルに無関係に、Exレベルと同じ
“0”となり、AND回路13の出力“0”に対応し
て、セレクタ10および11を介して、内部アドレス・
バス201および内部データ・バス202は、それぞれ
対応するインタフェース端子に接続される。従って、図
3に示されるように、アドレス値に関係なく、外部メモ
リ7によってのみ動作する。
After the reset is released, when the level of the operation mode designating terminal 53 is "0" which is the Ex level,
Via the signal input from the address determination circuit 2 to the selector 4, the selector 4 selects and outputs the data from the external data bus 203 regardless of the address information, and outputs the data to the internal data bus 202. To be done.
At that time, the output of the AND circuit 13 also becomes "0", which is the same as the Ex level, regardless of the level of the memory expansion flag 12, and the selectors 10 and 11 correspond to the output "0" of the AND circuit 13. Via the internal address
The bus 201 and the internal data bus 202 are connected to the corresponding interface terminals. Therefore, as shown in FIG. 3, the external memory 7 operates only regardless of the address value.

【0024】動作モード指定端子53のレベルが“1”
で、メモリ拡張フラグ12の出力レベルが“0”の時に
は、アドレス判定回路2からセレクタ4に対して出力さ
れる信号を介して、セレクタ4においては、アドレス情
報が0〜3FFFHであれば内部ROM3からのデータ
が選択され、4000H〜FFFFHであれば外部メモ
リ7からのデータが選択されて、出力される。この場
合、AND回路13の出力は“0”で、Exレベルと同
じレベルをとっているため、セレクタ10および11に
おいては、それぞれ内部アドレス・バス201および内
部データ・バス202が選択される。従って、図3に示
されるように、アドレス情報に応じて、内部ROM3
と、外部メモリ7の両方に対してアクセスすることがで
きる。
The level of the operation mode designation terminal 53 is "1".
When the output level of the memory expansion flag 12 is "0", in the selector 4 via the signal output from the address determination circuit 2 to the selector 4, if the address information is 0 to 3FFFH, the internal ROM 3 From the external memory 7 is selected and output if 4000H to FFFFH. In this case, since the output of the AND circuit 13 is "0", which is the same level as the Ex level, the internal address bus 201 and the internal data bus 202 are selected in the selectors 10 and 11, respectively. Therefore, as shown in FIG. 3, according to the address information, the internal ROM 3
And the external memory 7 can be accessed.

【0025】次に、動作モード指定端子53が“1”
で、メモリ拡張フラグ12の出力レベルも“1”である
時には、アドレス判定回路2からセレクタ4に対して出
力される信号を介して、セレクタ4においては、アドレ
ス情報が0〜3FFFHであれば内部ROM3からのデ
ータが選択され、4000H〜FFFFHであれば外部
メモリ7からのデータが選択されるが、この場合におい
ては、AND回路13の出力は“1”で、Intレベル
と同じレベルをとっているため、セレクタ10および1
1においては、それぞれ出力ポートラッチ8および9が
選択される。従って、図3に示されるように、インタフ
ェース端子からは、外部メモリ7に対するインタフエー
ス信号ではなく、出力ポートとしてのデータが出力され
る。従って、この動作モードにおいては、外部メモリ7
に対しては接続が行われず、内部ROM3の範囲内にお
ける動作を介して、インタフエース端子をポート出力端
子として使用することが可能となる。
Next, the operation mode designation terminal 53 is "1".
Then, when the output level of the memory expansion flag 12 is also "1", if the address information is 0 to 3FFFH in the selector 4 via the signal output from the address determination circuit 2 to the selector 4, The data from the ROM 3 is selected, and if it is 4000H to FFFFH, the data from the external memory 7 is selected. In this case, the output of the AND circuit 13 is "1", which is the same level as the Int level. Selectors 10 and 1
At 1, the output port latches 8 and 9 are selected, respectively. Therefore, as shown in FIG. 3, not the interface signal to the external memory 7, but the data as the output port is output from the interface terminal. Therefore, in this operation mode, the external memory 7
However, the interface terminal can be used as a port output terminal through the operation within the range of the internal ROM 3.

【0026】第1の実施例における説明と同様に、ラッ
チ回路6においては、リセット解除時点における動作モ
ード指定端子53のレベルは、そのままに保持されるた
め、外部メモリ動作モードにおいて動作が開始された場
合には、内部ROM3に対するアクセスは不可能であ
り、従って、内部ROMのデータに関する機密性は保持
される。また、これに対して、内部ROM動作モードに
て動作が開始された場合には、メモリ拡張フラグ12を
プログラムで書換えることにより、外部メモリ7を使用
するか否かの選択を行うことができ、応用システムに応
じて、使い分けすることができるという利点がある。
Similar to the description in the first embodiment, the latch circuit 6 maintains the level of the operation mode designating terminal 53 at the time of reset release, so that the operation is started in the external memory operation mode. In this case, access to the internal ROM 3 is impossible, and thus confidentiality of the data in the internal ROM is maintained. On the other hand, when the operation is started in the internal ROM operation mode, it is possible to select whether to use the external memory 7 by rewriting the memory expansion flag 12 with a program. The advantage is that they can be used properly according to the application system.

【0027】次に、本発明の第3の実施例について説明
する。図4に示されるのは本実施例を示すブロック図で
ある。図4に示されるように、本実施例は、前述の第2
の実施例(図2参照)に対して、電気的に書換え可能な
メモリとして規定されるE2PROM動作指定フラグ1
4とE2 PROM15とを付加して構成される。
Next, a third embodiment of the present invention will be described. FIG. 4 is a block diagram showing this embodiment. As shown in FIG. 4, this embodiment is based on the second
2 (see FIG. 2), the E 2 PROM operation designation flag 1 defined as an electrically rewritable memory
4 and E 2 PROM 15 are added.

【0028】本実施例の重要なポイントは、E2 PRO
M15を搭載したシングルチップ・マイクロコンピュー
タ1に対して本発明を適用したことにある。E2 PRO
M15は、ソフトウェアにより自由に書換えることが可
能であり、しかも、電源供給が消失した後においても、
そのメモリ内容が消失しないために、個々の応用装置ご
との個別データの記憶用として使用されている。例え
ば、応用装置を使用するためのパスワードの記憶などで
ある。このような応用装置ごとの個別データは秘密性の
高いものであり、保秘性を高めることが必要である。こ
のE2 PROM15の保秘性を確保したシングルチップ
・マイクロコンピュータが、本実施例である。
The important point of this embodiment is that E 2 PRO
The present invention is applied to the single-chip microcomputer 1 equipped with the M15. E 2 PRO
M15 can be freely rewritten by software, and even after the power supply is lost
Since the memory contents are not lost, it is used for storing individual data for each application device. For example, storing a password for using the application device. Such individual data for each application device has high confidentiality, and it is necessary to improve confidentiality. The single-chip microcomputer that secures the security of the E 2 PROM 15 is the present embodiment.

【0029】以下、図4および図5を参照して、本実施
例におけるE2 PROM動作指定フラグ14、動モー
ド指定端子55およびメモリ拡張フラグ12による組合
せ動作と、アドレス判定回路2と、セレクタ4、10お
よび11の動作について説明する。なお、図5において
は、アドレス範囲を0〜FFFFの64Kバイト、内部
ROM3は0〜3FFFの16Kバイト、E2 PROM
15はFC00〜FFFFの1Kバイトにマッピングさ
れているものとする。
[0029] Hereinafter, with reference to FIGS. 4 and 5, E 2 PROM operation designation flag 14 in the present embodiment, a combination operation by operation mode designation terminal 55 and the memory extension flag 12, an address decision circuit 2, a selector The operations of 4, 10, and 11 will be described. In FIG. 5, the address range is 0 to FFFF of 64 Kbytes, the internal ROM 3 is 0 to 3FFF of 16 Kbytes, and E 2 PROM.
15 is mapped to 1K bytes of FC00 to FFFF.

【0030】E2 PROM動作指定フラグ14は、E2
PROM15またはマスク式ROM、或はまた金属配線
などにより形成され、電源が消失してもその記憶内容が
消失しないように構成されている。また、E2 PROM
15のように、ソフトウェアによりデータ内容を変更す
ることができるようにする場合には、非書込みレベル
(工場出荷段階におけるレベル)を、アドレス判定回路
2に対する供給レベルが“0”レベルとなるようにす
る。
The E 2 PROM operation designation flag 14 is set to E 2
It is formed of the PROM 15 or mask type ROM, or metal wiring, etc., and is configured so that the stored contents will not be lost even if the power source is lost. Also, E 2 PROM
When the data content can be changed by software as in 15, the non-write level (level at the factory shipping stage) is set so that the supply level to the address determination circuit 2 becomes "0" level. To do.

【0031】リセット解除後において、動作モード指定
端子55より入力されるレベルがExレベルの“0”の
時に、E2 PROM動作指定フラグ14が“0”レベル
の場合には、アドレス0〜FBFFの63Kバイトは外
部メモリ7に対してアクセスし、FCOO〜FFFFの
1Kバイトは内部のE2 PROM15に対してアクセス
するように、アドレス判定回路2は機能動作する。ま
た、動作モード指定端子55により入力されるレベルが
Exレベルの“0”の時に、E2 PROM動作指定フラ
グ14が“1”レベルの場合には、アドレス判定回路2
の機能動作を介して、アドレス0〜FFFFの64Kバ
イトは全て外部メモリ7に対してアクセスするように指
定される。即ち、E2 PROM動作指定フラグ14にお
けるレベル設定により、外部メモリ7を使用する場合
に、内部のE2 PROM15に対するアクセスを許可/
禁止する制御作用を行うことが可能となる。しかも、前
述のように、E2 PROM動作指定フラグ14は、電源
消失後においても内容が消失しない構成となっているた
めに、E2 PROM動作指定フラグ14に対する設定レ
ベルを“1”とすれば、完全に保秘性を保持することが
できる。また逆に、これによりE2 PROM15の保秘
性を保持する必要がなく、外部メモリ7からのアクセス
が必要な場合には、このE2 PROM動作指定フラグ1
4のレベルを変更することにより容易に対応することが
できる。
After the reset is released, when the level input from the operation mode designating terminal 55 is the Ex level "0", and the E 2 PROM operation designating flag 14 is the "0" level, the addresses 0 to FBFF are stored. The address determination circuit 2 functions so that 63 Kbytes are accessed to the external memory 7 and 1 Kbytes of FCOO to FFFF are accessed to the internal E 2 PROM 15. If the level input from the operation mode designating terminal 55 is the Ex level "0" and the E 2 PROM operation designating flag 14 is the "1" level, the address determination circuit 2
All 64 Kbytes of addresses 0 to FFFF are designated to access the external memory 7 through the functional operation of. That is, by setting the level in the E 2 PROM operation designation flag 14, when the external memory 7 is used, access to the internal E 2 PROM 15 is permitted /
It is possible to perform a control action that is prohibited. Moreover, as described above, since the contents of the E 2 PROM operation designation flag 14 are not lost even after the power is lost, if the setting level for the E 2 PROM operation designation flag 14 is set to “1”. , Can be completely confidential. On the contrary, when it is not necessary to maintain the security of the E 2 PROM 15 and the access from the external memory 7 is required, the E 2 PROM operation designation flag 1
It can be easily dealt with by changing the level of 4.

【0032】E2 PROM動作指定フラグ14が、E2
PROM15のようにソフトウェアにより書換え可能の
構成となっている場合にば、内部ROM3に格納されて
いるフログラムによりE2 PROM動作指定フラグ14
のレベルが設定される。但し、初期状態については、前
述のように外部メモリ7よりのアクセスが可能な状態と
なっている。マスク式ROMまたは金属配線による場合
には、製造段階において作り込むことが必要となるが、
シングルチップ・マイクロコンピュータの発注段階にお
いては、外部メモリ7からのアクセスが必要か否かが明
らかとなっているので、この指定を行うことは可能であ
る。
The E 2 PROM operation designation flag 14 is set to E 2
When the PROM 15 is rewritable by software, the E 2 PROM operation designation flag 14 is set by the program stored in the internal ROM 3.
Level is set. However, in the initial state, it is accessible from the external memory 7 as described above. When using a mask ROM or metal wiring, it is necessary to build it at the manufacturing stage,
At the stage of ordering the single-chip microcomputer, it is clear whether or not access from the external memory 7 is necessary, so this designation is possible.

【0033】リセット解除時点において、動作モード指
定端子55に対する入力レベルが、Intレベルの
“1”である時には、E2 PROM動作指定フラグ14
の指定レベルにも関わらず、メモリ拡張フラグ12にお
けるレベル設定により、外部メモリ7に対するアクセス
が変更されることは、前述の第2の実施例の場合と同様
である。また、第1の実施例の場合と同様に、ラッチ回
路6においては、リセット解除時点における動作モード
指定端子55のレベルは、そのまま保持されるために、
外部メモリ動作モードにおいて動作が開始される場合に
は、内部ROM3に対するアクセスは不可能となり、且
つE2 PROM動作指定フラグ14のレベルが“1”の
時にはE2 PROM15に対するアクセスも不可能とな
って、内部ROM3およびE2 PROM15に格納され
ているデータの機密性が保持される。これに対して、内
部ROM動作モードにおいて動作が開示される場合に
は、E2PROM動作指定フラグ14のレベル設定に関
わらず、E2 PROM15に対するアクセスが可能とな
り、メモリ拡張フラグ12により外部メモリ7を使用す
るか否かの選択が行われ、応用システムに応じてメモリ
の使い分けをすることができるという利点がある。
At the time of reset release, when the input level to the operation mode designation terminal 55 is the Int level "1", the E 2 PROM operation designation flag 14 is set.
The access to the external memory 7 is changed by the level setting in the memory expansion flag 12 regardless of the designated level of, as in the case of the second embodiment. Further, as in the case of the first embodiment, in the latch circuit 6, the level of the operation mode designating terminal 55 at the time of reset release is maintained as it is,
When the operation is started in the external memory operation mode, the access to the internal ROM 3 becomes impossible, and when the level of the E 2 PROM operation designation flag 14 is “1”, the access to the E 2 PROM 15 becomes impossible. , The confidentiality of the data stored in the internal ROM 3 and the E 2 PROM 15 is maintained. In contrast, if the operation is disclosed in internal ROM operation mode, E 2 regardless of the level setting of the PROM operation designation flag 14, it is possible to access to the E 2 PROM15, external memory 7 by the memory extension flag 12 Whether or not to use is selected, and there is an advantage that the memory can be used properly according to the application system.

【0034】[0034]

【発明の効果】以上説明したように、本発明は、動作モ
ード指定端子におけるレベルを、リセット解除時点にお
いてラッチするラッチ回路を設けることにより、内部R
OMおよび内部E2 PROMのデータ内容に関する機密
性を保持することができるという効果がある。
As described above, the present invention provides the internal R by providing the latch circuit for latching the level at the operation mode designating terminal at the time of reset release.
This has the effect of maintaining confidentiality regarding the data contents of the OM and the internal E 2 PROM.

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

【図1】本発明の第1の実施例を示すブロック図であ
る。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】本発明の第2の実施例を示すブロック図であ
る。
FIG. 2 is a block diagram showing a second embodiment of the present invention.

【図3】第2の実施例における内部ROMおよび外部メ
モリの配置を示す図である。
FIG. 3 is a diagram showing an arrangement of an internal ROM and an external memory in the second embodiment.

【図4】本発明の第3の実施例を示すブロック図であ
る。
FIG. 4 is a block diagram showing a third embodiment of the present invention.

【図5】第3の実施例における内部ROMおよび外部メ
モリの配置を示す図である。
FIG. 5 is a diagram showing an arrangement of an internal ROM and an external memory in the third embodiment.

【図6】従来例を示すブロック図である。FIG. 6 is a block diagram showing a conventional example.

【図7】従来例の、内部ROM読出し手順のフローチャ
ートを示す図である。
FIG. 7 is a diagram showing a flowchart of an internal ROM reading procedure of a conventional example.

【図8】従来例における内部ROM読出しプログラムの
配置を示す図である。
FIG. 8 is a diagram showing an arrangement of an internal ROM read program in a conventional example.

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

1 シングルチップ・マイクロコンピュータ 2 アドレス判定回路 3 内部ROM 4,10,11 セレクタ 5 CPU 6 ラッチ回路 7 外部メモリ 8,9 出力ポートラッチ 12 メモリ拡張フラグ 13 AND回路 14 E2 PROM動作指定フラグ 15 E2 PROM1 Single Chip Microcomputer 2 Address Judgment Circuit 3 Internal ROM 4, 10, 11 Selector 5 CPU 6 Latch Circuit 7 External Memory 8, 9 Output Port Latch 12 Memory Expansion Flag 13 AND Circuit 14 E 2 PROM Operation Designation Flag 15 E 2 PROM

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 内部ROMを有し、所定の動作モード指
定端子の論理値による選択作用を介して、前記内部RO
Mと、所定のインタフェース端子を介して接続される外
部メモリの何れか一方をデータ格納手段の一つとして稼
働するシングルチップ・マイクロコンピュータにおい
て、 前記動作モード指定端子における論理値を、リセット状
態が解除される時点においてラッチするラッチ回路を備
えることを特徴とするシングルチップ・マイクロコンピ
ュータ。
1. An internal ROM having an internal ROM, wherein the internal RO is selected through a selection operation according to a logical value of a predetermined operation mode designating terminal.
In a single-chip microcomputer operating either M or an external memory connected through a predetermined interface terminal as one of data storage means, a reset state releases a logical value at the operation mode designation terminal. A single-chip microcomputer including a latch circuit that latches at a specified time.
【請求項2】 内部ROMと電気的に書換え可能なメモ
リを有し、所定の動作モード指定端子の論理値による選
択作用を介して、前記内部ROMと、所定のインタフェ
ース端子を介して接続される外部メモリの何れか一方を
データ格納手段の一つとして稼働するシングルチップ・
マイクロコンピュータにおいて、 前記動作モード指定端子におけるリセット状態解除時点
の論理値が、前記外部メモリを前記データ格納手段を選
択する論理値であった時に、前記電気的に書換え可能な
メモリに対するアクセスを許可/禁止する第1のフラグ
と、 前記動作モード指定端子における論理値を、リセット状
態が解除される時点においてラッチするラッチ回路と、 を備えることを特徴とするシングルチップ・マイクロコ
ンピュータ。
2. An internal ROM is provided with a memory that is electrically rewritable, and is connected to the internal ROM through a predetermined interface terminal through a selection operation based on a logical value of a predetermined operation mode designating terminal. A single chip that operates either one of the external memories as one of the data storage means.
In the microcomputer, access to the electrically rewritable memory is permitted when the logical value at the time of releasing the reset state at the operation mode designating terminal is the logical value for selecting the external memory for the data storage unit. A single-chip microcomputer, comprising: a first flag for inhibiting; and a latch circuit for latching a logical value at the operation mode designating terminal at a time point when the reset state is released.
【請求項3】 前記第1のフラグが、電気的に書換え可
能なメモリにより構成されることを特徴とする請求項2
記載のシングルチップ・マイクロコンピュータ。
3. The first flag comprises an electrically rewritable memory.
The described single-chip microcomputer.
【請求項4】 前記第1のフラグが、マスク式ROMに
より構成されることを特徴とする請求項2記載のシング
ルチップ・マイクロコンピュータ。
4. The single-chip microcomputer according to claim 2, wherein the first flag comprises a mask ROM.
【請求項5】 前記第1のフラグが、半導体製造プロセ
スの金属配線により構成されることを特徴とする請求項
2記載のシングルチップ・マイクロコンピュータ。
5. The single-chip microcomputer according to claim 2, wherein the first flag is composed of metal wiring in a semiconductor manufacturing process.
JP4042616A 1991-03-06 1992-02-28 Single-chip microcomputer Pending JPH0689348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4042616A JPH0689348A (en) 1991-03-06 1992-02-28 Single-chip microcomputer

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP3964191 1991-03-06
JP3-39641 1991-03-06
JP4042616A JPH0689348A (en) 1991-03-06 1992-02-28 Single-chip microcomputer

Publications (1)

Publication Number Publication Date
JPH0689348A true JPH0689348A (en) 1994-03-29

Family

ID=26379027

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4042616A Pending JPH0689348A (en) 1991-03-06 1992-02-28 Single-chip microcomputer

Country Status (1)

Country Link
JP (1) JPH0689348A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002065287A1 (en) * 2001-02-16 2002-08-22 Sony Corporation Data processing method and its apparatus
US11226445B2 (en) 2019-11-01 2022-01-18 Samsung Display Co., Ltd. Display device viewable with polarizing sunglasses and method for manufacturing the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002065287A1 (en) * 2001-02-16 2002-08-22 Sony Corporation Data processing method and its apparatus
US7240345B2 (en) 2001-02-16 2007-07-03 Sony Corporation Data processing apparatus and associated method
US8141057B2 (en) 2001-02-16 2012-03-20 Sony Corporation Data processing apparatus and associated method
US11226445B2 (en) 2019-11-01 2022-01-18 Samsung Display Co., Ltd. Display device viewable with polarizing sunglasses and method for manufacturing the same

Similar Documents

Publication Publication Date Title
JP2682700B2 (en) IC card
JP3461234B2 (en) Data protection circuit
CA1221466A (en) Memory subsystem
JPH0812646B2 (en) Semiconductor integrated circuit
US6810471B2 (en) Memory protection method and circuit specifying attributes on access
US5987581A (en) Configurable address line inverter for remapping memory
EP0502532B1 (en) Single chip microcomputer having protection function for content of internal ROM
JPH04141794A (en) Ic card
US20050182885A1 (en) Semiconductor integrated circuit
US5127096A (en) Information processor operative both in direct mapping and in bank mapping, and the method of switching the mapping schemes
US6510501B1 (en) Non-volatile memory read/write security protection feature selection through non-volatile memory bits
JPH0689348A (en) Single-chip microcomputer
JP2710890B2 (en) Memory designation controller
JP3182906B2 (en) Microcomputer
JPH11297066A (en) Semiconductor device
JPH07334420A (en) Extended memory control circuit
KR900010178Y1 (en) Circuit for protecting ram output
GB2304209A (en) Starting up a processor system
JP3039479B2 (en) Extended BIOS protection system
JP2522063B2 (en) Single-chip micro computer
JPH08272603A (en) Data processor
JP2000099402A (en) Microcomputer
JPS62160555A (en) Storage protecting device of storage circuit
JPH0863445A (en) Data processor
JPH0635751A (en) Chip for evaluation

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19990914