JPS63309043A - Data transmission system - Google Patents

Data transmission system

Info

Publication number
JPS63309043A
JPS63309043A JP14552287A JP14552287A JPS63309043A JP S63309043 A JPS63309043 A JP S63309043A JP 14552287 A JP14552287 A JP 14552287A JP 14552287 A JP14552287 A JP 14552287A JP S63309043 A JPS63309043 A JP S63309043A
Authority
JP
Japan
Prior art keywords
bus
data
control information
control
scl
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
JP14552287A
Other languages
Japanese (ja)
Other versions
JP2508487B2 (en
Inventor
Yoshinori Komiya
小宮 好紀
Ikuo Someya
郁男 染谷
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP62145522A priority Critical patent/JP2508487B2/en
Publication of JPS63309043A publication Critical patent/JPS63309043A/en
Application granted granted Critical
Publication of JP2508487B2 publication Critical patent/JP2508487B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

PURPOSE:To evade the entrance of a system into a deadlock state owing to a noise, etc., appearing on a bus by allowing a terminal device to detect control information for obtaining control right being sent out on the bus during data transfer and release the bus automatically as a master station. CONSTITUTION:When the terminal device connected to a bus network operates as the master station, the terminal obtains the control right of an external bus by sending out control information S to the external bus, sends out serial clock data SCL to a serial clock SCL bus to start transfer operation, and confirms the end of transfer operation, thereby finishing the transfer operation and also deciding whether or not stop control information P on the external bus is detected during the transfer operation. When the stop control information P is generated on the external bus during the data transfer and the losing of the control right of the external bus is detected, the stop control information P is generated and the transfer is finished after the external bus is released. Consequently, the entrance of the system into the deadlock state owing to a noise appearing on the bus can be evaded.

Description

【発明の詳細な説明】 以下の順序で本発明を説明する。[Detailed description of the invention] The present invention will be explained in the following order.

A、産業上の利用分野 B1発明の概要 C1従来の技術 り0発明が解決しようとする問題点 E1問題点を解決するための手段 F0作用 G、実施例 (G−1)実施例の構成(第1図〜第3図)(G−2)
実施例の動作(第4図、第5図)H1発明の効果 A、産業上の利用分野 本発明は、バス上に制j′n情報を送出することにより
バスの支配権を獲得してデータを転送するマスター局と
して動作するとともに、バス上の制御情報を検出するこ
とにより上記バス上を転送されてくるデータを受信する
スレーブ局として動作可能な複数の端末装置がバス・ネ
ットワークを介して接続され、マルチマスター動作によ
るデータ伝送を行うデータ伝送システムに関する。
A. Industrial field of application B1 Overview of the invention C1 Prior art 0 Problems to be solved by the invention E1 Means for solving the problems F0 Effects G. Example (G-1) Structure of the example ( Figures 1 to 3) (G-2)
Operation of the Embodiment (Figs. 4 and 5) H1 Effect of the Invention A, Industrial Field of Application The present invention acquires control over the bus by transmitting control information onto the bus and controls data. A plurality of terminal devices that can operate as a master station that transfers data and as a slave station that receives data transferred on the bus by detecting control information on the bus are connected via a bus network. The present invention relates to a data transmission system that performs data transmission using multi-master operation.

B1発明の概要 本発明は、バス上に制御情報を送出することによりバス
の支配権を獲得してデータを転送するマスター局として
動作するとともに、バス上の制御情報を検出することに
より上記バス上を転送されてくるデータを受信するスレ
ーブ局として動作可能な複数の端末装置がバス・ネット
ワークを介して接続され、マルチマスター動作によるデ
ータ伝送を行うデータ伝送システムにおいて、マスター
局としてデータ転送中にバスの支配権を失ったことを検
知して、上記バスを自動的に解放することによって、上
記バスに混入するノイズ等によりシステムがデッドロッ
ク状態に陥るのを回避するようにしたものである。
B1 Summary of the Invention The present invention operates as a master station that acquires control of the bus and transfers data by transmitting control information on the bus, and also operates as a master station that transfers data by acquiring control over the bus by transmitting control information on the bus. In a data transmission system in which multiple terminal devices capable of operating as slave stations that receive data transferred via a bus network are connected via a bus network and perform data transmission using multi-master operation, the master station By detecting that the system has lost control of the bus and automatically releasing the bus, the system is prevented from falling into a deadlock state due to noise mixed into the bus.

C1従来の技術 従来より、所謂マイクロ・プロセッサ(CPU)をシス
テムコントローラ等として内蔵し、システムコントロー
ル用のCPUと外部装置や装置内部の各種デバイスとの
間でデータを伝送して、各種機能ブロックの動作制御を
行うようにした各種電子装置が提供されており、上記シ
ステムコントロール用のCPUと外部装置や装置内部の
各種デバイスを例えば第6図に示すようなバス・ネット
ワークを介して接続したデータ伝送システムにて、各種
デバイス間でシリアル伝送によるデータ伝送が行われて
いる。
C1 Conventional technology Traditionally, a so-called microprocessor (CPU) is built in as a system controller, etc., and data is transmitted between the CPU for system control and external devices and various devices inside the device to control various functional blocks. Various electronic devices are provided that perform operation control, and data transmission is performed by connecting the system control CPU, external devices, and various devices inside the device via a bus network as shown in Figure 6, for example. In the system, data is transmitted between various devices using serial transmission.

第6図に示すデータ伝送システムは、それぞれ抵抗61
.62を介してプルアップされた2木の双方向バス63
.64を備え、システムコン(・ローラ651機能ブロ
ック66や外部装置67等の各種デバイスの各CPU6
5A、66A、67Aがそれぞれインターフェース65
B、66B、67Bを介して上記双方向バス63.64
に接続されており、上記各種デバイス間で正論理のワイ
ヤード・アンド論理でシリアル伝送によるデータ伝送が
行われる。
The data transmission system shown in FIG.
.. Two bidirectional buses 63 pulled up via 62
.. 64, each CPU 6 of various devices such as system controller (roller 651 function block 66 and external device 67)
5A, 66A, and 67A are interfaces 65, respectively.
The bidirectional bus 63.64 via B, 66B, 67B
, and data transmission is performed by serial transmission between the various devices mentioned above using positive logic wired AND logic.

このデータ伝送システムでは、一方の双方向バス63が
マスター局から送出されるシリアルクロック(SCL)
の伝送ラインであり、また、他方の双方向バス64がマ
スター局あるいはスレーブ局から送出されるシリアルデ
ータ(S04)の伝送ラインであって、第7図に示すよ
うに、SCLバス63が論理「1」の状態におけるSD
Aバス64の論理値の変化にて制御情報を与え、上記S
DAの論理「1」から論理「0」への変化を転送開始(
スタート)制御n情報(S)とし、また、上記SDAの
論理「0」から論理r1.への変化を転送終了(ストッ
プ)制御情報(P)とし、上記SDAバス64上を転送
するデータの変化は上記SCLバス63が論理「1」の
状態においてのみ許すように規定されている そして、上記システムコントローラ651機能ブロンク
ロロや外部装置67等の各種デバイスは、上記双方向バ
ス63.64上にスタート制御情報(S)を送出するこ
とによりバスの支配権を獲得し、シリアルクロック(S
CL)やシリアルデータ(SDA)の転送を行って、ス
トップ制御情報(P)を送出して、上記バスの支配権を
放棄するマスター局として動作するとともに、上記双方
向バス63.64上のスタート制御情報(S)を検出す
ると、マスター局から転送されてくるデータを受信して
アドレス指定されるスレーブ局として動作する機能をそ
れぞれ有しており、上記バス・ネットワークを介してマ
ルチマスター動作により、データ伝送を行うことができ
るようになっている。
In this data transmission system, one bidirectional bus 63 is connected to a serial clock (SCL) sent from a master station.
The other bidirectional bus 64 is a transmission line for serial data (S04) sent from the master station or slave station, and as shown in FIG. 1” SD in state
Control information is given by changing the logical value of the A bus 64, and the S
Start transferring the change from DA logic “1” to logic “0” (
start) control n information (S), and from the logic "0" of the above SDA to the logic r1. A change in the data is defined as transfer end (stop) control information (P), and a change in the data transferred on the SDA bus 64 is allowed only when the SCL bus 63 is in the logic "1" state. Various devices such as the system controller 651 function Broncro and the external device 67 acquire control of the bus by sending start control information (S) onto the bidirectional bus 63, 64, and the serial clock (S).
CL) and serial data (SDA), transmits stop control information (P), and operates as a master station that relinquishes control of the bus. When the control information (S) is detected, each slave station has the function of receiving the data transferred from the master station and operating as an addressed slave station, and by multi-master operation via the above bus network, Data transmission is now possible.

D9発明が解決しようとする問題点 ところで、上述のようにバス・ネットワークを介して接
続された複数の端末装置すなわち上記システムコントロ
ーラ652機能ブロック66や外部装置67等の各種デ
バイスがそれぞれバスの支配権を獲得してマスター局と
して動作するマルチマスター動作によるデータ伝送を行
うデータ伝送システムでは、バスに混入するノイズによ
る各端来場の誤動作の虞れがあり、例えばある端末装置
がマスター局として動作してデータ転送中に、バスにノ
イズが混入して、第8図に示すように、SCLバスが論
理「1」のときにSDAバスがノイズ(N)によって論
理「1」から論理「0」に変化してスタート制御情報(
S゛)がバス上に生成されると、上記マスター局として
動作中の端末装置が上記スタート情報(S゛)を検出す
ることによりスレーブ局の動作状態に切り換り、全ての
端末装置がスレーブ局として動作してストンブ制ill
情報(P)を待ち続け、ノイズによってストップ制御情
報が生成されない限り制御不能なデンドロンク状態に陥
ってしまう。
D9 Problems to be Solved by the Invention By the way, as described above, a plurality of terminal devices connected via a bus network, that is, various devices such as the system controller 652 functional block 66 and external device 67, each have control over the bus. In a data transmission system that performs data transmission using multi-master operation, which acquires a terminal and operates as a master station, there is a risk of malfunction at each end due to noise mixed into the bus. During data transfer, noise enters the bus, and as shown in Figure 8, when the SCL bus is at logic "1", the SDA bus changes from logic "1" to logic "0" due to noise (N). and start control information (
When S゛) is generated on the bus, the terminal device operating as the master station switches to the slave station operating state by detecting the start information (S゛), and all terminal devices become slave stations. Stomb control ill by operating as a station
It continues to wait for information (P), and unless stop control information is generated due to noise, it will fall into an uncontrollable dendronk state.

そこで、本発明は、上述の如き問題点に迄み、ハス上に
制御情報を送出することによりバスの支配権を獲得して
データを転送するマスター局として動作するとともに、
バス上の制御情報を検出することにより上記ハス上を転
送されてくるデータを受信するスレーブ局として動作可
能な複数の端末装置がバス・ネットワークを介して接続
され、マルチマスター動作によるデータ伝送を行うデー
タ伝送システムにおいて、上記バスに混入するノイズ等
によりシステムがデノドロンク状態に陥るのを回避する
機能をマスター局に与えて、システムの正常な運用を確
保できるようにすることを目的とする。
Therefore, the present invention solves the above-mentioned problems by transmitting control information onto the bus to acquire control over the bus and operate as a master station to transfer data.
Multiple terminal devices that can operate as slave stations that receive data transferred on the bus by detecting control information on the bus are connected via a bus network and perform data transmission using multi-master operation. In a data transmission system, the present invention aims to provide a master station with a function to avoid the system from falling into a dendrochronic state due to noise mixed into the bus, thereby ensuring normal operation of the system.

巳1問題点を解決するための手段 、本発明は、上述の如き問題点を解決するために、バス
上に制御情報を送出することによりバスの支配権を獲得
してデータを転送するマスター局として動作するととも
に、バス上の制御情報を検出することにより上記バス上
を転送されてくるデータを受信するスレーブ局として動
作可能な複数の端末装置がバス・ネットワークを介して
接続され、マルチマスター動作によるデータ伝送を行う
データ伝送システムにおいて、データ転送中にバスの支
配権を失ったことを検知する検知手段と、上記検知手段
の検知出力に応じて上記バスを解放する制御手段とを各
端末装置に設け、マスター局として動作している端末装
置がバスの支配権を失ったときに上記バスを自動的に解
放するようにしたことを特徴としている。
Means for Solving Problem No. 1 The present invention solves the above-mentioned problems by providing a master station that acquires control of the bus by transmitting control information onto the bus and transfers data. Multiple terminal devices that can operate as a slave station and receive data transferred on the bus by detecting control information on the bus are connected via a bus network, resulting in multi-master operation. In a data transmission system that performs data transmission, each terminal device includes a detection means for detecting that control of the bus has been lost during data transfer, and a control means for releasing the bus in accordance with the detection output of the detection means. The bus is automatically released when a terminal device operating as a master station loses control of the bus.

F0作用 本発明に係るデータ伝送システムでは、パスネントワー
クに接続された端末装置が、マスター局として動作する
場合に、外部バス上にスタート制御′1情報(S)を送
出することにより外部バスの支配権を獲得し、SCLハ
スにシリアルクロンクデータ(SCL)を送出して第4
図のフローチャートに示すよ・うに転送動作を開始し、
転送動作の終了を確認(ステップ1)して転送動作を終
了するとともに、転送動作中に外部バス上のストップ制
tall情報(P)を積出したか否かの判定を行い(ス
テップ2)、データ転送中に上記外部バス上にストップ
制御情報(P)が生成されて上記ステップ2において上
記外部バスの支配権を失ったことを検知すると、次のス
テップ3にてストップ制御情報(P)を生成して上記外
部バスを解放してから転送を終了する。
F0 operation In the data transmission system according to the present invention, when the terminal device connected to the path network operates as a master station, the external bus is controlled by sending start control '1 information (S) onto the external bus. Obtain control, send serial clock data (SCL) to SCL Hass, and
Start the transfer operation as shown in the flowchart in the figure,
The end of the transfer operation is confirmed (step 1), and the transfer operation is terminated. At the same time, it is determined whether or not the stop-based tall information (P) was loaded on the external bus during the transfer operation (step 2), and the data transfer is completed. When stop control information (P) is generated on the external bus during the process and it is detected in step 2 that control of the external bus has been lost, stop control information (P) is generated in the next step 3. The transfer is completed after releasing the external bus.

G、実施例 (C;−1)実施例の構成 以下、図面を参照しながら説明する実施例は、上述の第
6図に示したデータ伝送システムに本発明を適用したも
ので、第2図にデータフォーマットを示しであるように
、スタート制御情報(S)の直後の1バイト目をシステ
ムの制御nデータとしてスレーブ局を指定する7ビント
のスレーブアドレスデータと2バイト目以降のデータの
伝送方向を指定する1ビツトの読み出し/書き込み(R
/W)データに割り当て、受信確認信号(ACK)によ
るハンドシェークを行いながら8ビット単位でデータ伝
送を行うようにしたものである。
G. Embodiment (C;-1) Structure of the Embodiment The embodiment described below with reference to the drawings is an example in which the present invention is applied to the data transmission system shown in FIG. 6 above. As shown in the data format, the first byte immediately after the start control information (S) is the system control n data, the 7-bint slave address data that specifies the slave station, and the transmission direction of the data from the second byte onward. 1-bit read/write (R
/W) Data is transmitted in units of 8 bits while handshaking is performed using a reception confirmation signal (ACK).

本発明に係るデータ伝送システムを構成する端末装置の
具体的な構成を示す第1同のブロック図において、端末
装置1は、SCLバスに外部接続される第1の入出カポ
−1−2およびSDAバスに外部接続される第2の人出
力ボート3と夕本部同期パルス(SEC)の供給される
人力ポート4を設けたインターフェース(1/F)ブロ
ック5に内部バスを介して接続されたCPU6を備え、
このCPU6にて上記1/Fブロツク5に基本クロック
(CLOCに)、読み出し信号(READ)や書き込み
信号(WRITE)を供給するとともに、上記内部バス
を介して各種レジスタ7.8,9.10とデータの授受
を行い上記I/Fブロック5の状態を判断して動作制御
を行う。
In the first block diagram showing a specific configuration of a terminal device constituting the data transmission system according to the present invention, the terminal device 1 includes a first input/output coupler 1-2 externally connected to an SCL bus and an SDA A CPU 6 connected via an internal bus to an interface (1/F) block 5 provided with a second human power port 3 externally connected to the bus and a human power port 4 to which an evening synchronization pulse (SEC) is supplied. Prepare,
This CPU 6 supplies the basic clock (CLOC), read signal (READ), and write signal (WRITE) to the 1/F block 5, and also communicates with various registers 7.8, 9.10 via the internal bus. It exchanges data, determines the state of the I/F block 5, and controls its operation.

上記第1の入出力ボート2には、外部のSCLバスに対
するシリアルクロックデータ(SCL)の入出力を行う
とともに上記シリアルクロックデータ(SCL)に基づ
いて各種動作タイミングパルスを形成するSCLコント
ローラ11が接続されている。
Connected to the first input/output boat 2 is an SCL controller 11 that inputs and outputs serial clock data (SCL) to an external SCL bus and forms various operation timing pulses based on the serial clock data (SCL). has been done.

また、上記第2の入出力ボート3には、外部のSDAバ
スに対するシリアルデータ(SDA)の入出力を行うと
ともに受信確認信号(ACK)を形成するSDAコント
ローラ12が接続されている。さらに、上記入力ボート
4には、このI/Fブロック5の動作を外部同期させる
外部同期回路13が接続されている。
Further, an SDA controller 12 is connected to the second input/output boat 3, which inputs and outputs serial data (SDA) to and from an external SDA bus, and also forms a reception confirmation signal (ACK). Furthermore, an external synchronization circuit 13 for externally synchronizing the operation of the I/F block 5 is connected to the input port 4.

上記SCLコントローラ11は、マスターモードのとき
にクロック発生器14から供給されるクロックパルスに
基づいてシリアルクロックデータ(SCL)を形成して
上記第1の入出力ボート2から上記SCLバスに出力す
る。また、上記SCLコントローラ11は、上記SCL
バス上のシリアルクロックデータ(SCL)をバスビジ
ィ検知部15および支配権喪失検知部16に供給する。
The SCL controller 11 forms serial clock data (SCL) based on clock pulses supplied from the clock generator 14 in the master mode, and outputs it from the first input/output port 2 to the SCL bus. Further, the SCL controller 11 is configured to
Serial clock data (SCL) on the bus is supplied to the bus busy detection unit 15 and the loss of control detection unit 16.

さらに、上記SCLコントローラ11は、上記SCLバ
ス上のシリアルクロックデータ(SCL)に基づいて各
種タイミングパルスを形成してステータス・コントロー
ルレジスタ7、データシフトレジスタ8゜SDAコント
ローラ12やコンパレータ17に供給している。
Further, the SCL controller 11 forms various timing pulses based on the serial clock data (SCL) on the SCL bus and supplies them to the status control register 7, data shift register 8, SDA controller 12, and comparator 17. There is.

上記SDAコントローラ12は、送信モードのときに上
記データシフトレジスタ8から転送されてくるデータを
シリアルデータ(SDA)として上記第2の入出力ボー
ト3から上記SDAバスに出力する。また、上記SDA
コントローラ12は、受信モードのときに上記SDAバ
スから上記第2の入出力ボート3を介して転送されてく
るシリアルデータ(SDA)を上記データシフトレジス
タ8に入力するとともに、上記シリアルデータ(SDA
)を完全に受信すると受信確認信号(ACK)を形成し
て上記第2の入出力ボート3から上記SDAバスに出力
する。さらに、上記SDAコントローラ12は、上記S
DAバス上のシリアルデータ(SD^)を上記バスビジ
ィ検知部15および支配権喪失検知部16に供給してい
る。
The SDA controller 12 outputs the data transferred from the data shift register 8 in the transmission mode as serial data (SDA) from the second input/output port 3 to the SDA bus. In addition, the above SDA
In the reception mode, the controller 12 inputs the serial data (SDA) transferred from the SDA bus via the second input/output port 3 to the data shift register 8, and also inputs the serial data (SDA) transferred from the SDA bus to the data shift register 8.
) is completely received, a reception confirmation signal (ACK) is generated and outputted from the second input/output port 3 to the SDA bus. Further, the SDA controller 12 includes the SDA controller 12,
Serial data (SD^) on the DA bus is supplied to the bus busy detection section 15 and the loss of control detection section 16.

上記バスビジィ検知部15は、上記SCLコントローラ
11から供給されるシリアルクロックデータ(SCL)
  と上記SDAコントローラ12から供給されるシリ
アルデータ(SDA)とにより外部バス上のスタート制
御情報(S)とストップ制御情報(P)を検出すること
によって、上記スタート制御情報(S)を検出してから
ストップ制御情報(P)を検出するまでをバスビジィ状
態として検知し、その検知出力を上記ステータス・コン
トロールレジスタ7に供給する。
The bus busy detection unit 15 receives serial clock data (SCL) supplied from the SCL controller 11.
The start control information (S) is detected by detecting the start control information (S) and stop control information (P) on the external bus based on the serial data (SDA) supplied from the SDA controller 12. The bus busy state is detected from until the stop control information (P) is detected, and the detection output is supplied to the status control register 7.

上記支配権喪失検知部16は、マスターモードのときに
上記SCLコントローラ11から供給されるシリアルク
ロックデータ(SCL)と上記SDAコントローラ12
から供給されるシリアルデータ(SDA)とにより外部
で上記バス上に生成されたスタート制御情報(S)を検
出することによって、バスの支配権を失ったことを検知
し、その検知出力を上記ステータス・コントロールレジ
スタ7に供給する。
The control loss detection unit 16 detects serial clock data (SCL) supplied from the SCL controller 11 and the SDA controller 12 in the master mode.
Loss of control of the bus is detected by detecting the start control information (S) generated externally on the bus using the serial data (SDA) supplied from・Supply to control register 7.

上記コンパレータ17は、上記データシフトレジスタ8
にマスター局から上記SDAバスを介してスタート制御
TJ情報(S)の直後に転送されてくる1バイトのデー
タと、予め上記CPU6によりスレーブアドレスデータ
9にセットされている自己のスレーブアドレスデータと
を比較して、その一致を検出するとともに、上記スター
ト制御情報(S)の直後に転送されてくる1バイトのデ
ータが全て論理「0」であることを検出し、その検出出
力を上記ステータス・コントロールレジスタ7に供給す
る。
The comparator 17 is connected to the data shift register 8.
1 byte of data transferred from the master station via the SDA bus immediately after the start control TJ information (S) and its own slave address data set in advance in the slave address data 9 by the CPU 6. The comparison is made to detect a match, and it is also detected that the 1-byte data transferred immediately after the start control information (S) is all logic "0", and the detection output is sent to the status control. Supplied to register 7.

上記ステータス・コントロールレジスタ7は、第3図に
示すように、上記CPU6より内部バスを介してデータ
の書き込み/読み出し可能な上位4、ットと、上記CP
U6よる書き込みと読み出しでデータの内容が異なる下
位4ビツトのレジスタにて構成されている。
As shown in FIG. 3, the status/control register 7 includes upper 4 bits to which data can be written/read from the CPU 6 via an internal bus, and
It consists of a lower 4-bit register whose data content differs depending on whether it is written or read by U6.

上記ステータス・コントロールレジスタ7の上位4ビツ
トは、マスターモードを論理「l」で示し、スレーブモ
ードを論理「0」で示すMSTとノド、送信モードを論
理「1」で示し、受信モードを論理「0」で示すTRX
ビット、外部バスの使用状態を論理「1」で示し、外部
バスの不使用状態を論理「0」で示すBBビットと、上
記CPU6に割り込みをかけるためのPINビットであ
る。
The upper 4 bits of the status control register 7 indicate master mode with logic "1", slave mode with logic "0", MST and node, transmit mode with logic "1", and receive mode with logic "1". TRX indicated by “0”
A BB bit indicates a state in which the external bus is in use with a logic "1", a logic "0" indicates a non-use state of the external bus, and a PIN bit for issuing an interrupt to the CPU 6.

上記MSTビットは、外部バスを支配する必要のあると
きに上記CPU6によりセットされて、ストップ制御情
報CP)を作成した後にリセ°ットされるとともに、外
部バスの支配権を失った場合に転送中のバイトの転送を
終了したらリセットされる。そして、上記ステータス・
コントロールレジスタ7は、上記MSTビットがセット
されているマスターモードのときに、データ伝送のため
のシリアルクロックデータ(SCL)を上記SCLコン
トローラ11に形成させて、上記第1の人出力ポート2
からシリアルクロックデータ(SCL)を外部のSCL
バスに出力する制御動作を行う。
The MST bit is set by the CPU 6 when it is necessary to control the external bus, and is reset after creating stop control information (CP), and is transferred when control of the external bus is lost. It is reset when the internal bytes have been transferred. And the above status
The control register 7 causes the SCL controller 11 to form serial clock data (SCL) for data transmission in the master mode in which the MST bit is set, and causes the SCL controller 11 to form serial clock data (SCL) for data transmission to the first human output port 2.
Serial clock data (SCL) from external SCL
Performs control operations to output to the bus.

また、上記TRXビットは、外部バスの支配権を獲得し
てマスターモードとして動作rるときに上記CPU6に
よりセットされて、ストップ制御情報(P)を作成した
後にリセットされるとともに、外部バスの支配権を失っ
た場合に転送中のバイトの転送を終了したらリセットさ
れる。さらに、上記TRXピントは、上記スタート制御
情報(S)の直後の1バイトのデータのうちスレーブア
ドレスデータに続<R/Wデータによりセント・リセッ
トされ、マスターモードではR/W=「O」なら無変化
で、R/W=rl」ならリセノhされ、スレーブモード
ではR/W=rO」なら無変化で、R/W−「i」なら
セットされる。そして、上記ステータス・コントロール
レジスタ7ハ、上記TRXビットがセントされている送
信モードのときに、上記データシフトレジスタ8のデー
タをシリアルデータ(SD^)としてシリアルクロック
データ(SCL)に同期して上記SDAコントローラ1
2に転送させて、上記第2の入出力ボート3からシリア
ルデータ(SDA)を外部のSDAバスに出力する制御
動作を行う。また、上記ステータス・コントロールレジ
スタ7は、上記TRXピントがリセットされている受信
モードのときに、外部のSDAバスから上記第2の入出
力ポート3を介して上記SDAコントローラ12に転送
されてくるシリアルデータ(SDA)を上記データシフ
トレジスタ8に入力するとともに、上記シリアルデータ
(SDA)を完全に受信すると受信確認信号(ACK)
を上記SDAコントローラ12に形成させて、上記第2
の人出力ポート3から受信確認信号(ACK)を外部の
SDAバスに出力する制御動作を行う。
Further, the TRX bit is set by the CPU 6 when acquiring control of the external bus and operating in master mode, and is reset after creating stop control information (P). It is reset when the transfer of the byte being transferred is completed if the user loses the right to do so. Furthermore, the TRX pinpoint is reset by the R/W data following the slave address data in the 1-byte data immediately after the start control information (S), and in master mode, if R/W = "O". If there is no change and R/W=rl, it is reset, and in slave mode, if R/W=rO, there is no change, and if R/W-"i", it is set. When the status control register 7c is in the transmission mode in which the TRX bit is set, the data in the data shift register 8 is converted into serial data (SD^) and synchronized with the serial clock data (SCL). SDA controller 1
2, and performs a control operation to output serial data (SDA) from the second input/output boat 3 to the external SDA bus. The status control register 7 also stores a serial number transferred from the external SDA bus to the SDA controller 12 via the second input/output port 3 when the TRX focus is reset. When the data (SDA) is input to the data shift register 8 and the serial data (SDA) is completely received, a reception confirmation signal (ACK) is sent.
by causing the SDA controller 12 to form the second
A control operation is performed to output a reception confirmation signal (ACK) from the human output port 3 to the external SDA bus.

さらに、上記BBピントは、上記バスビジィ検知部15
によって、外部ハス上のスタート制御情報(S)を検出
したときにセットされ、外部バス上のストップ制御情報
(P)を検出したときにリセットされる。上記CPU6
は、外部バスの支配権を獲得してマスターモードとして
動作する必要の有る場合に、上記BBビットがリセット
される外部ハスの不使用状態のときに、上記TRXビッ
トをセントシて、スタート制御情報(S)を外部バス上
に出力して、バス支配権を獲得する制御動作を行う。
Furthermore, the BB focus is determined by the bus busy detection section 15.
is set when start control information (S) on the external bus is detected, and reset when stop control information (P) on the external bus is detected. Above CPU6
When it is necessary to acquire control of the external bus and operate in master mode, when the BB bit is reset and the external bus is not in use, the TRX bit is set and the start control information ( S) on the external bus to perform a control operation to acquire bus control.

さらにまた、上記PINビットは、上記データシフトレ
ジスタ8の書き込み/読み出し毎にセットされ、上記S
CLコントローラ11により1バイトのデータの送信あ
るいは受信の終了タイミング毎にリセットされる。そし
て、上記ステータス・コントロールレジスタ7は、上記
PINビットがリセットされることにより、割り込み制
御部18に割り込み制御信号を供給して、上記CPU6
に割り込みをかけてデータ転送の終了を知らせる。
Furthermore, the PIN bit is set each time the data shift register 8 is written/read, and the PIN bit is set every time the data shift register 8 is written/read.
It is reset by the CL controller 11 every time the transmission or reception of one byte of data ends. Then, when the PIN bit is reset, the status control register 7 supplies an interrupt control signal to the interrupt control unit 18 to control the CPU 6.
interrupt to notify the end of data transfer.

また、上記ステータス・コントロールレジスタ7のソフ
トウェアに対して書き込み専用の下位4ビットは、上記
T/Fブロック5による外部バスに対するデータの送信
動作の許可/禁止を指定するESOピントと、上記1/
Fブロンク5による送受信データのビット数を示すBC
,、BC,。
Furthermore, the lower 4 bits of the status control register 7, which are write-only for the software, are the ESO pin which specifies permission/inhibition of the data transmission operation to the external bus by the T/F block 5, and the 1/2 bits mentioned above.
BC indicating the number of bits of data transmitted and received by F bronc 5
,,BC,.

BC,ビットである。さらに、上記ステータス・コント
ロールレジスタ7のソフトウェアに対して読み出し専用
の下位4ビツトは、外部バスの支配権の喪失状態を示す
A、Lピント、マスター局によるアドレス指定状態を示
すAASピントおよびAD0ビットとデータの受信状態
を示すLRBビットである。
BC, bit. Furthermore, the lower 4 bits of the status control register 7, which are read-only for the software, are the A and L pinto indicating the state of loss of control over the external bus, and the AAS pinto and AD0 bits indicating the address designation state by the master station. This is an LRB bit indicating the data reception status.

上記ALビットは、マスター・送信モードにおいて外部
バスの支配権を失ったときに、上記支配権喪失検知部1
6の検知出力によりセットされ、上記データシフトレジ
スタ8の書き込み/読み出し毎にリセットされる。また
、上記ALビットはスレーブモードでアドレス指定され
ている状態で上記ステータス・コントロールレジスタ7
にデータを書き込むとセットされ、書き込んだデータが
無効であることを示すようになっている。そして、上記
ステータス・コントロールレジスタ7は、マスクモード
で上記ALビットがセットされると、上記TRXビット
をリセットするとともに、転送中のバイトの転送を終了
したらストップ制御情報(P)を生成して外部バスに出
力し、上記MSTビットをリセットする制御動作を行う
The AL bit is set to the control loss detection unit 1 when control of the external bus is lost in the master transmission mode.
It is set by the detection output of the data shift register 8, and is reset every time the data shift register 8 is written/read. In addition, the AL bit is set to the status control register 7 while being addressed in slave mode.
It is set when data is written to the , indicating that the written data is invalid. When the AL bit is set in the mask mode, the status control register 7 resets the TRX bit and generates stop control information (P) when the transfer of the byte being transferred is completed. A control operation is performed to output to the bus and reset the MST bit.

上記AASビットは、マスター局によりアドレス指定さ
れたときに上記コンパレータ17の出力にてセットされ
、上記データシフトレジスタ8の書き込み/読み出し毎
にリセットされる。また、上記AD、ビットは、マスタ
ー局から転送されてくるスタート制御情報(S)の直後
の1バイトのデータが全て論理「0」のときに上記コン
パレータ17の出力にてセントされ、上記バスビジィ検
出部15が外部バス上のスタート制御情報(S)あるい
はストップ制御情報(P)を検出することによりリセッ
トされる。さらに、LRBビットは、上記マスターモー
ドのときにレシーバ側で作った受信確認信号(ACに)
の状態を保持する。すなわち、レシーバが受信確認信号
(ACK)を返送したときはLRB= rQjとなって
正常にデータを受信したことを示すようになっている。
The AAS bit is set at the output of the comparator 17 when addressed by the master station, and is reset each time the data shift register 8 is written/read. Further, the AD bit is sent at the output of the comparator 17 when the 1-byte data immediately after the start control information (S) transferred from the master station is all logic "0", and the bus busy detection is performed. The unit 15 is reset when it detects start control information (S) or stop control information (P) on the external bus. Furthermore, the LRB bit is the reception confirmation signal (to AC) generated on the receiver side during the above master mode.
maintain the state of That is, when the receiver returns a reception confirmation signal (ACK), LRB=rQj, indicating that data has been received normally.

さらに、上記コントロールレジスタ10は、このインタ
ーフェース回路の動作モードおよびマスター動作モード
において発生するシリアルクロックデータ(SCL)の
スピード制御を行うもので、4ピントレジスタが使用さ
れている。
Further, the control register 10 controls the speed of serial clock data (SCL) generated in the operation mode and master operation mode of this interface circuit, and uses a 4-pin register.

(G−2)実施例の動作 この実施例において端末装置lは、マスター局として動
作する場合に、上記CPU6が内部バスを介して上記コ
ントロールレジスタ10にスタート制御情報(S)の送
出を指示して上記SCLコントローラ11およびSDA
コントローラ12がら外部バス上にスタート制御情報(
S)を送出することにより上記外部バスの支配権を獲得
し、上記SCLハスにシリアルクロックデータ(SCL
)を上記S CLコントローラ11から送出して第4図
のフローチャートに示す転送動作を開始し、転送動作の
露冬了を」二足ステータス・コンI・ロールレジスタ7
の上記PINビットにより確認(ステップ1)して転送
動作を終了するとともに、データ転送中に上記外部バス
上にストップ制御情報(P)が生成されて上記ステップ
2において上記外部バスの支配権を失ったことを上記支
装置1!喪失検知部16が検知する(ステップ2)と、
上記ステータス・コア)C1−/I/レジスタ7が上記
SCLコントローラ11およびSDAコントローラ12
から外部バス上にストップ制御情報(P)を生成させて
(ステップ3)、上記外部バスを解放してから転送を終
了する。このようにマスター局として動作している端末
装置1がバスの支配権を失ったときに上記バスを自動的
に解放することにより、上記バスに混入するノイズ等に
よりシステムがデンドロツク状態に陥るのを回避して、
システムの正常な運用を確保することができる。
(G-2) Operation of Embodiment In this embodiment, when the terminal device l operates as a master station, the CPU 6 instructs the control register 10 to send start control information (S) via the internal bus. The above SCL controller 11 and SDA
The controller 12 sends start control information (
S), it acquires control of the external bus and transmits serial clock data (SCL) to the SCL bus.
) from the SCL controller 11 to start the transfer operation shown in the flowchart of FIG.
The data transfer operation is confirmed by the above PIN bit (step 1) and the transfer operation is terminated, and stop control information (P) is generated on the external bus during the data transfer, and control of the external bus is lost in the above step 2. The above support device 1! When the loss detection unit 16 detects (step 2),
The above status core) C1-/I/register 7 is the above SCL controller 11 and SDA controller 12
Then, stop control information (P) is generated on the external bus (step 3), the external bus is released, and the transfer ends. By automatically releasing the bus when the terminal device 1 operating as a master station loses control of the bus, it is possible to prevent the system from falling into a de-locked state due to noise entering the bus. avoid,
Normal operation of the system can be ensured.

また、この実施例における端末装置1は、第5図のフロ
ーチャートに示すように、上記バスビジィ検知部15に
て上記外部バス上のスタート制御情報(S)を検出する
(ステップ1)とスレーブ局となって、先ず、上記ステ
ータス・コントロールレジスタ7がアボードタイマをリ
セット(ステップ2)し、次のステップ3にてマスター
局からデータが転送されてきたか否かの判定動作を行い
、その判定結果がrYEsJすなわち転送データが有る
場合にはそのデータを上記データシフトレジスタ8から
上記CPU6に取り込み(ステップ4)、また、上記ス
テップ3における判定結果が「NO」すなわち転送デー
タが無い場合には次のステップ5に移って上記アボード
タイマーがオーバーフローしたか否かの判定動作を行っ
て上記アボードタイマーがオーバーフローするまでの所
定期間中にデータが転送されて来ない場合にはバスビジ
ィフラグをリセントシ(ステップ6)、上記SCI、コ
ントローラ11およびSDAコントローラ12から外部
バス上にストップ制御n情報(P)を生成させて(ステ
ップ7)、上記外部バスを強制的に解放する。このよう
に、外部バスを通じてデータが所定時間以上に亘って転
送されてこないときに、上記外部バスの支配権の無いス
レーブ局として動作している端末装置f1が上記バスを
強制的に解放することにより、上記外部バスに混入する
ノイズによるシステムのデッドロック状態から復旧させ
ることができ、システムの正常な運用を確保することが
できる。
Further, as shown in the flowchart of FIG. 5, the terminal device 1 in this embodiment detects the start control information (S) on the external bus in the bus busy detection section 15 (step 1), and then communicates with the slave station. First, the status control register 7 resets the abord timer (step 2), and then in step 3, it performs an operation to determine whether or not data has been transferred from the master station, and the determination result is rYEsJ, that is, if there is transfer data, the data is fetched from the data shift register 8 to the CPU 6 (step 4), and if the judgment result in step 3 is "NO", that is, there is no transfer data, the next step is executed. 5, it is determined whether or not the above-mentioned abord timer has overflowed, and if no data has been transferred within a predetermined period until the above-mentioned abord timer overflows, the bus busy flag is set to recent (step 5). 6) Generate stop control n information (P) on the external bus from the SCI, controller 11, and SDA controller 12 (step 7), and forcibly release the external bus. In this way, when data is not transferred through the external bus for a predetermined period of time or more, the terminal device f1 operating as a slave station without control over the external bus forcibly releases the bus. Accordingly, it is possible to recover the system from a deadlock state caused by noise mixed into the external bus, and to ensure normal operation of the system.

H,発明の効果 本発明によれば、バス上に制御情報を送出することによ
りバスの支配権を獲得してデータを転送するマスター局
として動作するとともに、バス上の制御情報を検出する
ことにより上記バス上を転送されてくるデータを受信す
るスレーブ局として動作可能な複数の端末装置がバス・
ネットワークを介して接続され、マルチマスター動作に
よるデータ伝送を行うデータ伝送システムにおいて、マ
スター局として動作している端末装置がデータ転送中に
バスの支配権を失ったことを検知手段にて検知して上記
バスを自動的に解放するので、上記バスに混入するノイ
ズ等によりシステムがデッドロック状態に陥るのを回避
する機能をマスター局に与えて、システムの正常な運用
を確保することができる。
H. Effects of the Invention According to the present invention, the master station obtains control of the bus by transmitting control information onto the bus and operates as a master station to transfer data, and also by detecting the control information on the bus. Multiple terminal devices that can operate as slave stations that receive data transferred on the bus are connected to the bus.
In a data transmission system that is connected via a network and performs data transmission using multi-master operation, a detection means detects that a terminal device operating as a master station has lost control of the bus during data transfer. Since the bus is automatically released, the master station is provided with a function to prevent the system from falling into a deadlock state due to noise mixed into the bus, thereby ensuring normal operation of the system.

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

第1図は本発明に係るデータ伝送システムを構成する端
末装置の具体例を示すブロンク図であり、第2図は上記
データ伝送システムにおけるデータフォーマントの一例
を示す模式図であり、第2シ上記端末装置を構成してい
るステータス・コントロールレジスタの構成を示す模式
図であり、第4図は上記端末装置のマスター局としての
動作を示すフローチャートであり、第5図は上記端末装
置のスレーブ局としての動作を示すフローチャートであ
る。 第6図は一般的なハス・ネットワークによるデータ伝送
システムの構成を示す模式図であり、第7UAは上記デ
ータ伝送システムのバス制j1フォーマノ)・を示ず模
式図であり、第8図は上記データ伝送システムにおける
ハス上のノイズによる誤動作を説明するための模式図で
ある。 l・・・端末装置 2.3・・・入出力ボート 5・・・インターフェースブロック 6・・・CPtJ 7・・・ステータス・コントロールレジスタ8・・・デ
ータシフトレジスタ 9・・・スレーブアドレスレジスタ 10・・・コントロールレジスタ 11・ ・・SCLコントローラ 12・・・SDAコントローラ 14・・・クロック発生器 15・・・バスビジィ検知部 16・・・支配権喪失検知部 17・・ ・コンパレータ 特許出馴人 ソニー株式会社
FIG. 1 is a block diagram showing a specific example of a terminal device constituting a data transmission system according to the present invention, and FIG. 2 is a schematic diagram showing an example of a data format in the data transmission system. FIG. 4 is a schematic diagram showing the configuration of a status control register constituting the terminal device, FIG. 4 is a flowchart showing the operation of the terminal device as a master station, and FIG. 5 is a flowchart showing the operation of the terminal device as a slave station. 2 is a flowchart showing the operation of FIG. Fig. 6 is a schematic diagram showing the configuration of a data transmission system using a general HAS network, UA 7 is a schematic diagram without showing the bus system of the data transmission system, and Fig. 8 is a schematic diagram showing the configuration of a data transmission system using a general HAS network. FIG. 2 is a schematic diagram for explaining malfunctions caused by noise on a lotus in a data transmission system. l...Terminal device 2.3...I/O boat 5...Interface block 6...CPtJ 7...Status control register 8...Data shift register 9...Slave address register 10. ... Control register 11 ... SCL controller 12 ... SDA controller 14 ... Clock generator 15 ... Bus busy detection section 16 ... Loss of control detection section 17 ... Comparator patent expert Sony stock company

Claims (1)

【特許請求の範囲】  バス上に制御情報を送出することによりバスの支配権
を獲得してデータを転送するマスター局として動作する
とともに、バス上の制御情報を検出することにより上記
バス上を転送されてくるデータを受信するスレーブ局と
して動作する複数の端末装置がバス・ネットワークを介
して接続され、マルチマスター動作によるデータ伝送を
行うデータ伝送システムにおいて、 データ転送中にバスの支配権を失ったことを検知する検
知手段と、上記検知手段の検知出力に応じて上記バスを
解放する制御手段とを各端末装置に設け、 マスター局として動作している端末装置がバスの支配権
を失ったときに上記バスを自動的に解放するようにした
ことを特徴とするデータ伝送システム。
[Claims] Operates as a master station that acquires control of the bus by transmitting control information onto the bus and transfers data, and also transfers data on the bus by detecting control information on the bus. In a data transmission system in which multiple terminal devices operating as slave stations that receive incoming data are connected via a bus network and data is transmitted using multi-master operation, control of the bus is lost during data transfer. Each terminal device is provided with a detection means for detecting this, and a control means for releasing the bus in accordance with the detection output of the detection means, and when the terminal device operating as a master station loses control of the bus. A data transmission system characterized in that the above-mentioned bus is automatically released.
JP62145522A 1987-06-11 1987-06-11 Data transmission system Expired - Lifetime JP2508487B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62145522A JP2508487B2 (en) 1987-06-11 1987-06-11 Data transmission system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62145522A JP2508487B2 (en) 1987-06-11 1987-06-11 Data transmission system

Publications (2)

Publication Number Publication Date
JPS63309043A true JPS63309043A (en) 1988-12-16
JP2508487B2 JP2508487B2 (en) 1996-06-19

Family

ID=15387170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62145522A Expired - Lifetime JP2508487B2 (en) 1987-06-11 1987-06-11 Data transmission system

Country Status (1)

Country Link
JP (1) JP2508487B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59168736A (en) * 1983-03-14 1984-09-22 Meidensha Electric Mfg Co Ltd Multi-drop transmission system
JPS59202527A (en) * 1983-05-02 1984-11-16 Fuji Electric Co Ltd Bus control system
JPS6091743A (en) * 1983-09-27 1985-05-23 テイ アール ダブリユー インコーポレーテツド Multimaster communication bus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59168736A (en) * 1983-03-14 1984-09-22 Meidensha Electric Mfg Co Ltd Multi-drop transmission system
JPS59202527A (en) * 1983-05-02 1984-11-16 Fuji Electric Co Ltd Bus control system
JPS6091743A (en) * 1983-09-27 1985-05-23 テイ アール ダブリユー インコーポレーテツド Multimaster communication bus

Also Published As

Publication number Publication date
JP2508487B2 (en) 1996-06-19

Similar Documents

Publication Publication Date Title
JP2863653B2 (en) Microcomputer with built-in communication device
JPS63288537A (en) Communication equipment
JP5459807B2 (en) Debug signaling in multiprocessor data processing systems
JPH0475700B2 (en)
WO1999022307A1 (en) Data interface and high-speed communication system using the same
JPS63309043A (en) Data transmission system
JPH08110888A (en) Method and constitution for control of data network
JPS63309044A (en) Data transmission system
JPH04287150A (en) Synchronous serial bus system
JP2578773B2 (en) Serial data transfer device
JPS63309046A (en) Data transmission system
JPS6049350B2 (en) Data bus control method
JPH1091588A (en) Data transfer device
JP2000295114A (en) Data transfer circuit
JPH0439819B2 (en)
JPH0658655B2 (en) Serial I / O method
JPH02161551A (en) Data transfer control system
JP2000347712A (en) Programmable controller
JPS6384228A (en) Data transmission system between master station and plural slave stations
JPH01246941A (en) System for controlling communication of computer data
JPH01170245A (en) Communication controller
JPH05108541A (en) Inter-cpu communication system
JPH0477940B2 (en)
JPS6132161A (en) Information transfer device of processing system
JPH0734189B2 (en) Multiple data input / output control circuit

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080416

Year of fee payment: 12