JPH0721094A - Data inputting and outputting circuit - Google Patents

Data inputting and outputting circuit

Info

Publication number
JPH0721094A
JPH0721094A JP5165688A JP16568893A JPH0721094A JP H0721094 A JPH0721094 A JP H0721094A JP 5165688 A JP5165688 A JP 5165688A JP 16568893 A JP16568893 A JP 16568893A JP H0721094 A JPH0721094 A JP H0721094A
Authority
JP
Japan
Prior art keywords
circuit
output
input
direction register
register
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
JP5165688A
Other languages
Japanese (ja)
Inventor
Naoki Inoue
尚起 井上
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5165688A priority Critical patent/JPH0721094A/en
Publication of JPH0721094A publication Critical patent/JPH0721094A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To prevent a direction register from being rewritten due to the noise, etc., by providing with a writing inhibiting circuit which permits writing in the direction register only once. CONSTITUTION:A latch circuit 26A is constituted of a switch circuit 18 which connects the output of a NOT circuit 16 with the input of a NOT circuit 15, and a switch circuit 17 which connects a power supply voltage with the input of the NOT circuit 15. An N channel transistor 19 is connected with the input of the switch circuit 15. A latch circuit 26B is constituted of NOT circuits 20 and 21, and switch circuits 22 and 23. The output of the latch circuit 26B and a writing signal WR to the direction register are inputted to a NOR circuit 24, and the output becomes a writing signal W to the direction register through a NOT circuit 25, so that the writing can be controlled. Thus, the writing in the direction register is permitted only once, and the direction register can be prevented from being rewritten due to the noise.

Description

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

【0001】[0001]

【産業上の利用分野】この発明はマイクロコンピュータ
に用いられ、データ入出力の方向を決める方向レジスタ
を備えたデータ入出力回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data input / output circuit used in a microcomputer and provided with a direction register for determining the direction of data input / output.

【0002】[0002]

【従来の技術】図10は、マイクロコンピュータに用い
られる従来のデータ入出力回路の回路図である。図にお
いて、10は方向レジスタであり、これは直列に接続さ
れた2つのNOT回路1、2とNOT回路2の出力をN
OT回路1の入力に接続するスイッチ回路4とデータバ
ス14から配線8を通してNOT回路1の入力信号を得
るスイッチ回路3より構成される。5はNOT回路1の
入力に接続されたNチャネルトランジスタであり、11
は配線6を通して方向レジスタ10の出力により入出力
の方向を制御する入出力回路である。9はデータバス1
4と入出力回路11を結ぶ配線であり、12は配線7を
通して入出力回路11に接続される外部入出力端子であ
る。そして方向レジスタ10、入出力回路11、外部入
出力端子12よりデータ入出力回路ブロック13が構成
される。
2. Description of the Related Art FIG. 10 is a circuit diagram of a conventional data input / output circuit used in a microcomputer. In the figure, 10 is a direction register, which outputs the outputs of two NOT circuits 1 and 2 and a NOT circuit 2 connected in series.
The switch circuit 4 is connected to the input of the OT circuit 1 and the switch circuit 3 for obtaining the input signal of the NOT circuit 1 from the data bus 14 through the wiring 8. 5 is an N-channel transistor connected to the input of the NOT circuit 1, and 11
Is an input / output circuit for controlling the input / output direction by the output of the direction register 10 through the wiring 6. 9 is the data bus 1
Reference numeral 4 is a wiring connecting the input / output circuit 11 and 4, and 12 is an external input / output terminal connected to the input / output circuit 11 through the wiring 7. A data input / output circuit block 13 is composed of the direction register 10, the input / output circuit 11, and the external input / output terminal 12.

【0003】次に、動作について説明する。図11は、
方向レジスタ10への書き込み信号WRに対する方向レ
ジスタのスイッチ回路3、4のタイミング図を示したも
のである。方向レジスタ10の内容が設定される時、方
向レジスタ10への書き込み信号WRによってスイッチ
回路3がオンすると同時にスイッチ回路4がオフする。
この時、データバス14より配線8を通してデータが入
力され、スイッチ回路3がオフすると同時にスイッチ回
路4がオンして、NOT回路1とNOT回路2で構成さ
れるラッチ回路によってデータが保持される。したがっ
て、データ入出力回路ブロック13をデータの入力を行
うために用いる場合には、方向レジスタ10の内容をグ
ランドレベル(以下、ローレベルという)にして、外部
入出力端子12から入力されたデータを配線7、入出力
回路11、配線9を介してデータバス14に入力する。
また、データ入出力回路ブロック13をデータの出力を
行うために用いる場合には、方向レジスタ10の内容を
電源電圧レベル(以下、ハイレベルという)にして、デ
ータバス14のデータを配線9、入出力回路11、配線
7を介して外部入出力端子12に出力する。尚、初期状
態では方向レジスタ10は初期化信号によってNチャネ
ルトランジスタ5が一定期間オンしているため、ローレ
ベルを保持している。
Next, the operation will be described. FIG. 11 shows
6 is a timing diagram of the direction register switch circuits 3 and 4 for a write signal WR to the direction register 10. FIG. When the content of the direction register 10 is set, the write circuit WR to the direction register 10 turns on the switch circuit 3 and simultaneously turns off the switch circuit 4.
At this time, data is input from the data bus 14 through the wiring 8, the switch circuit 3 is turned off and at the same time the switch circuit 4 is turned on, and the data is held by the latch circuit composed of the NOT circuit 1 and the NOT circuit 2. Therefore, when the data input / output circuit block 13 is used to input data, the content of the direction register 10 is set to the ground level (hereinafter, referred to as low level) and the data input from the external input / output terminal 12 is transferred. Data is input to the data bus 14 via the wiring 7, the input / output circuit 11, and the wiring 9.
When the data input / output circuit block 13 is used for outputting data, the content of the direction register 10 is set to the power supply voltage level (hereinafter, referred to as high level), and the data of the data bus 14 is input to the wiring 9. It outputs to the external input / output terminal 12 through the output circuit 11 and the wiring 7. In the initial state, the direction register 10 holds the low level because the N-channel transistor 5 is on for a certain period of time by the initialization signal.

【0004】以上のようにデータ入出力回路ブロック1
3の方向レジスタ10の内容は図11に示すように方向
レジスタ10への書き込み信号WRによって何度でも書
き換えることができる。
As described above, the data input / output circuit block 1
The contents of the direction register 10 of No. 3 can be rewritten any number of times by the write signal WR to the direction register 10 as shown in FIG.

【0005】[0005]

【発明が解決しようとする課題】上記のような従来のデ
ータ入出力回路では、ノイズなどによってプログラムが
暴走して方向レジスタへ書き込み信号が出され、方向レ
ジスタの内容を書き換えてしまったり、また外部回路や
内部回路に対して貫通電流が流れてしまうなどという問
題点があった。
In the conventional data input / output circuit as described above, the program runs away due to noise or the like and a write signal is output to the direction register, which rewrites the contents of the direction register, or the external register. There was a problem that a through current would flow to the circuit and the internal circuit.

【0006】この発明は、このような問題点を解決する
ためになされたもので、ノイズなどによりプログラムが
暴走して方向レジスタの内容を書き換えてしまうことを
防止または検知し、外部回路や内部回路に対して貫通電
流が流れることを防止するデータ入出力回路を得ること
を目的としたものである。
The present invention has been made in order to solve such a problem, and prevents or detects that the program recklessly rewrites the contents of the direction register due to noise or the like, and an external circuit or an internal circuit is detected. The purpose of the present invention is to obtain a data input / output circuit that prevents a through current from flowing.

【0007】[0007]

【課題を解決するための手段】請求項1に係るデータ入
出力回路においては、方向レジスタへの書き込みが一度
しか行えず、繰り返して書き込みができない書き込み禁
止回路を設ける。
In a data input / output circuit according to a first aspect of the present invention, a write-inhibit circuit is provided which can write to a direction register only once and cannot be repeatedly written.

【0008】請求項2に係るデータ入出力回路において
は、方向レジスタに繰り返して書き込みができない書き
込み禁止回路を設けると同時に一度方向レジスタへの書
き込みを行った後に、その内容を変更したい場合に再度
書き込みを行えるように書き込み許可レジスタを設け
る。
In the data input / output circuit according to the second aspect of the present invention, the direction register is provided with a write-inhibit circuit that cannot be repeatedly written, and at the same time, the data is once written to the direction register, and then the data is written again when it is desired to change the contents. A write enable register is provided to enable the above.

【0009】請求項3に係るデータ入出力回路は、一度
方向レジスタの内容を設定した後にその内容を変更した
い場合に、方向レジスタへの書き込みを二度行うことで
方向レジスタの内容を変更できる回路にする。
A data input / output circuit according to a third aspect of the present invention is a circuit capable of changing the contents of a direction register by once writing the contents of the direction register and then changing the contents by writing to the direction register twice. To

【0010】請求項4に係るデータ入出力回路は、割り
込み処理を行う回路を設け、方向レジスタへの書き込み
が2回以上行われたことを検知する。
A data input / output circuit according to a fourth aspect of the present invention is provided with a circuit for performing interrupt processing, and detects that writing to the direction register has been performed twice or more.

【0011】請求項5に係るデータ入出力回路は、方向
レジスタへの書き込みが二度以上行われた場合に方向レ
ジスタの内容を初期化する初期化信号発生回路を設け
る。
A data input / output circuit according to a fifth aspect of the present invention is provided with an initialization signal generating circuit for initializing the contents of the direction register when writing to the direction register is performed twice or more.

【0012】請求項6に係るデータ入出力回路は、方向
レジスタの内容が変化したことを検知する割り込み処理
回路を設ける。
A data input / output circuit according to a sixth aspect of the present invention is provided with an interrupt processing circuit for detecting that the content of the direction register has changed.

【0013】[0013]

【作用】請求項1におけるデータ入出力回路は、方向レ
ジスタへの書き込みが一度しか行えない書き込み禁止回
路を設けたので、繰り返して方向レジスタへの書き込み
は行えない。
In the data input / output circuit according to the first aspect of the present invention, since the write inhibit circuit is provided so that the data can be written in the direction register only once, the data cannot be repeatedly written in the direction register.

【0014】請求項2におけるデータ入出力回路は、方
向レジスタに書き込み許可レジスタを設けたので、方向
レジスタの内容を変更したい場合についてのみ方向レジ
スタへの書き込みを行う。
In the data input / output circuit according to the second aspect of the present invention, since the write enable register is provided in the direction register, the data is written into the direction register only when it is desired to change the contents of the direction register.

【0015】請求項3におけるデータ入出力回路は、方
向レジスタの内容を変更したい場合についてのみ方向レ
ジスタへの書き込みを2度行う。
In the data input / output circuit according to the third aspect, the writing to the direction register is performed twice only when the content of the direction register is desired to be changed.

【0016】請求項4におけるデータ入出力回路は、割
り込み処理回路により方向レジスタへの書き込み回数を
検知する。
According to another aspect of the data input / output circuit, the interrupt processing circuit detects the number of times of writing to the direction register.

【0017】請求項5におけるデータ入出力回路は、方
向レジスタへの書き込み回数により方向レジスタの内容
を初期化する。
According to another aspect of the data input / output circuit, the contents of the direction register are initialized according to the number of times of writing to the direction register.

【0018】請求項6におけるデータ入出力回路は、割
り込み処理回路を設けたことにより方向レジスタの内容
が変化したことを検知する。
The data input / output circuit according to the sixth aspect detects that the content of the direction register has changed due to the provision of the interrupt processing circuit.

【0019】[0019]

【実施例】【Example】

実施例1.図1は、この発明の実施例1を示す回路図で
ある。図において、26Aはラッチ回路であり、このラ
ッチ回路26AはNOT回路15及び16を直列に接続
してNOT回路16の出力をNOT回路15の入力に接
続するスイッチ回路18と、電源電圧をNOT回路15
の入力に接続するスイッチ回路17より構成されてい
る。19はNチャネルトランジスタでありスイッチ回路
15の入力に接続されている。26Bもラッチ回路であ
り、ラッチ回路26Aと同様の回路構成で、NOT回路
20と21、スイッチ回路22と23より構成されてい
るが、スイッチ回路22によりNOT回路20の入力に
接続されるのは電源電圧ではなくラッチ回路26A出力
となる。24はラッチ回路26Bの出力27と従来の方
向レジスタへの書き込み信号WRが入力として入る2入
力NOR回路であり、その出力がNOT回路25を経
て、この発明による方向レジスタへの書き込み信号W
(図11のWRに対応)となり、図10に示したスイッ
チ回路3、4を制御する。尚、図1に方向レジスタは図
示しないが、この方向レジスタは図10に示したものと
同じである。また、図1のスイッチ回路17、18、2
2、23は従来の方向レジスタへの書き込み信号WRに
よって制御される。
Example 1. 1 is a circuit diagram showing a first embodiment of the present invention. In the figure, reference numeral 26A is a latch circuit. The latch circuit 26A connects the NOT circuits 15 and 16 in series to connect the output of the NOT circuit 16 to the input of the NOT circuit 15, and the power supply voltage to the NOT circuit. 15
The switch circuit 17 is connected to the input of. N-channel transistor 19 is connected to the input of the switch circuit 15. 26B is also a latch circuit, which has the same circuit configuration as the latch circuit 26A and is configured by NOT circuits 20 and 21, and switch circuits 22 and 23. The switch circuit 22 connects to the input of the NOT circuit 20. Not the power supply voltage but the output of the latch circuit 26A. Reference numeral 24 is a two-input NOR circuit into which the output 27 of the latch circuit 26B and the conventional write signal WR to the direction register are input, and the output of which passes through the NOT circuit 25 and the write signal W to the direction register according to the present invention.
(Corresponding to WR in FIG. 11), the switch circuits 3 and 4 shown in FIG. 10 are controlled. Although the direction register is not shown in FIG. 1, this direction register is the same as that shown in FIG. In addition, the switch circuits 17, 18, and 2 of FIG.
2, 23 are controlled by the conventional write signal WR to the direction register.

【0020】次に、実施例1による方向レジスタへの書
き込み信号WRについて説明する。図2は、図1に対す
るタイミング図を示したものである。Nチャネルトラン
ジスタ19に対してハイレベルの初期信号が一定期間入
力されるとNOT回路15の入力はロ−レベルになり、
NOT回路15の出力はハイレベルになる。その結果、
スイッチ回路18と22がオンし、スイッチ回路17と
23がオフするため、ラッチ回路26Aの出力はハイレ
ベルに保持される。この時スイッチ回路22がオンして
いるので、NOT回路20の入力はハイレベルになり、
ラッチ回路26B出力27はロ−レベルになる。初期状
態では、図2に示すようにWRはハイレベルなので2入
力NOR回路24の出力はローレベルとなり、NOT回
路25の出力Wはハイレベルとなる。次に、従来の方向
レジスタへの書き込み信号WRがローレベルになると、
スイッチ回路17と23がオンし、スイッチ回路18と
22がオフし、NOT回路15の出力はローレベルとな
る。この時、ラッチ回路26Bはローレベルに保持され
ているので、ラッチ回路の出力27もローレベルのまま
である。その結果、2入力NOR回路24の入力である
ラッチ回路26Bの出力27と従来の方向レジスタへの
書き込み信号WRで、2入力NOR回路24の出力はハ
イレベルとなり、NOT回路25の出力Wはローレベル
となる。また、従来の方向レジスタへの書き込み信号W
Rがハイレベルになると、スイッチ回路17と23がオ
フし、スイッチ回路18と22がオンし、NOT回路1
5の出力がローレベルなのでラッチ回路26Aの出力は
ローレベルに保持される。この時スイッチ回路22がオ
ンしているので、NOT回路20の入力はローレベルと
なり、NOT回路20の出力はハイレベルになる。した
がって、2入力NOR回路24の入力であるラッチ回路
26Bの出力27と従来の方向レジスタへの書き込み信
号WRがハイレベルなので2入力NOR回路24の出力
はローレベルとなり、NOT回路25の出力であるWは
ハイレベルとなる。図2に示すように、ラッチ回路26
Bの出力27がローレベルの時はWRの入力によってW
の出力が決まるが、ラッチ回路26Bの出力27がハイ
レベルの時は、WRの入力によらずWの出力は常にハイ
レベルとなる。以上の結果、実施例1においては、図1
0に示した方向レジスタへの書き込みは一度はできる
が、繰り返しはできなくなる。
Next, the write signal WR to the direction register according to the first embodiment will be described. FIG. 2 shows a timing diagram for FIG. When a high level initial signal is input to the N-channel transistor 19 for a certain period, the input of the NOT circuit 15 becomes low level,
The output of the NOT circuit 15 becomes high level. as a result,
Since the switch circuits 18 and 22 turn on and the switch circuits 17 and 23 turn off, the output of the latch circuit 26A is held at the high level. At this time, since the switch circuit 22 is turned on, the input of the NOT circuit 20 becomes high level,
The output 27 of the latch circuit 26B becomes low level. In the initial state, as shown in FIG. 2, WR is at high level, so the output of the 2-input NOR circuit 24 is at low level and the output W of the NOT circuit 25 is at high level. Next, when the write signal WR to the conventional direction register becomes low level,
The switch circuits 17 and 23 are turned on, the switch circuits 18 and 22 are turned off, and the output of the NOT circuit 15 becomes low level. At this time, since the latch circuit 26B is held at the low level, the output 27 of the latch circuit also remains at the low level. As a result, the output 27 of the 2-input NOR circuit 24 becomes high level and the output W of the NOT circuit 25 becomes low due to the output 27 of the latch circuit 26B which is the input of the 2-input NOR circuit 24 and the write signal WR to the conventional direction register. It becomes a level. Also, the write signal W to the conventional direction register
When R becomes high level, the switch circuits 17 and 23 are turned off, the switch circuits 18 and 22 are turned on, and the NOT circuit 1
Since the output of 5 is low level, the output of the latch circuit 26A is held at low level. At this time, since the switch circuit 22 is turned on, the input of the NOT circuit 20 becomes low level and the output of the NOT circuit 20 becomes high level. Therefore, since the output 27 of the latch circuit 26B, which is the input of the 2-input NOR circuit 24, and the write signal WR to the conventional direction register are at the high level, the output of the 2-input NOR circuit 24 is at the low level and is the output of the NOT circuit 25. W becomes high level. As shown in FIG. 2, the latch circuit 26
When the output 27 of B is low level, W is input by the input of WR.
Is determined, but when the output 27 of the latch circuit 26B is at the high level, the output of W is always at the high level regardless of the input of WR. As a result of the above, FIG.
Writing to the direction register indicated by 0 can be performed once but cannot be repeated.

【0021】実施例2.図3は、この発明の実施例2を
示す回路図である。図において図1と同一の符合は図1
と同じものを表しており、ラッチ回路42AはNOT回
路28、2入力NOR回路29、スイッチ回路30、3
1より構成され、ラッチ回路42BはNOT回路33、
34、スイッチ回路35、36より構成されている。3
2はNOT回路28の入力に接続されたNチャネルトラ
ンジスタでり、2入力NOR回路の一方の入力はラッチ
回路42Bの出力43を入力とするNOT回路37、3
8で構成された遅延回路42Cの出力となる。また、2
6Cは図1のラッチ回路26AのNOT回路15を2入
力NAND回路41で置き換え、もう1つの入力をラッ
チ回路42Bの出力と初期化信号を入力とする2入力N
OR回路40の出力として得るラッチ回路となってい
る。そして、ラッチ回路42Aと42B、遅延回路42
Cより書き込み許可レジスタ(以下、許可レジスタとい
う)44を構成している。尚、スイッチ回路30、3
1、35、36は書き込み許可レジスタへの書き込み信
号(以下、ライト信号という)によって制御されてい
る。図4は図3に対するタイミング図である。
Example 2. FIG. 3 is a circuit diagram showing a second embodiment of the present invention. In the figure, the same reference numerals as those in FIG.
The latch circuit 42A has the same structure as that of the NOT circuit 28, the 2-input NOR circuit 29, the switch circuits 30, and 3.
1, the latch circuit 42B includes a NOT circuit 33,
34 and switch circuits 35 and 36. Three
2 is an N-channel transistor connected to the input of the NOT circuit 28, and one input of the two-input NOR circuit receives the output 43 of the latch circuit 42B as the input of the NOT circuits 37, 3
It becomes the output of the delay circuit 42C configured by 8. Also, 2
6C replaces the NOT circuit 15 of the latch circuit 26A in FIG. 1 with a 2-input NAND circuit 41, and inputs the other input to the output of the latch circuit 42B and the initialization signal.
It is a latch circuit obtained as an output of the OR circuit 40. Then, the latch circuits 42A and 42B, the delay circuit 42
A write permission register (hereinafter referred to as permission register) 44 is composed of C. The switch circuits 30 and 3
1, 35 and 36 are controlled by a write signal to the write enable register (hereinafter referred to as a write signal). FIG. 4 is a timing diagram for FIG.

【0022】次に、許可レジスタ44について説明す
る。図3において、Nチャネルトランジスタ32に対し
てハイレベルの初期化信号が一定期間入力されるとNO
T回路28の入力がローレベルになり、Nチャネルトラ
ンジスタ32の出力はハイレベルになる。その結果、ス
イッチ回路31、35がオンし、スイッチ回路30、3
6がオフするため、ラッチ回路42Aはハイレベルに保
持される。この時、スイッチ回路35がオンしているの
で、NOT回路33の入力がハイレベルになり、NOT
回路38と2入力NOR回路40の入力がそれぞれロー
レベルとなる。NOT回路38の入力がローレベルなの
でNOT回路37の出力もローレベルとなり、2入力N
OR回路29の一方の入力はローレベルとなる。次に、
許可レジスタへの書き込みを行うとライト信号がローレ
ベルとなり、スイッチ回路30、36がオンし、スイッ
チ回路31、35がオフするのでNOT回路28の出力
はロ−レベルとなる。この時、スイッチ回路36がオン
しているので、ラッチ回路42Bの出力43はローレベ
ルに保持され、NOT回路38と2入力NOR回路40
への入力はローレベルのままである。また、ライト信号
がハイレベルになると、スイッチ回路30、35がオフ
し、スイッチ回路31、36がオンするので、NOT回
路28の出力がローレベルになり、ラッチ回路42AN
O移出力はローレベルに保持される。この時、スイッチ
回路35がオンしているので、NOT回路33の入力は
ローレベルになりNOT回路38の入力と2入力OR回
路40の一方入力はハイレベルとなる。NOT回路38
の入力がハイレベルなのでNOT回路37の出力もハイ
レベルとなる。さらに、NOT回路37と38で遅延回
路42Cが構成されているので、NOT回路38にハイ
レベルの信号が入力されてからNOT回路37からハイ
レベルの信号が出力されるまでに数10ns遅れがあ
る。NOT回路37の出力がハイレベルなので、2入力
NOR回路29の1つの入力はハイレベルになり、2入
力NOR回路29の出力はローレベルとなる。したがっ
て、NOR回路28の入力はローレベルになり、2入力
NOR回路29のもう1つの入力とNOT回路33の入
力はハイレベルとなり、ラッチ回路42Aの出力はロー
レベルに保持されラッチ回路42Bの出力はローレベル
に保持される。
Next, the permission register 44 will be described. In FIG. 3, when a high-level initialization signal is input to the N-channel transistor 32 for a certain period, NO
The input of the T circuit 28 goes low, and the output of the N-channel transistor 32 goes high. As a result, the switch circuits 31 and 35 turn on, and the switch circuits 30 and 3
Since 6 is turned off, the latch circuit 42A is held at the high level. At this time, since the switch circuit 35 is turned on, the input of the NOT circuit 33 becomes high level, and the NOT
The inputs of the circuit 38 and the 2-input NOR circuit 40 are at low level. Since the input of the NOT circuit 38 is low level, the output of the NOT circuit 37 also becomes low level, and the 2-input N
One input of the OR circuit 29 becomes low level. next,
When writing to the permission register, the write signal becomes low level, the switch circuits 30 and 36 are turned on, and the switch circuits 31 and 35 are turned off, so that the output of the NOT circuit 28 becomes low level. At this time, since the switch circuit 36 is on, the output 43 of the latch circuit 42B is held at the low level, and the NOT circuit 38 and the 2-input NOR circuit 40 are held.
The input to is still low. When the write signal goes high, the switch circuits 30 and 35 turn off and the switch circuits 31 and 36 turn on, so the output of the NOT circuit 28 goes low and the latch circuit 42AN.
The O transfer output is held at a low level. At this time, since the switch circuit 35 is turned on, the input of the NOT circuit 33 becomes low level, and the input of the NOT circuit 38 and one input of the 2-input OR circuit 40 become high level. NOT circuit 38
Since the input of is high level, the output of the NOT circuit 37 also becomes high level. Furthermore, since the delay circuits 42C are configured by the NOT circuits 37 and 38, there is a delay of several tens of nanoseconds from the input of the high level signal to the NOT circuit 38 until the output of the high level signal from the NOT circuit 37. . Since the output of the NOT circuit 37 is high level, one input of the 2-input NOR circuit 29 is high level and the output of the 2-input NOR circuit 29 is low level. Therefore, the input of the NOR circuit 28 becomes low level, the other input of the 2-input NOR circuit 29 and the input of the NOT circuit 33 become high level, the output of the latch circuit 42A is held at low level, and the output of the latch circuit 42B is output. Is held low.

【0023】図3に示すように、一度方向レジスタへの
書き込みを行った後に方向レジスタの内容を書き換えた
い場合には、書き込み許可レジスタへの書き込みを行う
ことによって、初期化信号と同様の動作が得られ、ラッ
チ回路26Cの内容をハイレベルにして、ラッチ回路2
6Bの出力をローレベルにする。
As shown in FIG. 3, when it is desired to rewrite the contents of the direction register after writing to the direction register once, the same operation as the initialization signal can be performed by writing to the write enable register. Then, the contents of the latch circuit 26C are set to the high level, and the latch circuit 2
Set the 6B output to low level.

【0024】実施例1では、データ入出力回路の入出力
の方向を変更する方法としては初期化以外になかった
が、実施例2では方向レジスタの内容をプログラムで書
き換えることができる。
In the first embodiment, the method of changing the input / output direction of the data input / output circuit is not limited to initialization, but in the second embodiment, the contents of the direction register can be rewritten by a program.

【0025】実施例3.図5は、この発明の実施例3を
示す回路図である。図において、図1と同一のものは、
同一の符号を付して説明を省略する。45は、ラッチ回
路26Aとラッチ回路26Bを結ぶ配線である。図6
は、図5に対するタイミング図である。
Example 3. FIG. 5 is a circuit diagram showing a third embodiment of the present invention. In the figure, the same thing as in FIG.
The same reference numerals are given and the description is omitted. 45 is a wiring connecting the latch circuits 26A and 26B. Figure 6
6 is a timing diagram for FIG.

【0026】図5では、配線45によってラッチ回路2
6Bの内容がラッチ回路26Aに入力されるため、ラッ
チ回路26Aの入力は方向レジスタへの書き込みが行わ
れるごとに変化する。このように、実施例1ではデータ
入出力回路の入出力の方向を変更する方法としては初期
化以外になかったが、実施例3では方向レジスタの内容
を奇数回ごとにプログラムで書き換えることができる。
In FIG. 5, the latch circuit 2 is connected by the wiring 45.
Since the content of 6B is input to the latch circuit 26A, the input of the latch circuit 26A changes every time writing to the direction register is performed. As described above, in the first embodiment, the only method for changing the input / output direction of the data input / output circuit is initialization, but in the third embodiment, the contents of the direction register can be rewritten by a program every odd number of times. .

【0027】実施例4.図7は、この発明の実施例4を
示す回路図である。図において、図1と同一のものは同
一の符号を付して説明を省略する。46は、ラッチ回路
26Bの出力とNOT回路48の出力を入力とする2入
力NAND回路であり、47はこの2入力NAND回路
46の出力であり、割り込み回路ブロック49に接続さ
れる。
Example 4. FIG. 7 is a circuit diagram showing Embodiment 4 of the present invention. In the figure, the same parts as those in FIG. 1 are designated by the same reference numerals and the description thereof will be omitted. Reference numeral 46 is a 2-input NAND circuit that receives the output of the latch circuit 26B and the output of the NOT circuit 48, and 47 is the output of the 2-input NAND circuit 46, which is connected to the interrupt circuit block 49.

【0028】実施例4では、一度方向レジスタへの書き
込みが行われて、ラッチ回路26Bの出力27がハイレ
ベルになった後に、従来の方向レジスタへの書き込み信
号WRがローレベルになると、2入力NAND回路46
の出力がローレベルになり、この出力が割り込み回路ブ
ロック49に入力され割り込み処理が行われる。これに
よって、一度方向レジスタへの書き込みが行われた後
に、ノイズなどによりプログラムが暴走して方向レジス
タの内容を書き換えてしまった場合に、これを検知する
ことができる。
In the fourth embodiment, when the write signal WR to the conventional direction register becomes low level after the write to the direction register is once performed and the output 27 of the latch circuit 26B becomes high level, two inputs are made. NAND circuit 46
Goes to a low level, and this output is input to the interrupt circuit block 49 for interrupt processing. This makes it possible to detect when the program has run away due to noise or the like and the contents of the direction register have been rewritten after the writing to the direction register once.

【0029】実施例5.図8は、この発明の実施例5を
示す回路図である。回路構成は図7と同様であり、2入
力NAND回路46の出力47が初期化回路ブロック5
0に接続される。図8では、一度方向レジスタへの書き
込みを行い、ラッチ回路26Bの出力27がハイレベル
になった後に、従来の方向レジスタへの書き込み信号W
Rがローレベルになると、2入力NAND回路46の出
力がローレベルになり、これが初期化回路ブロック50
に入力され初期化信号が発生する。これによって、一度
方向レジスタへの書き込みが行われた後に、ノイズなど
によりプログラムが暴走して方向レジスタの内容を書き
換えてしまった場合には、強制的に初期化を行う。
Example 5. FIG. 8 is a circuit diagram showing a fifth embodiment of the present invention. The circuit configuration is similar to that of FIG. 7, and the output 47 of the 2-input NAND circuit 46 is the initialization circuit block 5
Connected to 0. In FIG. 8, after writing to the direction register once and the output 27 of the latch circuit 26B becomes high level, the conventional write signal W to the direction register W
When R becomes low level, the output of the 2-input NAND circuit 46 becomes low level, which is the initialization circuit block 50.
And an initialization signal is generated. As a result, if the program recklessly rewrites the contents of the direction register due to noise or the like after writing to the direction register once, initialization is forcibly performed.

【0030】実施例6.図9は、この発明の実施例6を
示す回路図である。図において、51、52は遅延回路
60を構成するNOT回路であり、53は遅延回路60
の入力と出力を2入力とするEXOR回路であり、54
はEXOR回路53の出力とNOT回路56の出力を2
入力とする2入力NOR回路であり、この2入力NOR
回路54の出力がNOT回路55を介して割り込み回路
ブロック57に接続される。また、遅延回路60の入力
59は方向レジスタの内容であり、NOT回路56の入
力58は方向レジスタへの書き込み信号である。
Example 6. FIG. 9 is a circuit diagram showing a sixth embodiment of the present invention. In the figure, 51 and 52 are NOT circuits that constitute the delay circuit 60, and 53 is the delay circuit 60.
Is an EXOR circuit having two inputs and outputs of
Outputs the output of the EXOR circuit 53 and the output of the NOT circuit 56 to 2
This is a 2-input NOR circuit that receives the input.
The output of the circuit 54 is connected to the interrupt circuit block 57 via the NOT circuit 55. The input 59 of the delay circuit 60 is the contents of the direction register, and the input 58 of the NOT circuit 56 is the write signal to the direction register.

【0031】図9において、ノイズなどにより方向レジ
スタの内容59が変化するとEXOR回路53の一方の
入力が変化し、もう一方の出力は遅延回路60の出力に
なっているので変化するまでに10数ns時間がかか
る。そのため、EXOR回路53の出力はこの10数n
sの間ローレベルとなり、この時方向レジスタへの書き
込み信号58はハイレベル、NOT回路56の出力はロ
ーレベルとなる。2入力NOR回路54の両方の入力が
ローレベルになるので、その出力はハイレベルとなり、
NOT回路55の出力はローレベルとなる。したがっ
て、この時には割り込み回路ブロック57に10数ns
のローパルスを入力して、割り込み処理を行う。また、
方向レジスタへの書き込みを行ったときは、方向レジス
タへの書き込み信号58がローレベルとなり、NOT回
路56の出力がハイレベルとなる。この時、2入力NO
R回路54の一方の入力がハイレベルなので、その出力
はローレベルとなり、NOT回路55の出力はハイレベ
ルとなる。したがって、この時にはNOT回路55の出
力が変化しないので、割り込み処理は行われない。この
ように、ノイズなどにより方向レジスタの内容が変化し
たことを検知できる。
In FIG. 9, when the content 59 of the direction register changes due to noise or the like, one input of the EXOR circuit 53 changes and the other output becomes the output of the delay circuit 60. ns takes time. Therefore, the output of the EXOR circuit 53 is n
It goes low for s, at which time the write signal 58 to the direction register goes high and the output of the NOT circuit 56 goes low. Since both inputs of the 2-input NOR circuit 54 become low level, its output becomes high level,
The output of the NOT circuit 55 becomes low level. Therefore, at this time, the interrupt circuit block 57 has ten or more ns.
The low pulse of is input and interrupt processing is performed. Also,
When writing to the direction register, the write signal 58 to the direction register goes low and the output of the NOT circuit 56 goes high. At this time, 2 input NO
Since one input of the R circuit 54 is at high level, its output becomes low level and the output of the NOT circuit 55 becomes high level. Therefore, at this time, since the output of the NOT circuit 55 does not change, the interrupt processing is not performed. In this way, it is possible to detect that the contents of the direction register have changed due to noise or the like.

【0032】[0032]

【発明の効果】請求項第1項の発明におけるデータ入出
力回路によれば、方向レジスタへの書き込みを一度しか
行えない書き込み禁止回路設けたので、繰り返して方向
レジスタへの書き込みは行えないという効果を奏する。
According to the data input / output circuit of the first aspect of the present invention, since the write inhibit circuit is provided so that writing to the direction register can be performed only once, the effect that writing to the direction register cannot be performed repeatedly. Play.

【0033】請求項第2項の発明におけるデータ入出力
回路によれば、方向レジスタに書き込み許可レジスタを
設けたので、方向レジスタの内容を変更したい場合につ
いてのみ方向レジスタへの書き込みを行うことができる
という効果を奏する。
According to the data input / output circuit of the second aspect of the invention, since the direction register is provided with the write enable register, the direction register can be written only when it is desired to change the contents of the direction register. Has the effect.

【0034】請求項第3項の発明におけるデータ入出力
回路によれば、方向レジスタの内容を変更したい場合に
ついてのみ方向レジスタへの書き込みを2度行うことが
できるという効果を奏する。
According to the data input / output circuit of the third aspect of the invention, there is an effect that writing to the direction register can be performed twice only when it is desired to change the contents of the direction register.

【0035】請求項第4項の発明におけるデータ入出力
回路によれば、割り込み処理回路を設けたことにより、
方向レジスタへの書き込み回数を検知することができる
という効果を奏する。
According to the data input / output circuit of the fourth aspect of the present invention, by providing the interrupt processing circuit,
It is possible to detect the number of times of writing to the direction register.

【0036】請求項第5項の発明におけるデータ入出力
回路によれば、初期化信号発生回路を設けたことによ
り、方向レジスタへの書き込み回数を検知して方向レジ
スタの内容を初期化することができるという効果を奏す
る。
According to the data input / output circuit of the fifth aspect of the present invention, by providing the initialization signal generating circuit, the number of times of writing to the direction register can be detected and the contents of the direction register can be initialized. It has the effect of being able to.

【0037】請求項第6項の発明におけるデータ入出力
回路によれば、割り込み処理回路を設けたことにより、
方向レジスタの内容が変化したことを検知することがで
きるという効果を奏する。
According to the data input / output circuit of the sixth aspect of the invention, by providing the interrupt processing circuit,
It is possible to detect that the content of the direction register has changed.

【0038】そして以上のように、請求項1乃至請求項
6におけるデータ入出力回路によれば、ノイズなどによ
りプログラムが暴走して方向レジスタの内容を書き換え
てしまうことを防止または検知することができ、外部回
路や内部回路に対して貫通電流が流れることを防ぐこと
ができるという効果を奏する。
As described above, according to the data input / output circuits of claims 1 to 6, it is possible to prevent or detect that the program recklessly rewrites the contents of the direction register due to noise or the like. Thus, it is possible to prevent a through current from flowing to the external circuit and the internal circuit.

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

【図1】この発明の実施例1を示す回路図である。FIG. 1 is a circuit diagram showing a first embodiment of the present invention.

【図2】図1に対するタイミング図である。FIG. 2 is a timing diagram for FIG.

【図3】この発明の実施例2を示す回路図である。FIG. 3 is a circuit diagram showing a second embodiment of the present invention.

【図4】図3に対するタイミング図である。FIG. 4 is a timing diagram for FIG.

【図5】この発明の実施例3を示す回路図である。FIG. 5 is a circuit diagram showing a third embodiment of the present invention.

【図6】図5に対するタイミング図である。FIG. 6 is a timing diagram for FIG.

【図7】この発明の実施例4を示す回路図である。FIG. 7 is a circuit diagram showing a fourth embodiment of the present invention.

【図8】この発明の実施例5を示す回路図である。FIG. 8 is a circuit diagram showing a fifth embodiment of the present invention.

【図9】この発明の実施例6を示す回路図である。FIG. 9 is a circuit diagram showing a sixth embodiment of the present invention.

【図10】従来のデータ入出力回路の回路図である。FIG. 10 is a circuit diagram of a conventional data input / output circuit.

【図11】図10に対するタイミング図である。11 is a timing diagram for FIG. 10. FIG.

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

1,2,15,16,20,21,25,28,33,
34,37,38,48,51,52,55,56 N
OT回路 3,4,17,18,22,23,30,31,35,
36 スイッチ回路 5,19,32 Nチャネルトランジスタ 10 方向レジスタ 11 入出力回路 13 データ入出力回路ブロック 44 方向レジスタへの書き込み許可レジスタ 49,57 割り込み回路ブロック
1, 2, 15, 16, 20, 21, 25, 28, 33,
34, 37, 38, 48, 51, 52, 55, 56 N
OT circuit 3, 4, 17, 18, 22, 23, 30, 31, 35,
36 switch circuit 5, 19, 32 N channel transistor 10 direction register 11 input / output circuit 13 data input / output circuit block 44 write enable register to direction register 49, 57 interrupt circuit block

【手続補正書】[Procedure amendment]

【提出日】平成6年7月15日[Submission date] July 15, 1994

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0005[Name of item to be corrected] 0005

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0005】[0005]

【発明が解決しようとする課題】上記のような従来のデ
ータ入出力回路では、ノイズなどによってプログラムが
暴走して方向レジスタへ書き込み信号が出され、方向レ
ジスタの内容を書き換えたりすることがあり、また外部
回路または内部回路に対して貫通電流が流れてしまうな
どという問題点があった。
In the conventional data input / output circuit as described above, the program may run away due to noise or the like and a write signal may be output to the direction register, which may rewrite the contents of the direction register. Further, there is a problem that a through current may flow to an external circuit or an internal circuit.

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0016[Correction target item name] 0016

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0016】請求項4におけるデータ入出力回路は、割
り込み処理回路により方向レジスタへの書き込みが2回
以上行われたことを検知する。
According to another aspect of the data input / output circuit of the present invention, the interrupt processing circuit writes data to the direction register twice.
It is detected that the above has been performed .

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0017[Correction target item name] 0017

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0017】請求項5におけるデータ入出力回路は、方
向レジスタへの書き込みが2回以上行われたことにより
方向レジスタの内容を初期化する。
In the data input / output circuit according to the fifth aspect, the contents of the direction register are initialized by writing to the direction register twice or more .

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0020[Correction target item name] 0020

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0020】次に、実施例1による方向レジスタへの書
き込み信号について説明する。図2は、図1に対する
タイミング図を示したものである。Nチャネルトランジ
スタ19に対してハイレベルの初期信号が一定期間入力
されるとNOT回路15の入力はロ−レベルになり、N
OT回路15の出力はハイレベルになる。その結果、ス
イッチ回路18と22がオンし、スイッチ回路17と2
3がオフするため、ラッチ回路26Aの出力はハイレベ
ルに保持される。この時スイッチ回路22がオンしてい
るので、NOT回路20の入力はハイレベルになり、ラ
ッチ回路26B出力27はロ−レベルになる。初期状
態では、図2に示すようにWRはハイレベルなので2入
力NOR回路24の出力はローレベルとなり、NOT回
路25の出力Wはハイレベルとなる。次に、従来の方向
レジスタへの書き込み信号WRがローレベルになると、
スイッチ回路17と23がオンし、スイッチ回路18と
22がオフし、NOT回路15の出力はローレベルとな
る。この時、ラッチ回路26Bはローレベルに保持され
ているので、ラッチ回路26Bの出力27ローレベル
のままである。その結果、2入力NOR回路24の入力
であるラッチ回路26Bの出力27と従来の方向レジス
タへの書き込み信号WRで、2入力NOR回路24の出
力はハイレベルとなり、NOT回路25の出力Wはロー
レベルとなる。また、従来の方向レジスタへの書き込み
信号WRがハイレベルになると、スイッチ回路17と2
3がオフし、スイッチ回路18と22がオンし、NOT
回路15の出力がローレベルなのでラッチ回路26Aの
出力はローレベルに保持される。この時スイッチ回路2
2がオンしているので、NOT回路20の入力はローレ
ベルとなり、NOT回路20の出力はハイレベルにな
る。したがって、2入力NOR回路24の入力であるラ
ッチ回路26Bの出力27と従来の方向レジスタへの書
き込み信号WRがハイレベルなので2入力NOR回路2
4の出力はローレベルとなり、NOT回路25の出力で
あるWはハイレベルとなる。図2に示すように、ラッチ
回路26Bの出力27がローレベルの時はWRの入力に
よってWの出力が決まるが、ラッチ回路26Bの出力2
7がハイレベルの時は、WRの入力によらずWの出力は
常にハイレベルとなる。以上の結果、実施例1において
は、図10に示した方向レジスタへの書き込みは一度は
できるが、繰り返しはできなくなる。
Next, the write signal W to the direction register according to the first embodiment will be described. FIG. 2 shows a timing diagram for FIG. When a high-level initial signal is input to the N-channel transistor 19 for a certain period, the input of the NOT circuit 15 becomes low level,
The output of the OT circuit 15 becomes high level. As a result, the switch circuits 18 and 22 are turned on, and the switch circuits 17 and 2 are turned on.
Since 3 is turned off, the output of the latch circuit 26A is held at the high level. Since the switch circuit 22 is turned on at this time, the input of the NOT circuit 20 becomes high level, and the output 27 of the latch circuit 26B becomes low level. In the initial state, as shown in FIG. 2, WR is at high level, so the output of the 2-input NOR circuit 24 is at low level and the output W of the NOT circuit 25 is at high level. Next, when the write signal WR to the conventional direction register becomes low level,
The switch circuits 17 and 23 are turned on, the switch circuits 18 and 22 are turned off, and the output of the NOT circuit 15 becomes low level. At this time, the latch circuit 26B is held at a low level, the output of the latch circuit 26B 27 remains at a low level. As a result, the output 27 of the 2-input NOR circuit 24 becomes high level and the output W of the NOT circuit 25 becomes low due to the output 27 of the latch circuit 26B which is the input of the 2-input NOR circuit 24 and the write signal WR to the conventional direction register. It becomes a level. Further, when the write signal WR to the conventional direction register becomes high level, the switch circuits 17 and 2
3 turns off, switch circuits 18 and 22 turn on, and NOT
Since the output of the circuit 15 is low level, the output of the latch circuit 26A is held at low level. Switch circuit 2 at this time
Since 2 is turned on, the input of the NOT circuit 20 becomes low level and the output of the NOT circuit 20 becomes high level. Therefore, since the output 27 of the latch circuit 26B, which is the input of the 2-input NOR circuit 24, and the write signal WR to the conventional direction register are at high level, the 2-input NOR circuit 2
The output of 4 becomes low level, and the output W of the NOT circuit 25 becomes high level. As shown in FIG. 2, when the output 27 of the latch circuit 26B is at the low level, the output of W is determined by the input of WR.
When 7 is high level, the output of W is always high level regardless of the input of WR. As a result, in the first embodiment, writing to the direction register shown in FIG. 10 can be performed once but cannot be repeated.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0022[Name of item to be corrected] 0022

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0022】次に、許可レジスタ44について説明す
る。図3において、Nチャネルトランジスタ32に対し
てハイレベルの初期化信号が一定期間入力されるとNO
T回路28の入力がローレベルになり、Nチャネルトラ
ンジスタ32の出力はハイレベルになる。その結果、ス
イッチ回路31、35がオンし、スイッチ回路30、3
6がオフするため、ラッチ回路42Aはハイレベルに保
持される。この時、スイッチ回路35がオンしているの
で、NOT回路33の入力がハイレベルになり、NOT
回路38と2入力NOR回路40の入力がそれぞれロー
レベルとなる。NOT回路38の入力がローレベルなの
でNOT回路37の出力もローレベルとなり、2入力N
OR回路29の一方の入力はローレベルとなる。次に、
許可レジスタへの書き込みを行うとライト信号がローレ
ベルとなり、スイッチ回路30、36がオンし、スイッ
チ回路31、35がオフするのでNOT回路28の出力
はロ−レベルとなる。この時、スイッチ回路36がオン
しているので、ラッチ回路42Bの出力43はローレベ
ルに保持され、NOT回路38と2入力NOR回路40
への入力はローレベルのままである。また、ライト信号
がハイレベルになると、スイッチ回路30、35がオフ
し、スイッチ回路31、36がオンするので、NOT回
路28の出力がローレベルになり、ラッチ回路42A
出力はローレベルに保持される。この時、スイッチ回路
35がオンしているので、NOT回路33の入力はロー
レベルになりNOT回路38の入力と2入力NOR回路
40の一方入力はハイレベルとなる。NOT回路38
の入力がハイレベルなのでNOT回路37の出力もハイ
レベルとなる。さらに、NOT回路37と38で遅延回
路42Cが構成されているので、NOT回路38にハイ
レベルの信号が入力されてからNOT回路37からハイ
レベルの信号が出力されるまでに数10ns遅れがあ
る。NOT回路37の出力がハイレベルなので、2入力
NOR回路29の1つの入力はハイレベルになり、2入
力NOR回路29の出力はローレベルとなる。したがっ
て、NOT回路28の入力はローレベルになり、2入力
NOR回路29のもう1つの入力とNOT回路33の入
力はハイレベルとなり、ラッチ回路42Aの出力はハイ
レベルに保持されラッチ回路42Bの出力はローレベル
に保持される。
Next, the permission register 44 will be described. In FIG. 3, when a high-level initialization signal is input to the N-channel transistor 32 for a certain period, NO
The input of the T circuit 28 goes low, and the output of the N-channel transistor 32 goes high. As a result, the switch circuits 31 and 35 turn on, and the switch circuits 30 and 3
Since 6 is turned off, the latch circuit 42A is held at the high level. At this time, since the switch circuit 35 is turned on, the input of the NOT circuit 33 becomes high level, and the NOT
The inputs of the circuit 38 and the 2-input NOR circuit 40 are at low level. Since the input of the NOT circuit 38 is low level, the output of the NOT circuit 37 also becomes low level, and the 2-input N
One input of the OR circuit 29 becomes low level. next,
When writing to the permission register, the write signal becomes low level, the switch circuits 30 and 36 are turned on, and the switch circuits 31 and 35 are turned off, so that the output of the NOT circuit 28 becomes low level. At this time, since the switch circuit 36 is on, the output 43 of the latch circuit 42B is held at the low level, and the NOT circuit 38 and the 2-input NOR circuit 40 are held.
The input to is still low. Further, when the write signal becomes high level, the switch circuit 30, 35 is turned off, the switch circuits 31 and 36 are turned on, the output of the NOT circuit 28 becomes low level, <br/> output of the latch circuit 42A is Holds low. At this time, since the switch circuit 35 is turned on, one input of the input and two-input NOR circuit 40 of the NOT circuit 38 inputs of the NOT circuit 33 becomes low level to the high level. NOT circuit 38
Since the input of is high level, the output of the NOT circuit 37 also becomes high level. Furthermore, since the delay circuits 42C are configured by the NOT circuits 37 and 38, there is a delay of several tens of nanoseconds from the input of the high level signal to the NOT circuit 38 until the output of the high level signal from the NOT circuit 37. . Since the output of the NOT circuit 37 is high level, one input of the 2-input NOR circuit 29 is high level and the output of the 2-input NOR circuit 29 is low level. Therefore, the input of the NOT circuit 28 becomes low level, the other input of the 2-input NOR circuit 29 and the input of the NOT circuit 33 become high level, and the output of the latch circuit 42A is held at high level and latched. The output of the circuit 42B is held at low level.

【手続補正6】[Procedure correction 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0031[Correction target item name] 0031

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0031】図9において、ノイズなどにより方向レジ
スタの内容59が変化するとEXOR回路53の一方の
入力が変化し、もう一方の入力は遅延回路60の出力に
なっているので変化するまでに10数ns時間がかか
る。そのため、EXOR回路53の出力はこの10数n
sの間ローレベルとなり、この時方向レジスタへの書き
込み信号58はハイレベル、NOT回路56の出力はロ
ーレベルとなる。2入力NOR回路54の両方の入力が
ローレベルになるので、その出力はハイレベルとなり、
NOT回路55の出力はローレベルとなる。したがっ
て、この時には割り込み回路ブロック57に10数ns
のローパルスを入力して、割り込み処理を行う。また、
方向レジスタへの書き込みを行ったときは、方向レジス
タへの書き込み信号58がローレベルとなり、NOT回
路56の出力がハイレベルとなる。この時、2入力NO
R回路54の一方の入力がハイレベルなので、その出力
はローレベルとなり、NOT回路55の出力はハイレベ
ルとなる。したがって、この時にはNOT回路55の出
力が変化しないので、割り込み処理は行われない。この
ように、ノイズなどにより方向レジスタの内容が変化し
たことを検知できる。
[0031] In FIG 9, one of the input changes of the EXOR circuit 53 the contents 59 of the direction register due noise changes, the number 10 to the other input varies so as an output of the delay circuit 60 ns takes time. Therefore, the output of the EXOR circuit 53 is n
It goes low for s, at which time the write signal 58 to the direction register goes high and the output of the NOT circuit 56 goes low. Since both inputs of the 2-input NOR circuit 54 become low level, its output becomes high level,
The output of the NOT circuit 55 becomes low level. Therefore, at this time, the interrupt circuit block 57 has ten or more ns.
The low pulse of is input and interrupt processing is performed. Also,
When writing to the direction register, the write signal 58 to the direction register goes low and the output of the NOT circuit 56 goes high. At this time, 2 input NO
Since one input of the R circuit 54 is at high level, its output becomes low level and the output of the NOT circuit 55 becomes high level. Therefore, at this time, since the output of the NOT circuit 55 does not change, the interrupt processing is not performed. In this way, it is possible to detect that the contents of the direction register have changed due to noise or the like.

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0034[Correction target item name] 0034

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0034】請求項第3項の発明におけるデータ入出力
回路によれば、方向レジスタの内容を変更したい場合に
ついてのみ方向レジスタへの書き込みを2度行うこと
できるという効果を奏する。
According to the data output circuit in the invention of claim 3 wherein, an effect that it <br/> by performing twice writing to direction register only if you want to change the contents of the direction register.

【手続補正8】[Procedure Amendment 8]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0035[Correction target item name] 0035

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0035】請求項第4項の発明におけるデータ入出力
回路によれば、割り込み処理回路を設けたことにより、
方向レジスタへの書き込みが2回以上行われたことを検
知することができるという効果を奏する。
According to the data input / output circuit of the fourth aspect of the present invention, by providing the interrupt processing circuit,
It is possible to detect that writing to the direction register is performed twice or more .

【手続補正9】[Procedure Amendment 9]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0036[Correction target item name] 0036

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0036】請求項第5項の発明におけるデータ入出力
回路によれば、初期化信号発生回路を設けたことによ
り、方向レジスタへの書き込みが2回以上行われたこと
を検知して方向レジスタの内容を初期化することができ
るという効果を奏する。
According to the data input / output circuit of the fifth aspect of the present invention, by providing the initialization signal generating circuit, it is detected that writing to the direction register is performed twice or more. This has the effect that the contents of the direction register can be initialized.

【手続補正10】[Procedure Amendment 10]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】符号の説明[Correction target item name] Explanation of code

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【符号の説明】 1、2、15、16、20、21、25、28、33、
34、37、38、48、51、52、55、56 N
OT回路、3、4、17、18、22、23、30、3
1、35、36 スイッチ回路、5、19、32 Nチ
ャネルトランジスタ、10 方向レジスタ、11 入出
力回路、13 データ入出力回路ブロック、44 方向
レジスタへの書き込み許可レジスタ、49、57 割り
込み回路ブロック、24、29、40、54 2入力N
OR回路、41、46 2入力NAND回路、 53
2入力EXOR回路、60、42C 遅延回路、26
A、26B、26C、42A、42B ラッチ回路、1
2 外部入力端子、13 データ入出力回路ブロック、
14 データバス、50 初期化回路ブロック、58方
向レジスタへの書き込み信号、59 方向レジスタの内
容。
[Explanation of Codes] 1, 2, 15, 16, 20, 21, 25, 28, 33,
34, 37, 38, 48, 51, 52, 55, 56 N
OT circuits 3, 4, 17, 18, 22, 23, 30, 3
1, 35, 36 switch circuit, 5, 19, 32 N-channel transistor, 10 direction register, 11 input / output circuit, 13 data input / output circuit block, 44 direction register write enable register, 49, 57 interrupt circuit block, 24 , 29, 40, 54 2 inputs N
OR circuit, 41, 46 2-input NAND circuit, 53
2-input EXOR circuit, 60, 42C delay circuit, 26
A, 26B, 26C, 42A, 42B Latch circuit, 1
2 external input terminals, 13 data input / output circuit block,
14 data buses, 50 initialization circuit blocks, 58 ways
Write signal to the direction register, out of the 59 direction registers
Yong.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 データ入出力の方向を決める方向レジス
タを備えたデータ入出力回路において、上記方向レジス
タへの書き込みが一度しか行えず、繰り返して書き込み
ができない書き込み禁止回路を設けたことを特徴とする
データ入出力回路。
1. A data input / output circuit provided with a direction register for determining a direction of data input / output, comprising a write inhibit circuit which can write to the direction register only once and cannot be repeatedly written. Data input / output circuit.
【請求項2】 請求項1のデータ入出力回路において、
一度方向レジスタの入出力の方向を設定した後にその入
出力の方向を変更したい場合、上記方向レジスタに書き
込みを行えるように書き込み許可レジスタを設けたこと
を特徴とするデータ入出力回路。
2. The data input / output circuit according to claim 1,
A data input / output circuit, wherein a write enable register is provided so that the direction register can be written when the input / output direction of the direction register is once set and then the direction of the input / output direction can be changed.
【請求項3】 請求項1のデータ入出力回路において、
一度方向レジスタの入出力の方向を設定した後にその入
出力の方向を変更したい場合、上記方向レジスタへの書
き込みを二度行うことで上記方向レジスタの内容が変更
できる回路を設けたことを特徴とするデータ入出力回
路。
3. The data input / output circuit according to claim 1,
When it is desired to change the input / output direction of the direction register after setting the input / output direction of the direction register once, a circuit is provided which can change the contents of the direction register by writing to the direction register twice. Data input / output circuit.
【請求項4】 データ入出力の方向を決める方向レジス
タを備えたデータ入出力回路において、上記方向レジス
タへの書き込みを一度だけに制限する回路を設けると共
に、ノイズなどによりプログラムが暴走して、再度上記
方向レジスタへの書き込みが行われた場合に割り込み処
理を行う回路を設け、上記方向レジスタへの書き込みが
2回以上行われたことが検知できるようにしたことを特
徴とするデータ入出力回路。
4. A data input / output circuit having a direction register for determining the direction of data input / output, wherein a circuit for restricting writing to the direction register only once is provided, and a program runs away due to noise and the A data input / output circuit, characterized in that a circuit for performing an interrupt process when writing to the direction register is provided so that it is possible to detect that writing to the direction register is performed twice or more.
【請求項5】 データ入出力の方向を決める方向レジス
タを備えたデータ入出力回路において、上記方向レジス
タへの書き込みを一度だけに制限する回路を設けると共
に、ノイズなどによりプログラムが暴走して、再度上記
方向レジスタへの書き込みが行われた場合に初期化信号
を発生する回路を設け、上記方向レジスタの入出力の方
向を強制的に初期化することを特徴とするデータ入出力
回路。
5. A data input / output circuit having a direction register for determining the direction of data input / output, wherein a circuit for restricting writing to the direction register only once is provided, and a program runs away due to noise and the A data input / output circuit comprising a circuit for generating an initialization signal when writing is performed to the direction register, forcibly initializing the input / output direction of the direction register.
【請求項6】 データ入出力の方向を決める方向レジス
タを備えたデータ入出力回路において、上記方向レジス
タの内容がノイズなどにより変化したことを検知する割
り込み処理回路を設けたことを特徴とするデータ入出力
回路。
6. A data input / output circuit having a direction register for determining the direction of data input / output, comprising an interrupt processing circuit for detecting that the content of the direction register is changed by noise or the like. Input / output circuit.
JP5165688A 1993-07-05 1993-07-05 Data inputting and outputting circuit Pending JPH0721094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5165688A JPH0721094A (en) 1993-07-05 1993-07-05 Data inputting and outputting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5165688A JPH0721094A (en) 1993-07-05 1993-07-05 Data inputting and outputting circuit

Publications (1)

Publication Number Publication Date
JPH0721094A true JPH0721094A (en) 1995-01-24

Family

ID=15817158

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5165688A Pending JPH0721094A (en) 1993-07-05 1993-07-05 Data inputting and outputting circuit

Country Status (1)

Country Link
JP (1) JPH0721094A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015162192A (en) * 2014-02-28 2015-09-07 株式会社沖データ semiconductor integrated circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015162192A (en) * 2014-02-28 2015-09-07 株式会社沖データ semiconductor integrated circuit

Similar Documents

Publication Publication Date Title
US5227674A (en) Semiconductor integrated circuit device
US7051194B2 (en) Self-synchronous transfer control circuit and data driven information processing device using the same
JPH0218498B2 (en)
US7380153B2 (en) Micropipeline stage controller and control scheme
JPH0764957A (en) Timer device
US4802089A (en) Status flag handling in a digital data processing system
US6055557A (en) Adder circuit and method therefor
JP3433588B2 (en) Mask data generation circuit and bit field operation circuit
JPH0721094A (en) Data inputting and outputting circuit
US4989174A (en) Fast gate and adder for microprocessor ALU
US6900661B2 (en) Repairable finite state machines
US5260680A (en) Digital comparator circuit
US4949343A (en) Error detecting circuit for a decoder
JP3063694B2 (en) State machine control circuit
US6144228A (en) Generalized push-pull cascode logic technique
JPH0573703A (en) Semiconductor integrated circuit device
JPH087585A (en) Detection device of counting finish of nonvolatile memory
KR100336749B1 (en) Option test circuit
JP2699431B2 (en) register
JPH08147219A (en) Non-volatile semiconductor memory
JPS62236054A (en) Semiconductor memory device
JP2811716B2 (en) Microcomputer
JP3023959B2 (en) Undefined instruction detection method
JPH03276346A (en) Memory card
JPS63273348A (en) Semiconductor integrated circuit device