JPH11234364A - Communication control method and communication module - Google Patents

Communication control method and communication module

Info

Publication number
JPH11234364A
JPH11234364A JP10036066A JP3606698A JPH11234364A JP H11234364 A JPH11234364 A JP H11234364A JP 10036066 A JP10036066 A JP 10036066A JP 3606698 A JP3606698 A JP 3606698A JP H11234364 A JPH11234364 A JP H11234364A
Authority
JP
Japan
Prior art keywords
command
communication module
status
password
receiving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10036066A
Other languages
Japanese (ja)
Inventor
Yasuhiko Otawa
康彦 大多和
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP10036066A priority Critical patent/JPH11234364A/en
Publication of JPH11234364A publication Critical patent/JPH11234364A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To avoid making a device configuration complicated and to improve the reliability of communication. SOLUTION: A master module receives a 1st password that is sent from a slave module (102) in parallel with transmitting of a command and decides whether or not the received 1st password coincides with a 1st password that is previously set up (104). It decides that a communication error occurs in the case of noncoincidence here, it resends a command (102) after the transmission time for one command elapses. Subsequently, the master module receives a status whose leading bit is set to zero as command response (108), and when the leading bit of the received status is not zero, it decides that a communication error occurs and receives status again (108). Thus, a communication error is accurately and also fast detected by relatively simple processing and error measures is quickly taken.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、通信制御方法及び
通信モジュールに係り、より詳しくは、マイクロコンピ
ュータ等に内蔵され、コマンドを他の通信モジュールに
送信し該他の通信モジュールからコマンドの応答として
のステータスを受信する機能、他の通信モジュールから
コマンドを受信し該他の通信モジュールにステータスを
送信する機能、及び送受信動作の同期をとるためのクロ
ックを8進カウンタでカウントする機能を有する複数の
通信モジュール間での通信を制御する通信制御方法、及
び当該通信モジュールに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication control method and a communication module. A function of receiving a command from another communication module and transmitting a status to the other communication module, and a function of counting a clock for synchronizing transmission and reception operations with an octal counter. The present invention relates to a communication control method for controlling communication between communication modules and the communication module.

【0002】[0002]

【従来の技術】従来より、プリンタ等の機器においてオ
プション装置を駆動する場合、機器内の各種の駆動回路
間で双方向のシリアル通信を繰り返しながら、駆動動作
に関する各種コマンドやステータス等の情報をやりとり
していた。
2. Description of the Related Art Conventionally, when an optional device is driven in a device such as a printer, information such as various commands and status relating to a driving operation is exchanged while repeating bidirectional serial communication between various driving circuits in the device. Was.

【0003】このとき、コマンドを送信して処理要求す
る回路(以下、マスターモジュールと称する)は、コマ
ンドを受信して処理実行する回路(以下、スレーブモジ
ュールと称する)にコマンドを送信し、スレーブモジュ
ールはマスターモジュールにコマンドの応答としてのス
テータスを返送する。図9に、上記送受信の様子を示
す。図9のタイムチャートでは、マスターモジュールか
ら送信されるデータをTxD、スレーブモジュールから
送信されるデータをRxDと表しており(以後のタイム
チャートでも同様)、上記送受信動作はマスターモジュ
ールから発行されるクロック(CLK)に同期して実行
される。
At this time, a circuit for transmitting a command and requesting processing (hereinafter, referred to as a master module) transmits a command to a circuit for receiving and executing the command (hereinafter, referred to as a slave module). Sends a status to the master module in response to the command. FIG. 9 shows the state of the transmission and reception. In the time chart of FIG. 9, data transmitted from the master module is represented by TxD, and data transmitted from the slave module is represented by RxD (the same applies to the following time charts). (CLK).

【0004】また、図9に示すように、マスターモジュ
ールはコマンド送信と並行して、特に意味を持たないダ
ミーデータをスレーブモジュールから受信し、スレーブ
モジュールはステータス送信と並行してダミーデータを
マスターモジュールから受信する。
As shown in FIG. 9, the master module receives dummy data having no special meaning from the slave module in parallel with the command transmission, and the slave module transmits the dummy data in parallel with the status transmission. Receive from.

【0005】ところで、上記のような双方向のシリアル
通信における通信エラーの検出方法として、マスターモ
ジュールから送信するコマンド或いはスレーブモジュー
ルから返送するステータスにパリティビットを付加し、
各モジュールが受信する際に該パリティビットをチェッ
クすることにより、通信エラーを検出する方法が提案さ
れている。
As a method of detecting a communication error in the above-described bidirectional serial communication, a parity bit is added to a command transmitted from the master module or a status returned from the slave module.
A method of detecting a communication error by checking the parity bit when each module receives the signal has been proposed.

【0006】通常、通信時間よりも待機時間の方が長い
ため、ノイズなどの影響は待機時に受ける場合が多い。
例えば、図10に示すようにコマンド発行前の待機時に
ノイズが発生しクロックに混入した場合、スレーブモジ
ュールがコマンドとして認識する部分が本来のコマンド
からずれてしまい、コマンドが正常に送受信されなくな
る。
[0006] Normally, the standby time is longer than the communication time, so that the influence of noise or the like is often affected during the standby time.
For example, as shown in FIG. 10, when noise occurs during standby before issuing a command and mixes with the clock, the portion recognized as a command by the slave module deviates from the original command, and the command cannot be transmitted / received normally.

【0007】上記パリティビットを用いた通信エラー検
出方法を採用していた場合、スレーブモジュールはパリ
ティエラーが発生している状態ならばエラーとして認識
できる。しかし、この時点ではマスターモジュールはエ
ラーが起きたことを認識できず、その後ステータスを受
け取って初めてエラー発生を認識することとなる。ま
た、エラーの状態によってはパリティエラーとして認識
できないケースもある。
In the case where the above-described communication error detection method using the parity bit is adopted, the slave module can recognize as an error if a parity error has occurred. However, at this point, the master module cannot recognize that an error has occurred, and recognizes the occurrence of the error only after receiving the status. Further, depending on the state of the error, there is a case where it cannot be recognized as a parity error.

【0008】一方、通信エラーを検出する方法として、
特開平8−32647号公報には、正常に通信された場
合の1バイトの通信時間を予め規定しておき、通信時に
1バイトの通信時間を測定し、該測定値が予め規定した
通信時間と異なる場合に通信エラーと判断する方法が提
案されている。
On the other hand, as a method for detecting a communication error,
Japanese Patent Application Laid-Open No. 8-32647 discloses that a 1-byte communication time for normal communication is defined in advance, a 1-byte communication time is measured at the time of communication, and the measured value is set to a predetermined communication time. A method of determining a communication error when different from each other has been proposed.

【0009】ところが、1バイトの通信時間を測定する
には、安価なCPUでは実現できず、外付けの特殊なハ
ードウェア等が必要になるため、機器のコストが上昇し
装置構成が複雑になるといった不都合があった。
However, measurement of 1-byte communication time cannot be realized with an inexpensive CPU and requires special external hardware and the like, which increases the cost of the equipment and complicates the device configuration. There was such an inconvenience.

【0010】[0010]

【発明が解決しようとする課題】本発明は、上記問題点
を解消するために成されたものであり、装置構成の複雑
化を回避しつつ、通信の信頼性を向上させることができ
る通信制御方法及び通信モジュールを提供することを目
的とする。
SUMMARY OF THE INVENTION The present invention has been made in order to solve the above-mentioned problems, and a communication control method capable of improving communication reliability while avoiding complication of a device configuration. It is an object to provide a method and a communication module.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の通信制御方法は、コマンドを他の通
信モジュールに送信し該他の通信モジュールからステー
タスを受信する機能、他の通信モジュールからコマンド
を受信し該他の通信モジュールに前記ステータスを送信
する機能、及び送受信動作の同期をとるためのクロック
を8進カウンタでカウントする機能を有する複数の通信
モジュール間での通信を制御する通信制御方法であっ
て、コマンドを受信する受信側通信モジュールは、コマ
ンドの受信と並行して予め設定されたパスワードを、コ
マンドを送信する送信側通信モジュールへ送信し、1コ
マンドの送信時間だけ経過した後、前記8進カウンタに
よるカウント値が0であるか否かを判定し、前記カウン
ト値が0でない場合、前記8進カウンタをリセットする
と共にコマンドを再受信し、前記送信側通信モジュール
は、コマンドの送信と並行して前記パスワードを受信
し、受信されたパスワードが予め設定されたパスワード
に一致するか否かを判定し、前記受信されたパスワード
が予め設定されたパスワードに一致しない場合、1コマ
ンドの送信時間だけ経過した後、前記コマンドを再送す
る、ことを特徴とする。
In order to achieve the above object, a communication control method according to the present invention has a function of transmitting a command to another communication module and receiving a status from the other communication module. Control communication between a plurality of communication modules having a function of receiving a command from a communication module and transmitting the status to the other communication module, and a function of counting a clock for synchronizing transmission / reception operations with an octal counter. A receiving communication module that receives a command, transmits a preset password to the transmitting communication module that transmits the command in parallel with the reception of the command, and transmits the password only for a transmission time of one command. After the elapse, it is determined whether or not the count value of the octal counter is 0, and if the count value is not 0, Resetting the octal counter and re-receiving the command, the transmitting communication module receives the password in parallel with the transmission of the command, and determines whether the received password matches a preset password; If the received password does not match a preset password, the command is retransmitted after a transmission time of one command has elapsed.

【0012】また、請求項2記載の通信制御方法は、コ
マンドを他の通信モジュールに送信し、ステータスを前
記他の通信モジュールから受信する機能、他の通信モジ
ュールからコマンドを受信し該他の通信モジュールに先
頭ビットが所定値にセットされたステータスを送信する
機能、及び送受信動作の同期をとるためのクロックを8
進カウンタでカウントする機能を有する複数の通信モジ
ュール間での通信を制御する通信制御方法であって、コ
マンドを送信する送信側通信モジュールは、前記ステー
タスの受信と並行して予め設定されたパスワードを、コ
マンドを受信する受信側通信モジュールへ送信し、1コ
マンドの送信時間だけ経過した後、受信されたステータ
スの先頭ビットが前記所定値に一致するか否かを判定
し、前記受信されたステータスの先頭ビットが前記所定
値に一致しない場合、ステータスを再受信し、前記受信
側通信モジュールは、ステータスの送信と並行して前記
パスワードを受信し、受信されたパスワードが予め設定
されたパスワードに一致するか否かを判定し、前記受信
されたパスワードが予め設定されたパスワードに一致し
ない場合、1コマンドの送信時間だけ経過した後、前記
8進カウンタをリセットすると共にステータスを再送信
する、ことを特徴とする。
According to a second aspect of the present invention, there is provided a communication control method for transmitting a command to another communication module, receiving a status from the other communication module, and receiving a command from the other communication module to perform the other communication. A function for transmitting a status in which the first bit is set to a predetermined value to the module, and a clock for synchronizing the transmission / reception operation with 8
A communication control method for controlling communication between a plurality of communication modules having a function of counting with a hexadecimal counter, wherein a transmitting side communication module for transmitting a command transmits a preset password in parallel with reception of the status. The command is transmitted to the receiving communication module that receives the command, and after elapse of the transmission time of one command, it is determined whether or not the first bit of the received status matches the predetermined value. If the first bit does not match the predetermined value, the status is received again, and the receiving communication module receives the password in parallel with the transmission of the status, and the received password matches the preset password. It is determined whether or not the received password does not match a preset password. After a lapse transmission time only retransmits the status is reset to the octal counter, characterized in that.

【0013】また、請求項3記載の通信モジュールは、
コマンドを他の通信モジュールに送信し該他の通信モジ
ュールからステータスを受信する機能、他の通信モジュ
ールからコマンドを受信し該他の通信モジュールに前記
ステータスを送信する機能、及び送受信動作の同期をと
るためのクロックを8進カウンタでカウントする機能を
有する通信モジュールであって、コマンドの送信時に、
他の通信モジュールから送信されてくるパスワードを受
信する受信手段と、受信されたパスワードが予め設定さ
れたパスワードに一致するか否かを判定する判定手段
と、前記受信されたパスワードが予め設定されたパスワ
ードに一致しない場合、前記コマンドを再送するよう制
御するコマンド再送制御手段と、を有することを特徴と
する。
Further, the communication module according to claim 3 is
A function of transmitting a command to another communication module and receiving a status from the other communication module, a function of receiving a command from the other communication module and transmitting the status to the other communication module, and synchronizing transmission / reception operations Communication module having a function of counting the clock for the octal counter, when transmitting a command,
Receiving means for receiving a password transmitted from another communication module, determining means for determining whether or not the received password matches a preset password; and Command resending control means for controlling the command to be resent if the password does not match.

【0014】また、請求項4記載の通信モジュールは、
コマンドを他の通信モジュールに送信し該他の通信モジ
ュールからステータスを受信する機能、他の通信モジュ
ールからコマンドを受信し該他の通信モジュールに前記
ステータスを送信する機能、及び送受信動作の同期をと
るためのクロックを8進カウンタでカウントする機能を
有する通信モジュールであって、コマンドの受信時に、
予め設定されたパスワードを他の通信モジュールに送信
する送信手段と、前記8進カウンタによるカウント値が
0であるか否かを判定するカウント値判定手段と、前記
カウント値が0でない場合、前記8進カウンタをリセッ
トし、コマンドを再受信するよう制御するコマンド再受
信制御手段と、を有することを特徴とする。
Further, the communication module according to claim 4 is
A function of transmitting a command to another communication module and receiving a status from the other communication module, a function of receiving a command from the other communication module and transmitting the status to the other communication module, and synchronizing transmission / reception operations Communication module having a function of counting the clock for the octal counter, when receiving a command,
Transmitting means for transmitting a preset password to another communication module; count value determining means for determining whether or not the count value of the octal counter is 0; Command re-receiving control means for resetting the binary counter and controlling to re-receive the command.

【0015】また、請求項5記載の通信モジュールは、
コマンドを他の通信モジュールに送信し、ステータスを
前記他の通信モジュールから受信する機能、他の通信モ
ジュールからコマンドを受信し該他の通信モジュールに
先頭ビットが所定値にセットされたステータスを送信す
る機能、及び送受信動作の同期をとるためのクロックを
8進カウンタでカウントする機能を有する通信モジュー
ルであって、ステータスの受信時に、予め設定されたパ
スワードを他の通信モジュールへ送信するパスワード送
信手段と、受信されたステータスの先頭ビットが前記所
定値に一致するか否かを判定する先頭ビット判定手段
と、前記受信されたステータスの先頭ビットが前記所定
値に一致しない場合、ステータスを再受信するよう制御
するステータス再受信制御手段と、を有することを特徴
とする。
[0015] The communication module according to a fifth aspect of the present invention includes:
A function of transmitting a command to another communication module and receiving a status from the other communication module, receiving a command from the other communication module, and transmitting a status in which a leading bit is set to a predetermined value to the other communication module. A communication module having a function and a function of counting a clock for synchronizing a transmission / reception operation with an octal counter, and a password transmission means for transmitting a preset password to another communication module when receiving a status. A first bit determining means for determining whether a first bit of a received status matches the predetermined value, and a status re-receiving when the first bit of the received status does not match the predetermined value. Control means for controlling the status re-reception.

【0016】また、請求項6記載の通信モジュールは、
コマンドを他の通信モジュールに送信し、ステータスを
前記他の通信モジュールから受信する機能、他の通信モ
ジュールからコマンドを受信し該他の通信モジュールに
先頭ビットが所定値にセットされたステータスを送信す
る機能、及び送受信動作の同期をとるためのクロックを
8進カウンタでカウントする機能を有する通信モジュー
ルであって、ステータスの送信時に、他の通信モジュー
ルから送信されてくるパスワードを受信するパスワード
受信手段と、受信されたパスワードが予め設定されたパ
スワードに一致するか否かを判定するパスワード判定手
段と、前記受信されたパスワードが予め設定されたパス
ワードに一致しない場合、前記8進カウンタをリセット
し、ステータスを再送信するよう制御するステータス再
送信制御手段と、を有することを特徴とする。
Further, the communication module according to claim 6 is
A function of transmitting a command to another communication module and receiving a status from the other communication module, receiving a command from the other communication module, and transmitting a status in which a leading bit is set to a predetermined value to the other communication module. A communication module having a function and a function of counting a clock for synchronizing transmission / reception operations with an octal counter, and a password receiving means for receiving a password transmitted from another communication module when transmitting a status. A password determining means for determining whether a received password matches a preset password, and resetting the octal counter if the received password does not match the preset password, Status retransmission control means for controlling retransmission of Characterized in that it has.

【0017】上記請求項1記載の通信制御方法は、コマ
ンドを他の通信モジュールに送信し該他の通信モジュー
ルからステータスを受信する機能、他の通信モジュール
からコマンドを受信し該他の通信モジュールにステータ
スを送信する機能、及び送受信動作の同期をとるための
クロックを8進カウンタでカウントする機能を有する複
数の通信モジュール間での通信を制御する通信制御方法
である。
The communication control method according to the first aspect of the present invention has a function of transmitting a command to another communication module and receiving a status from the other communication module, and a function of receiving a command from another communication module and transmitting the command to the other communication module. A communication control method for controlling communication between a plurality of communication modules having a function of transmitting a status and a function of counting a clock for synchronizing transmission and reception operations with an octal counter.

【0018】コマンドを送信する送信側通信モジュール
(以下、送信側と略称する)が、コマンドを受信する受
信側通信モジュール(以下、受信側と略称する)にコマ
ンドを送信すると、受信側はコマンドの受信と並行して
予め設定されたパスワードを送信側へ送信する。そし
て、受信側は、1コマンドの送信時間だけ経過した後、
8進カウンタによるカウント値が0であるか否かを判定
する。
When a transmitting-side communication module (hereinafter, abbreviated as a transmitting side) that transmits a command transmits a command to a receiving-side communication module (hereinafter, abbreviated as a receiving side) that receives a command, the receiving side transmits the command. A password set in advance is transmitted to the transmitting side in parallel with the reception. Then, after the transmission time of one command has elapsed, the receiving side
It is determined whether or not the count value of the octal counter is 0.

【0019】一般的にコマンドは1バイト(8ビット)
単位で送受信するので、コマンドの送受信が正常であれ
ば、8進カウンタは8の倍数分のクロックをカウント
し、そのカウント値は0になる。
Generally, a command is 1 byte (8 bits)
Since transmission / reception is performed in units, if the transmission / reception of the command is normal, the octal counter counts a clock of a multiple of 8, and the count value becomes 0.

【0020】よって、上記で8進カウンタのカウント値
が0でない場合、コマンドの送受信時にエラーが発生し
たと判断できるので、受信側は、8進カウンタをリセッ
トすると共にコマンドを再受信する。
Therefore, when the count value of the octal counter is not 0 as described above, it can be determined that an error has occurred during transmission / reception of the command, and the receiving side resets the octal counter and receives the command again.

【0021】これにより、受信側は、コマンドの送受信
時のエラー発生を正確且つ速やかに検知して、コマンド
の再受信に備えることができる。
Thus, the receiving side can accurately and promptly detect the occurrence of an error when transmitting / receiving a command, and prepare for re-receiving the command.

【0022】一方の送信側は、コマンドの送信と並行し
て、受信側から送られてくるパスワードを受信し、受信
されたパスワードが予め設定されたパスワードに一致す
るか否かを判定する。
One transmitting side receives the password sent from the receiving side in parallel with the transmission of the command, and determines whether or not the received password matches a preset password.

【0023】コマンドの送受信が正常であれば、受信さ
れたパスワードは予め設定されたパスワードに一致す
る。よって、上記で受信されたパスワードが予め設定さ
れたパスワードに一致しない場合、コマンドの送受信時
にエラーが発生したと判断できるので、送信側は、1コ
マンドの送信時間だけ経過した後、コマンドを受信側へ
再送する。このとき、受信側は、前述したようにコマン
ドの再受信に備えているので、再送されたコマンドは受
信側により受信される。
If the transmission and reception of the command are normal, the received password matches the password set in advance. Therefore, if the received password does not match the preset password, it can be determined that an error has occurred during transmission / reception of the command. Resend to At this time, the receiving side prepares for re-reception of the command as described above, so that the re-transmitted command is received by the receiving side.

【0024】これにより、送信側も、コマンドの送受信
時のエラー発生を正確且つ速やかに検知して、コマンド
を再送することができる。
Thus, the transmitting side can accurately and promptly detect the occurrence of an error when transmitting and receiving a command, and retransmit the command.

【0025】以上のように請求項1記載の通信制御方法
によれば、受信側は、8進カウンタによるクロックのカ
ウント値が0でないことをもって、コマンドの送受信時
のエラー発生を正確且つ速やかに検知し迅速なエラー回
復を行うことができると共に、送信側は、受信されたパ
スワードが予め設定されたパスワードに一致しないこと
をもって、コマンドの送受信時のエラー発生を正確且つ
速やかに検知し迅速なエラー回復を行うことができる。
As described above, according to the communication control method of the first aspect, the receiving side accurately and promptly detects the occurrence of an error when transmitting / receiving a command based on the fact that the count value of the clock by the octal counter is not 0. Error recovery can be performed quickly, and the transmitting side can accurately and quickly detect the occurrence of an error during command transmission / reception by checking that the received password does not match the preset password, and quickly recover the error. It can be performed.

【0026】このように8進カウンタのカウント値のチ
ェックや、受信されたパスワードのチェックといった比
較的簡単な処理を行うため、装置構成の複雑化を回避し
複雑な処理を行う高価な回路の設置を回避しつつ、通信
の信頼性を向上させることができる。
As described above, since relatively simple processing such as checking the count value of the octal counter and checking the received password is performed, an expensive circuit for performing complicated processing while avoiding a complicated device configuration is installed. And the reliability of communication can be improved.

【0027】次に、請求項2記載の通信制御方法では、
受信側は、コマンドを正常に受信した後、該コマンドの
応答としてのステータスを送信側へ送信する。このステ
ータスの先頭ビットは所定値(「0」又は「1」)にセ
ットされている。
Next, in the communication control method according to the second aspect,
After receiving the command normally, the receiving side transmits a status as a response to the command to the transmitting side. The first bit of this status is set to a predetermined value ("0" or "1").

【0028】送信側は、上記ステータスの受信と並行し
て、予め設定されたパスワードを受信側へ送信し、1コ
マンドの送信時間だけ経過した後、受信されたステータ
スの先頭ビットが所定値に一致するか否かを判定する。
The transmitting side transmits a preset password to the receiving side in parallel with the reception of the status, and after the transmission time of one command has elapsed, the first bit of the received status matches the predetermined value. It is determined whether or not to perform.

【0029】ステータスの送受信が正常であれば、受信
されたステータスの先頭ビットは所定値に一致する。よ
って、上記で受信されたステータスの先頭ビットが所定
値に一致しない場合、ステータスの送受信時にエラーが
発生したと判断できるので、送信側は、ステータスを再
受信する。
If the status transmission / reception is normal, the first bit of the received status matches a predetermined value. Therefore, when the first bit of the status received as described above does not match the predetermined value, it can be determined that an error has occurred during transmission and reception of the status, and the transmitting side receives the status again.

【0030】これにより、送信側は、ステータスの送受
信時のエラー発生を正確且つ速やかに検知して、ステー
タスの再受信に備えることができる。
Thus, the transmitting side can accurately and promptly detect the occurrence of an error when transmitting and receiving the status, and prepare for the re-reception of the status.

【0031】一方の受信側は、ステータスの送信と並行
して、送信側から送られてきたパスワードを受信し、受
信されたパスワードが予め設定されたパスワードに一致
するか否かを判定する。
One receiving side receives the password transmitted from the transmitting side in parallel with the transmission of the status, and determines whether or not the received password matches a preset password.

【0032】ステータスの送受信が正常であれば、パス
ワードは予め設定されたパスワードに一致する。よっ
て、上記で受信されたパスワードが予め設定されたパス
ワードに一致しない場合、ステータスの送受信時にエラ
ーが発生したと判断できるので、受信側は、1コマンド
の送信時間だけ経過した後、8進カウンタをリセットす
ると共にステータスを再送信する。このとき、送信側
は、前述したようにステータスの再受信に備えているの
で、再送されたステータスは送信側により受信される。
If the status transmission / reception is normal, the password matches the password set in advance. Therefore, if the received password does not match the preset password, it can be determined that an error has occurred during the transmission and reception of the status, and the receiving side resets the octal counter after the transmission time of one command has elapsed. Reset and resend status. At this time, the transmitting side prepares for the status re-reception as described above, and thus the retransmitted status is received by the transmitting side.

【0033】これにより、受信側は、ステータスの送受
信時のエラー発生を正確且つ速やかに検知して、ステー
タスを再送することができる。
As a result, the receiving side can accurately and promptly detect the occurrence of an error when transmitting and receiving the status, and retransmit the status.

【0034】以上のように請求項2記載の通信制御方法
によれば、送信側は、受信されたステータスの先頭ビッ
トが所定値に一致しないことをもって、ステータスの送
受信時のエラー発生を正確且つ速やかに検知し迅速なエ
ラー回復を行うことができると共に、受信側は、受信さ
れたパスワードが予め設定されたパスワードに一致しな
いことをもって、ステータスの送受信時のエラー発生を
正確且つ速やかに検知し迅速なエラー回復を行うことが
できる。
As described above, according to the communication control method of the second aspect, the transmitting side can accurately and promptly determine the occurrence of an error at the time of transmitting / receiving a status by not finding that the first bit of the received status does not match the predetermined value. In addition, the receiving side can detect the occurrence of an error at the time of transmitting / receiving the status accurately and promptly by noting that the received password does not match the preset password, and promptly recovering the error. Error recovery can be performed.

【0035】このように受信されたステータスの先頭ビ
ットのチェックや、受信されたパスワードのチェックと
いった比較的簡単な処理を行うため、装置構成の複雑化
を回避し複雑な処理を行う高価な回路の設置を回避しつ
つ、通信の信頼性を向上させることができる。
Since relatively simple processing such as checking of the first bit of the received status and checking of the received password is performed as described above, an expensive circuit for performing complicated processing while avoiding the complexity of the device configuration can be avoided. The reliability of communication can be improved while avoiding installation.

【0036】前述した請求項1記載の通信制御方法に基
づく通信を実行可能な送信側通信モジュールとして、請
求項3記載の通信モジュールを採用することができ、受
信側通信モジュールとして、請求項4記載の通信モジュ
ールを採用することができる。
[0036] The communication module according to claim 3 can be adopted as a transmission-side communication module capable of executing communication based on the communication control method according to claim 1 described above, and as a reception-side communication module. Communication module can be adopted.

【0037】即ち、コマンドの送受信時に、請求項4記
載の通信モジュールでは、受信側として、送信手段がコ
マンドの受信と並行して、予め設定されたパスワードを
送信側へ送信する。そして、1コマンドの送信時間だけ
経過した後、カウント値判定手段は、8進カウンタによ
るカウント値が0であるか否かを判定する。
That is, at the time of transmitting / receiving a command, in the communication module according to the fourth aspect, as a receiving side, the transmitting means transmits a preset password to the transmitting side in parallel with the reception of the command. Then, after the transmission time of one command has elapsed, the count value determining means determines whether or not the count value of the octal counter is 0.

【0038】この判定で8進カウンタのカウント値が0
でなければ、コマンドの送受信時にエラーが発生したと
判断できるので、コマンド再受信制御手段は、8進カウ
ンタをリセットしコマンドを再受信するよう制御する。
In this determination, the count value of the octal counter is 0.
Otherwise, it can be determined that an error has occurred during transmission / reception of the command, so the command re-reception control means resets the octal counter and controls to re-receive the command.

【0039】このように請求項4記載の通信モジュール
によれば、コマンド送受信時の受信側として、8進カウ
ンタのカウント値のチェックという簡単な処理により、
エラー発生を正確且つ速やかに検知して、コマンドの再
受信に備えることができる。
As described above, according to the communication module of the fourth aspect, a simple process of checking the count value of the octal counter can be performed as a receiving side at the time of transmitting and receiving a command.
The occurrence of an error can be detected accurately and promptly to prepare for re-reception of a command.

【0040】一方、コマンドの送受信時に、請求項3記
載の通信モジュールでは、送信側として、受信手段が、
送られてくるパスワードを受信し、判定手段が、受信さ
れたパスワードが予め設定されたパスワードに一致する
か否かを判定する。
On the other hand, at the time of transmitting / receiving a command, in the communication module according to the third aspect, the receiving means as the transmitting side includes:
Upon receiving the transmitted password, the determination unit determines whether the received password matches a preset password.

【0041】この判定で、受信されたパスワードが予め
設定されたパスワードに一致しなければ、コマンドの送
受信時にエラーが発生したと判断できるので、1コマン
ドの送信時間だけ経過した後、コマンド再送制御手段
は、コマンドを受信側へ再送する。
In this determination, if the received password does not match the preset password, it can be determined that an error has occurred during the transmission and reception of the command. Therefore, after the transmission time of one command has elapsed, the command retransmission control means Retransmits the command to the receiver.

【0042】このように請求項3記載の通信モジュール
によれば、コマンド送受信時の送信側として、受信され
たパスワードのチェックという簡単な処理により、エラ
ー発生を正確且つ速やかに検知して、コマンドを再送す
ることができる。
As described above, according to the communication module of the third aspect, the transmission side at the time of command transmission / reception detects the occurrence of an error accurately and promptly by a simple process of checking the received password, and transmits the command. Can be resent.

【0043】次に、前述した請求項2記載の通信制御方
法に基づく通信を実行可能な送信側通信モジュールとし
て、請求項5記載の通信モジュールを採用することがで
き、受信側通信モジュールとして、請求項6記載の通信
モジュールを採用することができる。
Next, the communication module according to the fifth aspect can be adopted as a transmission-side communication module capable of executing communication based on the communication control method according to the second aspect. The communication module according to item 6 can be employed.

【0044】即ち、ステータスの送受信時に、請求項5
記載の通信モジュールでは、送信側として、パスワード
送信手段が、ステータスの受信と並行して、予め設定さ
れたパスワードを受信側へ送信し、1コマンドの送信時
間だけ経過した後、先頭ビット判定手段が、受信された
ステータスの先頭ビットが所定値に一致するか否かを判
定する。
That is, at the time of transmitting and receiving the status,
In the communication module described above, as a transmitting side, a password transmitting unit transmits a preset password to the receiving side in parallel with the reception of the status, and after elapse of a transmission time of one command, the head bit determining unit It is determined whether the first bit of the received status matches a predetermined value.

【0045】この判定で、受信されたステータスの先頭
ビットが所定値に一致しなければ、ステータスの送受信
時にエラーが発生したと判断できるので、ステータス再
受信制御手段は、ステータスを再受信するよう制御す
る。
If the first bit of the received status does not match the predetermined value in this determination, it can be determined that an error has occurred during the transmission / reception of the status, and the status re-reception control means performs control to re-receive the status. I do.

【0046】このように請求項5記載の通信モジュール
によれば、コマンド送受信時の送信側として、受信され
たステータスの先頭ビットのチェックという簡単な処理
により、エラー発生を正確且つ速やかに検知して、ステ
ータスの再受信に備えることができる。
As described above, according to the communication module of the fifth aspect, the transmission side at the time of command transmission / reception detects the occurrence of an error accurately and promptly by a simple process of checking the first bit of the received status. , Can be prepared for a status re-receipt.

【0047】一方、ステータスの送受信時に、請求項6
記載の通信モジュールでは、受信側として、パスワード
受信手段が、送信側から送られてきたパスワードを受信
し、パスワード判定手段が、受信されたパスワードが予
め設定されたパスワードに一致するか否かを判定する。
On the other hand, at the time of status transmission / reception,
In the communication module described above, as a receiving side, a password receiving unit receives a password sent from the transmitting side, and a password determining unit determines whether the received password matches a preset password. I do.

【0048】この判定で、受信されたパスワードが予め
設定されたパスワードに一致しなければ、ステータスの
送受信時にエラーが発生したと判断できるので、1コマ
ンドの送信時間だけ経過した後、ステータス再送信制御
手段は、8進カウンタをリセットしステータスを再送信
するよう制御する。
In this determination, if the received password does not match the password set in advance, it can be determined that an error has occurred during transmission and reception of the status. The means controls to reset the octal counter and retransmit the status.

【0049】このように請求項6記載の通信モジュール
によれば、コマンド送受信時の受信側として、受信され
たパスワードのチェックという簡単な処理により、エラ
ー発生を正確且つ速やかに検知して、ステータスを再送
信することができる。
As described above, according to the communication module of the sixth aspect, as a receiving side at the time of transmitting and receiving a command, the occurrence of an error is accurately and promptly detected by a simple process of checking the received password, and the status is determined. Can be resent.

【0050】[0050]

【発明の実施の形態】以下、図面を参照して発明の実施
形態を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0051】図2に示すように、一般的な組み込み型マ
イクロコンピュータに内蔵されシリアル通信を行う通信
モジュールは、CPU22と、受信したデータ及び送信
するデータを格納するシリアルデータレジスタ28と、
データ送受信のタイミングをとるためのクロックを発生
するクロック発生部26と、データ受信時にデータ送信
側から送られてくるクロックをカウントする8進カウン
タ24と、後述するコマンド受信待ち状態である事を示
すパスワード(以下、第1のパスワードと称する)及び
ステータスを取得するためのパスワード(以下、第2の
パスワードと称する)の各々の予め規定された値を記憶
したパスワード記憶部32とを含んで構成されており、
シリアルデータレジスタ28はデータバス30を介して
図示しないデータ処理部やデータ出力部等に接続されて
いる。
As shown in FIG. 2, a communication module built in a general built-in microcomputer for performing serial communication includes a CPU 22, a serial data register 28 for storing received data and data to be transmitted, and
A clock generator 26 for generating a clock for setting the timing of data transmission / reception, an octal counter 24 for counting a clock transmitted from the data transmission side at the time of data reception, and a command reception waiting state described later. A password storage unit 32 storing predetermined values of a password (hereinafter, referred to as a first password) and a password for acquiring a status (hereinafter, referred to as a second password). And
The serial data register 28 is connected to a data processing unit and a data output unit (not shown) via a data bus 30.

【0052】マイクロコンピュータには、上記のような
通信モジュールが複数内蔵されており、以下では、2つ
の通信モジュール間で一方から他方へコマンドを送信す
るケースでの通信制御方法を説明する。
A microcomputer includes a plurality of communication modules as described above. Hereinafter, a communication control method in a case where a command is transmitted from one communication module to another communication module will be described.

【0053】本実施形態では、図1に示すように、コマ
ンドを送信する通信モジュールをマスターモジュール1
0、コマンドを受信する通信モジュールをスレーブモジ
ュール20とし、マスターモジュール10から送信され
るデータをTxD、スレーブモジュール20から送信さ
れるデータをRxDとする。また、マスターモジュール
10とスレーブモジュール20でのデータのやりとり
は、マスターモジュール10から出力されるクロック
(CLK)で同期をとって実行される。
In this embodiment, as shown in FIG. 1, a communication module for transmitting a command is a master module 1
0, the communication module that receives the command is the slave module 20, the data transmitted from the master module 10 is TxD, and the data transmitted from the slave module 20 is RxD. The exchange of data between the master module 10 and the slave module 20 is executed in synchronization with a clock (CLK) output from the master module 10.

【0054】また、スレーブモジュール20は、図3に
示す時間帯T1でマスターモジュール10からのコマン
ド送信と並行して、該スレーブモジュール20がコマン
ド受信待ち状態である事を示す第1のパスワードをマス
ターモジュール10へ送信する。その後、マスターモジ
ュール10は、図3に示す時間帯T2でスレーブモジュ
ール20からのステータス送信と並行して、ステータス
を取得するための第2のパスワードをスレーブモジュー
ル20へ送信する。
In parallel with the transmission of the command from the master module 10 in the time period T1 shown in FIG. 3, the slave module 20 transmits the first password indicating that the slave module 20 is in the command reception waiting state to the master module. Send to module 10. Thereafter, the master module 10 transmits the second password for acquiring the status to the slave module 20 in parallel with the status transmission from the slave module 20 in the time zone T2 shown in FIG.

【0055】さらに、スレーブモジュール20は、コマ
ンドの応答としてのステータスをマスターモジュール1
0へ返送する前に必ず、図4に示すようにステータスの
ビット0を「0」にセットする。即ち、送信されるステ
ータスのビット0は常に「0」に設定される。
Further, the slave module 20 sends the status as a response to the command to the master module 1.
Before returning to 0, the status bit 0 must be set to "0" as shown in FIG. That is, bit 0 of the transmitted status is always set to “0”.

【0056】次に、図5〜図8を用いて、本実施形態の
通信制御方法を具体的に説明する。本実施形態では、マ
スターモジュール10のCPUにより図7の制御ルーチ
ンが、スレーブモジュール20のCPUにより図8の制
御ルーチンが、それぞれ実行される。
Next, the communication control method according to the present embodiment will be specifically described with reference to FIGS. In the present embodiment, the control routine of FIG. 7 is executed by the CPU of the master module 10 and the control routine of FIG.

【0057】まず、図3に示す時間帯T1で、コマンド
がマスターモジュール10からスレーブモジュール20
へ、第1のパスワードがスレーブモジュール20からマ
スターモジュール10へ、同時並行で送信される。
First, in a time zone T1 shown in FIG. 3, a command is transmitted from the master module 10 to the slave module 20.
The first password is transmitted from the slave module 20 to the master module 10 at the same time.

【0058】即ち、マスターモジュール10では、コマ
ンドの送信と第1のパスワードの受信とを行い(図7の
ステップ102)、受信された第1のパスワードが正規
の第1のパスワードに一致するか否かを判定する(ステ
ップ104)。コマンドの送信前及び送信中に何ら通信
エラーが発生しなければ、受信された第1のパスワード
は正規の第1のパスワードに一致するので、後述するス
テップ108へ進む。
That is, the master module 10 transmits a command and receives a first password (step 102 in FIG. 7), and determines whether the received first password matches the regular first password. Is determined (step 104). If no communication error occurs before and during the transmission of the command, the received first password matches the formal first password, and the process proceeds to step 108 described later.

【0059】一方、スレーブモジュール20では、8進
カウンタ24をリセットした(図8のステップ202)
後、第1のパスワードの送信とコマンドの受信とを行う
(ステップ204)。そして、コマンド受信後の8進カ
ウンタ24のカウント値が0であるか否かを判定する。
コマンドの受信前及び受信中に何ら通信エラーが発生し
なければ、バイト単位のコマンドの受信中にカウントさ
れる8進カウンタ24のカウント値は0になるので、後
述するステップ210へ進む。
On the other hand, in the slave module 20, the octal counter 24 is reset (step 202 in FIG. 8).
Thereafter, transmission of the first password and reception of the command are performed (step 204). Then, it is determined whether or not the count value of the octal counter 24 after receiving the command is 0.
If no communication error occurs before and during the reception of the command, the count value of the octal counter 24 counted during reception of the command in byte units becomes 0, and the process proceeds to step 210 described later.

【0060】ところが、コマンドの送信前又は送信中に
クロックにノイズが入った場合、図5に示すように、マ
スターモジュール10により第1のパスワードとして認
識される部分が本来の第1のパスワードとずれるので、
図7のステップ104では受信された第1のパスワード
が正規の第1のパスワードに一致しないと判定され、マ
スターモジュール10は通信エラー発生を認識する。そ
して、1コマンドの送信時間だけ待機した(ステップ1
06)後、ステップ102へ戻りコマンドを再送する。
このようにしてマスターモジュール10は、コマンドの
送信前又は送信中に発生した通信エラーを正確且つ速や
かに検知し、迅速にエラー対応を行うことができる。
However, if noise enters the clock before or during the transmission of the command, as shown in FIG. 5, the part recognized as the first password by the master module 10 is shifted from the original first password. So
In step 104 of FIG. 7, it is determined that the received first password does not match the regular first password, and the master module 10 recognizes that a communication error has occurred. Then, it waits for the transmission time of one command (step 1).
06) Then, the process returns to step 102 to resend the command.
In this way, the master module 10 can accurately and quickly detect a communication error that has occurred before or during the transmission of a command, and can quickly respond to the error.

【0061】一方、スレーブモジュール20において
も、図5に示すようにコマンドとして認識される部分が
本来のコマンドとずれるので、コマンドの受信中にカウ
ントされる8進カウンタ24のカウント値は0以外の値
になる。このため、図8のステップ206では8進カウ
ンタ24のカウント値が0でないと判定され、スレーブ
モジュール20は通信エラー発生を認識する。そして、
1コマンドの送信時間だけ待機した(ステップ208)
後、ステップ202へ戻り8進カウンタ24をリセット
し、再送されてくるコマンドの受信に備える。このよう
にしてスレーブモジュール20は、コマンドの受信前又
は受信中に発生した通信エラーを正確且つ速やかに検知
し、迅速にエラー対応を行うことができる。
On the other hand, in the slave module 20, the part recognized as a command is shifted from the original command as shown in FIG. 5, so that the count value of the octal counter 24 counted during reception of the command is other than 0. Value. Therefore, in step 206 of FIG. 8, it is determined that the count value of the octal counter 24 is not 0, and the slave module 20 recognizes that a communication error has occurred. And
Waited for one command transmission time (step 208)
Thereafter, the flow returns to step 202 to reset the octal counter 24 and prepare for receiving the retransmitted command. In this way, the slave module 20 can accurately and promptly detect a communication error that has occurred before or during the reception of a command, and can quickly respond to the error.

【0062】なお、図7のステップ106及び図8のス
テップ208で、1コマンドの送信時間だけ待機するの
は、8進カウンタ24のカウントアップが最大で7ビッ
ト発生する可能性があるためである。
The reason for waiting for the transmission time of one command in step 106 of FIG. 7 and step 208 of FIG. 8 is that the octal counter 24 may count up to 7 bits at the maximum. .

【0063】次に、図3に示す時間帯T2で、ステータ
スがスレーブモジュール20からマスターモジュール1
0へ、第2のパスワードがマスターモジュール10から
スレーブモジュール20へ、同時並行で送信される。
Next, in the time zone T2 shown in FIG.
To 0, a second password is transmitted from the master module 10 to the slave module 20 in parallel.

【0064】即ち、マスターモジュール10では、第2
のパスワードの送信とステータスの受信とを行い(図7
のステップ108)、受信されたステータスの先頭ビッ
トが0であるか否かを判定する(ステップ110)。ス
テータスの受信前及び受信中に何ら通信エラーが発生し
なければ、受信されたステータスの先頭ビットは0であ
るので、ステップ110で肯定判定され、図7の処理を
終了する。
That is, in the master module 10, the second
The password is transmitted and the status is received (see FIG. 7).
Step 108), it is determined whether or not the first bit of the received status is 0 (Step 110). If no communication error occurs before and during the reception of the status, the first bit of the received status is 0, so that an affirmative determination is made in step 110, and the processing in FIG. 7 ends.

【0065】一方、スレーブモジュール20では、8進
カウンタ24をリセットした(図8のステップ210)
後、ステータスの送信と第2のパスワードの受信とを行
う(ステップ212)。そして、受信された第2のパス
ワードが正規の第2のパスワードに一致するか否かを判
定する(ステップ214)。ステータスの送信前及び送
信中に何ら通信エラーが発生しなければ、受信された第
2のパスワードは正規の第2のパスワードに一致するの
で、ステップ214で肯定判定され、図8の処理を終了
する。
On the other hand, the octal counter 24 is reset in the slave module 20 (step 210 in FIG. 8).
Thereafter, transmission of the status and reception of the second password are performed (step 212). Then, it is determined whether or not the received second password matches the legitimate second password (step 214). If no communication error occurs before and during transmission of the status, the received second password matches the formal second password, so an affirmative determination is made in step 214, and the processing in FIG. 8 ends. .

【0066】ところが、ステータスの送信前又は送信中
にクロックにノイズが入った場合、図6に示すように、
マスターモジュール10によりステータスとして認識さ
れる部分が本来のステータスとずれるので、図7のステ
ップ110では受信されたステータスの先頭ビットは0
でないと判定され、マスターモジュール10は通信エラ
ー発生を認識する。そして、所定時間(例えば1コマン
ドの送信時間)だけ待機した(ステップ112)後、ス
テップ108へ戻り、再送されてくるステータスの受信
に備える。このようにしてマスターモジュール10は、
ステータスの受信前又は受信中に発生した通信エラーを
正確且つ速やかに検知し、迅速にエラー対応を行うこと
ができる。
However, if noise enters the clock before or during status transmission, as shown in FIG.
Since the part recognized as the status by the master module 10 deviates from the original status, the first bit of the received status is 0 in step 110 of FIG.
Is not determined, the master module 10 recognizes that a communication error has occurred. Then, after waiting for a predetermined time (for example, transmission time of one command) (step 112), the process returns to step 108 to prepare for reception of the retransmitted status. Thus, the master module 10
It is possible to accurately and quickly detect a communication error occurring before or during reception of a status, and to quickly deal with the error.

【0067】一方、スレーブモジュール20において
も、図5に示すように第2のパスワードとして認識され
る部分が本来の第2のパスワードとずれるので、図8の
ステップ214では受信された第2のパスワードが正規
の第2のパスワードに一致しないと判定され、マスター
モジュール10は通信エラー発生を認識する。そして、
所定時間(例えば1コマンドの送信時間)だけ待機した
(ステップ216)後、ステップ210へ戻り8進カウ
ンタ24をリセットし、ステータスを再送する。このよ
うにしてスレーブモジュール20は、ステータスの送信
前又は送信中に発生した通信エラーを正確且つ速やかに
検知し、迅速にエラー対応を行うことができる。
On the other hand, in the slave module 20 as well, the portion recognized as the second password is shifted from the original second password as shown in FIG. Is determined not to match the regular second password, and the master module 10 recognizes that a communication error has occurred. And
After waiting for a predetermined time (eg, transmission time of one command) (step 216), the process returns to step 210, resets the octal counter 24, and retransmits the status. In this manner, the slave module 20 can accurately and promptly detect a communication error that occurred before or during the transmission of the status, and can quickly respond to the error.

【0068】以上説明した本実施形態の通信制御方法に
よれば、8進カウンタのカウント値のチェック、受信さ
れたパスワードのチェック、受信されたステータスの先
頭ビットのチェックといった比較的簡単な処理により、
通信エラー発生を正確且つ速やかに検知し迅速にエラー
回復を行うことができる。即ち、装置構成の複雑化を回
避し複雑な処理を行う高価な回路を用いずに、通信の信
頼性を向上させることができる。
According to the communication control method of the present embodiment described above, the relatively simple processing of checking the count value of the octal counter, checking the received password, and checking the first bit of the received status,
The occurrence of a communication error can be accurately and promptly detected, and the error can be quickly recovered. In other words, communication reliability can be improved without using an expensive circuit for performing complicated processing while avoiding a complicated device configuration.

【0069】なお、ステータスのみならず、コマンドの
フォーマットを図4に示すように先頭ビットが必ず0に
なるよう設定した上で、スレーブモジュール20におい
て、図8のステップ206で8進カウンタ24のチェッ
クに代わり、受信されたコマンドの先頭ビットが0であ
るか否かを判定するようにしても良い。この場合、8進
カウンタの読み出しができない通信モジュールでも、ス
レーブモジュールとしてコマンド受信前又は受信中での
通信エラー発生を検知可能となる。
It is to be noted that not only the status but also the format of the command is set so that the first bit is always 0 as shown in FIG. 4, and the slave module 20 checks the octal counter 24 in step 206 in FIG. Alternatively, it may be determined whether or not the first bit of the received command is 0. In this case, even a communication module that cannot read the octal counter can detect the occurrence of a communication error before or during command reception as a slave module.

【0070】[0070]

【発明の効果】以上説明したように、請求項1記載の発
明によれば、8進カウンタのカウント値のチェックや、
受信されたパスワードのチェックといった比較的簡単な
処理により、コマンドの送受信時のエラー発生を正確且
つ速やかに検知しエラー回復を行うので、装置構成の複
雑化を回避し複雑な処理を行う高価な回路の設置を回避
しつつ、通信の信頼性を向上させることができる。
As described above, according to the first aspect of the present invention, it is possible to check the count value of the octal counter,
A relatively simple process such as checking a received password detects an error at the time of command transmission / reception accurately and quickly, and performs error recovery. Therefore, an expensive circuit that avoids complicated device configuration and performs complicated processing. The communication reliability can be improved while avoiding the installation of the communication.

【0071】また、請求項2記載の発明によれば、受信
されたステータスの先頭ビットのチェックや、受信され
たパスワードのチェックといった比較的簡単な処理によ
り、ステータスの送受信時のエラー発生を正確且つ速や
かに検知しエラー回復を行うので、装置構成の複雑化を
回避し複雑な処理を行う高価な回路の設置を回避しつ
つ、通信の信頼性を向上させることができる。
According to the second aspect of the present invention, the relatively simple processing of checking the first bit of the received status and checking the received password makes it possible to accurately and accurately generate an error when transmitting and receiving the status. Since detection is performed quickly and error recovery is performed, the reliability of communication can be improved while avoiding the complexity of the device configuration and the installation of expensive circuits for performing complicated processing.

【0072】また、請求項3記載の発明によれば、コマ
ンド送受信時の送信側として、受信されたパスワードの
チェックという簡単な処理により、エラー発生を正確且
つ速やかに検知して、コマンドを再送するので、装置構
成の複雑化を回避し複雑な処理を行う高価な回路の設置
を回避しつつ、通信の信頼性を向上させることができ
る。
According to the third aspect of the present invention, the transmission side at the time of command transmission / reception detects the occurrence of an error accurately and quickly by a simple process of checking the received password, and retransmits the command. Therefore, it is possible to improve the reliability of communication while avoiding the complicated configuration of the device and the installation of an expensive circuit for performing complicated processing.

【0073】また、請求項4記載の発明によれば、コマ
ンド送受信時の受信側として、8進カウンタのカウント
値のチェックという簡単な処理により、エラー発生を正
確且つ速やかに検知して、コマンドの再受信に備えるの
で、装置構成の複雑化を回避し複雑な処理を行う高価な
回路の設置を回避しつつ、通信の信頼性を向上させるこ
とができる。
According to the fourth aspect of the present invention, as a receiving side at the time of command transmission / reception, the occurrence of an error is accurately and promptly detected by a simple process of checking the count value of an octal counter, and the command Since preparations are made for re-reception, the reliability of communication can be improved while avoiding the complexity of the device configuration and the installation of expensive circuits for performing complicated processing.

【0074】また、請求項5記載の発明によれば、コマ
ンド送受信時の送信側として、受信されたステータスの
先頭ビットのチェックという簡単な処理により、エラー
発生を正確且つ速やかに検知して、ステータスの再受信
に備えるので、装置構成の複雑化を回避し複雑な処理を
行う高価な回路の設置を回避しつつ、通信の信頼性を向
上させることができる。
According to the fifth aspect of the present invention, as a transmitting side at the time of command transmission / reception, an error occurrence is accurately and promptly detected by a simple process of checking the first bit of the received status, and the status is checked. Therefore, the reliability of communication can be improved while avoiding the complexity of the device configuration and the installation of expensive circuits for performing complicated processing.

【0075】また、請求項6記載の発明によれば、コマ
ンド送受信時の受信側として、受信されたパスワードの
チェックという簡単な処理により、エラー発生を正確且
つ速やかに検知して、ステータスを再送信するので、装
置構成の複雑化を回避し複雑な処理を行う高価な回路の
設置を回避しつつ、通信の信頼性を向上させることがで
きる。
According to the sixth aspect of the present invention, as a receiving side at the time of transmitting / receiving a command, the occurrence of an error is accurately and promptly detected by a simple process of checking the received password, and the status is retransmitted. Therefore, it is possible to improve the reliability of communication while avoiding the complicated configuration of the device and the installation of an expensive circuit for performing complicated processing.

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

【図1】発明の実施形態のマスターモジュールとスレー
ブモジュールとを示すブロック図である。
FIG. 1 is a block diagram showing a master module and a slave module according to an embodiment of the present invention.

【図2】通信モジュールの概略構成を示すブロック図で
ある。
FIG. 2 is a block diagram illustrating a schematic configuration of a communication module.

【図3】発明の実施形態での正常時のデータ送受信を示
すタイミングチャートである。
FIG. 3 is a timing chart showing normal data transmission / reception in the embodiment of the present invention.

【図4】ステータスのデータフォーマットを示す図であ
る。
FIG. 4 is a diagram showing a data format of a status.

【図5】コマンド送信前にクロックにノイズが入った場
合のデータ送受信を示すタイミングチャートである。
FIG. 5 is a timing chart showing data transmission / reception when a clock contains noise before command transmission.

【図6】ステータス受信前にクロックにノイズが入った
場合のデータ送受信を示すタイミングチャートである。
FIG. 6 is a timing chart showing data transmission and reception when a clock contains noise before status reception.

【図7】マスターモジュールで実行される制御ルーチン
を示す流れ図である。
FIG. 7 is a flowchart showing a control routine executed by the master module.

【図8】スレーブモジュールで実行される制御ルーチン
を示す流れ図である。
FIG. 8 is a flowchart showing a control routine executed by a slave module.

【図9】従来の正常時のデータ送受信を示すタイミング
チャートである。
FIG. 9 is a timing chart showing conventional data transmission / reception under normal conditions.

【図10】従来技術でコマンド送信前にクロックにノイ
ズが入った場合のデータ送受信を示すタイミングチャー
トである。
FIG. 10 is a timing chart showing data transmission / reception in the related art when a clock contains noise before command transmission.

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

10 マスターモジュール 20 スレーブモジュール 22 CPU 24 8進カウンタ 28 シリアルデータレジスタ 32 パスワード記憶部 Reference Signs List 10 master module 20 slave module 22 CPU 24 octal counter 28 serial data register 32 password storage unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 コマンドを他の通信モジュールに送信し
該他の通信モジュールからステータスを受信する機能、
他の通信モジュールからコマンドを受信し該他の通信モ
ジュールに前記ステータスを送信する機能、及び送受信
動作の同期をとるためのクロックを8進カウンタでカウ
ントする機能を有する複数の通信モジュール間での通信
を制御する通信制御方法であって、 コマンドを受信する受信側通信モジュールは、 コマンドの受信と並行して予め設定されたパスワード
を、コマンドを送信する送信側通信モジュールへ送信
し、 1コマンドの送信時間だけ経過した後、前記8進カウン
タによるカウント値が0であるか否かを判定し、 前記カウント値が0でない場合、前記8進カウンタをリ
セットすると共にコマンドを再受信し、 前記送信側通信モジュールは、 コマンドの送信と並行して前記パスワードを受信し、 受信されたパスワードが予め設定されたパスワードに一
致するか否かを判定し、 前記受信されたパスワードが予め設定されたパスワード
に一致しない場合、1コマンドの送信時間だけ経過した
後、前記コマンドを再送する、 通信制御方法。
A function of transmitting a command to another communication module and receiving a status from the other communication module;
Communication between a plurality of communication modules having a function of receiving a command from another communication module and transmitting the status to the other communication module, and a function of counting a clock for synchronizing transmission and reception operations by an octal counter A receiving communication module that receives a command, transmits a preset password to the transmitting communication module that sends the command in parallel with the reception of the command, and transmits one command. After a lapse of time, it is determined whether or not the count value of the octal counter is 0. If the count value is not 0, the octal counter is reset and a command is received again. The module receives the password in parallel with the transmission of the command, and the received password is set in advance. Determining whether or not the received password matches the received password; and if the received password does not match a preset password, retransmitting the command after a lapse of one command transmission time.
【請求項2】 コマンドを他の通信モジュールに送信
し、ステータスを前記他の通信モジュールから受信する
機能、他の通信モジュールからコマンドを受信し該他の
通信モジュールに先頭ビットが所定値にセットされたス
テータスを送信する機能、及び送受信動作の同期をとる
ためのクロックを8進カウンタでカウントする機能を有
する複数の通信モジュール間での通信を制御する通信制
御方法であって、 コマンドを送信する送信側通信モジュールは、 前記ステータスの受信と並行して予め設定されたパスワ
ードを、コマンドを受信する受信側通信モジュールへ送
信し、 1コマンドの送信時間だけ経過した後、受信されたステ
ータスの先頭ビットが前記所定値に一致するか否かを判
定し、 前記受信されたステータスの先頭ビットが前記所定値に
一致しない場合、ステータスを再受信し、 前記受信側通信モジュールは、 ステータスの送信と並行して前記パスワードを受信し、 受信されたパスワードが予め設定されたパスワードに一
致するか否かを判定し、 前記受信されたパスワードが予め設定されたパスワード
に一致しない場合、1コマンドの送信時間だけ経過した
後、前記8進カウンタをリセットすると共にステータス
を再送信する、 通信制御方法。
2. A function of transmitting a command to another communication module and receiving a status from the other communication module, receiving a command from the other communication module, and setting the first bit in the other communication module to a predetermined value. A communication control method for controlling communication between a plurality of communication modules having a function of transmitting a status and a function of counting a clock for synchronizing a transmission / reception operation with an octal counter, comprising: The side communication module transmits a password set in advance to the receiving side communication module that receives the command in parallel with the reception of the status. After a transmission time of one command has elapsed, the first bit of the received status is It is determined whether or not the received status matches the predetermined value, and the first bit of the received status is the predetermined bit. If the received password does not match the status, the receiving side communication module receives the password in parallel with the transmission of the status, and determines whether the received password matches a preset password. A communication control method for resetting the octal counter and retransmitting the status after a lapse of one command transmission time if the received password does not match a preset password.
【請求項3】 コマンドを他の通信モジュールに送信し
該他の通信モジュールからステータスを受信する機能、
他の通信モジュールからコマンドを受信し該他の通信モ
ジュールに前記ステータスを送信する機能、及び送受信
動作の同期をとるためのクロックを8進カウンタでカウ
ントする機能を有する通信モジュールであって、 コマンドの送信時に、他の通信モジュールから送信され
てくるパスワードを受信する受信手段と、 受信されたパスワードが予め設定されたパスワードに一
致するか否かを判定する判定手段と、 前記受信されたパスワードが予め設定されたパスワード
に一致しない場合、前記コマンドを再送するよう制御す
るコマンド再送制御手段と、 を有する通信モジュール。
A function of transmitting a command to another communication module and receiving a status from the other communication module;
A communication module having a function of receiving a command from another communication module and transmitting the status to the other communication module, and a function of counting a clock for synchronizing transmission / reception operations with an octal counter, comprising: Receiving means for receiving a password transmitted from another communication module during transmission; determining means for determining whether or not the received password matches a preset password; and And a command retransmission control means for controlling retransmission of the command when the password does not match the set password.
【請求項4】 コマンドを他の通信モジュールに送信し
該他の通信モジュールからステータスを受信する機能、
他の通信モジュールからコマンドを受信し該他の通信モ
ジュールに前記ステータスを送信する機能、及び送受信
動作の同期をとるためのクロックを8進カウンタでカウ
ントする機能を有する通信モジュールであって、 コマンドの受信時に、予め設定されたパスワードを他の
通信モジュールに送信する送信手段と、 前記8進カウンタによるカウント値が0であるか否かを
判定するカウント値判定手段と、 前記カウント値が0でない場合、前記8進カウンタをリ
セットし、コマンドを再受信するよう制御するコマンド
再受信制御手段と、 を有する通信モジュール。
4. A function of transmitting a command to another communication module and receiving a status from the other communication module.
A communication module having a function of receiving a command from another communication module and transmitting the status to the other communication module, and a function of counting a clock for synchronizing transmission / reception operations with an octal counter, comprising: Transmitting means for transmitting a preset password to another communication module at the time of receiving; count value determining means for determining whether or not the count value of the octal counter is 0; and when the count value is not 0 And a command re-receiving control means for resetting the octal counter and controlling to re-receive the command.
【請求項5】 コマンドを他の通信モジュールに送信
し、ステータスを前記他の通信モジュールから受信する
機能、他の通信モジュールからコマンドを受信し該他の
通信モジュールに先頭ビットが所定値にセットされたス
テータスを送信する機能、及び送受信動作の同期をとる
ためのクロックを8進カウンタでカウントする機能を有
する通信モジュールであって、 ステータスの受信時に、予め設定されたパスワードを他
の通信モジュールへ送信するパスワード送信手段と、 受信されたステータスの先頭ビットが前記所定値に一致
するか否かを判定する先頭ビット判定手段と、 前記受信されたステータスの先頭ビットが前記所定値に
一致しない場合、ステータスを再受信するよう制御する
ステータス再受信制御手段と、 を有する通信モジュール。
5. A function of transmitting a command to another communication module and receiving a status from the other communication module, receiving a command from the other communication module, and setting the first bit in the other communication module to a predetermined value. A communication module having a function of transmitting a set status and a function of counting a clock for synchronizing a transmission / reception operation with an octal counter, and transmitting a preset password to another communication module when receiving the status. A password transmitting unit for performing the operation, a first bit determining unit for determining whether a first bit of the received status matches the predetermined value, and a status when the first bit of the received status does not match the predetermined value. Status re-reception control means for controlling re-reception of communication module .
【請求項6】 コマンドを他の通信モジュールに送信
し、ステータスを前記他の通信モジュールから受信する
機能、他の通信モジュールからコマンドを受信し該他の
通信モジュールに先頭ビットが所定値にセットされたス
テータスを送信する機能、及び送受信動作の同期をとる
ためのクロックを8進カウンタでカウントする機能を有
する通信モジュールであって、 ステータスの送信時に、他の通信モジュールから送信さ
れてくるパスワードを受信するパスワード受信手段と、 受信されたパスワードが予め設定されたパスワードに一
致するか否かを判定するパスワード判定手段と、 前記受信されたパスワードが予め設定されたパスワード
に一致しない場合、前記8進カウンタをリセットし、ス
テータスを再送信するよう制御するステータス再送信制
御手段と、 を有する通信モジュール。
6. A function of transmitting a command to another communication module and receiving a status from the other communication module, receiving a command from the other communication module, and setting the first bit in the other communication module to a predetermined value. A communication module having a function of transmitting a status, and a function of counting a clock for synchronizing transmission / reception operations with an octal counter, and receives a password transmitted from another communication module when transmitting the status. Password receiving means, password determining means for determining whether or not a received password matches a preset password, and when the received password does not match a preset password, the octal counter Status resend to control reset and resend status And a communication control unit.
JP10036066A 1998-02-18 1998-02-18 Communication control method and communication module Pending JPH11234364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10036066A JPH11234364A (en) 1998-02-18 1998-02-18 Communication control method and communication module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10036066A JPH11234364A (en) 1998-02-18 1998-02-18 Communication control method and communication module

Publications (1)

Publication Number Publication Date
JPH11234364A true JPH11234364A (en) 1999-08-27

Family

ID=12459359

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10036066A Pending JPH11234364A (en) 1998-02-18 1998-02-18 Communication control method and communication module

Country Status (1)

Country Link
JP (1) JPH11234364A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001274862A (en) * 2000-02-22 2001-10-05 Thomson Multimedia Sa Method for serially transmitting data between two electronic bus stations and bus station used by the method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001274862A (en) * 2000-02-22 2001-10-05 Thomson Multimedia Sa Method for serially transmitting data between two electronic bus stations and bus station used by the method
JP4565459B2 (en) * 2000-02-22 2010-10-20 トムソン マルチメディア Method for serial transmission of data between two electronic bus stations and bus station used in the method

Similar Documents

Publication Publication Date Title
US4988990A (en) Dual master implied token communication system
US5166678A (en) Dual master implied token communication system
EP1681814A2 (en) Wireless identification protocol with confirmation of successful transmission
US7530001B2 (en) Wireless communications system reducing unnecessary retransmission by means of a correlation value of received data with preamble and a method therefor
US7430619B2 (en) Communication device, host apparatus, and communication method
JP3486990B2 (en) Serial communication device
CN117220837A (en) Data transmission method, storage medium and equipment
EP1305922B1 (en) Ground level shift detection in can systems
JPH11234364A (en) Communication control method and communication module
JPH07288516A (en) Serial data transmission reception circuit
JPH0530115A (en) Polling system
JPH0319441A (en) Reply timing control type arq system
JP3084777B2 (en) Power line communication system and power line communication device
US10938516B1 (en) Systems and methods for ethernet packet error detection and correction in automotive environments
CN113055133B (en) Hybrid automatic repeat request HARQ response method, device, equipment and medium
KR0167910B1 (en) Remote data service unit controlling apparatus
KR100260988B1 (en) Baud rate generator
JP3609701B2 (en) Error data notification method and notification system in unidirectional serial data communication system
JP2003016027A (en) System for communication among cpu
JP2536385B2 (en) Data communication method
CN116938428A (en) Method and communication system for synchronizing data frames
JPH06177941A (en) Home bus controller
JP2679648B2 (en) Transmission system
JPH0795222A (en) Communication equipment
JPS61288638A (en) Data transmission system with pace synchronization