JPH0626370B2 - Transmission / reception method - Google Patents
Transmission / reception methodInfo
- Publication number
- JPH0626370B2 JPH0626370B2 JP1331213A JP33121389A JPH0626370B2 JP H0626370 B2 JPH0626370 B2 JP H0626370B2 JP 1331213 A JP1331213 A JP 1331213A JP 33121389 A JP33121389 A JP 33121389A JP H0626370 B2 JPH0626370 B2 JP H0626370B2
- Authority
- JP
- Japan
- Prior art keywords
- reception
- transmission
- data
- storage means
- cpu
- 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
- Selective Calling Equipment (AREA)
- Communication Control (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、送信コマンドに応答して返送されてくるデー
タを受信する送受信方法に関するものである。The present invention relates to a transmission / reception method for receiving data returned in response to a transmission command.
従来より、第5図に示すように、親局1より伸びた伝送
路Lに通信インターフェイス2-1〜2-nを各個に接続
し、これら通信インターフェイス2-1〜2-nでのデータ
を、親局1からの送信コマンドに応答して返送するよう
にした通信システムが知られている。Conventionally, as shown in FIG. 5, each of the communication interfaces 2 -1 to 2- n is connected to a transmission line L extending from the master station 1, and data at these communication interfaces 2 -1 to 2- n is connected. There is known a communication system in which a master station 1 returns a transmission command in response to the transmission command.
通信インターフェイス2-1〜2-nは、温度センサ,湿度
センサ,煙センサ等のセンサ部2-11〜2-n1とドライバ
・レシーバ部2-12〜2-n2とを備え、センサ部2-11〜
2-n1にて検出したデータをドライバ・レシーバ部2-12
〜2-n2にてディジタル入力データ(DI)とし、この
ディジタル入力データを送信コマンドに応答して親局1
へ返送する。Communication interface 2 -1 to 2 -n includes a temperature sensor, a humidity sensor, a sensor section 2 -11 to 2 -n1 and the driver receiver unit 2 -12 to 2 -n2 such smoke sensor, the sensor unit 2 - 11 ~
The data detected by 2- n1 is the driver / receiver unit 2-12
Set to digital input data (DI) at ~ 2- n2, and respond to the send command with this digital input data, master station 1
Return to.
第6図は親局1の内部構成の概略を示し、親局1はCP
U1-1とマスタLSI1-2とを備えている。すなわち、
第7図に示すt1点にて、CPU1-1がマスタLSI1
-2にアクセスし、送信コマンドTXの送信を開始する。
そして、この送信コマンドTXの送信終了信号TXEND
をCPU1-1にて確認し(t2点)、マスタLSI1-2
に対する制御をそれまでの送信シーケンスから受信シー
ケンスへと切り替える。すなわち、CPU1-1での送信
終了信号TXENDの確認後、送信コマンドTXに応答す
る受信データRXの受信を開始し(t3点)、その受信
データRXの受信終了信号RXENDを得て(t4点)、
CPU1-1内に受信データRXを取り込んで処理する。FIG. 6 shows an outline of the internal configuration of the master station 1, which is the CP.
It includes U1 -1 and master LSI 1 -2 . That is,
At the point t 1 shown in FIG. 7, the CPU 1-1 is the master LSI 1
-2 is accessed and transmission of the transmission command TX is started.
Then, the transmission end signal TX END of this transmission command TX
It was confirmed by CPU 1 -1 (t 2 points), the master LSI 1 -2
The control for is switched from the previous transmission sequence to the reception sequence. That is, after confirming the transmission end signal TX END in the CPU 1-1 , reception of the reception data RX in response to the transmission command TX is started (t 3 point), and the reception end signal RX END of the reception data RX is obtained ( t 4 points),
Processing takes in the received data RX into CPU 1 -1.
しかしながら、このような送受信方法によると、送信終
了信号TXENDを受けるたびに、CPU1-1での処理動
作が中断され、そのパフォーマンスが低下するものであ
った。However, according to such a transmission and reception method, each time receiving a transmission end signal TX END, is interrupted processing sequence of the CPU 1 -1, the performance was to decrease.
本発明はこのような課題を解決するためになされたもの
で、送信コマンドの種類に応じて定まる受信バイト数を
第1の記憶手段に書き込み、前記送信コマンドに応答し
て返送されてくる受信データを第2の記憶手段へ書き込
み、この受信データの受信バイト数分だけの書き込み終
了後に、その受信データの最後尾のストップコードを確
認のうえ、その受信データの受信終了を第3の記憶手段
に書き込むと共にCPUへ割り込みをかけ、割り込みの
かけられたCPUは、第3の記憶手段の内容を読み取
り、受信データの受信終了を確認したうえ、第2の記憶
手段に書き込まれた受信データの読み込みを行うように
したものである。The present invention has been made to solve such a problem, and writes the number of received bytes, which is determined according to the type of the transmission command, in the first storage means, and the reception data returned in response to the transmission command. To the second storage means, and after writing the received data by the number of received bytes, after confirming the stop code at the end of the received data, the reception end of the received data is stored in the third storage means. Writing and interrupting the CPU, the interrupted CPU reads the contents of the third storage means, confirms the reception end of the reception data, and then reads the reception data written in the second storage means. It's something that you do.
したがってこの発明によれば、送信コマンドを送信した
後、その送信コマンドの種類に応じて定まる受信バイト
数(第1の記憶手段に書き込まれた受信バイト数)分だ
けの受信データを受信しかつストップマークを確認し
て、初めてCPUに割り込みがかかるものとなり、割り
込みのかけられたCPUは、第3確の記憶手段の内容か
ら受信データの受信終了を確認したうえ、第2の記憶手
段に書き込まれた受信データの読み込みを行う。Therefore, according to the present invention, after the transmission command is transmitted, the reception data corresponding to the number of reception bytes (the number of reception bytes written in the first storage means) determined according to the type of the transmission command are received and the stop is performed. After confirming the mark, the CPU is interrupted for the first time, and the interrupted CPU confirms the reception end of the reception data from the content of the third confirmation storage means and then writes it to the second storage means. The received data is read.
以下、本発明に係る送受信方法を詳細に説明する。 Hereinafter, the transmission / reception method according to the present invention will be described in detail.
第2図はこの送受信方法を適用してなるコントローラ
(親局)の内部構成の概略を示す図である。同図におい
て、3-1はCPU、3-2はマスタLSIであり、マスタ
LSI3-2は送信側ファイフォ(TXFIFO)
3-21,受信側ファイフォ(RXFIFO)3-22、コン
トロールレジスタ3-23およびステイタスレジスタ3-24
を備えている。FIG. 2 is a diagram showing the outline of the internal configuration of a controller (master station) to which this transmission / reception method is applied. In the figure, 3 -1 is a CPU, 3 -2 is a master LSI, and master LSI 3 -2 is a transmission side fifo (TX FIFO).
3 -21 , reception side fifo (RXFIFO) 3 -22 , control register 3 -23 and status register 3 -24
Is equipped with.
第1図はこのコントローラ3でのCPU3-1の処理動作
を示すフローチャートである。このフローチャートにし
たがってその動作を説明するに、CPU3-1は、先ず送
信側ファイフォ3-21への送信データの書き込みを行な
う(ステップ101)。すなわち、第3図に示す送信コ
マンドTXにおいて、受信すべきディジタル入力データ
(DI)のビット数を示すタイプおよび、この送信コマ
ンドTXを供与する通信インターフェイスを指定するア
ドレスを、送信データとして送信側ファイフォ3-21へ
書き込む。そして、この送信データの書き込みの後、コ
ントロールレジスタ3-23への、送信開始命令および受
信バイト数の書き込みを行なう(ステップ102)。す
なわち、第3図に示す受信データRXにおいて、そのバ
イト数は送信コマンドTXに規定されるタイプに対応し
て一義的に定まり、この一義的に定まる受信データRX
のバイト数を受信バイト数(送信コマンドTXの種類に
応じて定まる受信バイト数)としてコントロールレジス
タ3-23へ書き込む。なお、コントロールレジスタ3-23
に書き込まれた送信開始命令および受信バイト数は、送
信側ファイフォ3-21およびステイタスレジスタ3-24,
受信側ファイフォ3-22へ与えられる。FIG. 1 is a flow chart showing the processing operation of the CPU 3 -1 in this controller 3. To explain the operation in accordance with the flow chart, CPU 3 -1, first writes transmission data to the transmitting side Faifo 3 -21 (step 101). That is, in the transmission command TX shown in FIG. 3, the type indicating the number of bits of the digital input data (DI) to be received and the address designating the communication interface that provides this transmission command TX are used as transmission data. 3 write to -21. After the writing of the transmission data, the transmission start instruction and the number of received bytes are written in the control register 3-23 (step 102). That is, in the reception data RX shown in FIG. 3, the number of bytes is uniquely determined corresponding to the type defined in the transmission command TX, and the reception data RX is uniquely determined.
Is written in the control register 3-23 as the number of received bytes (the number of received bytes determined according to the type of the transmission command TX). Control register 3-23
Transmission start command and the number of received bytes are written to the transmission side Faifo 3 -21 and status register 3 -24,
It is given to the receiving Faifo 3 -22.
而して、CPU3-1は、マスタLSI3-2での送受信シ
ーケンスを開始させる(ステップ103)。すなわち、
マスタLSI3-2は、送信側ファイフォ3-21からの送
信コマンドTXの送信を開始し、この送信コマンドTX
を受信した通信インターフェイスから返送されてくる受
信データRXを、受信側ファイフォ3-22へ書き込む。
そして、送信コマンドTXに対応して定まる受信バイト
数分だけの受信データRXの書き込み終了後に、その受
信データRXの受信終了をステイタスレジスタ3-24へ
知らせると共に、CPU3-1へ割り込みをかける。CP
U3-1では、「その他の処理」を行いながら(ステップ
105)、マスタLSI3-2からの割り込みの有無を確
認しており(ステップ104)、割り込みがかかると、
ステップ105での「その他の処理」を中断して、ステ
イタスレジスタ3-24の内容を読み取り、受信データR
Xの受信終了を確認し(ステップ106)、受信側ファ
イフォ3-22に書き込まれた受信データRxの読み込み
を行なう(ステップ107)。And Thus, CPU 3 -1 starts the transmission sequence of the master LSI 3 -2 (step 103). That is,
The master LSI 3 -2 starts transmitting the transmission command TX from the transmission side fifo 3 -21, and the transmission command TX
The received data RX which sent back from the communication interface on which it was received, and writes to the receiving side Faifo 3 -22.
Then, after completion of writing of the received data RX of the only few minutes receiving bytes determined corresponding to the transmission command TX, with informing the receiving end of the received data RX to status register 3 -24, an interrupt to the CPU 3 -1. CP
In U3 -1, while "other process" (step 105), and checks for an interrupt from the master LSI 3 -2 (step 104), an interrupt is applied,
The "other processing" in step 105 is interrupted, the contents of the status register 3-24 are read, and the received data R
Check the reception end of X (step 106), performs the reading of the received data Rx written to the receiving Faifo 3 -22 (step 107).
なお、ステップ106でのステイタスレジスタ3-24の
内容読取において、受信データRXの受信終了が確認さ
れなかった場合には、他の処理動作によりマスタLSI
3-2からCPU3-1へ割り込みがかかった、あるいは何
らかの異常が生じてマスタLSI3-2での処理動作がう
まくいかなかった等と判断して、受信側ファイフォ3
-22からの受信データRXの読み取りを行わない等して
対処する。In addition, in the reading of the contents of the status register 3-24 in step 106, if it is not confirmed that the reception of the reception data RX is completed, the master LSI is processed by another processing operation.
It is judged that an interrupt has occurred from 3 -2 to the CPU 3 -1 , or that some abnormality has occurred and the processing operation in the master LSI 3 -2 has failed, and so on.
Take measures such as not reading the received data RX from -22 .
また、本実施例においては、送信コマンドTXに対応し
て定まる受信バイト数分だけの受信データを受信して、
初めて、CPU3-1に割り込みをかけるようにしたが、
第4図に示すように受信データRXの最後尾にストップ
コードを入れれば、このストップコードを検出してCP
U3-1へ割り込みをかけることも可能であり、この方法
を上記受信バイト数だけの受信データを受信して割り込
みをかける方法と併用すれば、さらに確実なものとな
る。Further, in the present embodiment, the received data is received by the number of received bytes determined in correspondence with the transmission command TX,
For the first time, it was to interrupt the CPU3 -1,
If a stop code is inserted at the end of the received data RX as shown in FIG.
It is also possible to interrupt U3 -1 , and if this method is used in combination with the method of receiving the reception data of the number of reception bytes and interrupting it, it becomes more reliable.
以上説明したことから明らかなように本発明による送受
信方法によると、送信コマンドを送信した後、その送信
コマンドの種類に応じて定まる受信バイト数(第1の記
憶手段に書き込まれた受信バイト数)分だけの受信デー
タを受信しかつストップマークを確認して、初めてCP
Uに割り込みがかかるものとなり、CPUでの処理動作
が頻繁に中断されることなく、そのパフォーマンスが向
上するものとなる。As is apparent from the above description, according to the transmission / reception method of the present invention, after the transmission command is transmitted, the number of reception bytes determined according to the type of the transmission command (the number of reception bytes written in the first storage means). Only after receiving the received data for only minutes and confirming the stop mark, CP
Since U is interrupted, the processing operation of the CPU is not frequently interrupted and its performance is improved.
また、割り込みのかけられたCPUは、第3の記憶手段
の内容から受信データの受信終了を確認したうえ、第2
の記憶手段に書き込まれた受信データの読み込みを行う
ので、受信データの受信終了が確認されなかったような
場合、何らかの異常が生じて処理動作がうまくいかなか
った等と判断して、第2の記憶手段からの受信データの
読み取りを行わない等して対処することが可能となる。Further, the interrupted CPU confirms the reception end of the reception data from the contents of the third storage means, and then the second CPU
Since the reception data written in the storage means is read, if it is not confirmed that the reception of the reception data has been completed, it is determined that some kind of abnormality has occurred and the processing operation is not successful. It is possible to deal with it by not reading the received data from the storage means.
第1図は第2図に示したコントローラにおいてそのCP
Uの行なう処理動作を示すフローチャート、第2図は本
発明に係る送受信方法を適用してなるコントローラの内
部構成の概略を示す図、第3図はこのコントローラでの
送信コマンドおよび受信データの入出力状態を示す図、
第4図はこのコントローラでの送信コマンドおよび受信
データの入出力状態の他の実施例を示す図、第5図は各
個に接続した通信インターフェイスでのデータを親局か
らの送信コマンドに応じて返送するようにした通信シス
テムを示す図、第6図はこの通信システムにおいてその
親局の内部構成の概略を示す図、第7図はこの親局での
送信コマンドおよび受信データの入出力状態を示す図で
ある。 3……コントローラ、3-1……CPU、3-2……マスタ
LSI、3-21……送信側ファイフォ、3-22……受信側
ファイフォ、3-23……コントロールレジスタ、3-24…
…ステイタスレジスタ、TX……送信コマンド、RX…
…受信データ。FIG. 1 shows the CP in the controller shown in FIG.
FIG. 2 is a flow chart showing the processing operation performed by U, FIG. 2 is a diagram showing the outline of the internal configuration of the controller to which the transmitting / receiving method according to the present invention is applied, and FIG. 3 is the input / output of transmission commands and reception data in this controller. Figure showing the state,
FIG. 4 is a diagram showing another embodiment of input / output states of transmission commands and reception data in this controller, and FIG. 5 returns data in the communication interface connected to each unit in response to a transmission command from the master station. FIG. 6 is a diagram showing a communication system configured to do so, FIG. 6 is a diagram showing an outline of an internal configuration of the master station in this communication system, and FIG. 7 is an input / output state of a transmission command and reception data in the master station. It is a figure. 3 ... Controller, 3 -1 ...... CPU, 3 -2 ...... Master LSI, 3 -21 ...... Transmit side phifo, 3 -22 ...... Receive side phifo, 3 -23 ...... Control register, 3 -24 ...
... Status register, TX ... Send command, RX ...
…received data.
フロントページの続き (72)発明者 勝亦 敦 神奈川県藤沢市川名1丁目12番2号 山武 ハネウエル株式会社藤沢工場内 (72)発明者 木村 徹男 東京都渋谷区幡ケ谷1丁目11番6号 ニツ タン株式会社内 (72)発明者 岸村 勝弘 東京都渋谷区幡ケ谷1丁目11番6号 ニツ タン株式会社内 (72)発明者 大内 浩司 東京都渋谷区幡ケ谷1丁目11番6号 ニツ タン株式会社内 (72)発明者 雨宮 秀人 東京都渋谷区幡ケ谷1丁目11番6号 ニツ タン株式会社内 (56)参考文献 特開 平1−123551(JP,A) 特開 昭61−88635(JP,A) 特開 昭62−94042(JP,A)Front Page Continuation (72) Inventor Atsushi Katsunori 1-12-2 Kawana, Fujisawa-shi, Kanagawa Yamatake Honeywell Co., Ltd. Fujisawa Plant (72) Inventor Tetsuo Kimura 1-11-6 Hatagaya, Shibuya-ku, Tokyo Nittan stock In-house (72) Inventor Katsuhiro Kishimura 1-11-6 Hatagaya, Shibuya-ku, Tokyo Nitsutan Co., Ltd. (72) Inventor Koji Ouchi 1-1-11 Hatagaya, Shibuya-ku, Tokyo Nitsutan Co., Ltd. (72) Hideto Amamiya Hideto Amamiya 1-11-6 Hatagaya, Shibuya-ku, Tokyo Within Nittan Co., Ltd. (56) Reference JP-A-1-123551 (JP, A) JP-A-61-88635 (JP, A) ) JP-A-62-94042 (JP, A)
Claims (1)
イト数を第1の記憶手段に書き込み、前記送信コマンド
に応答して返送されてくる受信データを第2の記憶手段
へ書き込み、この受信データの前記受信バイト数分だけ
の書き込み終了後に、その受信データの最後尾のストッ
プコードを確認のうえ、その受信データの受信終了を第
3の記憶手段に書き込むと共にCPUへ割り込みをか
け、割り込みのかけられたCPUは、前記第3の記憶手
段の内容を読み取り、前記受信データの受信終了を確認
したうえ、前記第2の記憶手段に書き込まれた受信デー
タの読み込みを行うことを特徴とする送受信方法。1. The number of received bytes determined according to the type of transmission command is written in a first storage means, the reception data returned in response to the transmission command is written in a second storage means, and this reception data is written. After the end of writing for the number of the received bytes, the stop code at the end of the received data is confirmed, the reception end of the received data is written to the third storage means, and the CPU is interrupted and interrupted. The transmitting / receiving method, wherein the CPU reads the contents of the third storage means, confirms the reception end of the reception data, and then reads the reception data written in the second storage means. .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1331213A JPH0626370B2 (en) | 1989-12-22 | 1989-12-22 | Transmission / reception method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1331213A JPH0626370B2 (en) | 1989-12-22 | 1989-12-22 | Transmission / reception method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03192939A JPH03192939A (en) | 1991-08-22 |
| JPH0626370B2 true JPH0626370B2 (en) | 1994-04-06 |
Family
ID=18241161
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1331213A Expired - Lifetime JPH0626370B2 (en) | 1989-12-22 | 1989-12-22 | Transmission / reception method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0626370B2 (en) |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6188635A (en) * | 1984-10-05 | 1986-05-06 | Nec Corp | Signal transmitting and receiving circuit |
| JPS6294042A (en) * | 1985-10-21 | 1987-04-30 | Oki Electric Ind Co Ltd | Communication control equipment |
| JPH01123551A (en) * | 1987-11-06 | 1989-05-16 | Fujitsu Ltd | Start-stop data receiving system |
-
1989
- 1989-12-22 JP JP1331213A patent/JPH0626370B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH03192939A (en) | 1991-08-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5062073A (en) | Input output control system using a fifo to record access information of control registers by a master device | |
| US5935204A (en) | System for a multi-processor system wherein each processor transfers a data block from cache if a cache hit and from main memory only if cache miss | |
| JPH0626370B2 (en) | Transmission / reception method | |
| JPH0575137B2 (en) | ||
| US5764907A (en) | Computer to microcomputer interface | |
| US5603057A (en) | System for initiating data transfer between input/output devices having separate address spaces in accordance with initializing information in two address packages | |
| JPS633351B2 (en) | ||
| JP2001117864A (en) | Communication buffer access method and write control device therefor | |
| JP3261665B2 (en) | Data transfer method and data processing system | |
| JP2751879B2 (en) | Communication system between processors | |
| JPH0218623B2 (en) | ||
| JPS6049465A (en) | Data transfer method between microcomputers | |
| JPH0514293B2 (en) | ||
| JPS6256545B2 (en) | ||
| JPS61165160A (en) | Bus controlling system | |
| KR100211960B1 (en) | Parity Method Using Parity Method | |
| JPH0235500B2 (en) | ||
| JPS60144068A (en) | Facsimile transmission module | |
| JPH0685841A (en) | Communication controller | |
| JPS63205757A (en) | Information transfer system | |
| JPH01123551A (en) | Start-stop data receiving system | |
| JPH0426476B2 (en) | ||
| JPH11298505A (en) | Communication control device and computer system | |
| JPH04163664A (en) | Distributed memory type parallel computer system | |
| JPH03154951A (en) | data processing equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080406 Year of fee payment: 14 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090406 Year of fee payment: 15 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090406 Year of fee payment: 15 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100406 Year of fee payment: 16 |
|
| EXPY | Cancellation because of completion of term | ||
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100406 Year of fee payment: 16 |