JPH11177654A - Data transmission reception method - Google Patents

Data transmission reception method

Info

Publication number
JPH11177654A
JPH11177654A JP9340009A JP34000997A JPH11177654A JP H11177654 A JPH11177654 A JP H11177654A JP 9340009 A JP9340009 A JP 9340009A JP 34000997 A JP34000997 A JP 34000997A JP H11177654 A JPH11177654 A JP H11177654A
Authority
JP
Japan
Prior art keywords
data
station
communication
transmission
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP9340009A
Other languages
Japanese (ja)
Inventor
Hirota Kawamura
洋太 川村
Yosuke Hirose
陽介 広瀬
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP9340009A priority Critical patent/JPH11177654A/en
Publication of JPH11177654A publication Critical patent/JPH11177654A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten processing time and transaction time for a data transmitter- receiver by selecting setting of a communication speed corresponding to a selected communication mode and revising a unit of data to be sent corresponding to the selection of the speed setting. SOLUTION: In the case that transmission and reception of lots of data is not required, a master station 31 sends the data one by one byte each by using a start-stop interface in the low speed mode and a slave station 32 receives the data one by one byte each. In the case that transmission of lots of data is required, a main control section 11 of the master station sends a high speed mode command to the slave station 32 via a communication control section 13 of the master station side. In the slave station 32 receiving the command, a communication control section 16 of the slave station switches the setting of the communication speed to the high speed and a DMA control section 15 of the slave station sets the mode in a way that the received data are set to a transmission reception buffer 22 in the lump in the unit of blocks and sends an acknowledgment ACK to the control means control section 13 of the master station. The master station 31 sends data in the unit of blocks at a high speed and the slave station 32 receives the data in the unit of blocks at a high speed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、シリアル調歩同期
インタフェースのデータ送受信方法に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transmission / reception method of a serial start / stop synchronization interface.

【0002】[0002]

【従来の技術】従来、一般に、送信元である第1の局か
ら送信先である第2の局にRS−232C等のシリアル
調歩同期インタフェースを利用してデータを送信する場
合、第1の局において、データがコマンド単位で送受信
バッファにセットされ、該送受信バッファ内のデータが
1バイト(1ワード)ずつ読み出され、第2の局にシリ
アルラインを介して送信される。そして、第2の局にお
いては、前記データが1バイトずつ受信され、送受信バ
ッファにセットされる。
2. Description of the Related Art Conventionally, when data is transmitted from a first station, which is a transmission source, to a second station, which is a transmission destination, using a serial start-stop synchronization interface such as RS-232C, the first station is generally used. In, data is set in the transmission / reception buffer on a command basis, and the data in the transmission / reception buffer is read out one byte (one word) at a time and transmitted to the second station via a serial line. Then, in the second station, the data is received one byte at a time and set in the transmission / reception buffer.

【0003】この場合、データを確実に送信することが
できるように、通信速度は9600〔bps〕又は19
200〔bps〕程度に設定される。
In this case, the communication speed is set to 9600 [bps] or 19 to ensure that data can be transmitted.
It is set to about 200 [bps].

【0004】[0004]

【発明が解決しようとする課題】しかしながら、前記従
来のデータ送受信方法においては、通信速度が低いだけ
でなく、1バイトごとに割込処理を行ってデータが送信
されるようになっているので、例えば、イメージデータ
のように、大量のデータを送受信する場合に、インタフ
ェース処理時間が長くなってしまう。その結果、データ
送受信装置の処理時間、取引時間等が長くなってしま
う。
However, in the conventional data transmission / reception method, not only the communication speed is low, but also data is transmitted by performing an interrupt process for each byte. For example, when transmitting and receiving a large amount of data such as image data, the interface processing time becomes long. As a result, the processing time, transaction time, and the like of the data transmitting and receiving device become longer.

【0005】本発明は、前記従来のデータ送受信方法の
問題点を解決して、大量のデータを送受信する場合にお
いて、データ送受信装置の処理時間、取引時間等を短く
することができるデータ送受信方法を提供することを目
的とする。
[0005] The present invention solves the above-mentioned problems of the conventional data transmission / reception method, and provides a data transmission / reception method capable of shortening the processing time, transaction time, and the like of a data transmission / reception device when transmitting / receiving a large amount of data. The purpose is to provide.

【0006】[0006]

【課題を解決するための手段】そのために、本発明のデ
ータ送受信方法においては、第1の局から第2の局に異
なる通信速度でデータを送信するための通信モードを選
択し、選択された通信モードに対応させて前記第1、第
2の局における通信速度の設定を切り替え、通信速度の
設定の切替えに対応させて、送信されるデータの単位を
変更する。
For this purpose, in the data transmitting / receiving method of the present invention, a communication mode for transmitting data at a different communication speed from the first station to the second station is selected, and the selected mode is selected. The setting of the communication speed in the first and second stations is switched according to the communication mode, and the unit of data to be transmitted is changed according to the switching of the communication speed setting.

【0007】[0007]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照しながら詳細に説明する。図1は本発明の
第1の実施の形態におけるシリアル調歩同期インタフェ
ースによってデータの送受信を行うためのデータ送受信
装置のブロック図、図2は本発明の第1の実施の形態に
おけるデータ送受信方法のシーケンスを表す図である。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram of a data transmitting / receiving apparatus for transmitting / receiving data by a serial start / stop synchronization interface according to a first embodiment of the present invention. FIG. 2 is a sequence diagram of a data transmitting / receiving method according to the first embodiment of the present invention. FIG.

【0008】図1において、31は送信元である第1の
局としての主局、32は送信先であ第2の局としての従
局である。なお、本実施の形態においては、主局31か
ら従局32にデータを送信する場合について説明する
が、従局32から主局31にデータを送信することもで
きる。また、11は主局側主制御部、12は主局側DM
A制御部、13は主局側通信制御部、14は従局側主制
御部、15は従局側DMA制御部、16は従局側通信制
御部、17は主局側送信部、18は主局側受信部、19
は従局側受信部、20は従局側送信部、21、22は送
受信バッファである。
In FIG. 1, reference numeral 31 denotes a master station serving as a first station as a transmission source, and reference numeral 32 denotes a slave station serving as a second station as a transmission destination. In the present embodiment, a case where data is transmitted from master station 31 to slave station 32 will be described. However, data may be transmitted from slave station 32 to master station 31. Reference numeral 11 denotes a main station side main control unit, and 12 denotes a main station side DM.
A control section, 13 is a master station communication control section, 14 is a slave station main control section, 15 is a slave station DMA control section, 16 is a slave station communication control section, 17 is a master station transmission section, and 18 is a master station side. Receiver, 19
Denotes a slave side receiving unit, 20 denotes a slave side transmitting unit, and 21 and 22 denote transmission / reception buffers.

【0009】前記構成のデータ送受信装置においては、
主局側主制御部11の図示されないモード選択部によっ
て通信モードを選択し、選択された通信モードに対応す
る通信速度でデータを送信することができるようになっ
いる。なお、本実施の形態においては、低速でデータを
送信する低速モード、及び高速でデータを送信する高速
モードのうちの一方を選択するようになっているが、三
つ以上の通信モードのうちの一つを選択するようにする
こともできる。また、送信されるデータの単位が前記通
信速度に対応させて変更される。
[0009] In the data transmitting and receiving apparatus having the above configuration,
A communication mode is selected by a mode selection unit (not shown) of the main station side main control unit 11, and data can be transmitted at a communication speed corresponding to the selected communication mode. In this embodiment, one of a low-speed mode for transmitting data at a low speed and a high-speed mode for transmitting data at a high speed is selected, but among three or more communication modes, You can choose one. Further, the unit of data to be transmitted is changed in accordance with the communication speed.

【0010】そして、主局側主制御部11は、大量のデ
ータを送受信する必要がない場合、データを確実に送信
するために、前記モード選択部によって低速モードを選
択し、データをコマンド単位で送受信バッファ21にセ
ットし、主局側通信制御部13に送信依頼を送る。前記
主局側通信制御部13は、主局側主制御部11から送信
依頼を受けると、低速モードでデータを送信するための
通常コマンドを従局32に送信してセレクティングを行
う。続いて、主局側通信制御部13は、送受信バッファ
21内のデータを1バイトずつ読み出し、主局側送信部
17によってシリアルラインL1を介して9600〔b
ps〕又は19200〔bps〕程度の通信速度で従局
32に送信する。そして、送受信バッファ21内のすべ
てのデータが従局32に送信されると、前記主局側通信
制御部13は主局側主制御部11に送信の終了を通知す
る。
When it is not necessary to transmit and receive a large amount of data, the main station side main control section 11 selects the low speed mode by the mode selection section and transmits the data in command units in order to transmit the data reliably. It is set in the transmission / reception buffer 21 and sends a transmission request to the main station communication control unit 13. Upon receiving the transmission request from the main station side main control section 11, the master station side communication control section 13 transmits a normal command for transmitting data in the low speed mode to the slave station 32 to perform the selecting. Subsequently, the master-station-side communication control unit 13 reads the data in the transmission / reception buffer 21 byte by byte, and the master-station-side transmission unit 17 transmits 9600 [b] via the serial line L1.
ps] or 19200 [bps]. Then, when all the data in the transmission / reception buffer 21 is transmitted to the slave station 32, the master station communication control unit 13 notifies the master station main control unit 11 of the end of the transmission.

【0011】一方、従局32において、主局31からデ
ータが1バイトずつ送信されると、従局側通信制御部1
6は、従局側受信部19によって前記データを1バイト
ずつ受信し、送受信バッファ22にセットする。そし
て、データの受信が繰り返され、前記通常コマンドに対
応するすべてのデータが受信されると、従局側通信制御
部16は従局側主制御部14に受信の終了を通知する。
On the other hand, in the slave station 32, when data is transmitted one byte at a time from the master station 31, the slave station communication control unit 1
In 6, the data is received one byte at a time by the slave receiving unit 19 and set in the transmission / reception buffer 22. Then, the data reception is repeated, and when all the data corresponding to the normal command is received, the slave communication control unit 16 notifies the slave main control unit 14 of the end of the reception.

【0012】なお、すべてのデータの受信が正常に行わ
れると、従局側通信制御部16から主局側通信制御部1
3にアクノリッジACKが送られ、続いて、主局側通信
制御部13から従局側通信制御部16に送信が終了した
ことを表す信号EOTが送信される。次に、主局31か
ら従局32に大量のデータを送信する必要がある場合、
主局側主制御部11は、モード選択部によって高速モー
ドを選択し、主局側通信制御部13にデータの送信依頼
を送る。主局側通信制御部13は、主局側主制御部11
から送信依頼を受けると、高速モードでデータを送信す
るための大量データ送信コマンドを従局32に送信して
セレクティングを行う。続いて、主局側通信制御部13
は、主局側主制御部11の指示を受けて通信速度を高速
側に切り替える。
When all data has been received normally, the slave station-side communication control unit 16
3, an acknowledgment ACK is sent, and subsequently, a signal EOT indicating that the transmission has been completed is transmitted from the master station communication control unit 13 to the slave station communication control unit 16. Next, when a large amount of data needs to be transmitted from the master station 31 to the slave station 32,
The main station side main control section 11 selects the high speed mode by the mode selection section, and sends a data transmission request to the main station side communication control section 13. The main-station-side communication control unit 13 includes a main-station-side main control unit 11.
When a transmission request is received from, a large-volume data transmission command for transmitting data in the high-speed mode is transmitted to the slave station 32 for selection. Subsequently, the master station communication control unit 13
Switches the communication speed to a higher speed in response to an instruction from the main station side main controller 11.

【0013】一方、前記従局側通信制御部16によって
大量データ送信コマンドが受信されると、従局側受信部
19は、従局側主制御部14の指示を受けて従局側通信
制御部16内の図示されないICの通信速度の設定を高
速側に切り替える。そして、従局側通信制御部16は、
受信されたデータが一括してブロック単位で送受信バッ
ファ22にセットされるように、従局側主制御部14を
介して従局側DMA制御部15に依頼を送る。そして、
従局側通信制御部16から主局側通信制御部13にアク
ノリッジACKが送られ、続いて、主局側通信制御部1
3から従局側通信制御部16に信号EOTが送信され
る。
On the other hand, when the slave station communication control section 16 receives the large data transmission command, the slave station receiving section 19 receives an instruction from the slave station main control section 14 and receives a command from the slave station communication control section 16. The setting of the communication speed of the IC that is not performed is switched to the high speed side. Then, the slave station side communication control unit 16
A request is sent to the slave-side DMA controller 15 via the slave-side main controller 14 so that the received data is collectively set in the transmission / reception buffer 22 in block units. And
An acknowledgment ACK is sent from the slave station-side communication control section 16 to the master station-side communication control section 13, and subsequently, the master station-side communication control section 1
3 transmits a signal EOT to the slave station side communication control unit 16.

【0014】ところで、大量データ送信コマンドが送信
された後、従局側受信部19が通信速度を高速側に切り
替える間に主局31から従局32へのデータの送信が開
始されると、通信エラーが発生してしまう。そこで、大
量データ送信コマンドが送信されたときにデータの送信
の開始が所定時間遅延させられる。そのために、主局側
通信制御部13から従局側通信制御部16に信号EOT
が送信されたタイミングで、主局側主制御部11及び従
局側主制御部14は、いずれも、図示されないタイマに
よる計時を開始し、設定時間τ1が経過するのを待機
し、該設定時間τ1が経過したときに、主局側主制御部
11は主局31から従局32へのデータの送信を開始す
る。なお、本実施の形態においては、主局側通信制御部
13から従局側通信制御部16に信号EOTが送信され
たタイミングでタイマによる計時が開始されるようにな
っているが、主局側通信制御部13から従局側通信制御
部16に大量データ送信コマンドが送信されたタイミン
グで計時を開始することもできる。
By the way, if the transmission of data from the master station 31 to the slave station 32 is started while the slave station receiving section 19 switches the communication speed to the high speed side after the transmission of the large data transmission command, a communication error occurs. Will occur. Therefore, when a large data transmission command is transmitted, the start of data transmission is delayed for a predetermined time. For this purpose, the master station communication control unit 13 sends the signal EOT to the slave station communication control unit 16.
Are transmitted, the master station-side main control section 11 and the slave station-side main control section 14 both start counting time using a timer (not shown) and wait for a set time τ1 to elapse. Has elapsed, the master-station-side main controller 11 starts transmitting data from the master station 31 to the slave station 32. In the present embodiment, the timer is started at the timing when the signal EOT is transmitted from the master station communication control unit 13 to the slave station communication control unit 16; The timing can be started at the timing when the large-volume data transmission command is transmitted from the control unit 13 to the slave-side communication control unit 16.

【0015】そして、主局側主制御部11は、ブロック
単位でデータを送受信バッファ21にセットし、主局側
通信制御部13は、送受信バッファ21内のデータが一
括してブロック単位で送信されるように、主局側主制御
部11を介して主局側DMA制御部12に送信依頼を送
る。前記主局側DMA制御部12は、主局側通信制御部
13から送信依頼を受けると、送受信バッファ21内の
データを主局側通信制御部13を介して一括して従局3
2に送信する。
The main-station-side main control section 11 sets data in the transmission / reception buffer 21 in block units, and the main-station-side communication control section 13 transmits the data in the transmission / reception buffer 21 collectively in block units. Thus, a transmission request is sent to the master-station-side DMA control unit 12 via the master-station-side main control unit 11. When receiving a transmission request from the master station communication controller 13, the master station DMA controller 12 collectively transfers the data in the transmission / reception buffer 21 via the master station communication controller 13 to the slave station 3.
Send to 2.

【0016】一方、前記従局側DMA制御部15は、主
局31からデータが送信されると、該データを一括して
ブロック単位で送受信バッファ22にセットする。そし
て、高速モードでのデータの送信が終了し、前記大量デ
ータ送信コマンドに対応するすべてのデータが受信され
ると、従局側通信制御部16は、従局側主制御部14に
受信の終了を通知する。また、従局側通信制御部16か
ら主局側通信制御部13にアクノリッジACKが送ら
れ、続いて、主局側通信制御部13から従局側通信制御
部16に信号EOTが送信される。
On the other hand, when data is transmitted from the master station 31, the slave station side DMA controller 15 collectively sets the data in the transmission / reception buffer 22 in block units. When the data transmission in the high-speed mode is completed and all the data corresponding to the large data transmission command is received, the slave communication control unit 16 notifies the slave main control unit 14 of the end of the reception. I do. Further, an acknowledgment ACK is sent from the slave station communication control section 16 to the master station communication control section 13, and subsequently, a signal EOT is sent from the master station communication control section 13 to the slave station communication control section 16.

【0017】次に、主局31から従局32に大量のデー
タを送信する必要がなくなると、主局側主制御部11
は、モード選択部によって低速モードを選択し、主局側
通信制御部13にデータの送信依頼を送る。主局側通信
制御部13は、主局側主制御部11から送信依頼を受け
ると、低速モードでデータを送信するための通常コマン
ドを従局32に送信してセレクティングを行う。続い
て、主局側通信制御部13は、主局側主制御部11の指
示を受けて通信速度を低速側に切り替える。
Next, when it becomes unnecessary to transmit a large amount of data from the master station 31 to the slave station 32, the master station side main controller 11
Selects the low-speed mode by the mode selection unit, and sends a data transmission request to the main station side communication control unit 13. When receiving the transmission request from the main station side main control section 11, the master station side communication control section 13 transmits a normal command for transmitting data in the low speed mode to the slave station 32 to perform the selecting. Subsequently, the master station communication control unit 13 switches the communication speed to a low speed side in response to an instruction from the master station main control unit 11.

【0018】一方、前記従局側通信制御部16によって
通常コマンドが受信されると、従局側受信部19は、従
局側主制御部14の指示を受けて従局側通信制御部16
内の図示されないICの通信速度の設定を低速側に切り
替える。続いて、主局側通信制御部13は、送受信バッ
ファ21内のデータを1バイトずつ読み出し、主局側送
信部17によってシリアルラインL1を介して9600
〔bps〕又は19200〔bps〕程度の通信速度で
従局32に送信する。そして、前記主局側通信制御部1
3は、送受信バッファ21内のすべてのデータが従局3
2に送信されると、主局側主制御部11に送信の終了を
通知する。
On the other hand, when the slave station communication control section 16 receives the normal command, the slave station receiving section 19 receives an instruction from the slave station main control section 14 and receives the instruction from the slave station communication control section 16.
The setting of the communication speed of the IC (not shown) is switched to the lower speed side. Subsequently, the master-station-side communication control unit 13 reads data in the transmission / reception buffer 21 byte by byte, and the master-station-side transmission unit 17 reads 9600 data via the serial line L1.
It transmits to the slave station 32 at a communication speed of about [bps] or 19200 [bps]. Then, the main station side communication control unit 1
3 indicates that all data in the transmission / reception buffer 21 is the slave station 3
2, the main station side main controller 11 is notified of the end of the transmission.

【0019】一方、従局32において、主局31からデ
ータが1バイトずつ送信されると、従局側通信制御部1
6は、従局側受信部19によって前記データを1バイト
ずつ受信し、送受信バッファ22にセットする。そし
て、データの受信が繰り返され、前記通常コマンドに対
応するすべてのデータが受信されると、従局側通信制御
部16は従局側主制御部14に受信の終了を通知する。
On the other hand, in the slave station 32, when data is transmitted one byte at a time from the master station 31, the slave station communication control unit 1
In 6, the data is received one byte at a time by the slave receiving unit 19 and set in the transmission / reception buffer 22. Then, the data reception is repeated, and when all the data corresponding to the normal command is received, the slave communication control unit 16 notifies the slave main control unit 14 of the end of the reception.

【0020】ところで、通常コマンドが送信された後、
従局側受信部19が通信速度を低速側に切り替える間に
主局31から従局32へのデータの送信が開始される
と、通信エラーが発生してしまう。そこで、主局側通信
制御部13から従局側通信制御部16に前記信号EOT
が送信された後、データの送信の開始が所定時間遅延さ
せられる。
By the way, after the normal command is transmitted,
If data transmission from the master station 31 to the slave station 32 is started while the slave station receiving section 19 switches the communication speed to the lower speed side, a communication error occurs. Therefore, the signal EOT is sent from the master station communication control section 13 to the slave station communication control section 16.
Is transmitted, the start of data transmission is delayed for a predetermined time.

【0021】そのために、主局側通信制御部13から従
局側通信制御部16に信号EOTが送信されたタイミン
グで、主局側主制御部11及び従局側主制御部14は、
いずれも、前記タイマによる計時を開始し、設定時間τ
2が経過するのを待機し、該設定時間τ2が経過したと
きに、主局側主制御部11は主局31から従局32への
データの送信を開始する。なお、本実施の形態において
は、主局側通信制御部13から従局側通信制御部16に
信号EOTが送信されたタイミングでタイマによる計時
が開始されるようになっているが、主局側通信制御部1
3から従局側通信制御部16に通常コマンドが送信され
たタイミングで計時を開始することもできる。
Therefore, at the timing when the signal EOT is transmitted from the master station communication control unit 13 to the slave station communication control unit 16, the master station main control unit 11 and the slave station main control unit 14
In any case, the timer starts counting time, and the set time τ
The master station-side main controller 11 starts transmitting data from the master station 31 to the slave station 32 when the set time τ2 has elapsed. In the present embodiment, the timer is started at the timing when the signal EOT is transmitted from the master station communication control unit 13 to the slave station communication control unit 16; Control unit 1
From 3, the timing can be started at the timing when the normal command is transmitted to the slave communication control unit 16.

【0022】このように、大量のデータを送受信する場
合に、通信速度を高速側に切り替えるとともに、データ
を一括してブロック単位で送信することができるので、
インタフェース処理時間を短くすることができる。した
がって、データ送受信装置の処理時間、取引時間等を短
くすることができる。しかも、通信速度を高速側に切り
替えたり、データを一括してブロック単位で送信したり
するために、ハードを変更する必要もない。
As described above, when a large amount of data is transmitted / received, the communication speed can be switched to a high speed side and the data can be transmitted collectively in block units.
The interface processing time can be shortened. Therefore, processing time, transaction time, and the like of the data transmitting and receiving device can be shortened. In addition, there is no need to change hardware in order to switch the communication speed to a high speed side or to transmit data collectively in block units.

【0023】ところで、前記第1の実施の形態において
は、通信速度の設定を切り替えるときに、設定時間τ
1、τ2が経過するのをタイマの計時によって待機する
ようになっている。したがって、従局32において通信
速度の設定が切り替わったにもかかわらず設定時間τ
1、τ2が経過していない場合、送信を開始することが
できない。その結果、タイムラグが生じ、インタフェー
ス処理時間をその分短くすることができない。
In the first embodiment, when the setting of the communication speed is switched, the setting time τ
1, and the passage of τ2 is waited for by the counting of a timer. Therefore, despite the fact that the setting of the communication speed is switched in the slave station 32, the set time τ
1. If τ2 has not elapsed, transmission cannot be started. As a result, a time lag occurs, and the interface processing time cannot be reduced accordingly.

【0024】そこで、前記タイムラグを無くすことがで
きる本発明の第2の実施の形態について説明する。図3
は本発明の第2の実施の形態におけるシリアル調歩同期
インタフェースによってデータの送受信を行うためのデ
ータ送受信装置のブロック図、図4は本発明の第2の実
施の形態におけるデータ送受信方法のシーケンスを表す
図である。なお、第1の実施の形態と同じ構造を有する
ものについては、同じ符号を付与することによってその
説明を省略する。
Therefore, a second embodiment of the present invention that can eliminate the time lag will be described. FIG.
Is a block diagram of a data transmitting / receiving apparatus for transmitting / receiving data by a serial start / stop synchronization interface according to a second embodiment of the present invention, and FIG. 4 shows a sequence of a data transmitting / receiving method according to the second embodiment of the present invention. FIG. In addition, about what has the same structure as 1st Embodiment, the description is abbreviate | omitted by attaching the same code | symbol.

【0025】この場合、主局側通信制御部13と従局側
通信制御部16との間を接続する図示されないシリアル
調歩同期インタフェースのケーブルの空いているシリア
ルラインL2を利用し、主局側通信制御部13と従局側
通信制御部16との間で通信速度切替検出信号ERを送
受信することができるようになっている。したがって、
例えば、主局31から従局32にデータを送信する場
合、主局側主制御部11は、従局32において通信速度
の設定の切替えが終了したかどうかを前記通信速度切替
検出信号ERのオン・オフで判断することができる。本
実施の形態において、通信速度切替検出信号ERは、通
信速度の設定が高速側に切り替えられるとオンになり、
低速側に切り替えられるとオフになる。
In this case, the master station side communication control unit 13 and the slave station side communication control unit 16 are connected to each other by using the vacant serial line L2 of a serial start-stop synchronization interface cable (not shown). The communication speed switching detection signal ER can be transmitted and received between the section 13 and the slave station communication control section 16. Therefore,
For example, when data is transmitted from the master station 31 to the slave station 32, the master-station-side main controller 11 determines whether or not the switching of the communication speed setting in the slave station 32 is completed by turning on / off the communication speed switching detection signal ER. Can be determined. In the present embodiment, the communication speed switching detection signal ER is turned on when the setting of the communication speed is switched to the high speed side,
Turns off when switched to low speed.

【0026】前記構成のデータ送受信装置において、主
局側主制御部11は、大量のデータを送受信する必要が
ない場合、データを確実に送信するために、図示されな
いモード選択部によって低速モードを選択し、データを
コマンド単位で送受信バッファ21にセットし、主局側
通信制御部13に送信依頼を送る。前記主局側通信制御
部13は、主局側主制御部11から送信依頼を受ける
と、低速モードでデータを送信するための通常コマンド
を従局32に送信してセレクティングを行う。続いて、
主局側通信制御部13は、送受信バッファ21内のデー
タを1バイトずつ読み出し、主局側送信部17によって
シリアルラインL1を介して9600〔bps〕又は1
9200〔bps〕程度の速度で従局32に送信する。
そして、前記主局側通信制御部13は、送受信バッファ
21内のすべてのデータが従局32に送信されると、主
局側主制御部11に送信の終了を通知する。
In the data transmission / reception device having the above-described configuration, when it is not necessary to transmit / receive a large amount of data, the main station-side main control unit 11 selects a low-speed mode by a mode selection unit (not shown) in order to transmit data reliably. Then, the data is set in the transmission / reception buffer 21 for each command, and a transmission request is sent to the communication control unit 13 on the master station side. Upon receiving the transmission request from the main station side main control section 11, the master station side communication control section 13 transmits a normal command for transmitting data in the low speed mode to the slave station 32 to perform the selecting. continue,
The master station communication control unit 13 reads the data in the transmission / reception buffer 21 one byte at a time, and the master station transmission unit 17 outputs 9600 [bps] or 1 byte via the serial line L1.
It transmits to the slave station 32 at a speed of about 9200 [bps].
When all the data in the transmission / reception buffer 21 has been transmitted to the slave station 32, the master station communication control section 13 notifies the master station main control section 11 of the end of the transmission.

【0027】一方、従局32において、主局31からデ
ータが1バイトずつ送信されると、従局側通信制御部1
6は、従局側受信部19によって前記データを1バイト
ずつ受信し、送受信バッファ22にセットする。そし
て、データの受信が繰り返され、前記通常コマンドに対
応するすべてのデータが受信されると、従局側通信制御
部16は従局側主制御部14に受信の終了を通知する。
On the other hand, in the slave station 32, when data is transmitted one byte at a time from the master station 31, the slave station communication control unit 1
In 6, the data is received one byte at a time by the slave receiving unit 19 and set in the transmission / reception buffer 22. Then, the data reception is repeated, and when all the data corresponding to the normal command is received, the slave communication control unit 16 notifies the slave main control unit 14 of the end of the reception.

【0028】なお、すべてのデータの受信が正常に行わ
れると、従局側通信制御部16から主局側通信制御部1
3にアクノリッジACKが送られ、続いて、主局側通信
制御部13から従局側通信制御部16に通信が終了した
ことを表す信号EOTが送信される。次に、主局31か
ら従局32に大量のデータを送信する場合、主局側主制
御部11は、前記モード選択部によって高速モードを選
択し、主局側通信制御部13にデータの送信依頼を送
る。該主局側通信制御部13は、主局側主制御部11か
ら送信依頼を受けると、高速モードでデータを送信する
ための大量データ送信コマンドを従局32に送信してセ
レクティングを行う。続いて、主局側通信制御部13
は、主局側主制御部11の指示を受けて通信速度を高速
側に切り替える。
When all data has been received normally, the slave station-side communication controller 16
3, an acknowledgment ACK is sent, and subsequently, a signal EOT indicating that communication has been completed is transmitted from the master station communication control unit 13 to the slave station communication control unit 16. Next, when transmitting a large amount of data from the master station 31 to the slave station 32, the master-station-side main controller 11 selects the high-speed mode by the mode selector, and requests the master-station-side communication controller 13 to transmit data. Send. Upon receiving the transmission request from the main station side main control section 11, the master station side communication control section 13 transmits a large data transmission command for transmitting data in the high-speed mode to the slave station 32 to perform the selecting. Subsequently, the master station communication control unit 13
Switches the communication speed to a higher speed in response to an instruction from the main station side main controller 11.

【0029】一方、前記従局側通信制御部16によって
大量データ送信コマンドが受信されると、従局側受信部
19は、従局側主制御部14の指示を受けて従局側通信
制御部16内の図示されないICの通信速度の設定を高
速側に切り替える。そして、従局側通信制御部16は、
受信されたデータが一括してブロック単位で送受信バッ
ファ22にセットされるように、従局側主制御部14を
介して従局側DMA制御部15に依頼を送る。次に、従
局側通信制御部16から主局側通信制御部13にアクノ
リッジACKが送られ、続いて、主局側通信制御部13
から従局側通信制御部16に信号EOTが送信される。
On the other hand, when the slave station communication control section 16 receives a large data transmission command, the slave station receiving section 19 receives an instruction from the slave station main control section 14 and receives a command from the slave station communication control section 16. The setting of the communication speed of the IC that is not performed is switched to the high speed side. Then, the slave station side communication control unit 16
A request is sent to the slave-side DMA controller 15 via the slave-side main controller 14 so that the received data is collectively set in the transmission / reception buffer 22 in block units. Next, an acknowledgment ACK is transmitted from the slave station communication control unit 16 to the master station communication control unit 13.
Transmits the signal EOT to the slave-side communication control unit 16.

【0030】また、前記主局側主制御部11は、前記通
信速度切替検出信号ERがオンになるのを待機し、通信
速度の設定が高速側に切り替えられて通信速度切替検出
信号ERがオンになると、従局32において通信速度の
設定の切替えが終了したと判断し、ブロック単位でデー
タを送受信バッファ21にセットする。そして、主局側
通信制御部13は、送受信バッファ21内のデータが一
括してブロック単位で送信されるように、主局側主制御
部11を介して主局側DMA制御部12に送信依頼を送
る。前記主局側DMA制御部12は、主局側通信制御部
13から送信依頼を受けると、送受信バッファ21内の
データを主局側通信制御部13を介して一括して従局3
2に送信する。
The main-station-side main control section 11 waits for the communication speed switching detection signal ER to be turned on, and the communication speed setting is switched to the high speed side so that the communication speed switching detection signal ER is turned on. Then, the slave station 32 determines that the switching of the communication speed has been completed, and sets the data in the transmission / reception buffer 21 in block units. Then, the master-station-side communication control unit 13 sends a transmission request to the master-station-side DMA control unit 12 via the master-station-side main control unit 11 so that the data in the transmission / reception buffer 21 is transmitted collectively in block units. Send. When receiving a transmission request from the master station communication controller 13, the master station DMA controller 12 collectively transfers the data in the transmission / reception buffer 21 via the master station communication controller 13 to the slave station 3.
Send to 2.

【0031】一方、前記従局側DMA制御部15は、主
局31からデータが送信されると、該データを一括して
ブロック単位で送受信バッファ22にセットする。そし
て、高速モードでのデータの送信が終了し、前記大量デ
ータ送信コマンドに対応するすべてのデータが受信され
ると、従局側通信制御部16は、従局側主制御部14に
受信の終了を通知する。また、従局側通信制御部16か
ら主局側通信制御部13にアクノリッジACKが送ら
れ、続いて、主局側通信制御部13から従局側通信制御
部16に前記信号EOTが送信される。
On the other hand, when data is transmitted from the master station 31, the slave station-side DMA controller 15 collectively sets the data in the transmission / reception buffer 22 in block units. When the data transmission in the high-speed mode is completed and all the data corresponding to the large data transmission command is received, the slave communication control unit 16 notifies the slave main control unit 14 of the end of the reception. I do. Also, an acknowledgment ACK is sent from the slave station communication control section 16 to the master station communication control section 13, and subsequently, the signal EOT is sent from the master station communication control section 13 to the slave station communication control section 16.

【0032】次に、主局31から従局32に大量のデー
タを送信する必要がなくなると、主局側主制御部11
は、前記モード選択部によって低速モードを選択し、デ
ータをコマンド単位で送受信バッファ21にセットし、
主局側通信制御部13にデータの送信依頼を送る。主局
側通信制御部13は、主局側主制御部11から送信依頼
を受けると、低速モードでデータを送信するための通常
コマンドを従局32に送信してセレクティングを行う。
続いて、主局側通信制御部13は、主局側主制御部11
の指示を受けて通信速度を低速側に切り替える。
Next, when it becomes unnecessary to transmit a large amount of data from the master station 31 to the slave station 32, the master station side main controller 11
Selects the low-speed mode by the mode selection unit, sets data in the transmission / reception buffer 21 in command units,
A data transmission request is sent to the master station communication control unit 13. When receiving the transmission request from the main station side main control section 11, the master station side communication control section 13 transmits a normal command for transmitting data in the low speed mode to the slave station 32 to perform the selecting.
Subsequently, the main station side communication control unit 13
The communication speed is switched to the low speed side in response to the instruction.

【0033】一方、前記従局側通信制御部16によって
通常コマンドが受信されると、従局側受信部19は、従
局側主制御部14の指示を受けて従局側通信制御部16
内の前記ICの通信速度の設定を低速側に切り替える。
そして、前記主局側主制御部11は、前記通信速度切替
検出信号ERがオフになるのを待機し、通信速度の設定
が低速側に切り替えられて通信速度切替検出信号ERが
オフになると、従局32における通信速度の設定の切替
えが終了したと判断する。
On the other hand, when a normal command is received by the slave-side communication control section 16, the slave-side receiving section 19 receives an instruction from the slave-side main control section 14, and receives a command from the slave-side communication control section 16.
The setting of the communication speed of the IC is switched to the lower speed side.
Then, the main station side main controller 11 waits for the communication speed switching detection signal ER to be turned off, and when the communication speed setting is switched to the low speed side and the communication speed switching detection signal ER is turned off, It is determined that the switching of the communication speed setting in slave station 32 has been completed.

【0034】続いて、主局側通信制御部13は、送受信
バッファ21内のデータを1バイトずつ読み出し、主局
側送信部17によってシリアルラインL1を介して96
00〔bps〕又は19200〔bps〕程度の速度で
従局32に送信する。そして、前記主局側通信制御部1
3は、送受信バッファ21内のすべてのデータが従局3
2に送信されると、主局側主制御部11に送信の終了を
通知する。
Subsequently, the main station side communication control section 13 reads the data in the transmission / reception buffer 21 one byte at a time,
It transmits to the slave station 32 at a speed of about 00 [bps] or 19200 [bps]. Then, the main station side communication control unit 1
3 indicates that all data in the transmission / reception buffer 21 is the slave station 3
2, the main station side main controller 11 is notified of the end of the transmission.

【0035】一方、従局32において、主局31からデ
ータが1バイトずつ送信されると、従局側通信制御部1
6は、従局側受信部19によって前記データを1バイト
ずつ受信し、送受信バッファ22にセットする。そし
て、データの受信が繰り返され、前記通常コマンドに対
応するすべてのデータが受信されると、従局側通信制御
部16は、従局側主制御部14に受信の終了を通知す
る。
On the other hand, in the slave station 32, when data is transmitted one byte at a time from the master station 31, the slave station communication control unit 1
In 6, the data is received one byte at a time by the slave receiving unit 19 and set in the transmission / reception buffer 22. When the data reception is repeated and all data corresponding to the normal command is received, the slave communication control unit 16 notifies the slave main control unit 14 of the end of the reception.

【0036】なお、すべてのデータの受信が正常に行わ
れると、従局側通信制御部16から主局側通信制御部1
3にアクノリッジACKが送られ、続いて、主局側通信
制御部13から従局側通信制御部16に前記信号EOT
が送信される。このように、本実施の形態においては、
データの送信先において通信速度の設定が切り替わった
かどうかを前記通信速度切替検出信号ERのオン・オフ
によって判断することができる。したがって、インタフ
ェース処理時間を更に短くすることができる。
When all data has been received normally, the slave station-side communication controller 16
3, an acknowledgment ACK is sent to the master station communication control unit 13 and the slave station communication control unit 16 receives the signal EOT.
Is sent. Thus, in the present embodiment,
Whether or not the communication speed setting has been switched at the data transmission destination can be determined by turning on / off the communication speed switching detection signal ER. Therefore, the interface processing time can be further reduced.

【0037】なお、本発明は前記実施の形態に限定され
るものではなく、本発明の趣旨に基づいて種々変形させ
ることが可能であり、それらを本発明の範囲から排除す
るものではない。
The present invention is not limited to the above embodiment, but can be variously modified based on the gist of the present invention, and they are not excluded from the scope of the present invention.

【0038】[0038]

【発明の効果】以上詳細に説明したように、本発明によ
れば、データ送受信方法においては、第1の局から第2
の局に異なる通信速度でデータを送信するための通信モ
ードを選択し、選択された通信モードに対応させて前記
第1、第2の局における通信速度の設定を切り替え、通
信速度の設定の切替えに対応させて、送信されるデータ
の単位を変更する。
As described above in detail, according to the present invention, in the data transmission / reception method, the first station is connected to the second station.
A communication mode for transmitting data to a different station at a different communication speed, switching the communication speed setting in the first and second stations according to the selected communication mode, and switching the communication speed setting To change the unit of the data to be transmitted.

【0039】この場合、通信モードを選択すると、選択
された通信モードに対応させて前記第1、第2の局にお
ける通信速度の設定が切り替えられ、通信速度の設定の
切替えに対応させて、送信されるデータの単位が変更さ
れる。したがって、大量のデータを送受信する場合にイ
ンタフェース処理時間を短くすることができる。その結
果、データ送受信装置の処理時間、取引時間等を短くす
ることができる。しかも、通信速度の設定を切り替えた
り、送信されるデータの単位を変更するために、ハード
を変更する必要もない。
In this case, when the communication mode is selected, the setting of the communication speed in the first and second stations is switched according to the selected communication mode, and the transmission is performed according to the switching of the communication speed setting. The unit of data to be changed is changed. Therefore, when a large amount of data is transmitted and received, the interface processing time can be reduced. As a result, the processing time and transaction time of the data transmitting / receiving device can be shortened. In addition, there is no need to change hardware in order to switch the communication speed setting or change the unit of data to be transmitted.

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

【図1】本発明の第1の実施の形態におけるシリアル調
歩同期インタフェースによってデータの送受信を行うた
めのデータ送受信装置のブロック図である。
FIG. 1 is a block diagram of a data transmitting / receiving apparatus for transmitting / receiving data by a serial start / stop synchronization interface according to a first embodiment of the present invention.

【図2】本発明の第1の実施の形態におけるデータ送受
信方法のシーケンスを表す図である。
FIG. 2 is a diagram illustrating a sequence of a data transmission / reception method according to the first embodiment of the present invention.

【図3】本発明の第2の実施の形態におけるシリアル調
歩同期インタフェースによってデータの送受信を行うた
めのデータ送受信装置のブロック図である。
FIG. 3 is a block diagram of a data transmitting / receiving device for transmitting / receiving data by a serial start / stop synchronization interface according to a second embodiment of the present invention.

【図4】本発明の第2の実施の形態におけるデータ送受
信方法のシーケンスを表す図である。
FIG. 4 is a diagram illustrating a sequence of a data transmission / reception method according to a second embodiment of the present invention.

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

31 主局 32 従局 ER 通信速度切替検出信号 31 Master station 32 Slave station ER Communication speed switching detection signal

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 (a)第1の局から第2の局に異なる通
信速度でデータを送信するための通信モードを選択し、
(b)選択された通信モードに対応させて前記第1、第
2の局における通信速度の設定を切り替え、(c)通信
速度の設定の切替えに対応させて、送信されるデータの
単位を変更することを特徴とするデータ送受信方法。
(A) selecting a communication mode for transmitting data at a different communication speed from a first station to a second station;
(B) switching the communication speed setting in the first and second stations in accordance with the selected communication mode; and (c) changing the unit of data to be transmitted in response to switching in the communication speed setting. A data transmission / reception method, comprising:
【請求項2】 通信速度の設定の切替え時にデータの送
信の開始を所定時間遅延させる請求項1に記載のデータ
送受信方法。
2. The data transmission / reception method according to claim 1, wherein the start of data transmission is delayed for a predetermined time when the communication speed setting is switched.
【請求項3】 (a)第2の局において通信速度の設定
の切替えが終了したかどうかを通信速度切替検出信号に
基づいて判断し、(b)判断結果に基づいてデータの送
信を開始する請求項1に記載のデータ送受信方法。
(A) determining whether or not the switching of the communication speed setting has been completed in the second station based on a communication speed switching detection signal; and (b) starting data transmission based on the determination result. The data transmission / reception method according to claim 1.
JP9340009A 1997-12-10 1997-12-10 Data transmission reception method Withdrawn JPH11177654A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9340009A JPH11177654A (en) 1997-12-10 1997-12-10 Data transmission reception method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9340009A JPH11177654A (en) 1997-12-10 1997-12-10 Data transmission reception method

Publications (1)

Publication Number Publication Date
JPH11177654A true JPH11177654A (en) 1999-07-02

Family

ID=18332881

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9340009A Withdrawn JPH11177654A (en) 1997-12-10 1997-12-10 Data transmission reception method

Country Status (1)

Country Link
JP (1) JPH11177654A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007054308A (en) * 2005-08-24 2007-03-08 Olympus Medical Systems Corp Endoscope apparatus
WO2018011963A1 (en) * 2016-07-15 2018-01-18 三菱電機株式会社 Communication adapter, electric apparatus, electric apparatus system, method for controlling communication adapter, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007054308A (en) * 2005-08-24 2007-03-08 Olympus Medical Systems Corp Endoscope apparatus
US7811227B2 (en) 2005-08-24 2010-10-12 Olympus Medical Systems Corp. Endoscope apparatus and communication method used in the apparatus
WO2018011963A1 (en) * 2016-07-15 2018-01-18 三菱電機株式会社 Communication adapter, electric apparatus, electric apparatus system, method for controlling communication adapter, and program

Similar Documents

Publication Publication Date Title
KR100294754B1 (en) Communication control device
CN110138761B (en) MIPI (Mobile industry processor interface) protocol-based inter-device communication method and equipment topological structure
JP2004260831A (en) Hybrid data transmission apparatus suitable for high speed wireless communication and its method
CN113904762B (en) Full duplex 485 bus communication system with annular buffer zone and method
US7421527B2 (en) Transmission apparatus and transmission method
JPH11177654A (en) Data transmission reception method
JPH11177540A (en) Data transfer system and its method
JPS5986940A (en) Information transmitting system of multi-drop system
AU609791B2 (en) Improvements in or relating to data communication systems
JPH08314851A (en) Data processing system
JPH0697943A (en) Method and equipment for continuous transmission of csma/ca system
JPH0879225A (en) Data communication system and data communication method
JPH08288883A (en) Radio communication method
JP2001320390A (en) Device and method for controlling serial bus
KR0141326B1 (en) Data transmission control method
JPH1174893A (en) Data communication equipment and its communication method
JPH05113838A (en) Connection device
JP2002198979A (en) Data transmission methods and devices on can(controller area network) data link
JPH01296743A (en) Data communication system
JPH08191319A (en) Data communication system
JP3584886B2 (en) Fiber channel flow control method and apparatus
JPH0477940B2 (en)
KR100962306B1 (en) Bidirectional data transmission apparatus and the method thereof for embedded system
JPS61246863A (en) Data transfer system
JPH02149049A (en) Communication control system

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050301