JPH076152A - Input circuit for external control signal - Google Patents

Input circuit for external control signal

Info

Publication number
JPH076152A
JPH076152A JP5143082A JP14308293A JPH076152A JP H076152 A JPH076152 A JP H076152A JP 5143082 A JP5143082 A JP 5143082A JP 14308293 A JP14308293 A JP 14308293A JP H076152 A JPH076152 A JP H076152A
Authority
JP
Japan
Prior art keywords
signal
circuit
output
control signal
outputs
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.)
Granted
Application number
JP5143082A
Other languages
Japanese (ja)
Other versions
JP3260483B2 (en
Inventor
Yukiya Sakuma
幸哉 佐久間
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 IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP14308293A priority Critical patent/JP3260483B2/en
Publication of JPH076152A publication Critical patent/JPH076152A/en
Application granted granted Critical
Publication of JP3260483B2 publication Critical patent/JP3260483B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE:To realize an external control signal input circuit capable of preventing the malfunction thereof at the time of switching a terminal function. CONSTITUTION:The input circuit is provided with an edge detecting circuit 1 for detecting a change in the value of an external terminal 22 correspondingly to the terminal 22 to be used also as a general port, a control signal generating circuit 2 for outputting a control signal 104 at the time of receiving an edge detection signal 103 outputted from the circuit 1, a control circuit 4 for inputting the signal 103 outputted from the circuit 1 and generating and outputting a mask signal 106 for controlling the output of an external control signal 107 through a mode control signal (PMC) 102 inputted from a mode register, and a mask circuit 3 for controlling the permission/inhibition of the output of the external control signal 107 through the mask signal 106 outputted from the circuit 4.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は外部制御信号入力回路に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an external control signal input circuit.

【0002】[0002]

【従来の技術】従来、シングルチップ・マイクロコンピ
ュータに見られるように、少ない端子数により、より多
くの機能を実現することを求められるシステムにおいて
は、一例として、「1991年度版、NEC“16ビッ
ト・シングルチップ・マイクロコンピュータ・データブ
ック”」に示されるように、外部制御信号入力端子と汎
用ポートが兼用されている外部制御信号入力回路におい
ては、モードレジスタによって端子機能の選択が行われ
ており、外部制御信号入力端子を汎用ポートとして使用
する時には、不必要な制御信号の発生を防止するため
に、制御信号発生回路の入力信号を固定する方式が用い
られている。
2. Description of the Related Art Conventionally, in a system that is required to realize more functions with a small number of terminals as seen in a single-chip microcomputer, as an example, "1991 version, NEC" 16 bits " -As shown in "Single-chip microcomputer data book", the terminal function is selected by the mode register in the external control signal input circuit in which the external control signal input terminal is also used as the general-purpose port. When the external control signal input terminal is used as a general-purpose port, a method of fixing the input signal of the control signal generation circuit is used in order to prevent generation of unnecessary control signals.

【0003】図6は、上記の従来の外部制御信号入力回
路の構成を示すブロック図であり、汎用ポートと兼用さ
れる外部端子22に対応して、マスク回路21と、制御
信号発生回路2とを備えて構成される。外部端子22を
汎用ポートとして使用する場合には、外部端子22に対
して端子機能選択作用を行うモードレジスタ(図示され
ない)より入力される制御信号(PMC)102によ
り、外部からの外部制御信号101の入力に対応してマ
スク回路1より制御信号発生回路2に入力される制御信
号115が固定化されてその出力を禁止され、制御信号
発生回路2において生成されて出力されるべき外部制御
信号107の発生が防止される。また、外部制御信号1
01の入力に対応して、制御信号発生回路2より所定の
制御信号107を出力する場合には、モードレジスタよ
り入力される制御信号(PMC)102は解除され、制
御信号発生回路2においては、マスク回路1を経由して
入力される制御信号115の値のエッジが検出され、外
部制御信号107が生成されて出力される。
FIG. 6 is a block diagram showing the structure of the above-mentioned conventional external control signal input circuit. The mask circuit 21 and the control signal generation circuit 2 are provided corresponding to the external terminal 22 which is also used as a general-purpose port. It is configured with. When the external terminal 22 is used as a general-purpose port, a control signal (PMC) 102 input from a mode register (not shown) that performs a terminal function selecting operation on the external terminal 22 causes an external control signal 101 from the outside. The control signal 115 input to the control signal generation circuit 2 from the mask circuit 1 in response to the input of is fixed and its output is prohibited, and the external control signal 107 to be generated and output in the control signal generation circuit 2 is output. Is prevented from occurring. Also, the external control signal 1
When a predetermined control signal 107 is output from the control signal generation circuit 2 in response to the input 01, the control signal (PMC) 102 input from the mode register is canceled, and in the control signal generation circuit 2, The edge of the value of the control signal 115 input via the mask circuit 1 is detected, and the external control signal 107 is generated and output.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の外部制
御信号入力回路においては、外部端子を汎用ポートとし
て使用する場合に、不要な外部制御信号の発生を防止す
る対策が、マスク回路から入力される信号の値のエッジ
検出を行って制御信号を出力する制御信号発生回路の前
段階、即ちマスク回路において行われている。このため
に、外部端子の端子機能が汎用ポート機能から制御信号
入力機能に切替えられた時に、外部端子からの外部制御
信号の値が、制御信号発生回路に対する制御信号が固定
されていた時の値と逆の値となる場合には、制御信号発
生回路に対する当該制御信号のレベルが反転した状態で
エッジ検出が行われるために、当該制御信号発生回路に
おいて誤った外部制御信号が生成されて出力される状態
となり、誤動作を生じるという欠点がある。
In the conventional external control signal input circuit described above, when the external terminal is used as a general-purpose port, a measure for preventing the generation of an unnecessary external control signal is input from the mask circuit. This is performed in the mask circuit before the control signal generation circuit that detects the edge of the signal value and outputs the control signal. For this reason, when the terminal function of the external terminal is switched from the general-purpose port function to the control signal input function, the value of the external control signal from the external terminal is the value when the control signal for the control signal generation circuit is fixed. If the value is opposite to the above, the edge detection is performed with the level of the control signal to the control signal generating circuit being inverted, so that an incorrect external control signal is generated and output in the control signal generating circuit. However, there is a drawback that the malfunction occurs.

【0005】[0005]

【課題を解決するための手段】本発明の外部制御信号入
力回路は、汎用ポートと制御信号入力の2種類の機能に
対し兼用される外部端子を有し、所定の機能選択作用を
介して前記外部端子に印加される入力信号より外部制御
信号を生成して出力する外部制御信号出力回路におい
て、前記外部端子ににおけるレベル値の変化を検出し、
当該レベル値の変化に対応するエッジ検出信号を出力す
るエッジ検出回路と、前記エッジ検出信号を入力して、
所定の制御信号を生成して出力する制御信号発生回路
と、前記エッジ検出信号を入力して、所定のモード制御
信号を介して外部制御信号の出力の可否を制御するマス
ク信号を生成して出力する制御回路と、前記制御信号を
入力して、前記マスク信号を介して外部制御信号の出力
または停止を実行するマスク回路とを備えて構成され
る。
An external control signal input circuit according to the present invention has an external terminal commonly used for two types of functions, that is, a general-purpose port and a control signal input. An external control signal output circuit that generates and outputs an external control signal from an input signal applied to an external terminal, detects a change in level value at the external terminal,
An edge detection circuit that outputs an edge detection signal corresponding to the change in the level value, and the edge detection signal are input,
A control signal generation circuit that generates and outputs a predetermined control signal, and the edge detection signal are input, and a mask signal that controls whether to output an external control signal via a predetermined mode control signal is generated and output. And a mask circuit that receives the control signal and outputs or stops the external control signal via the mask signal.

【0006】なお、前記エッジ検出回路は、外部端子に
おけるレベル値の変化を受けて、所定のクロックに同期
させて出力する第1のラッチ回路と、前記第1のラッチ
回路の出力を受けて、前記クロックを介して前記外部端
子の1クロック前のレベル値を保持する第1のフリップ
フロップ回路と、前記第1のラッチ回路の出力と前記第
1のフリップフロップ回路の出力とを比較して不一致を
検出し、エッジ検出信号を出力するEXOR回路とによ
り構成され、前記制御信号発生回路は、前記エッジ検出
信号を1/2クロック分遅延させて制御信号として出力
する第2のラッチ回路により構成され、前記制御回路
は、前記クロックを介してモード制御信号を1/2クロ
ック分遅延させて、外部制御信号の出力を禁止する信号
を出力する第3のラッチ回路と、当該外部制御信号の出
力を、前記クロックを介して禁止する信号を1/2クロ
ック分遅延させて出力する第4のラッチ回路と、前記エ
ッジ検出信号を受けて、前記クロックを介して外部制御
信号の出力を許可する信号をラッチする第1のタイミン
グ信号を出力する第1のAND回路と、前記外部制御信
号の出力を禁止する信号によりリセットされ、前記第1
のタイミング信号を介して前記第4のラッチ回路から出
力される信号を保持し、外部制御信号の出力を許可する
信号を出力するリセット付ラッチ回路と、前記第3のラ
ッチ回路より出力される外部制御信号の出力を禁止する
信号と、前記リセット付ラッチ回路より出力される外部
制御信号の出力を許可する信号との論理積をマスク信号
として出力する第2のAND回路とにより構成され、前
記マスク回路は、前記制御信号発生回路より出力される
制御信号と前記マスク信号との論理積を出力する第3の
AND回路と、前記マスク信号が外部制御信号の出力を
許可する場合に、前記第3のAND回路の出力信号を受
けて、前記クロックを介して外部制御信号を生成して出
力する第5のラッチ回路とにより構成されてもよい。
The edge detection circuit receives a change in the level value at the external terminal and outputs the first latch circuit in synchronization with a predetermined clock, and the output of the first latch circuit. A first flip-flop circuit that holds the level value of the external terminal one clock before via the clock is compared with the output of the first latch circuit and the output of the first flip-flop circuit, and they do not match. And an EXOR circuit that outputs an edge detection signal, and the control signal generation circuit is configured by a second latch circuit that delays the edge detection signal by 1/2 clock and outputs the delayed signal as a control signal. The control circuit delays the mode control signal by ½ clock via the clock and outputs a signal for inhibiting the output of the external control signal. Circuit, a fourth latch circuit for outputting a signal for inhibiting the output of the external control signal from the clock by delaying it by 1/2 clock, and outputting the external control signal via the clock by receiving the edge detection signal. And a first AND circuit that outputs a first timing signal that latches a signal that permits the output of the external control signal, and a signal that inhibits the output of the external control signal.
A latch circuit with a reset that holds the signal output from the fourth latch circuit via the timing signal and outputs a signal that permits the output of the external control signal; and an external output from the third latch circuit. A second AND circuit configured to output a logical product of a signal for prohibiting the output of the control signal and a signal for permitting the output of the external control signal output from the latch circuit with reset as a mask signal. The circuit includes a third AND circuit that outputs a logical product of the control signal output from the control signal generation circuit and the mask signal, and the third AND circuit when the mask signal permits the output of the external control signal. And a fifth latch circuit that receives the output signal of the AND circuit and generates and outputs an external control signal via the clock.

【0007】また、前記エッジ検出回路は、外部端子に
おけるレベル値の変化を受けて、所定のクロックに同期
させて出力する第1のラッチ回路と、前記第1のラッチ
回路の出力を受けて、前記クロックを介して前記外部端
子の1クロック前のレベル値を保持する第1のフリップ
フロップ回路と、前記第1のラッチ回路の出力と前記第
1のフリップフロップ回路の出力とを比較して不一致を
検出し、エッジ検出信号を出力する第1のEXOR回路
とにより構成され、前記制御信号発生回路は、前記エッ
ジ検出信号を受けて、前記クロックを介して当該エッジ
検出信号の立ち下がりから所定時間後に第1のタイミン
グ信号を生成して出力するパルス発生回路と、前記第1
のタイミング信号を受けて、前記クロックを介して第2
のタイミング信号を生成して出力する第1のAND回路
と、前記第2のタイミング信号を介して前記第1のフリ
ップフロップ回路より出力される信号を保持し、第1の
レベル信号を出力する第2のラッチ回路と、前記第1の
レベル信号を受けて、前記クロックを介して1クロック
分遅延させて第2のレベル信号を出力する第2のフリッ
プフロップ回路と、これらの第1および第2のレベル信
号を比較して不一致を検出し、制御信号として出力する
第2のEXOR回路とにより構成され、前記制御回路
は、前記クロックを介してモード制御信号を1/2クロ
ック分遅延させて、外部制御信号の出力を禁止する信号
を出力する第3のラッチ回路と、当該外部制御信号の出
力を、前記クロックを介して禁止する信号を1/2クロ
ック分遅延させて出力する第4のラッチ回路と、前記エ
ッジ検出信号を受けて、前記クロックを介して外部制御
信号の出力を許可する信号をラッチする第3のタイミン
グ信号を出力する第2のAND回路と、前記外部制御信
号の出力を禁止する信号によりリセットされ、前記第3
のタイミング信号を介して前記第4のラッチ回路から出
力される信号を保持し、外部制御信号の出力を許可する
信号を出力するリセット付ラッチ回路と、前記第3のラ
ッチ回路より出力される外部制御信号の出力を禁止する
信号と、前記リセット付ラッチ回路より出力される外部
制御信号の出力を許可する信号との論理積をマスク信号
として出力する第3のAND回路とにより構成され、前
記マスク回路は、前記制御信号発生回路より出力される
制御信号と前記マスク信号との論理積を出力する第4の
AND回路と、前記マスク信号が外部制御信号の出力を
許可する場合に、前記第4のAND回路の出力信号を受
けて、前記クロックを介して外部制御信号を生成して出
力する第5のラッチ回路とにより構成されてもよい。
Further, the edge detection circuit receives a change in the level value at an external terminal and outputs a first latch circuit which outputs in synchronization with a predetermined clock, and an output of the first latch circuit, A first flip-flop circuit that holds the level value of the external terminal one clock before via the clock is compared with the output of the first latch circuit and the output of the first flip-flop circuit, and they do not match. And a first EXOR circuit for detecting an edge detection signal and outputting an edge detection signal. The control signal generation circuit receives the edge detection signal and outputs a predetermined time from the fall of the edge detection signal via the clock. A pulse generation circuit which later generates and outputs a first timing signal;
Receiving the timing signal of
A first AND circuit for generating and outputting the timing signal of No. 1, and a signal for holding the signal output from the first flip-flop circuit via the second timing signal and outputting a first level signal. A second latch circuit, a second flip-flop circuit that receives the first level signal, delays one clock through the clock, and outputs a second level signal; and the first and second flip-flop circuits. And a second EXOR circuit for detecting a mismatch and outputting the control signal as a control signal, the control circuit delays the mode control signal by 1/2 clock through the clock, A third latch circuit that outputs a signal that inhibits the output of the external control signal and an output of the external control signal that is delayed by 1/2 clock of the signal that inhibits the output of the external control signal are output. A fourth latch circuit, a second AND circuit that receives the edge detection signal, outputs a third timing signal that latches a signal that permits the output of the external control signal via the clock, and the external circuit. The third signal is reset by a signal that prohibits the output of the control signal,
A latch circuit with a reset that holds the signal output from the fourth latch circuit via the timing signal and outputs a signal that permits the output of the external control signal; and an external output from the third latch circuit. A third AND circuit which outputs a logical product of a signal for inhibiting the output of the control signal and a signal for permitting the output of the external control signal output from the latch circuit with reset as a mask signal, and the mask The circuit includes a fourth AND circuit that outputs a logical product of the control signal output from the control signal generation circuit and the mask signal, and the fourth AND circuit when the mask signal permits the output of the external control signal. And a fifth latch circuit that receives the output signal of the AND circuit and generates and outputs an external control signal via the clock.

【0008】[0008]

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

【0009】図1は本発明の基本構成を示すブロック図
である。図1に示されるように、本発明は、汎用ポート
と兼用される外部端子22に対応して、外部端子22に
おける値の変化を検出するエッジ検出回路1と、外部端
子22の値101の変化に対応して、エッジ検出回路1
から出力されるエッジ検出信号103を受けて制御信号
104を出力する制御信号発生回路2と、エッジ検出回
路1より出力されるエッジ検出信号103を入力し、モ
ードレジスタから入力されるモード制御信号(PMC)
102を介して、外部制御信号の出力の可否を制御する
マスク信号106を生成して出力する制御回路4と、制
御信号発生回路2より出力される制御信号104を入力
して、制御回路4より出力されるマスク信号106を介
して、前記外部制御信号107の出力の許可/禁止を制
御するマスク回路3とを備えて構成される。
FIG. 1 is a block diagram showing the basic configuration of the present invention. As shown in FIG. 1, the present invention corresponds to an external terminal 22 which is also used as a general-purpose port, and an edge detection circuit 1 for detecting a change in the value at the external terminal 22 and a change in the value 101 at the external terminal 22. Corresponding to, edge detection circuit 1
The control signal generation circuit 2 that receives the edge detection signal 103 output from the edge detection circuit 103 and outputs the control signal 104, and the edge detection signal 103 output from the edge detection circuit 1 are input and the mode control signal (from the mode register PMC)
A control circuit 4 for generating and outputting a mask signal 106 for controlling whether to output an external control signal and a control signal 104 output from the control signal generating circuit 2 are input via 102, and the control circuit 4 outputs the control signal 104. A mask circuit 3 for controlling permission / prohibition of the output of the external control signal 107 via the output mask signal 106.

【0010】図1において、外部端子22を汎用ポート
として使用する場合には、外部端子22の端子機能選択
を行うモードレジスタ(図示されない)より入力される
モード制御信号(PMC)102は、所定のレベルにて
制御回路4に入力される。エッジ検出回路1において
は、外部端子22の値101の変化が検出されてエッジ
検出信号103として出力され、制御信号発生回路2お
よび制御回路4に入力される。制御信号発生回路2にお
いては、エッジ検出信号103が1/2クロック遅延さ
れて、制御信号104として出力されマスク回路3に入
力される。他方、制御回路4においては、モードレジス
タからのモード制御信号(PMC)102、およびエッ
ジ検出回路1より出力されるエッジ検出信号103を受
けて、マスク回路3に対するマスク信号106として、
外部制御信号107の出力を禁止するレベル信号が出力
されてマスク回路3に入力される。マスク回路3におい
ては、制御回路4より出力されるマスク信号106を受
けて、当該マスク信号106が外部制御信号107の出
力を禁止するレベル信号として入力される間において
は、制御信号104はマスク回路3内において“0”レ
ベルに固定され、マスク回路3からは外部制御信号10
7が出力されない。
In FIG. 1, when the external terminal 22 is used as a general-purpose port, a mode control signal (PMC) 102 input from a mode register (not shown) for selecting a terminal function of the external terminal 22 is a predetermined signal. The level is input to the control circuit 4. In the edge detection circuit 1, a change in the value 101 of the external terminal 22 is detected and output as the edge detection signal 103, which is input to the control signal generation circuit 2 and the control circuit 4. In the control signal generation circuit 2, the edge detection signal 103 is delayed by ½ clock, output as the control signal 104, and input to the mask circuit 3. On the other hand, the control circuit 4 receives the mode control signal (PMC) 102 from the mode register and the edge detection signal 103 output from the edge detection circuit 1 as a mask signal 106 for the mask circuit 3.
A level signal for inhibiting the output of the external control signal 107 is output and input to the mask circuit 3. In the mask circuit 3, while the mask signal 106 output from the control circuit 4 is received and the mask signal 106 is input as a level signal that prohibits the output of the external control signal 107, the control signal 104 remains in the mask circuit 106. 3 is fixed to the "0" level and the mask circuit 3 outputs the external control signal 10
7 is not output.

【0011】また、外部端子22を外部制御信号の入力
端子として使用する場合には、外部端子22の端子機能
選択を行うモードレジスタより入力されるモード制御信
号102は、上記の汎用ポートとして使用する場合のモ
ード制御信号102の反転レベルの信号として制御回路
4に入力される。この場合においては、制御回路4から
は、マスク回路3に対するマスク信号106として、外
部制御信号の出力を許可するレベル信号が出力され、マ
スク回路3に入力される。マスク回路3においては、制
御信号発生回路2より出力される制御信号104を受け
て、当該マスク信号106が外部制御信号107の出力
を許可するレベル信号として入力される間においては、
所定の外部制御信号107が出力される。
When the external terminal 22 is used as an input terminal for the external control signal, the mode control signal 102 input from the mode register for selecting the terminal function of the external terminal 22 is used as the general-purpose port. In this case, the signal is input to the control circuit 4 as a signal of an inverted level of the mode control signal 102 in that case. In this case, the control circuit 4 outputs, as the mask signal 106 for the mask circuit 3, a level signal for permitting the output of the external control signal, which is input to the mask circuit 3. In the mask circuit 3, while the control signal 104 output from the control signal generation circuit 2 is received and the mask signal 106 is input as a level signal that permits the output of the external control signal 107,
A predetermined external control signal 107 is output.

【0012】図2は、本発明の第1の実施例を示すブロ
ック図であり、エッジ検出回路1、制御信号発生回路
2、マスク回路3および制御回路4の内部構成がそれぞ
れ示されている。図2に示されるように、エッジ検出回
路1は、外部端子22における値101のレベル変化を
クロック108に同期させるラッチ回路5と、1クロッ
ク前の外部端子22の値101を保持するフリップフロ
ップ回路6と、ラッチ回路5の出力とフリップフロップ
回路6の出力とを比較して、不一致を検出しエッジ検出
信号103を出力するEXOR回路7とにより構成さ
れ、制御信号発生回路2は、エッジ検出信号103を1
/2クロック分遅延させてエッジ検出信号104として
出力するラッチ回路8により構成され、制御回路4は、
モードレジスタから入力されるモード制御信号102を
1/2クロック分遅延させて、外部制御信号の出力を禁
止する信号111を出力するラッチ回路11と、当該信
号111を1/2クロック分遅延させて、信号112を
出力するラッチ回路12と、エッジ検出信号103か
ら、クロック108を介して外部制御信号の出力を許可
する信号をラッチするタイミングを指定する信号113
を出力するAND回路13と、外部制御信号の出力を禁
止する信号111によりリセットされ、当該信号113
を介してラッチ回路12から出力される信号112を保
持し、外部制御信号の出力を許可する信号114を出力
するリセット付ラッチ回路14と、外部制御信号の出力
を禁止する信号111と、外部制御信号の出力を許可す
る信号114の論理積を出力制御信号106として出力
するAND回路15とにより構成されており、また、マ
スク回路3は、マスク信号106が“0”レベルの期間
内においてはエッジ検出信号104のレベルを“0”レ
ベルに固定する信号115を出力するAND回路9と、
マスク信号106が“1”レベルの期間内において、A
ND回路9の出力信号115を、クロック108を介し
て外部制御信号の出力タイミングに合わせ、外部制御信
号107として生成して出力するラッチ回路10とによ
り構成される。
FIG. 2 is a block diagram showing a first embodiment of the present invention, showing the internal structures of the edge detection circuit 1, the control signal generation circuit 2, the mask circuit 3 and the control circuit 4, respectively. As shown in FIG. 2, the edge detection circuit 1 includes a latch circuit 5 for synchronizing the level change of the value 101 at the external terminal 22 with the clock 108 and a flip-flop circuit for holding the value 101 of the external terminal 22 one clock before. 6 and an EXOR circuit 7 that compares the output of the latch circuit 5 and the output of the flip-flop circuit 6 to detect a mismatch and outputs an edge detection signal 103. The control signal generation circuit 2 includes an edge detection signal. 103 to 1
The control circuit 4 is constituted by a latch circuit 8 which delays by 1/2 clock and outputs it as the edge detection signal 104.
The mode control signal 102 input from the mode register is delayed by ½ clock to output the signal 111 for inhibiting the output of the external control signal, and the signal 111 is delayed by ½ clock. , A signal 113 for designating a timing for latching a signal permitting the output of the external control signal from the edge detection signal 103 and the latch circuit 12 which outputs the signal 112 via the clock 108.
And the signal 113 which is reset by the signal 111 for prohibiting the output of the external control signal.
The latch circuit with reset 14 that holds the signal 112 output from the latch circuit 12 via the signal and outputs the signal 114 that permits the output of the external control signal, the signal 111 that prohibits the output of the external control signal, and the external control The AND circuit 15 that outputs the logical product of the signals 114 that permit the output of signals as the output control signal 106. Further, the mask circuit 3 includes an edge circuit during the period when the mask signal 106 is at "0" level. An AND circuit 9 for outputting a signal 115 for fixing the level of the detection signal 104 to "0"level;
Within the period in which the mask signal 106 is at "1" level, A
The output signal 115 of the ND circuit 9 is composed of a latch circuit 10 which generates and outputs an external control signal 107 in synchronization with the output timing of the external control signal via the clock 108.

【0013】次に、本実施例の動作について、図2およ
び図3(a)、(b)、(c)、(d)、(e)、
(f)、(g)、(h)、(i)および(j)のタイミ
ング図を参照して説明する。
Next, the operation of this embodiment will be described with reference to FIGS. 2 and 3 (a), (b), (c), (d), (e),
Description will be given with reference to the timing diagrams of (f), (g), (h), (i) and (j).

【0014】まず、外部端子22を汎用ポートとして使
用するポートモードの期間(T1 〜T6 )においては、
モード制御信号102は“0”レベルに設定されてお
り、これにより、ラッチ回路11より出力される外部制
御信号の出力を禁止する信号111は“0”レベルとな
るため、制御回路4においては、AND回路15より出
力されるマスク信号106も“0”レベルとなり、マス
ク回路3に含まれるAND回路9の一方の入力端に入力
される。この汎用ポート使用モードの期間(T1〜T6
)において、外部端子22における値101のレベル
に変化が生じると、エッジ検出回路1においては、タイ
ミングT2 において、ラッチ回路5によりクロック10
8に同期した信号109に変換され(図3(a)および
(c)参照)、フリップフロップ回路6により1クロッ
ク分遅延された後に、タイミングT3において信号11
0として出力されて(図3(a)および(d)参照)、
EXOR回路7に入力される。EXOR回路7において
は、信号109および信号110の入力を受けて、タイ
ミングT2 において、エッジ検出信号103が生成され
て出力される(図3(a)および(e)参照)。
First, during the port mode period (T1 to T6) in which the external terminal 22 is used as a general-purpose port,
The mode control signal 102 is set to "0" level, and the signal 111 for prohibiting the output of the external control signal output from the latch circuit 11 is set to "0" level. Therefore, in the control circuit 4, The mask signal 106 output from the AND circuit 15 also becomes the “0” level and is input to one input end of the AND circuit 9 included in the mask circuit 3. Period of this general-purpose port use mode (T1 to T6
), When the level of the value 101 at the external terminal 22 changes, in the edge detection circuit 1, at the timing T2, the latch circuit 5 causes the clock 10
8 is converted into the signal 109 (see FIGS. 3A and 3C) and delayed by one clock by the flip-flop circuit 6, and then the signal 11 is output at the timing T3.
Output as 0 (see FIGS. 3 (a) and 3 (d)),
It is input to the EXOR circuit 7. In the EXOR circuit 7, the signal 109 and the signal 110 are received, and the edge detection signal 103 is generated and output at the timing T2 (see FIGS. 3A and 3E).

【0015】制御信号発生回路2においては、エッジ検
出信号103はラッチ回路8により1/2クロック分遅
延されて、制御回路4におけるタイミングとの同期合わ
せの行われた制御信号104として出力され、マスク回
路3に入力される。マスク回路3においては、当該マス
ク回路3に含まれるAND回路9に対するマスク信号1
06が“0”レベルにて入力されているために、AND
回路9より出力される115は、制御信号104の値の
如何に関せず常に“0”レベルとなり、従って、ラッチ
回路10からの外部制御信号107の出力は、“0”レ
ベルのままに保持されて“1”レベルになることはなく
外部に出力されない。
In the control signal generation circuit 2, the edge detection signal 103 is delayed by 1/2 clock by the latch circuit 8 and output as the control signal 104 which is synchronized with the timing in the control circuit 4 and masked. It is input to the circuit 3. In the mask circuit 3, the mask signal 1 for the AND circuit 9 included in the mask circuit 3
Since 06 is input at the "0" level, AND
The 115 output from the circuit 9 is always at "0" level regardless of the value of the control signal 104, and therefore the output of the external control signal 107 from the latch circuit 10 is kept at "0" level. It is not output to the outside because it is not brought to the "1" level.

【0016】この状態において、外部端子22の値10
1にレベル変化が生じると、上記の場合と同様に、タイ
ミングT10において、エッジ検出回路1によりエッジ検
出信号103が生成されて出力されて(図(a)および
(e)参照)、制御信号発生回路2に入力される。制御
信号発生回路2においては、当該エッジ検出信号103
は、ラッチ回路8により1/2クロック分遅延されて、
制御回路4におけるタイミングとの同期合わせの行われ
た制御信号104が出力されて、マスク回路3に入力さ
れる。
In this state, the value of the external terminal 22 is 10
When a level change occurs at 1, the edge detection signal 103 is generated and output by the edge detection circuit 1 at timing T10 (see FIGS. (A) and (e)), and the control signal is generated, as in the above case. It is input to the circuit 2. In the control signal generation circuit 2, the edge detection signal 103
Is delayed by 1/2 clock by the latch circuit 8,
The control signal 104 synchronized with the timing in the control circuit 4 is output and input to the mask circuit 3.

【0017】一方、エッジ検出信号103が制御回路4
に含まれるAND回路13に入力されると、AND回路
13においては、このエッジ検出信号103およびクロ
ック108の入力を受けてタイミング信号113が出力
されて、リセット付ラッチ回路14に入力される。リセ
ット付ラッチ回路14に対しては、このタイミング信号
113を受けて外部制御信号の出力を許可する信号11
4が“1”レベルにて出力され、AND回路15に入力
される。この場合に、同じくAND回路15に入力され
る外部制御信号の出力を禁止する信号111も“1”レ
ベルであるため、AND回路15より出力されるマスク
信号106も“1”レベルで出力され、タイミングT10
において、外部制御信号の発生が許可される状態とな
る。従って、マスク回路3に含まれるAND回路9より
出力される信号115は、エッジ検出信号104が
“1”レベルの期間においては“1”レベルで出力さ
れ、ラッチ回路10からは、外部制御信号107が出力
される。
On the other hand, the edge detection signal 103 is the control circuit 4
When input to the AND circuit 13 included in, the AND circuit 13 receives the edge detection signal 103 and the clock 108, outputs the timing signal 113, and inputs the timing signal 113 to the latch circuit with reset 14. The reset latch circuit 14 receives the timing signal 113 and permits the output of the external control signal 11.
4 is output at the "1" level and is input to the AND circuit 15. In this case, the signal 111 for prohibiting the output of the external control signal which is also input to the AND circuit 15 is also at the "1" level, so the mask signal 106 output from the AND circuit 15 is also output at the "1" level. Timing T10
In, the generation of the external control signal is permitted. Therefore, the signal 115 output from the AND circuit 9 included in the mask circuit 3 is output at the “1” level while the edge detection signal 104 is at the “1” level, and the external control signal 107 is output from the latch circuit 10. Is output.

【0018】モード制御信号102が、タイミングT18
において“1”レベルから“0”レベルに変化するする
と、制御回路4に含まれるラッチ回路11から出力され
る外部制御信号の出力を禁止する信号111は“0”レ
ベルとなり、AND回路15より出力されるマスク信号
106も、タイミングT18において“0”レベルとな
り、マスク回路3においては、外部制御信号107の出
力レベルは“0”レベルとなって変化することがなく、
外部制御信号107は外部に出力されない。
The mode control signal 102 has a timing T18.
When the level changes from “1” level to “0” level in, the signal 111 for prohibiting the output of the external control signal output from the latch circuit 11 included in the control circuit 4 becomes “0” level and is output from the AND circuit 15. The mask signal 106 also becomes "0" level at the timing T18, and in the mask circuit 3, the output level of the external control signal 107 becomes "0" level and does not change.
The external control signal 107 is not output to the outside.

【0019】なお、本実施例の動作説明においては、外
部端子の値が“0”レベルから“1”レベルに変化する
立ち上がりエッジと、“1”レベルから“0”レベルに
変化する立ち下がりエッジの両方のエッジに対して、外
部制御信号を出力する例を示したが、エッジ検出回路1
において、一方のエッジ検出のみを行うようにすること
により、片方のエッジに対してのみ外部制御信号を出力
することができる外部制御信号発生回路を実現すること
もできる。
In the description of the operation of this embodiment, the rising edge at which the value of the external terminal changes from the "0" level to the "1" level and the falling edge at which the value of the external terminal changes from the "1" level to the "0" level. The example in which the external control signal is output for both edges of
In the above, by performing only one edge detection, it is possible to realize an external control signal generation circuit capable of outputting the external control signal only to one edge.

【0020】次に、図4は本発明の第2の実施例を示す
ブロック図であり、エッジ検出回路1、制御信号発生回
路2、マスク回路3および制御回路4の内部構成がそれ
ぞれ示されている。図4に示されるように、エッジ検出
回路1は、前述の第1の実施例の場合と同様に、外部端
子22における値101のレベル変化をクロック108
に同期させるラッチ回路5と、1クロック前の外部端子
22の値101を保持するフリップフロップ回路6と、
ラッチ回路5の出力とフリップフロップ回路6の出力と
を比較して、不一致を検出しエッジ検出信号103を出
力するEXOR回路7とにより構成され、制御信号発生
回路2は、エッジ検出信号103の立ち下がりから所定
時間後にタイミング信号116を発生して出力するパル
ス発生回路16と、タイミング信号116とクロック1
08を受けて、フリップフロップ回路6より出力される
信号110を保持するタイミング信号117を出力する
AND回路17と、このタイミング信号117により信
号110を保持し、レベル信号118を出力するラッチ
回路18と、クロック108を介してレベル信号118
を1クロック分遅延させたレベル信号119を出力する
フリップフロップ回路19と、これらのレベル信号11
8および119を入力して比較して不一致を検出してエ
ッジ検出信号104として出力するEXOR回路20と
により構成され、制御回路4は、第1の実施例の場合と
同様に、モードレジスタから入力されるモード制御信号
102を1/2クロック分遅延させて、外部制御信号の
出力を禁止する信号111を出力するラッチ回路11
と、当該信号111を1/2クロック分遅延させて、信
号112を出力するラッチ回路12と、エッジ検出信号
103から、クロック108を介して外部制御信号の出
力を許可する信号をラッチするタイミングを指定する信
号113を出力するAND回路13と、当該信号113
を介してラッチ回路12から出力される信号112を保
持し、外部制御信号の出力を許可する信号114を出力
するとともに、外部制御信号の出力を禁止する信号11
1によりリセットされるリセット付ラッチ回路14と、
外部制御信号の出力を禁止する信号111と、出力を許
可する信号114の論理積を出力制御信号106として
出力するAND回路15とにより構成されており、ま
た、マスク回路3も、第1の実施例と同様に、出力制御
信号106が“0”レベルの期間内においてはエッジ検
出信号104のレベルを“0”レベルに固定する信号1
15を出力するAND回路9と、このAND回路9の出
力信号115を、クロック108を介して外部制御信号
の出力タイミングに合わせて、外部制御信号107とし
て生成して出力するラッチ回路10とにより構成されて
いる。
Next, FIG. 4 is a block diagram showing a second embodiment of the present invention, showing the internal configurations of the edge detection circuit 1, the control signal generation circuit 2, the mask circuit 3 and the control circuit 4, respectively. There is. As shown in FIG. 4, the edge detection circuit 1 changes the level of the value 101 at the external terminal 22 by the clock 108, as in the case of the first embodiment.
A latch circuit 5 for synchronizing with the flip-flop circuit 6 for holding the value 101 of the external terminal 22 one clock before,
The output of the latch circuit 5 and the output of the flip-flop circuit 6 are compared with each other, and an EXOR circuit 7 that detects a mismatch and outputs an edge detection signal 103 is provided. The control signal generation circuit 2 causes the edge detection signal 103 to rise. A pulse generation circuit 16 for generating and outputting a timing signal 116 after a predetermined time from the fall, a timing signal 116 and a clock 1
In response to 08, the AND circuit 17 that outputs the timing signal 117 that holds the signal 110 output from the flip-flop circuit 6, and the latch circuit 18 that holds the signal 110 by this timing signal 117 and outputs the level signal 118 , Level signal 118 via clock 108
A flip-flop circuit 19 for outputting a level signal 119 delayed by one clock, and the level signals 11
8 and 119 are inputted and compared to detect an inconsistency and output as an edge detection signal 104. The control circuit 4 inputs from the mode register as in the case of the first embodiment. Circuit 11 which delays the generated mode control signal 102 by 1/2 clock and outputs a signal 111 for inhibiting the output of the external control signal.
The latch circuit 12 delays the signal 111 by 1/2 clock and outputs the signal 112, and the timing for latching the signal from the edge detection signal 103 that permits the output of the external control signal via the clock 108. AND circuit 13 that outputs a signal 113 that specifies the signal 113
The signal 112 which holds the signal 112 output from the latch circuit 12 via the
A latch circuit with reset 14 that is reset by 1;
The AND circuit 15 outputs a logical product of a signal 111 for prohibiting the output of the external control signal and a signal 114 for permitting the output as the output control signal 106. Further, the mask circuit 3 also has the first embodiment. Similar to the example, the signal 1 for fixing the level of the edge detection signal 104 to the “0” level during the period when the output control signal 106 is the “0” level.
The AND circuit 9 that outputs 15 and the latch circuit 10 that generates and outputs the output signal 115 of the AND circuit 9 as the external control signal 107 in synchronization with the output timing of the external control signal via the clock 108. Has been done.

【0021】即ち、本実施例の第1の実施例との相違点
は、制御信号発生回路2の構成内容の差異にある。
That is, the difference between this embodiment and the first embodiment is the difference in the configuration contents of the control signal generation circuit 2.

【0022】次に、本実施例の動作について、図4およ
び図5(a)、(b)、(c)、(d)、(e)、
(f)、(g)、(h)、(i)、(j)、(k)、
(l)および(m)のタイミング図を参照して説明す
る。
Next, the operation of this embodiment will be described with reference to FIGS. 4 and 5 (a), (b), (c), (d), (e),
(F), (g), (h), (i), (j), (k),
This will be described with reference to the timing charts of (l) and (m).

【0023】まず、外部端子22を汎用ポートとして使
用するポートモードの期間(T1 〜T6 およびT20〜T
23)においては、モード制御信号102は“0”レベル
に設定されており、これにより、第1の実施例の場合と
同様に、制御回路4においては、ラッチ回路11より出
力される外部制御信号の出力を禁止する信号111は
“0”レベルとなるため、AND回路15より出力され
るマスク信号106も、タイミングT18において“0”
レベルとなり、マスク回路3に含まれるAND回路9の
一方の入力端に入力される。これにより、外部制御信号
107の出力は禁止され、外部制御信号107の値は
“0”レベルのままに保持され変化することはない。
First, during the port mode (T1 to T6 and T20 to T) in which the external terminal 22 is used as a general-purpose port.
23), the mode control signal 102 is set to the “0” level, which allows the external control signal output from the latch circuit 11 in the control circuit 4 to be the same as in the first embodiment. Since the signal 111 for inhibiting the output of the signal is at "0" level, the mask signal 106 output from the AND circuit 15 is also "0" at the timing T18.
It becomes a level and is input to one input terminal of the AND circuit 9 included in the mask circuit 3. As a result, the output of the external control signal 107 is prohibited, and the value of the external control signal 107 is kept at "0" level and does not change.

【0024】次に、モード制御信号102が“1”レベ
ルの期間(T7 〜T19)においては、外部端子22が制
御信号入力端子として使用される状態となり、制御回路
4に含まれるラッチ回路11より出力される外部制御信
号の出力を禁止する信号111が“1”レベルとなり、
ラッチ回路12の出力112も“1”レベルとなるが、
エッジ検出信号103が入力されるまでは、AND回路
13よりタイミング信号113が出力されないために、
ラッチ回路14の出力114は“0”レベルのままであ
り、AND回路15より出力されるマスク信号106も
“0”レベルのままで変化しない。
Next, during a period (T7 to T19) in which the mode control signal 102 is at "1" level, the external terminal 22 is used as a control signal input terminal, and the latch circuit 11 included in the control circuit 4 operates. The signal 111 for prohibiting the output of the external control signal to be output becomes the “1” level,
The output 112 of the latch circuit 12 is also at "1" level,
Since the timing signal 113 is not output from the AND circuit 13 until the edge detection signal 103 is input,
The output 114 of the latch circuit 14 remains at "0" level, and the mask signal 106 output from the AND circuit 15 also remains at "0" level and does not change.

【0025】ここで、タイミングT9 において、外部端
子22の値101のレベルが変化すると、エッジ検出回
路1においては、ラッチ回路5により外部端子22の値
101は、タイミングT9 においてクロック108に同
期した信号109に変換され、フリップフロップ回路6
において1クロック分遅延された後、タイミングT11に
おいて信号110として出力されEXOR回路7および
ラッチ回路18に入力される。EXOR回路7において
は、信号109および信号110を受けて、タイミング
T9 においてエッジ検出信号103が出力され、制御信
号発生回路2に含まれるパルス発生回路16および制御
回路4に含まれるAND回路13に入力される。AND
回路13においては、このエッジ検出信号103の入力
を受けて、クロック108を介してタイミング信号11
3が出力され、リセット付ラッチ回路14のC端子に入
力される。リセット付ラッチ回路14においては、ラッ
チ回路12より出力される信号112の入力、および信
号113のリセット入力に対応して、外部制御信号の出
力を許可する信号114が“1”レベルにて出力され、
これにより、AND回路15より出力されるマスク信号
106は“1”レベルとなり、タイミングT10におい
て、マスク回路3からの外部制御信号の出力が許可され
る。
Here, when the level of the value 101 of the external terminal 22 changes at the timing T9, in the edge detection circuit 1, the value 101 of the external terminal 22 is changed by the latch circuit 5 to a signal synchronized with the clock 108 at the timing T9. 109 and the flip-flop circuit 6
After being delayed by one clock at, the signal 110 is output at timing T11 and input to the EXOR circuit 7 and the latch circuit 18. The EXOR circuit 7 receives the signal 109 and the signal 110, outputs the edge detection signal 103 at the timing T9, and inputs them to the pulse generation circuit 16 included in the control signal generation circuit 2 and the AND circuit 13 included in the control circuit 4. To be done. AND
The circuit 13 receives the edge detection signal 103 and receives the timing signal 11 via the clock 108.
3 is output and input to the C terminal of the latch circuit with reset 14. In the latch circuit with reset 14, the signal 114 permitting the output of the external control signal is output at the “1” level in response to the input of the signal 112 output from the latch circuit 12 and the reset input of the signal 113. ,
As a result, the mask signal 106 output from the AND circuit 15 becomes "1" level, and the output of the external control signal from the mask circuit 3 is permitted at the timing T10.

【0026】制御信号発生回路2においては、パルス発
生回路16により、エッジ検出信号103の立ち下がり
から所定の時間後に信号116が出力され、AND回路
17に入力されが、この間タイミングT10〜T11におい
て、外部端子22の値101のレベルが変化すると、再
度、エッジ検出回路1より、タイミングT11〜T12にお
いてエッジ検出信号103が出力されるために、これに
よりパルス発生回路16が初期化され、最後のエッジ検
出信号103の立ち下がりから所定時間後に、タイミン
グT13において信号116が出力されてAND回路17
に入力される。AND回路17においては、信号116
およびクロック108を受けてタイミング信号117が
生成されてラッチ回路18に入力される。ラッチ回路1
8においては、フリップフロップ回路6より出力された
信号110が、タイミング信号117を介して保持さ
れ、タイミングT14においてレベル信号118が出力さ
れてフリップフロップ回路19およびEXOR回路20
に入力される。これを受けて、タイミングT15において
フリップフロップ回路19よりレベル信号119が出力
されると、EXOR回路20においてはレベル信号11
8および119が比較され、タイミングT14においてエ
ッジ検出信号104が出力されて、マスク回路3のAN
D回路9に入力される。
In the control signal generating circuit 2, the pulse generating circuit 16 outputs the signal 116 after a predetermined time has elapsed from the falling edge of the edge detection signal 103 and inputs it to the AND circuit 17, but during this time, at timings T10 to T11. When the level of the value 101 of the external terminal 22 changes, the edge detection circuit 1 outputs the edge detection signal 103 again at timings T11 to T12, whereby the pulse generation circuit 16 is initialized and the last edge is detected. A predetermined time after the fall of the detection signal 103, the signal 116 is output at timing T13 and the AND circuit 17
Entered in. In the AND circuit 17, the signal 116
And the timing signal 117 is generated in response to the clock 108 and is input to the latch circuit 18. Latch circuit 1
8, the signal 110 output from the flip-flop circuit 6 is held via the timing signal 117, and the level signal 118 is output at the timing T14 to output the flip-flop circuit 19 and the EXOR circuit 20.
Entered in. In response to this, when the level signal 119 is output from the flip-flop circuit 19 at the timing T15, the level signal 11 is output in the EXOR circuit 20.
8 and 119 are compared, the edge detection signal 104 is output at timing T14, and AN of the mask circuit 3 is output.
It is input to the D circuit 9.

【0027】マスク回路3においては、当該マスク回路
3に含まれるAND回路9に対する出力制御信号106
が、上述のように“1”レベルにて入力されているため
に、エッジ検出信号104の値が“1”レベルの期間に
おいては、AND回路9より出力される信号115はタ
イミングT14において“1”レベルとなり、ラッチ回路
10からはタイミングT15において外部制御信号107
が出力される。
In the mask circuit 3, the output control signal 106 for the AND circuit 9 included in the mask circuit 3 is output.
However, since it is input at the "1" level as described above, the signal 115 output from the AND circuit 9 is "1" at the timing T14 while the value of the edge detection signal 104 is at the "1" level. , And the external control signal 107 from the latch circuit 10 at timing T15.
Is output.

【0028】上記の第2の実施例においては、前記第1
の実施例の場合と同様に、外部端子の値が“0”レベル
から“1”レベルに変化する立ち上がりエッジと、
“1”レベルから“0”レベルに変化する立ち下がりエ
ッジの両方のエッジに対して、外部制御信号を出力する
例を示したが、第1の実施例とは異なり、本実施例にお
いては、制御信号発生回路2におけるEXOR回路20
の比較方法を変えることにより、片方のエッジに対して
のみ外部制御信号を出力する回路を実現することができ
る。
In the second embodiment described above, the first
As in the case of the above embodiment, the rising edge at which the value of the external terminal changes from the “0” level to the “1” level,
An example in which an external control signal is output to both edges of the falling edge that changes from the “1” level to the “0” level has been shown, but unlike the first embodiment, in the present embodiment, EXOR circuit 20 in control signal generating circuit 2
By changing the comparison method of, it is possible to realize a circuit that outputs the external control signal only to one edge.

【0029】[0029]

【発明の効果】以上説明したように、本発明は、マスク
回路を制御信号発生回路の後段に設けて、且つ制御回路
を付加することにより、外部端子を汎用ポートとして使
用する期間においては外部制御信号の発生を禁止し、外
部端子が汎用ポートから制御端子に切替られた後に、外
部端子の値が変化した時点より外部制御信号の出力を許
可するように回路を構成することにより、端子機能切替
え時における防止することができるという効果がある。
As described above, according to the present invention, the mask circuit is provided in the subsequent stage of the control signal generating circuit, and the control circuit is added, so that the external control is performed during the period when the external terminal is used as the general-purpose port. Switching the pin function by prohibiting signal generation and configuring the circuit to allow the output of the external control signal from the time when the value of the external pin changes after the external pin is switched from the general-purpose port to the control pin There is an effect that it can be prevented in time.

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

【図1】本発明の基本構成を示すブロック図である。FIG. 1 is a block diagram showing a basic configuration of the present invention.

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

【図3】第1の実施例における動作例を示すタイミング
図である。
FIG. 3 is a timing chart showing an operation example in the first embodiment.

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

【図5】第2の実施例における動作例を示すタイミング
図である。
FIG. 5 is a timing chart showing an operation example in the second embodiment.

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

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

1 エッジ検出回路 2 制御信号発生回路 3 マスク回路 4 制御回路 5、8、10〜12、18 リッチ回路 6、19 フリップフロップ回路 7、20 EXOR回路 9、13、15、17 AND回路 14 リセット付ラッチ回路 16 パルス発生回路 1 Edge Detection Circuit 2 Control Signal Generation Circuit 3 Mask Circuit 4 Control Circuit 5, 8, 10-12, 18 Rich Circuit 6, 19 Flip-Flop Circuit 7, 20 EXOR Circuit 9, 13, 15, 17 AND Circuit 14 Latch with Reset Circuit 16 Pulse generation circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 汎用ポートと制御信号入力の2種類の機
能に対し兼用される外部端子を有し、所定の機能選択作
用を介して前記外部端子に印加される入力信号より外部
制御信号を生成して出力する外部制御信号出力回路にお
いて、 前記外部端子ににおけるレベル値の変化を検出し、当該
レベル値の変化に対応するエッジ検出信号を出力するエ
ッジ検出回路と、 前記エッジ検出信号を入力して、所定の制御信号を生成
して出力する制御信号発生回路と、 前記エッジ検出信号を入力して、所定のモード制御信号
を介して外部制御信号の出力の可否を制御するマスク信
号を生成して出力する制御回路と、 前記制御信号を入力して、前記マスク信号を介して外部
制御信号の出力または停止を実行するマスク回路と、 を備えて構成されることを特徴とする外部制御信号入力
回路。
1. An external control signal is generated from an input signal applied to the external terminal via a predetermined function selecting action, having an external terminal commonly used for two types of functions of a general-purpose port and a control signal input. An external control signal output circuit that outputs the edge detection signal that detects a change in the level value at the external terminal and outputs an edge detection signal corresponding to the change in the level value. A control signal generation circuit for generating and outputting a predetermined control signal, and a mask signal for inputting the edge detection signal and controlling whether to output an external control signal via a predetermined mode control signal. And a mask circuit that receives the control signal and outputs or stops an external control signal via the mask signal. External control signal input circuit that.
【請求項2】 前記エッジ検出回路が、外部端子におけ
るレベル値の変化を受けて、所定のクロックに同期させ
て出力する第1のラッチ回路と、前記第1のラッチ回路
の出力を受けて、前記クロックを介して前記外部端子の
1クロック前のレベル値を保持する第1のフリップフロ
ップ回路と、前記第1のラッチ回路の出力と前記第1の
フリップフロップ回路の出力とを比較して不一致を検出
し、エッジ検出信号を出力するEXOR回路とにより構
成され、 前記制御信号発生回路が、前記エッジ検出信号を1/2
クロック分遅延させて制御信号として出力する第2のラ
ッチ回路により構成され、 前記制御回路が、前記クロックを介してモード制御信号
を1/2クロック分遅延させて、外部制御信号の出力を
禁止する信号を出力する第3のラッチ回路と、当該外部
制御信号の出力を、前記クロックを介して禁止する信号
を1/2クロック分遅延させて出力する第4のラッチ回
路と、前記エッジ検出信号を受けて、前記クロックを介
して外部制御信号の出力を許可する信号をラッチする第
1のタイミング信号を出力する第1のAND回路と、前
記外部制御信号の出力を禁止する信号によりリセットさ
れ、前記第1のタイミング信号を介して前記第4のラッ
チ回路から出力される信号を保持し、外部制御信号の出
力を許可する信号を出力するリセット付ラッチ回路と、
前記第3のラッチ回路より出力される外部制御信号の出
力を禁止する信号と、前記リセット付ラッチ回路より出
力される外部制御信号の出力を許可する信号との論理積
をマスク信号として出力する第2のAND回路とにより
構成され、 前記マスク回路が、前記制御信号発生回路より出力され
る制御信号と前記マスク信号との論理積を出力する第3
のAND回路と、前記マスク信号が外部制御信号の出力
を許可する場合に、前記第3のAND回路の出力信号を
受けて、前記クロックを介して外部制御信号を生成して
出力する第5のラッチ回路とにより構成される請求項1
記載の外部制御信号入力回路。
2. The edge detection circuit receives a change of a level value at an external terminal and outputs a first latch circuit which outputs in synchronization with a predetermined clock, and an output of the first latch circuit, A first flip-flop circuit that holds the level value of the external terminal one clock before via the clock is compared with the output of the first latch circuit and the output of the first flip-flop circuit, and they do not match. And an EXOR circuit for detecting an edge detection signal and outputting an edge detection signal, wherein the control signal generation circuit reduces the edge detection signal to 1/2.
It is configured by a second latch circuit that delays by a clock and outputs as a control signal, and the control circuit delays the mode control signal by 1/2 clock through the clock to prohibit the output of the external control signal. A third latch circuit for outputting a signal, a fourth latch circuit for outputting the output of the external control signal by delaying the signal for inhibiting via the clock by 1/2 clock, and the edge detection signal. And a first AND circuit that outputs a first timing signal that latches a signal that permits the output of the external control signal via the clock, and is reset by a signal that inhibits the output of the external control signal. A latch with reset for holding the signal output from the fourth latch circuit via the first timing signal and outputting a signal for permitting the output of the external control signal Circuit,
A logical product of a signal for inhibiting the output of the external control signal output from the third latch circuit and a signal for permitting the output of the external control signal output from the latch circuit with reset is output as a mask signal. A second AND circuit, and the mask circuit outputs a logical product of the control signal output from the control signal generation circuit and the mask signal.
And an AND circuit for receiving the output signal of the third AND circuit when the mask signal permits the output of the external control signal, and outputs the external control signal through the clock. 2. A latch circuit according to claim 1.
The external control signal input circuit described.
【請求項3】 前記エッジ検出回路が、外部端子におけ
るレベル値の変化を受けて、所定のクロックに同期させ
て出力する第1のラッチ回路と、前記第1のラッチ回路
の出力を受けて、前記クロックを介して前記外部端子の
1クロック前のレベル値を保持する第1のフリップフロ
ップ回路と、前記第1のラッチ回路の出力と前記第1の
フリップフロップ回路の出力とを比較して不一致を検出
し、エッジ検出信号を出力する第1のEXOR回路とに
より構成され、 前記制御信号発生回路が、前記エッジ検出信号を受け
て、前記クロックを介して当該エッジ検出信号の立ち下
がりから所定時間後に第1のタイミング信号を生成して
出力するパルス発生回路と、前記第1のタイミング信号
を受けて、前記クロックを介して第2のタイミング信号
を生成して出力する第1のAND回路と、前記第2のタ
イミング信号を介して前記第1のフリップフロップ回路
より出力される信号を保持し、第1のレベル信号を出力
する第2のラッチ回路と、前記第1のレベル信号を受け
て、前記クロックを介して1クロック分遅延させて第2
のレベル信号を出力する第2のフリップフロップ回路
と、これらの第1および第2のレベル信号を比較して不
一致を検出し、制御信号として出力する第2のEXOR
回路とにより構成され、 前記制御回路が、前記クロックを介してモード制御信号
を1/2クロック分遅延させて、外部制御信号の出力を
禁止する信号を出力する第3のラッチ回路と、当該外部
制御信号の出力を、前記クロックを介して禁止する信号
を1/2クロック分遅延させて出力する第4のラッチ回
路と、前記エッジ検出信号を受けて、前記クロックを介
して外部制御信号の出力を許可する信号をラッチする第
3のタイミング信号を出力する第2のAND回路と、前
記外部制御信号の出力を禁止する信号によりリセットさ
れ、前記第3のタイミング信号を介して前記第4のラッ
チ回路から出力される信号を保持し、外部制御信号の出
力を許可する信号を出力するリセット付ラッチ回路と、
前記第3のラッチ回路より出力される外部制御信号の出
力を禁止する信号と、前記リセット付ラッチ回路より出
力される外部制御信号の出力を許可する信号との論理積
をマスク信号として出力する第3のAND回路とにより
構成され、 前記マスク回路が、前記制御信号発生回路より出力され
る制御信号と前記マスク信号との論理積を出力する第4
のAND回路と、前記マスク信号が外部制御信号の出力
を許可する場合に、前記第4のAND回路の出力信号を
受けて、前記クロックを介して外部制御信号を生成して
出力する第5のラッチ回路とにより構成される請求項1
記載の外部制御信号入力回路。
3. The edge detection circuit receives a change of a level value at an external terminal, outputs a first latch circuit which outputs in synchronization with a predetermined clock, and an output of the first latch circuit, A first flip-flop circuit that holds the level value of the external terminal one clock before via the clock is compared with the output of the first latch circuit and the output of the first flip-flop circuit, and they do not match. And a first EXOR circuit for detecting an edge detection signal and outputting an edge detection signal, wherein the control signal generation circuit receives the edge detection signal and outputs a predetermined time from the fall of the edge detection signal via the clock. A pulse generation circuit that later generates and outputs a first timing signal, and receives the first timing signal and generates a second timing signal via the clock. A first AND circuit that outputs the first level signal and a second latch circuit that holds the signal output from the first flip-flop circuit via the second timing signal and outputs a first level signal. Receiving the first level signal, delaying by one clock through the clock,
Second flip-flop circuit which outputs the level signal of the second EXOR and the second EXOR which compares the first level signal and the second level signal to detect a mismatch and outputs the mismatch as a control signal.
A third latch circuit for delaying the mode control signal by ½ clock via the clock and outputting a signal for inhibiting the output of the external control signal, and the external circuit. A fourth latch circuit that delays the output of the control signal by ½ clock of a signal that inhibits the output of the control signal, and outputs the external control signal through the clock in response to the edge detection signal. A second AND circuit that outputs a third timing signal that latches a signal that permits the output of the signal, and a fourth latch that is reset by a signal that inhibits the output of the external control signal. A latch circuit with a reset that holds a signal output from the circuit and outputs a signal that permits output of an external control signal,
A logical product of a signal for inhibiting the output of the external control signal output from the third latch circuit and a signal for permitting the output of the external control signal output from the latch circuit with reset is output as a mask signal. And an AND circuit of No. 3, and the mask circuit outputs a logical product of the control signal output from the control signal generation circuit and the mask signal.
And the mask signal permits the output of the external control signal, the fifth AND circuit receives the output signal of the fourth AND circuit and generates and outputs the external control signal via the clock. 2. A latch circuit according to claim 1.
The external control signal input circuit described.
JP14308293A 1993-06-15 1993-06-15 External control signal input circuit Expired - Fee Related JP3260483B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14308293A JP3260483B2 (en) 1993-06-15 1993-06-15 External control signal input circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14308293A JP3260483B2 (en) 1993-06-15 1993-06-15 External control signal input circuit

Publications (2)

Publication Number Publication Date
JPH076152A true JPH076152A (en) 1995-01-10
JP3260483B2 JP3260483B2 (en) 2002-02-25

Family

ID=15330500

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14308293A Expired - Fee Related JP3260483B2 (en) 1993-06-15 1993-06-15 External control signal input circuit

Country Status (1)

Country Link
JP (1) JP3260483B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02300393A (en) * 1989-05-10 1990-12-12 Toshiba Corp Control device of char bed shape of recover boiler
JP2012108863A (en) * 2010-11-17 2012-06-07 Hynix Semiconductor Inc Internal clock frequency control circuit and semiconductor device using the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02300393A (en) * 1989-05-10 1990-12-12 Toshiba Corp Control device of char bed shape of recover boiler
JP2012108863A (en) * 2010-11-17 2012-06-07 Hynix Semiconductor Inc Internal clock frequency control circuit and semiconductor device using the same

Also Published As

Publication number Publication date
JP3260483B2 (en) 2002-02-25

Similar Documents

Publication Publication Date Title
KR20060095260A (en) Delay locked loop circuit in semiductor and its control method
US5233638A (en) Timer input control circuit and counter control circuit
US6483389B1 (en) Phase and frequency detector providing immunity to missing input clock pulses
US5467354A (en) Test control circuit for controlling a setting and resetting of a flipflop
US6373312B1 (en) Precision, high speed delay system for providing delayed clock edges with new delay values every clock period
JP2003208400A (en) Clock switching circuit
CA2014969C (en) Delay circuit
JPH076152A (en) Input circuit for external control signal
JPH07283727A (en) Phase synchronous detector
KR20040024788A (en) Skew free dual rail bus driver
JPH0645880A (en) Delay type flip flop circuit
JP3168089B2 (en) Chattering elimination circuit
JPH04337924A (en) Synchronizing detection circuit
JPH0450657Y2 (en)
JPH0451624A (en) Bit synchronizing circuit
KR100207481B1 (en) Detecting time adjustment equipment to detect data during desire period
JP2828748B2 (en) Microcontroller
JPH04169429A (en) Redundancy change-over inhibiting device
JPH05243916A (en) Flip-flop circuit provided with logic inversion error preventing function
JPS6085640A (en) Frame synchronization circuit
JPH06120812A (en) Semiconductor integrated circuit
JPH11298301A (en) Flip-flop circuit with asynchronous set/reset
JPS63259711A (en) Clock switch circuit
JPH08316944A (en) Phase adjustment circuit
JPH0242518A (en) Synchronizing circuit for asynchronous signal

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20011127

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071214

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081214

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091214

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091214

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101214

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101214

Year of fee payment: 9

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101214

Year of fee payment: 9

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111214

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111214

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121214

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees