JPH063922B2 - Communication control device - Google Patents
Communication control deviceInfo
- Publication number
- JPH063922B2 JPH063922B2 JP62295842A JP29584287A JPH063922B2 JP H063922 B2 JPH063922 B2 JP H063922B2 JP 62295842 A JP62295842 A JP 62295842A JP 29584287 A JP29584287 A JP 29584287A JP H063922 B2 JPH063922 B2 JP H063922B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- transmission
- communication control
- reception
- control unit
- 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
Links
Landscapes
- Small-Scale Networks (AREA)
- Communication Control (AREA)
Description
【発明の詳細な説明】 (産業上の利用分野) 本発明は、通信ラインに対してドライバとレシーバとを
接続し双方向にデータの送受信を行うようにした通信シ
ステムにおける通信制御装置に関し、更に詳しくは、通
信ライン上のノイズによるエラーを防止するための送信
局が自分自身の送出したデータを読返す処理を行うよう
にした通信制御装置に関する。TECHNICAL FIELD The present invention relates to a communication control device in a communication system in which a driver and a receiver are connected to a communication line to bidirectionally transmit and receive data, and More specifically, the present invention relates to a communication control device in which a transmitting station performs a process of reading back data sent by itself to prevent an error due to noise on a communication line.
(従来の技術) 第5図は本発明の対象となる通信システムの構成概念図
である。図において、LNは通信ライン、ST1,ST
2…は通信ラインLNにドライバDR、レシーバRCを
介して接続された通信局である。(Prior Art) FIG. 5 is a structural conceptual diagram of a communication system to which the present invention is applied. In the figure, LN is a communication line, ST1, ST
2 are communication stations connected to the communication line LN via a driver DR and a receiver RC.
この様なシステムにおいて、データを相手に送信する送
信局は、第6図及び第7図のようなフローを実施する。In such a system, the transmitting station that transmits data to the other party carries out the flow shown in FIGS. 6 and 7.
すなわち、データの送信は、第6図に示すように送信可
の状態になるごとに1バイト目、2バイト目と言ったよ
うに送出するが、各バイトを送出するごとに自分自身の
送出したデータを読返し、それが正しいものであるかど
うか判断しながら1バイトづつ送出する。That is, as shown in FIG. 6, the data is sent as the 1st byte and the 2nd byte each time the data is ready to be sent, but each byte is sent by itself. The data is read back, and it is sent byte by byte while judging whether it is correct or not.
データの1バイトづつの送信は、第7図に示すように送
信可の状態になるごとにnバイトになるまで行われ、ま
た、データの読返しは受信可になるごとにmバイトにな
るまで行われる。As shown in FIG. 7, data is transmitted byte by byte until n bytes are reached each time transmission is enabled, and data is read back until m bytes are reached each reception is possible. Done.
(発明が解決しようとする問題点) この様な動作を行う従来のシステムにおいてはデータの
送信処理を行っている間、送信局内の通信制御コントロ
ーラは、全く他の仕事ができず効率が悪いという問題点
があった。(Problems to be Solved by the Invention) In the conventional system that performs such an operation, the communication control controller in the transmitting station cannot perform other work at all while performing data transmission processing, and thus is inefficient. There was a problem.
本発明はこの様な問題点に鑑みてなされたものであっ
て、その目的は、送信処理における通信制御コントロー
ラの負担を低減し、他の処理も行うことができるように
し、効率の良い通信制御ができる通信制御装置を実現す
ることにある。The present invention has been made in view of such a problem, and an object thereof is to reduce the load of the communication control controller in the transmission processing and to be able to perform other processing, and to perform efficient communication control. It is to realize a communication control device capable of performing.
(問題点を解決するための手段) 前記した問題点を解決する本発明は、 通信制御を行う通信制御部と、 送信データをバイト単位で格納する送信レジスタと、 この送信レジスタからのデータがシフトされて格納され
る送信シフトレジスタと、 前記通信制御部によって制御され送信シフトレジスタか
らのデータを通信ラインに送出するトランスミッタと、 通信ライン上のデータを受信するレシーバと、 このレシーバで受信した受信データを格納する受信シフ
トレジスタと、 この受信シフトレジスタからのデータをバイト単位で格
納し前記通信制御部に送る受信レジスタと、 前記レシーバを介して受信データを受けたとき前記通信
制御部に対して割り込みをかける受信割り込み手段と、 前記トランシーバを介して送信データを送信時に前記通
信制御部に対して割り込みをかける送信割り込み手段と
を備え、 前記通信制御部は、前記送信割り込み手段または受信割
り込み手段からの割り込みを受けて、前記レシーバによ
って今回受信したバイト単位のデータと送信レジスタに
送出した今回のバイトより2バイト前の送信データとを
比較・チェックすることを特徴とする通信制御装置であ
る。(Means for Solving Problems) According to the present invention for solving the above problems, a communication control unit for controlling communication, a transmission register for storing transmission data in byte units, and data from the transmission register are shifted. And a transmission shift register stored therein, a transmitter for sending data from the transmission shift register to the communication line, which is controlled by the communication control unit, a receiver for receiving data on the communication line, and received data received by this receiver A reception shift register that stores the data, a reception register that stores the data from the reception shift register in byte units and sends the data to the communication control unit, and an interrupt to the communication control unit when reception data is received via the receiver. Reception interrupt means for applying the transmission data, and the communication when transmitting the transmission data through the transceiver. And a transmission register which receives an interrupt from the transmission interruption unit or the reception interruption unit and which is currently received by the receiver in byte units and a transmission register. The communication control device is characterized by comparing and checking the transmission data of 2 bytes before the current byte transmitted to the.
(作用) 通信制御部はダブルバッファ付きトランスミッタ/レシ
ーバを制御すると共に、データの送信時または受信時に
おいて割り込み手段による割り込みを受けて前記レシー
バによって受信したデータをチェックする。(Operation) The communication control unit controls the transmitter / receiver with the double buffer, and checks the data received by the receiver upon receiving an interrupt by the interrupting unit at the time of transmitting or receiving the data.
ここで、通信制御部は、割り込み手段から割り込みを受
けたタイミングにおいてのみ、2バイト前のデータを受
信(読み返し)してそれをチェックするもので、システ
ム全体のパフォーマンスを向上させることが可能とな
る。Here, the communication control unit receives (reads back) the data of 2 bytes before and checks it only at the timing when the interrupt is received from the interrupting means, so that the performance of the entire system can be improved. .
(実施例) 以下図面を用いて、本発明の実施例を詳細に説明する。Embodiments Embodiments of the present invention will be described in detail below with reference to the drawings.
第1図は、本発明の一実施例を示す構成ブロック図であ
る。ここでは一方の通信局についてのみ示す。図におい
て、1は通信制御を行う通信制御部で、内部にはマイク
ロプロセッサ11、メモリ12等を含んでいる。2はこ
の通信制御部1によって制御されるダブルバッファ付き
トランスミッタ/レシーバで、送信するデータが格納さ
れる送信レジスタ21、送信シフトレジスタ22、この
送信シフトレジスタ22からのデータを通信ライン3上
に送出するトランスミッタ23、通信ライン3上のデー
タを受信するレシーバ24、レシーバ24で受信したデ
ータを格納する受信シフトレジスタ25、受信レジスタ
26を含んでいる。FIG. 1 is a configuration block diagram showing an embodiment of the present invention. Here, only one communication station is shown. In the figure, reference numeral 1 is a communication control unit for performing communication control, and includes a microprocessor 11, a memory 12 and the like inside. Reference numeral 2 denotes a transmitter / receiver with a double buffer controlled by the communication control unit 1. The transmission register 21 stores the data to be transmitted, the transmission shift register 22, and the data from the transmission shift register 22 is sent to the communication line 3. The transmitter 23, the receiver 24 for receiving the data on the communication line 3, the reception shift register 25 for storing the data received by the receiver 24, and the reception register 26 are included.
4はレシーバ24を介して受信データを受けたとき通信
制御部1に対して割り込みをかける受信割り込み手段、
5はトランスミッタ23を介して送信データを送信時に
通信制御部1に対して割り込みをかける送信割り込み手
段である。Reference numeral 4 is a reception interrupt means for interrupting the communication control unit 1 when receiving the reception data via the receiver 24,
Reference numeral 5 denotes a transmission interruption means for interrupting the communication control unit 1 when transmitting the transmission data via the transmitter 23.
このように構成した装置の動作をデータの受信時と、送
信時とに分けて説明する。The operation of the device configured as described above will be described separately for data reception and data transmission.
(データの受信時) 通信制御部1はトランスミッタ23をディスエーブル、
送信割り込み手段5をディスエーブル、受信割り込み手
段4をイネーブルとして、レシーバ24からの受信デー
タを受ける。レシーバ24で受信したデータは、受信シ
フトレジスタ25に入り、1バイトごとに受信レジスタ
26を介して通信制御部1側に送られる。(When receiving data) The communication control unit 1 disables the transmitter 23,
The transmission interruption means 5 is disabled and the reception interruption means 4 is enabled to receive the reception data from the receiver 24. The data received by the receiver 24 enters the reception shift register 25 and is sent to the communication control unit 1 side via the reception register 26 for each byte.
(送信時) 通信制御部1は、トランスミッタ23をイネーブル、送
信割り込み手段5をイネーブル、受信割り込み手段4を
ディスエーブルとして、送信データを送出する。送信割
り込み手段5は、送信要求TXINTを通信制御部1に
出す。通信制御部1は、この通信要求を受け、送信デー
タをトランスミッタ23を介して、通信ライン3に出力
する。また、同時にレシーバ24で受信したデータを読
み込み、先に送出した送信データと比較することによっ
て、通信ライン3、トランスミッタ23、レシーバ24
などのチェックを行う。(During Transmission) The communication control unit 1 sends the transmission data with the transmitter 23 enabled, the transmission interrupting unit 5 enabled, and the reception interrupting unit 4 disabled. The transmission interrupt means 5 issues a transmission request TXINT to the communication control unit 1. The communication control unit 1 receives this communication request and outputs the transmission data to the communication line 3 via the transmitter 23. Further, at the same time, the data received by the receiver 24 is read and compared with the previously transmitted transmission data, whereby the communication line 3, the transmitter 23, the receiver 24
Check such as.
以上は送信時における動作の概略であるが、次にその詳
細を説明する。The above is the outline of the operation at the time of transmission, and the details will be described next.
第2図は、送信時におけるトランスミッタ/レシーバ2
における各レジスタの内容を示す概念図である。ここで
は送信するデータをバイト単位で送るようにしており、
1バイト目のデータをD1,2バイト目のデータを2,
3バイト目のデータをD3…と表している。FIG. 2 shows the transmitter / receiver 2 during transmission.
3 is a conceptual diagram showing the contents of each register in FIG. Here, the data to be sent is sent in byte units,
The first byte data is D1, the second byte data is 2,
The data of the third byte is represented as D3 ....
(A)は、1バイト目のデータD1の送信時であり、送
信レジスタ21内にデータD1が格納されている。In (A), the data D1 of the first byte is transmitted, and the data D1 is stored in the transmission register 21.
(B)は、2バイト目のデータD2の送信時であり、送
信レジスタ21にこのデータD2が格納され、送信シフ
トレジスタ22に1バイト目のデータD1が格納され
る。In (B), the data D2 of the second byte is transmitted, the data D2 is stored in the transmission register 21, and the data D1 of the first byte is stored in the transmission shift register 22.
(C)は、3バイト目のデータD3の送信時であり、送
信レジスタ21にこのデータD3が格納され、送信シフ
トレジスタ22に2バイト目のデータD2が格納され
る。また、受信シフトレジスタ25には通信ライン3に
出力された1バイト目のデータD1が格納される。In (C), the data D3 of the third byte is transmitted, the data D3 is stored in the transmission register 21, and the data D2 of the second byte is stored in the transmission shift register 22. Further, the reception shift register 25 stores the first byte data D1 output to the communication line 3.
第3図は送信割り込み手段5からの送信割り込みTXI
NTを受けて、通信制御部1が実施する送信シーケンス
のフローチャートである。FIG. 3 shows a transmission interrupt TXI from the transmission interruption means 5.
9 is a flowchart of a transmission sequence executed by the communication control unit 1 in response to NT.
通信制御部1は、送信割り込みTXINTを受けると、
例えばNバイトからなるデータを順次1バイト目から送
信する(ステップ1)。そして3バイト目以降のデータ
送信時から、現在送信中のバイトをiバイト目とする
と、i−2バイト目のデータDi−2をレシーバ24を
介して読み返し、受信データのチェックを行う(ステッ
プ2,3)。When the communication control unit 1 receives the transmission interrupt TXINT,
For example, N bytes of data are sequentially transmitted from the first byte (step 1). When the byte currently being transmitted is the i-th byte from the data transmission of the third and subsequent bytes, the data Di-2 of the i-2 byte is read back via the receiver 24 and the received data is checked (step 2 , 3).
このチェックは予めトランスミッタ23を介して送信し
たデータD1と受信したデータとが一致するものである
かどうか調べることによって行われる。このチェックに
よってエラーが検出されれば、送信エラーとして処理す
る。This check is performed by checking in advance whether or not the data D1 transmitted via the transmitter 23 and the received data match. If an error is detected by this check, it is processed as a transmission error.
この様な動作は最終バイトであるNバイトまで行われ
る。N+1バイト目以降は、データの送信動作は行われ
ないが、N−1バイト目、Nバイト目の受信データをそ
れぞれチェックして送信シーケンスを終了する(ステッ
プ4,5)。Such an operation is performed up to the final N bytes. After the N + 1th byte, no data transmission operation is performed, but the N-1th byte and the Nth byte of the received data are checked, and the transmission sequence ends (steps 4 and 5).
この様なシーケンスを実行することによって、通信制御
部1はデータの送信と、送信データの読み返し処理を1
回の送信割り込み時に同時に行うこととなり、全体とし
ての処理時間の無駄がなくなり、通信制御部の負担を軽
くすることができる。By executing such a sequence, the communication control unit 1 performs the data transmission and the read-back process of the transmission data in one step.
Since it is performed at the same time at the time of the transmission interruption, the processing time is not wasted as a whole, and the load on the communication control unit can be reduced.
第4図は本発明装置における動作の他の例を示すフロー
チャートである。第3図においては送信割り込み時に、
出力したデータを読み返すようにしたものであるが、こ
の例では受信割り込み時に出力したデータを読み返すよ
うにしたものである。FIG. 4 is a flowchart showing another example of the operation of the device of the present invention. In Fig. 3, at the time of transmission interruption,
The output data is read back, but in this example, the data output at the reception interrupt is read back.
この場合、初めの2バイト目は先出しをする。その後読
み返しのタイミングにて、送信及び読み返しの動作を行
う。In this case, the first 2 bytes are advanced. After that, the transmission and read-back operations are performed at the read-back timing.
(発明の効果) 以上詳細に説明したように、本発明は通信制御部がデー
タの送信時または受信時においてレシーバによって受信
したデータをチェックするようにしたものであるから、
割り込み回数が少くなり通信制御部の負担を少くなくで
き、システム全体のパフォーマンスを向上させることが
できる。(Effects of the Invention) As described in detail above, the present invention is such that the communication control unit checks the data received by the receiver at the time of data transmission or reception.
The number of interrupts is reduced, the load on the communication control unit can be reduced, and the performance of the entire system can be improved.
第1図は本発明の一実施例を示す構成ブロック図、第2
図は、トランスミッタ/レシーバ2における各レジスタ
の内容を示す概念図、第3図は送信割り込み手段5から
の送信割り込みTXINTを受けて、通信制御部1が実
施する送信シーケンスのフローチャート、第4図は本発
明装置における動作の他の例を示すフローチャート、第
5図は本発明の対象となる通信システムの構成概念図、
第6図及び第7図は第5図システムにおける送信局の動
作を示すフローチャートである。 1…通信制御部 2…ダブルバッファ付きトランスミッタ/レシーバ 3…通信ライン 4…受信割り込み手段 5…送信割り込み手段FIG. 1 is a configuration block diagram showing an embodiment of the present invention, and FIG.
FIG. 4 is a conceptual diagram showing the contents of each register in the transmitter / receiver 2, FIG. 3 is a flowchart of a transmission sequence executed by the communication control unit 1 upon receiving a transmission interrupt TXINT from the transmission interruption means 5, and FIG. FIG. 5 is a flowchart showing another example of the operation of the device of the present invention, FIG. 5 is a conceptual diagram of the configuration of the communication system to which the present invention is applied,
6 and 7 are flowcharts showing the operation of the transmitting station in the system of FIG. DESCRIPTION OF SYMBOLS 1 ... Communication control unit 2 ... Transmitter / receiver with double buffer 3 ... Communication line 4 ... Reception interruption means 5 ... Transmission interruption means
Claims (1)
る送信シフトレジスタと、 前記通信制御部によって制御され送信シフトレジスタか
らのデータを通信ラインに送出するトランスミッタと、 通信ライン上のデータを受信するレシーバと、 このレシーバで受信した受信データを格納する受信シフ
トレジスタと、 この受信シフトレジスタからのデータをバイト単位で格
納し前記通信制御部に送る受信レジスタと、 前記レシーバを介して受信データを受けたとき前記通信
制御部に対して割り込みをかける受信割り込み手段と、 前記トランシーバを介して送信データを送信時に前記通
信制御部に対して割り込みをかける送信割り込み手段と
を備え、 前記通信制御部は、前記送信割り込み手段または受信割
り込み手段からの割り込みを受けて、前記レシーバによ
って今回受信したバイト単位のデータと送信レジスタに
送出した今回のバイトより2バイト前の送信データとを
比較・チェックすることを特徴とする通信制御装置。1. A communication control unit for performing communication control, a transmission register for storing transmission data in byte units, a transmission shift register for storing data from the transmission register by shifting, and control by the communication control unit. The transmitter that sends the data from the transmission shift register to the communication line, the receiver that receives the data on the communication line, the reception shift register that stores the reception data received by this receiver, and the data from this reception shift register A reception register that stores the data in byte units and sends it to the communication control unit, a reception interrupt unit that interrupts the communication control unit when receiving the reception data through the receiver, and transmits the transmission data through the transceiver And a transmission interrupt means for occasionally interrupting the communication control unit. The communication control unit receives an interrupt from the transmission interrupt unit or the reception interrupt unit, and receives the byte-unit data currently received by the receiver and the transmission data 2 bytes before the current byte transmitted to the transmission register. A communication control device characterized by comparing and checking.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62295842A JPH063922B2 (en) | 1987-11-24 | 1987-11-24 | Communication control device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62295842A JPH063922B2 (en) | 1987-11-24 | 1987-11-24 | Communication control device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH01137738A JPH01137738A (en) | 1989-05-30 |
| JPH063922B2 true JPH063922B2 (en) | 1994-01-12 |
Family
ID=17825889
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62295842A Expired - Lifetime JPH063922B2 (en) | 1987-11-24 | 1987-11-24 | Communication control device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH063922B2 (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS62269528A (en) * | 1986-05-19 | 1987-11-24 | Alps Electric Co Ltd | Self-diagnosis system for communication function |
-
1987
- 1987-11-24 JP JP62295842A patent/JPH063922B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH01137738A (en) | 1989-05-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2851879B2 (en) | Data communication device | |
| JPH063922B2 (en) | Communication control device | |
| CN111327393A (en) | Image detector parameter transmission method based on serial communication interface | |
| JP2836357B2 (en) | Facsimile machine | |
| JPH01147765A (en) | Data transfer controller | |
| JPS6119581Y2 (en) | ||
| JP2623816B2 (en) | Signal transmission method | |
| JP2752456B2 (en) | Channel device | |
| JPH10164666A (en) | Time synchronizing method | |
| JPH05336082A (en) | Detection of response data validity | |
| JP2949118B1 (en) | Encoder data output method for bus communication type encoder device | |
| JPS6238637A (en) | Control system for transmission in multi-drop | |
| JPH10178463A (en) | Communication line, communication speed control method and camera system | |
| JPS5826866B2 (en) | Communication control device | |
| JPH05244216A (en) | Transfer mode setting system | |
| JPH0583324A (en) | Data transmitter-receiver | |
| JPH05216819A (en) | Transfer control system for packet bus | |
| JPH01291350A (en) | Channel device | |
| JPH0355064B2 (en) | ||
| JPH04299633A (en) | Personal computer | |
| JPH09200191A (en) | Data transmitter, data receiver, and data communication equipment | |
| JPH04348444A (en) | Data transfer device | |
| JPH0865316A (en) | Data transmission/reception equipment | |
| JPS6062761A (en) | Loop transmission control system | |
| JPH0563751A (en) | Communication system for frame level |