JPH048980B2 - - Google Patents

Info

Publication number
JPH048980B2
JPH048980B2 JP56194449A JP19444981A JPH048980B2 JP H048980 B2 JPH048980 B2 JP H048980B2 JP 56194449 A JP56194449 A JP 56194449A JP 19444981 A JP19444981 A JP 19444981A JP H048980 B2 JPH048980 B2 JP H048980B2
Authority
JP
Japan
Prior art keywords
data
microcomputer
bit
processing device
data processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP56194449A
Other languages
Japanese (ja)
Other versions
JPS5896339A (en
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 filed Critical
Priority to JP56194449A priority Critical patent/JPS5896339A/en
Priority to US06/444,984 priority patent/US4608689A/en
Priority to GB08234479A priority patent/GB2115654B/en
Priority to DE19823244848 priority patent/DE3244848A1/en
Publication of JPS5896339A publication Critical patent/JPS5896339A/en
Publication of JPH048980B2 publication Critical patent/JPH048980B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Control Or Security For Electrophotography (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Description

【発明の詳細な説明】 本発明は、マイクロコンピユータを有する第1
のデータ処理装置と、マイクロコンピユータを有
する第2のデータ処理装置との間のデータ通信方
式に関し、特にデータ通信前に第1、第2の伝送
路のうち第1の伝送路によるデータの通信が可能
か否かを相手処理装置とのクロツクパルス列の送
受信に基づき判別し、通信不能の場合にはデータ
通信に用いる伝送路を第2の伝送路に切換えるこ
とを可能としたデータ通信方式に関するものであ
る。
DETAILED DESCRIPTION OF THE INVENTION The present invention provides a first
Regarding a data communication method between a data processing device and a second data processing device having a microcomputer, in particular, data communication via the first transmission path of the first and second transmission paths is performed before data communication. Relates to a data communication method that makes it possible to determine whether communication is possible based on transmission and reception of clock pulse trains with the other processing device, and to switch the transmission path used for data communication to a second transmission path if communication is impossible. It is.

一般に、操作性を同上させ、複写品質を精緻に
制御する複写機においては、複写機本体とソータ
や入力センサなどを備えた付加装置との間で相互
に各種のデータを授受するデータ転送装置が必要
である。この種の従来のデータ転送装置は、第1
図に示すように、複写機本体11に中央処理装置
(CPU)12、I/Oコントローラ13、出力ド
ライバ14、入力インターフエイス15、CPU
用電源回路16および付加装置用電源回路17を
有している。付加装置18には、シーケンスコン
トローラ19、入力インターフエイス20A、出
力ドライバ21A、出力負荷22Aおよび入力セ
ンサ23Aを有しており、相互のデータ転送用に
各種信号に応じた本数の接続線からなる、例えば
フラツトケーブルを使用している。
Generally, in a copying machine that improves operability and precisely controls copy quality, there is a data transfer device that exchanges various data between the copying machine main body and additional devices equipped with a sorter, input sensor, etc. is necessary. This type of conventional data transfer device has a first
As shown in the figure, a copying machine body 11 includes a central processing unit (CPU) 12, an I/O controller 13, an output driver 14, an input interface 15, and a CPU.
16 and a power supply circuit 17 for additional devices. The additional device 18 has a sequence controller 19, an input interface 20A, an output driver 21A, an output load 22A, and an input sensor 23A, and is composed of a number of connection lines corresponding to various signals for mutual data transfer. For example, using a flat cable.

複写機本体11の入力インターフエイス15お
よび付加装置18の入力インターフエイス20A
は、雑音防止対策として、第2図に示すように、
フオトカプラを用いて構成することもできる。し
かし、いずれにしても転送すべき信号の種類が増
すと、コネクタのピン数も増えることになり、コ
ネクタおよびケーブルが高価になるばかりでな
く、装置の信頼性の劣化を招く原因となつてい
る。また、ユニバーサルアシンクロナスレシーバ
トランスミツタ(UART)と称し、伝送速度が
10K〜20K(ビツト/秒)程度のシリアル転送が
できるデータ転送装置があるが、高価であり、汎
用性はもつているものの複写機本体とその付加装
置との間のデータ転送装置としては不向な点も多
い。
Input interface 15 of copying machine main body 11 and input interface 20A of additional device 18
As a noise prevention measure, as shown in Figure 2,
It can also be configured using a photocoupler. However, in any case, as the number of signals to be transferred increases, the number of connector pins also increases, which not only increases the cost of connectors and cables, but also causes deterioration in device reliability. . It is also called a universal asynchronous receiver transmitter (UART), and the transmission speed is
There are data transfer devices that can perform serial transfers of about 10K to 20K (bits per second), but they are expensive, and although they are versatile, they are not suitable as data transfer devices between the copying machine and its attached devices. There are many points.

そこで、複写機本体とその付加装置間に単線の
伝送路を接続してデータのシリアル転送を行う場
合は、その伝送路が故障するとただちにデータ転
送が不能になつてしまう欠点がある。
Therefore, when data is serially transferred by connecting a single-wire transmission line between the copying machine main body and its additional devices, there is a drawback that data transfer becomes impossible as soon as the transmission line breaks down.

本発明は上述した従来技術の欠点を除去し、第
1、第2のデータ処理装置間のデータ伝送路とし
て、第1または第2の複数の伝送路のうちデータ
通信に適したいずれかの伝送路をデータ通信前に
設定可能にするとともに、第1、第2のデータ処
理装置間の双方向のデータ通信に最適な伝送路の
設定を可能にしたデータ通信方式の提供を目的と
する。
The present invention eliminates the drawbacks of the prior art described above, and uses any one of the first or second plurality of transmission paths suitable for data communication as a data transmission path between the first and second data processing devices. It is an object of the present invention to provide a data communication method that allows a transmission path to be set before data communication, and also enables setting of a transmission path that is optimal for bidirectional data communication between a first and second data processing device.

すなわち、本発明はマイクロコンピユータを有
する第1のデータ処理装置と、マイクロコンピユ
ータを有する第2のデータ処理装置との間のデー
タ通信方式において、第1のデータ処理装置と第
2のデータ処理装置との間のデータ伝送路として
第1または第2の伝送路の設定を可能とし、前記
第1のデータ処理装置はデータの伝送に先立ち前
記第1の伝送路を用いて前記第2の処理装置に対
し、同期合わせのための第1のクロツクパルス列
を送信し、前記第2のデータ処理装置は前記第1
のデータ処理装置から送られてきた第1のクロツ
クパルス列を受信するとともに、第1のクロツク
パルス列の速度を演算し、その演算結果に基づき
第2のクロツクパルス列を作成し前記第1のデー
タ処理装置に送信することを特徴とし、さらに、
前記第1のデータ処理装置は前記第2のデータ処
理装置から送られてきた第2のクロツクパルス列
の速度を演算し、前記第1のクロツクパルス列の
送信時の速度と、前記演算により得られた第2の
クロツクパルス列の速度に基づき前記第1の伝送
路によるデータの通信が可能か不能かを判別し、
通信可能と判別した場合には第1の伝送路を用い
て前記第2のデータ処理装置へデータを送信し、
通信不能と判別した場合にはデータ通信のための
伝送路を第1の伝送路から第2の伝送路に切換え
ることを特徴とする。
That is, the present invention provides a data communication method between a first data processing device having a microcomputer and a second data processing device having a microcomputer, in which the first data processing device and the second data processing device It is possible to set a first or second transmission path as a data transmission path between In contrast, the second data processing device transmits a first clock pulse train for synchronization, and the second data processing device transmits a first clock pulse train for synchronization.
receives the first clock pulse train sent from the data processing device, calculates the speed of the first clock pulse train, creates a second clock pulse train based on the calculation result, and processes the first clock pulse train. transmitting to a data processing device;
The first data processing device calculates the speed of the second clock pulse train sent from the second data processing device, and calculates the speed at which the first clock pulse train is transmitted and the speed obtained by the calculation. determining whether data communication via the first transmission path is possible or not based on the speed of the second clock pulse train,
If it is determined that communication is possible, transmitting data to the second data processing device using the first transmission path,
The present invention is characterized in that when it is determined that communication is impossible, the transmission path for data communication is switched from the first transmission path to the second transmission path.

以下、図面を参照して、本発明について詳細に
説明する。
Hereinafter, the present invention will be described in detail with reference to the drawings.

第3図ないし第5図および第7図は本発明によ
るデータ通信装置の主要部の一構成例を示し、第
6図は第5図のユニツトの出力信号を示す。第3
図と第4図において、20は複写機本体用送受信
部、30は付加装置用送受信部、21と31はそ
れぞれデータの直並列変換および並直列変換を行
うデータ転送用マイクロコンピユータ、22と3
2はマスター/スレーブ切換スイツチであり、こ
のスイツチ22と32のいずれか一方をオンまた
はオフにすることにより、上述の送受信部20ま
たは30のいずれか一方をマスター側に、他をス
レーブ側に切換えることができる。23〜26お
よび33〜36は増幅器である。
3 to 5 and 7 show an example of the structure of the main part of a data communication device according to the present invention, and FIG. 6 shows an output signal of the unit shown in FIG. 5. Third
In the figure and FIG. 4, 20 is a transmitting/receiving section for the main body of the copying machine, 30 is a transmitting/receiving section for an additional device, 21 and 31 are data transfer microcomputers that perform data serial/parallel conversion and parallel/serial conversion, respectively.
Reference numeral 2 denotes a master/slave changeover switch, and by turning on or off one of the switches 22 and 32, one of the above-mentioned transmitter/receiver units 20 and 30 is switched to the master side and the other to the slave side. be able to. 23-26 and 33-36 are amplifiers.

27と37および27Aと37Aは出力するシ
リアルデジタルデータをFS(周波数偏移)変調す
る送信ユニツト、28と38および28Aと38
Aは入力データをFS復調する受信ユニツトであ
る。すなわち、送信ユニツト27および37また
は27Aおよび37Aは、第5図および第6図に
示すように、入力信号を方形波のみとして周波数
の偏移変調を行うFS変調回路からなり、スイツ
チ40により入力信号であるシリアルデジタルデ
ータのうちマーク部分とスペース部分を各々周波
12とに切替えて変調を行う。一方、受信ユ
ニツト28および38または28Aおよび38A
は、第7図に示すように、FS変調されている入
力信号をデジタルデータに変換するFS復調回路
からなり、位相弁別回路PD、低域通過形フイル
タLPF、電圧制御発振器VCOを有するフエーズ
ロツクドループ回路PLLと他の低域通過形フイ
ルタLPFおよび波形整形回路WSCとを有する。
27 and 37 and 27A and 37A are transmitting units that FS (frequency shift) modulate the output serial digital data; 28 and 38 and 28A and 38
A is a receiving unit that performs FS demodulation of input data. That is, the transmitting units 27 and 37 or 27A and 37A, as shown in FIG. 5 and FIG. Modulation is performed by switching the mark portion and space portion of the serial digital data to frequencies 1 and 2 , respectively. On the other hand, the receiving units 28 and 38 or 28A and 38A
As shown in Fig. 7, it consists of an FS demodulation circuit that converts an FS-modulated input signal into digital data, and is a phase lock circuit that includes a phase discrimination circuit PD, a low-pass filter LPF, and a voltage-controlled oscillator VCO. It has a droop circuit PLL, another low-pass filter LPF, and a waveform shaping circuit WSC.

第4図において、29はマスター側の第1の送
信ユニツト27とこれに並設した予備の第2の送
信ユニツト27Aとの間に設けた伝送路切替スイ
ツチであり、第1の送信ユニツト27が故障して
通信不能となつた際にその接点を切替えて第2の
送信ユニツト27Aとマスター側マイクロコンピ
ユータ21のR1ポートの“0”ピンのアンテナ
端子ANTとを接続させる。29Aは同様にマ
スター側の第1の受信ユニツト28とこれに並設
した予備の第2の受信ユニツト28Aとの間に設
けた伝送路切替スイツチであり、第1の受信ユニ
ツト28の通信不能時にその接点を切替えること
により第2の受信ユニツト28Aとマスター側マ
イクロコンピユータ21のR1ポートの“1”ピ
ンのアンテナ端子ANTとを接続させる。
In FIG. 4, reference numeral 29 denotes a transmission line changeover switch provided between the first transmitting unit 27 on the master side and a spare second transmitting unit 27A installed in parallel with it. When a failure occurs and communication becomes impossible, the contact is switched to connect the second transmitting unit 27A to the antenna terminal ANT of the "0" pin of the R1 port of the master side microcomputer 21. Similarly, 29A is a transmission line changeover switch provided between the first receiving unit 28 on the master side and a spare second receiving unit 28A installed in parallel with it, and is used when the first receiving unit 28 is unable to communicate. By switching the contacts, the second receiving unit 28A is connected to the antenna terminal ANT of the "1" pin of the R1 port of the master side microcomputer 21.

また、39はスレーブ側の第1の送信ユニツト
37とこれに並設した予備の第2の送信ユニツト
37Aとの間に設けた伝送路切替スイツチであ
り、第1の送信ユニツト37が故障して通信不能
となつた際にその接点を切替えて第2の送信ユニ
ツト37Aとスレーブ側マイクロコンピユータ3
1のR1ポートの“0”ピンのアンテナ端子ANT
とを接続させる。39Aは同様にスレーブ側の
第1の受信ユニツト38とこれに並設した予備の
第2の受信ユニツト38Aとの間に設けた伝送路
切替スイツチであり、第1の受信ユニツト28の
通信不能時にその接点を切替えることにより第2
の受信ユニツト38Aとスレーブ側マイクロコン
ピユータ31のR1ポートの“1”ピンのアンテ
ナ端子ANTとを接続させる。
Further, 39 is a transmission line changeover switch provided between the first transmitting unit 37 on the slave side and a spare second transmitting unit 37A installed in parallel with it, and is a transmission line changeover switch provided when the first transmitting unit 37 is out of order. When communication becomes impossible, the contact is switched between the second transmitting unit 37A and the slave side microcomputer 3.
Antenna terminal ANT of “0” pin of R1 port of 1
connect with. Similarly, 39A is a transmission line changeover switch provided between the first receiving unit 38 on the slave side and a spare second receiving unit 38A installed in parallel with it, and is used when the first receiving unit 28 is unable to communicate. By switching the contact point, the second
The receiving unit 38A of the slave side microcomputer 31 is connected to the antenna terminal ANT of the "1" pin of the R1 port of the slave side microcomputer 31.

41および41Aは複写機本体11からその付
加装置18に供給される電源の電源供給線であ
り、この並設された電源供給線41または41A
のいずれか一方にFS変調した高周波データを重
畳してデータのシリアル転送を行う。すなわち、
一方の電源供給線41は結合コンデンサ42を介
してマスター側の第1の送信ユニツト27と受信
ユニツト28とに接続すると同時に、他の結合コ
ンデンサ43を介してスリーブ側の第1の送信ユ
ニツト37と受信ユニツト38とに接続する第1
のデータ伝送路を形成する。他方の電源供給線4
1Aは結合コンデンサ42Aを介してマスター側
の第2の送信ユニツト27Aと受信ユニツト28
Aとに接続すると同時に、他の結合コンデンサ4
3Aを介してスレーブ側の第1の送信ユニツト3
7Aと受信ユニツト38Aとに接続する第2のデ
ータ伝送路を形成する。従つて、第2の電源供給
線41Aは第1の通信回線41が故障したときの
予備のデータ伝送路としての働きをする。なお、
上述の結合コンデンサ42と42Aおよび43と
43Aにより、対応する電源供給線41または4
1Aと送受信ユニツト27と28および37と3
8または27Aと28Aおよび37Aと38Aと
を高周波結合する。
41 and 41A are power supply lines for power supplied from the copying machine main body 11 to its additional device 18, and the power supply lines 41 or 41A installed in parallel
FS-modulated high-frequency data is superimposed on either one of the two to perform serial data transfer. That is,
One power supply line 41 is connected to the first transmitting unit 27 and receiving unit 28 on the master side via a coupling capacitor 42, and at the same time is connected to the first transmitting unit 37 on the sleeve side via another coupling capacitor 43. the first connected to the receiving unit 38;
form a data transmission path. Other power supply line 4
1A is connected to the second transmitting unit 27A and receiving unit 28 on the master side via a coupling capacitor 42A.
A and at the same time connect it to other coupling capacitor 4.
3A to the first transmitting unit 3 on the slave side
7A and the receiving unit 38A is formed. Therefore, the second power supply line 41A functions as a backup data transmission line when the first communication line 41 fails. In addition,
The above-mentioned coupling capacitors 42 and 42A and 43 and 43A allow the corresponding power supply line 41 or 4
1A and transmitting/receiving units 27 and 28 and 37 and 3
8 or 27A and 28A and 37A and 38A are high frequency coupled.

第3図に図示する44は高周波成分を除去する
フイルタ回路であり、電源供給線41および41
Aの電源に重畳された高周波成分をこのフイルタ
回路44により除去してからシーケンスコントロ
ーラ19に電源を供給する。
Reference numeral 44 shown in FIG. 3 is a filter circuit for removing high frequency components, and power supply lines 41 and 41
The filter circuit 44 removes the high frequency component superimposed on the power source A, and then supplies the power to the sequence controller 19.

次に、第1のデータ伝送路(電源供給線)41
を選択した場合のかかるデータ転送装置の動作を
説明する。マスター側のマイクロコンピユータ2
1のR1ポートの“0”ピンから出力するデータ
をアンテナ端子ANTを経て送信ユニツト27
に供給する。送信ユニツト27から出力するFS
変調信号の高周波成分をコンデンサ42を通して
電源供給線41に重畳する。次に、その高周波成
分を電源供給線41とコンデンサ43を介してス
レーブ側の受信ユニツト38に供給する。その受
信ユニツト38で復調したシリアルのデジタルデ
ータをスレーブ側のマイクロコンピユータ31の
R1ポートの“1”ピンに供給する。
Next, the first data transmission line (power supply line) 41
The operation of such a data transfer device when selecting is explained below. Master side microcomputer 2
The data output from the “0” pin of the R1 port of 1 is sent to the transmitting unit 27 via the antenna terminal ANT.
supply to. FS output from transmitting unit 27
The high frequency component of the modulation signal is superimposed on the power supply line 41 through the capacitor 42. Next, the high frequency component is supplied to the receiving unit 38 on the slave side via the power supply line 41 and the capacitor 43. The serial digital data demodulated by the receiving unit 38 is sent to the microcomputer 31 on the slave side.
Supply to “1” pin of R1 port.

更に説明すると、かかるデータ転送装置は、互
換性のある送受信部20,30を、それぞれ複写
機本体と付加装置とに備えている。送受信部2
0,30は1枚のプリント基板に、それぞれマイ
クロコンピユータ21,31とインターフエイス
回路を組込んだものである。
To explain further, this data transfer device includes compatible transmitting/receiving units 20 and 30 in the main body of the copying machine and in the additional device, respectively. Transmitter/receiver 2
0 and 30 have microcomputers 21 and 31 and an interface circuit built into one printed circuit board, respectively.

マイクロコンピユータ21,31は、データの
直並列変換と並直列変換を行う機能を有してお
り、R4ポートに接続したスイツチ22,32で
マスター/スレーブの設定を行う。第4図に図示
の場合は、複写機本体用送受信部20のマイクロ
コンピユータ21がマスター、付加装置用送受信
部30のマイクロコンピユータ31がスレーブと
なつている。マイクロコンピユータ21,31に
は、電源端子Vcc、アース端子Vssおよび制御端
子RT,EX,Xがあり、電源端子Vccに電源が供
給されると、制御端子RTにシステムのイニシア
ライズのためにリセツト信号が供給され、また制
御端子EX,Xに発振振動子が接続され、例えば
2MHzのクロツクパルスが発振される。ところで、
マイクロコンピユータ21,31としては、例え
ばROM(リードオンリメモリ)とRAM(ランダ
ムアクセスメモリ)を1チツプに収容したマイク
ロプロセツサを適用することができる。
The microcomputers 21 and 31 have the function of performing serial-parallel conversion and parallel-serial conversion of data, and perform master/slave settings using switches 22 and 32 connected to the R4 port. In the case shown in FIG. 4, the microcomputer 21 of the copying machine body transmitting/receiving section 20 is the master, and the microcomputer 31 of the additional device transmitting/receiving section 30 is the slave. The microcomputers 21 and 31 have a power terminal Vcc, a ground terminal Vss, and control terminals RT, EX, and X. When power is supplied to the power terminal Vcc, a reset signal is sent to the control terminal RT to initialize the system. is supplied, and an oscillating resonator is connected to the control terminals EX, X, for example.
A 2MHz clock pulse is generated. by the way,
As the microcomputers 21 and 31, for example, a microprocessor containing a ROM (read only memory) and a RAM (random access memory) in one chip can be used.

このデータ転送装置において、いま送受信部2
0の端子P113〜P124からなる入力端子
IN1に複写機本体からデータが供給されると、
そのデータを増幅器23,24が増幅し、R2ポ
ート、R3ポートおよびKポートの各端子を介し
て、マイクロコンピユータ21が読み込み、直列
データに変換してポートR1からアンテナ端子
ANT、送信ユニツト27、結合コンデンサ4
2、電源供給ライン41および結合コンデンサ4
3等を介して送受信部30へ伝送する。この送受
信部30は、受信ユニツト38およびアンテナ端
子ANTを介して、当該直列データを受信し、
マイクロコンピユータ31のR1ポートに入力す
る。マイクロコンピユータ31は、その直列デー
タを再び並列データに変換し、OポートおよびP
ポートの各端子を介して増幅器33,34に供給
する。そして、増幅器33,34は、並列データ
を増幅して、端子P201〜P212からなる出
力端子OUT2に転送する。
In this data transfer device, the transmitter/receiver 2
Input terminal consisting of 0 terminals P113 to P124
When data is supplied to IN1 from the copying machine,
The data is amplified by amplifiers 23 and 24, and read by the microcomputer 21 through each terminal of the R2 port, R3 port, and K port, converted into serial data, and sent from port R1 to the antenna terminal.
ANT, transmitting unit 27, coupling capacitor 4
2. Power supply line 41 and coupling capacitor 4
3, etc., to the transmitting/receiving section 30. The transmitting/receiving section 30 receives the serial data via the receiving unit 38 and the antenna terminal ANT,
Input to the R1 port of the microcomputer 31. The microcomputer 31 converts the serial data into parallel data again and connects the O port and P
The signal is supplied to amplifiers 33 and 34 through each terminal of the port. The amplifiers 33 and 34 then amplify the parallel data and transfer it to the output terminal OUT2 consisting of terminals P201 to P212.

同様にして、スレーブ側の送受信部30が、マ
スター側の送受信部20へデータを伝送する場合
には、付加装置が端子P213〜P224からな
る入力端子IN2に入力するデータを、増幅器3
5,36、マイクロコンピユータ31、アンテナ
端子ANT、送信ユニツト37、結合コンデン
サ43、電源供給ライン41および結合コンデン
サ42、受信ユニツト28、アンテナ端子ANT
、マイクロコンピユータ21、増幅器25,2
6をそれぞれ介して、端子P101〜P112か
らなる出力端子OUT1に転送することができる。
この場合、マイクロコンピユータ31は、データ
の並直列変換を行い、マイクロコンピユータ21
は、データの直並列変換を行う。このように、送
受信部20,30は、電源供給線41を経由して
双方向のデータ転送を行うことができる。
Similarly, when the transmitter/receiver 30 on the slave side transmits data to the transmitter/receiver 20 on the master side, the additional device transmits the data input to the input terminal IN2 consisting of terminals P213 to P224 to the amplifier 3.
5, 36, microcomputer 31, antenna terminal ANT, transmitting unit 37, coupling capacitor 43, power supply line 41 and coupling capacitor 42, receiving unit 28, antenna terminal ANT
, microcomputer 21, amplifiers 25, 2
6, respectively, to an output terminal OUT1 consisting of terminals P101 to P112.
In this case, the microcomputer 31 performs parallel-to-serial conversion of data, and the microcomputer 21
performs serial-to-parallel conversion of data. In this way, the transmitting/receiving units 20 and 30 can perform bidirectional data transfer via the power supply line 41.

第8図は第4図のデータ転送装置に適用するコ
ミニユケーシヨンフオーマツトの一例を示す。た
だし、電源供給線41の信号成分のみを示したも
のであり、FS変調された高周波成分そのものを
示すものではない(第5図参照)。マイクロコン
ピユータ21,31は、図示のように、ステツプ
〜の11ステツプを実行することによつて、1
フレームのデータ転送を行うことができる。ステ
ツプ,においては、マスター側のマイクロコ
ンピユータ21とスレーブ側のマイクロコンピユ
ータ31が転送クロツクの同期制御を行う。そこ
で、マイクロコンピユータ21は、伝送ラインが
オープンになつている状態であるステツプか
ら、1フレームのビツト0が“1”から“0”に
なることにより、ステツプを開始し、TASK
1として8ビツトからなる周期TMの転送クロツ
クパルスをマイクロコンピユータ31へ伝送す
る。
FIG. 8 shows an example of a communication format applied to the data transfer device of FIG. 4. However, only the signal component of the power supply line 41 is shown, and it does not show the FS-modulated high frequency component itself (see FIG. 5). As shown in the figure, the microcomputers 21 and 31 complete 1 by executing 11 steps.
Frame data transfer can be performed. In step 2, the microcomputer 21 on the master side and the microcomputer 31 on the slave side perform synchronization control of the transfer clocks. Therefore, the microcomputer 21 starts the step by changing the bit 0 of one frame from "1" to "0" from the step where the transmission line is open, and then starts the TASK step.
A transfer clock pulse of period TM consisting of 8 bits as 1 is transmitted to the microcomputer 31.

この期間に、マイクロコンピユータ31は、0
ビツトの立ち上りよりTASK2を起動し、マス
ター側から送られてくる転送クロツクパルスの周
期TMをビツト0〜7の8回測定し、演算処理し
て転送クロツク周期の平均値TSを求め、これを
ステツプの段階でアンテナ端子ANTを通し
てビツト8〜15でマイクロコンピユータ21へ
返送する。そして、マイクロコンピユータ21
は、アンテナ端子ANTを通して供給された転
送クロツク周期TMと平均値TSが等しいかどう
かをチエツクする。もし、TM≠TSであれば、
マイクロコンピユータ31とのコミニユケーシヨ
ンはできないので、ステツプのビツト16でア
ンテナ端子ANTを“0”にしてマイクロコン
ピユータ31に知らせることにより、お互いの通
信の不成立を認識し合い、初期の状態からやり直
す。従つて、ステツプで“0”がない限りステ
ツプに進めることができる。しかし、TM=
TSであれば、マイクロコンピユータ21は真の
データの開始点を決めるため、ステツプでビツ
ト17を“0”にし、TASK4の実行を開始す
る。マイクロコンピユータ21は、ステツプに
おけるビツト17から転送クロツクの計数を開始
する。従つて、このビツト17の立ち下りから転
送のビツトの周期が始まり、このビツト17から
ビツト49まで各ビツトの周期はTM=TSであ
る。
During this period, the microcomputer 31
Activate TASK2 at the rising edge of the bit, measure the period TM of the transfer clock pulse sent from the master side eight times (bits 0 to 7), perform arithmetic processing to obtain the average value TS of the transfer clock period, and use this to calculate the average value TS of the transfer clock period. At this stage, bits 8 to 15 are sent back to the microcomputer 21 through the antenna terminal ANT. And the microcomputer 21
checks whether the transfer clock period TM supplied through the antenna terminal ANT and the average value TS are equal. If TM≠TS,
Since communication with the microcomputer 31 is not possible, by setting the antenna terminal ANT to "0" in step 16 and notifying the microcomputer 31, the microcomputer 31 recognizes the failure of communication and starts over from the initial state. . Therefore, as long as there is no "0" in the step, it is possible to proceed to the step. However, TM=
If it is TS, the microcomputer 21 sets bit 17 to "0" in step to determine the starting point of the true data and starts executing TASK4. The microcomputer 21 starts counting the transfer clocks from bit 17 in step. Therefore, the transfer bit period starts from the falling edge of bit 17, and the period of each bit from bit 17 to bit 49 is TM=TS.

次のステツプ,において、マイクロコンピ
ユータ21はTASK3を実行し、まずビツト1
8〜29からなる12ビツトのシリアルデータをア
ンテナ端子ANTおよびANTを介してマイ
クロコンピユータ31に転送し、次いでステツプ
のビツト30〜32の3ビツトからなるチエツ
クビツトを伝送する。このチエツクビツトのう
ち、ビツト30は偶数パリテイビツトとしてもよ
いが、本実施例においては、前のビツト29の補
数をセツトするように“0”とし、ビツト29と
ビツト30の区別を明確にしている。チエツクビ
ツトにおけるビツト31は、データの内容によつ
てセツトするものとし、本実施例においては12ビ
ツトのデータの第7番目のビツトであるビツト2
5と同じ値である“1”をセツトする。ビツト3
2のチエツクビツトは、最終ビツトを表わすため
に“0”にし、このビツト32の終了時に“1”
にセツトして、ビツト33ではアンテナ端子
ANTを開放する。
In the next step, the microcomputer 21 executes TASK3 and first bit1.
12-bit serial data consisting of bits 8 to 29 is transferred to the microcomputer 31 via antenna terminals ANT and ANT, and then a check bit consisting of 3 bits 30 to 32 of the step is transmitted. Of these check bits, bit 30 may be an even parity bit, but in this embodiment, it is set to "0" so as to set the complement of the previous bit 29, thereby clarifying the distinction between bit 29 and bit 30. Bit 31 in the check bit is set depending on the content of the data, and in this embodiment, bit 2, which is the seventh bit of the 12-bit data, is set.
Set "1" which is the same value as 5. Bit 3
Check bit 2 is set to "0" to represent the final bit, and set to "1" at the end of bit 32.
and set the antenna terminal to bit 33.
Unlock ANT.

マイクロコンピユータ21が、ステツプ〜
において、TASK3を実行している期間に、マ
イクロコンピユータ31は転送されたデータを読
み込むTASK4を実行する。このようにして、
マイクロコンピユータ21は、送受信部20の端
子P113〜P124にそれぞれ供給された並列
データを直列データに変換して、アンテナ端子
ANTを介して電源供給線41に送出し、マイ
クロコンピユータ31は、アンテナ端子ANT
を介してその直列データを受信し、再び並列デー
タに変換して、送受信部30の端子P201〜P
212にそれぞれ供給する。従つて、送受信部2
0の入力端子IN1における端子P112〜P1
24に供給されたデータは、送受信部30の出力
端子OUT2の対応する端子P201〜P212
にそれぞれ分配されることになる。
The microcomputer 21 steps ~
During the period in which TASK3 is being executed, the microcomputer 31 executes TASK4 to read the transferred data. In this way,
The microcomputer 21 converts the parallel data supplied to the terminals P113 to P124 of the transmitter/receiver 20 into serial data, and outputs the serial data to the antenna terminal.
The microcomputer 31 sends the power to the power supply line 41 via the antenna terminal ANT.
The serial data is received via the terminals P201 to P201 of the transmitting/receiving section 30, and converted into parallel data again.
212 respectively. Therefore, the transmitter/receiver 2
Terminals P112 to P1 at input terminal IN1 of 0
24 is sent to the corresponding terminals P201 to P212 of the output terminal OUT2 of the transmitter/receiver 30.
will be distributed to each.

ところで、ステツプにおいては、マイクロコ
ンピユータ21,31が、送受信モードを切換え
データの伝送方向を変える準備を行う。そして、
ステツプではスレーブ側のマイクロコンピユー
タ31が、データの送信を開始するため、ビツト
34を“0”にセツトするとともに、転送クロツ
クの計数を始める。マイクロコンピユータ31
は、既にステツプ,において転送クロツクの
同期をとつているので、ステツプにおいて転送
クロツク周期TMで12ビツトのシリアルデータ
(ビツト35〜46)をアンテナ端子ANTか
ら送信ユニツト37でFS変調し、結合コンデン
サ43を通して送出し、マイクロコンピユータ2
1に順次伝送することができる。また、ステツプ
において、マイクロコンピユータ31は、ステ
ツプの要領で3ビツトのチエツクビツト(ビツ
ト37〜39)をマイクロコンピユータ21に送
出する。かくして、マイクロコンピユータ31
が、データを送信するTASK3を実行している
期間に、マイクロコンピユータ21は、そのデー
タを受信するTASK4を実行する。従つて、送
受信部30の入力端子IN2における端子P21
3〜P224に供給されたデータを、送受信部2
0の出力端子OUT1の対応する端子P101〜
P112にそれぞれ供給することができる。ステ
ツプにおいては、マイクロコンピユータ21,
31とも、アンテナ端子ANTをオープン状態
にして、次のデータ転送を行うフレームのステツ
プの開始を待つTASK0となる。
By the way, in step, the microcomputers 21 and 31 prepare to change the transmission/reception mode and change the data transmission direction. and,
In step, the microcomputer 31 on the slave side sets the bit 34 to "0" and starts counting the transfer clock in order to start transmitting data. Microcomputer 31
Since the transfer clock has already been synchronized in step 2, the 12-bit serial data (bits 35 to 46) is FS-modulated from the antenna terminal ANT by the transmitting unit 37 in the transfer clock cycle TM, and the coupling capacitor 43 through the microcomputer 2
1 can be transmitted sequentially. Also, in step, microcomputer 31 sends 3 check bits (bits 37 to 39) to microcomputer 21 in the same manner as in step. Thus, the microcomputer 31
While the microcomputer 21 is executing TASK3 for transmitting data, the microcomputer 21 executes TASK4 for receiving the data. Therefore, the terminal P21 at the input terminal IN2 of the transmitting/receiving section 30
3 to P224, the data supplied to the transmitting/receiving section 2
Corresponding terminal P101 of output terminal OUT1 of 0
P112 respectively. In the step, the microcomputer 21,
31 is TASK0, which opens the antenna terminal ANT and waits for the start of the frame step for the next data transfer.

第9図はマイクロコンピユータ21,31にお
ける要部の構成を示すブロツク図である。マイク
ロコンピユータ21,31は、それぞれ制御記憶
部51、RAM(ランダムアクセスメモリ)部5
2、演算論理ユニツト53およびアキユームレー
タ54を有している。ここで、制御記憶部51の
ROM(リードオンリメモリ)は、マイクロ命令
とデータの転送クロツク周期などの制御に必要な
情報を記憶している。デコーダDCRは、ROMか
ら読み出されたデータの解読を行い、プログラム
カウンタPCは、ROMのアドレスを指定する。ま
た、スタツクSTKは、例えばLIFO(ラストイン
フアーストアウト)の形式で使用される一連のレ
ジスタである。
FIG. 9 is a block diagram showing the configuration of essential parts of the microcomputers 21 and 31. The microcomputers 21 and 31 each have a control storage section 51 and a RAM (random access memory) section 5.
2, an arithmetic logic unit 53 and an accumulator 54. Here, the control storage section 51
The ROM (read-only memory) stores information necessary for controlling microinstructions and data transfer clock cycles. The decoder DCR decodes data read from the ROM, and the program counter PC specifies the address of the ROM. Additionally, the stack STK is a series of registers used, for example, in a LIFO (last in first out) format.

次に、RAM部52は複数のメモリ領域からな
り、そのアドレスはX,Yアドレスレジスタが指
定する。複数のメモリ領域のうち、RAM1は入
力端子IN1あるいは入力端子IN2に供給される
データを記憶し、RAM2は出力端子OUT1ある
いは出力端子OUT2に供給するデータを記憶す
る。そして、RAM3は、アンテナ端子ANT
を介して、相手側コンピユータからR1ポートに
伝送されてくるシリアル入力データの格納を行う
メモリ領域である。この他に、RAM部51に
は、タイマ割り込みがあると+1だけインクレメ
ントする割込カウンタ、転送クロツク周期TMを
記憶するメモリ領域、測定した転送クロツク周期
TSを記憶するメモリ領域および入出力データの
管理番号を記憶するメモリ領域などがある。
Next, the RAM section 52 consists of a plurality of memory areas, the addresses of which are designated by X and Y address registers. Among the plurality of memory areas, RAM1 stores data supplied to the input terminal IN1 or IN2, and RAM2 stores data supplied to the output terminal OUT1 or OUT2. And RAM3 is the antenna terminal ANT
This is a memory area that stores serial input data transmitted from the other party's computer to the R1 port via the R1 port. In addition, the RAM section 51 includes an interrupt counter that increments by +1 when there is a timer interrupt, a memory area that stores the transfer clock cycle TM, and a memory area that stores the measured transfer clock cycle.
There is a memory area for storing TS, a memory area for storing management numbers of input/output data, etc.

次に、第10図のメインプログラムのフローチ
ヤートと、第11図ないし第22図のサブルーチ
ンのフローチヤートを参照して、このデータ転送
装置の動作を更に詳細に説明する。
Next, the operation of this data transfer device will be described in more detail with reference to the main program flowchart in FIG. 10 and the subroutine flowcharts in FIGS. 11 to 22.

マイクロコンピユータ21,31において、電
源が供給され、リセツト信号によつてイニシアラ
イズが行われると、第10図に示すメインプログ
ラムが開始される。まず、ステツプ61でRAMの
クリアが行われ、次のステツプ62においてサブル
ーチン“IO DATA”が実行される。このサブル
ーチン“IO DATA”は、それぞれマイクロコン
ピユータ21,31が、入力端子IN1,IN2の
入力情報をRAM1に読み込み、出力端子OUT
1,OUT2にRAM2から読み出した出力情報を
供給するルーチンである。ステツプ63では、
RAMに転送クロツク周期TMがセツトされ、割
込カウンタが起動される。転送クロツク周期TM
は、前述したように、ROMに書き込まれてお
り、データのシリアル伝送速度をきめるものであ
る。割込カウンタは、タイマ割込みが発生するた
びに、その内容を+1だけインクレメントする。
When power is supplied to the microcomputers 21 and 31 and initialization is performed by a reset signal, the main program shown in FIG. 10 is started. First, in step 61, the RAM is cleared, and in the next step 62, the subroutine "IO DATA" is executed. In this subroutine "IO DATA", the microcomputers 21 and 31 respectively read the input information of the input terminals IN1 and IN2 into RAM1, and the output terminal OUT
1. This is a routine that supplies output information read from RAM2 to OUT2. In step 63,
The transfer clock period TM is set in the RAM and the interrupt counter is activated. Transfer clock period TM
As mentioned above, is written in the ROM and determines the serial data transmission speed. The interrupt counter increments its contents by +1 every time a timer interrupt occurs.

ステツプ64においては、マイクロコンピユータ
21,31が、それぞれマスターかスレーブかを
判断する。そして、マイクロコンピユータ21が
マスター、マイクロコンピユータ31がスレーブ
であるから、次のステツプへ移り、それぞれステ
ツプ64でサブルーチン“TASK1”、ステツプ66
でサブルーチン“TASK2”を実行する。従つ
て、マイクロコンピユータ21は、まず周期TM
でビツト0からビツト7までの8ビツトを使用し
て転送クロツクパルスを伝送ラインに送出し、マ
イクロコンピユータ31は、その転送クロツク周
期を測定する(第8図のステツプ参照)。次い
で、マイクロコンピユータ31が、測定した転送
クロツク周期TSにもとづいて、ビツト8からビ
ツト15にわたつて転送クロツクパルスを返送
し、マイクロコンピユータ21がその転送クロツ
クを受信する(第8図のステツプ参照)。
In step 64, each microcomputer 21, 31 determines whether it is a master or a slave. Then, since the microcomputer 21 is the master and the microcomputer 31 is the slave, the process moves to the next step, and the subroutine "TASK1" is entered at step 64, and the subroutine "TASK1" is entered at step 66.
Execute subroutine “TASK2” with . Therefore, the microcomputer 21 first calculates the period TM
Then, a transfer clock pulse is sent to the transmission line using 8 bits from bit 0 to bit 7, and the microcomputer 31 measures the transfer clock period (see the steps in FIG. 8). Next, microcomputer 31 returns a transfer clock pulse from bit 8 to bit 15 based on the measured transfer clock period TS, and microcomputer 21 receives the transfer clock pulse (see steps in FIG. 8).

このようにして、マイクロコンピユータ21,
31は、転送クロツク周期の同期制御を行い、そ
の結果クロツク周期TM≒TSであれば、相互の
コミニユケーシヨンができる。その判定はステツ
プ67のサブルーチン“ERROR”で行われ、クロ
ツク周期TM≠TSとなると、エラーフラグレジ
スタに“1”が入力される。このエラーフラグが
“1”かどうかは、ステツプ68においてマイクロ
コンピユータ21が判断し、もしエラーフラグが
“1”であれば、ステツプ69に移つてエラーフラ
グレジスタをリセツトすると同時に、次のステツ
プ69−1でRAMのTMカウンタを“+1”増加
し、ステツプ69−2でTMカウンタの値が所定の
回数に達していなければステツプ62に戻るが、エ
ラーフラグが“0”であれば次のステツプ70にコ
ントロールを移す。このTMカウンタは通信の不
成立した回数を示しており、この回数が所定の回
数に達した場合は、ステツプ69−3で第1伝送路
41が通信不能と判定し、伝送路切替フラグセツ
トを“1”にセツトすると同時に伝送路切替スイ
ツチ29と39および29Aと39Aとをそれら
の接点側に倒して第2伝送路41Aとマイクロ
コンピユータ21および31とを接続する。次に
ステツプ62に戻る。
In this way, the microcomputer 21,
31 performs synchronization control of the transfer clock cycle, and as a result, if the clock cycle TM≈TS, mutual communication is possible. This determination is made in the subroutine "ERROR" at step 67, and when the clock period TM≠TS, "1" is input to the error flag register. The microcomputer 21 determines whether this error flag is "1" at step 68. If the error flag is "1", the process moves to step 69, resets the error flag register, and at the same time starts the next step 69--. 1, the TM counter in the RAM is increased by "+1", and if the value of the TM counter has not reached the predetermined number of times in step 69-2, the process returns to step 62, but if the error flag is "0", the process proceeds to the next step 70. transfer control to. This TM counter indicates the number of times communication has failed, and when this number reaches a predetermined number, it is determined in step 69-3 that the first transmission line 41 is unable to communicate, and the transmission line switching flag is set to "1". At the same time, the transmission line changeover switches 29 and 39 and 29A and 39A are turned to their contact sides to connect the second transmission line 41A and the microcomputers 21 and 31. Then return to step 62.

ここで、エラーフラグが“1”になれば、第8
図のステツプで示したように、マイクロコンピ
ユータ21は、伝送ラインを“0”に落して、マ
イクロコンピユータ31に知らせる。ただし、マ
イクロコンピユータ31で異常が生じて、、転送
クロツク周期の測定不能の場合にも、サブルーチ
ン“ERROR”で検出され、エラーフラグレジス
タが“1”となり、やはり伝送ラインは“0”と
なる。
Here, if the error flag becomes “1”, the eighth
As indicated by the step in the figure, the microcomputer 21 drops the transmission line to "0" and informs the microcomputer 31. However, even if an abnormality occurs in the microcomputer 31 and the transfer clock cycle cannot be measured, it will be detected in the subroutine "ERROR", the error flag register will be set to "1", and the transmission line will also be set to "0".

さて、ステツプ70においては、マイクロコンピ
ユータ21,31が再びマスターかスレーブかを
判断し、マスター側のマイクロコンピユータ21
は、サブルーチン“TASK3”,“TASK4”をス
テツプ71,72で実行し、これと同時にスレーブ側
のマイクロコンピユータ31は、サブルーチン
“TASK4”,“TASK3”をステツプ73,74で実行
する。すなわち、マイクロコンピユータ21が、
まず第8図のステツプにおいて伝送ラインを
“0”にし、次いで同図のステツプ,を行つ
て、ビツト18〜29で12ビツトのシリアルデー
タを転送し、ビツト30〜32で3ビツトのチエ
ツクビツトを転送する。このとき、マイクロコン
ピユータ31は、ステツプでデータの受信動作
に入り、ステツプ,で12ビツトのシリアルデ
ータと3ビツトのチエツクビツトを読み込む。
Now, in step 70, it is determined again whether the microcomputers 21 and 31 are masters or slaves, and the microcomputer 21 on the master side
executes subroutines "TASK3" and "TASK4" in steps 71 and 72, and at the same time, the slave microcomputer 31 executes subroutines "TASK4" and "TASK3" in steps 73 and 74. That is, the microcomputer 21
First, set the transmission line to "0" in the steps in Figure 8, then perform the steps in the same figure to transfer 12 bits of serial data in bits 18 to 29, and transfer 3 bits of check bit in bits 30 to 32. do. At this time, the microcomputer 31 enters a data receiving operation in step 1, and reads 12-bit serial data and 3-bit check bit in step 3.

このようにして、マイクロコンピユータ21が
サブルーチン“TASK3”を実行し、マイクロコ
ンピユータ31がサブルーチン“TASK4”を実
行する。そして、第8図のステツプで伝送ライ
ンがオープンにされたのち、今度はマイクロコン
ピユータ31がビツト34〜49にわたつてデー
タ伝送を含むステツプ〜のサブルーチン
“TASK3”を実行し、同時にマイクロコンピユ
ータ21はサブルーチン“TASK4”を実行す
る。マイクロコンピユータ21,31が、ステツ
プ72,74においてそれぞれサブルーチン
“TASK4”,“TASK3”を終了すると、次のデー
タ転送のために、コントロールはステツプ62に移
される。
In this way, the microcomputer 21 executes the subroutine "TASK3", and the microcomputer 31 executes the subroutine "TASK4". After the transmission line is opened in the step shown in FIG. Execute subroutine “TASK4”. When the microcomputers 21 and 31 complete the subroutines "TASK4" and "TASK3" at steps 72 and 74, respectively, control is transferred to step 62 for the next data transfer.

メインプログラムのステツプは上述の通りであ
るが、次にその各サブルーチンについて順次説明
する。
The steps of the main program are as described above, and each of its subroutines will now be explained in sequence.

まず、サブルーチン“IO DATA”において
は、マイクロコンピユータ21,31が、データ
管理番号0〜11に従つて、入力データをRAM1
に取り込み、RAM2から出力データを読み出す
動作が行われる。そこで、第11図のフローチヤ
ートに示しているように、サブルーチン“IO
DATA”がコールされると、ステツプ81でデー
タ管理番号のクリアが行われ、ステツプ82〜86で
RAM1に入力データが取り込まれ、ステツプ87
で再び管理番号のクリアが行われたのち、ステツ
プ88〜92でRAM2から出力データが読み出され
る。すなわち、ステツプ82では、例えば複写機本
体用送受信部20(第3図)の入力端子P113
〜P124にそれぞれ割り付けられたデータ管理
番号“0”〜“11”に応じて、入力データのチエ
ツクが実行される。そして、例えばデータ管理番
号“0”の入力端子P113のデータが“1”か
“0”かによつて、ステツプ83もしくはステツプ
87に分岐され、データ管理番号“0”に相当する
RAM1のロケーシヨンに当該入力データが書き
込まれる。
First, in the subroutine "IO DATA", the microcomputers 21 and 31 transfer input data to the RAM 1 according to data management numbers 0 to 11.
The operation of reading out the output data from RAM2 is performed. Therefore, as shown in the flowchart of Figure 11, the subroutine “IO
When "DATA" is called, the data management number is cleared in step 81, and the data management number is cleared in steps 82 to 86.
Input data is loaded into RAM1 and step 87
After the management number is cleared again in step 88-92, the output data is read from RAM2. That is, in step 82, for example, the input terminal P113 of the copying machine main body transmitting/receiving section 20 (FIG. 3)
A check of input data is executed according to data management numbers "0" to "11" assigned to P124, respectively. For example, depending on whether the data at the input terminal P113 with the data management number "0" is "1" or "0", the process proceeds to step 83 or step 83.
Branched to 87 and corresponds to data management number “0”
The input data is written to the RAM1 location.

次にステツプ82においては、データ管理番号が
+1だけ増加(インクレメント)され、データ管
理番号は“0”から“1”になるから、ステツプ
86で管理番号が“12”かどうかのチエツクは
“NO”となり、ステツプ82にコントロールが戻
される。同様にして、データ管理番号に従つて入
力データがRAM1に取り込まれ、データ管理番
号が“12”になると、ステツプ86のチエツクが
“YES”となるから、コントロールがステツプ87
に移される。ステツプ88〜92においては、データ
管理番号に応じてRAM2から読み出された出力
データが、例えば送受信部20の出力端子P10
1〜P112に分配されるが、そのコントロール
はステツプ82〜86と実質的に同じであるから、そ
の説明を省略する。
Next, in step 82, the data management number is incremented by +1, and the data management number changes from "0" to "1", so step 82
At step 86, the check as to whether the management number is "12" is "NO", and control is returned to step 82. Similarly, the input data is loaded into RAM1 according to the data management number, and when the data management number becomes "12", the check at step 86 becomes "YES", so the control returns to step 87.
will be moved to In steps 88 to 92, the output data read from the RAM 2 according to the data management number is transmitted to the output terminal P10 of the transmitter/receiver 20, for example.
1 to P112, but the controls are substantially the same as steps 82 to 86, so the explanation thereof will be omitted.

メインプログラムのステツプ63においては、既
述したように、RAMに転送クロツク周期TMが
セツトされるとともに、割込カウンタがイネーブ
ルにされる。この割込カウンタは、タイマー割り
込みがあると、第12図の割り込みルーチンがコ
ールされ、ステツプ101〜103が実行されることに
なる。すなわち、割り込みがあるたびに、割込カ
ウンタの内容がインクレメントされ、割込カウン
タがオーバフローをすると、エラーフラグレジス
タがセツトされることになる。
In step 63 of the main program, as described above, the transfer clock period TM is set in the RAM and the interrupt counter is enabled. When this interrupt counter receives a timer interrupt, the interrupt routine shown in FIG. 12 is called and steps 101 to 103 are executed. That is, each time an interrupt occurs, the contents of the interrupt counter are incremented, and when the interrupt counter overflows, the error flag register is set.

マイクロコンピユータ21は、メインプログラ
ムのステツプ65で、サブルーチン“TASK1”を
実行する。第13図ないし第16図は、そのサブ
ルーチン“TASK1”のフローチヤートである。
サブルーチン“TASK1”を実行することによつ
て、マイクロコンピユータ21は、アンテナ端子
ANTを介して伝送ラインに“0”と“1”の
繰り返しからなる周期TMの転送クロツクパルス
を送出したのち、マイクロコンピユータ31から
返送されてくる転送クロツクパルスの周期TSを
測定する。ビツト0〜7からなる8ビツトの転送
クロツクパルスは、ステツプ104〜120において、
アンテナ端子ANTのセツトとサブルーチン
“CNT CLR”を交互に行うことによつてなされ
る。
The microcomputer 21 executes the subroutine "TASK1" at step 65 of the main program. FIGS. 13 to 16 are flowcharts of the subroutine "TASK1".
By executing the subroutine "TASK1", the microcomputer 21 connects the antenna terminal
After sending a transfer clock pulse with a period TM consisting of repeating "0" and "1" to the transmission line via ANT, the period TS of the transfer clock pulse returned from the microcomputer 31 is measured. The 8-bit transfer clock pulse consisting of bits 0-7 is used in steps 104-120.
This is done by alternately performing the setting of the antenna terminal ANT and the subroutine "CNT CLR".

ここで、サブルーチン“CNT CLR”は、第1
4図に示しているように、ステツプ134,135から
なり、割込カウンタのクリアと、割込カウンタの
内容と周期TM(RAMにセツトされている)の一
致をチエツクすることにより、転送クロツク周期
TMを一定する制御をしている。
Here, the subroutine “CNT CLR” is the first
As shown in Figure 4, it consists of steps 134 and 135, and the transfer clock cycle is determined by clearing the interrupt counter and checking whether the contents of the interrupt counter match the cycle TM (set in RAM).
It controls the TM to be constant.

サブルーチン“TASK1”のステツプ121〜128
においては、スレーブ側のマイクロプロセツサ3
1が返送する8ビツトの転送クロツクパルスの周
期TSを測定するため、マスター側のマイクロプ
ロセツサ21はサブルーチン“MEASURE0”,
“MEASURE1”を交互に実行する。
Steps 121 to 128 of subroutine “TASK1”
In this case, the slave side microprocessor 3
In order to measure the period TS of the 8-bit transfer clock pulse sent back by
Execute “MEASURE1” alternately.

第15図はサブルーチン“MEASURE0”のフ
ローチヤートであり、ステツプ136でエラーフラ
グレジスタの内容のチエツクがなされ、“1”で
あればリターンとなるが、“0”であればステツ
プ137で割込カウンタのクリアが行われる。次に、
ステツプ138でアンテナ端子ANTが“1”か
否かのチエツクがなされるが、アンテナ端子
ANTは初期値が“1”となつているようにあ
らかじめフオーマツトができているので、ステツ
プ139に進み割込カウンタの内容が転送クロツク
周期TMの2倍か否かのチエツクが行われ、割込
カウンタの内容が2×TM以下であればコントロ
ールは上述のステツプ138に戻される。従つて、
アンテナ端子ANTが“1”から“0”に落ち
るまでの周期TS内では、コントロールはステツ
プ138→ステツプ139→ステツプ138→ステツプ139
→……とループし、繰り返しを行つている。しか
し、ある時点でアンテナ端子ANTに“0”が
伝送されて、アンテナ端子ANTは“0”に落
ちる。そのときには、ステツプ140に進み、割込
カウンタの内容を測定クロツク周期TSとして
RAMの該当領域にストアし、これによりアンテ
ナ端子ANTが“1”となつている周期TSが測
定できる。
FIG. 15 is a flowchart of the subroutine "MEASURE0", in which the contents of the error flag register are checked in step 136, and if it is "1", it returns, but if it is "0", the interrupt counter is checked in step 137. is cleared. next,
At step 138, a check is made to see if the antenna terminal ANT is "1".
Since ANT is formatted in advance so that the initial value is "1", the process proceeds to step 139, where it is checked whether the contents of the interrupt counter are twice the transfer clock period TM, and the interrupt is processed. If the contents of the counter are less than or equal to 2.times.TM, control is returned to step 138 described above. Therefore,
During the period TS from when the antenna terminal ANT falls from "1" to "0", the control goes from step 138 to step 139 to step 138 to step 139.
→... is looped and repeated. However, at some point, "0" is transmitted to the antenna terminal ANT, and the antenna terminal ANT drops to "0". In that case, proceed to step 140 and set the contents of the interrupt counter as the measurement clock period TS.
By storing it in the corresponding area of RAM, it is possible to measure the period TS during which the antenna terminal ANT is "1".

また、上述のようにステツプ138→ステツプ139
→ステツプ138→ステツプ139……とループしてい
る最中にも割込ルーチンは非同期にかかつてお
り、その都度、割込カウンタがインクレメントさ
れているが、いつまでもアンテナ端子ANTが
“0”に落ちない場合は、割込カウンタもいずれ
2×TMというカウント値を計数してしまう。こ
れば、コミニユケーシヨンの失敗を示しているの
で、ステツプ141でエラーフラグレジスタにエラ
ーフラグのセツトを行い、コントロールはメイン
プログラムにリターンされる。ただし、ビツト8
の測定に限り、アンテナ端子ANTの“1”か
ら“0”への立ち下りだけを検出するだけの動作
となるので、測定結果は採用されない。
Also, as mentioned above, step 138 → step 139
→ Step 138 → Step 139...The interrupt routine continues to repeat asynchronously during the loop, and the interrupt counter is incremented each time, but the antenna terminal ANT remains at "0" forever. If it does not fall, the interrupt counter will eventually count the count value 2×TM. Since this indicates a communication failure, an error flag is set in the error flag register at step 141, and control is returned to the main program. However, bit 8
In the measurement of , the measurement result is not adopted because the operation is only to detect the fall of the antenna terminal ANT from "1" to "0".

サブルーチン“MEASURE1”は、第16図に
示しているように、ステツプ142,143の分岐条件
が逆になつているほかは、サブルーチン
“MEASURE0”と同じである。
The subroutine "MEASURE1" is the same as the subroutine "MEASURE0" except that the branching conditions of steps 142 and 143 are reversed, as shown in FIG.

かくして、ビツト8〜14の8ビツトからなる
返送クロツク周期の測定が行われると、サブルー
チン“TASK1”のステツプ129で割込カウンタ
のクリアが実行され、次のステツプ130で再度エ
ラーフラグレジスタのチエツクが行われる。その
結果、エラーフラグレジスタの内容が“1”であ
ればコントロールはメインプログラムへリターン
されるが、その内容が“0”であればステツプ
131に移される。ステツプ131においては、測定ク
ロツク周期TSの平均値の演算が実行されるが、
ここでは多数決によつてその近似値計算を行つて
測定クロツク周期TSの平均値とし、ステツプ132
で既にRAMに記憶されている転送クロツクTM
が書き換えられる。次のステツプ133では、割込
カウンタの内容と転送クロツクTMの比較が行わ
れ、それらが一致するまで割込カウンタは計数を
続け、一致した時点でコントロールはメインプロ
グラムにリターンされる。
In this way, when the return clock cycle consisting of 8 bits 8 to 14 is measured, the interrupt counter is cleared in step 129 of subroutine "TASK1", and the error flag register is checked again in the next step 130. It will be done. As a result, if the content of the error flag register is "1", control is returned to the main program, but if the content is "0", control is returned to the main program.
Moved to 131. In step 131, the average value of the measurement clock period TS is calculated.
Here, the approximate value is calculated by majority vote and determined as the average value of the measurement clock period TS.
Transfer clock TM already stored in RAM
is rewritten. In the next step 133, the contents of the interrupt counter are compared with the transfer clock TM, and the interrupt counter continues counting until they match, at which point control is returned to the main program.

上述したサブルーチン“TASK1”と並行し
て、スレーブ側のマイクロコンピユータ31は、
サブルーチン“TASK2”を実行する。第17図
はそのフローチヤートを示したものであり、ここ
でマスター側から送出された転送クロツクパルス
の周期TMの測定とその測定結果の処理を行うス
テツプ145〜157は、サブルーチン“TASK1”の
ステツプ121〜133とほぼ同じであり、また測定転
送クロツク周期にもとづいて、クロツクパルスを
マスター側に返送するステツプ158〜173も、サブ
ルーチン“TASK1”のステツプ104〜120とほぼ
同じである。ただし、ビツト0の転送クロツク周
期TMについては、アンテナ端子ANTの立ち
下りを検出するだけなので、測定値そのものは意
味がない。また、ビツト6の転送クロツクTMの
測定が終了した後、ビツト7は“1”であるか
ら、ステツプ153ではその立ち上りで割込みカウ
ンタがクリアされる。従つて、転送クロツク周期
TMの測定は、ビツト0〜6について行われ、ビ
ツト7の期間にステツプ153〜157が実行される。
In parallel with the above-mentioned subroutine "TASK1", the slave side microcomputer 31
Execute subroutine “TASK2”. FIG. 17 shows the flowchart, and steps 145 to 157 for measuring the period TM of the transfer clock pulse sent from the master side and processing the measurement results are steps 121 of the subroutine "TASK1". - 133, and steps 158-173 for returning clock pulses to the master side based on the measurement transfer clock cycle are also almost the same as steps 104-120 of subroutine "TASK1". However, regarding the transfer clock period TM of bit 0, the measured value itself is meaningless because only the falling edge of the antenna terminal ANT is detected. Further, after the measurement of the transfer clock TM of bit 6 is completed, since bit 7 is "1", the interrupt counter is cleared at the rising edge of bit 7 in step 153. Therefore, the transfer clock period
Measurements of TM are made for bits 0-6, and steps 153-157 are executed during bit 7.

なお、ステツプ145〜152におけるサブルーチン
“MEASURE0”,“MEASURE1”は、第15図
および第16図に示したフローチヤートのステツ
プからなり、ステツプ158〜173におけるサブルー
チン“CTR CLR”は第14図に示したフローチ
ヤートのステツプからなる。
Note that the subroutines "MEASURE0" and "MEASURE1" in steps 145-152 consist of the steps in the flowchart shown in FIGS. 15 and 16, and the subroutine "CTR CLR" in steps 158-173 is shown in FIG. It consists of the steps of a flowchart.

第18図はメインプログラムにおけるステツプ
67のサブルーチン“ERROR”のフローチヤート
である。このサブルーチン“ERROR”は、マイ
クロコンピユータ21,31がそれぞれ
“TASK1”,“TASK2”を終了した後で実行され
るもので、コミニユケーシヨンフオーマツトのビ
ツト16(第8図のステツプ)の値をきめるル
ーチンである。第18図のフローチヤートを参照
すると、ステツプ174で割込カウンタのクリアが
行われ、ステツプ175で割込カウンタの内容と転
送クロツク周期TMが一致しているかどうかの比
較がなされたあと、それらが一致していれば次の
ステツプ176で転送クロツクの同期がとれたこと
を示すためにアンテナ端子ANTが“1”にさ
れる。しかし、それらが一致していなければ、エ
ラーフラグレジスタが“1”にセツトされている
かどうかがステツプ177でチエツクされる。その
結果、エラーフラグが“1”であればステツプ
178においてアンテナ端子ANTが“0”にさ
れたのち、コントロールはステツプ175に戻され
る。しかし、エラーフラグが“0”であれば、ス
テツプ179でアンテナ端子ANTが“1”にセ
ツトされ、ステツプ180で再びアンテナ端子
ANTが“1”かどうかのチエツクが行われ
る。その理由は、マスター側あるいはスレーブ側
で、異常を示すためにアンテナ端子ANTがい
つでも“0”にされる可能性があり、それをチエ
ツクする必要があるからである。
Figure 18 shows the steps in the main program.
This is a flowchart of subroutine “ERROR” of No. 67. This subroutine "ERROR" is executed after the microcomputers 21 and 31 have finished "TASK1" and "TASK2", respectively, and is based on the value of bit 16 (step in FIG. 8) of the communication format. This is a routine that determines the Referring to the flowchart in FIG. 18, the interrupt counter is cleared in step 174, and in step 175 the contents of the interrupt counter and the transfer clock period TM are compared to see if they match. If they match, the antenna terminal ANT is set to "1" in the next step 176 to indicate that the transfer clocks have been synchronized. However, if they do not match, it is checked in step 177 whether the error flag register is set to "1". As a result, if the error flag is “1”, the step
After the antenna terminal ANT is set to "0" at 178, control is returned to step 175. However, if the error flag is "0", the antenna terminal ANT is set to "1" in step 179, and the antenna terminal ANT is set to "1" again in step 180.
A check is made to see if ANT is "1". The reason for this is that the antenna terminal ANT may be set to "0" at any time to indicate an abnormality on the master or slave side, and it is necessary to check this.

ステツプ180においてアンテナ端子ANTが
“1”であれば、コントロールはステツプ175に移
されるが、そうでなければステツプ181でエラー
フラグレジスタを“1”にセツトしてステツプ
175にコントロールが戻される。このようにサブ
ルーチン“ERROR”においては、サブルーチン
“TASK1”,“TASK2”でエラーフラグレジスタ
がセツトされたかどうかがチエツクされ、もしそ
のエラーフラグが“1”にセツトされていれば、
アンテナ端子ANTが“0”にセツトされる。
また、エラーフラグが“1”にセツトされていな
い場合には、相手方のエラー送出が検知され、相
手方がエラーのためアンテナ端子ANTが
“0”にセツトされていれば、エラーフラグレジ
スタを“1”にセツトして、ビツト16が終了す
るまで待つて割込カウンタの内容と転送クロツク
周期TMが一致した時点でアンテナ端子ANT
を“1”にセツトしてメインプログラムにリター
ンするというステツプが実行される。
If the antenna terminal ANT is "1" in step 180, control is transferred to step 175, but if not, the error flag register is set to "1" in step 181 and the process continues.
Control is returned to 175. In this way, in the subroutine "ERROR", it is checked whether the error flag register was set in the subroutines "TASK1" and "TASK2", and if the error flag is set to "1",
Antenna terminal ANT is set to "0".
In addition, if the error flag is not set to "1", an error transmission from the other party is detected, and if the antenna terminal ANT is set to "0" due to an error at the other party, the error flag register is set to "1". ”, wait until bit 16 is completed, and when the contents of the interrupt counter match the transfer clock cycle TM, the antenna terminal ANT is
The step of setting ``1'' to ``1'' and returning to the main program is executed.

第19図および第20図はメインプログラムの
ステツプ71のサブルーチン“TASK3”のフロー
チヤートである。マスター側のマイクロコンピユ
ータ21は、このサブルーチン“TASK3”にお
いて、スレーブ側のマイクロコンピユータ31に
データを転送する。第19図のフローチヤートを
参照すると、ステツプ182,183でアンテナ端子
ANTの“0”セツトとサブルーチン“CTN
CLR”が行われて、ビツト17の“0”が送出
される。次のステツプ184においては、ビツト1
8〜29からなる12ビツトのデータ転送が行われ
るが、第20図はそのサブルーチン“DATA
OUT”のフローチヤートである。既にメインプ
ログラムのステツプ62において、RAM1には転
送すべきデータがストアされているので、サブル
ーチン“DATA OUT”ではデータ管理番号に
従つてそのデータの読み出しとシリアル転送が行
われる。第20図に示しているように、ステツプ
196でデータ管理番号がクリアされ、ステツプ197
〜199で所定のデータ管理番号に対応したRAM
1のロケーシヨンにストアされているデータを読
み出し、次いでそのデータが“0”か“1”かに
よつてアンテナ端子ANTが“0”か“1”か
にセツトされる。
FIGS. 19 and 20 are flowcharts of the subroutine "TASK3" in step 71 of the main program. The master microcomputer 21 transfers data to the slave microcomputer 31 in this subroutine "TASK3". Referring to the flowchart of FIG. 19, in steps 182 and 183, the antenna terminal is
ANT “0” set and subroutine “CTN
CLR” is performed and bit 17 “0” is sent out. In the next step 184, bit 1
A 12-bit data transfer consisting of bits 8 to 29 is performed, and FIG. 20 shows the subroutine “DATA”.
This is a flowchart of ``DATA OUT.'' Since the data to be transferred has already been stored in RAM1 in step 62 of the main program, the subroutine ``DATA OUT'' reads the data and serially transfers it according to the data management number. The steps are performed as shown in Figure 20.
The data management number is cleared in 196, and step 197
RAM corresponding to the specified data management number ~199
The data stored in location No. 1 is read out, and then the antenna terminal ANT is set to either "0" or "1" depending on whether the data is "0" or "1".

そして、割り当てられた1ビツトの期間の制御
が、ステツプ200のサブルーチン“CNT CLR”
(第14図参照)によつて行われたのち、ステツ
プ201においてデータ管理番号がインクレメント
される。次いで、データ管理番号“0”〜“11”
に相当するデータの転送が終了すると、ステツプ
202でそれが検出されるから、サブルーチン
“DATA OUT”の実行が完了し、サブルーチン
“TASK3”のステツプ185にコントロールが移さ
れる。前述したように、チエツクビツトはビツト
30〜32の3ビツトからなり、ステツプ185〜
188はチエツクビツトの第1ビツトであるビツト
30の値をきわめるためのものである。ステツプ
185でビツト29が“1”かどうかがチエツクさ
れ、“1”であればステツプ186においてアンテナ
端子ANTが“0”にセツトされ、“0”であ
ればステツプ187でアンテナ端子ANTが“1”
にセツトされる。ここで、ステツプ188のサブル
ーチン“CNT CLR”は、ステツプ184と同様に、
1ビツトの転送期間を制御するサブルーチンであ
る。
The allocated 1-bit period is controlled by the subroutine “CNT CLR” in step 200.
(see FIG. 14), the data management number is incremented in step 201. Next, data management number “0” to “11”
When the transfer of data corresponding to is completed, the step
Since this is detected at 202, execution of the subroutine "DATA OUT" is completed and control is transferred to step 185 of the subroutine "TASK3". As mentioned above, the check bit consists of 3 bits, bits 30 to 32, and steps 185 to 32.
188 is for determining the value of bit 30, which is the first bit of the check bit. step
At step 185, it is checked whether bit 29 is "1", and if it is "1", the antenna terminal ANT is set to "0" at step 186, and if it is "0", the antenna terminal ANT is set to "1" at step 187.
is set to Here, the subroutine "CNT CLR" in step 188 is similar to step 184.
This is a subroutine that controls the transfer period of 1 bit.

チエツクビツトの第2ビツトに関するステツプ
189〜192は、ステツプ185〜188とほぼ同じである
が、ビツト25の値をそのままビツト31の値と
するルーチンが実行される。ステツプ193でアン
テナ端子ANTが“0”にセツトされ、ステツ
プ194でサブルーチン“CNT CLR”が実行され
ると、チエツクビツトの第3ビツトであるビツト
32が伝送ラインに送出される。サブルーチン
“TASK3”の最終ステツプ195においては、アン
テナ端子ANTが“1”にセツトされる。
Steps regarding the second bit of the check bit
Steps 189-192 are almost the same as steps 185-188, but a routine is executed in which the value of bit 25 is set as the value of bit 31. When the antenna terminal ANT is set to "0" in step 193 and the subroutine "CNT CLR" is executed in step 194, the third bit of the check bit, bit 32, is sent to the transmission line. In the final step 195 of the subroutine "TASK3", the antenna terminal ANT is set to "1".

第21図および第22図はメインプログラムの
ステツプ72におけるサブルーチン“TASK4”の
フローチヤートである。このサブルーチン
“TASK4”では、スレーブ側から転送されたシ
リアルデータを受信してRAM3にストアしてお
き、当該データの転送ミスがないかどうかをチエ
ツクしたのち、転送ミスがなければRAM3にス
トアしたデータをRAM2に転送するステツプが
実行される。
FIGS. 21 and 22 are flowcharts of the subroutine "TASK4" in step 72 of the main program. In this subroutine "TASK4", serial data transferred from the slave side is received and stored in RAM3, and after checking whether there is a transfer error in the data, if there is no transfer error, the data stored in RAM3 is A step is executed to transfer the data to RAM2.

第21図のフローチヤートを参照すると、まず
ステツプ203において割込カウンタのクリアが行
われ、ステツプ204,205でそれぞれ割込カウンタ
の内容が転送クロツク周期TMの2倍に一致する
かどうかおよびアンテナ端子ANTが“1”に
セツトされているかどうかのチエツクがなされ
る。転送クロツク周期TMの2倍になつても、ス
レーブ側がデータ転送を開始しない場合、つまり
アンテナ端子ANTが“0”に落ちない場合に
は、マスター側のマイクロコンピユータ21は何
もせずにコントロールをメインプログラムにリタ
ーンしてしまう。このように、スレーブ側からデ
ータ転送がない場合には、RAM3からRAM2
に入力データの転送は行われない。
Referring to the flowchart of FIG. 21, first, in step 203, the interrupt counter is cleared, and in steps 204 and 205, it is checked whether the contents of the interrupt counter match twice the transfer clock period TM, and the antenna terminal is checked. A check is made to see if ANT is set to "1". If the slave side does not start data transfer even when the transfer clock period TM is twice, that is, if the antenna terminal ANT does not fall to "0", the microcomputer 21 on the master side does not do anything and continues the main control. It returns to the program. In this way, if there is no data transfer from the slave side, RAM3 to RAM2
No input data is transferred.

しかし、ステツプ205において、アンテナ端子
ANTが“0”になつていることが検知される
と、その時点から転送周期がスタートし、ステツ
プ206でサブルーチン“CNT CLR”が実行され
る。そして、ビツト34に相当する期間が経過す
ると、転送されたデータの取り込みに入るが、転
送クロツク周期TMの中間点でデータのサンプリ
ングをするために、ステツプ207においてそのタ
イミングが調整されてから、ステツプ208のサブ
ルーチン“DATA IN”が実行される。このサブ
ルーチン“DATA IN”は、第22図に示すよう
に、データ管理番号に従つて、RAM3に入力デ
ータが読み込まれるステツプ224〜230からなる。
However, in step 205, the antenna terminal
When it is detected that ANT has become "0", the transfer cycle starts from that point, and the subroutine "CNT CLR" is executed in step 206. Then, when the period corresponding to bit 34 has elapsed, the transferred data starts to be taken in. In order to sample the data at the midpoint of the transfer clock cycle TM, the timing is adjusted in step 207, and then step 207 is started. 208 subroutine “DATA IN” is executed. As shown in FIG. 22, this subroutine "DATA IN" consists of steps 224 to 230 in which input data is read into the RAM 3 according to the data management number.

そこで、ステツプ224では、データ管理番号の
クリアが行われ、ステツプ225〜227においてはア
ンテナ端子ANTに転送されたデータが所定の
データ管理番号によつてきめられたRAM3のロ
ケーシヨンにストアされる。次のステツプ228で
はサブルーチン“CNT CLR”が実行されること
により、転送クロツク周期TMに相当する期間の
制御が行われ、さらにステツプ229においてデー
タ管理番号がインクレメント(+1)される。そ
して、ステツプ230ではデータ管理番号が“12”
になつたかどうかのチエツクが行われ、“12”に
満たなければステツプ225にコントロールが戻さ
れ、“12”になればサブルーチン“TASK4”に
移される。
Therefore, in step 224, the data management number is cleared, and in steps 225 to 227, the data transferred to the antenna terminal ANT is stored in the location of the RAM 3 determined by the predetermined data management number. In the next step 228, the subroutine "CNT CLR" is executed to perform control for a period corresponding to the transfer clock period TM, and further, in step 229, the data management number is incremented (+1). Then, in step 230, the data management number is “12”.
A check is made to see if the number has reached "12", and if it is less than "12", control is returned to step 225, and if it is "12", control is transferred to subroutine "TASK4".

このとき、サブルーチン“TASK4”において
はビツト47(第8図参照)の中間点でサンプリ
ングが行われ、このビツト47は3ビツトのチエ
ツクビツトの第1ビツトであり、その値はビツト
46の値と補数関係にセツトされている。従つ
て、ステツプ209〜213では、そのチエツクが行わ
れ、まずステツプ209でビツト47が“0”であ
れば、ステツプ210でビツト46が“1”である
かどうかがチエツクされる。その結果、ビツト4
6が“0”であれば、ビツト47の値と補数関係
にないので、ステツプ212ではチエツクミスフラ
グレジスタがセツトされ、次いでコントロールは
ステツプ213のサブルーチン“CNT CLR”に移
される。しかし、ビツト46が“1”であれば、
コントロールはそのままステツプ213に移される
ことになる。また、ビツト47が“1”でビツト
46が“1”の場合にも、ステツプ209,211で検
知され、フラグレジスタがセツトされるが、ビツ
ト47が“1”でビツト46が“0”であれば、
コントロールはステツプ209,211からそのままス
テツプ213に移される。
At this time, in the subroutine "TASK4", sampling is performed at the midpoint of bit 47 (see Figure 8), this bit 47 is the first bit of the 3 check bits, and its value is the complement of the value of bit 46. It is set in a relationship. Therefore, this check is performed in steps 209 to 213. If bit 47 is "0" in step 209, it is checked in step 210 whether or not bit 46 is "1". As a result, bit 4
If 6 is "0", there is no complement relationship with the value of bit 47, so a check miss flag register is set in step 212, and control is then transferred to subroutine "CNT CLR" in step 213. However, if bit 46 is “1”,
Control is then transferred directly to step 213. Also, if bit 47 is "1" and bit 46 is "1", it is detected in steps 209 and 211, and the flag register is set, but if bit 47 is "1" and bit 46 is "0", if there is,
Control is directly transferred from steps 209 and 211 to step 213.

次のステツプ214〜218においては、チエツクビ
ツトの第2ビツトであるビツト48とビツト42
が同値かどうかのチエツクが行われる。さらに、
ステツプ219でチエツクビツトの第3ビツトであ
るビツト49が“1”かどうかチエツクされ、
“1”であれば、チエツクミスフラグレジスタが
ステツプ220においてセツトされるが、“0”であ
ればコントロールはステツプ221に移される。最
後にステツプ221では、チエツクミスフラグレジ
スタが“1”かどうかが調べられ、データ転送に
際して誤りがないかどうかがチエツクされる。そ
して、チエツクミスフラグレジスタが“1”でな
ければRAM3のデータがRAM2に書き込まれ
るが、“0”であればチエツクミスフラグレジス
タのリセツトが行われたのち、コントロールはメ
インプログラムに戻されることになり、RAM2
にはRAM3のデータの書き込みは実行されな
い。ところで、第19図ないし第22図を参照し
て、主としてマスター側のサブルーチン
“TASK3”,“TASK4”を説明したが、スレーブ
側のサブルーチン“TASK4”(メインプログラ
ムのステツプ73)、“TASK3”(メインプログラ
ムのステツプ74)についてもほぼ同様であるから
その説明を省略する。
In the next steps 214 to 218, bits 48 and 42, which are the second bits of the check bits, are checked.
A check is made to see if they are equivalent. moreover,
At step 219, it is checked whether the third bit of the check bit, bit 49, is "1".
If it is "1", the check miss flag register is set in step 220, but if it is "0", control is transferred to step 221. Finally, in step 221, it is checked whether the check miss flag register is "1", and it is checked whether there is any error during data transfer. If the check miss flag register is not "1", the data in RAM3 is written to RAM2, but if it is "0", the control is returned to the main program after the check miss flag register is reset. Now, RAM2
Writing of data to RAM3 is not executed. By the way, while the subroutines "TASK3" and "TASK4" on the master side have been mainly explained with reference to FIGS. 19 to 22, the subroutines "TASK4" (step 73 of the main program) and "TASK3" (on the slave side) Since step 74) of the main program is almost the same, its explanation will be omitted.

次に、第1伝送路41が通信不良または不能に
なつたときの第2伝送路41Aへの切替えについ
て説明すると、上述のように、第10図のステツ
プ69−1で通信(コミニユケーシヨン)の不成立
の回数はRAMのTMカウンタにメモリするので、
ステツプ69−2でそのカウンタ値が所定数に達し
たら第1伝送路41が通信不良または不能(ダウ
ン)と判断して、ステツプ69−3で伝送路切替フ
ラグセツトを“1”にセツトすると同時に、第4
図示の伝送路切替スイツチ29と29Aおよび3
9と39Aをそれらの接点側に倒す。そのた
め、第4図に示すように、複写機本体用送受信部
20においては、送信ユニツト27および受信ユ
ニツト28から予備の送信ユニツト27Aおよび
受信ユニツト28Aに切替り、それに伴つて第1
伝送路41から第2伝送路41Aに切替る。同様
に、付加装置用送受信部30においても、送受信
ユニツト37および38は予備の送受信ユニツト
37Aおよび38Aに切替わり、第2伝送路41
Aを通じてデータ転送を再開する。
Next, we will explain how to switch to the second transmission line 41A when the first transmission line 41 has a communication failure or becomes disabled. ) is not held true is stored in the TM counter in RAM, so
When the counter value reaches a predetermined number in step 69-2, it is determined that the first transmission line 41 has a communication failure or is disabled (down), and at the same time, in step 69-3, the transmission line switching flag set is set to "1". Fourth
The illustrated transmission line selection switches 29, 29A, and 3
9 and 39A to their contact side. Therefore, as shown in FIG. 4, in the copying machine body transmitting/receiving section 20, the transmitting unit 27 and receiving unit 28 are switched to the spare transmitting unit 27A and receiving unit 28A, and accordingly, the first
The transmission line 41 is switched to the second transmission line 41A. Similarly, in the additional device transmitting/receiving section 30, the transmitting/receiving units 37 and 38 are switched to the spare transmitting/receiving units 37A and 38A, and the second transmission line 41
Data transfer is resumed through A.

以上説明したように、本実施例によれば、複写
機本体とその付加装置間に第1と第2の伝送路を
並設して設け、前者の伝送路が通信不能となつた
場合は後者の伝送路で回復させることができるの
で、従来よりあつた信号ケーブルとそれを結合す
るコネクタを省略することができ、信頼性の高い
シリアルデータ通信装置を提供することができ
る。しかも、本実施例は簡単な構成であるから、
既存の複写機に容易に適用できる。
As explained above, according to this embodiment, the first and second transmission paths are provided in parallel between the copying machine main body and its additional device, and if the former transmission path becomes unable to communicate, the latter Since the signal cable and the connector that connects it can be omitted, it is possible to provide a highly reliable serial data communication device. Moreover, since this embodiment has a simple configuration,
It can be easily applied to existing copying machines.

以上説明したように、本発明によれば、第1、
第2のデータ処理装置間のデータ伝送路として、
第1または第2の複数の伝送路のうちでデータ通
信に適したいずれかの伝送路をデータ通信前に設
定することができる。しかも、本発明は第1のデ
ータ処理装置が第1のクロツクパルス列を第2の
データ処理装置に送信し、第2のデータ処理装置
は第1のクロツクパルス列の速度を演算して第2
のクロツクパルス列を作成し、この第2のクロツ
クパルス列を第1のデータ処理装置に反送する。
そして、本発明の第1のデータ処理装置は第1の
クロツクパルス列の送信時の速度と受信した第2
のクロツクパルス列の速度に基づき複数の伝送路
の切換えを行うものであり、これにより第1のデ
ータ処理装置から第2のデータ処理装置へのデー
タ送信、また第2のデータ処理装置から第1のデ
ータ処理装置へのデータの送信といつた双方向の
データ通信に最適な伝送路を設定することができ
る。
As explained above, according to the present invention, the first,
As a data transmission path between the second data processing device,
Any transmission path suitable for data communication among the first or second plurality of transmission paths can be set before data communication. Moreover, in the present invention, the first data processing device transmits the first clock pulse train to the second data processing device, and the second data processing device calculates the speed of the first clock pulse train and transmits the second clock pulse train.
A second clock pulse train is generated and this second clock pulse train is sent back to the first data processing device.
The first data processing device of the present invention calculates the transmission speed of the first clock pulse train and the received second clock pulse train.
This system switches multiple transmission paths based on the speed of the clock pulse train, and thereby transmits data from the first data processing device to the second data processing device, and from the second data processing device to the first data processing device. It is possible to set an optimal transmission path for two-way data communication such as data transmission to the data processing device.

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

第1図および第2図は従来のデータ転送装置を
示すブロツク図、第3図は本発明によるデータ通
信装置の一例を示すブロツク図、第4図はその主
要部の一構成例を示すブロツク図、第5図は第4
図の送信ユニツトの要部ブロツク図、第6図は第
5図のユニツトの信号波形図、第7図は第4図の
受信ユニツトの要部ブロツク図、第8図は第3図
の装置のコミニユケーシヨンフオーマツトを示す
信号波形図、第9図は本発明に適用するマイクロ
コンピユータの要部ブロツク図、第10図はその
メインプログラムのフローチヤート、第11図な
いし第22図はサブルーチンのフローチヤートで
ある。 11…複写機本体、12…中央処理装置、13
…I/Oコントローラ、14…出力ドライバ、1
5…入力インターフエイス、16…CPU用電源
回路、17…付加装置用電源回路、18…付加装
置、19…シーケンスコントローラ、20A…入
力インターフエイス、21A…出力ドライバ、2
2A…出力負荷、20…複写機本体用送受信部、
21…マスター側マイクロコンピユータ、22,
32…マスター/スレーブ切換スイツチ、23〜
26,33〜36…増幅器、27,27A…マス
ター側送信ユニツト、28,28A…マスター側
受信ユニツト、29,29A…伝送路切替スイツ
チ、30…付加装置用送受信部、31…スレーブ
側マイクロコンピユータ、37,37A…スレー
ブ側送信ユニツト、38,38A…スレーブ側受
信ユニツト、39,39A…伝送路切替スイツ
チ、40…スイツチ、41,41A…電源供給線
(伝送路)、42,42A,43,43A…結合コ
ンデンサ、44…フイルタ回路、51…制御記憶
部、52…RAM(ランダムアクセスメモリ)部、
53…演算論理ユニツト、54…アキユムレー
タ、DCR…デコーダ、ROM…リードオンリメモ
リ、PC…プライムカウンタ、STK…スタツク、
PD…位相弁別回路、VCO…電圧制御発振器、
PLL…フエーズロツクドループ回路、LPF…低
域通過形フイルタ、WSC…波形整形回路。
1 and 2 are block diagrams showing a conventional data transfer device, FIG. 3 is a block diagram showing an example of a data communication device according to the present invention, and FIG. 4 is a block diagram showing an example of the configuration of its main parts. , Figure 5 is the fourth
6 is a signal waveform diagram of the unit in FIG. 5, FIG. 7 is a block diagram of the main part of the receiving unit in FIG. 4, and FIG. 8 is a block diagram of the main part of the device in FIG. A signal waveform diagram showing the communication format, FIG. 9 is a block diagram of the main part of the microcomputer applied to the present invention, FIG. 10 is a flowchart of the main program, and FIGS. 11 to 22 are subroutines. It is a flowchart. 11... Copying machine main body, 12... Central processing unit, 13
...I/O controller, 14...Output driver, 1
5... Input interface, 16... Power supply circuit for CPU, 17... Power supply circuit for additional device, 18... Additional device, 19... Sequence controller, 20A... Input interface, 21A... Output driver, 2
2A...output load, 20...transmission/reception unit for copying machine main body,
21...master side microcomputer, 22,
32...Master/slave changeover switch, 23~
26, 33 to 36... Amplifier, 27, 27A... Master side transmitting unit, 28, 28A... Master side receiving unit, 29, 29A... Transmission line changeover switch, 30... Transmission/reception unit for additional equipment, 31... Slave side microcomputer, 37, 37A...Slave side transmitting unit, 38,38A...Slave side receiving unit, 39,39A...Transmission line selection switch, 40...Switch, 41, 41A...Power supply line (transmission line), 42, 42A, 43, 43A ...coupling capacitor, 44...filter circuit, 51...control storage section, 52...RAM (random access memory) section,
53... Arithmetic logic unit, 54... Accumulator, DCR... Decoder, ROM... Read only memory, PC... Prime counter, STK... Stack,
PD...Phase discrimination circuit, VCO...Voltage controlled oscillator,
PLL...Phase locked loop circuit, LPF...Low pass filter, WSC...Waveform shaping circuit.

Claims (1)

【特許請求の範囲】 1 マイクロコンピユータを有する第1のデータ
処理装置と、マイクロコンピユータを有する第2
のデータ処理装置との間のデータ通信方式におい
て、 第1のデータ処理装置と第2のデータ処理装置
との間のデータ伝送路として第1または第2の伝
送路の設定を可能とし、 前記第1のデータ処理装置はデータの伝送に先
立ち前記第1の伝送路を用いて前記第2の処理装
置に対し、同期合わせのための第1のクロツクパ
ルス列を送信し、 前記第2のデータ処理装置は前記第1のデータ
処理装置から送られてきた第1のクロツクパルス
列を受信するとともに、第1のクロツクパルス列
の速度を演算し、その演算結果に基づき第2のク
ロツクパルス列を作成し前記第1のデータ処理装
置に送信することを特徴とし、 さらに、前記第1のデータ処理装置は前記第2
のデータ処理装置から送られてきた第2のクロツ
クパルス列の速度を演算し、前記第1のクロツク
パルス列の送信時の速度と、前記演算により得ら
れた第2のクロツクパルス列の速度に基づき前記
第1の伝送路によるデータの通信が可能か不能か
を判別し、通信可能と判別した場合には第1の伝
送路を用いて前記第2のデータ処理装置へデータ
を送信し、通信不能と判別した場合にはデータ通
信のための伝送路を第1の伝送路から第2の伝送
路に切換えることを特徴とするデータ通信方式。
[Claims] 1. A first data processing device having a microcomputer, and a second data processing device having a microcomputer.
In the data communication method between the data processing device and the data processing device, it is possible to set a first or second transmission path as a data transmission path between the first data processing device and the second data processing device, and the method further comprises: Prior to data transmission, the first data processing device transmits a first clock pulse train for synchronization to the second processing device using the first transmission path, and performs the second data processing. The device receives the first clock pulse train sent from the first data processing device, calculates the speed of the first clock pulse train, and creates a second clock pulse train based on the calculation result. further, the first data processing device transmits the information to the second data processing device.
calculate the speed of the second clock pulse train sent from the data processing device, and use the speed of the first clock pulse train at the time of transmission and the speed of the second clock pulse train obtained by the calculation. Based on this, it is determined whether data communication via the first transmission path is possible or not, and when it is determined that communication is possible, the data is transmitted to the second data processing device using the first transmission path, and communication is performed. A data communication system characterized by switching a transmission path for data communication from a first transmission path to a second transmission path when it is determined that the data communication is impossible.
JP56194449A 1981-12-04 1981-12-04 Data transfer device Granted JPS5896339A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP56194449A JPS5896339A (en) 1981-12-04 1981-12-04 Data transfer device
US06/444,984 US4608689A (en) 1981-12-04 1982-11-29 Data processing and transfer apparatus
GB08234479A GB2115654B (en) 1981-12-04 1982-12-03 Image forming apparatus and system
DE19823244848 DE3244848A1 (en) 1981-12-04 1982-12-03 IMAGE GENERATION DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56194449A JPS5896339A (en) 1981-12-04 1981-12-04 Data transfer device

Publications (2)

Publication Number Publication Date
JPS5896339A JPS5896339A (en) 1983-06-08
JPH048980B2 true JPH048980B2 (en) 1992-02-18

Family

ID=16324751

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56194449A Granted JPS5896339A (en) 1981-12-04 1981-12-04 Data transfer device

Country Status (1)

Country Link
JP (1) JPS5896339A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61103297A (en) * 1984-10-26 1986-05-21 富士ゼロックス株式会社 Controller for electronic copying machine

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5292413A (en) * 1976-01-30 1977-08-03 Toshiba Corp Data transfer system
JPS5423348A (en) * 1977-07-23 1979-02-21 Ricoh Co Ltd Control method for apparatus on multi-microcomputer system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5821251Y2 (en) * 1979-04-13 1983-05-06 株式会社明電舎 Duplex data transmission equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5292413A (en) * 1976-01-30 1977-08-03 Toshiba Corp Data transfer system
JPS5423348A (en) * 1977-07-23 1979-02-21 Ricoh Co Ltd Control method for apparatus on multi-microcomputer system

Also Published As

Publication number Publication date
JPS5896339A (en) 1983-06-08

Similar Documents

Publication Publication Date Title
US8656208B2 (en) Communication system with automatic restoring function against faulty operation and restoring method thereof
JP4224834B2 (en) Chip card reader with high-speed communication protocol
US4608689A (en) Data processing and transfer apparatus
JPH048980B2 (en)
US5146567A (en) Keyboard interface
JP3007926B2 (en) Data carrier and identification system
US8386206B2 (en) Method for checking an interface module
US5748887A (en) Inter-processor asynchronous serial communication transmission/reception apparatus using each other's memories
US4747071A (en) Data transfer apparatus and system
US5617433A (en) Serial data transfer apparatus
US7085325B2 (en) Serial interface unit with transmit monitor
JPH0587851B2 (en)
JPH0440737B2 (en)
KR960016272B1 (en) Double making processor
JP3473951B2 (en) Data processing device and system
KR930004948B1 (en) Method for communicating data between micro-processors
TWI703441B (en) Pin multiplexer and method for controlling pin multiplexer
JP6977623B2 (en) Communications system
JPS6242419B2 (en)
JP2623816B2 (en) Signal transmission method
KR0131601B1 (en) Key board interface
JPS59171237A (en) Data transfer system
JPS58141055A (en) Signal transmitter on handshake system
JPS6028026B2 (en) Central processing unit mutual communication method
JP4576324B2 (en) Microprocessor