JPH09204412A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH09204412A
JPH09204412A JP8010049A JP1004996A JPH09204412A JP H09204412 A JPH09204412 A JP H09204412A JP 8010049 A JP8010049 A JP 8010049A JP 1004996 A JP1004996 A JP 1004996A JP H09204412 A JPH09204412 A JP H09204412A
Authority
JP
Japan
Prior art keywords
mode
signal
microcomputer
mode setting
mode selection
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
JP8010049A
Other languages
Japanese (ja)
Inventor
Mamoru Tsunoda
護 角田
Yasuo Yamada
泰生 山田
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel 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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP8010049A priority Critical patent/JPH09204412A/en
Publication of JPH09204412A publication Critical patent/JPH09204412A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

(57)【要約】 【課題】 マイクロコンピュータ外部からの複数ビット
によるモード設定を、より少ない入力端子や出力端子を
用い、比較的簡単な回路で行えるようにする。 【解決手段】 リセットが解除されて(RSTバー)が
立ち上がるタイミングで、第1モード設定を行うべく、
MODから入力された第1回目のモードをD型ラッチL
1で保持し、出力Q1として出力する。続いて、マイク
ロコンピュータの外部にも出力されているメモリリード
信号(RDバー)の立ち下がりのタイミングで第2モー
ド設定のためのモード設定内容をMODから入力し、こ
れをD型ラッチL2で保持し、出力Q2として出力す
る。マイクロコンピュータが本来備えている制御信号
((RDバー)や(RSTバー))を用いて、1つのM
ODから複数のモード設定が可能となる。
(57) [PROBLEMS] To enable mode setting by a plurality of bits from the outside of a microcomputer with a relatively simple circuit by using fewer input terminals and output terminals. SOLUTION: In order to perform the first mode setting at the timing when the reset is released and (RST bar) rises,
The first mode input from MOD is the D-type latch L
It is held at 1 and output as the output Q1. Then, the mode setting contents for the second mode setting are input from the MOD at the timing of the fall of the memory read signal (RD bar) that is also output to the outside of the microcomputer, and this is held by the D-type latch L2. And output as output Q2. Using the control signals ((RD bar) and (RST bar)) that the microcomputer originally has, one M
Multiple modes can be set from the OD.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、外部メモリから命
令コードを順次取り込み、必要に応じて外部に対してデ
ータを入出力しながら、複数の前記命令コードによるプ
ログラムを処理するようにしたマイクロコンピュータに
係り、特に、当該マイクロコンピュータ外部からの複数
ビットに従った、当該マイクロコンピュータ内部の所望
のモード設定を、当該マイクロコンピュータのより少な
い入力端子や出力端子を用いて、比較的簡単な回路で行
えるようにすると共に、このような複数ビットのモード
設定の機能がない過去のマイクロコンピュータとの互換
性の維持もより容易に行なえるようにすることができる
マイクロコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer adapted to process a program based on a plurality of instruction codes while sequentially fetching instruction codes from an external memory and inputting / outputting data to / from the outside as needed. In particular, a desired mode setting inside the microcomputer according to a plurality of bits from the outside of the microcomputer can be performed with a relatively simple circuit by using fewer input terminals and output terminals of the microcomputer. The present invention also relates to a microcomputer capable of easily maintaining compatibility with a microcomputer of the past that does not have such a function of setting a mode of a plurality of bits.

【0002】[0002]

【従来の技術】今日広く用いられているマイクロコンピ
ュータは、外部メモリから命令コードを順次取り込み、
必要に応じて外部に対してデータを出力しながら、複数
の前記命令コードによるプログラムを処理するという機
能を有している。このようなマイクロコンピュータは、
CPU(central processing unit )、あるいはMPU
(micro processor unit)等とも呼ばれているが、以
降、マイクロコンピュータと称する。このようなマイク
ロコンピュータは、例えば従来ハードウェアによって構
成されていた電子装置にも利用され、ソフトウェア的に
機能を実現するということにも用いられている。又、A
SIC(application specific integratedcircuit )
では従来から、米国ザイログ社のZ80(MPU)の集
積回路パターンをマクロライブラリとして提供している
ものもある。
2. Description of the Related Art A microcomputer widely used today fetches instruction codes sequentially from an external memory,
It has a function of processing a program based on the plurality of instruction codes while outputting data to the outside as needed. Such a microcomputer is
CPU (central processing unit) or MPU
(Micro processor unit) is also called, hereinafter, referred to as the microcomputer. Such a microcomputer is also used, for example, in an electronic device which is conventionally configured by hardware, and is also used for realizing a function by software. Also, A
SIC (application specific integrated circuit)
Conventionally, there is also one that provides an integrated circuit pattern of Z80 (MPU) manufactured by Zilog Corporation in the United States as a macro library.

【0003】このようなマイクロコンピュータにおいて
は、複数のモード、例えば複数の動作モードを有するも
のがある。例えば、後述する第1実施形態や第2実施形
態のごとく、異なるタイプのメモリアクセスやI/O
(input/output)アクセスを定める3つの動作モード、
即ちモードA、モードB1及びモードB2を有するもの
がある。又、自己診断機能を有するマイクロコンピュー
タでは、通常動作モード、及び自己診断を行うテストモ
ードとを備えたものがある。
Some of such microcomputers have a plurality of modes, for example, a plurality of operation modes. For example, as in the first and second embodiments described later, different types of memory access and I / O
(Input / output) Three operation modes that determine access,
That is, there are those having a mode A, a mode B1 and a mode B2. Further, some microcomputers having a self-diagnosis function have a normal operation mode and a test mode for performing self-diagnosis.

【0004】このように複数のモードを備えたマイクロ
コンピュータでは、外部からいずれかのモードを選択
し、指定する必要がある。このようなモードの選択入力
は、最も簡単なものはマイクロコンピュータのパッケー
ジに、必要なモード設定を行うのに十分な数のモード選
択信号入力端子を設けるというものである。
In such a microcomputer having a plurality of modes, it is necessary to select and specify one of the modes from the outside. The simplest mode selection input is to provide a microcomputer package with a sufficient number of mode selection signal input terminals for setting the required mode.

【0005】しかしながら、マイクロコンピュータで
は、そのパッケージの種類に応じて入力端子や出力端子
又入出力端子の総数が定められている。従って、このよ
うに限られた数の端子を有効に利用する必要があり、動
作モード等のモードを選択入力するための端子について
も、極力数が少ない方が望ましい。
However, in the microcomputer, the total number of input terminals, output terminals, and input / output terminals is determined according to the type of package. Therefore, it is necessary to effectively use such a limited number of terminals, and it is desirable that the number of terminals for selectively inputting a mode such as an operation mode is as small as possible.

【0006】このため、特開平3−257685では、
外部リセット信号を遅延させてマイクロコンピュータの
リセットを行うようにすると共に、マイクロコンピュー
タがリセット状態にある間にモード選択信号を外部リセ
ット信号の立ち上がりで数回サンプルして、複数のモー
ド設定を1つのモード選択信号入力端子で行えるように
している。
Therefore, in Japanese Patent Laid-Open No. 3-257685,
While the microcomputer is reset by delaying the external reset signal, the mode selection signal is sampled several times at the rising edge of the external reset signal while the microcomputer is in the reset state to set a plurality of mode settings to one. The mode selection signal input terminal can be used.

【0007】ここで、外部リセット信号は、外部リセッ
ト信号入力端子から入力される信号であり、マイクロコ
ンピュータ内部の処理を初期化するための信号である。
又、モード選択信号は、モード選択信号入力端子から入
力される信号であり、マイクロコンピュータの動作モー
ド等のモードを設定するための信号である。
Here, the external reset signal is a signal input from the external reset signal input terminal, and is a signal for initializing the processing inside the microcomputer.
The mode selection signal is a signal input from the mode selection signal input terminal and is a signal for setting a mode such as an operation mode of the microcomputer.

【0008】又、特開平3−191433では、複数の
モード設定を順次行うために、これらのモード設定内容
を単一のモード選択信号入力端子から順次入力するよう
にしている。この特開平3−191433では、外部リ
セット信号の立ち上がり毎に複数のモード設定内容を順
次入力する前述の特開平3−257685とは異なり、
複数のモード設定内容を順次入力しサンプルするため
の、専用のタイミング回路を内部に有するようにしてい
る。
Further, in Japanese Patent Laid-Open No. 3-191433, in order to sequentially set a plurality of modes, the contents of these mode settings are sequentially input from a single mode selection signal input terminal. In this Japanese Patent Laid-Open No. 3-191433, unlike the above-mentioned Japanese Patent Laid-Open No. 3-257685 in which a plurality of mode setting contents are sequentially input at each rising edge of an external reset signal,
A dedicated timing circuit for sequentially inputting and sampling a plurality of mode setting contents is provided inside.

【0009】又、このようにシーケンシャルにモード選
択信号入力端子へ複数のモード設定内容を入力するため
の外部回路は比較的複雑になると思われるが、該特開平
3−191433の実施例ではマイクロコンピュータ内
部でこのような回路を備え、モード設定内容を定めるた
めの信号を出力端子OA1やOA2から出力するように
している。例えば特開平3−191433の第4図で
は、入力端子EA(第1図のMOD端子と考えられる)
に対して出力端子OA1、OA2、電源VDDあるいは
グランドGNDのいずれかを接続することで、第3図に
示されるような内部モードを設定可能としている。
Further, although an external circuit for sequentially inputting a plurality of mode setting contents to the mode selection signal input terminal is considered to be relatively complicated, in the embodiment of the Japanese Patent Laid-Open No. 3-191433, a microcomputer is used. Such a circuit is provided internally so that a signal for defining the mode setting content is output from the output terminals OA1 and OA2. For example, in FIG. 4 of JP-A-3-191433, an input terminal EA (considered to be the MOD terminal in FIG. 1)
By connecting any of the output terminals OA1 and OA2 to the power supply VDD or the ground GND, it is possible to set the internal mode as shown in FIG.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、前述の
特開平3−257685では、設定しようとする複数の
モードの設定内容に応じて、マイクロコンピュータへ入
力する外部リセット信号を複数回立ち上げながら、該立
ち上げに同期して複数のモード設定を単一のモード選択
信号入力端子から行うための比較的複雑な回路を、マイ
クロコンピュータの外部に設ける必要がある。このよう
な複雑な回路は、マイクロコンピュータのユーザの負担
となってしまうという問題がある。
However, in the above-mentioned Japanese Patent Laid-Open No. 3-257685, the external reset signal input to the microcomputer is raised a plurality of times according to the setting contents of the plurality of modes to be set, It is necessary to provide a relatively complicated circuit outside the microcomputer for setting a plurality of modes from a single mode selection signal input terminal in synchronization with the start-up. There is a problem in that such a complicated circuit imposes a burden on the user of the microcomputer.

【0011】又、この特開平3−257685では、こ
のように外部リセット信号を複数回立ち上げながら複数
のモード設定を行っているため、不用意に外部リセット
信号が立ち上げられてしまうと、当然ながら、意図しな
いモード設定がなされてしまう。又、外部リセット信号
入力端子へ入力する外部リセット信号にこのようなモー
ド設定の機能を付加させているため、このような機能を
有しない過去のマイクロコンピュータとの互換性が失わ
れてしまうという問題もある。
Further, in this Japanese Patent Laid-Open No. 3-257685, since a plurality of modes are set while raising the external reset signal a plurality of times as described above, it is natural that the external reset signal is raised carelessly. However, unintended mode settings are made. Further, since the function of such a mode setting is added to the external reset signal input to the external reset signal input terminal, the compatibility with a past microcomputer having no such function is lost. There is also.

【0012】次に、前述の特開平3−191433で
は、複数のモード設定を順次行うための、複数のモード
設定内容を単一のモード選択信号入力端子に対して順次
入力するための、マイクロコンピュータ外部の比較的複
雑な回路が必要となってしまう。このような複雑な回路
はマイクロコンピュータのユーザの負担となってしまう
という問題がある。
Next, in the above-mentioned Japanese Patent Laid-Open No. 3-191433, a microcomputer for sequentially inputting a plurality of mode setting contents into a single mode selection signal input terminal for sequentially setting a plurality of mode settings It requires an external, relatively complex circuit. There is a problem that such a complicated circuit imposes a burden on the user of the microcomputer.

【0013】なお、該特開平3−191433の前述の
実施例の如く、このように比較的複雑となってしまう回
路をマイクロコンピュータ内部に備えることもできる。
しかしながら、このようにマイクロコンピュータ内部に
備えるようにした場合には、該特開平3−191433
の第4図に示されるような前述の出力端子OA1やOA
2が必要となってしまい、マイクロコンピュータのパッ
ケージに備えられる端子をより多く必要となってしまう
という問題がある。
Incidentally, as in the above-mentioned embodiment of Japanese Patent Laid-Open No. 3-191433, such a circuit which becomes relatively complicated can be provided inside the microcomputer.
However, in the case of providing the inside of the microcomputer as described above, the method disclosed in Japanese Patent Laid-Open No. 3-191433
Of the above-mentioned output terminals OA1 and OA as shown in FIG.
2 is required, and there is a problem that more terminals are required to be provided in the package of the microcomputer.

【0014】又、このような出力端子OA1やOA2を
備えるようにすると、このような複数のモード設定の機
能がない過去のマイクロコンピュータとの互換性が失わ
れてしまうという問題がある。特開平3−191433
では、出力端子OA1やOA2は、モード設定以外の時
には他の目的にも利用することができるとしており、例
えば汎用の出力端子として使用することも可能であると
している。しかしながら、いずれにしても少なくともモ
ード設定の最中にはこれらの出力端子OA1やOA2は
汎用の出力端子として使用することができず、互換性と
いう点で問題が生じる。
Further, if the output terminals OA1 and OA2 are provided, there is a problem that compatibility with past microcomputers that do not have such a plurality of mode setting functions is lost. JP-A-3-191433
It is stated that the output terminals OA1 and OA2 can be used for other purposes other than the mode setting, and can be used as a general-purpose output terminal, for example. However, in any case, these output terminals OA1 and OA2 cannot be used as general-purpose output terminals at least during the mode setting, which causes a problem in compatibility.

【0015】マイクロコンピュータでは、新たな機能が
追加される場合があり、例えば従来にはないモード設定
を行うようになされることもある。このように新たな機
能が追加される場合にも、過去のマイクロコンピュータ
に対する互換性が維持されることが好ましい。しかしな
がら、前述のように特開平3−257685や特開平3
−191433では、モード設定が不要であった過去の
マイクロコンピュータとの互換性が失われてしまうとい
う問題がある。
In the microcomputer, a new function may be added, and for example, a mode setting which is not available in the past may be performed. Even when a new function is added in this way, it is preferable to maintain compatibility with past microcomputers. However, as described above, JP-A-3-257685 and JP-A-3-257685
In 191433, there is a problem that compatibility with past microcomputers that do not require mode setting is lost.

【0016】本発明は、前記従来の問題点を解決するべ
くなされたもので、マイクロコンピュータ外部からの複
数ビットに従った、当該マイクロコンピュータ内部の所
望のモード設定を、当該マイクロコンピュータのより少
ない入力端子や出力端子を用いて、比較的簡単な回路で
行えるようにすると共に、このような複数ビットのモー
ド設定の機能がない過去のマイクロコンピュータとの互
換性の維持もより容易に行なえるようにすることができ
るマイクロコンピュータを提供することを目的とする。
The present invention has been made in order to solve the above-mentioned conventional problems, in which a desired mode setting in the microcomputer according to a plurality of bits from the outside of the microcomputer can be input with less input of the microcomputer. Using terminals and output terminals, it is possible to do it with a relatively simple circuit, and it is easier to maintain compatibility with past microcomputers that do not have the function of mode setting of multiple bits. It is an object of the present invention to provide a microcomputer capable of performing.

【0017】[0017]

【課題を解決するための手段】本発明は、外部メモリか
ら命令コードを順次取り込み、必要に応じて外部に対し
てデータを入出力しながら、複数の前記命令コードによ
るプログラムを処理するようにしたマイクロコンピュー
タにおいて、当該マイクロコンピュータ内部の処理を初
期化するための外部リセット信号を入力する外部リセッ
ト信号入力端子と、第1モード設定、及び該第1モード
設定以後にも設定可能な第2モード設定のそれぞれのモ
ード設定内容を、この順に順次伝達するモード選択信号
を入力するモード選択信号入力端子と、外部に対する前
記命令コードの取り込みの制御、あるいは外部に対する
前記データの入出力の制御のために用いる、前記外部リ
セット信号によるリセットの解除の後の初期論理状態
が、前記第2モード設定のタイミング以前に変化する外
部制御信号を出力する外部制御信号出力端子と、前記外
部リセット信号の論理状態変化のタイミングで、前記モ
ード選択信号で示される前記第1モード設定を取り込
み、記憶する第1モード設定記憶素子と、前記外部制御
信号の論理状態変化のタイミングで、前記モード選択信
号で示される前記第2モード設定を取り込み、記憶する
第2モード設定記憶素子とを備えることで、前記第1モ
ード設定記憶素子に記憶される内容、及び前記第2モー
ド設定記憶素子に記憶される内容に従って、当該マイク
ロコンピュータ内部の所望のモード設定を行うようにし
たことにより、前記課題を解決したものである。
According to the present invention, instruction codes are sequentially fetched from an external memory, and a program based on a plurality of the instruction codes is processed while inputting / outputting data to / from the outside as needed. In a microcomputer, an external reset signal input terminal for inputting an external reset signal for initializing processing inside the microcomputer, a first mode setting, and a second mode setting that can be set after the first mode setting Each of the mode setting contents is used for inputting a mode selection signal for sequentially transmitting in this order, and for controlling the fetching of the instruction code to the outside or controlling the input / output of the data to the outside. The initial logical state after release of the reset by the external reset signal is the second mode An external control signal output terminal that outputs an external control signal that changes before a fixed timing; and a timing that captures and stores the first mode setting indicated by the mode selection signal at the timing of a change in the logical state of the external reset signal. By providing a first mode setting storage element and a second mode setting storage element that captures and stores the second mode setting indicated by the mode selection signal at the timing of a change in the logical state of the external control signal, According to the contents stored in the first mode setting storage element and the contents stored in the second mode setting storage element, a desired mode setting in the microcomputer is performed, thereby solving the above problems. is there.

【0018】又、前記マイクロコンピュータにおいて、
第1モード設定、及び前記第2モード設定のそれぞれの
モード設定を、前記モード選択信号として、前記モード
選択信号入力端子に定常的なL状態を入力するか、前記
モード選択信号として、前記モード選択信号入力端子に
定常的なH状態を入力するか、あるいは、前記モード選
択信号として、前記モード選択信号入力端子に前記外部
制御信号に従った信号を入力するかの、いずれかの選択
的な入力によって行うようにしたことにより、前記課題
を解決するとともに、前記第1モード設定及び前記第2
モード設定を設定するための前記モード選択信号入力端
子へ入力するための信号が、定常的なL状態、定常的な
H状態あるいはマイクロコンピュータから出力される前
記外部制御信号に従った信号とされているため、ユーザ
がマイクロコンピュータの外部に設ける回路が更に削減
され、ユーザの負担を減少したものである。
Further, in the above microcomputer,
Each of the first mode setting and the second mode setting is used as the mode selection signal by inputting a steady L state to the mode selection signal input terminal, or as the mode selection signal, the mode selection signal is input. Either a steady H state is input to the signal input terminal or a signal according to the external control signal is input to the mode selection signal input terminal as the mode selection signal. By doing so, the above problems can be solved, and the first mode setting and the second mode setting can be performed.
The signal for inputting to the mode selection signal input terminal for setting the mode setting is a signal in accordance with the steady L state, the steady H state, or the external control signal output from the microcomputer. Therefore, the circuit provided by the user outside the microcomputer is further reduced, and the burden on the user is reduced.

【0019】なお、本発明は前記外部制御信号を特に限
定するものではない。本発明の前記外部制御信号は上述
したように前記初期論理状態が変化するものであればよ
い。このような信号には多くのマイクロコンピュータに
おいて本来から備えられているものが多く、外部に対す
る命令コードの取り込みの制御のために従来から備えら
れている信号や、外部に対するデータの入出力の制御の
ために従来から備えられている信号がある。
The present invention does not particularly limit the external control signal. The external control signal of the present invention only needs to change the initial logical state as described above. Many of these signals are originally provided in many microcomputers, and the signals that have been provided conventionally for controlling the fetching of the instruction code to the outside and the control of the input / output of data to the outside. Therefore, there is a signal that is conventionally provided.

【0020】例えば、前述のザイログ社のZ80では、
外部リセット信号によるリセット状態では、メモリリー
ド信号(RDバー)はH状態となり、命令コード取り込
み信号(M1バー)はH状態となり、アドレス信号はす
べてハイインピーダンス状態となり、プルアップされて
いれば、このアドレス信号は16進数で“FFFF”と
なる。又、このようなリセットの解除の後には、メモリ
リード信号(RDバー)及び命令コード取り込み信号
(M1バー)はいずれも、リセット解除後の第1番目の
命令コードの取り込みのためにL状態となり、又アドレ
ス信号は16進数で“0000”となる。従って、これ
らメモリリード信号(RDバー)や命令コード取り込み
信号(M1バー)又アドレス信号を、本発明の外部制御
信号として用いることも考えられる。又、アドレス信号
を本発明の外部制御信号として用いる場合、Z80では
アドレス信号がプルアップされていれば、リセット解除
後の第1番目の命令コードの取り込みの際に、アドレス
信号のすべてのビットがH状態からL状態に論理状態が
変化するため、いずれかのビット1つを用いることも可
能であり、この場合、アドレス信号をデコードする必要
もない。
For example, in the Z80 manufactured by Zylog,
In the reset state by the external reset signal, the memory read signal (RD bar) is in the H state, the instruction code take-in signal (M1 bar) is in the H state, and the address signals are all in the high impedance state. The address signal is "FFFF" in hexadecimal. After the reset is released, the memory read signal (RD bar) and the instruction code fetch signal (M1 bar) are both in the L state for fetching the first instruction code after the reset is released. Also, the address signal is "0000" in hexadecimal. Therefore, it is conceivable to use these memory read signal (RD bar), command code fetch signal (M1 bar) or address signal as the external control signal of the present invention. Further, when the address signal is used as the external control signal of the present invention, if the address signal is pulled up in Z80, all the bits of the address signal are fetched at the time of fetching the first instruction code after reset release. Since the logic state changes from the H state to the L state, it is possible to use any one bit, and in this case, it is not necessary to decode the address signal.

【0021】又、前記マイクロコンピュータにおいて、
前記外部制御信号が、前記外部リセット信号によるリセ
ットの解除の後の初期論理状態が、該リセット解除後の
第1番目の前記命令コードの取り込みの際に変化する、
外部に対する前記命令コードの取り込みの制御に用いる
信号であることにより、前記課題を解決するとともに、
外部に対する前記命令コードの取り込み制御のためにマ
イクロコンピュータが本来から備えている信号をも用い
ることを可能としながら同時に、第1番目の命令コード
の取り込みという、比較的早い段階でモード設定がすべ
て終了できるようにしたものである。
In the microcomputer,
The external control signal changes an initial logical state after release of reset by the external reset signal at the time of fetching the first instruction code after release of the reset,
With the signal used for controlling the fetching of the instruction code to the outside, the above problem is solved and
While it is possible to use the signal originally provided by the microcomputer for controlling the fetching of the instruction code to the outside, at the same time, the mode setting is completed at a relatively early stage of fetching the first instruction code. It was made possible.

【0022】なお、このようなマイクロコンピュータの
外部に対する命令コードの取り込みの制御に用いるにつ
いて、本発明は具体的に限定するものではない。このよ
うな命令コードの取り込みの制御に用いる信号には、例
えば、ザイログ社のZ80では、メモリリード信号(R
Dバー)や命令コード取り込み信号(M1バー)、又ア
ドレス信号等がある。
The present invention is not specifically limited to the use for controlling the fetching of the instruction code to the outside of such a microcomputer. A signal used for controlling the fetching of such an instruction code is, for example, a memory read signal (R
D bar), command code fetch signal (M1 bar), address signal, etc.

【0023】又、前記マイクロコンピュータにおいて、
前記外部制御信号が、前記初期論理状態の変化のタイミ
ングが相互に異なる、モード取り込み外部制御信号、及
びモード設定外部制御信号の少なくとも2種類の信号と
されており、前記モード取り込み外部制御信号が、前記
外部リセット信号によるリセットの解除の後の第1番目
の前記命令コードの取り込みのタイミングで論理状態が
変化して、該命令コード取り込みタイミングを示す信号
であって、又、前記第2モード設定記憶素子での前記第
2モード設定の取り込みタイミングを示すために用いる
信号であり、一方、前記モード設定外部制御信号が、前
記外部リセット信号によるリセットの解除の後の第1番
目の前記命令コードの取り込みのタイミング以前に論理
状態が変化して、該命令コード取り込み中の状態を示す
信号であって、又、前記モード選択信号として前記モー
ド選択信号入力端子に入力して用いる信号であることに
より、前記課題を解決するとともに、マイクロコンピュ
ータ外部からのモード設定をより容易に行えるように配
慮し、又該モード設定がなされてからこれがマイクロコ
ンピュータに取り込まれるタイミングについても配慮し
た、より具体的なマイクロコンピュータとしたものであ
る。即ち、前記外部制御信号が、前記モード取り込み外
部制御信号及び前記モード設定外部制御信号のタイミン
グが相互に異なる2種類とされており、タイミング設計
についても十分考慮されている。前記モード設定外部制
御信号に比べて前記モード取り込み外部制御信号の方
が、前記初期論理状態が早いタイミングで変化する。こ
のため、早いタイミングで生じる前記モード設定外部制
御信号の初期論理状態の変化のタイミングでモード設定
を行い、この後、前記モード取り込み外部制御信号の初
期論理状態が変化するタイミングで設定されたモードを
取り込むことができ、確実に設定されたモードを取り込
みことができる。
In the above microcomputer,
The external control signal is at least two kinds of signals, that is, a mode-capturing external control signal and a mode-setting external control signal whose timings of change of the initial logic state are different from each other. It is a signal indicating the instruction code fetch timing when the logic state changes at the timing of fetching the first instruction code after the reset is released by the external reset signal, and the second mode setting storage A signal used to indicate the fetch timing of the second mode setting in the device, while the mode setting external control signal fetches the first instruction code after the reset is released by the external reset signal. Is a signal indicating that the instruction code is being fetched by changing the logic state before the timing of Since the signal is used by being input to the mode selection signal input terminal as the mode selection signal, it is possible to solve the problems described above and to make it easier to set the mode from the outside of the microcomputer. This is a more specific microcomputer that takes into consideration the timing of taking it into the microcomputer after the above. That is, the external control signal is of two types in which the timing of the mode acquisition external control signal and the timing of the mode setting external control signal are different from each other, and the timing design is sufficiently taken into consideration. The initial logic state of the mode fetching external control signal changes at an earlier timing than that of the mode setting external control signal. Therefore, the mode setting is performed at the timing of the change of the initial logical state of the mode setting external control signal that occurs at an early timing, and then the mode set at the timing of the change of the initial logical state of the mode acquisition external control signal is set. It can be captured, and the set mode can be captured reliably.

【0024】以下、本発明の原理について簡単に説明す
る。
The principle of the present invention will be briefly described below.

【0025】本発明は、以下に述べるような事実を見出
し、又着目することによってなされている。
The present invention has been made by finding and paying attention to the following facts.

【0026】即ち、まず、マイクロコンピュータの2つ
のモードを設定する場合、外部リセット信号によるリセ
ット中に、必ずしもすべて同時に行う必要がない。設定
するモードによっては、設定するタイミングがリセット
後にへと、多少遅れても問題ない場合が多い。例えば後
述する第1実施形態や第2実施形態のモードBにおい
て、モードB1とするか、あるいはモードB2とするか
の設定は、I/Oアクセス以前であればよく、リセット
解除後少しぐらいモード設定が遅れてしまっても問題と
はならない。
That is, first, when setting the two modes of the microcomputer, it is not necessary to perform all of them at the same time during the reset by the external reset signal. Depending on the mode to be set, there is often no problem even if the setting timing is delayed after resetting. For example, in the mode B of the first and second embodiments described later, the setting of whether to set the mode B1 or the mode B2 may be performed before the I / O access, and the mode setting may be set a little after the reset is released. It doesn't matter if you are late.

【0027】ここで、単一のモード選択信号入力端子か
ら複数のモード設定を行う際に、それぞれのモード設定
内容を順次入力する場合、該設定を行うためのマイクロ
コンピュータ内部の回路と、マイクロコンピュータ外部
の回路とで、なんらかの同期を取る必要がある。即ち、
マイクロコンピュータの内部の回路と外部の回路とで、
前記モード選択信号入力端子から順次入力するモード設
定内容の、個々の入力の同期を取る必要がある。
Here, when a plurality of modes are set from a single mode selection signal input terminal, when the contents of each mode setting are sequentially input, a circuit inside the microcomputer for performing the setting and a microcomputer. It is necessary to establish some kind of synchronization with the external circuit. That is,
With the internal circuit of the microcomputer and the external circuit,
It is necessary to synchronize each input of the mode setting contents sequentially input from the mode selection signal input terminal.

【0028】このような同期を取るためには、マイクロ
コンピュータの内部回路側がタイミングの主導権を持っ
て、マイクロコンピュータ内部から外部へとタイミング
の同期を取るための信号を出力する必要がある。あるい
は、マイクロコンピュータ外部の回路側がタイミング制
御の主導権を持ち、マイクロコンピュータ外部から内部
へとタイミングの同期を取るためのなんらかの信号を入
力する必要がある。
In order to achieve such synchronization, it is necessary for the internal circuit side of the microcomputer to take the initiative in timing and output a signal for achieving timing synchronization from the inside of the microcomputer to the outside. Alternatively, it is necessary for the circuit side outside the microcomputer to take the initiative in timing control, and to input some signal from outside the microcomputer to inside for timing synchronization.

【0029】しかしながら、このようなタイミングの同
期を取るための信号を入出力するために、マイクロコン
ピュータのパッケージに専用の端子を設けることは、該
パッケージ上の端子数の削減という点で好ましくない。
従って、本発明においては、外部メモリから命令コード
を順次取り込み、必要に応じて外部に対してデータを入
出力するという、マイクロコンピュータが本来持ってい
る機能を実現するための、該マイクロコンピュータが本
来持っている外部制御信号を、このようなタイミングの
同期にも用いるようにしている。
However, it is not preferable to provide a dedicated terminal in the package of the microcomputer in order to input and output such a signal for synchronizing the timing because the number of terminals on the package is reduced.
Therefore, in the present invention, the microcomputer is originally designed to realize the function originally possessed by the microcomputer, that is, sequentially fetching the instruction code from the external memory and inputting / outputting the data to / from the outside when necessary. The external control signal that is held is also used for such timing synchronization.

【0030】即ち、モード設定を行うために、マイクロ
コンピュータ内部の動作のタイミングを外部リセット信
号及び外部制御信号に基づいて制御する。一方、モード
設定を行うためのマイクロコンピュータ外部の回路の動
作のタイミングは、同じく外部リセット信号及び外部制
御信号に従って行う。これら外部リセット信号も外部制
御信号も、マイクロコンピュータ本来が備えている当該
マイクロコンピュータ外部への入力信号あるいは出力信
号であるため、モード設定のタイミングの同期を取るた
めにマイクロコンピュータ内部と外部との間の新たな信
号を設ける必要がなく、当該マイクロコンピュータのパ
ッケージに新たな端子を設ける必要がない。
That is, in order to set the mode, the operation timing inside the microcomputer is controlled based on the external reset signal and the external control signal. On the other hand, the timing of the operation of the circuit outside the microcomputer for setting the mode is similarly performed according to the external reset signal and the external control signal. Since both the external reset signal and the external control signal are input signals or output signals to the outside of the microcomputer originally provided in the microcomputer, the internal and external of the microcomputer must be synchronized to synchronize the timing of mode setting. No new signal need be provided, and no new terminal need be provided in the package of the microcomputer.

【0031】このように、本発明においては、外部リセ
ット信号及び外部制御信号に従って動作のタイミングが
制御され、本発明が備える第1モード設定記憶素子や第
2モード設定記憶素子は、これら外部リセット信号や外
部制御信号によって動作タイミングが制御される。又、
この制御には、マイクロコンピュータの外部への新たな
入力信号や出力信号は特に必要がない。従って、本発明
によれば、前記第1モード設定記憶素子に記憶される内
容、及び前記第2モード設定記憶素子に記憶される内容
に従って、当該マイクロコンピュータ内部の所望のモー
ド設定を行うことができ、マイクロコンピュータ外部か
らの複数ビットに従った、当該マイクロコンピュータ内
部の所望のモード設定を、当該マイクロコンピュータの
より少ない入力端子や出力端子を用いて、比較的簡単な
回路で行えるようにすると共に、このような複数ビット
のモード設定の機能がない過去のマイクロコンピュータ
との互換性の維持もより容易に行なえるようにすること
ができる。
As described above, in the present invention, the operation timing is controlled in accordance with the external reset signal and the external control signal, and the first mode setting storage element and the second mode setting storage element included in the present invention have these external reset signals. And the external control signal controls the operation timing. or,
This control does not particularly require a new input signal or output signal to the outside of the microcomputer. Therefore, according to the present invention, a desired mode setting inside the microcomputer can be performed according to the contents stored in the first mode setting storage element and the contents stored in the second mode setting storage element. , According to a plurality of bits from the outside of the microcomputer, a desired mode setting inside the microcomputer, using a smaller number of input terminals and output terminals of the microcomputer, with a relatively simple circuit, It is possible to more easily maintain compatibility with past microcomputers that do not have the function of mode setting of multiple bits.

【0032】なお、マイクロコンピュータでなされるモ
ード設定のうち、前述の特開平3−191433で言及
されているようなノンマスカブル割り込みの優先順位の
設定や、内部ROM(read only memory)の使用禁止等
は、基本的にマイクロコンピュータが通常の動作を開始
するより前に決定されている必要がある。従って、この
ようにマイクロコンピュータの通常の動作の開始前に設
定されている必要のあるものについては、本発明におい
て、第1モード設定にて設定するようにすればよい。
Among the mode settings made by the microcomputer, the setting of the priority order of non-maskable interrupts and the prohibition of use of the internal ROM (read only memory) as mentioned in the above-mentioned Japanese Patent Laid-Open No. 3-191433. Basically, it needs to be decided before the microcomputer starts normal operation. Therefore, in the present invention, those that need to be set before the normal operation of the microcomputer is set in the first mode setting in the present invention.

【0033】[0033]

【発明の実施の形態】以下、図を用いて本発明の実施の
形態を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below in detail with reference to the drawings.

【0034】まず、本発明が適用された第1実施形態及
び第2実施形態のマイクロコンピュータの設定しようと
するモードについて説明する。
First, modes to be set in the microcomputers of the first and second embodiments to which the present invention is applied will be described.

【0035】本発明の第1実施形態及び第2実施形態の
マイクロコンピュータのモードは、大別してモードA及
びモードBの2モードとなる。又、該モードBは、モー
ドB1及びモードB2の2種類で構成される。従って、
これら実施形態のマイクロコンピュータのモードは、モ
ードAに加えて、モードB1及びモードB2の、都合3
モードとなっている。又、これらモードA、B1及びB
2それぞれは、メモリアクセスのタイミング及びI/O
アクセスのタイミングが、下記の表1の通りである。即
ち、まずモードAでは、メモリアクセスのタイミングが
3クロックであり、I/Oアクセスのタイミングが4ク
ロックである。又、モードB1では、メモリアクセスの
タイミングが3クロックであり、I/Oアクセスのタイ
ミングが4クロックである。モードB2のメモリアクセ
スのタイミングは3クロックであり、I/Oアクセスの
タイミングは6クロックである。
The modes of the microcomputers of the first and second embodiments of the present invention are roughly classified into two modes, mode A and mode B. The mode B is composed of two types, mode B1 and mode B2. Therefore,
In addition to the mode A, the modes of the microcomputers of these embodiments are the mode 3 of the mode B1 and the mode B2.
Mode. Also, these modes A, B1 and B
2 each have a memory access timing and I / O
The access timing is shown in Table 1 below. That is, first, in mode A, the memory access timing is 3 clocks and the I / O access timing is 4 clocks. In mode B1, the memory access timing is 3 clocks and the I / O access timing is 4 clocks. In the mode B2, the memory access timing is 3 clocks and the I / O access timing is 6 clocks.

【0036】[0036]

【表1】 [Table 1]

【0037】又、これら第1実施形態及び第2実施形態
のマイクロコンピュータでは、基本的にザイログ社のZ
80と同様の外部制御信号を出力する。即ち、これら第
1実施形態及び第2実施形態のマイクロコンピュータで
は、外部に対する命令コードの取り込み制御、あるいは
外部に対するデータの入出力の制御のために用いる外部
制御信号は、Z80と同様となっている。例えば、外部
メモリから命令コードやデータを入力する際には、メモ
リリード信号(RDバー)がL状態のアクティブ状態
(アクティブLow)となる。又、このように外部メモ
リから取り込むものが特に命令コードであれば、命令コ
ード取り込み信号(M1バー)もL状態のアクティブ状
態(アクティブLow)となる。
Further, in the microcomputers of the first and second embodiments, the Z-log manufactured by Zilog Co. is basically used.
The same external control signal as 80 is output. That is, in the microcomputers of the first and second embodiments, the external control signal used for controlling the fetching of the instruction code to the outside or controlling the input / output of the data to the outside is the same as Z80. . For example, when an instruction code or data is input from the external memory, the memory read signal (RD bar) becomes an active state (active Low) in the L state. Further, if the instruction code to be fetched from the external memory is a particular instruction code, the instruction code fetch signal (M1 bar) also becomes the active state (active Low) in the L state.

【0038】ここで、これら第1実施形態及び第2実施
形態では、いずれも、前述の表1に示した3つのモー
ド、即ちモードA、モードB1及びB2の設定内容を、
単一のモード選択信号入力端子から2回サンプルして行
い、これによって2回のモード設定を行う。
In each of the first and second embodiments, the setting contents of the three modes shown in Table 1 above, that is, the mode A, the modes B1 and B2, are set as follows.
Sampling is performed twice from a single mode selection signal input terminal, and thus mode setting is performed twice.

【0039】即ち、下記の表2に示される如く、第1回
目のモード設定では、モードAとするか、あるいはモー
ドB(モードB1及びモードB2を含む)とするかのモ
ード設定を行う。この第1回目のモード設定では、モー
ド選択信号入力端子へL状態が入力された場合モードA
が設定され、該モード選択信号入力端子へH状態が入力
された場合モードBが設定される。第1回目のモード設
定でモードBが設定された場合、次に、第2回目のモー
ド設定では、モードB1あるいはモードB2のいずれか
のモード設定がなされる。この第2回目のモード設定で
は、モード選択信号入力端子へH状態が入力された場合
モードB1が設定され、該モード選択信号入力端子へL
状態が入力された場合モードB2が設定される。
That is, as shown in Table 2 below, in the first mode setting, mode A or mode B (including mode B1 and mode B2) is set. In the first mode setting, when the L state is input to the mode selection signal input terminal, the mode A
Is set, and when the H state is input to the mode selection signal input terminal, the mode B is set. When the mode B is set in the first mode setting, then either the mode B1 or the mode B2 is set in the second mode setting. In the second mode setting, when the H state is input to the mode selection signal input terminal, the mode B1 is set, and the mode selection signal input terminal is set to L.
When the state is input, the mode B2 is set.

【0040】[0040]

【表2】 [Table 2]

【0041】又、これら本発明の第1実施形態及び第2
実施形態では、このような第1回目のモード設定は、外
部リセット信号(RSTバー)の立ち上がりでなされ
る。この外部リセット信号(RSTバー)はアクティブ
Lowであり、L状態となるとリセット状態となる。
又、これら第1実施形態及び第2実施形態では、メモリ
リード信号(RDバー)の立ち上がりのタイミングに
て、第2回目のモード設定がなされ、モードB1あるい
はモードB2の設定がなされる。このメモリリード信号
(RDバー)はアクティブLowであり、外部メモリか
ら命令コードあるいはデータを取り込む際にL状態とな
る。
Further, these first and second embodiments of the present invention
In the embodiment, such a first mode setting is performed at the rising edge of the external reset signal (RST bar). This external reset signal (RST bar) is active low, and when it is in the L state, it is in the reset state.
Further, in the first and second embodiments, the second mode setting is performed at the rising timing of the memory read signal (RD bar), and the mode B1 or the mode B2 is set. This memory read signal (RD bar) is active low, and is in the L state when the instruction code or the data is fetched from the external memory.

【0042】特に、外部リセット信号(RSTバー)が
一端立ち上がった後の第1回目のメモリリード信号(R
Dバー)の立ち下がりのタイミングは、アドレス“00
00(16進)”のアドレスから最初の命令コードを取
り込む動作となる。従って、このときには、命令コード
取り込み信号(M1バー)もL状態となる。
Particularly, the first memory read signal (R) after the external reset signal (RST bar) once rises.
The falling timing of (D bar) is the address "00
The first instruction code is fetched from the address "00 (hexadecimal)". Therefore, at this time, the instruction code fetch signal (M1 bar) is also in the L state.

【0043】このようにリセット解除後に外部に対して
さなれるアクセスは命令コードの取り込みであり、外部
メモリの読み出しアクセスとなる。このため、モードA
であるかあるいはモードBであるかのモード設定はリセ
ット解除後すみやかに設定されている必要がある。この
ため、本発明の第1実施形態及び第2実施形態では、こ
のようなモードAあるいはモードBのモード設定を、リ
セット解除時、即ち外部リセット信号(RSTバー)の
立ち上がり時に、第1回目のモード設定として行ってい
る。この第1回目のモード設定は、外部リセット信号
(RSTバー)の立ち上がりのタイミングの論理状態の
サンプルを行うことによってなされる。
As described above, the access made to the outside after the reset is released is the fetching of the instruction code and the reading access to the external memory. Therefore, mode A
It is necessary that the mode setting of whether the mode is the mode B or the mode B is set promptly after the reset is released. Therefore, in the first and second embodiments of the present invention, the mode setting of the mode A or the mode B is performed at the first time when the reset is released, that is, when the external reset signal (RST bar) rises. This is done as a mode setting. The first mode setting is performed by sampling the logical state of the rising timing of the external reset signal (RST bar).

【0044】一方、モードB1あるいはモードB2の、
I/Oアクセスタイミングのモード選択は、I/Oアク
セスに入る前に決定されていればよい。従って、メモリ
リード信号(RDバー)が立ち下がって、第1番目の命
令コードを取り込むタイミングで、第2回目のモード設
定としてモード選択信号入力端子からモード設定を行う
ようにしている。
On the other hand, in mode B1 or mode B2,
The mode selection of the I / O access timing may be decided before entering the I / O access. Therefore, at the timing when the memory read signal (RD bar) falls and the first instruction code is fetched, mode setting is performed from the mode selection signal input terminal as the second mode setting.

【0045】まず、本発明の第1実施形態について、図
を用いながら詳細に説明する。
First, the first embodiment of the present invention will be described in detail with reference to the drawings.

【0046】図1は、本発明が適用された第1実施形態
のマイクロコンピュータのモード設定回路の回路図であ
る。
FIG. 1 is a circuit diagram of a mode setting circuit of the microcomputer of the first embodiment to which the present invention is applied.

【0047】本第1実施形態では、本発明の外部制御信
号は、初期論理状態の変化のタイミングが相互に異な
る、モード取り込み外部制御信号及びモード設定外部制
御信号の2種類の信号とされている。本実施形態におい
て、前記モード取り込み外部制御信号はメモリリード信
号(RDバー)である。前記モード設定外部制御信号は
命令コード取り込み信号(M1バー)となっている。こ
れらのメモリリード信号(RDバー)及び命令コード取
り込み信号(M1バー)は、本実施形態のマイクロコン
ピュータが本来有している制御信号である。
In the first embodiment, the external control signals of the present invention are two kinds of signals, that is, a mode-capturing external control signal and a mode-setting external control signal, which are different in the timing of change of the initial logic state. . In this embodiment, the mode capture external control signal is a memory read signal (RD bar). The mode setting external control signal is an instruction code fetch signal (M1 bar). The memory read signal (RD bar) and the instruction code fetch signal (M1 bar) are control signals originally possessed by the microcomputer of this embodiment.

【0048】この図1において、本発明の第1モード設
定記憶素子は、インバータI1及びD型ラッチL1によ
って構成される。このような第1モード設定記憶素子で
は、リセットが解除されて外部リセット信号(RSTバ
ー)が立ち上がると、D型ラッチL1はこの立ち上がり
のタイミングでのモード選択信号入力端子MODの論理
状態を保持する。この保持される論理状態は、第1モー
ド設定であり、モードAあるいはモードBのいずれかを
設定する。
In FIG. 1, the first mode setting memory element of the present invention is composed of an inverter I1 and a D-type latch L1. In such a first mode setting memory element, when the reset is released and the external reset signal (RST bar) rises, the D-type latch L1 holds the logic state of the mode selection signal input terminal MOD at the timing of this rise. . This held logical state is the first mode setting, and either mode A or mode B is set.

【0049】次にこの図1において、本発明の第2モー
ド設定記憶素子は、RSフリップフロップFF1及びD
型ラッチL2によって構成される。まず、外部リセット
信号(RSTバー)がL状態となってリセット状態とな
ると、RSフリップフロップFF1の出力する信号G2
はL状態となる。この後に、第1番目の命令コードを取
り込むためにメモリリード信号(RDバー)が立ち下が
ると、RSフリップフロップFF1が出力する信号G2
は立ち下がる。従って、この第2モード設定記憶素子で
は、外部制御信号とされるメモリリード信号(RDバ
ー)のリセット状態時の初期の論理状態が変化する、第
1番目の命令コードの取り込みの際に、この時のモード
選択信号入力端子MODの論理状態がD型ラッチL2に
保持される。このように保持される論理状態は、第2モ
ード設定となり、モードB1あるいはモードB2の設定
を行う第2回目のモード設定となる。
Next, referring to FIG. 1, the second mode setting memory element of the present invention comprises RS flip-flops FF1 and D.
It is constituted by a mold latch L2. First, when the external reset signal (RST bar) is in the L state and is in the reset state, the signal G2 output from the RS flip-flop FF1 is output.
Is in the L state. After this, when the memory read signal (RD bar) falls in order to fetch the first instruction code, the signal G2 output from the RS flip-flop FF1
Falls. Therefore, in the second mode setting storage element, when the first instruction code that changes the initial logical state at the reset state of the memory read signal (RD bar) which is an external control signal is fetched The logic state of the mode selection signal input terminal MOD at that time is held in the D-type latch L2. The logic state held in this way becomes the second mode setting, which is the second mode setting for setting the mode B1 or the mode B2.

【0050】このようにモード選択信号入力端子MOD
の論理状態の第1回目のサンプルを保持するD型ラッチ
L1が出力する信号Q1によって、モードAあるいはモ
ードBの設定を行う。又、モード選択信号入力端子MO
Dの論理状態の2回目のサンプルを保持するD型ラッチ
L2が出力する信号Q2によって、モードB1あるいは
モードB2の設定を行う。
As described above, the mode selection signal input terminal MOD
The mode A or the mode B is set by the signal Q1 output from the D-type latch L1 which holds the first sample of the logic state. Also, the mode selection signal input terminal MO
The mode B1 or the mode B2 is set by the signal Q2 output from the D-type latch L2 that holds the second sample of the D logic state.

【0051】従って、本実施形態においては、前述の表
2のごとく、まずモードAを設定する場合には、モード
選択信号として、モード選択信号入力端子MODに定常
的なL状態を入力する。即ち、図2に示すごとく、モー
ド選択信号入力端子MODをグランドGNDへ接続す
る。これによって、外部リセット信号(RSTバー)の
立ち上がりにてサンプルされる、第1回目のモード設定
に用いるモード選択信号入力端子MODの論理状態はL
状態となる。又、メモリリード信号(RDバー)の立ち
下がりでサンプルされる、第2回目のモード設定で用い
るモード選択信号入力端子MODの論理状態もL状態と
なる。
Therefore, in this embodiment, as shown in Table 2 above, when setting the mode A, a steady L state is input to the mode selection signal input terminal MOD as a mode selection signal. That is, as shown in FIG. 2, the mode selection signal input terminal MOD is connected to the ground GND. As a result, the logic state of the mode selection signal input terminal MOD used for the first mode setting, which is sampled at the rising edge of the external reset signal (RST bar), is L.
State. Further, the logic state of the mode selection signal input terminal MOD used in the second mode setting, which is sampled at the falling edge of the memory read signal (RD bar), also becomes the L state.

【0052】次に、モードB1を設定する場合、モード
選択信号としてモード選択信号入力端子MODに定常的
なH状態を入力するため、図3に示すごとくモード選択
信号入力端子MODを電源VDDへ接続する。すると、
第1回目のモード設定の際のモード選択信号入力端子M
ODの論理状態はH状態となり、第2回目のモード設定
の際のモード選択信号入力端子MODの論理状態はH状
態となり、モードB1が設定される。
Next, when setting the mode B1, since a steady H state is input to the mode selection signal input terminal MOD as a mode selection signal, the mode selection signal input terminal MOD is connected to the power supply VDD as shown in FIG. To do. Then
Mode selection signal input terminal M for the first mode setting
The logic state of OD becomes the H state, the logic state of the mode selection signal input terminal MOD at the time of the second mode setting becomes the H state, and the mode B1 is set.

【0053】次に、モードB2を設定する際、モード選
択信号として、モード選択信号入力端子MODに対し
て、本発明の外部制御信号に相当する、命令コード取り
込み信号(M1バー)を図4に示すごとく入力する。こ
の命令コード取り込み信号(M1バー)は、本実施形態
のマイクロコンピュータが本来持っている出力信号であ
る。このように命令コード取り込み信号(M1バー)を
モード選択信号入力端子MODへ入力することで、第1
回目のモード設定ではH状態が取り込まれ、第2回目の
モード設定ではL状態が取り込まれ、従ってモードB2
が設定される。
Next, when setting the mode B2, an instruction code fetch signal (M1 bar) corresponding to the external control signal of the present invention is input to the mode selection signal input terminal MOD as a mode selection signal as shown in FIG. Enter as shown. This command code fetch signal (M1 bar) is an output signal originally possessed by the microcomputer of this embodiment. By inputting the instruction code fetching signal (M1 bar) to the mode selection signal input terminal MOD in this manner, the first
The H state is fetched in the second mode setting, and the L state is fetched in the second mode setting.
Is set.

【0054】図5は、本実施形態の動作を示すタイムチ
ャートである。
FIG. 5 is a time chart showing the operation of this embodiment.

【0055】この図5においては、モードB2を設定す
るために、モード選択信号入力端子MODへ命令コード
取り込み信号(M1バー)を入力しているときのタイミ
ングが示される。
FIG. 5 shows the timing when the instruction code fetch signal (M1 bar) is input to the mode selection signal input terminal MOD to set the mode B2.

【0056】この図5においてはまず外部リセット信号
(RSTバー)がL状態となっており、本実施形態のマ
イクロコンピュータはリセット状態となっている。この
後外部リセット信号(RSTバー)が立ち上がってリセ
ット解除となると、時刻t11においてインバータI1
が出力する信号G1が立ち下がる。該信号G1が立ち下
がると、このときのモード選択信号入力端子MODの論
理状態、即ちH状態がD型ラッチL1に取り込まれ、保
持される。従って、この後の該D型ラッチL1が出力す
る信号Q1はH状態に保持される。この信号Q1はモー
ドAあるいはモードBを設定するためのものである。信
号Q1がH状態の場合、モードBが選択される。
In FIG. 5, the external reset signal (RST bar) is first in the L state, and the microcomputer of this embodiment is in the reset state. After this, when the external reset signal (RST bar) rises to release the reset, the inverter I1
The signal G1 output from the device falls. When the signal G1 falls, the logic state of the mode selection signal input terminal MOD at this time, that is, the H state is fetched and held in the D-type latch L1. Therefore, the signal Q1 output from the D-type latch L1 thereafter is held in the H state. This signal Q1 is for setting the mode A or the mode B. When the signal Q1 is in the H state, the mode B is selected.

【0057】この後、命令コード取り込み信号(M1バ
ー)が入力されているモード選択信号入力端子MOD
は、時刻t12にて立ち下がる。これは、第1番目の命
令コードを取り込むためである。すると、該時刻t12
の後に、D型ラッチL2が出力する信号Q2もL状態と
なる。しかしながら、該時刻t12の段階では、D型ラ
ッチL2は論理状態の保持を行ってはいない。
After this, the mode selection signal input terminal MOD to which the instruction code fetch signal (M1 bar) is input.
Falls at time t12. This is to capture the first instruction code. Then, the time t12
After that, the signal Q2 output from the D-type latch L2 also becomes the L state. However, at the time t12, the D-type latch L2 does not hold the logic state.

【0058】この後メモリリード信号(RDバー)が立
ち下がる。これは、第1番目の命令コードを取り込むた
めである。このようにメモリリード信号(RDバー)が
立ち下がると、時刻t13において信号G2が立ち下が
る。又、該信号G2が立ち下がると、この時のモード選
択信号入力端子MODの論理状態、即ちL状態がD型ラ
ッチL2で保持される。このように保持されるため、D
型ラッチL2が出力する信号Q2は、この後L状態とな
る。該信号Q2はモードB1あるいはモードB2の設定
を行うために用いられる。この図5のタイムチャートで
は該信号Q2がL状態であるため、モードB2が選択さ
れている。
After this, the memory read signal (RD bar) falls. This is to capture the first instruction code. When the memory read signal (RD bar) falls in this way, the signal G2 falls at time t13. When the signal G2 falls, the logic state of the mode selection signal input terminal MOD at this time, that is, the L state is held by the D-type latch L2. Because it is held in this way, D
The signal Q2 output from the mold latch L2 is then in the L state. The signal Q2 is used to set the mode B1 or the mode B2. In the time chart of FIG. 5, since the signal Q2 is in the L state, the mode B2 is selected.

【0059】以上説明した通り、本実施形態によれば、
モード選択信号入力端子MODをグランドGNDに接続
するか、電源VDDに接続するか、あるいは命令コード
取り込み信号(M1バー)を入力するかによって、モー
ドA、B1あるいはB2の設定を行うことができる。こ
のように本実施形態では、3つのモードA、B1及びB
2の設定を行うために設けられているM1の端子はモー
ド選択信号入力端子MODのみとなっている。このよう
にモード設定を行うためのマイクロコンピュータ外部の
回路は、図2〜図4を用いて前述したように、グランド
GNDや電源VDDあるいは命令コード取り込み信号
(M1バー)に関する配線のみであり、非常に簡便なも
のとなっている。従って、本発明によれば、マイクロコ
ンピュータ外部からの複数ビットに従った、当該マイク
ロコンピュータ内部の所望のモード設定を、当該マイク
ロコンピュータのより少ない入力端子や出力端子を用い
て、比較的簡単な回路で行えるようにすると共に、この
ような複数ビットのモード設定の機能がない過去のマイ
クロコンピュータとの互換性の維持もより容易に行なえ
るようにすることができるという優れた効果を得ること
ができる。
As described above, according to this embodiment,
The mode A, B1, or B2 can be set depending on whether the mode selection signal input terminal MOD is connected to the ground GND, the power supply VDD, or the instruction code fetch signal (M1 bar) is input. Thus, in this embodiment, the three modes A, B1 and B are
The terminal of M1 provided for setting 2 is only the mode selection signal input terminal MOD. As described above with reference to FIGS. 2 to 4, the circuit outside the microcomputer for setting the mode is only the wiring for the ground GND, the power supply VDD, or the command code capture signal (M1 bar), and It is very easy to use. Therefore, according to the present invention, a desired mode setting inside the microcomputer according to a plurality of bits from the outside of the microcomputer can be performed by using a relatively simple circuit using less input terminals and output terminals of the microcomputer. It is also possible to obtain an excellent effect that it is possible to easily maintain compatibility with past microcomputers that do not have the function of mode setting of multiple bits like this. .

【0060】ここで、モードA、B1あるいはB2の設
定を行わない従来のマイクロコンピュータに対する本実
施形態の互換性を考える。すると、このような従来のも
のに対する本実施形態の相違はモード選択信号入力端子
MODの有無のみであり、従来のマイクロコンピュータ
のモードをモードAに割り付け、該モード選択信号入力
端子MODをH状態に固定すれば、本実施形態のマイク
ロコンピュータを、このような従来のマイクロコンピュ
ータと同様に用いることができ、動作等の面でより完全
に互換性を保つことができる。
Here, the compatibility of the present embodiment with a conventional microcomputer in which the mode A, B1 or B2 is not set will be considered. Then, the difference of this embodiment from the conventional one is only the presence or absence of the mode selection signal input terminal MOD. The mode of the conventional microcomputer is assigned to the mode A, and the mode selection signal input terminal MOD is set to the H state. If fixed, the microcomputer of the present embodiment can be used in the same manner as such a conventional microcomputer, and it is possible to maintain complete compatibility in terms of operation and the like.

【0061】以下、図を用いて本発明の第2実施形態に
ついて説明する。
The second embodiment of the present invention will be described below with reference to the drawings.

【0062】図6は、本発明が適用された第2実施形態
のマイクロコンピュータのモード設定回路の回路図であ
る。
FIG. 6 is a circuit diagram of a mode setting circuit of the microcomputer of the second embodiment to which the present invention is applied.

【0063】本第2実施形態において、本発明の外部制
御信号はメモリリード信号(RDバー)となっている。
このメモリリード信号(RDバー)は本実施形態のマイ
クロコンピュータが本来備えている信号である。本実施
形態では、このメモリリード信号(RDバー)によっ
て、第2回目のモード設定のタイミングを定めるととも
に、モードB2を設定する際にはこのメモリリード信号
(RDバー)をモード選択信号入力端子MODへも入力
するようにしている。
In the second embodiment, the external control signal of the present invention is a memory read signal (RD bar).
This memory read signal (RD bar) is a signal originally included in the microcomputer of this embodiment. In this embodiment, the memory read signal (RD bar) determines the timing of the second mode setting, and when setting the mode B2, the memory read signal (RD bar) is set to the mode selection signal input terminal MOD. I also try to enter.

【0064】この図6において、本発明の第1モード設
定記憶素子は、インバータI2及びD型ラッチL5によ
って構成されている。本実施形態の第1モード設定記憶
素子の構成及び動作は、前述した第1実施形態と同様で
ある。
In FIG. 6, the first mode setting memory element of the present invention is composed of an inverter I2 and a D-type latch L5. The configuration and operation of the first mode setting storage element of this embodiment are the same as those of the first embodiment described above.

【0065】次にこの図6において本発明の第2モード
設定記憶素子は、D型ラッチL3及びL4と、AND論
理ゲートD1と、RSフリップフロップFF2と、D型
ラッチL6とによって構成されている。
Next, in FIG. 6, the second mode setting storage element of the present invention is composed of D-type latches L3 and L4, an AND logic gate D1, an RS flip-flop FF2, and a D-type latch L6. .

【0066】ここで、本実施形態のRSフリップフロッ
プFF2及びD型ラッチL6は、前述の第1実施形態の
RSフリップフロップFF1及びD型ラッチL2と同様
に動作する。
Here, the RS flip-flop FF2 and the D-type latch L6 of the present embodiment operate in the same manner as the RS flip-flop FF1 and the D-type latch L2 of the first embodiment described above.

【0067】又、本実施形態のD型ラッチL3、L4及
びAND論理ゲートD1は、クロック信号CLKが次に
立ち上がる時までメモリリード信号(RDバー)の立ち
下がりを遅延させた信号(R1バー)を生成するための
回路である。このように信号(R1バー)の立ち下がり
を遅延させるのは、モードB2を設定するためには本実
施形態ではメモリリード信号(RDバー)をモード選択
信号入力端子MODへ入力するが、この場合に、モード
選択信号入力端子MODの論理状態をD型ラッチL6が
正しく取り込めるようにするためである。モード選択信
号入力端子MODへ入力されるメモリリード信号(RD
バー)の論理状態を該メモリリード信号(RDバー)そ
のものの立ち下がりで読み込むと、正しく読み込めない
虞があるため、このような遅延を行う。信号(R1バ
ー)の立ち下がりのタイミングが遅延されることでD型
ラッチL6の保持するタイミングが遅延され、モード選
択信号入力端子MODの論理状態が安定した状態で該論
理状態をD型ラッチL6は取り込み保持することができ
る。
Further, the D-type latches L3 and L4 and the AND logic gate D1 of the present embodiment delay the fall of the memory read signal (RD bar) until the next rise of the clock signal CLK (R1 bar). Is a circuit for generating. In this way, in order to set the mode B2, the memory read signal (RD bar) is input to the mode selection signal input terminal MOD in order to delay the fall of the signal (R1 bar). In addition, the D-type latch L6 can correctly take in the logic state of the mode selection signal input terminal MOD. Memory read signal (RD) input to mode selection signal input terminal MOD
If the logic state of the bar) is read at the trailing edge of the memory read signal (RD bar) itself, it may not be read correctly, so such a delay is performed. By delaying the falling timing of the signal (R1 bar), the timing held by the D-type latch L6 is delayed, and the logical state of the mode selection signal input terminal MOD is stabilized, and the D-type latch L6 changes the logical state. Can be captured and retained.

【0068】本実施形態では、モードAを設定する場合
には、モード選択信号として、モード選択信号入力端子
MODに定常的なL状態を入力するため、図7に示すご
とく、モード選択信号入力端子MODをグランドGND
へ接続する。これによって、第1回目のモード設定の際
のモード選択信号入力端子MODの論理状態はL状態と
なり、第2回目のモード設定の際のモード選択信号入力
端子MODの論理状態はL状態となり、従ってモードA
が設定される。
In the present embodiment, when the mode A is set, a steady L state is input to the mode selection signal input terminal MOD as a mode selection signal, so that the mode selection signal input terminal is input as shown in FIG. MOD to Grand GND
Connect to As a result, the logic state of the mode selection signal input terminal MOD at the time of the first mode setting becomes the L state, and the logic state of the mode selection signal input terminal MOD at the time of the second mode setting becomes the L state. Mode A
Is set.

【0069】次に本実施形態においてモードB1を設定
する際、モード選択信号として、モード選択信号入力端
子MODに定常的なH状態を入力するため、図8に示す
ごとく、モード選択信号入力端子MODを電源VDDに
接続する。これによって、第1回目のモード設定の際に
モード選択信号入力端子MODはH状態となり、第2回
目のモード設定の際にモード選択信号入力端子MODは
H状態となり、従ってモードB1が設定される。
Next, when setting the mode B1 in the present embodiment, since a steady H state is input to the mode selection signal input terminal MOD as a mode selection signal, the mode selection signal input terminal MOD is input as shown in FIG. Is connected to the power supply VDD. As a result, the mode selection signal input terminal MOD is in the H state during the first mode setting, and the mode selection signal input terminal MOD is in the H state during the second mode setting, so that the mode B1 is set. .

【0070】次に、本実施形態においてモードB2を設
定する際、モード選択信号として、モード選択信号入力
端子MODに、図9に示すごとく、本発明の外部制御信
号に相当するメモリリード信号(RDバー)を入力す
る。すると、信号G1が立ち下がるタイミングでなされ
る第1回目のモード設定の際、モード選択信号入力端子
MODはH状態となる。信号G2が立ち下がるタイミン
グでなされる第2回目のモード設定の際、モード選択信
号入力端子MODはL状態となる。従って、モードB2
が設定される。
Next, when setting the mode B2 in the present embodiment, as a mode selection signal, a memory read signal (RD) corresponding to the external control signal of the present invention is input to the mode selection signal input terminal MOD as shown in FIG. Bar). Then, in the first mode setting performed at the timing when the signal G1 falls, the mode selection signal input terminal MOD is in the H state. At the time of the second mode setting performed at the timing when the signal G2 falls, the mode selection signal input terminal MOD is in the L state. Therefore, mode B2
Is set.

【0071】図10は、本実施形態のモード設定の動作
を示すタイムチャートである。
FIG. 10 is a time chart showing the mode setting operation of this embodiment.

【0072】この図10のタイムチャートでは、モード
選択信号入力端子MODに対してメモリリード信号(R
Dバー)を入力してモードB2を設定する際の動作が示
されている。
In the time chart of FIG. 10, the memory read signal (R
The operation when inputting (D bar) to set the mode B2 is shown.

【0073】この図10においてはまず初期段階では、
外部リセット信号(RSTバー)がL状態で、本実施形
態のマイクロコンピュータはリセット状態にある。この
後時刻t21において外部リセット信号(RSTバー)
が立ち上がってリセットが解除されると、インバータI
2が出力する信号G1が立ち下がり、該時刻t21にお
けるモード選択信号入力端子MODの論理状態(H状
態)をD型ラッチL5が取り込む。従って、該時刻t2
1以後では、D型ラッチL5はH状態を保持し、H状態
の信号Q1を出力する。
In FIG. 10, first in the initial stage,
When the external reset signal (RST bar) is in the L state, the microcomputer of this embodiment is in the reset state. After this, at time t21, an external reset signal (RST bar)
Is reset and the reset is released, the inverter I
The signal G1 output by 2 falls, and the D-type latch L5 captures the logic state (H state) of the mode selection signal input terminal MOD at the time t21. Therefore, the time t2
After 1, the D-type latch L5 holds the H state and outputs the signal Q1 in the H state.

【0074】この後時刻t22において、リセット解除
後の第1番目の命令コードを取り込むために、メモリリ
ード信号(RDバー)が立ち下がる(アクティブLo
w)。又、モード選択信号入力端子MODにもこのメモ
リリード信号(RDバー)が入力されているため、該時
刻t22においてこのモード選択信号入力端子MODも
立ち下がる。該モード選択信号入力端子MODが立ち下
がると、D型ラッチL6の出力Q2も立ち下がる。な
お、D型ラッチL5は入力Gに入力される信号G1がL
状態であるため、H状態を保持しつづけ、その出力Q1
はH状態のままとなる。
Thereafter, at time t22, the memory read signal (RD bar) falls (active Lo) in order to fetch the first instruction code after reset release.
w). Since the memory read signal (RD bar) is also input to the mode selection signal input terminal MOD, the mode selection signal input terminal MOD also falls at the time t22. When the mode selection signal input terminal MOD falls, the output Q2 of the D-type latch L6 also falls. The D-type latch L5 receives the signal G1 input to the input G as L
Since it is in the state, it keeps the H state and outputs its output Q1.
Remains in the H state.

【0075】時刻t23では、クロック信号CLKが立
ち上がる。すると、D型ラッチL3はL状態のメモリリ
ード信号(RDバー)を取り込むため、該D型ラッチL
3が出力する信号(SRDバー)は立ち下がる。このと
き信号(SSRDバー)はH状態であり、信号(SRD
バー)との論理演算によって、AND論理ゲートD1が
出力する信号(R1バー)は立ち下がる。更に、該信号
(R1バー)が立ち下がると、RSフリップフロップF
F2が出力する信号G2が立ち下がる。すると、該信号
G2を入力するD型ラッチL6は、時刻t24における
該信号G2の立ち下がりのタイミングでのモード選択信
号入力端子MODの論理状態を保持し、保持する論理状
態を信号Q2として出力する。
At time t23, the clock signal CLK rises. Then, since the D-type latch L3 takes in the memory read signal (RD bar) in the L state, the D-type latch L3
The signal (SRD bar) output by 3 falls. At this time, the signal (SSRD bar) is in the H state, and the signal (SRD bar) is
The signal (R1 bar) output from the AND logic gate D1 falls due to the logical operation with the bar. Further, when the signal (R1 bar) falls, the RS flip-flop F
The signal G2 output by F2 falls. Then, the D-type latch L6 which inputs the signal G2 holds the logic state of the mode selection signal input terminal MOD at the falling timing of the signal G2 at time t24, and outputs the held logic state as the signal Q2. .

【0076】前述の時刻t21にてモードAあるいはモ
ードBを設定するための出力Q1が保持され、時刻t2
4においてモードB1あるいはモードB2を設定するた
めの出力Q2が保持されると、本実施形態でのモード設
定はほぼ終了する。即ち、モードB2が正しく設定され
る。
At the time t21, the output Q1 for setting the mode A or the mode B is held and the time t2 is reached.
When the output Q2 for setting the mode B1 or the mode B2 is held in 4, the mode setting in the present embodiment is almost completed. That is, the mode B2 is set correctly.

【0077】なお、この後の本実施形態の動作は、下記
のようなものである。
The operation of this embodiment after this is as follows.

【0078】時刻t25ではクロック信号CLKが立ち
上がる。すると、D型ラッチL4はL状態の信号(SR
Dバー)を取り込むため、該D型ラッチL4が出力する
信号(SSRDバー)は立ち下がる。このとき、信号
(SRDバー)はL状態であり、信号(SSRDバー)
はL状態であるため、AND論理ゲートD1が出力する
信号(R1バー)は立ち上がる。
At time t25, the clock signal CLK rises. Then, the D-type latch L4 receives the L-state signal (SR
Since D bar is taken in, the signal (SSRD bar) output from the D-type latch L4 falls. At this time, the signal (SRD bar) is in the L state, and the signal (SSRD bar) is
Is in the L state, the signal (R1 bar) output from the AND logic gate D1 rises.

【0079】時刻t26では、リセット解除後の第1番
目の命令コードの取り込の終了によって、メモリリード
信号(RDバー)が立ち上がる。又、メモリリード信号
(RDバー)はモード選択信号入力端子MODに入力さ
れているため、この時刻t26では、該モード選択信号
入力端子MODの信号も立ち上がる。時刻t27でクロ
ック信号CLKが立ち上がると、信号(SRDバー)も
立ち上がる。時刻t28においてクロック信号CLKが
立ち上がると、信号(SSRDバー)も立ち上がる。
At time t26, the memory read signal (RD bar) rises due to the end of the fetching of the first instruction code after the reset release. Since the memory read signal (RD bar) is input to the mode selection signal input terminal MOD, the signal of the mode selection signal input terminal MOD also rises at time t26. When the clock signal CLK rises at time t27, the signal (SRD bar) also rises. When the clock signal CLK rises at time t28, the signal (SSRD bar) also rises.

【0080】このように本実施形態おいては、本発明の
外部制御信号としてメモリリード信号(RDバー)を用
いながら本発明を適用することができる。本実施形態で
は、D型ラッチL3及びL4とAND論理ゲートD1と
において、メモリリード信号(RDバー)をクロック信
号CLKの立ち上がりで2回サンプルし、その論理状態
の差分によりRSフリップフロップFF2をリセットす
ることで信号G2が立ち下がり、該信号G2の立ち下が
りの際にD型ラッチL6でモード選択信号入力端子MO
Dをサンプルし、出力Q2を保持するようにしている。
このような本実施形態についても、マイクロコンピュー
タ外部からの複数ビットに従った、当該マイクロコンピ
ュータ内部の所望のモード設定を、当該マイクロコンピ
ュータのより少ない入力端子や出力端子を用いて、比較
的簡単な回路で行えるようにすると共に、このような複
数ビットのモード設定の機能がない過去のマイクロコン
ピュータとの互換性の維持もより容易に行なえるように
することができるという優れた効果を得ることができ
る。
As described above, in the present embodiment, the present invention can be applied while using the memory read signal (RD bar) as the external control signal of the present invention. In the present embodiment, in the D-type latches L3 and L4 and the AND logic gate D1, the memory read signal (RD bar) is sampled twice at the rising edge of the clock signal CLK, and the RS flip-flop FF2 is reset depending on the difference between the logic states. As a result, the signal G2 falls, and when the signal G2 falls, the D-type latch L6 is used to select the mode selection signal input terminal MO.
D is sampled and the output Q2 is held.
Also in this embodiment, a desired mode setting in the microcomputer according to a plurality of bits from the outside of the microcomputer can be performed relatively easily by using less input terminals and output terminals of the microcomputer. It is possible to obtain an excellent effect that it can be performed by a circuit and can easily maintain compatibility with past microcomputers that do not have such a function of setting a mode of multiple bits. it can.

【0081】なお、前述の第1及び第2実施形態におい
ては、モードA、B1及びB2の合計3つのモード設定
が必要であった。ここで、これら実施形態において、例
えば合計4つのモード設定が必要な場合に、このような
4つのモードを区別して設定することについても考え
る。即ち、前述の表1及び表2に示した3つのモードに
加えて、第1モード設定においてモード選択信号入力端
子へL状態を入力し、第2モード設定においてモード選
択信号入力端子にH状態を入力するという、第4のモー
ド設定も考える。ここで、この第4番目のモード、即ち
第1モード設定でL状態を設定し、第2モード設定でH
状態を設定するモード設定は、インバータゲートをマイ
クロコンピュータの外部で1つ用い、マイクロコンピュ
ータから出力される命令コード取り込み信号(M1バ
ー)を該インバータで反転させてモード選択信号入力端
子MODへ入力させればよい。
In the first and second embodiments described above, a total of three mode settings of modes A, B1 and B2 are required. Here, in these embodiments, for example, when a total of four modes need to be set, it is also considered to distinguish and set such four modes. That is, in addition to the three modes shown in Tables 1 and 2, the L state is input to the mode selection signal input terminal in the first mode setting and the H state is input to the mode selection signal input terminal in the second mode setting. Consider also the fourth mode setting of inputting. Here, the L state is set in the fourth mode, that is, the first mode setting, and the H state is set in the second mode setting.
For the mode setting for setting the state, one inverter gate is used outside the microcomputer, and the instruction code fetch signal (M1 bar) output from the microcomputer is inverted by the inverter and input to the mode selection signal input terminal MOD. Just do it.

【0082】[0082]

【発明の効果】以上説明した通り、本発明によれば、マ
イクロコンピュータ外部からの複数ビットに従った、当
該マイクロコンピュータ内部の所望のモード設定を、当
該マイクロコンピュータのより少ない入力端子や出力端
子を用いて、比較的簡単な回路で行えるようにすると共
に、このような複数ビットのモード設定の機能がない過
去のマイクロコンピュータとの互換性の維持もより容易
に行なえるようにすることができるマイクロコンピュー
タを提供することができるという優れた効果を得ること
ができる。本発明においては、1つのモード選択信号入
力端子を用いて3つのモードあるいは4つのモードを選
択することができる。この際、リセット解除後の第1番
目の命令コードの取り込みに用いるマイクロコンピュー
タが本来備えている制御信号を本発明の外部制御信号と
して有効に利用することで、モード選択信号入力端子に
入力されるモード選択信号をサンプルするタイミング発
生回路を簡潔にすることができ、回路規模を縮小するこ
とができる。
As described above, according to the present invention, a desired mode setting inside the microcomputer can be set in accordance with a plurality of bits from the outside of the microcomputer by using less input terminals and output terminals of the microcomputer. Microcomputers that can be used with a relatively simple circuit and can more easily maintain compatibility with past microcomputers that do not have such multi-bit mode setting function. The excellent effect of being able to provide a computer can be obtained. In the present invention, one mode selection signal input terminal can be used to select three modes or four modes. At this time, the control signal originally included in the microcomputer used for fetching the first instruction code after the reset is released is effectively used as the external control signal of the present invention, and is input to the mode selection signal input terminal. The timing generation circuit for sampling the mode selection signal can be simplified and the circuit scale can be reduced.

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

【図1】本発明が適用された第1実施形態のマイクロコ
ンピュータのモード設定回路の回路図
FIG. 1 is a circuit diagram of a mode setting circuit of a microcomputer of a first embodiment to which the present invention is applied.

【図2】前記第1実施形態でモードAを設定する際の接
続を示す回路図
FIG. 2 is a circuit diagram showing a connection when setting a mode A in the first embodiment.

【図3】前記第1実施形態でモードB1を設定する際の
接続を示す回路図
FIG. 3 is a circuit diagram showing a connection when setting a mode B1 in the first embodiment.

【図4】前記第1実施形態でモードB2を設定する際の
接続を示す回路図
FIG. 4 is a circuit diagram showing a connection when setting a mode B2 in the first embodiment.

【図5】前記第1実施形態のモード設定回路の動作を示
すタイムチャート
FIG. 5 is a time chart showing the operation of the mode setting circuit of the first embodiment.

【図6】本発明が適用された第2実施形態のマイクロコ
ンピュータのモード設定回路の回路図
FIG. 6 is a circuit diagram of a mode setting circuit of a microcomputer according to a second embodiment of the present invention.

【図7】前記第2実施形態でモードAを設定する際の接
続を示す回路図
FIG. 7 is a circuit diagram showing connections when setting a mode A in the second embodiment.

【図8】前記第2実施形態でモードB1を設定する際の
接続を示す回路図
FIG. 8 is a circuit diagram showing a connection when setting a mode B1 in the second embodiment.

【図9】前記第2実施形態でモードB2を設定する際の
接続を示す回路図
FIG. 9 is a circuit diagram showing a connection when setting a mode B2 in the second embodiment.

【図10】前記第2実施形態のモード設定回路の動作を
示すタイムチャート
FIG. 10 is a time chart showing the operation of the mode setting circuit of the second embodiment.

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

L1〜L6…D型ラッチ FF1、FF2…RSフリップフロップ I1、I2…インバータ D1…AND論理ゲート MOD…モード選択信号入力端子 (RDバー)…メモリリード信号 (M1バー)…命令コード取り込み信号 (RSTバー)…外部リセット信号 CLK…クロック信号 G1、G2、Q1、Q2、(SRDバー)、(SSRD
バー)、(R1バー)…信号
L1 to L6 ... D-type latch FF1, FF2 ... RS flip-flop I1, I2 ... Inverter D1 ... AND logic gate MOD ... Mode selection signal input terminal (RD bar) ... Memory read signal (M1 bar) ... Instruction code fetch signal (RST Bar) ... external reset signal CLK ... clock signal G1, G2, Q1, Q2, (SRD bar), (SSRD)
Bar), (R1 bar) ... signal

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】外部メモリから命令コードを順次取り込
み、必要に応じて外部に対してデータを入出力しなが
ら、複数の前記命令コードによるプログラムを処理する
ようにしたマイクロコンピュータにおいて、 当該マイクロコンピュータ内部の処理を初期化するため
の外部リセット信号を入力する外部リセット信号入力端
子と、 第1モード設定、及び該第1モード設定以後にも設定可
能な第2モード設定のそれぞれのモード設定内容を、こ
の順に順次伝達するモード選択信号を入力するモード選
択信号入力端子と、 外部に対する前記命令コードの取り込みの制御、あるい
は外部に対する前記データの入出力の制御のために用い
る、前記外部リセット信号によるリセットの解除の後の
初期論理状態が、前記第2モード設定のタイミング以前
に変化する外部制御信号を出力する外部制御信号出力端
子と、 前記外部リセット信号の論理状態変化のタイミングで、
前記モード選択信号で示される前記第1モード設定を取
り込み、記憶する第1モード設定記憶素子と、 前記外部制御信号の論理状態変化のタイミングで、前記
モード選択信号で示される前記第2モード設定を取り込
み、記憶する第2モード設定記憶素子とを備えること
で、 前記第1モード設定記憶素子に記憶される内容、及び前
記第2モード設定記憶素子に記憶される内容に従って、
当該マイクロコンピュータ内部の所望のモード設定を行
うようにしたことを特徴とするマイクロコンピュータ。
1. A microcomputer in which instruction codes are sequentially fetched from an external memory, and a program by a plurality of the instruction codes is processed while inputting / outputting data to / from the outside as necessary, the inside of the microcomputer. An external reset signal input terminal for inputting an external reset signal for initializing the processing of step 1, and a second mode setting that can be set after the first mode setting and the first mode setting. A mode selection signal input terminal for inputting a mode selection signal sequentially transmitted in this order, and a reset by the external reset signal used for controlling the fetching of the instruction code to the outside or the input / output of the data to the outside. The initial logic state after release is changed before the timing of the second mode setting. And the external control signal output terminal for outputting an external control signal, the timing of the logic state change of the external reset signal,
A first mode setting storage element that captures and stores the first mode setting indicated by the mode selection signal; and a second mode setting indicated by the mode selection signal at the timing of a change in the logical state of the external control signal. By including a second mode setting storage element for capturing and storing, according to the content stored in the first mode setting storage element and the content stored in the second mode setting storage element,
A microcomputer characterized in that a desired mode is set in the microcomputer.
【請求項2】請求項1において、第1モード設定、及び
前記第2モード設定のそれぞれのモード設定を、 前記モード選択信号として、前記モード選択信号入力端
子に定常的なL状態を入力するか、 前記モード選択信号として、前記モード選択信号入力端
子に定常的なH状態を入力するか、 あるいは、前記モード選択信号として、前記モード選択
信号入力端子に前記外部制御信号に従った信号を入力す
るかの、いずれかの選択的な入力によって行うようにし
たことを特徴とするマイクロコンピュータ。
2. A constant L state is input to the mode selection signal input terminal as the mode selection signal according to each of the first mode setting and the second mode setting. , A steady H state is input to the mode selection signal input terminal as the mode selection signal, or a signal according to the external control signal is input to the mode selection signal input terminal as the mode selection signal. The microcomputer characterized by performing either of the selective inputs.
【請求項3】請求項1又は2において、 前記外部制御信号が、前記外部リセット信号によるリセ
ットの解除の後の初期論理状態が、該リセット解除後の
第1番目の前記命令コードの取り込みの際に変化する、
外部に対する前記命令コードの取り込みの制御に用いる
信号であることを特徴とするマイクロコンピュータ。
3. The external control signal according to claim 1 or 2, wherein the external control signal has an initial logic state after release of reset by the external reset signal when the first instruction code is taken after release of the reset. Changes to
A microcomputer used as a signal for controlling the fetching of the instruction code to the outside.
【請求項4】請求項2において、 前記外部制御信号が、前記初期論理状態の変化のタイミ
ングが相互に異なる、モード取り込み外部制御信号、及
びモード設定外部制御信号の少なくとも2種類の信号と
されており、 前記モード取り込み外部制御信号が、前記外部リセット
信号によるリセットの解除の後の第1番目の前記命令コ
ードの取り込みのタイミングで論理状態が変化して、該
命令コード取り込みタイミングを示す信号であって、
又、前記第2モード設定記憶素子での前記第2モード設
定の取り込みタイミングを示すために用いる信号であ
り、 一方、前記モード設定外部制御信号が、前記外部リセッ
ト信号によるリセットの解除の後の第1番目の前記命令
コードの取り込みのタイミング以前に論理状態が変化し
て、該命令コード取り込み中の状態を示す信号であっ
て、又、前記モード選択信号として前記モード選択信号
入力端子に入力して用いる信号であることを特徴とする
マイクロコンピュータ。
4. The external control signal according to claim 2, wherein the external control signal is at least two types of signals, a mode-capturing external control signal and a mode-setting external control signal, the timings of changes in the initial logical states differ from each other. The mode fetch external control signal is a signal indicating the instruction code fetch timing when the logic state changes at the timing of fetching the first instruction code after the reset is canceled by the external reset signal. hand,
In addition, the second mode setting storage element is a signal used to indicate the timing of loading the second mode setting, and the mode setting external control signal is a signal after the reset release by the external reset signal. It is a signal indicating that the logic state has changed before the first fetching of the instruction code and the instruction code is being fetched, and is also input to the mode selection signal input terminal as the mode selection signal. A microcomputer characterized by being a signal to be used.
JP8010049A 1996-01-24 1996-01-24 Microcomputer Pending JPH09204412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8010049A JPH09204412A (en) 1996-01-24 1996-01-24 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8010049A JPH09204412A (en) 1996-01-24 1996-01-24 Microcomputer

Publications (1)

Publication Number Publication Date
JPH09204412A true JPH09204412A (en) 1997-08-05

Family

ID=11739552

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8010049A Pending JPH09204412A (en) 1996-01-24 1996-01-24 Microcomputer

Country Status (1)

Country Link
JP (1) JPH09204412A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024161183A (en) * 2020-04-09 2024-11-15 ミネベアミツミ株式会社 Integrated Circuits

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024161183A (en) * 2020-04-09 2024-11-15 ミネベアミツミ株式会社 Integrated Circuits

Similar Documents

Publication Publication Date Title
JP2957177B2 (en) Micro computer
JP2009282927A (en) Fpga configuration device, circuit board therewith, electronic device, and fpga configuration method
US6023776A (en) Central processing unit having a register which store values to vary wait cycles
CN116521604B (en) Method for synchronizing data and related device
US6813732B2 (en) Trace circuit
US20080054952A1 (en) Circuit for switching between two clock signals independently of the frequency of the clock signals
KR100498473B1 (en) Control signal generation circuit and data transmission circuit having the same
US7042769B2 (en) Semiconductor memory device capable of accurate and stable operation
US4999807A (en) Data input circuit having latch circuit
KR930008042B1 (en) Microcontroller unit
KR20110116990A (en) Micro computer
EP1643652A2 (en) Semiconductor device with circuitry for efficient information exchange
JP2743850B2 (en) Data processing device
JPH09204412A (en) Microcomputer
US20040186939A1 (en) Method and apparatus for communications interfacing capable of effectively reducing disk drive power consumption
JPH10304014A (en) Data capturing method, data capturing circuit, and protocol controller for IEEE1394
CN117931404A (en) Multi-application switching method, device, equipment and medium based on FPGA
JP2008122374A (en) Serializer/de-serializer bus controller inferface
JP3917736B2 (en) Integrated circuit
US20030226081A1 (en) On chip debugging method of microcontrollers
JP4749689B2 (en) Memory control circuit and memory control method
JP2003099164A (en) Connection method between boards
KR200151265Y1 (en) Counter circuit for gsm terminal of tdma
JPH027284A (en) Integrated circuit
JP2697772B2 (en) Information processing device