[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JPH03247045A - Serial communication equipment - Google Patents

Serial communication equipment

Info

Publication number
JPH03247045A
JPH03247045A JP2043797A JP4379790A JPH03247045A JP H03247045 A JPH03247045 A JP H03247045A JP 2043797 A JP2043797 A JP 2043797A JP 4379790 A JP4379790 A JP 4379790A JP H03247045 A JPH03247045 A JP H03247045A
Authority
JP
Japan
Prior art keywords
data
circuit
transmission
reception
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2043797A
Other languages
Japanese (ja)
Inventor
Yukihide Ushio
行秀 牛尾
Akio Noguchi
野口 秋生
Yoji Serizawa
洋司 芹澤
Kazuro Yamada
和朗 山田
Masaji Uchiyama
正次 内山
Makoto Takeuchi
誠 竹内
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 JP2043797A priority Critical patent/JPH03247045A/en
Priority to US07/658,391 priority patent/US5325376A/en
Priority to EP91102567A priority patent/EP0443589B1/en
Priority to DE69131360T priority patent/DE69131360T2/en
Publication of JPH03247045A publication Critical patent/JPH03247045A/en
Priority to HK98113118A priority patent/HK1012152A1/en
Pending legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

PURPOSE:To make the transfer comparatively high in speed and to prevent an external interference data from being processed in mistake into a data by providing a means inhibiting data reception during transmission and a means inhibiting new data reception for a prescribed period after the reception data is once received. CONSTITUTION:The equipment is provided with a 1st reception inhibit means inhibiting data reception during data transmission and a 2nd reception inhibit means inhibiting start of new data reception for a prescribed period after the reception data is once received. Moreover, a transmission start means permitting data reception after lapse of a prescribed period in the case of employment at a master side and starting the succeeding data transmission when no new data is received for the prescribed period is provided further to the equipment. Then the collision in 2-way transfer is prevented to avoid mis-transmission and high speed transmission is attained and an external disturbance data is prevented from being processed in mistake into a data.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は装置内外に分散したユニット群とそれを統括す
る主制御部との間で情報を伝送するシリアル通信装置、
特に光を利用した無線による光通信装置(以降ワイヤレ
ス光通信装置と略す)に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a serial communication device that transmits information between a group of units dispersed inside and outside the device and a main control unit that controls them;
In particular, it relates to a wireless optical communication device using light (hereinafter abbreviated as a wireless optical communication device).

[従来の技術] 従来、例えば、複写機、FAX、レーザビームプリンタ
(以降LBPと略す)等は、モータ。
[Prior Art] Conventionally, for example, copying machines, FAX machines, laser beam printers (hereinafter abbreviated as LBP), etc., use motors.

ファン、ソレノイド等のアクチュエータ類からなる出力
制御部とスイッチ、センサ類からなる入力制御部とによ
って構成されている。この場合、入出力制御部は主にC
PUの110ボートを介してそれぞれが制御されている
。これらの人出力制御の対象物は前記装置内に分散配置
されており、ワイヤハーネスにて接続されていた。
It consists of an output control section consisting of actuators such as fans and solenoids, and an input control section consisting of switches and sensors. In this case, the input/output control section is mainly C
Each is controlled via 110 ports of PU. These objects to be controlled by human output are distributed within the device and connected by wire harnesses.

又、これら入出力制御の対象物は主制御部に対してそれ
ぞれ独立(以降パラレル接続と略す)に接続されるか、
或いは、シリアル通信を利用して主制御部からシリアル
に転送を行ない、各ユニット部で”シリアル−パラレル
変換”をおこなった後それぞれの対象物に独立に接続さ
れていた。しかし、いずれの場合も電線を利用した接続
で構成されていて、光を用いた無線による情報の伝達は
行われていなかった。
Also, are these input/output control objects connected to the main control unit independently (hereinafter abbreviated as parallel connection)?
Alternatively, data is transferred serially from the main control section using serial communication, and after "serial-to-parallel conversion" is performed in each unit, it is independently connected to each target object. However, in both cases, connections were made using electric wires, and information was not transmitted wirelessly using light.

一方、家電製品においては、いわゆるリモコンという光
を用いた無線による情報の伝達は行なわれているものの
、実現しているのは単向方式(送信専用装置から受信専
用装置へ一方向に送信するだけ)によるものであった。
On the other hand, in home appliances, information is transmitted wirelessly using so-called remote controls using light, but only a unidirectional method (transmission in one direction from a transmitting-only device to a receiving-only device) is used. ).

[発明が解決しようとしている課題] しかしながら、機器の多機能化に伴い入出力制御の対象
物が増えてパラレル接続するには制御線も増大するため
、上記従来例ではコストが上昇し、また組立の効率も悪
くなってしまうという欠点がある。更に、例えばUAR
T等のシリアル通信を利用して主制御部からシリアル転
送を行って制御線の数を減らす方法においても、機器内
に発生するノイズ等による誤転送のため誤動作を起こし
たり、シリアル転送の高速化に伴い制御線が放射ノイズ
としての電界を発する原因になったり等様々な欠点があ
る。
[Problems to be solved by the invention] However, as devices become more multi-functional, the number of objects to be input/output controlled increases, and the number of control lines increases for parallel connection. The disadvantage is that the efficiency of the method also decreases. Furthermore, for example, UAR
Even with the method of reducing the number of control lines by performing serial transfer from the main control unit using serial communication such as T, it may cause malfunctions due to erroneous transfer due to noise generated within the device, or it may be difficult to increase the speed of serial transfer. Along with this, there are various drawbacks such as the control line causing an electric field to be emitted as radiated noise.

一方、家電製品におけるいわゆるリモコンのような光を
用いて無線による情報の伝達は、単向方式である上に伝
送速度が秒単位に近いため、例えば複写機、FAX、L
BP等の入出力信号の伝達速度には間に合わないという
欠点や、双方向による情報伝達が出来ないという欠点も
あり、そのままでは利用出来ない。更に、光による転送
を比較的高速にかつ双方向で転送すると、各々の光の衝
突あるいは外乱光による誤伝達等の問題が生じたり、ま
た転送先の通信装置の有無が機器の主制御部レベルでは
判断出来ない等という欠点がある。また更に、機器の組
立時における調整やチエツクが煩雑で効率が悪いという
欠点もある。
On the other hand, wireless information transmission using light, such as in so-called remote controls for home appliances, is a unidirectional method and the transmission speed is close to the second, so for example, copying machines, fax machines,
It cannot be used as is because it cannot keep up with the transmission speed of input/output signals such as BP, and it cannot transmit information in both directions. Furthermore, if optical transmission is performed at a relatively high speed and in both directions, problems such as collision of each light beam or erroneous transmission due to disturbance light may occur, and the presence or absence of the destination communication device may be determined at the main control unit level of the device. It has the disadvantage that it cannot be determined. Furthermore, there is also the disadvantage that adjustments and checks during assembly of the equipment are complicated and inefficient.

本発明は、前記従来の欠点を除去し、双方向転送での衝
突を防ぎ誤伝達をなくし高速な伝送が可能なシリアル通
信装置を提供する。
The present invention provides a serial communication device that eliminates the above-mentioned conventional drawbacks, prevents collisions in bidirectional transfer, eliminates erroneous transmission, and enables high-speed transmission.

特に光通信において、双方向で転送すると発生する各々
の光の衝突や外乱光による誤伝達等の問題を解決し、外
乱データのデータ化を防ぐようにする。
Particularly in optical communication, problems such as collision of respective lights and mistransmission due to disturbance light that occur when transferring data in both directions are solved, and disturbance data is prevented from being converted into data.

[課題を解決するための手段] この課題を解決するために、本発明のシリアル通信装置
は、分散した出力信号や人力信号を物理的・機能的に複
数のブロック単位にまとめたユニット群と該ユニット群
を総括制御する主制御部とを有する装置で、前記主制御
部と前記ユニット群との間で情報をシリアルに伝達する
シリアル通信装置であって、 データ送信中にデータ受信を禁止する第1の受信禁止手
段と、−旦受信データを受信した後の所定期間、新たな
データ受信の開始を禁止する第2の受信禁止手段とを備
える。
[Means for Solving the Problem] In order to solve this problem, the serial communication device of the present invention combines a group of units that physically and functionally organize distributed output signals and human input signals into a plurality of blocks. A device that has a main control section that collectively controls a group of units, and a serial communication device that serially transmits information between the main control section and the group of units, and a serial communication device that prohibits data reception during data transmission. and a second reception prohibition means that prohibits the start of new data reception for a predetermined period after receiving the first received data.

ここで、マスター側で使用される場合に、前記所定期間
経過後にデータ受信を許可し、更に所定期間新たなデー
タ受信が無い場合に、次のデータ送信を開始する送信開
始手段を更に備える。
Here, when used on the master side, the apparatus further includes a transmission start means for permitting data reception after the predetermined period has elapsed, and for starting the next data transmission if no new data has been received for a predetermined period.

又、電気信号と光信号との変換を行う光電変換手段を更
に備え、情報のシリアル伝達は光による光通信で行われ
る。
The device further includes a photoelectric conversion means for converting an electric signal to an optical signal, and serial transmission of information is performed by optical communication using light.

[作用] かかる構成において、受信の可不可を制御することによ
り、転送を比較的高速にし、かつ双方向転送での衝突等
の誤伝達等の問題を解決し、外乱データのデータ化を防
ぐようにする。
[Function] In such a configuration, by controlling whether or not reception is possible, transfer is made relatively high speed, problems such as miscommunication such as collisions in bidirectional transfer are solved, and disturbance data is prevented from being converted into data. Make it.

以下余白− [実施例] 以下、添付図面を参照して、本発明の詳細な説明する。Margin below - [Example] Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

く本実施例のシリアル通信装置〉 第1図は本実施例のシリアル通信装置のブロック図であ
る。
Serial Communication Device of this Embodiment> FIG. 1 is a block diagram of a serial communication device of this embodiment.

1は本システムを駆動するシステムクロックを坏分周し
て出力する為の坏分周回路、2は多段分周回路である。
Reference numeral 1 designates a frequency divider circuit that divides and outputs the system clock that drives this system, and 2 a multistage frequency divider circuit.

3は本システムのタイミングを多段分周回路2から入力
されるクロックの計数をもとに、所望タイミング信号を
出力する為のタイミング発生回路である。4は受信した
シリアルデータと同期を取る為の同期取り回路で、5は
前記4の同期取り回路によって得たタイミングで多段分
周回路2を再起動する為の分周制御回路である。6は受
信した変調データを2値データに復調する為の復調変換
回路であり、7は復調変換回路6での復調時に、変換に
よるあるいはノイズによるエラーを検出するエラー検出
回路である。
Reference numeral 3 denotes a timing generation circuit for outputting a desired timing signal based on the clock count inputted from the multi-stage frequency divider circuit 2. 4 is a synchronization circuit for synchronizing with the received serial data, and 5 is a frequency division control circuit for restarting the multistage frequency divider circuit 2 at the timing obtained by the synchronization circuit 4. 6 is a demodulation/conversion circuit for demodulating the received modulated data into binary data, and 7 is an error detection circuit for detecting errors due to conversion or noise during demodulation in the demodulation/conversion circuit 6.

8は本シリアル通信装置の属性を示すID番号を入力す
るIDデータ入力回路であり、9は本シリアル通信装置
の送信データを入力するデータ入力回路である。10は
本シリアル通信装置の受信データを出力するデータ出力
回路である。
8 is an ID data input circuit for inputting an ID number indicating the attribute of the present serial communication device, and 9 is a data input circuit for inputting transmission data of the present serial communication device. 10 is a data output circuit that outputs the received data of this serial communication device.

11及び12はIDデータ入力回路8で得たIDデータ
を正論理データと負論理データに分け、送信用データに
する正論理IDデータ出力回路と負論理IDデータ出力
回路である。13及び14はデータ入力回路9で得た送
信データを正論理データと負論理データに分け、送信用
データにする正論理データ出力回路と負論理データ出力
回路である。15は本シリアル通信装置が送信する送信
データの2値レベルのデータを作成し、送信タイミング
に応じて8ビツトシフトレジスタ16に出力するデータ
エンコード回路である。
Reference numerals 11 and 12 denote a positive logic ID data output circuit and a negative logic ID data output circuit that divide the ID data obtained by the ID data input circuit 8 into positive logic data and negative logic data and convert them into data for transmission. Reference numerals 13 and 14 denote a positive logic data output circuit and a negative logic data output circuit that divide the transmission data obtained by the data input circuit 9 into positive logic data and negative logic data and convert them into data for transmission. Reference numeral 15 denotes a data encode circuit that creates binary level data of the transmission data to be transmitted by the serial communication device and outputs it to the 8-bit shift register 16 in accordance with the transmission timing.

16は同期取り回路4及び復調変換回路6によって復調
した2値レベルの受信データを入力してシフトラッチし
たり、データデコード回路15から出力された送信デー
タをシフト出力する為の8ビツトシフトレジスタである
。17.18及び19は8ビツトシフトレジスタ16が
シフト入力した2値レベルのデータをのタイミング発生
回路3から発するタイミングでラッチするシフトデータ
ラッチ回路で、本実施例では1フレームの受信に対して
3回うッチ動作をする為に3つの回路がある。20はシ
フトデークラッチ回路17゜18及び19でラッチされ
たデータを所定の条件で比較すると共に必要データを選
択する比較選択回路であり、受信データの真偽を判断す
る。
16 is an 8-bit shift register for inputting and shift-latching the binary level reception data demodulated by the synchronization circuit 4 and the demodulation conversion circuit 6, and for shifting and outputting the transmission data output from the data decoding circuit 15. be. 17, 18 and 19 are shift data latch circuits that latch the binary level data shifted and inputted by the 8-bit shift register 16 at the timing generated from the timing generation circuit 3. In this embodiment, 3 shift data latch circuits are used for receiving one frame. There are three circuits to perform the turning operation. Reference numeral 20 denotes a comparison and selection circuit which compares the data latched by the shift day clutch circuits 17, 18 and 19 under predetermined conditions and selects necessary data, and determines whether the received data is true or false.

21は8ビツトシフトレジスタ16から出力される2値
レベルの送信データに、所定の条件での変調を付加する
変調変換回路で、復調変換回路6の逆変換を行なうもの
であり、このデータがシリアル送信データとなる。22
はANDゲートで、比較選択回路20での比較結果によ
ってデータ出力回路10にデータを入力させるラッチ信
号を指示するか否かを制御する。
21 is a modulation conversion circuit that adds modulation under predetermined conditions to the binary level transmission data output from the 8-bit shift register 16, and performs inverse conversion of the demodulation conversion circuit 6, and this data is serially This becomes the transmission data. 22
is an AND gate, which controls whether or not to instruct a latch signal for inputting data to the data output circuit 10, depending on the comparison result of the comparison and selection circuit 20.

尚、本実施例では説明を容易にする為に回路構成を8ビ
ット単位で構成しているが、特に8ビツト構成である必
要は無く16ビツト、32ビツト等でもよく特に限定は
されない。
In this embodiment, the circuit configuration is constructed in 8-bit units for ease of explanation, but it is not particularly necessary to have an 8-bit configuration and may be 16 bits, 32 bits, etc. without any particular limitation.

以下、第1図のシリアル通信装置の動作を説明する。本
システムの為のシステムクロックは、坏分周回路1に入
りクロックのデイ−ティ比を50%に整え、同期取り回
路4及び分周制御回路5の動作クロックとして使用され
る。一方、多段分周回路2にも入力され、本実施例の場
合“2+1”の分周で、タイミング発生回路3に各段を
出力し、後述する任意のタイミングを発生させる。尚、
前記1,2.3,4.5で示す回路の内部構造は、本発
明において特に特徴とするもので無い為、詳細な説明は
しない。従って、特に限定された回路でないことは言う
までも無く、本明細書中に説明する目的を果たす回路で
あれば良い。
The operation of the serial communication device shown in FIG. 1 will be explained below. The system clock for this system enters the frequency divider circuit 1, adjusts the clock duty ratio to 50%, and is used as an operating clock for the synchronization circuit 4 and the frequency division control circuit 5. On the other hand, it is also input to the multi-stage frequency divider circuit 2, and in this embodiment, the frequency is divided by "2+1" and each stage is outputted to the timing generation circuit 3, which generates an arbitrary timing to be described later. still,
The internal structures of the circuits shown in 1, 2.3, and 4.5 above are not particularly featured in the present invention, and therefore will not be described in detail. Therefore, it goes without saying that the circuit is not particularly limited, and any circuit that fulfills the purpose described in this specification may be used.

次に、本シリアル通信装置でのデータの入出力について
説明する0図中、同期取り回路4に入力されるシリアル
データ入力が受信データ入力で、データ出力回路10か
ら受信データ出力として出力される。又、各入力回路8
及び9に入力されたIDデータ入力と送信データ入力と
は、変調変換回路21から出力されるシリアルデータ出
力として送信データとなる。尚、詳細は後述するが、I
Dデータ入力は受信データ入力の真偽を判断する時に用
いられる。
Next, in Figure 0, which describes the input and output of data in this serial communication device, the serial data input to the synchronization circuit 4 is received data input, and is outputted from the data output circuit 10 as received data output. In addition, each input circuit 8
The ID data input and transmission data input input to 9 and 9 become transmission data as serial data output from the modulation conversion circuit 21. The details will be described later, but I
D data input is used when determining the authenticity of received data input.

第2図は第1図の変調及び復調回路部を詳細に示した図
である。
FIG. 2 is a diagram showing the modulation and demodulation circuit section of FIG. 1 in detail.

まず、変調変換回路21の動作について説明する。第2
図において、8ビツトシフトレジスタ16のシフトアウ
ト端子から出力されたデータ■は、変調変換回路21中
のEXOR212に入力される。一方、多段分周回路2
でl/32分周されたクロックφ32を反転ゲート21
1によって反転して位相を調整した信号■は、変調変換
回路21中の排他的論理和(以下EXOR)回路212
のもう一方に入力される。そして、EXOR回路212
によって、送信用シリアルデータ信号■が出力される。
First, the operation of the modulation conversion circuit 21 will be explained. Second
In the figure, data (2) output from the shift out terminal of the 8-bit shift register 16 is input to the EXOR 212 in the modulation conversion circuit 21. On the other hand, multistage frequency divider circuit 2
The clock φ32 divided by l/32 is sent to the inverting gate 21.
The signal (2) whose phase has been adjusted by inverting it by
is input to the other side. And EXOR circuit 212
As a result, a serial data signal for transmission (■) is output.

ここで、上記回路で達成される変調の方法を詳細に説明
する。
The method of modulation achieved with the above circuit will now be described in detail.

シフトアウトデータ■はφ32のクロックで次々に出力
され、モしてφ32クロックの反転信号とEXORされ
る。つまり、仮に“1”がシフトアウトされればEXO
Rによって“10”が、又、“O”がシフトアウトされ
ればEXORによって“01”がそれぞれ出力されるよ
うになる。従って、本変調の条件では、仮に“1011
000100・・・ という送信データなら、“to 
0110 to 010101100101・・・”と
変調されて出力されるのである。従って、受信側の復調
方法は、送信データを反転して第2番目のデータから1
つ飛び(奇数番目)のデータをラッチすれば良い。尚、
変調方法や復調方法については、例えば、送信データの
第1番目から1つ飛び(偶数番号)のデータをラッチし
、復調しても結果は同じになる等、具体的方法について
は特に限定されたものではなく、デジタル変復調がかけ
られれば良い。
The shift-out data (2) are output one after another using the φ32 clock, and are then EXORed with the inverted signal of the φ32 clock. In other words, if "1" is shifted out, EXO
"10" is output by R, and "01" is output by EXOR if "O" is shifted out. Therefore, under this modulation condition, if “1011
If the transmission data is 000100..., then "to
0110 to 010101100101...". Therefore, the demodulation method on the receiving side is to invert the transmitted data and convert the second data to 1.
All you have to do is latch the data in skips (odd numbers). still,
Regarding the modulation method and demodulation method, for example, even if you latch the next data (even number) from the first transmission data and demodulate it, the result will be the same.The specific method is particularly limited. It would be better if it could be digitally modulated and demodulated.

EXOR回路212から送信用シリアルデータ信号■が
出力されると、ANDケート213を経て、送信データ
としてシリアル出力される。
When the serial data signal for transmission (2) is output from the EXOR circuit 212, it passes through the AND gate 213 and is serially output as transmission data.

但し、図中[相]、■で示す信号によって送信データの
出力の有無が制御されている。この信号■は、比較選択
回路20の比較結果とエラー検出回路7の結果とによっ
てエラーと判断された時“βowとなり、送信データの
出力を断つ(詳しくは後述する)。又、信号[相]は、
タイミング発生回路3により8ビツトシフトレジスタ1
6がシフトアウトしている期間のみ“high”になり
、送信データの出力を許可する。
However, the presence or absence of output of the transmission data is controlled by the signals indicated by [phase] and ■ in the figure. This signal (2) becomes "βow" when an error is determined based on the comparison result of the comparison selection circuit 20 and the result of the error detection circuit 7, and the output of the transmission data is cut off (details will be described later). teeth,
8-bit shift register 1 by timing generation circuit 3
It becomes "high" only during the period when the signal 6 is shifted out, and output of transmission data is permitted.

この時のタイミングチャートを第3図に示す。A timing chart at this time is shown in FIG.

尚、第3図においては、信号■はエラーなし時の状態で
示しており、シリアルデータ出力及び■。
In FIG. 3, the signal ■ is shown in the state without an error, and the serial data output and the signal ■ are shown.

■、/φ3□、■、[相]は、それぞれ第2図中の符号
で示した場所におけるタイミングである。
■, /φ3□, ■, [phase] are the timings at the locations indicated by the symbols in FIG. 2, respectively.

次に、復調変換回路6と変調エラー検出回路7との動作
について説明する。
Next, the operations of the demodulation conversion circuit 6 and the modulation error detection circuit 7 will be explained.

第2図において、同期取り回路4によって同期が取られ
て入力された受信データ4はDフリップフロップ61 
(以降フリップフロップのことをF/Fと略す)に入る
。尚、同期取り回路4によって同期が取られる分周制御
回路5によって多段分周回路2をリセットし、初期化さ
れたカウントをスタートする。D −F/F61は多段
分周回路2で1/16分周されたクロックφ16でトリ
ガされ、出力■はEXOR回路12とD −F/F71
とに入力される。D −F/F71は、D −F/F6
1と同じクロックでトリガされ、出力■はEXOR回路
72のもう一方に入力される。尚、D −F/F61は
セット端子、一方D −F/F71はリセット端子にタ
イミング回路3からの信号■によって制御される。そし
て、EXOR回路72テD−F/F61 、 D −F
/F71の各出力結果を比較し、比較結果をJ K −
F/F73に入力する。J K −F/F73は多段分
周回路2でl/32分周されたクロックφ32でトリガ
され、復調結果からエラーを検出してエラー信号■を出
力する。すなわち、EXOR回路72では各データビッ
トが“0”と“1“との組で表わされていること:変調
回路で述べた例では1が“10”Oが”01”で表わさ
れていることをチエツクし、そうでない場合はJ K 
−F/F73をセットしてエラー信号■を“high”
とする。
In FIG. 2, received data 4 synchronized and inputted by a synchronization circuit 4 is transferred to a D flip-flop 61.
(Hereinafter, flip-flop will be abbreviated as F/F). Note that the multi-stage frequency divider circuit 2 is reset by the frequency divider control circuit 5 synchronized by the synchronization circuit 4, and the initialized count is started. The D-F/F61 is triggered by the clock φ16 whose frequency is divided to 1/16 by the multi-stage frequency divider circuit 2, and the output ■ is the output from the EXOR circuit 12 and the D-F/F71.
is input. D-F/F71 is D-F/F6
It is triggered by the same clock as 1, and the output 2 is input to the other side of the EXOR circuit 72. The D-F/F 61 is controlled by a set terminal, while the D-F/F 71 is controlled by a reset terminal by a signal (2) from the timing circuit 3. And EXOR circuit 72te D-F/F61, D-F
/F71 output results are compared, and the comparison results are JK −
Input to F/F73. The JK-F/F 73 is triggered by the clock φ32 frequency-divided by 1/32 by the multi-stage frequency divider circuit 2, detects an error from the demodulation result, and outputs an error signal (2). That is, in the EXOR circuit 72, each data bit is represented as a set of "0" and "1"; in the example described for the modulation circuit, 1 is represented by "10" and O is represented by "01". Check if there is one, and if not, JK
- Set F/F73 and set error signal ■ to “high”
shall be.

一方、D −F/F61の反転出力■は、8ビツトシフ
トレジスタ16のシフトイン端子に人力される。この8
ビツトシフトレジスタ16のシフトクロックは多段分周
回路2でl/32分周されたクロックφ32でシフトし
ていく為、D−F/F61の反転出力の出力データを1
つ飛びにラッチシフトしていくことになる。
On the other hand, the inverted output (2) of the D-F/F 61 is input to the shift-in terminal of the 8-bit shift register 16. This 8
Since the shift clock of the bit shift register 16 is shifted by the clock φ32 which is frequency-divided by 1/32 by the multi-stage frequency divider 2, the output data of the inverted output of the DF/F 61 is
You'll end up latch shifting all at once.

この時のタイミングチャートを第4図に示す。A timing chart at this time is shown in FIG.

第4図において、■、φ32.φ、6.■、◎、■。In FIG. 4, ■, φ32. φ, 6. ■、◎、■.

■、■、■は、それぞれ第2図中の同じ符号で示した信
号のタイミングである。
■, ■, ■ are the timings of signals indicated by the same symbols in FIG. 2, respectively.

以上の説明が、シリアル通信の出力データを所定の条件
で変調して出力信号とし、又、入力信号は所定の条件に
よって復調して入力データとするデジタル変復調手段と
、このデジタル変復調手段での入力信号に対する復調時
に変復調法則に対応してエラーを検出するエラー検出手
段である。
The above explanation explains the digital modulation/demodulation means that modulates the output data of serial communication under predetermined conditions to produce an output signal, and demodulates the input signal according to predetermined conditions to provide input data, and the input signal of this digital modulation/demodulation means. This is an error detection means that detects an error in accordance with the modulation/demodulation law when demodulating a signal.

次に、第2図に示す8ビツトシフトレジスタ16のパラ
レルデータ及び信号■等について、第5図〜第8図を用
いて説明する。
Next, the parallel data, signal 2, etc. of the 8-bit shift register 16 shown in FIG. 2 will be explained using FIGS. 5 to 8.

受信データ■をシフトし、復調データ■が8ビット揃う
と、タイミング発生回路3からのラッチパルス■で第1
シフトデータラッチ回路17に8ビツトデータな入力し
ラッチする。
When the received data ■ is shifted and the demodulated data ■ has 8 bits, the latch pulse ■ from the timing generation circuit 3 causes the first
8-bit data is input to the shift data latch circuit 17 and latched.

次に、復調データ■を4ビット読み過ごした後頁に8ビ
ット揃うと、タイミング発生回路3からのラッチパルス
■で第2シフトデータラッチ回路18に8ビツトデータ
を入力しラッチする。最後に、復調データ■を3ビット
読み過ごした後頁に8ビット揃うと、タイミング発生回
路3からのラッチパルス■で第3シフトデークラッチ回
路19に8ビツトデータを入力しラッチする。
Next, when 8 bits of the demodulated data (4) are read out and 8 bits are aligned on the next page, the 8-bit data is input to the second shift data latch circuit 18 and latched by the latch pulse (2) from the timing generation circuit 3. Finally, when 8 bits of the demodulated data (3) are read out on the next page, the 8-bit data is input to the third shift data latch circuit 19 and latched by the latch pulse (2) from the timing generation circuit 3.

つまり、本実施例では、lフレーム中に空間ビット、所
謂ダミービットを入れて復調データ■の全てを有効ビッ
トとせずに、時系列的に所定期間のみを有効ビットとし
て決めている。但し、空間ビットにおいても変調された
状態でシリアル通信がなされる。
That is, in this embodiment, space bits, so-called dummy bits, are inserted into the 1 frame so that not all of the demodulated data (2) is made into valid bits, but only a predetermined period of time is determined as valid bits. However, serial communication is performed in a modulated state even with spatial bits.

シフトデークラッチ回路17,18.19に各々ラッチ
されたデータは、比較回路20に入力されて所定条件で
比較される。本実施例における所定条件とは次のように
なっている。復調データ■は、第7図に示すように“1
 、0.102.IDI。
The data latched in the shift day clutch circuits 17, 18, and 19 are input to a comparison circuit 20 and compared under predetermined conditions. The predetermined conditions in this embodiment are as follows. The demodulated data ■ is “1” as shown in FIG.
, 0.102. I.D.I.

D7. D6. D5. D4. X、 X、 X、 
X、 D3. D2. DI。
D7. D6. D5. D4. X, X, X,
X, D3. D2. D.I.

00.100./D1./D2./D3. X、 X、
 X、/D4./D5./D6゜/D7./ID2./
101./IDO,IDO,X” (7)順に入力すt
L6(ここで、示すDnはデータを意味し、又/Dnは
反転データを意味する。更に、Xは空間ビットを意味し
実用上“O′°である)。従って、比較される所定条件
は、第6図に示す如くである。
00.100. /D1. /D2. /D3. X, X,
X, /D4. /D5. /D6°/D7. /ID2. /
101. /IDO, IDO, X” (7) Enter in order.
L6 (here, Dn means data, /Dn means inverted data, and X means space bit and is "O'° in practice). Therefore, the predetermined condition to be compared is , as shown in FIG.

以上のように比較され、各々のEXOR回路出力をNA
NDゲート201で1つにまとめデータ比較信号@とし
て出力する。このデータ比較信号0は復調時のエラー信
号■と共にNORゲート202に入力され、信号■を出
力する。
The comparison is made as above, and the output of each EXOR circuit is
The data are combined into one by the ND gate 201 and output as a data comparison signal @. This data comparison signal 0 is inputted to the NOR gate 202 together with the error signal ``during the demodulation'', and the signal ``dirty'' is output.

すなわち、このデータ比較信号@は、比較エラーが1ビ
ツトでもあると’high”となり、前記復調時にチエ
ツクされたエラー有無信号■の状態にかかわらず信号■
を“I20W”にする為、ANDゲート213の出力を
断ち、送信データの出力が無くなる。
In other words, this data comparison signal @ becomes 'high' if there is even a 1-bit comparison error, and the signal ■ becomes high regardless of the state of the error presence signal ■ checked at the time of demodulation.
In order to set it to "I20W", the output of the AND gate 213 is cut off, and the output of the transmission data disappears.

第7図にシフトデータラッチ回路及び比較選択回路での
タイミングチャートを示す。尚、第7図て示すタイミン
グチャートは、正常データを受信した時のもで信号@は
、復調データ■の受信終了後”120w”となり、前記
復調結果のエラー信号■もノーエラーで“120w  
である為、信号■は“high”になってANDゲート
213の出力は許可状態となり、送信データの出力が可
能となると共に、信号■によってANDゲート22が開
き、タイミング発生回路3からのラッチパルス■がデー
タ出力回路10にロートされ、出力データか出力される
。図中、■、■、■はタイミング発生回路3からの各ラ
ッチパルスで、シフトデークラッチ回路17.18及び
19にロードパルスを与える。その結果、図中、第1.
第2及び第3ラツチデータがラッチされ第6図の比較結
果信号0が生成される。以上が受信データの取り込みの
説明である。
FIG. 7 shows a timing chart of the shift data latch circuit and comparison selection circuit. The timing chart shown in Fig. 7 shows the timing when normal data is received.The signal @ becomes "120w" after receiving the demodulated data (■), and the error signal (■) of the demodulation result also becomes "120w" with no error.
Therefore, the signal ■ becomes "high" and the output of the AND gate 213 becomes enabled, making it possible to output the transmission data, and the AND gate 22 opens due to the signal ■, and the latch pulse from the timing generation circuit 3 is output. (2) is loaded into the data output circuit 10, and the output data is output. In the figure, 2, 2, and 2 are latch pulses from the timing generation circuit 3, which provide load pulses to the shift day latch circuits 17, 18, and 19. As a result, in the figure, 1.
The second and third latch data are latched and the comparison result signal 0 shown in FIG. 6 is generated. The above is an explanation of how to capture received data.

次に第8図のタイミングチャートに従って送信データの
掃き出しについて説明する。送信データの内容は特に図
示していないが、例えば受信開始した時とか特に限定さ
れない任意のタイミングでタイミング発生回路3から各
データ入力回路8゜9にラッチパルスinを出力して各
データをラッチし、更に、各データ出力11〜14で送
信データ中のIDデータ及びデータをそれぞれポジイブ
データとネガティブデータに分けて出力させる(第7図
中にID2〜IDO,/ID2〜/IDO,D7〜Do
、/D7〜/DOで示す)、そして、データエンコード
回路15にタイミング発生回路3からのセレクトパルス
■、■、■がそれぞれのタイミングで出力され、8ビツ
トシフトレジスタ16への出力データを用意する。一方
、8ビツトシフトレジスタ16へのシフトデータロート
信号は特に図示していないが、タイミング発生回路3中
で前記セレクトパルス■、■、■のORが出力され、計
3回の8ビツトシフトを実施してシフトアウト信号■と
して第2図中のEXOR回路212に出力される。一方
、送信許可信号■は、受信時のエラー信号■及びデータ
比較エラー信号@の結果がノーエラーなら、第8図のよ
うにシフトアウト信号■が出力される迄は“high”
が続く。しかし、逆に上記信号■及び@が”βOW”で
あったならシフトアウト信号■が出力されてもANDゲ
ート213によって、送信データは出力されない。
Next, the sweep of transmission data will be explained according to the timing chart of FIG. Although the contents of the transmitted data are not particularly illustrated, each data is latched by outputting a latch pulse in from the timing generation circuit 3 to each data input circuit 8.9 at an arbitrary timing not particularly limited, such as when reception is started, for example. Furthermore, each data output 11 to 14 outputs the ID data and data in the transmission data separately into positive data and negative data (ID2 to IDO, /ID2 to /IDO, D7 to Do in FIG. 7).
, /D7 to /DO), and the select pulses ■, ■, ■ from the timing generation circuit 3 are output to the data encode circuit 15 at respective timings, and output data to the 8-bit shift register 16 is prepared. . On the other hand, although the shift data load signal to the 8-bit shift register 16 is not particularly shown, the OR of the select pulses ■, ■, ■ is output in the timing generation circuit 3, and a total of three 8-bit shifts are performed. The signal is then outputted as a shift-out signal ■ to the EXOR circuit 212 in FIG. On the other hand, if the result of the error signal ■ during reception and the data comparison error signal @ is no error, the transmission permission signal ■ remains "high" until the shift out signal ■ is output as shown in FIG.
continues. However, if the signals ■ and @ are "βOW", the AND gate 213 will not output the transmission data even if the shift-out signal ■ is output.

以上の説明が、シリアル通信の1フレームデータの処理
構造であり、受信データの1フレーム内にポジティブデ
ータとネガティブデータとを有してこれを比較する比較
手段や、1フレーム中に空間ビットを有し有効ビットの
タイミングを取るタイミング取り手段や、送信データに
ポジティブデータとネガティブデータとを付加したり、
空間ビットを設けたり、送信データを形成する手段や、
前記比較手段及びタイミング取り手段のエラー検出を実
行するデータエラー検出手段等である。尚、本実施例で
のシリアル通信の1フレームデータの処理構造に関連し
て述べた回路は、はんの−例であって特に限定されたも
のではなく、その目的が実行される回路であれば良いこ
とは言うまでもない。
The above explanation is the processing structure of one frame data in serial communication, including the comparison means that has positive data and negative data in one frame of received data and compares them, and the structure that has spatial bits in one frame. A timing means for determining the timing of valid bits, adding positive data and negative data to the transmitted data,
means for providing space bits and forming transmission data;
These include data error detection means and the like for detecting errors in the comparison means and timing determination means. Note that the circuit described in relation to the processing structure of one frame data of serial communication in this embodiment is just an example and is not particularly limited, and any circuit that executes the purpose may be used. Needless to say, it's a good thing.

〈シリアル通信装置の他の実施例〉 次に他の実施例のシリアル通信装置について説明をする
<Other Embodiments of Serial Communication Device> Next, a serial communication device of another embodiment will be described.

前記実施例においては、送受信のシリアルデータのビッ
ト数を32ビツトとして扱っていたが、これは説明を容
易にする為で、ビット数について特に限定されたもので
はない。又、通信データの1フレーム内にポジティブデ
ータとネガティブデータとを有する場合でも、総ての有
効ビットに必要なものではないことは言うまでもない。
In the embodiment described above, the number of bits of the serial data to be transmitted and received was treated as 32 bits, but this is for ease of explanation, and the number of bits is not particularly limited. Furthermore, even if one frame of communication data includes positive data and negative data, it goes without saying that all valid bits are not necessary.

更に、空間ビットにおいても同様に、無くても良いし或
いは1ビツト以上あれば良い。従って、例えばIDデー
タをポジティブのみとし、スタートビットを1ビツトと
し、エンドビットを無くし、データビットをポジティブ
で8ビツト、ネガティブで4ビツトとする構成にすれば
、送受信シリアルのビット数は16ビツトとなる0本実
施例では、シリアル通信のデータ誤伝達の確率を低下さ
せる為に送受信のシリアルデータのビット数を32ビツ
トとしたのであり、更なる信頼性の向上を考える場合は
、例えば40ビツト、56ビツト、64ビツト・・・等
にビット数を増やせば良い。
Furthermore, similarly, the space bit may be absent, or it may be sufficient if there is one or more bits. Therefore, for example, if the configuration is such that the ID data is only positive, the start bit is 1 bit, the end bit is eliminated, and the data bits are 8 bits for positive and 4 bits for negative, the number of bits for transmitting and receiving serial will be 16 bits. In this embodiment, the number of bits of the serial data to be transmitted and received is set to 32 bits in order to reduce the probability of data transmission error in serial communication.If further improvement in reliability is considered, for example, 40 bits, 40 bits, etc. The number of bits can be increased to 56 bits, 64 bits, etc.

次に、前記実施例ではシフトレジスタ16を8ビツトで
行なっていたが、送受信のシリアルデータのビット数(
1フレームのビット数)と同じビット数にしても良い。
Next, in the embodiment described above, the shift register 16 was operated with 8 bits, but the number of bits of serial data to be transmitted and received (
The number of bits may be the same as the number of bits in one frame.

つまり、32ビツトシフトレジスタで構成しても良いの
である。仮にシフトレジスタ16を32ビツトシフトレ
ジスタて構成すると、第9図に示すようなブロック図と
なる。
In other words, it may be configured with a 32-bit shift register. If the shift register 16 were constructed as a 32-bit shift register, the block diagram would be as shown in FIG.

第9図において、第1図と同様なものは同一記号を用い
ている。図中、16′は32ビツトシフトレジスタで、
第1図でのデータエンコード回路15、各シフトデータ
ラッチ回路17゜18.19は32ビツトシフトレジス
タ16’ を用いることで省略される。動作的には、シ
フトデータ■を8ビット単位で処理するのでは無く、3
2ビツトまとめてシフトインして比較選択回路20にデ
ータロードするようになる所と、送信データを各データ
出力11〜14より直接全ビットをデータロードする所
以外は、第1図と同様な動作となる。
In FIG. 9, the same symbols are used for the same parts as in FIG. 1. In the figure, 16' is a 32-bit shift register,
The data encode circuit 15 and each shift data latch circuit 17, 18, and 19 in FIG. 1 are omitted by using a 32-bit shift register 16'. In terms of operation, the shift data ■ is not processed in 8-bit units, but in 3-bit units.
The operation is similar to that shown in FIG. 1, except that 2 bits are shifted in at once and data is loaded into the comparison and selection circuit 20, and that all bits of transmission data are directly loaded from each data output 11 to 14. becomes.

又、前記実施例の構成はシリアル通信の受は側、つまり
スレーブ側のシリアル通信装置となっているが、第1図
中のタイミング発生回路3からのタイミングパルスの出
力状態を受信の為のグループと送信の為のグループとの
順番を入れ換え、送信の為のグループを先に出力し、送
信動作を実行させ、その次に受信の為のグループを出力
して受信動作を実行させるようにすればマスター側のシ
リアル通信装置となる。従って、シリアル通信の送出側
、つまりマスター側のシリアル通信装置も第1図と同様
な動作で簡単に実現出来る。このことにより、所謂マス
ター・スレーブ間のシリアル通信において、送信データ
の送出タイミングと受信データの受入タイミングとはマ
スター、スレーブ共にタイミングが異なるため、本シリ
アル通信の送受信信号は衝突することが無くなる。すな
わち、全2重方式でも半2重方式でもその回線の本数に
限定はない。
Furthermore, although the configuration of the above embodiment is a serial communication device on the receiving side of serial communication, that is, on the slave side, there is a group for receiving the output state of the timing pulse from the timing generation circuit 3 in FIG. If you change the order of the group for sending and the group for sending, output the group for sending first and execute the sending operation, then output the group for receiving and execute the receiving operation. Serial communication device on the master side. Therefore, a serial communication device on the sending side of serial communication, that is, on the master side, can be easily realized by the same operation as shown in FIG. As a result, in so-called master-slave serial communication, the transmission timing of the transmission data and the reception timing of the reception data are different for both the master and the slave, so that the transmission and reception signals of this serial communication will not collide. In other words, there is no limit to the number of lines in either the full-duplex system or the half-duplex system.

更に、マスター1つにスレーブN個の所謂1:Nのシリ
アル通信でも各シリアル通信データにはIDデータが付
加されていて、容易に識別出来る為、必ずしも1:1通
信である必要もなく、本シリアル通信装置がそのまま用
いられる。しかも、受送信のためのシリアル信号の受入
タイミングと送出タイミングとが異なるため、発光素子
と受光素子とによって形成される光通信ターミナル(光
通信接続切り口)において、送信時の発光素子の発光中
に送信側の受光素子がその送信信号を受光して、あたか
も他の光通信ターミナルから受信信号を受光したように
なっても、誤動作を起こすことがなく光通信に適してい
る。
Furthermore, even in so-called 1:N serial communication where one master and N slaves are used, ID data is added to each serial communication data and can be easily identified, so it is not necessarily 1:1 communication; A serial communication device is used as is. Moreover, since the reception timing and transmission timing of the serial signal for reception and transmission are different, at the optical communication terminal (optical communication connection cut-off) formed by the light emitting element and the light receiving element, the light emission timing of the light emitting element during transmission is different. Even when the light-receiving element on the transmitting side receives the transmitted signal, it does not malfunction even if it appears to have received the received signal from another optical communication terminal, making it suitable for optical communications.

又、第1図に示す実施例では、シリアルデータ入力で受
信信号を受信すると、同期取り回路4ですぐに受入れて
、直ちに受信動作をスタートしてしまう。その為、第1
0図に示す如<ANDゲート23を設け、1回受信する
とタイミング発生回路3よりの信号により、送信データ
を送信する期間だけANDゲート23を閉じ(仮に、受
信データの変調エラー及び受信データの比較エラー等の
通信エラーがあった場合は、実質上のシリアル送信はな
されないが、送信されるべき期間上述同様に受信データ
の受入を禁止する)、送信中の受信を避けるようにする
と、更に誤動作を少なくし、光通信により適したものと
なる。
Further, in the embodiment shown in FIG. 1, when a reception signal is received by serial data input, the synchronization circuit 4 immediately accepts the reception signal and immediately starts the reception operation. Therefore, the first
As shown in FIG. If there is a communication error such as an error, serial transmission will not actually be performed, but reception of received data will be prohibited as described above during the period during which it should be transmitted), and if reception is avoided during transmission, further malfunctions will occur. This makes it more suitable for optical communications.

以上説明したように、 ■ シリアル通信の出力データは所定の条件によって変
調されて出力信号として出力され、又、入力信号前記は
所定の条件によって復調され入力データとする。
As explained above, (1) The output data of serial communication is modulated according to predetermined conditions and output as an output signal, and the input signal is demodulated according to predetermined conditions and used as input data.

■ 前記入力信号に対する復調時に変調あるいはノイズ
等のエラー検出をする。
(2) Detect errors such as modulation or noise during demodulation of the input signal.

■ 1フレームデータ内に同一データのボジテイデデー
タとネガティブデータとを有し、おのおのをそれぞれ比
較する。
■ One frame data contains positive data and negative data, which are the same data, and are compared with each other.

■ 1フレームデータ内に空間ビットを有し、有効ビッ
トのタイミングを取る。
■ There is a space bit within one frame data, and the timing of the valid bit is determined.

■ 前記比較及びタイミングを取ることによりエラー検
出を実行する。
■ Perform error detection by taking the comparison and timing.

以上のチエツク機能を設けることにより、装置内中に発
生するノイズ等、シリアル通信のデータの情報誤伝達を
防止し、装置の誤動作を防ぐという効果がある。
Providing the above check function has the effect of preventing erroneous information transmission of serial communication data such as noise generated in the device, and preventing malfunction of the device.

又、シリアル通信の情報伝達手段を光による無線伝達(
リモコンの様な空中伝達)する場合の装置内に発生する
外乱光等、シリアル通信のデータの情報誤伝達をも防止
し、装置の誤動作を防ぐことが出来るという効果もある
In addition, the information transmission means of serial communication is replaced by optical wireless transmission (
It also has the effect of preventing erroneous information transmission of serial communication data, such as disturbance light generated within the device when transmitting data in the air (such as with a remote control), and preventing malfunction of the device.

一以下余白一 く本シリアル通信装置の適用例〉 第11図は本シリアル通信装置を光通信に使用したシス
テムの構成例を示す図である。100は主制御装置で、
110,120,130は、例えばモータ、ファン、ソ
レノイド等のアクチュエータ類やスイッチ、センサ類か
らなるブロック構成としての各ユニット装置である。尚
、これらユニットの数は各機器ごとに異なるが、説明上
3つで表しである。102は光通信の為のドライブ回路
、102aは発光素子で、103は光通信の為の増幅回
路、103aは受光素子であり光電変換を行なっている
。以下、前記102と103とを総称して、光通信ター
ミナル101と呼ぶことにする。
Application example of the present serial communication device> Figure 11 is a diagram showing an example of the configuration of a system using the present serial communication device for optical communication. 100 is the main controller,
Reference numerals 110, 120, and 130 denote unit devices as a block configuration including actuators such as motors, fans, and solenoids, switches, and sensors. Note that although the number of these units differs for each device, three is shown for the sake of explanation. 102 is a drive circuit for optical communication, 102a is a light emitting element, 103 is an amplifier circuit for optical communication, and 103a is a light receiving element that performs photoelectric conversion. Hereinafter, the above 102 and 103 will be collectively referred to as the optical communication terminal 101.

104は前述の実施例のシリアル通信装置で、前記光通
信ターミナル101へのシリアル信号102bを送出す
ると、発光素子102aが発光してシリアルデータを伝
送する゛。又、前記ユニット装置110〜130から光
伝送を受けると受光素子103aによって受け、シリア
ル信号103bを受信する。そして、前述のデータのチ
エツク後、真なるデータの時はシリパラ変換を行ないC
PU105に人力する。又、通信ターミナルより送出さ
れるデータは、CPU105より出力されたデータに前
述した如く所定条件を付加しバラシリ変換後、発光素子
102aより送出される。
104 is the serial communication device of the above-described embodiment, and when the serial signal 102b is sent to the optical communication terminal 101, the light emitting element 102a emits light to transmit serial data. Further, when optical transmission is received from the unit devices 110 to 130, it is received by the light receiving element 103a, and a serial signal 103b is received. After checking the data mentioned above, if the data is true, serial-parallel conversion is performed and C
Human power is applied to PU105. Further, the data sent from the communication terminal is sent out from the light emitting element 102a after adding the predetermined conditions to the data output from the CPU 105 and subjecting it to disjoint conversion.

一方、前記各ユニット110,120,130は、特に
図中記載していないが、光通信ターミナル101′をそ
れぞれ有し、主制御装置100と光によりデータ伝送を
実行する。尚、各ユニットは、その目的に応じ主制御装
置100と同様にCPU構成になっていたり、また、シ
リアル通信装置104のデータイン及びデータアウトに
直接ソレノイドやセンサ等が接続されている場合もある
On the other hand, each of the units 110, 120, and 130 has an optical communication terminal 101', although not particularly shown in the figure, and performs data transmission with the main controller 100 by light. Note that each unit may have a CPU configuration similar to the main control device 100 depending on its purpose, or may have a solenoid, sensor, etc. directly connected to the data in and data out of the serial communication device 104. .

〈送受信のタイミングの制御〉 光通信の場合、シリアル通信装置104には特に外乱や
衝突を防ぐ種々の工夫が必要である。
<Control of Transmission/Reception Timing> In the case of optical communication, the serial communication device 104 requires various measures to prevent disturbances and collisions.

第12図及び第13図はシステムクロックの坏分周の為
の坏分周回路1.多段分周回路2、同期取り回路4及び
分周制御回路5の好ましい回路図である。尚、タイミン
グ発生回路3については、各動作説明のたびその出力タ
イミングを記載するためここでは略す。第12図は特に
第11図に示す主制御装置100の方に取り付けるシリ
アル通信装置の具体例で、以降マスター通信装置と略す
。又、第13図は第1図でのユニット110〜130側
に取り付けるシリアル通信装置での具体例で、以降スレ
ーブ通信装置と略す。
FIGS. 12 and 13 show a transparent frequency division circuit 1 for transparent frequency division of the system clock. 2 is a preferred circuit diagram of a multistage frequency divider circuit 2, a synchronization circuit 4, and a frequency division control circuit 5. FIG. Note that the timing generation circuit 3 will be omitted here because its output timing will be described each time the operation is explained. FIG. 12 particularly shows a specific example of a serial communication device attached to the main control device 100 shown in FIG. 11, and will be abbreviated as master communication device hereinafter. Further, FIG. 13 shows a specific example of a serial communication device attached to the units 110 to 130 in FIG. 1, and is hereinafter abbreviated as a slave communication device.

多段分周回路2は、本例の場合“210”の分周で、タ
イミング発生回路3に各段を出力し、後述する任意のタ
イミングを発生させる。尚、第12図、第13図で示す
回路は、特に限定された回路でないことは言うまでも無
く、以下に説明する目的を果たす回路であれば良い。
In this example, the multistage frequency divider circuit 2 divides the frequency by "210" and outputs each stage to the timing generation circuit 3 to generate an arbitrary timing described later. It goes without saying that the circuits shown in FIGS. 12 and 13 are not particularly limited circuits, and may be any circuit that fulfills the purpose described below.

第12図において、電源が投入されると特に図示してい
ないが、各回路にリセットがかかつて初期化されると、
多段分周回路の動作がスタートする。そうすると、信号
[相]が“high”となり、前述したデータ送出動作
を可動とし、ANDゲート213から送出データが出力
され、第11図のシリアルデータ出力102bとなる。
In FIG. 12, when the power is turned on, although not particularly shown, when each circuit is reset and initialized,
The operation of the multi-stage frequency divider circuit starts. Then, the signal [phase] becomes "high", enabling the data sending operation described above, and sending data is output from the AND gate 213, resulting in the serial data output 102b in FIG. 11.

尚、ANDゲート23の一方の入力にはタイミング発生
回路3から信号[相]の反転信号が入っている為、同期
取り回路4にシリアルデータ入力信号103bが入って
も無視される。この信号[相]は常にデータの送出時の
み“high”になる為、送信データの送信中の受信デ
ータの受信は禁止される。つまり、逆にいうとデータの
受信中は、送信データの送出は禁止されることになる。
Note that since one input of the AND gate 23 receives an inverted signal of the signal [phase] from the timing generation circuit 3, even if the serial data input signal 103b is input to the synchronization circuit 4, it is ignored. Since this signal [phase] is always "high" only when transmitting data, reception of received data is prohibited while transmitting data is being transmitted. In other words, while data is being received, sending out transmission data is prohibited.

そして、マスター通信装置より送信データを出力すると
直ちに信号[相]は“I2ow”となり、ANDゲート
23が開き受信を可能にする。通常は、マスター通信装
置より送信データを出力すると、次にはスレーブ通信装
置より受信データが入力される。受信データが入るとD
 −F/F43 。
Immediately after the master communication device outputs the transmission data, the signal [phase] becomes "I2ow" and the AND gate 23 opens to enable reception. Normally, when the master communication device outputs transmission data, the slave communication device then inputs reception data. When received data enters D
-F/F43.

44で%分周回路1から出力されるクロックφ2により
同期取りがなされ、復調変換回路6に出力される。一方
、D −F/F43 、44の各出力はANDゲート5
4に入力されてNOTゲート56を経て、多段分周回路
2のセット端子に入力される。又、ANDゲート54の
出力はJ K −F/F55のJ端子に入り、次のクロ
ックφ2で/Q比出力“ffow  になり、ANDゲ
ート54からの多段分周回路2のセット出力は、J K
 −F/F55 (7)K端子にタイミング発生回路3
からのセット許可信号■が入るまで“high”のまま
である。尚、このタイミング発生回路3からのセット許
可信号[F]は、送信データな送出終了する直前に“h
igh”が出力される為、受信データの受信直後から次
の送信が終了する迄は受信信号が入力されても多段分周
回路2の全段セットは行われないし、受信信号の入力処
理は行われない。
At 44, synchronization is achieved with the clock φ2 outputted from the % frequency divider circuit 1, and outputted to the demodulation conversion circuit 6. On the other hand, each output of D-F/F43 and 44 is connected to AND gate 5.
4, passes through the NOT gate 56, and is input to the set terminal of the multistage frequency divider circuit 2. Also, the output of the AND gate 54 enters the J terminal of the J K -F/F 55, and becomes the /Q ratio output "ffow" at the next clock φ2, and the set output of the multistage frequency divider circuit 2 from the AND gate 54 becomes the J K
-F/F55 (7) Timing generation circuit 3 on K terminal
It remains "high" until the set permission signal (2) is input from. Incidentally, the set permission signal [F] from the timing generation circuit 3 is set to "h" immediately before the end of sending the transmission data.
Since "high" is output, all stages of the multi-stage frequency divider circuit 2 are not set even if the received signal is input from immediately after receiving the received data until the next transmission is completed, and the input processing of the received signal is not performed. It won't happen.

ここで、多段分周回路2の動作について説明する。多段
分周回路2は、“210”で構成されタイミング発生回
路3て更に坏分周している為、”2+1”構成となる。
Here, the operation of the multistage frequency divider circuit 2 will be explained. The multi-stage frequency dividing circuit 2 is composed of "210" circuits, and the timing generation circuit 3 further performs the frequency division, resulting in a "2+1" configuration.

従って、NOTゲート56からの“120w”の出力に
よるカウンタセットで”FFFH”になり、カウントダ
ウンの後” 7 F F H”で信号[相]が“hig
h”になり、送信動作に入る。そして送信が終了する“
3FFH”で信号[相]が“βow”となり受信可能と
なって、次の受信があると再び“F F F H”とな
る。
Therefore, the counter set by the output of "120w" from the NOT gate 56 becomes "FFFH", and after the countdown, the signal [phase] becomes "high" at "7 F F H".
h” and starts transmitting operation. Then, the transmission ends “
At "3FFH", the signal [phase] becomes "βow" and becomes ready for reception, and when the next reception occurs, it becomes "F F F H" again.

すなわち、信号■はカウンタが°”7XXH”の時のみ
“high”で、後は“βOW”であるよう制御されて
いる。そこで、正常に通信を実行している時は、 7FFll   〜 3FFII     FFFH〜
  7FF)l   〜  3FF)Iを繰り返す。
That is, the signal (2) is controlled to be "high" only when the counter value is "7XXH" and to be "βOW" thereafter. Therefore, when communication is running normally, 7FFll ~ 3FFII FFFH ~
Repeat steps 7FF)l to 3FF)I.

しかし、“3 F F H”になった以降も受信データ
が来ない時は、カウントダウンを継続し、O”から“F
FFH”に戻り再び“7FFH”になると、次の送信を
行なうようになる。尚、受信は送信接法の送信タイミン
グ塩に受信出来れば、受信開始時に“FFFH”になる
ので、上記正常時のカウント状態になる。以上のように
、多段分周回路2は所謂リングカウンタで構成されてい
る為、受信データを受信しない時は所定期間受信を持っ
た後ANDゲート23によって受入動作を禁止して、新
たに送信を実行し始める。
However, if the received data does not come even after reaching "3 F F H", the countdown continues and the data changes from "O" to "F".
When it returns to ``FFH'' and becomes ``7FFH'' again, the next transmission begins.In addition, if the reception can be received at the transmission timing of the transmission method, it will become ``FFFH'' at the start of reception, so the above normal condition The multi-stage frequency divider circuit 2 is configured as a so-called ring counter, so when the received data is not received, the receiving operation is prohibited by the AND gate 23 after receiving data for a predetermined period. , start executing a new transmission.

次に、第13図を用いてスレーブ側のシリアル通信装置
の第12図との違いについて説明する。
Next, using FIG. 13, the differences between the serial communication device on the slave side and FIG. 12 will be explained.

D−F/F41,42は、D−F/F43,44同様の
受信データの同期取りであるが、スレーブの場合は、多
段分周回路2は“210”で構成されている。
The DF/Fs 41 and 42 synchronize the received data like the DF/Fs 43 and 44, but in the case of a slave, the multistage frequency dividing circuit 2 is composed of "210".

第13図において、電源が投入されると、特に図示して
いないが各回路にリセットがかかって初期化され、多段
分周回路2の動作が可能になるが、J K −F/F5
2の/Q比出力“high”なのでカウンタはセット状
態となったまま停止した状態である。受信データを受け
ると、ANDゲート51の出力は“high”となり、
J K −F/F52の/Q比出力’ A ow  と
なるため、カウンタはカウントダウンを始める。そして
、J K −F/F52のに端子への入力信号■は、タ
イミング発生回路3によりカウント値が“O′°になる
と出力されるので、第12図と同様、受信データの受信
直後から次の送信が終了する迄は、受信信号が入力され
ても多段分周回路2の全段セットは行なわれない。又、
J K −F/F52のに端子入力に信号■が入力され
ると/Q比出力再び”high”になるのでカウンタは
全段セットされ、次に受信を受けるまで停止する。つま
り、スレーブの多段分周回路2のカウンタは、−回の受
信に対し一回のみカウントダウンしてデータ受信処理と
データ送信処理を実行して停止するのである。つまり、 7FFll   〜    3FF)l    〜  
000Hとなる。
In FIG. 13, when the power is turned on, each circuit is reset and initialized (not particularly shown), and the multi-stage frequency divider circuit 2 is enabled to operate.
Since the /Q ratio output of 2 is "high", the counter remains set and stopped. Upon receiving the received data, the output of the AND gate 51 becomes "high",
Since the /Q ratio output of JK-F/F52 becomes 'Aow', the counter starts counting down. The input signal (■) to the terminal of the JK-F/F52 is output when the count value reaches "O'° by the timing generation circuit 3. Therefore, as in FIG. Even if a received signal is input, all stages of the multistage frequency divider circuit 2 are not set until the transmission of the multistage frequency divider circuit 2 is completed.
When the signal (2) is input to the terminal input of the JK-F/F 52, the /Q ratio output becomes "high" again, so the counter is set in all stages and stops until the next reception is received. In other words, the counter of the slave multi-stage frequency divider circuit 2 counts down only once for - times of reception, performs data reception processing and data transmission processing, and then stops. In other words, 7FFll ~ 3FF)l ~
It becomes 000H.

一方、ANDゲート213は、第12図と同様送信期間
のみ“high”となる信号[相]によって送信が可能
になる。すなわち、信号[株]はカウンタが”3XXH
”の間のみ“high”となる。又、前述したように、
受信データエラー信号■によっても送信データ■は出力
されなくなる。
On the other hand, the AND gate 213 is enabled to transmit by a signal [phase] that is "high" only during the transmission period, as in FIG. 12. In other words, Signal [stock] has a counter of “3XXH”.
It becomes “high” only during ”.Also, as mentioned above,
The transmission data ■ will no longer be output due to the reception data error signal ■.

〈受信エラーの送信例〉 前述の実施例ではエラーとなるとA、 N Dゲート2
13で受信エラー検出信号■によって送信データは“β
ow”になり、送信データ送出がなされない状態になっ
ていたが、第14図に示すようにエラーとなると、デー
タエラーの内容を送信データとして送出しても良い。第
14図においては、説明を容易にする為に通信携帯をマ
スターとスレーブの1=1対応を例にする。尚、マスタ
ーとスレーブが1:N対応の場合は、比較選択回路20
において受信エラー検出信号■のだめのデータ比較とI
Dデータのみの比較とを分離し、受信エラー検出信号■
と別にIDデータ比較結果を信号Oの変わりにANDゲ
ート215に入力すれば、受信データ内に指定されたス
レーブ通信装置のみが受信データを受信すると共に、受
信エラーが生じた場合には受信データ内で指定されたス
レーブ通信装置のみがデータエラーの内容を送信データ
に送出するようになる。
<Example of transmission of reception error> In the above embodiment, when an error occurs, A, ND gate 2
At step 13, the transmission data becomes “β” due to the reception error detection signal ■.
ow" and the transmission data was not sent. However, if an error occurs as shown in FIG. 14, the content of the data error may be sent as transmission data. In FIG. In order to facilitate this, let us take as an example the 1=1 correspondence between the master and the slave in a communication mobile phone.In addition, if the master and the slave have a 1:N correspondence, the comparison selection circuit 20
Comparison of data of received error detection signal ■ and I
Separate from comparison of D data only, receive error detection signal■
Separately, if the ID data comparison result is input to the AND gate 215 instead of the signal O, only the slave communication device specified in the received data will receive the received data, and if a reception error occurs, the received data will be Only the slave communication device specified by will send the details of the data error in the transmitted data.

第14図に示す回路は所謂セレクタ回路で、受信データ
エラー信号■が”high”の場合は送信許可期間信号
[相]と送信データ■によって、ORゲート216の出
力には送信データ信号■の内容が送出される。一方、受
信データエラー信号■が“120w” (エラー)の時
は、ANDゲート215によって送信許可期間信号[相
]だけがORゲート216の出力になるので、送信デー
タは“high”の状態で送出期間の間中出力される。
The circuit shown in FIG. 14 is a so-called selector circuit, and when the received data error signal ■ is "high", the content of the transmitted data signal ■ is output from the OR gate 216 by the transmission permission period signal [phase] and the transmitted data ■. is sent. On the other hand, when the received data error signal ■ is "120W" (error), only the transmission permission period signal [phase] is output from the OR gate 216 by the AND gate 215, so the transmission data is sent out in a "high" state. Output throughout the period.

“オールhigh”ということで、マスター側の通信装
置は、スレーブ側でのデータの復調中にデータエラーが
あったことを認識できる。
Since it is "all high", the communication device on the master side can recognize that there was a data error during data demodulation on the slave side.

第15図に第14図の回路上での各信号のタイミングチ
ャートを示す。尚、本例ではデータエラーを返信する内
容を“オールhigh”にしているが、これはほんの−
例であってその目的が達せられれば良く、特に゛°オー
ルhigh”である必要はない。このことにより、マス
ター通信装置は送信後、返信を受ければ相手の存在が分
かり、一方返信がなければ相手なし、もしくは伝送路の
不具合があるかが分かる。又、例えば通信が成功するス
レーブ通信装置が1つでもあれば、返信のないものは伝
送路の不具合ではなく、そのユニットが存在しないと判
断出来る。
FIG. 15 shows a timing chart of each signal on the circuit of FIG. 14. In this example, the data error response is set to "all high", but this is just -
This is just an example, as long as the purpose is achieved, and there is no particular need for it to be "all high".By this, after sending, the master communication device will know the existence of the other party if it receives a reply, and if there is no reply, it will know the existence of the other party. You can tell if there is no other party or if there is a problem with the transmission path.For example, if there is even one slave communication device that can successfully communicate, if there is no reply, it is determined that the unit does not exist, rather than a problem with the transmission path. I can do it.

以上説明したように、データ送信中はデータ受信を禁止
する、受信データを受信するとデータの受入期間をカウ
ントするカウントを終了するまで受信データの新たな受
信動作を開始することを禁止する等の工夫を行った。更
に、受信データのエラー検出をすると送信データの送出
を禁止する工夫も行った。以上の改善により、光による
転送を比較的高速にかっ、双方向で転送すると転送の各
々の光が衝突したり、外乱光による誤伝達等の問題を解
決できる。
As explained above, there are measures such as prohibiting data reception while data is being transmitted, and prohibiting the start of a new reception operation for received data until the count of the data acceptance period ends when received data is received. I did it. Furthermore, we have devised a way to prohibit the sending of transmitted data when an error is detected in the received data. With the above improvements, it is possible to perform optical transfer at a relatively high speed, and to solve problems such as collision of respective beams of transfer or mistransmission due to disturbance light when bidirectional transfer is performed.

又、第14図に示したようにエラーを検出すると送信デ
ータにデータエラーの内容を送出することで、送信は失
敗しても送信相手の有無は確認出来るという効果や、更
には、l二Nの場合でもIDデータにより送信を禁止し
、転送の為の各々の光が衝突したりして生じる送信デー
タのデータ化けを防ぐことができる。
Furthermore, as shown in Fig. 14, when an error is detected, the content of the data error is sent in the transmission data, so that even if the transmission fails, the presence or absence of the transmission destination can be confirmed. Even in this case, transmission can be prohibited by ID data, and garbled transmission data caused by collision of respective lights for transfer can be prevented.

次に、第16図を用いて、他の通信エラーの処理につい
ての説明をする。
Next, processing of other communication errors will be explained using FIG. 16.

第16図において、81は所定の段数を有するカウンタ
回路であり、送信許可信号[相]をクロックとし、AN
Dゲート54の出力信号@をカウンタのリセットに入力
する。尚、その他は、第12図に示すものと同様である
。カウンタ回路81は、本シリアル通信装置か送信する
時に“high”になる送信許可信号[相]によって送
信のたびカウントアツプする。しかし、受信すればAN
Dゲート54からの信号@によりカウンタ回路81のカ
ウント値はリセットされる。従って、正常に通信が実施
されていれば、カウンタ回路81のカウント値はオーバ
フローすることはない。
In FIG. 16, 81 is a counter circuit having a predetermined number of stages, which uses the transmission permission signal [phase] as a clock, and uses the AN
The output signal @ of the D gate 54 is input to reset the counter. Note that the other parts are the same as those shown in FIG. 12. The counter circuit 81 counts up each time the serial communication device transmits in accordance with the transmission permission signal [phase] which becomes "high" when transmitting. However, if received
The count value of the counter circuit 81 is reset by the signal @ from the D gate 54. Therefore, if communication is performed normally, the count value of the counter circuit 81 will not overflow.

ところが、連続的に受信をしない場合は、送信によりカ
ウントアツプしてやがてカウンタ回路81はオーバーフ
ローしてリップルキャリーアウト(RCOと示す)を出
力する。このリップルキャリーアウトを通信エラー信号
とし、例えばシステムのリセットをするようにしても良
い。又、各スレーブ通信装置では、この通信エラー時に
は特に動作をしなくても良いが、例えば、定期的にマス
ター通信装置からの送信が来なくなったらリセットされ
るようにしても良い(具体例は特に図示しないが、カウ
ンタ回路81と同様でも良く特に限定されない)。
However, if reception is not performed continuously, the count increases due to transmission, and eventually the counter circuit 81 overflows and outputs a ripple carry-out (denoted as RCO). This ripple carryout may be used as a communication error signal to reset the system, for example. In addition, each slave communication device does not need to take any particular action when this communication error occurs, but it may be reset periodically when transmission from the master communication device stops (for example, Although not shown, it may be similar to the counter circuit 81 and is not particularly limited).

以上説明したように、送信したデータに対して受信がな
い時はカウントを行ない、カウントが所定値に達すると
通信エラーとすることにより、光通信装置の通信暴走を
防ぐと共に、送信相手の有無も確認出来るという効果も
ある。
As explained above, when there is no reception of transmitted data, a count is performed, and when the count reaches a predetermined value, it is determined as a communication error. This prevents the optical communication device from running out of communication, and also allows you to check whether there is a transmission destination or not. It also has the effect of being able to be confirmed.

次に、第17図を用いて、通信システムとして更に他の
通信エラーの処理について説明をする。
Next, with reference to FIG. 17, further processing of other communication errors in the communication system will be explained.

第17図において、90はIDデータ入力回路8のID
データに応じ、ANDゲート54の出力である受信同期
信号@をセレクトして、後段の所望カウンタ回路に伝達
するセレクタ回路である。94,95.96は送信許可
信号[相]をクロックとするカウンタ回路で、セレクタ
回路90の出力がクリア端子に入力されている。
In FIG. 17, 90 is the ID of the ID data input circuit 8.
This is a selector circuit that selects the reception synchronization signal @ which is the output of the AND gate 54 according to the data and transmits it to a desired counter circuit in the subsequent stage. 94, 95, and 96 are counter circuits whose clocks are the transmission permission signal [phase], and the output of the selector circuit 90 is input to the clear terminal.

また、97はカウンタ回路94〜96がオーバーフロー
すると出力されるリップルキャリーアウトを入力するA
NDゲートである。又、CPU105には、カウンタ回
路94〜96からのリップルキャリーアウト及びAND
ゲート97の出力が入力されている。
In addition, 97 is an input A for ripple carryout output when the counter circuits 94 to 96 overflow.
It is an ND gate. In addition, the CPU 105 has ripple carry-out and AND signals from the counter circuits 94 to 96.
The output of gate 97 is input.

カウンタ回路94〜96は、送信のたび出力される送信
許可信号[株]によってカウントアツプされ、オーバー
フローするとカウンタリップルキャリーアウト(図中R
COで示す)によって、このことをCPU105に知ら
せるようになっている。又、全てのカウンタがオーバー
フローするとANDケート97により、このこともCP
U105に知らせる。一方、カウンタ回路94〜96は
、受信するたびIDデータ入力回路8からのIDデータ
に対応してクリアされるため、通常の通信が成功してい
るうちはカウンタリップルキャリーアウトは出力されな
い。尚、第17図での回路はほんの一例であって、その
目的が達せられる回路であれば特に限定されるものでは
ない。
Counter circuits 94 to 96 are counted up by a transmission permission signal output every time a transmission is made, and when they overflow, the counter ripple carries out (R in the figure).
(denoted by CO) notifies the CPU 105 of this fact. Moreover, when all the counters overflow, this is also determined by the AND gate 97.
Inform U105. On the other hand, since the counter circuits 94 to 96 are cleared in response to the ID data from the ID data input circuit 8 each time they are received, the counter ripple carryout is not output while normal communication is successful. Note that the circuit shown in FIG. 17 is just an example, and the circuit is not particularly limited as long as it can achieve the purpose.

く本シリアル通信装置のテスト機能〉 次に、第18図を用いて、本光通信装置の組立及び保守
上の調整を実現する構成について説明をする。第18図
において、106は受信シリアル信号103bと、CP
U105から発するテスト用シリアル信号のどちらかを
シリアル通信装置104に出力する為のセレクタ回路で
ある。
Test Function of the Present Serial Communication Device> Next, a configuration for realizing assembly and maintenance adjustments of the present optical communication device will be explained using FIG. In FIG. 18, 106 indicates the received serial signal 103b and the CP
This is a selector circuit for outputting either of the test serial signals generated from U105 to the serial communication device 104.

107はCPU105にテストモードインを指示するテ
スト人力手段である。尚、このテスト入力手段は特に限
定されたものではなく、例えば外部装置等から指示され
る用にしても構わない。又、第18図に示す構成は第、
11図の主制御装置100に相当し、同一なものは同一
符号で示しである。
Reference numeral 107 is a test manual means for instructing the CPU 105 to enter the test mode. Note that this test input means is not particularly limited, and may be used to receive instructions from an external device, for example. Moreover, the configuration shown in FIG.
This corresponds to the main control device 100 in FIG. 11, and the same parts are indicated by the same reference numerals.

くエラー処理及びテストの手順〉 CPU105では、第19図で示すフローチャートの手
順で制御を行なっている。但し、CPU105は第19
図で示す制御以外の制御も行なうが、説明を容易にする
為必要な部分のプログラムのみを述べることにする。
Error Handling and Test Procedures> The CPU 105 performs control according to the flow chart shown in FIG. However, the CPU 105 is
Controls other than those shown in the figures are also performed, but in order to simplify the explanation, only the necessary parts of the program will be described.

通常は、ステップSIOに入ると通信装置の為のテスト
モード要求の有無をチエツクする。通信モードの場合は
ステップSllに入りステップS12.S13と共にI
Dデータの出力を順にアクセスするように制御する。そ
してステップS14で送信すべきIDデータを認識する
。尚、このIDデータは、第17図で示すような複数の
カウンタ回路分の数で、これは光通信をするスレーブの
数でもある。従って、プログラム中に示すIDの数“N
N”は、光通信をするスレーブの数で決定される。ここ
では、IDが“0”の時と同様なのでIDが“1”の時
、“2”の時、・・・“NN”の時については説明を略
す。
Normally, upon entering step SIO, it is checked whether there is a test mode request for the communication device. In the case of communication mode, the process goes to step Sll and step S12. I with S13
Controls the output of D data so that it is accessed in order. Then, in step S14, the ID data to be transmitted is recognized. Note that this ID data is the number for a plurality of counter circuits as shown in FIG. 17, and this is also the number of slaves that perform optical communication. Therefore, the number of IDs shown in the program “N”
N" is determined by the number of slaves that perform optical communication. Here, since it is the same as when the ID is "0", when the ID is "1", when it is "2", ... "NN" The explanation regarding the time will be omitted.

ステップS15に入ると現在の指定されたID番号に対
応する前記複数のカウンタからのリップルキャリーアウ
ト信号をチエツクする。なお、フローチャート上はID
ナシと記載しているが、ここではANDゲート97の出
力からオールエラーか否かをチエツク後、仮にエラーな
り通信制御を止め、図示していないが通信装置のリセッ
トを行なう。また、仮にエラーでなければ、今送信しよ
うとするIDに対応するカウンタをチエツクし、オーバ
ーフローしていなければステップS16へ行き、オーバ
ーフローしていれば通信相手がないと判断してステップ
Sllへ戻る。尚、ステップS15では、通信エラーか
否かだけを判断するようにし、相手の有無にかかわらず
送信を行なう様にしても良い。そして、ステップ516
S17で各データをメモリから呼出し、予め割り振られ
た各ポート出力に出力する。そして、ステップS18で
通信の終了チエツクをし、終了していればステップSl
lに戻り再び繰り返す。
When entering step S15, the ripple carry-out signals from the plurality of counters corresponding to the currently designated ID number are checked. In addition, the ID on the flowchart
Although "none" is written here, after checking whether all errors occur from the output of the AND gate 97, if an error occurs, communication control is stopped and the communication device is reset (not shown). Further, if there is no error, the counter corresponding to the ID to be transmitted is checked, and if there is no overflow, the process goes to step S16, and if there is an overflow, it is determined that there is no communication partner and the process returns to step S11. Incidentally, in step S15, it may be determined only whether there is a communication error or not, and the transmission may be performed regardless of the presence or absence of the other party. and step 516
In S17, each data is called from the memory and output to each pre-allocated port output. Then, in step S18, the end of communication is checked, and if it has ended, step S1
Return to l and repeat again.

尚、ステップ5ll−313で次に送信するID番号を
順番に決定しているが、これはほんの−例であって、例
えば、時系列的に短い周期で伝送するグループや比較的
ゆっくりとした周期で伝送するグループ等に分けて順番
を決める等、必要に応じて目的とする優先順位を付けI
D番号を順番に決定しても良い。
Note that in step 5ll-313, the ID numbers to be transmitted next are determined in order, but this is just an example. Prioritize the target as necessary, such as dividing the transmission into groups etc. and determining the order.
The D numbers may be determined in order.

一方、テスト入力手段107がテストモードインを指示
していたらステップS20に移り、ID番号をテストモ
ート登録番号(本例では、Xxで表現しておく)にし、
ステップS21でIDデータと送信用データを出力する
。尚、テスト用送信データは特に指定していないが、例
えば、各スレーブ通信装置へ指示するテスト用データで
あっても良いし、又、その他の情報を示していても構わ
ない。そして、ステップS22で通信の終了を待ち、ス
テップS23で数回のレベルで通信を実施したことを確
認する。そのことで、各スレーブ通信装置が仮に受信動
作を失敗しても、数度に渡るテストモードイン指示のう
ち少なくとも1回は受信出来るようにしたものである。
On the other hand, if the test input means 107 instructs to enter the test mode, the process moves to step S20, sets the ID number to the test mote registration number (expressed as Xx in this example), and
In step S21, ID data and transmission data are output. Although the test transmission data is not particularly specified, it may be, for example, test data for instructing each slave communication device, or may indicate other information. Then, in step S22, the end of communication is waited for, and in step S23, it is confirmed that communication has been performed several times. As a result, even if each slave communication device fails in its reception operation, it can receive at least one of the several test mode-in instructions.

次にステップS24に移り、本シリアル通信装置として
のテスト動作を実行する。このテスト動作については特
に図示していないが、目的として、シリアル通信装置の
自身のチエツク動作がなされれば良いし、又、本シリア
ル通信装置が使われる機器によっても異なる為、特に限
定されたものでは無いのであるが、−例を以下に示して
おく。
Next, the process moves to step S24, and a test operation as the serial communication device is executed. Although this test operation is not specifically illustrated, the purpose is to check the serial communication device itself, and since it differs depending on the equipment in which this serial communication device is used, it is not particularly limited. However, an example is shown below.

テストモート動作は、例えば、−船釣なCPtJのチエ
ツクプログラムと呼ばれている入出力のチエツクのよう
なもので、CPUから出力されたテスト用シリアルデー
タを受信データを受は取ったかのように通信装置104
に与える。その結果、通信装置104が出力するパラレ
ルデータと送信データ(シリアルアウトデータ)をCP
U105がチエツクするのである。勿論、通信が成功し
ている時の状態だけで無く、アブノーマル的な動作につ
いてもチエツクはなされるのである。
The test mode operation is, for example, something like an input/output check called a CPtJ check program, which communicates test serial data output from the CPU as if it were receiving data. device 104
give to As a result, the parallel data and transmission data (serial out data) output by the communication device 104 are transferred to the CP.
U105 checks it. Of course, not only the status when communication is successful, but also abnormal operations are checked.

テストが終了するとステップS25に移り、テストモー
ドの解除をチエツクする。そして、仮にまだ解除されて
無ければステップS24に戻りテスト動作をもう一度繰
り返す。又、テスト動作が解除されていればステップS
llに戻る。
When the test is completed, the process moves to step S25, and a check is made to cancel the test mode. If it has not been released yet, the process returns to step S24 and the test operation is repeated once again. Also, if the test operation is canceled, step S
Return to ll.

次に、第20図を用いて、各スレーブ側のテストモード
イン動作について説明をする。尚、本例におけるテスト
モード動作については、説明を容易にする為マスター側
とスレーブ側に分けて説明するが、通信装置としてどの
テストモード動作をしてもよく、ハード的にも特に区別
は無い。
Next, the test mode-in operation on each slave side will be explained using FIG. 20. Note that the test mode operation in this example will be explained separately for the master side and slave side for ease of explanation, but the communication device can operate in any test mode, and there is no particular distinction in terms of hardware. .

第20図において、テスト動作を実施する為のものとし
て、108と109の手段が付加されている。108は
受信したデータのIDデータがテストモードインを示す
ものか否かをチエツクするテストモードイン検出手段で
あって、予め登録されているID番号“xx”と受信し
たID番号を比較するID比較回路である。109はI
D比較回路108の結果によって本通信装置に入力する
受信シリアルデータを、マスター側から受信したものに
するか、自分自身で出力した送信シリアルデータにする
かを選択するセレクト回路である。尚、自分が送出した
シリアルデータなら、そのデータ内のIDデータは、比
較選択回路20での比較結果において受信データエラー
にならないため、本通信装置での送信データ入力で人力
したデータが受信データ出力に出てくるようになる。つ
まり、各センサ類の状態がそれぞれに対応した出力のア
クチュエータ類に出力されるのである。尚、チエツク時
は、チエツク治具等を本通信装置に取付け、例えばスイ
ッチ類の入力に対してLED類で受けても良い。又、機
器に取付けた状態であっても上述した如く治具なしでも
チエツク出来るのである。
In FIG. 20, means 108 and 109 are added for carrying out test operations. Reference numeral 108 is a test mode-in detection means for checking whether the ID data of the received data indicates test mode-in, and is an ID comparison means for comparing the received ID number with the pre-registered ID number "xx". It is a circuit. 109 is I
This is a selection circuit that selects whether the received serial data to be input to the communication device is the one received from the master side or the transmitted serial data outputted by itself according to the result of the D comparison circuit 108. Furthermore, if it is serial data that you have sent, the ID data in that data will not result in a received data error in the comparison result in the comparison and selection circuit 20, so the data manually entered by the transmission data input in this communication device will be the received data output. It begins to appear. In other words, the state of each sensor is output to the actuator with the corresponding output. When checking, a check jig or the like may be attached to the communication device, and for example, inputs from switches may be received by LEDs. Furthermore, even when it is attached to a device, it can be checked without a jig as described above.

以上がスレーブ側のテスト動作であるが、上述したよう
に全くハートだけで実施しても良いが、スレーブ側にも
マスター側のようにCPU等が存在する時には、マスタ
ーと同様なテスト動作をおこなっても良いことは言うま
でもない。
The above is the test operation on the slave side. As mentioned above, it may be performed entirely by the heart, but if the slave side also has a CPU, etc. like the master side, it is necessary to perform the same test operation as on the master side. Needless to say, it's a good thing.

以上説明したように、各スレーブ通信装置からの返信の
有無に応じ、カウントするカウント手段を特有番号別に
複数有し、カウント値が全て所定値を越えると通信エラ
ーの判断する、あるいは複数のカウント手段のうち幾つ
かのカウント値が所定値を越えると、カウント手段の属
するユニットが存在しないと判断することにより、転送
先の通信装置の有無が機器の主制御部レベルで判断出来
るという効果がある。
As explained above, there is a plurality of counting means for each unique number depending on whether there is a reply from each slave communication device, and if all the count values exceed a predetermined value, it is determined that there is a communication error, or there are multiple counting means. If some of the count values exceed a predetermined value, it is determined that the unit to which the counting means belongs does not exist, thereby making it possible to determine whether there is a communication device as a transfer destination at the level of the main control unit of the device.

又、スレーブ通信装置がない、つまりはユニット無しと
判断するとそのユニットに対する主制御手段からの送信
データを送出しないことにより、通信効率の向上という
効果もある。
Furthermore, when it is determined that there is no slave communication device, that is, there is no unit, the main control means does not send data to that unit, thereby improving communication efficiency.

又、受信データ内で指定された特有番号が主制御手段の
登録番号と判断した時は、直ちにシリアル通信を止め、
単独でテストモードに入ることにより、機器の組立にお
いての調整チエツクが容易に出来るという効果がある。
Also, when it is determined that the unique number specified in the received data is the registration number of the main control means, it immediately stops serial communication and
By entering the test mode alone, there is an effect that adjustment checks can be easily made in assembling equipment.

又、送信データ内の特有番号が主制御手段の登録番号を
送出したと判断すると、直ちにシリアル通信を止め、単
独でテストモードに入ることにより、調整チエツクが容
易に出来るという効果や送信データ内の特有番号を主制
御手段の登録番号で送出する時は、複数回送出すること
により、単発的に起こり得る通信エラーによって自己診
断モードに入り損なう通信装置を救うようにした効果も
ある。
In addition, when it is determined that the unique number in the transmitted data has sent the registration number of the main control means, it immediately stops serial communication and enters the test mode independently, making it easier to check the adjustment and When transmitting the unique number as the registration number of the main control means, transmitting it multiple times has the effect of saving a communication device that fails to enter the self-diagnosis mode due to a communication error that may occur sporadically.

[発明の効果] 本発明により、双方向転送での衝突を防ぎ誤伝達をなく
し高速な伝送が可能なシリアル通信装置を提供できる。
[Effects of the Invention] According to the present invention, it is possible to provide a serial communication device that can prevent collisions in bidirectional transfer, eliminate erroneous transmission, and perform high-speed transmission.

特に光通信において、双方向で転送すると発生する各々
の光の衝突や外乱光による誤伝達等の問題を解決し、外
乱データのデータ化を防ぐようにしたものである。
In particular, in optical communication, problems such as collision of lights and mistransmission due to disturbance light that occur when transferring data in both directions are solved, and disturbance data is prevented from being converted into data.

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

第1図は本実施例のシリアル通信装置の構成を示すブロ
ック図、 第2図は第1図の復調及び変調回路の詳細な回路例を示
す図、 第3図、第4図は第2図に示す回路図のタイミングチャ
ート、 第5図は第1図の比較選択回路の詳細な回路例を示す図
、 第6図は比較回路の比較条件を示した図、第7図、第8
図は第5図に示す回路図のタイミングチャート、 第9図、第10図は本実施例の変形例を示す図、 第11図は本実施例のシリアル通信装置を適用したシス
テムの構成図、 第12図は本実施例のシリアル通信装置をマスター側に
使用する場合の分周制御例を示す図、 第 3図は本実施例のシ リ アル通信装置を スレイブ側に使用する場合の分周制御例を示す図、 第 4図は受信エラー時にエラーを返信する回路例を示す図
、 第1 5図は第1 4図に示す回路図のタイミング チャート、 第1 6図。 第17図は通信エラーの検出回路例 を示す図、 第 8図はマスター側のテストモードの回路例を示す図、 第1 9図はCPU 1 05の制御例を示すフロー チャート、 第20図はスレーブ側のテストモードの回路例を示す図
である。 図中、1・・・局分周回路、2・・・多段分周回路、3
・・・タイミング発生回路、4・・・同期取り回路、5
・・・分周制御回路、6・・・復調変換回路、7・・・
エラー検出回路、8・・・IDデータ入力回路、9・・
・データ入力回路、10・・・データ出力回路、11゜
12.13.14・・・送信データのための各データ出
力回路、15・・・データエンコーダ回路、16・・・
8ビツトシフトレジスタ、17,18.19・・・各シ
フトデータのラッチ回路、20・・・比較選択回路、2
1・・・変調変換回路、22..23・・・ANDゲー
ト、81.94〜96・・・カウンタ回路、90・・・
セレクタ回路、97・・・ANDゲート、100・・・
主制御装置、101,101′・・・光通信ターミナル
、102・・・ドライブ回路、102a・・・発光素子
、103・・・増幅回路、103a・・・受光素子、1
04,104’・・・シリアル通信装置、105・・・
CPU、81.94〜96・・・カウンタ回路、90・
・・セレクタ回路、97・・・ANDゲート、106・
・・セレクタ回路、107・・・テスト入力手段、10
8・・・テストモードイン検出手段、109・・・セレ
クト回路、110,120゜130・・・ユニット装置
である。
FIG. 1 is a block diagram showing the configuration of the serial communication device of this embodiment, FIG. 2 is a diagram showing a detailed circuit example of the demodulation and modulation circuit in FIG. 1, and FIGS. 3 and 4 are the diagrams in FIG. 5 is a diagram showing a detailed circuit example of the comparison and selection circuit shown in FIG. 1, FIG. 6 is a diagram showing the comparison conditions of the comparison circuit, and FIGS.
The figure is a timing chart of the circuit diagram shown in FIG. 5, FIGS. 9 and 10 are diagrams showing modifications of this embodiment, and FIG. 11 is a configuration diagram of a system to which the serial communication device of this embodiment is applied. Fig. 12 is a diagram showing an example of frequency division control when the serial communication device of this embodiment is used on the master side, and Fig. 3 is an example of frequency division control when the serial communication device of this embodiment is used on the slave side. FIG. 4 is a diagram showing an example of a circuit that returns an error in the event of a reception error. FIG. 15 is a timing chart of the circuit diagram shown in FIG. 14. FIG. FIG. 17 is a diagram showing an example of a communication error detection circuit, FIG. 8 is a diagram showing an example of a circuit in test mode on the master side, FIG. 19 is a flowchart showing an example of control of the CPU 105, and FIG. It is a figure which shows the circuit example of the side test mode. In the figure, 1... station frequency divider circuit, 2... multistage frequency divider circuit, 3
...Timing generation circuit, 4...Synchronization acquisition circuit, 5
... Frequency division control circuit, 6... Demodulation conversion circuit, 7...
Error detection circuit, 8... ID data input circuit, 9...
・Data input circuit, 10...Data output circuit, 11゜12.13.14...Each data output circuit for transmission data, 15...Data encoder circuit, 16...
8-bit shift register, 17, 18.19... Latch circuit for each shift data, 20... Comparison selection circuit, 2
1... Modulation conversion circuit, 22. .. 23...AND gate, 81.94-96...Counter circuit, 90...
Selector circuit, 97...AND gate, 100...
Main control device, 101, 101'... Optical communication terminal, 102... Drive circuit, 102a... Light emitting element, 103... Amplifying circuit, 103a... Light receiving element, 1
04,104'...Serial communication device, 105...
CPU, 81.94-96... Counter circuit, 90.
...Selector circuit, 97...AND gate, 106.
...Selector circuit, 107...Test input means, 10
8... Test mode-in detection means, 109... Select circuit, 110, 120° 130... Unit device.

Claims (3)

【特許請求の範囲】[Claims] (1)分散した出力信号や入力信号を物理的・機能的に
複数のブロック単位にまとめたユニット群と該ユニット
群を総括制御する主制御部とを有する装置で、前記主制
御部と前記ユニット群との間で情報をシリアルに伝達す
るシリアル通信装置であつて、 データ送信中にデータ受信を禁止する第1の受信禁止手
段と、 一旦受信データを受信した後の所定期間、 新たなデータ受信の開始を禁止する第2の受信禁止手段
とを備えることを特徴とするシリアル通信装置。
(1) A device having a unit group in which distributed output signals and input signals are physically and functionally organized into a plurality of blocks, and a main control section that collectively controls the unit group, wherein the main control section and the unit A serial communication device that serially transmits information to and from a group of devices, the device comprising: a first reception prohibition means for prohibiting data reception during data transmission; a second reception inhibiting means for inhibiting the start of a serial communication device.
(2)マスター側で使用される場合に、前記所定期間経
過後にデータ受信を許可し、更に所定期間新たなデータ
受信が無い場合に、次のデータ送信を開始する送信開始
手段を更に備えることを特徴とする請求項第1項記載の
シリアル通信装置。
(2) When used on the master side, further comprising a transmission start means that permits data reception after the predetermined period has elapsed and starts the next data transmission if no new data is received for the predetermined period. The serial communication device according to claim 1, characterized in that:
(3)電気信号と光信号との変換を行う光電変換手段を
更に備え、情報のシリアル伝達は光による光通信で行わ
れることを特徴とする請求項第1項又は第2項記載のシ
リアル通信装置。
(3) Serial communication according to claim 1 or 2, further comprising a photoelectric conversion means for converting an electrical signal and an optical signal, and the serial transmission of information is performed by optical communication using light. Device.
JP2043797A 1990-02-23 1990-02-23 Serial communication equipment Pending JPH03247045A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2043797A JPH03247045A (en) 1990-02-23 1990-02-23 Serial communication equipment
US07/658,391 US5325376A (en) 1990-02-23 1991-02-20 Communication system for detecting a communication error in information transmitted between a plurality of units and a main control unit
EP91102567A EP0443589B1 (en) 1990-02-23 1991-02-22 Serial comunication apparatus and corresponding method
DE69131360T DE69131360T2 (en) 1990-02-23 1991-02-22 Device and method for serial data transmission
HK98113118A HK1012152A1 (en) 1990-02-23 1998-12-10 Serial communication apparatus and corresponding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2043797A JPH03247045A (en) 1990-02-23 1990-02-23 Serial communication equipment

Publications (1)

Publication Number Publication Date
JPH03247045A true JPH03247045A (en) 1991-11-05

Family

ID=12673740

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2043797A Pending JPH03247045A (en) 1990-02-23 1990-02-23 Serial communication equipment

Country Status (1)

Country Link
JP (1) JPH03247045A (en)

Similar Documents

Publication Publication Date Title
US3878512A (en) Data transmitting system
US4330858A (en) Time domain supervisory channel for data terminal equipments
US4428046A (en) Data processing system having a star coupler with contention circuitry
JPS6053492B2 (en) Wireless communication system function control device
EP0825576B1 (en) Remote control system
JP2831070B2 (en) Heterogeneous signal conversion method and apparatus
JP2753915B2 (en) Communication control device
EP0443589B1 (en) Serial comunication apparatus and corresponding method
US5379325A (en) Clock generating apparatus, data transmitting/receiving apparatus and data transmitting/receiving method
JPS61214834A (en) Composite information transmission system
JPH03247045A (en) Serial communication equipment
JPH03247044A (en) Serial communication equipment
JPH03247047A (en) Serial communication equipment
JPH03247046A (en) Serial communication equipment
JPH03247048A (en) Serial communication equipment
US5764642A (en) System for combining data packets from multiple serial data streams to provide a single serial data output and method therefor
JPS58225756A (en) Serial data communication device
US6545617B1 (en) Asynchronous serial data receiving device and asynchronous serial data transmitting device
JPH0255434A (en) code generator
JPS61134145A (en) Communication speed setting device
SU1309330A1 (en) Selective call signal
JPS6254249B2 (en)
JPH0143501B2 (en)
JPS633534A (en) Data transmission system between plural equipments
JPS6355259B2 (en)