JPH08191319A - Data communication system - Google Patents

Data communication system

Info

Publication number
JPH08191319A
JPH08191319A JP7002001A JP200195A JPH08191319A JP H08191319 A JPH08191319 A JP H08191319A JP 7002001 A JP7002001 A JP 7002001A JP 200195 A JP200195 A JP 200195A JP H08191319 A JPH08191319 A JP H08191319A
Authority
JP
Japan
Prior art keywords
data communication
communication
data
communication system
serial 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.)
Withdrawn
Application number
JP7002001A
Other languages
Japanese (ja)
Inventor
Keiichi Ikeda
恵一 池田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP7002001A priority Critical patent/JPH08191319A/en
Publication of JPH08191319A publication Critical patent/JPH08191319A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To suppress the occurrence of an error on a communication line and stably communicate data irrelevantly to the length of a cable mutually connecting equipments without requiring any complicated operation by providing detecting means and control means for specific communication error occurrence. CONSTITUTION: The equipment 101 which functions as a slave device and the equipment 102 which functions as a master device are connected by a clock line S101, a TXD line S102, and an RXD line S103 which constitute a serial data communication line. Then the system has the detecting means which detects a communication error occurring on the data communication line during a communication of data between the equipments 102 and 101; and a 1st communication system (synchronous system) or a 2nd communication system (asynchronous system) different from the 1st communication system is set as a communication system between the equipments 102 and 101 according to the detection result and the data are communicated according to the set communication system.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、複数の機器間で、デー
タを伝送し合うデータ通信システムに関するもので、特
に、夫々がマイクロプロセッサ或はシリアルデータ通信
用インターフェースを有する複数の機器間で、シリアル
データ通信用回線を用いて、選択的に同期式或は非同期
式シリアルデータ通信を行なうデータ通信システムに関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data communication system for transmitting data between a plurality of devices, and in particular, a plurality of devices each having a microprocessor or a serial data communication interface. The present invention relates to a data communication system for selectively performing synchronous or asynchronous serial data communication using a serial data communication line.

【0002】[0002]

【従来の技術】従来、複数の機器間で、データを互いに
伝送し合うシステムとして、夫々がマイクロプロセッサ
或はシリアルデータ通信用インターフェースを備えた複
数の機器を1組のシリアルデータ通信用ラインを介して
相互にシリアルデータ通信を行なうことにより、各機器
間でデータの送受信を行ない、各機器における各種機能
を動作させる様に構成されたシステムがある。
2. Description of the Related Art Conventionally, as a system for transmitting data between a plurality of devices, a plurality of devices each having a microprocessor or a serial data communication interface are connected via a set of serial data communication lines. There is a system configured to perform various functions in each device by transmitting and receiving data between each device by performing serial data communication with each other.

【0003】上述の様な従来のデータ通信システムとし
ては、例えばパーソナルコンピュータ等にデータ通信用
モデムや入力用スキャナー等の他の周辺機器を接続し、
用いるものがあるが、この場合には、各周辺機器に夫
々、RS232CやRS422等の非同期式のシリアル
データ通信用インターフェースが装備され、このインタ
ーフェースによってパーソナルコンピュータ等の機器と
該パーソナルコンピュータに接続される周辺機器との間
で、データやコマンドがシリアルに送受信されるもので
ある。
In the conventional data communication system as described above, for example, a personal computer or the like is connected with other peripheral equipment such as a data communication modem or an input scanner,
In this case, each peripheral device is equipped with an asynchronous serial data communication interface such as RS232C or RS422, which is used to connect to a device such as a personal computer and the personal computer. Data and commands are serially transmitted and received to and from peripheral devices.

【0004】また、パーソナルコンピュータ等の機器と
該パーソナルコンピュータに接続される周辺機器との設
置される距離が近く、接続ケーブルを用いること無く直
接機器同士を接続したり、或は短い接続ケーブル等で接
続したりして使用することができる機器においては、高
速にデータやコマンドの送受信を行なうために、高い周
波数のクロックに同期して動作する同期式シリアルイン
ターフェイスを装備し、該クロックに同期して機器間で
データやコマンドの送受信を行なうものも実用化されて
いる。
Further, the equipment such as a personal computer and the peripheral equipment connected to the personal computer are installed at a short distance, and the equipment can be directly connected to each other without using a connection cable, or a short connection cable or the like can be used. Equipment that can be connected and used is equipped with a synchronous serial interface that operates in synchronization with a high-frequency clock in order to send and receive data and commands at high speed. A device that transmits and receives data and commands between devices has also been put into practical use.

【0005】上述の様なシリアルデータ通信は、非同期
式、同期式の何れの場合でもコスト的にパラレルデータ
通信よりも安価にてインターフェースを構成することが
でき、かつ各機器間を接続するための接続ケーブルの数
も少なくて済むため、データの通信回線を設置する際の
コストも低く抑えることができるといった点でパラレル
データ通信よりも有利である。
In serial data communication as described above, an interface can be constructed at a lower cost than parallel data communication in both cases of asynchronous type and synchronous type, and for connecting each device. Since the number of connection cables is small, it is advantageous over parallel data communication in that the cost for installing a data communication line can be kept low.

【0006】また、前述の非同期式シリアルデータ通信
では、用いる駆動装置や接続ケーブルの線材等の仕様に
よって異なるが、通常は9600bpsのデータ転送速
度にて各機器間の距離が数十メートル程度離れていても
エラー無く通信することができ、同期式シリアルデータ
通信では、例えば、同期クロックの周波数が1MHz
で、各機器間の距離が数メートル程度離れていてもエラ
ー無く通信を行なうことができる様に構成されている。
In the above-mentioned asynchronous serial data communication, the distance between the devices is normally several tens of meters at a data transfer rate of 9600 bps, although it depends on the specifications of the driving device used and the wire material of the connection cable. Even if the communication is error-free, synchronous serial data communication, for example, the frequency of the synchronous clock is 1MHz.
Thus, even if the distance between each device is several meters, communication is possible without error.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上述の
様に従来は、シリアルデータ通信を行なう場合に使用す
るインターフェイスとしては、同期式か非同期式かの何
れか一方を使用することになり、例えば、接続する機器
同士の間に距離があり各機器の接続に長い接続ケーブル
を使用しなければならない場合には、通信回線上におけ
るデータのエラー発生率を抑えるため非同期式によりシ
リアルデータ通信を行なわなければならず、この場合に
はデータの転送速度の高速化を図ることが困難となって
しまい、また、データの転送速度の高速化を図るために
は、同期式によりシリアルデータ通信を行なうことにな
り、この場合にも通信回線上におけるデータのエラー発
生率を抑えるため、各機器の接続に長い接続ケーブルを
使用することができないため、接続する機器同士の距離
を短くしなければならないという欠点があった。
However, as described above, conventionally, either the synchronous type or the asynchronous type is used as the interface used for serial data communication. If there is a distance between the devices to be connected and a long connection cable must be used to connect each device, serial data communication must be performed asynchronously in order to reduce the error rate of data on the communication line. However, in this case, it becomes difficult to increase the data transfer rate, and in order to increase the data transfer rate, serial data communication is performed by a synchronous method. Even in this case, long connection cables can be used to connect each device to reduce the error rate of data on the communication line. No reason, there is a drawback that it is necessary to shorten the distance between devices to be connected.

【0008】本発明は、上述のような従来の問題点を解
決するために為されたもので、複雑な操作を必要とせ
ず、機器同士を接続する接続ケーブルの長さに係らず、
通信回線上でのエラーの発生率を抑え、安定したデータ
の通信を行なうことができるデータ通信システムを提供
することを目的とする。
The present invention has been made in order to solve the above-mentioned conventional problems, does not require a complicated operation, and is independent of the length of a connection cable for connecting devices,
An object of the present invention is to provide a data communication system capable of performing stable data communication while suppressing an error occurrence rate on a communication line.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するた
め、本発明のデータ通信システムは、データを送信或は
受信すると共に、システム全体の動作を制御するための
マスター装置と、夫々がデータを送信或は受信するため
のスレーブ装置と、前記マスター装置とスレーブ装置と
の間で、データの通信を行なうためのデータ通信回線と
を備えるシステムにおいて、前記マスター装置とスレー
ブ装置との間で、データの通信を行なっている期間中に
前記データ通信回線上において通信エラーが発生したこ
とを検出するための検知手段と、前記検知手段における
検出結果に従って、前記マスター装置とスレーブ装置と
の間で行なうデータの通信方式を第1の通信方式と前記
第1の通信方式とは異なる第2の通信方式の内の何れか
を設定し、設定された通信方式に従ってデータの通信を
行なう様に制御する制御手段とを有する様に構成されて
いる。
In order to achieve the above object, the data communication system of the present invention transmits and receives data, and at the same time, a master device for controlling the operation of the entire system, and a master device for controlling the operation of the entire system, respectively. In a system including a slave device for transmitting or receiving, and a data communication line for performing data communication between the master device and the slave device, data is transmitted between the master device and the slave device. Detecting means for detecting the occurrence of a communication error on the data communication line during the period when the communication is performed, and the data performed between the master device and the slave device according to the detection result of the detecting means. The communication method is set by setting one of the first communication method and the second communication method different from the first communication method. And it is configured so as to have a control means for controlling so as communicate the data according to the communication method.

【0010】[0010]

【作用】上述の構成により、複雑な操作を必要とせず、
機器同士を接続する接続ケーブルの長さに係らず、通信
回線上でのエラーの発生率を抑え、安定したデータの通
信を行なうことができる様になる。
With the above-mentioned configuration, no complicated operation is required,
Regardless of the length of the connection cable that connects the devices, it is possible to suppress the error occurrence rate on the communication line and perform stable data communication.

【0011】[0011]

【実施例】【Example】

(第1の実施例)まず、本発明の第1の実施例について
説明する。
(First Embodiment) First, a first embodiment of the present invention will be described.

【0012】図1は、本発明の第1の実施例としてのデ
ータ通信システムの構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a data communication system as a first embodiment of the present invention.

【0013】図1において、101は機器A、102は
機器Bを示すものであり、機器A101と機器B102
とはシリアルデータ通信ラインを構成するクロックライ
ンS101、TXDラインS102、RXDラインS1
03によって接続されている。尚、本実施例においては
前記機器A101を例えばモデム等のスレーブ装置と
し、前記機器B102を例えば前記機器A101を制御
してシリアルデータ通信を行なうためのコントローラ等
のマスター装置として以下説明を行なうもので、また、
図1においては機器A101と機器B102とのシリア
ルデータ通信に関係する構成のみを記載し、他の構成に
ついては図示せず、詳細な説明も省略する。
In FIG. 1, 101 is a device A, 102 is a device B, and devices A101 and B102 are shown.
Is a clock line S101, a TXD line S102, and an RXD line S1 that form a serial data communication line.
Connected by 03. In the present embodiment, the device A101 is a slave device such as a modem, and the device B102 is a master device such as a controller for controlling the device A101 to perform serial data communication. ,Also,
In FIG. 1, only the configuration related to serial data communication between the device A 101 and the device B 102 is described, other configurations are not shown, and detailed description thereof is omitted.

【0014】図1において、106及び107はシリア
ルデータ通信のための駆動回路であり、該駆動回路10
6、107において入出力される信号の電圧レベル等
は、シリアルデータ通信の規格であるRS232C、R
S422、RS423等の仕様によって多少異なる。
In FIG. 1, reference numerals 106 and 107 denote drive circuits for serial data communication.
The voltage levels and the like of the signals input and output at 6 and 107 are RS232C and R, which are the standards for serial data communication.
Slightly different depending on specifications such as S422 and RS423.

【0015】103、110は夫々機器A101及び機
器B102の通信動作の制御を行なうためのマイクロプ
ロセッサであり、夫々駆動回路106、107において
入力されるクロックS104、S109を入力する様に
構成されている。
Reference numerals 103 and 110 denote microprocessors for controlling the communication operation of the device A 101 and the device B 102, respectively, and are configured to input the clocks S104 and S109 respectively input to the drive circuits 106 and 107. .

【0016】104、109は切換スイッチであり、各
々マイクロプロセッサ103、110から出力される制
御信号S115、S114によって、前記駆動回路10
6、107において入力される受信信号をマイクロプロ
セッサ103、110の非同期式シリアルデータ入力端
子か同期式シリアルデータ入力端子かの何れかに切り換
えて出力するように構成されており、図中のS105、
S112はマイクロプロセッサ103、110の非同期
式シリアルデータ入力端子に入力される信号を示し、S
106、S113はマイクロプロセッサ103、110
の同期式シリアルデータ入力端子に入力される信号を示
している。
Reference numerals 104 and 109 denote change-over switches, which are driven by the control signals S115 and S114 output from the microprocessors 103 and 110, respectively.
It is configured to switch the received signal input at 6, 107 to either the asynchronous serial data input terminal or the synchronous serial data input terminal of the microprocessor 103, 110 and output the signal.
S112 represents a signal input to the asynchronous serial data input terminals of the microprocessors 103 and 110.
106 and S113 are microprocessors 103 and 110.
The signal input to the synchronous serial data input terminal of is shown.

【0017】同様に、105、108も切換スイッチで
あり、各々マイクロプロセッサ103、110から出力
される制御信号S115、S114によって、該マイク
ロプロセッサ103、110の各々の非同期式シリアル
データ出力端子と同期式シリアルデータ出力端子とから
前記駆動回路106、107に対して送出する送信信号
を切り換えて出力する様に構成されており、図中のS1
07、S110はマイクロプロセッサ103、S110
の非同期式シリアルデータ出力端子から出力される信号
を示し、S108、S111はマイクロプロセッサ10
3、110の同期式シリアルデータ出力端子にから出力
される信号を示している。
Similarly, 105 and 108 are change-over switches, which are synchronized with the asynchronous serial data output terminals of the microprocessors 103 and 110 by control signals S115 and S114 output from the microprocessors 103 and 110, respectively. The serial data output terminal is configured to switch and output a transmission signal to be sent to the drive circuits 106 and 107.
07 and S110 are the microprocessor 103 and S110
The signals output from the asynchronous serial data output terminal of the microprocessor 10 are indicated by S108 and S111.
The signals output from the synchronous serial data output terminals 3, 110 are shown.

【0018】尚、本実施例におけるマイクロプロセッサ
103、110は夫々、同期式シリアルデータ通信機能
と非同期式シリアルデータ通信機能とを有しているが、
該通信機能を持たないマイクロプロセッサを備えた機器
により本実施例のシステムを構成する場合には、825
1等の外付けのシリアルデータI/O素子を加えること
により、本実施例に示す構成と同様の機能を有するシス
テムを実現することができる。
Although the microprocessors 103 and 110 in this embodiment respectively have a synchronous serial data communication function and an asynchronous serial data communication function,
In the case where the system of this embodiment is configured by a device equipped with a microprocessor having no communication function, 825
By adding an external serial data I / O element such as 1, a system having the same function as the configuration shown in this embodiment can be realized.

【0019】以下、第1の実施例における同期式シリア
ルデータ通信と非同期式シリアルデータ通信との切り換
え動作シーケンスについて、図2、図3に示す動作フロ
ーチャートを用いて説明する。
The switching operation sequence between the synchronous serial data communication and the asynchronous serial data communication in the first embodiment will be described below with reference to the operation flowcharts shown in FIGS.

【0020】図2は本実施例においてマスター装置とし
て機能する機器B102のシリアルデータ通信プロセス
を示す動作フローチャートであり、図3は本実施例にお
いてスレーブ装置として機能する機器A101のシリア
ルデータ通信プロセスを示す動作フローチャートであ
る。
FIG. 2 is an operation flowchart showing the serial data communication process of the device B 102 functioning as a master device in this embodiment, and FIG. 3 shows the serial data communication process of the device A 101 functioning as a slave device in this embodiment. It is an operation | movement flowchart.

【0021】まず、本実施例においてマスター装置とし
て機能する機器B102のシリアルデータ通信プロセス
について説明する。
First, the serial data communication process of the device B102 functioning as a master device in this embodiment will be described.

【0022】図2に示す様に、マスター装置として機能
する機器B102の電源をオン状態とすることによりシ
リアルデータ通信プロセスが開始されると、該機器B1
02はシリアルデータ通信機能に関する各部におけるイ
ニシャライズ動作(初期設定動作)を行なう(図2の2
01)。
As shown in FIG. 2, when the serial data communication process is started by turning on the power of the device B102 functioning as a master device, the device B1 is started.
Reference numeral 02 performs an initializing operation (initial setting operation) in each unit related to the serial data communication function (2 in FIG. 2).
01).

【0023】次に、スレーブ装置として機能する機器A
101とシリアルデータ通信を開始するため、マイクロ
プロセッサ110は制御信号S114により切換スイッ
チ108、109を制御し、同期式シリアルデータ通信
用の入力端子、出力端子を駆動回路107に接続し(図
2の202)、送信するコマンドデータを不図示の送信
用バッファにセットし、同期式シリアルデータ通信機能
をイネーブルにする(図2の203)。
Next, the device A that functions as a slave device
In order to start serial data communication with 101, the microprocessor 110 controls the changeover switches 108 and 109 by the control signal S114 to connect the input terminal and output terminal for synchronous serial data communication to the drive circuit 107 (see FIG. 2). 202), the command data to be transmitted is set in a transmission buffer (not shown), and the synchronous serial data communication function is enabled (203 in FIG. 2).

【0024】そして、上述の様に通信用バッファにセッ
トされた送信コマンドデータは同期式シリアルデータ出
力端子から信号S111としてクロックS109と共に
出力され、出力されたクロックS109とコマンドデー
タS111は、駆動回路107においてレベル変換さ
れ、機器A101の駆動回路106に対して送信され、
該駆動回路106においてレベル変換され、マイクロプ
ロセッサ103のクロック入力端子、同期式シリアルデ
ータ入力端子に夫々入力される。
The transmission command data set in the communication buffer as described above is output from the synchronous serial data output terminal as the signal S111 together with the clock S109, and the output clock S109 and command data S111 are output to the drive circuit 107. Is converted to a level and transmitted to the drive circuit 106 of the device A101,
The level is converted in the drive circuit 106 and input to the clock input terminal and the synchronous serial data input terminal of the microprocessor 103, respectively.

【0025】そして、マイクロプロセッサ103では、
入力されるクロックS109に同期して、同期式シリア
ルデータ出力端子からデータを出力し、出力されたデー
タは、駆動回路106、駆動回路107を介して機器B
102のマイクロプロセッサ110の同期式シリアルデ
ータ入力端子に入力される。
Then, in the microprocessor 103,
Data is output from the synchronous serial data output terminal in synchronization with the input clock S109, and the output data is transmitted to the device B through the drive circuit 106 and the drive circuit 107.
It is input to the synchronous serial data input terminal of the microprocessor 110 of 102.

【0026】図4は、上述の同期式シリアルデータ通信
における各種通信信号の波形を示すタイミングチャート
であり、該図4に示す様に、クロックS109は、同期
式でシリアルデータ通信が実行されている場合、データ
の通信を行なっていない期間は、そのレベルがハイレベ
ルに保たれる様に構成されており、この様に構成するこ
とによって、同期式シリアルデータ通信機能に従ってシ
リアルデータの通信が行なわれていることが機器A10
1に対して知らされることになる。
FIG. 4 is a timing chart showing waveforms of various communication signals in the above-mentioned synchronous serial data communication. As shown in FIG. 4, the clock S109 is synchronous serial data communication. In this case, the level is configured to be kept at a high level during the period when data communication is not performed. With this configuration, serial data communication is performed according to the synchronous serial data communication function. The device A10
You will be informed about 1.

【0027】上述の様に、機器A101と機器B102
との間での同期式シリアルデータ通信機能に従ったデー
タの送受信が完了すると(図2の204)、前記機器A
101から送信されたコマンドデータは、機器B102
の不図示の受信バッファに一旦蓄えられ、該受信バッフ
ァに一旦蓄えられたコマンドデータは読み出され、ま
ず、通信エラーが発生しているかどうかのチェックが行
なわれる(図2の205)。
As described above, the device A 101 and the device B 102
When the data transmission / reception according to the synchronous serial data communication function with the device A is completed (204 in FIG. 2), the device A
The command data transmitted from the device 101 is the device B 102.
(1) is temporarily stored in a reception buffer (not shown), the command data once stored in the reception buffer is read out, and first, it is checked whether or not a communication error has occurred (205 in FIG. 2).

【0028】すなわち、本実施例ではチェック方法とし
て、送信側においてチェックサム用バイトやCRCコー
ド等を送信するデータに付加して送信し、受信側で受信
されたデータに付加されているチェックサム用バイトや
CRCコードを用いて送信されるデータに誤りが発生し
ているか否かをチェックすることによって、通信エラー
が発生することなく正常にシリアルデータ通信が行なわ
れたかどうかを判断する様に構成しているが、機器A1
01からステータスデータを送信し、機器B102が該
ステータスデータを受信することによって、機器A10
1側で通信エラーが発生しているか否かを検知する様に
構成することもできる。
That is, in the present embodiment, as a check method, a checksum byte added to the data to be transmitted at the transmitting side is added to the data to be transmitted, a CRC code or the like, and the checksum is added to the data received at the receiving side. It is configured to judge whether or not the serial data communication is normally performed without the occurrence of a communication error by checking whether or not an error has occurred in the data transmitted by using the byte or CRC code. There is a device A1
01 to send status data, and the device B 102 receives the status data, whereby the device A 10
It can also be configured to detect whether or not a communication error has occurred on the one side.

【0029】そして、図2の206において、通信エラ
ーが発生していないと判断された場合には、受信された
コマンドデータが示す情報或は指示に応じた処理動作を
行ない、受信されたコマンドデータに応じてデータを送
信する場合には、送信するコマンドデータを送信バッフ
ァにセットし、同期式シリアルデータ通信機能をイネー
ブルにし、前記図2の204の処理動作に戻る(図2の
207、208)。
If it is determined at 206 in FIG. 2 that no communication error has occurred, the received command data is processed according to the information or the instruction indicated by the received command data. When data is to be transmitted in accordance with the above, the command data to be transmitted is set in the transmission buffer, the synchronous serial data communication function is enabled, and the processing operation returns to 204 in FIG. 2 (207 and 208 in FIG. 2). .

【0030】また、図2の206において、通信エラー
が発生していると判断された場合には、マイクロプロセ
ッサ110は制御信号S114により切換スイッチ10
8、109を制御し、非同期式シリアルデータ通信用の
入力端子、出力端子を駆動回路107に接続し、再度送
信するコマンドデータを送信バッファにセットし、クロ
ックS109を通信するための通信回線を通常のI/O
ポートとして使用する様に設定し、該通信回線にローレ
ベルの信号を出力することにより、機器A101に対し
てシリアルデータ通信方式が同期式から非同期式に切り
換えられたことが通知され、非同期式シリアルデータ通
信機能をイネーブルにし、前記図2の204の処理動作
に戻る(図2の209、210)。
When it is determined in 206 of FIG. 2 that a communication error has occurred, the microprocessor 110 receives the control signal S114 and changes the switch 10.
8 and 109 are connected, input terminals and output terminals for asynchronous serial data communication are connected to the drive circuit 107, command data to be retransmitted is set in the transmission buffer, and a communication line for communicating the clock S109 is normally set. I / O
By setting it to be used as a port and outputting a low level signal to the communication line, it is notified to the device A101 that the serial data communication system has been switched from synchronous to asynchronous, and asynchronous serial The data communication function is enabled and the processing returns to the processing operation 204 in FIG. 2 (209 and 210 in FIG. 2).

【0031】そして、上述の処理が行われた以降は、図
2の208において、送信するコマンドデータを送信バ
ッファにセットした後には、非同期式シリアルデータ通
信機能をイネーブルにするように構成されている。
After the above processing is performed, the command data to be transmitted is set in the transmission buffer in 208 of FIG. 2 and then the asynchronous serial data communication function is enabled. .

【0032】図5は上述の非同期式シリアルデータ通信
における各種通信信号の波形を示すタイミングチャート
であり、該図5に示す様に、クロックS109は、非同
期式でシリアルデータ通信が実行されている場合、デー
タの通信を行なっていない期間は、そのレベルがローレ
ベルに保たれる様に構成されており、この様に構成する
ことによって、非同期式シリアルデータ通信機能に従っ
てシリアルデータの通信が行なわれていることが機器A
101に対して知らされることになる。
FIG. 5 is a timing chart showing waveforms of various communication signals in the above-mentioned asynchronous serial data communication. As shown in FIG. 5, the clock S109 is used when asynchronous serial data communication is executed. , The level is configured to be kept at a low level during the period when no data communication is performed. With this configuration, serial data communication is performed according to the asynchronous serial data communication function. Device A
101 will be informed.

【0033】次に、本実施例においてスレーブ装置とし
て機能する機器A101のシリアルデータ通信プロセス
について説明する。
Next, the serial data communication process of the device A101 functioning as a slave device in this embodiment will be described.

【0034】図3に示す様に、スレーブ装置として機能
する機器B102の電源をオン状態とすることによりシ
リアルデータ通信プロセスが開始されると、該機器A1
01はシリアルデータ通信機能に関する各部におけるイ
ニシャライズ動作(初期設定動作)を行なう(図3の3
01)。
As shown in FIG. 3, when the serial data communication process is started by turning on the power of the device B102 functioning as a slave device, the device A1 is started.
Reference numeral 01 performs an initialization operation (initial setting operation) in each unit related to the serial data communication function (3 in FIG. 3).
01).

【0035】次に、マスター装置として機能する機器A
102とシリアルデータ通信を開始するため、マイクロ
プロセッサ103は制御信号S115により切換スイッ
チ104、105を制御し、同期式シリアルデータ通信
用の入力端子、出力端子を駆動回路106に接続し(図
3の302)、機器B102に送信するデータを不図示
の通信バッファにセットし、同期式シリアルデータ通信
をイネーブルにする(図3の303)。
Next, the device A that functions as a master device
In order to start serial data communication with 102, the microprocessor 103 controls the changeover switches 104 and 105 by the control signal S115, and connects the input terminal and output terminal for synchronous serial data communication to the drive circuit 106 (see FIG. 3). 302), the data to be transmitted to the device B102 is set in a communication buffer (not shown), and synchronous serial data communication is enabled (303 in FIG. 3).

【0036】そして、機器B102から送られるクロッ
クS109に同期して前記送信バッファにセットされた
データが読み出され、信号S108として切換スイッチ
105、駆動回路106を介して機器A101に対して
出力される。
Then, the data set in the transmission buffer is read in synchronization with the clock S109 sent from the device B102, and is output as a signal S108 to the device A101 via the changeover switch 105 and the drive circuit 106. .

【0037】尚、機器A101と機器B102との間の
データの送受信のシーケンスについては前述の様に図2
を用いて説明したものと同様であるので説明を省略す
る。
The sequence of data transmission / reception between the device A 101 and the device B 102 is as described above with reference to FIG.
The description is omitted because it is the same as that described using.

【0038】そして、機器A101と機器B102との
間の同期式シリアルデータ通信機能に従ったデータの送
受信が完了すると(図3の304)、前記機器B102
から送信されたコマンドデータは、機器A101の不図
示の受信バッファに一旦蓄えられ、該受信バッファに一
旦蓄えられたコマンドデータは読み出され、まず、通信
エラーが発生しているかどうかのチェックが行なわれる
(図3の305)。
When the data transmission / reception according to the synchronous serial data communication function between the device A101 and the device B102 is completed (304 in FIG. 3), the device B102 is described.
The command data transmitted from the device A101 is temporarily stored in a reception buffer (not shown) of the device A101, the command data once stored in the reception buffer is read out, and first, it is checked whether a communication error has occurred. (305 in FIG. 3).

【0039】尚、通信エラーのチェック方法については
前述の様に図2を用いて説明したものと同様であるので
説明を省略する。
Since the method of checking the communication error is the same as that described with reference to FIG. 2 as described above, the description thereof will be omitted.

【0040】そして、図3の306において、通信エラ
ーが発生していないと判断された場合には、前記図2の
207、208と同様に、受信されたコマンドデータが
示す情報或は指示に応じた処理動作を行ない、次の通信
シーケンスへ移行する(図3の307、308)。
If it is determined at 306 in FIG. 3 that no communication error has occurred, the information or instruction indicated by the received command data is received in the same manner as 207 and 208 in FIG. The processing operation described above is performed, and the next communication sequence is started (307 and 308 in FIG. 3).

【0041】また、図3の306において、通信エラー
が発生していると判断された場合には、機器B102に
通信エラーが発生していることを示すステータスデータ
を送信し、クロック入力端子(図中のCLK)に供給さ
れるクロックS104を所定の期間監視する(図3の3
09、310)。
If it is determined at 306 in FIG. 3 that a communication error has occurred, status data indicating that a communication error has occurred is transmitted to the device B 102, and the clock input terminal (see FIG. The clock S104 supplied to CLK) is monitored for a predetermined period (3 in FIG. 3).
09, 310).

【0042】そして、該クロックS104が示すレベル
がローレベルに落ちなければ、図3の308に移行し、
次に送信するデータや前述と同様にして通信エラーが発
生していることを示すステータスデータを送信バッファ
にセットし、同期式シリアルデータ通信機能をイネーブ
ルにし、前記図3の304の処理動作に戻り、機器B1
02に対して発生した通信エラーが回復していないこと
を通知し、該クロックS104が示すレベルがローレベ
ルに落ちれば、機器B102側でも通信エラーが発生し
ていると判断し、マイクロプロセッサ103は制御信号
S115により切換スイッチ104、105を制御し、
非同期式シリアルデータ通信用の入力端子、出力端子を
駆動回路106に接続し(図3の311)、再度送信す
るデータを送信バッファにセットし、非同期式シリアル
データ通信機能をイネーブルにし、前記図3の304の
処理動作に戻ることにより、以降は、機器A101と機
器B102との間のシリアルデータ通信は非同期式で行
なわれる様になる(図3の312)。
If the level indicated by the clock S104 does not drop to the low level, the process proceeds to 308 in FIG.
Data to be transmitted next and status data indicating that a communication error has occurred in the same manner as described above are set in the transmission buffer, the synchronous serial data communication function is enabled, and the processing operation returns to 304 in FIG. , Equipment B1
02 that the communication error that has occurred is not recovered, and if the level indicated by the clock S104 falls to the low level, it is determined that the communication error has also occurred on the device B 102 side, and the microprocessor 103 determines that the communication error has occurred. The changeover switches 104 and 105 are controlled by the control signal S115,
The input terminal and the output terminal for asynchronous serial data communication are connected to the drive circuit 106 (311 in FIG. 3), the data to be retransmitted is set in the transmission buffer, and the asynchronous serial data communication function is enabled. By returning to the processing operation of 304, the serial data communication between the device A 101 and the device B 102 will be performed asynchronously thereafter (312 in FIG. 3).

【0043】(第2の実施例)次に、本発明の第2の実
施例について説明する。
(Second Embodiment) Next, a second embodiment of the present invention will be described.

【0044】図6は、本発明の第2の実施例としてのデ
ータ通信システムの構成を示すブロック図であり、同図
において前記図1に示した構成と同じ機能を有する構成
については前記図1と同じ符番を付す。
FIG. 6 is a block diagram showing the structure of a data communication system as a second embodiment of the present invention. In FIG. 6, the structure having the same function as the structure shown in FIG. Use the same number as.

【0045】図6において、601、602は本実施例
において使用される夫々機器A101及び機器B102
の通信動作の制御を行なうためのマイクロプロセッサで
あり、該マイクロプロセッサは同期式シリアルデータ通
信用のI/Oポートと非同期式シリアルデータ通信用の
I/Oポートとが同じ端子にアサインされ、当該端子を
マイクロプロセッサ内部のレジスタの設定により同期式
シリアルデータ通信用として使用するか非同期式シリア
ルデータ通信用として使用するかを選択的に切り換えら
れる機能を有している。
In FIG. 6, reference numerals 601 and 602 respectively denote the device A101 and the device B102 used in this embodiment.
For controlling the communication operation of the microprocessor, the microprocessor having an I / O port for synchronous serial data communication and an I / O port for asynchronous serial data communication assigned to the same terminal. It has a function of selectively switching the terminal to be used for synchronous serial data communication or asynchronous serial data communication by setting a register inside the microprocessor.

【0046】また、図6において、S601、S602
はマイクロプロセッサ601のRXD端子とTXD端子
とに夫々接続されている信号線であり、S603、S6
04も同様にマイクロプロセッサ602のTXD端子と
RXD端子とに接続されている信号線であり、また、ク
ロックラインS104は駆動回路106を介してマイク
ロプロセッサ601のクロック入力端子(図中のCL
K)と外部入力割り込み端子(図中のINT)にも接続
されている。
Further, in FIG. 6, S601 and S602
Are signal lines respectively connected to the RXD terminal and the TXD terminal of the microprocessor 601. S603 and S6
Similarly, 04 is a signal line connected to the TXD terminal and the RXD terminal of the microprocessor 602, and the clock line S104 is a clock input terminal (CL in the figure) of the microprocessor 601 via the drive circuit 106.
K) and an external input interrupt terminal (INT in the figure) are also connected.

【0047】以下、第2の実施例における同期式シリア
ルデータ通信と非同期式シリアルデータ通信との切り換
えの動作シーケンスについて、図7に示す動作フローチ
ャートを用いて説明する。
The operation sequence for switching between synchronous serial data communication and asynchronous serial data communication in the second embodiment will be described below with reference to the operation flowchart shown in FIG.

【0048】ところで、第2の実施例において、マスタ
ー装置として機能する機器B102におけるマイクロプ
ロセッサ602の処理動作に関しては、切換スイッチの
制御動作に関する前記図2の202、209に示す処理
動作がマイクロプロセッサ内部のレジスタをの設定によ
りマイクロプロセッサの各端子を同期式シリアルデータ
通信用として使用するか非同期式シリアルデータ通信用
として使用するかを選択的する処理動作に代わる以外
は、前記図2に示し説明した処理動作と同様であるた
め、ここでは説明を省略する。
In the second embodiment, with regard to the processing operation of the microprocessor 602 in the device B102 functioning as the master device, the processing operations 202 and 209 of FIG. 2 has been described with reference to FIG. 2 except that the processing operation for selectively using each terminal of the microprocessor for synchronous serial data communication or asynchronous serial data communication is replaced by setting the register of FIG. Since the processing operation is the same, the description is omitted here.

【0049】また、スレーブ装置として機能する機器A
101におけるマイクロプロセッサ601は、図7に示
す動作フローチャートに従って動作する。
Device A that functions as a slave device
The microprocessor 601 in 101 operates according to the operation flowchart shown in FIG.

【0050】すなわち、図7に示す様に、スレーブ装置
として機能する機器B102の電源をオン状態とするこ
とによりシリアルデータ通信プロセスが開始されると、
該機器A101のマイクロプロセッサ601はシリアル
データ通信機能に関する各部におけるイニシャライズ動
作(初期設定動作)を行なう(図7の701)。
That is, as shown in FIG. 7, when the serial data communication process is started by turning on the power of the device B 102 functioning as a slave device,
The microprocessor 601 of the device A101 performs an initialization operation (initial setting operation) in each unit related to the serial data communication function (701 in FIG. 7).

【0051】次に、マスター装置として機能する機器A
102とシリアルデータ通信を開始するため、マイクロ
プロセッサ601はマイクロプロセッサ内部のレジスタ
を設定することにより、各端子をまず同期式シリアルデ
ータ通信用のI/Oポートに設定し、機器B102に送
信するデータを不図示の通信バッファにセットし、同期
式シリアルデータ通信をイネーブルにし、機器B102
から送られるクロックS104に同期して前記送信バッ
ファにセットされたデータが読み出され、信号線S60
1、駆動回路106を介して機器A101に対して出力
される(図7の702)。
Next, the device A that functions as a master device
In order to start serial data communication with the microprocessor 102, the microprocessor 601 sets registers in the microprocessor so that each terminal is first set to an I / O port for synchronous serial data communication, and data to be transmitted to the device B102. Is set in a communication buffer (not shown), synchronous serial data communication is enabled, and the device B102
The data set in the transmission buffer is read in synchronization with the clock S104 transmitted from the signal line S60.
1, output to the device A 101 via the drive circuit 106 (702 in FIG. 7).

【0052】ところで、本実施例においては、実行して
いる同期式シリアルデータ送信に通信エラーが発生し、
マスター装置として機能する機器B101が実行してい
るシリアルデータ通信を同期式から非同期式に切り換え
ると、該機器B102から送られているクロックS10
9が示すレベルは、ハイレベルからローレベルに落ちる
ことにより、クロックラインS104を介して外部入力
割り込み端子INTに供給される信号が立ち下がること
によって、マイクロプロセッサ601は外部入力による
割り込み動作に移行する様に設定されている。
By the way, in this embodiment, a communication error occurs in the synchronous serial data transmission being executed,
When the serial data communication executed by the device B101 functioning as the master device is switched from the synchronous type to the asynchronous type, the clock S10 transmitted from the device B102 is changed.
The level indicated by 9 falls from the high level to the low level, and the signal supplied to the external input interrupt terminal INT via the clock line S104 falls, whereby the microprocessor 601 shifts to the interrupt operation by the external input. Is set.

【0053】図7の704〜707は、マイクロプロセ
ッサ601の外部入力の割り込み動作ルーチンを示す動
作フローチャートで、マイクロプロセッサ601はクロ
ックラインS104を介して外部入力割り込み端子IN
Tに供給される信号がハイレベルからローレベルに落ち
ることによって、外部入力の割り込み動作に移行すると
(図7の704)、まず、シリアルデータ通信の方式を
管理するためにマイクロプロセッサ内部に設定される非
同期式通信フラグをオン状態にし(図7の705)、再
度送信するデータを送信バッファにセットし、非同期式
シリアルデータ通信機能をイネーブルにした後(図7の
706)、外部入力の割り込み動作ルーチンから元の動
作ルーチンに復帰する(図7の707)ものである。
Reference numerals 704 to 707 in FIG. 7 are operation flowcharts showing an external input interrupt operation routine of the microprocessor 601. The microprocessor 601 receives the external input interrupt terminal IN via the clock line S104.
When the signal supplied to T falls from the high level to the low level to shift to the interrupt operation of the external input (704 in FIG. 7), first, it is set inside the microprocessor to manage the serial data communication method. After the asynchronous communication flag is turned on (705 in FIG. 7), the data to be retransmitted is set in the transmission buffer, and the asynchronous serial data communication function is enabled (706 in FIG. 7), the interrupt operation of the external input is performed. The routine returns to the original operation routine (707 in FIG. 7).

【0054】そして、本実施例では、マイクロプロセッ
サ601がシリアルデータ通信の実行中に外部入力の割
り込み動作に移行するのを防止するため、シリアルデー
タ通信が実行されたら外部入力の割り込み動作への移行
を禁止し(図7の703)、シリアルデータ通信が完了
したら(図7の708)、外部入力の割り込み動作への
移行を許可する処理動作を行なう(図7の709)様に
構成し、マイクロプロセッサ601がシリアルデータ通
信を行なっている期間中には、外部入力の割り込み動作
に移行しないようにしている。
In this embodiment, in order to prevent the microprocessor 601 from shifting to the external input interrupt operation during execution of the serial data communication, the transition to the external input interrupt operation is performed when the serial data communication is performed. Is prohibited (703 in FIG. 7), and when the serial data communication is completed (708 in FIG. 7), the processing operation for permitting the transition to the interrupt operation of the external input is performed (709 in FIG. 7). During the period in which the processor 601 is performing serial data communication, the transition to the external input interrupt operation is prevented.

【0055】尚、機器A101と機器B102との間の
データの送受信のシーケンスについては前述の様に図2
を用いて説明したものと同様であるので説明を省略す
る。
The sequence of data transmission / reception between the device A 101 and the device B 102 is as described above with reference to FIG.
The description is omitted because it is the same as that described using.

【0056】そして、機器A101と機器B102との
間の同期式シリアルデータ通信機能に従ったデータの送
受信が完了し、外部入力の割り込み動作への移行が許可
されると、前記機器B102から送信されたコマンドデ
ータは、機器A101の不図示の受信バッファに一旦蓄
えられ、該受信バッファに一旦蓄えられたコマンドデー
タは読み出され、まず、通信エラーが発生しているかど
うかのチェックが行なわれる(図7の710)。
When the transmission / reception of data according to the synchronous serial data communication function between the device A101 and the device B102 is completed and the transition to the interrupt operation of the external input is permitted, the data is transmitted from the device B102. Command data once stored in a reception buffer (not shown) of the device A101, the command data once stored in the reception buffer is read out, and first, it is checked whether a communication error has occurred (Fig. 7 of 710).

【0057】尚、通信エラーのチェック方法については
前述の様に図2を用いて説明したものと同様であるので
説明を省略する。
Since the method of checking the communication error is the same as that described with reference to FIG. 2 as described above, the description thereof will be omitted.

【0058】そして、図7の711において、通信エラ
ーが発生していないと判断された場合には、前述の外部
入力の割り込み動作ルーチンにより、マイクロプロセッ
サ内部に設定される非同期式通信フラグがオン状態かど
うかを判別し、オン状態である場合には、シリアルデー
タ通信が同期式から非同期式に切り換えられているの
で、図7の708の処理動作に戻り、以降は、機器A1
01と機器B102との間のシリアルデータ通信は非同
期式で行なわれ、オン状態でない場合には、受信された
コマンドデータが示す情報或は指示に応じた処理動作を
行なう(図7の712、713)。
If it is determined at 711 in FIG. 7 that no communication error has occurred, the asynchronous communication flag set inside the microprocessor is turned on by the above-described external input interrupt operation routine. If it is in the ON state, the serial data communication is switched from the synchronous type to the asynchronous type, and therefore the processing operation returns to 708 in FIG.
01 and the device B102 are asynchronously performed, and when not in the ON state, the processing operation according to the information or the instruction indicated by the received command data is performed (712 and 713 in FIG. 7). ).

【0059】また、図7の711において、通信エラー
が発生していると判断された場合には、機器B102に
通信エラーが発生していることを示すステータスデータ
を送信する(図7の715)。
If it is determined in 711 of FIG. 7 that a communication error has occurred, status data indicating that a communication error has occurred is transmitted to the device B 102 (715 of FIG. 7). .

【0060】そして、図7の714において、次に送信
するデータや前述と同様にして通信エラーが発生してい
ることを示すステータスデータを送信バッファにセット
し、前記図7の708の処理動作に戻り、機器B102
に対して発生した通信エラーが回復していないことを通
知し、該クロックラインS104を介してマイクロプロ
セッサ601の外部入力割り込み端子INTに供給され
ている信号が示すレベルがローレベルに落ちれば、機器
B102側でも通信エラーが発生していると判断したも
のとみなし、マイクロプロセッサ601は前述の外部入
力の割り込み動作ルーチンに移行すると共に、各端子を
非同期式シリアルデータ通信用のI/Oポートに設定
し、再度送信するデータを送信バッファにセットし、非
同期式シリアルデータ通信機能をイネーブルにし、前記
図7の708の処理動作に戻ることにより、以降は、機
器A101と機器B102との間のシリアルデータ通信
は非同期式で行なわれる様になる。
Then, in 714 of FIG. 7, data to be transmitted next and status data indicating that a communication error has occurred are set in the transmission buffer in the same manner as described above, and the processing operation of 708 of FIG. 7 is performed. Return, device B102
To the external input interrupt terminal INT of the microprocessor 601 via the clock line S104, and if the level indicated by the signal drops to the low level, the device is notified. It is considered that the communication error has occurred on the B102 side as well, and the microprocessor 601 shifts to the above-mentioned external input interrupt operation routine and sets each terminal to the I / O port for asynchronous serial data communication. Then, the data to be transmitted again is set in the transmission buffer, the asynchronous serial data communication function is enabled, and the process returns to the processing operation of 708 of FIG. Communication will be performed asynchronously.

【0061】以上説明したように、本実施例において
は、通常は機器間のシリアルデータ通信は同期式で行な
い、通信エラーが発生した場合にはクロックラインをネ
ゲートすることによって、通信の相手となる機器にシリ
アルデータ通信の方式を非同期式に切り換えるように通
知する様に構成したことによって、通信の相手となる機
器はクロックラインを介して供給される信号を監視する
ことで、相互の機器において自動的に通信方式を同期式
から非同期式に切り換えてシリアルデータ通信を行なう
ことができ、夫々の機器自身において実行しているシリ
アルデータ通信に通信エラーが発生したか否かを判断
し、通信エラーが発生していないと判断された場合に
は、機器間の接続ケーブルが短いため通信エラーが発生
しなかったとして高速なシリアルデータ通信が行なえる
同期式にてシリアルデータ通信を行ない、通信エラーが
発生していると判断された場合には、機器間の接続ケー
ブルが長いため通信エラーが発生したとして低いエラー
率にてシリアルデータ通信が行なえる非同期式にてシリ
アルデータ通信を行なうようにしたので、該機器の操作
者が複雑な操作を行なうことなく、機器自身が機器間の
接続ケーブルの長さに係らず最適な通信方式にてシリア
ルデータ通信を行なうことができる。
As described above, in the present embodiment, serial data communication between devices is normally performed synchronously, and when a communication error occurs, the clock line is negated to become a communication partner. By configuring the device to notify the device to switch the serial data communication method to asynchronous, the device to be communicated with can monitor the signal supplied via the clock line and automatically communicate with each other. The communication method can be switched from synchronous to asynchronous, and serial data communication can be performed, and it is judged whether or not a communication error has occurred in the serial data communication being executed by each device itself, and the communication error is detected. If it is determined that the error has not occurred, it is considered that no communication error has occurred because the connection cable between the devices is short and high-speed When serial data communication is performed by a synchronous method that can perform real data communication and it is determined that a communication error has occurred, it is considered that a communication error has occurred because the connection cable between the devices is long and the error rate is low Since the serial data communication is performed asynchronously so that the serial data communication can be performed, the operator of the device does not have to perform complicated operations, and the device itself is optimal regardless of the length of the connection cable between the devices. Serial data communication can be performed by the communication method.

【0062】また、本実施例では、クロックラインを介
して供給される信号を同期式と非同期式とのシリアルデ
ータ通信方式の切り換え信号として利用するよう構成し
たため、信号線の本数を増やすことなく、シリアルデー
タ通信方式の切り換えを行なうことができるという効果
もある。
Further, in this embodiment, the signal supplied through the clock line is used as the switching signal for the synchronous and asynchronous serial data communication systems, so that the number of signal lines is not increased. There is also an effect that the serial data communication system can be switched.

【0063】[0063]

【発明の効果】以上説明した様に、本発明によれば、複
雑な操作を必要とせず、機器同士を接続する接続ケーブ
ルの長さに係らず、通信回線上でのエラーの発生率を抑
え、安定したデータの通信を行なうことができるデータ
通信システムを提供することができる様になる。
As described above, according to the present invention, no complicated operation is required, and the occurrence rate of errors on the communication line is suppressed regardless of the length of the connecting cable connecting the devices. Thus, it becomes possible to provide a data communication system capable of performing stable data communication.

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

【図1】本発明の第1の実施例としてのデータ通信シス
テムの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a data communication system as a first embodiment of the present invention.

【図2】本発明の第1の実施例のマスター装置としての
機器のシリアルデータ通信プロセスを示す動作フローチ
ャートである。
FIG. 2 is an operation flowchart showing a serial data communication process of a device as a master device according to the first embodiment of the present invention.

【図3】本発明の第1の実施例のスレーブ装置としての
機器のシリアルデータ通信プロセスを示す動作フローチ
ャートである。
FIG. 3 is an operation flowchart showing a serial data communication process of a device as a slave device according to the first embodiment of the present invention.

【図4】本発明の同期式シリアルデータ通信における各
種通信信号の波形を示すタイミングチャートである。
FIG. 4 is a timing chart showing waveforms of various communication signals in the synchronous serial data communication of the present invention.

【図5】本発明の非同期式シリアルデータ通信における
各種通信信号の波形を示すタイミングチャートである。
FIG. 5 is a timing chart showing waveforms of various communication signals in asynchronous serial data communication according to the present invention.

【図6】本発明の第2の実施例としてのデータ通信シス
テムの構成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a data communication system as a second exemplary embodiment of the present invention.

【図7】本発明の第2の実施例のスレーブ装置としての
機器のシリアルデータ通信プロセスを示す動作フローチ
ャートである。
FIG. 7 is an operation flowchart showing a serial data communication process of a device as a slave device according to the second embodiment of the present invention.

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

101、102 機器 103、110 マイクロプロセッサ 104、105、108、109 切換スイッチ 106、107 駆動回路 S101、S104 クロックライン S102 TXDライン S103 RXDライン S105、S112 非同期式シリアルデータ入力ライ
ン S106、S113 同期式シリアルデータ入力ライン S107、S110 非同期式シリアルデータ出力ライ
ン S108、S111 同期式シリアルデータ出力ライン
101, 102 Equipment 103, 110 Microprocessor 104, 105, 108, 109 Changeover switch 106, 107 Driving circuit S101, S104 Clock line S102 TXD line S103 RXD line S105, S112 Asynchronous serial data input line S106, S113 Synchronous serial data Input line S107, S110 Asynchronous serial data output line S108, S111 Synchronous serial data output line

フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H04Q 9/14 K Continuation of the front page (51) Int.Cl. 6 Identification code Office reference number FI Technical display area H04Q 9/14 K

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 データを送信或は受信すると共に、シス
テム全体の動作を制御するためのマスター装置と、 夫々がデータを送信或は受信するためのスレーブ装置
と、 前記マスター装置とスレーブ装置との間で、データの通
信を行なうためのデータ通信回線とを備えるシステムに
おいて、 前記マスター装置とスレーブ装置との間で、データの通
信を行なっている期間中に前記データ通信回線上におい
て通信エラーが発生したことを検出するための検知手段
と、 前記検知手段における検出結果に従って、前記マスター
装置とスレーブ装置との間で行なうデータの通信方式を
第1の通信方式と前記第1の通信方式とは異なる第2の
通信方式の内の何れかを設定し、設定された通信方式に
従ってデータの通信を行なう様に制御する制御手段とを
有することを特徴とするデータ通信システム。
1. A master device for transmitting or receiving data and controlling the operation of the entire system, a slave device for transmitting or receiving data, and a master device and a slave device. In a system including a data communication line for performing data communication between the master device and the slave device, a communication error occurs on the data communication line during the data communication period between the master device and the slave device. The first communication method and the first communication method differ from each other in the data communication method performed between the master device and the slave device according to the detection result of the detection unit and the detection result of the detection unit. And a control means for setting any one of the second communication methods and controlling to perform data communication according to the set communication method. Data communication system, characterized in that.
【請求項2】 前記データ通信回線は同期クロックを送
信するための信号線を含み、前記第1の通信方式に従っ
てデータの通信を行なう場合と前記第2の通信方式に従
ってデータの通信を行なう場合とで前記信号線を介して
送信する信号の状態を異ならしめることを特徴とする請
求項1記載のデータ通信システム。
2. The data communication line includes a signal line for transmitting a synchronous clock, and performs data communication according to the first communication method and data communication according to the second communication method. 2. The data communication system according to claim 1, wherein the states of signals transmitted via the signal line are made different.
【請求項3】 前記データ通信はシリアルデータ通信で
あることを特徴とする請求項1記載のデータ通信システ
ム。
3. The data communication system according to claim 1, wherein the data communication is serial data communication.
【請求項4】 前記マスター装置或はスレーブ装置は、
夫々データの通信を実行するマイクロプロセッサを有す
ることを特徴とする請求項1記載のデータ通信システ
ム。
4. The master device or the slave device,
The data communication system according to claim 1, further comprising a microprocessor that executes data communication.
【請求項5】 前記マスター装置或はスレーブ装置は、
夫々データの通信を実行するデータ通信用インターフェ
イスを有することを特徴とする請求項1記載のデータ通
信システム。
5. The master device or the slave device,
The data communication system according to claim 1, further comprising a data communication interface that executes data communication.
【請求項6】 前記マスター装置はパーソナルコンピュ
ータを含むことを特徴とする請求項1記載のデータ通信
システム。
6. The data communication system according to claim 1, wherein the master device includes a personal computer.
【請求項7】 前記スレーブ装置はパーソナルコンピュ
ータに接続されることにより作動する周辺機器を含むこ
とを特徴とする請求項1記載のデータ通信システム。
7. The data communication system according to claim 1, wherein the slave device includes a peripheral device that operates by being connected to a personal computer.
【請求項8】 前記第1の通信方式は同期式のデータ通
信方式であり、前記第2の通信方式は非同期式のデータ
通信方式であることを特徴とする請求項1記載のデータ
通信システム。
8. The data communication system according to claim 1, wherein the first communication system is a synchronous data communication system, and the second communication system is an asynchronous data communication system.
【請求項9】 前記制御手段は、前記検知手段において
前記マスター装置とスレーブ装置との間で、データの通
信を行なっている期間中に前記データ通信回線上におい
て通信エラーが発生していないことが検出された場合に
は、前記マスター装置とスレーブ装置との間で行なうデ
ータの通信方式として前記第1の通信方式を設定し、通
信エラーが発生していることが検出された場合には、前
記マスター装置とスレーブ装置との間で行なうデータの
通信方式として前記第2の通信方式を設定し、設定され
た通信方式に従ってデータの通信を行なう様に制御する
ことを特徴とする請求項8記載のデータ通信システム。
9. The control unit may not have a communication error on the data communication line during a period of data communication between the master unit and the slave unit in the detecting unit. If detected, the first communication method is set as the data communication method performed between the master device and the slave device, and if it is detected that a communication error has occurred, then 9. The method according to claim 8, wherein the second communication method is set as a data communication method between the master device and the slave device, and the data communication is controlled according to the set communication method. Data communication system.
【請求項10】 前記データ通信回線は同期クロックを
送信するための信号線を含み、前記第1の通信方式に従
ってデータの通信を行なう場合と前記第2の通信方式に
従ってデータの通信を行なう場合とで前記信号線を介し
て送信する信号のレベルを異ならしめることを特徴とす
る請求項1記載のデータ通信システム。
10. The data communication line includes a signal line for transmitting a synchronous clock, and performs data communication according to the first communication method and data communication according to the second communication method. 2. The data communication system according to claim 1, wherein the level of the signal transmitted via the signal line is made different.
【請求項11】 前記検出手段は、前記マスター装置と
スレーブ装置との間で通信されるデータに含まれている
データ誤り検出用のデータを用いて、前記データ通信回
線上において通信エラーが発生したことを検出すること
を特徴とする請求項1記載のデータ通信システム。
11. The detection means uses a data error detection data included in the data communicated between the master device and the slave device, and a communication error has occurred on the data communication line. The data communication system according to claim 1, wherein the data communication system detects the fact.
JP7002001A 1995-01-10 1995-01-10 Data communication system Withdrawn JPH08191319A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7002001A JPH08191319A (en) 1995-01-10 1995-01-10 Data communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7002001A JPH08191319A (en) 1995-01-10 1995-01-10 Data communication system

Publications (1)

Publication Number Publication Date
JPH08191319A true JPH08191319A (en) 1996-07-23

Family

ID=11517194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7002001A Withdrawn JPH08191319A (en) 1995-01-10 1995-01-10 Data communication system

Country Status (1)

Country Link
JP (1) JPH08191319A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011257544A (en) * 2010-06-08 2011-12-22 Canon Inc Imaging device and interchangeable lens
GB2554163A (en) * 2016-07-25 2018-03-28 Canon Kk Image-capturing apparatus, accessory apparatus and control method therefor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011257544A (en) * 2010-06-08 2011-12-22 Canon Inc Imaging device and interchangeable lens
GB2554163A (en) * 2016-07-25 2018-03-28 Canon Kk Image-capturing apparatus, accessory apparatus and control method therefor
US10070037B2 (en) 2016-07-25 2018-09-04 Canon Kabushiki Kaisha Image-capturing apparatus, accessory apparatus and control method therefor
US10750078B2 (en) 2016-07-25 2020-08-18 Canon Kabushiki Kaisha Image-capturing apparatus, accessory apparatus, and control method therefor with changing signal level of communication channel from one level to another
GB2554163B (en) * 2016-07-25 2021-04-14 Canon Kk Image-capturing apparatus, accessory apparatus and control method therefor

Similar Documents

Publication Publication Date Title
JP2510221B2 (en) Network node address setting method
JPH08191319A (en) Data communication system
US5230043A (en) Arrangement for diagnosing the cause of communication interruption between two cpus
JP3204301B2 (en) Control method between pointing device and computer
JP3049955B2 (en) Switching control method
KR100342004B1 (en) Bus controller and bus control system
JP2000151748A (en) Device connection recognition method for communication system
JPS61270952A (en) Data transmitting system
US5937180A (en) Method and apparatus relating to a telecommunications system
JP3160927B2 (en) Loop test circuit
JP2733283B2 (en) Serial transmission control device
JPS62171349A (en) Communication control equipment
KR950010850B1 (en) Apparatus for transmitting remote control signals
JP2550273Y2 (en) Communication device
CN115562912A (en) Data redundancy monitoring method
KR100247200B1 (en) Automatic converting method of communication mode of telecommunication system
JPH1174893A (en) Data communication equipment and its communication method
JPH10154971A (en) Multiplex communication equipment
JP2001325216A (en) Communication system switching device and communication system switching method
JPH106615A (en) Printing apparatus
JPH05113838A (en) Connection device
JPH04329378A (en) Automatic test system for power source control device
JPH11177654A (en) Data transmission reception method
KR940012983A (en) Automatic selection circuit and method of external device of system
JPH03251903A (en) Interface module for programmable controller

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020402