JPH0543142B2 - - Google Patents

Info

Publication number
JPH0543142B2
JPH0543142B2 JP61078620A JP7862086A JPH0543142B2 JP H0543142 B2 JPH0543142 B2 JP H0543142B2 JP 61078620 A JP61078620 A JP 61078620A JP 7862086 A JP7862086 A JP 7862086A JP H0543142 B2 JPH0543142 B2 JP H0543142B2
Authority
JP
Japan
Prior art keywords
output
input
signal
state
data
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.)
Expired - Lifetime
Application number
JP61078620A
Other languages
Japanese (ja)
Other versions
JPS62235670A (en
Inventor
Manabu Kimoto
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP61078620A priority Critical patent/JPS62235670A/en
Publication of JPS62235670A publication Critical patent/JPS62235670A/en
Publication of JPH0543142B2 publication Critical patent/JPH0543142B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、入出力回路に関し、特にマイクロコ
ンビユータ等のI/Oポートに使用される入出力
回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an input/output circuit, and particularly to an input/output circuit used in an I/O port of a microcomputer or the like.

〔従来の技術〕[Conventional technology]

従来、マイクロコンピユータ等が有している周
辺制御用I/Oポートの入出力回路は、第2図に
示す構成をとるのが通常であつた。
Conventionally, the input/output circuit of a peripheral control I/O port included in a microcomputer or the like has usually had the configuration shown in FIG.

第2図において、20は出力データラツチ、1
0は信号入出力端子40の状態を入力状態(高イ
ンピーダンス)とするか、又は出力状態とするか
を指定するレジスタである。
In FIG. 2, 20 is an output data latch;
0 is a register that specifies whether the signal input/output terminal 40 is in an input state (high impedance) or an output state.

第2図に示す入出力回路では、信号入出力端子
40の状態が入力状態のときのみ信号入出力端子
40に与えられた信号を、この入出力回路を介し
て装置内へ伝達するものであつた。
In the input/output circuit shown in FIG. 2, the signal applied to the signal input/output terminal 40 is transmitted into the device via this input/output circuit only when the signal input/output terminal 40 is in the input state. Ta.

近年、マイクロコンピユータが応用される分野
は急速に広がりつつある。これは、マイクロコン
ピユータ用LSIの低価格化もさることながら、マ
イクロコンピユータを用いたシステムの開発環境
の整備に依るところが大きい。
In recent years, the fields in which microcomputers are applied are rapidly expanding. This is largely due to the development environment for systems using microcomputers, as well as the lower prices of LSIs for microcomputers.

マイクロコンピユータ応用システムの開発にお
いて重要な事は、ソフトウエアとハードウエアが
複雑にからみ合つた状態でのシステムデバツクを
いかに効率よく行うかにある。特に、ハードウエ
アとソフトウエアの接点であるマイクロコンピユ
ータのI/Oポートの状態がソフトウエアで判定
できればシステムデバツクにおける効用は大き
い。
What is important in the development of microcomputer application systems is how efficiently the system can be debugged when software and hardware are intricately intertwined. In particular, if the status of the I/O port of a microcomputer, which is the contact point between hardware and software, can be determined by software, it would be very useful in system debugging.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来の入出力回路は、信号入出力端子
の状態が入力状態に設定されている時にしか、信
号入出力端子の状態をマイクロコンピユタに伝達
することが出来ない。言替えれば、信号入出力端
子が出力状態の時には、信号入出力端子が期待さ
れる状態にあるかをマイクロコンピユータに伝達
することが出来ないという問題点がある。
The conventional input/output circuit described above can transmit the state of the signal input/output terminal to the microcomputer only when the state of the signal input/output terminal is set to the input state. In other words, when the signal input/output terminal is in the output state, there is a problem in that it is not possible to inform the microcomputer whether the signal input/output terminal is in the expected state.

本発明の目的は、内部の電子装置が出力しよう
とした論理状態が信号入出力端子に正常に与えら
れていることを電子装置が検出することが出来る
入出力回路を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an input/output circuit that allows an electronic device to detect that a logic state that an internal electronic device attempts to output is normally applied to a signal input/output terminal.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の入出力回路は、電子装置内にあつて該
電子装置内部からの信号を一時保持するための出
力データラツチと、信号入出力端子の状態を入力
状態とするか前記出力データラツチの出力信号の
出力状態とするかを指定する第1の選択回路と、
前記出力データラツチと前記信号入出力端子との
間に設けられ前記第1の選択回路の出力信号によ
つて制御される3ステートバツフアと、前記信号
入出力端子上の信号か又は前記出力データラツチ
の出力信号かを前記第1の選択回路とは独立に選
択して前記電子装置内へ入力する第2の選択回路
とを含んで構成される。
The input/output circuit of the present invention includes an output data latch that is located in an electronic device and temporarily holds a signal from inside the electronic device, and a signal input/output terminal that is in an input state or an output signal of the output data latch. a first selection circuit that specifies whether to set the output state;
a three-state buffer provided between the output data latch and the signal input/output terminal and controlled by the output signal of the first selection circuit; and a second selection circuit that selects an output signal independently of the first selection circuit and inputs the selected output signal into the electronic device.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して
説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示す論理回路図で
ある。なお、本実施例の入出力回路はデータバス
及び制御信号線を介して図示しない電子装置とし
てのマイクロコンピユータに接続されている。
FIG. 1 is a logic circuit diagram showing one embodiment of the present invention. Note that the input/output circuit of this embodiment is connected to a microcomputer as an electronic device (not shown) via a data bus and a control signal line.

第1図において、10はこの入出力回路が出力
状態であるか入力状態であるかを指示するモード
レジスタ、20は出力すべきデータを一時保持す
る出力データラツチ、30は3ステート出力バツ
フア、40は信号入出力端子である。
In FIG. 1, 10 is a mode register that indicates whether this input/output circuit is in an output state or an input state, 20 is an output data latch that temporarily holds data to be output, 30 is a 3-state output buffer, and 40 is a This is a signal input/output terminal.

以下に、第1図に示す実施例の動作について説
明する。
The operation of the embodiment shown in FIG. 1 will be explained below.

まず、信号入出力端子40に対するデータ出力
制御においては、モードレジスタ10に割当てら
れたレジスタ番地信号ADR1と書込制御信号WR
との論理積をAND回路11でとり、AND回路1
1からの出力信号を書込クロツクとしてモードレ
ジスタ10に入力することにより、モードレジス
タ10に出力あるいは入力状態の指定を行う。
First, in data output control for the signal input/output terminal 40, the register address signal ADR 1 assigned to the mode register 10 and the write control signal WR are used.
AND circuit 11 performs the logical product with AND circuit 1.
By inputting the output signal from 1 to the mode register 10 as a write clock, the output or input state of the mode register 10 is specified.

これは、一般のマイクロコンピユータが有する
I/O操作指令もしくはメモリ操作命令の手順と
同様である。すなわち、マイクロコンピユータと
データバスとアドレスバスとリード/ライト信号
が接続される場合、リードサイクルにおいてはア
ドレスバス上には目的とするデータのアドレスデ
ータが出力され、その期間内にリード信号がオン
となり、このときデータバス上には目的とするデ
ータが出力されてくるので、そのデータをリード
信号の立ち上り(アクテイブロウの場合)のタイ
ミングで読み出す。また、ライトサイクルにおい
てはアドレスバス上に目的のアドレスデータが出
力されると、その期間内にライト信号がオンとな
り、このときデータバス上に出力されているデー
タをリード信号の立ち上り(アクテイブロウの場
合)のタイミングで書き込む。従つて、アドレス
バスをデコードしてレジスタ番地信号ADR1を得
るサイクルにおいては、モードレジスタ10に書
き込むべきデータは既にデータバス上に存在して
いるので、このデータを用いて3ステートバツフ
ア30を論理値「1」または「0」に指定する。
本実施例では、モードレジスタ10が論理値
「1」のとき3ステート出力バツフア30は高イ
ンピーダンス(即ち、信号入出力端子40が入力
状態)となり、論理値「0」のとき出力データラ
ツチ20に保持されているデータを信号入出力端
子40へ出力する。
This is similar to the procedure for I/O operation commands or memory operation commands that general microcomputers have. In other words, when a microcomputer, a data bus, an address bus, and a read/write signal are connected, the address data of the target data is output on the address bus during the read cycle, and the read signal is turned on within that period. At this time, target data is output onto the data bus, so the data is read out at the timing of the rise of the read signal (in the case of active low). Also, in a write cycle, when the target address data is output on the address bus, the write signal is turned on within that period, and the data that is being output on the data bus at this time is read on the rise of the read signal (active low). Write at the timing of (case). Therefore, in the cycle in which the address bus is decoded to obtain the register address signal ADR 1 , the data to be written to the mode register 10 already exists on the data bus, so this data is used to write the 3-state buffer 30. Specify the logical value "1" or "0".
In this embodiment, when the mode register 10 has a logical value of "1", the 3-state output buffer 30 becomes high impedance (that is, the signal input/output terminal 40 is in the input state), and when the logical value is "0", the 3-state output buffer 30 is held in the output data latch 20. The data being displayed is output to the signal input/output terminal 40.

出力データラツチ20へのデータ書込みは、モ
ードレジスタ10へのデータの書込みと同様に、
出力データラツチ20に割当てられた番地信号
ADR2と書込制御信号WRとの論理積をAND回路
21でとり、AND回路21からの出力を書込ク
ロツクとしてデータバス上のデータを出力データ
ラツチ20に書込む。
Writing data to the output data latch 20 is similar to writing data to the mode register 10.
Address signal assigned to output data latch 20
The AND circuit 21 calculates the logical product of ADR 2 and the write control signal WR, and writes the data on the data bus to the output data latch 20 using the output from the AND circuit 21 as a write clock.

この様に、信号入出力端子40の状態はモード
レジスタ10によつて出力状態か入力状態かを決
定することが出来る。
In this manner, the mode register 10 can determine whether the state of the signal input/output terminal 40 is an output state or an input state.

次に、データ入力の動作について説明する。 Next, the data input operation will be explained.

出力データラツチ20に保持されているデータ
を再びデータバスを介してマイクロコンピユータ
に入力するには、マイクロコンピユータが有する
入力命令を用いて出力データラツチ20に割当て
られた番地信号ADR2と読込制御信号RDとを発
生させる。このとき、OR回路52とAND回路5
1により入力すべきデータをデータバス上に出力
する3ステート入力バツフア50を出力状態に制
御する。同時に、選択ゲート53により3ステー
ト入力バツフア50に入力するデータとして出力
データバツフア20の出力を選択する。
In order to input the data held in the output data latch 20 again to the microcomputer via the data bus, the address signal ADR 2 and the read control signal RD assigned to the output data latch 20 are input using an input command possessed by the microcomputer. to occur. At this time, the OR circuit 52 and the AND circuit 5
1 controls the 3-state input buffer 50, which outputs data to be input onto the data bus, to the output state. At the same time, the selection gate 53 selects the output of the output data buffer 20 as the data input to the 3-state input buffer 50.

信号入出力端子40上のデータをマイクロコン
ピユータに入力するには、信号入出力端子40に
割当てられた番地信号ADR3と読込制御信号RD
とを発生させることにより実行される。このとき
選択ゲート53は3ステート入力バツフア50へ
与えるデータとして信号入出力端子40上のデー
タを選択する。
In order to input the data on the signal input/output terminal 40 to the microcomputer, the address signal ADR 3 assigned to the signal input/output terminal 40 and the read control signal RD are used.
This is executed by generating . At this time, the selection gate 53 selects the data on the signal input/output terminal 40 as the data to be applied to the 3-state input buffer 50.

以上説明したように、信号入出力端子40の入
力及び出力状態はモードレジスタ10により決定
し、入力時にどこのデータをマイクロコンピユー
タ内に入力するかはそれぞれの番地信号ADR2
びADR3を用いて、第2の選択回路で独立に選択
することができる。
As explained above, the input and output states of the signal input/output terminal 40 are determined by the mode register 10, and which data is input into the microcomputer at the time of input is determined using the respective address signals ADR 2 and ADR 3 . , can be independently selected by the second selection circuit.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明の入出力回路は、信
号入出力端子の状態を入力状態とするか出力状態
とするかを指定する第1の選択回路と、信号入出
力端子上のデータか出力データラツチの出力デー
タかを選択して入力する第2の選択回路とを設け
ることにより、出力すべきデータと実際に信号入
出力端子に現われているデータを共に電子装置内
に入力することが可能となるので、電子装置自身
が信号入出力端子の状態が正常であるか否かを判
定できるという効果がある。
As explained above, the input/output circuit of the present invention includes a first selection circuit that specifies whether the state of the signal input/output terminal is to be an input state or an output state, and a first selection circuit that specifies whether the state of the signal input/output terminal is to be an input state or an output state; By providing a second selection circuit that selects and inputs output data, it becomes possible to input both the data to be output and the data actually appearing at the signal input/output terminal into the electronic device. Therefore, there is an effect that the electronic device itself can determine whether the state of the signal input/output terminal is normal or not.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例の論理回路図、第2
図は従来の入出力回路の一例の論理回路図であ
る。 10……モードレジスタ、11……AND回路、
20……出力データラツチ、21…AND回路、
30……3ステート出力バツフア、40……信号
入出力端子、50……3ステート入力バツフア、
51……AND回路、52……OR回路、53……
選択ゲート。
Figure 1 is a logic circuit diagram of one embodiment of the present invention, Figure 2 is a logic circuit diagram of an embodiment of the present invention.
The figure is a logic circuit diagram of an example of a conventional input/output circuit. 10...Mode register, 11...AND circuit,
20...Output data latch, 21...AND circuit,
30...3-state output buffer, 40...signal input/output terminal, 50...3-state input buffer,
51...AND circuit, 52...OR circuit, 53...
selection gate.

Claims (1)

【特許請求の範囲】[Claims] 1 電子装置内にあつて電子装置内部からの信号
を一時保持するための出力データラツチと、信号
入出力端子の状態を入力状態とするか前記出力デ
ータラツチの出力信号の出力状態とするかを指定
する第1の選択回路と、前記出力データラツチと
前記信号入出力端子との間に設けられ前記第1の
選択回路の出力信号によつて制御される3ステー
トバツフアと、前記信号入出力端子上の信号か又
は前記出力データラツチの出力信号かを前記第1
の選択回路とは独立に選択して前記電子装置内へ
供給する第2の選択回路とを含むことを特徴とす
る入出力回路。
1 Specify whether the output data latch in the electronic device temporarily holds the signal from inside the electronic device and the signal input/output terminal should be in the input state or the output state of the output signal of the output data latch. a first selection circuit, a three-state buffer provided between the output data latch and the signal input/output terminal and controlled by the output signal of the first selection circuit; signal or the output signal of the output data latch.
An input/output circuit comprising: a second selection circuit that selects and supplies the selected signal to the electronic device independently of the selection circuit.
JP61078620A 1986-04-04 1986-04-04 Inputting and outputting circuit Granted JPS62235670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61078620A JPS62235670A (en) 1986-04-04 1986-04-04 Inputting and outputting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61078620A JPS62235670A (en) 1986-04-04 1986-04-04 Inputting and outputting circuit

Publications (2)

Publication Number Publication Date
JPS62235670A JPS62235670A (en) 1987-10-15
JPH0543142B2 true JPH0543142B2 (en) 1993-06-30

Family

ID=13666930

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61078620A Granted JPS62235670A (en) 1986-04-04 1986-04-04 Inputting and outputting circuit

Country Status (1)

Country Link
JP (1) JPS62235670A (en)

Also Published As

Publication number Publication date
JPS62235670A (en) 1987-10-15

Similar Documents

Publication Publication Date Title
JP3105223B2 (en) Debug peripherals for microcomputers, microprocessors and core processor integrated circuits
US4949241A (en) Microcomputer system including a master processor and a slave processor synchronized by three control lines
JPS61156358A (en) Bus converter
JPH048874B2 (en)
JPS5925254B2 (en) Digital data processing equipment
US5095485A (en) Microprocessor equipped with parity control unit on same chip
US5467461A (en) Multiprocessor computer system having bus control circuitry for transferring data between microcomputers
US4947478A (en) Switching control system for multipersonality computer system
US5742842A (en) Data processing apparatus for executing a vector operation under control of a master processor
JPS62179033A (en) Ic microprocessor
JPH0543142B2 (en)
JP2628311B2 (en) Microcomputer
JPH0423051A (en) Microprocessor
JP3283505B2 (en) Microcomputer
JP2919357B2 (en) CPU interface circuit
JP3173807B2 (en) Storage device switching control device
JPH071500B2 (en) Single chip microcomputer
JP3242474B2 (en) Data processing device
JPS6349811B2 (en)
JPS62248043A (en) Memory switching circuit for fetching microcomputer instruction
JPH0370055A (en) Semiconductor integrated circuit device
JPH02210515A (en) System resetting system
JPH01169639A (en) Memory
JPH0380354A (en) Parallel interface
JPH03220654A (en) Microcomputer