JP3489287B2 - Data exchange method by serial bus - Google Patents
Data exchange method by serial busInfo
- Publication number
- JP3489287B2 JP3489287B2 JP23824595A JP23824595A JP3489287B2 JP 3489287 B2 JP3489287 B2 JP 3489287B2 JP 23824595 A JP23824595 A JP 23824595A JP 23824595 A JP23824595 A JP 23824595A JP 3489287 B2 JP3489287 B2 JP 3489287B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- serial bus
- input
- microcomputer
- output device
- 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
- 238000000034 method Methods 0.000 title claims description 13
- 238000011144 upstream manufacturing Methods 0.000 claims description 19
- 238000010586 diagram Methods 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013481 data capture Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Information Transfer Systems (AREA)
Description
【発明の詳細な説明】
【0001】
【発明の属する技術分野】本発明は、マイクロコンピュ
ータ・システムにおけるシリアル・データバスのデータ
交換方式に関する。
【0002】
【従来の技術】マイクロコンピュータ・システムにおい
ては、入出力装置とデータを交換する方法には、パラレ
ル・バスによるデータ交換とシリアル・バスによるデー
タ交換の方法がある。シリアル・バスはデータラインと
データラインからデータ取り込むためのクロックかにな
る2線式のバス等、クロックに同期してデータをシリア
ルで交換を行うバスである。
【0003】ID(アドレス)、コマンド、リード/ラ
イトデータ、データチェッカからなるデータ・フォーマ
ットでマイクロコンピュータとデータ入出力装置との間
でデータの援受を行う場合の例を図6〜図10に示す。
【0004】図7,図9に示すように、マイクロコンピ
ュータ1と各入出力装置3とをシリアル・バス2で接続
し、マイクロコンピュータ1からある入出力装置3へデ
ータを送る場合の下り系データ・フォマットは、図6に
示すようにID(アドレス)16ビット、コマンド3ビ
ット、リード/ライトデータ16ビット及びデータ・チ
ェッカ4ビットの39ビットで構成され、1〜39の順
番にシリアル・バス2にデータを出力する。コマンド
は、101のときマイクロコンピュータからのリード動
作、110のときマイクロコンピュータからのライト動
作、それ以外は無効である。
【0005】また、その入出力装置3からマイクロコン
ピュータ1へデータを送る場合の上り系データ・フォマ
ットは、図8に示すようにID(アドレス)16ビッ
ト、応答コード3ビット、リード/ライトデータ16ビ
ット及びデータ・チェッカ4ビットの39ビットで構成
され、1〜39の順番にシリアル・バス2にデータを出
力する。コマンドは、001のときマイクロコンピュー
タからのリードコマンドに対する応答コード、010の
ときマイクロコンピュータからのライトコマンドに対す
る応答コード、それ以外は無効である。
【0006】このデータ交換方式の動作は以下のように
行われている。
【0007】(1)マイクロコンピュータ1がある入出
力装置3に対して、リード/ライト動作を行うために、
シリアル・バス2にデータを出力する。リード動作の場
合は、入出力装置のID(アドレス)、コマンド、デー
タ・チェッカの順番にシリアル・バスに出力する。ライ
ト動作の場合は、ID(アドレス)、コマンド、ライト
・データ、データ・チェッカの順番にシリアル・バス2
に出力する。
【0008】(2)シリアル・バス2からマイクロコン
ピュータ1からの39ビットのデータを受け取った入出
力装置3は、ID(アドレス)の一致/不一致、シリア
ル・データのデータ・チェックを行い、全て合格した場
合、入出力デバイス31に対しリード/ライト動作を行
う。チェックに不合格の場合はリード/ライト動作を行
わない。
【0009】(3)入出力デバイス31へのリード/ラ
イト動作を行った入出力装置3は、リード動作の場合
は、自分のID(アドレス)、応答コード、リード・デ
バイス、データ・チェッカの順番にシリアル・バスにデ
ータを出力する。ライト動作の場合は、自分のID(ア
ドレス)、応答コード、ライト・データ、データ・チェ
ッカの順番にシリアル・バス2にデータを出力する。ラ
イトデータフィードバック) (4)マイクロコンピュ
ータ1は、シリアル・バス2から入出力装置3からのシ
リアル・データを受け取る。
【0010】2線式による本シリアル・バスの場合、デ
ータ交換方式は半二重式である。上記に示した39ビッ
ト幅のデータ交換を行う場合、シリアル・バスのクロッ
クを1MHzとし場合、
39×1μS×2+α=78+α μS
以上のように、78+αμS(α:入出力装置の入出力
デバイスからのリード/ライト動作によるオーバーヘッ
ド時間)の時間が必要となる。
【0011】
【発明が解決しようとする課題】2線式のシリアル・バ
スであると、マイクロコンピュータが入出力装置にリー
ド/ライト動作を行う場合、半二重方式であるため、デ
ータ交換を行うデータのビット幅の2倍以上の時間がか
かり、非常に効率の悪い装置になってしまう。
【0012】本発明は、従来のこのような問題点に鑑み
てなされたものであり、その目的とするところは、シリ
アル・バスを4線式としてシリアル・バスを効率よく用
いることができるシリアルバスによるデータ交換方式を
提供することにある。
【0013】
【課題を解決するための手段】本発明のシリアルバスに
よる交換方式は、マイクロコンピュータと各入出力装置
のデータ交換をシリアル・バスで行うシリアルバスによ
るデータ交換方式であって、シリアルバスをマイクロコ
ンピュータから入出力装置側へデータを送る下り系専用
シリアル・バスと入出力装置側からマイクロコンピュー
タへデータを送る上り系専用シリアル・バスに分けて4
線式とし、入出力装置側を下り系シリアル・バスからア
ドレス、コマンドを受け取った時点で、上り系シリアル
・バスへ応答用アドレス、応答コードの出力をなし得る
ようにし、入出力装置側で下り系シリアル・バスからデ
ータを受け取りながら同時に、上り系シリアル・バスに
データを出力し得るようにしたシリアルバスによるデー
タ交換方式において、上り系データ・フォーマットのリ
ード/ライトデータの後にエラー・フラグを挿入し、下
り系データ・フォーマットのアドレスデータとコマンド
データの後にデータチェッカを挿入すると共に、リード
/ライトデータの後にデータチェッカを挿入し、「アド
レス・データ、コマンド・データ」と「ライト・デー
タ」をそれぞれ独立した形でデータ・チェックをなし得
るようにし、各データ・チェックの整合性が確認された
時には、上り系シリアル・バスに対して応答データの出
力を開始し、アドレス・データ、コマンド・データ部分
のデータ・チェックがOKで、ライト・データ部分でデ
ータ・チェック異常が起きた時には、上り系のデータ・
フォーマット中のエラー・フラグをONにして応答する
ようにしたものである。
【0014】
【発明の実施の形態】
実施の形態1(図1〜図4)
図4に示すように、シリアルバス2をマイクロコンピュ
ータ1から入出力装置3への下り系シリアル・バス21
と入出力装置3からマイクロコンピュータ1への上り系
シリアル・バス22に分離し、全二重方式とした。
【0015】データ・フォマットは、マイクロコンピュ
ータから出力される下り系データ・フォーマットを図1
に示すように、ID(アドレス)16ビット、コマンド
2ビット、リード/ライトデータ16ビット、下り系、
上り系のデータ幅を同じ39ビットにするための未定義
1ビット、データ・チェッカ4ビットの39ビット構成
とした。1〜39番の順番にシリアル・バスにデータを
出力する。コマンドは01のときマイクロコンピュータ
からのリード動作、10のときマイクロコンピュータか
らのライト動作、それ以外は無効である。リード時のデ
ータは、ダミーデータである。また、入出力装置から出
力される上り系データ・フォマットを図2に示すよう
に、ID(アドレス)16ビット、応答コード2ビッ
ト、リード/ライトデータ16ビット、エラー・フラグ
1ビット、データ・チェッカ4ビットの39ビット構成
とした。1〜39番の順番にシリアル・バスにデータを
出力する。コマンドは01のときマイクロコンピュータ
からのリード動作の応答コード、10のときマイクロコ
ンピュータからのライト動作の応答コード、それ以外は
無効である。ライト時のデータは、ライトデータのフィ
ードバックである。
【0016】入出力装置3では、下り系データ・フォマ
ットの23ビット目までのデータを受け取ったら、上り
系のデータの出力を開始する。つまり、下り系の24〜
39ビット目での16ビットの受信動作と、上り系の1
〜16ビット目までの16ビットの送信動作が重複する
ことになる。下り系,上り系のデータ幅を同じ(39ビ
ット)にするため、この例では、下り系データ・フォマ
ットに未定義ビットを1ビット挿入した。プロトコル例
を図3に示す。
【0017】次に、この実施の形態の動作について説明
する。
【0018】(1)マイクロコンピュータ1がある入出
力装置3に対して、リード/ライト動作を行うために、
下り系のシリアル・バス21にデータを出力する。リー
ド動作の場合は、入出力装置のID(アドレス)、コマ
ンド、データ・チェッカの順番に下り系シリアル・バス
に出力する。ライト動作の場合は、ID(アドレス)、
コマンド、ライト・データ、データ・チェッカの順番に
下り系シリアル・バスに出力する。
【0019】(2)下り系シリアル・バスからマイクロ
コンピュータからの、ID(アドレス)、コマンド部分
を受け取った入出力装置3は、IDが一致することを検
定し、一致した場合、コマンドに対応する動作を開始す
る。
【0020】リード動作の場合:入出力装置3は、自分
のID、コマンドを下り系シリアル・バス21に出力を
開始する。また、入出力デバイスに対しリード動作を行
い、デを取り込む。入出力デバイス31からのデータ取
り込み時間は、数マイクロ秒で完了するため、上り系の
シリアル・バス22にID、コマンドを出力している間
にリード・データを備えることができる。ID、コマン
ドを上り系シリアル・バスに出力が終了したら、引き続
きリード・データ、エラー・フラグ、データ・チェッカ
を上り系シリアル・バスに出力する。(エラーフラグ:
下り系シリアル・バスからのデータを受け取った時、デ
ータ・チェック・エラーが発生したか否かを示すフラ
グ)
ライト動作の場合:入出力装置は、自分のID、コマン
ドを上り系シリアル・バスに出力を開始する。
【0021】下り系シリアル・バスからライト・デー
タ、データ・チェッカを受け取った後、データ・エラー
が無いことを確認して、入出力デバイスにライト・デー
タを出力する。データ・エラーが発生した場合、入出力
デバイスにはライト・データを出力しない。上り系シリ
アル・バスにID、コマンドを出力した後引き続いて、
ライト・データ、エラー・フラグ、データ・チェッカを
出力する。
【0022】(3)マイクロコンピュータは、上り系シ
リアル・バスから入出力装置からのシリアル・データを
受け取る。
【0023】シリアル・バス全二重方式(4線式)にす
ることにより、39ビット幅のデータ交換を行う場合、
シリアル・バスのクロックを1MHzとした場合、
39×1μS+(39−16)×1μS=62μS
ただし39:下り系のビット幅
(39−16):上り系のビット幅−下り系との重複ビ
ット幅
以上のように、上り系,下り系重複ビット幅を16ビッ
トとすると、62μSの時間でリード/ライト動作が完
了する。
【0024】実施の形態2(図5)
前記実施の形態1の方式は、データ・チェックを、下り
系のデータをすべて受信してから行っているため、(I
D(アドレス)データ単独でデータ・チェックを行って
いない)IDがデータ化けした場合、「コンピュータ・
ユニットが期待していない入出力装置からの応答があ
る」という不具合が起こる可能性がある。また、データ
化けが発生した場所(物理的)により、「複数の入出力
装置から応答がある」場合か考えられる。実施の形態2
は、下り系(マイクロコンピュータ・ユニット→入出力
装置)のデータ・フォーマット中のIDデータ、コマン
ド・データの後に、データ・チェッカを挿入し、前記不
具合等が生じないようにしものである。
【0025】図5に示すように、IDデータ、コマンド
・データ部分のデータ・チェッカと、ライト・データ部
分のデータ・チェッカを持たせた。これにより、「ID
データ、コマンド・データ」と「ライト・データ」をそ
れぞれ独立した形でデータ・チェックができる。しかし
て、入出力装置がIDデータとコマンド・データを受信
した段階で、IDの一致、データ・チェックの整合性が
確認されたとき、上り系(入出力装置→コンピュータ・
ユニット)のシリアル・バスに対して応答データの出力
を開始する。(データ・チェックに異常が見つかった場
合は応答しない)IDデータ、コマンド・データ部分の
データ・チェックがOKで、ライト・データ部分でデー
タ・チェック異常が起きたときは、入出力装置は、入出
力デバイスにデータを書き込まずに、上り系のデータ・
フォーマット中のエラー・フラグをONにして応答す
る。なお、図5の下り系データ・フォマットにおいて、
コマンドは、01のときマイクロコンピュータからのリ
ード動作、10のときマイクロコンピュータからのライ
ト動作、それ以外は無効である。リード時のデータは、
ダミー・データである。
【0026】以上のように、図5のような下り系データ
・フォーマットを用いたので図3,図4に示すようなプ
ロトコル、アクセス手順で、問題無くシリアル・バスを
効率良く用いることができる。
【0027】
【発明の効果】本発明は、上述のとおり構成されている
ので、次に記載する効果を奏する。
【0028】(1)シリアル・バスを4線式にして、上
り系シリアル・バスと下り系シリアル・バスに分け、全
二重方式としてシリアル・バスを構成したので、マイク
ロコンピュータがシリアル・バスを介して入出力装置に
リード/ライト動作を行う場合、2線式のシリアル・バ
スよりも効率よくバスアクセス動作ができる。
【0029】(2)下り系のデータ・フォーマット中の
IDデータ、コマンドデータの後にデータ・チェッカを
挿入することにより、「IDデータ、コマンドデータ」
と「ライト・データ」をそれぞれ独立した形でデータ、
チェックができる。マイクロコンピュータ・ユニットか
ら出力された下り系シリアル・バスからのデータを、入
出力装置がIDデータとコマンド・データを受信した段
階で、IDの一致、データ・チェックの整合性がとれた
とき、上り系のシリアル・バスに対して応答データの出
力が問題なく開始できる。
【0030】IDがデータ化けした場合、「コンピュー
タ・ユニットが期待していない入出力装置からの応答が
ある」という不具合や、データ化けが発生した場所(物
理的)により「複数の入出力装置から応答がある」とい
うことが無くなる。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data exchange system for a serial data bus in a microcomputer system. 2. Description of the Related Art In a microcomputer system, methods for exchanging data with an input / output device include a data exchange method using a parallel bus and a data exchange method using a serial bus. The serial bus is a bus for serially exchanging data in synchronization with a clock, such as a two-wire bus which is a data line and a clock for taking in data from the data line. FIGS. 6 to 10 show an example in which data is exchanged between a microcomputer and a data input / output device in a data format including an ID (address), a command, read / write data, and a data checker. Show. [0004] As shown in FIGS. 7 and 9, a microcomputer 1 and each input / output device 3 are connected by a serial bus 2, and downlink data for transmitting data from the microcomputer 1 to a certain input / output device 3. As shown in FIG. 6, the format consists of 39 bits of ID (address) 16 bits, command 3 bits, read / write data 16 bits and data checker 4 bits. Output data to The command is a read operation from the microcomputer when the command is 101, a write operation from the microcomputer when 110, and the command is invalid in other cases. When data is sent from the input / output device 3 to the microcomputer 1, the upstream data format is 16 bits for ID (address), 3 bits for response code, 16 bits for read / write data as shown in FIG. It consists of 39 bits of 4 bits and a data checker, and outputs data to the serial bus 2 in the order of 1 to 39. When the command is 001, the response code to the read command from the microcomputer is set. When the command is 010, the response code to the write command from the microcomputer is invalid. [0006] The operation of the data exchange system is performed as follows. (1) In order to perform a read / write operation on the input / output device 3 with the microcomputer 1,
Outputs data to serial bus 2. In the case of a read operation, the data is output to the serial bus in the order of the ID (address) of the input / output device, the command, and the data checker. In the case of a write operation, the serial bus 2 is used in the order of ID (address), command, write data, and data checker.
Output to (2) The input / output device 3 which has received the 39-bit data from the microcomputer 1 from the serial bus 2 performs ID (address) match / mismatch and serial data check, and all pass. In this case, a read / write operation is performed on the input / output device 31. If the check fails, the read / write operation is not performed. (3) The input / output device 3 that has performed the read / write operation on the input / output device 31 performs, in the case of the read operation, its own ID (address), response code, read device, and data checker order. Output data to the serial bus. In the case of a write operation, data is output to the serial bus 2 in the order of its own ID (address), response code, write data, and data checker. (Write data feedback) (4) The microcomputer 1 receives serial data from the input / output device 3 from the serial bus 2. In the case of the present serial bus of the two-wire system, the data exchange system is a half-duplex system. When the data exchange of the 39-bit width described above is performed, when the clock of the serial bus is set to 1 MHz, 39 × 1 μS × 2 + α = 78 + α μS As described above, 78 + αμS (α: from the input / output device of the input / output device) (Overhead time due to read / write operation). In the case of a two-wire serial bus, when a microcomputer performs a read / write operation on an input / output device, data is exchanged because of a half-duplex system. It takes twice as long as the data bit width, resulting in a very inefficient device. SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned conventional problems, and an object of the present invention is to provide a serial bus in which a 4-wire serial bus can be used and the serial bus can be used efficiently. To provide a data exchange method using The serial bus exchange system of the present invention is a serial bus data exchange system for exchanging data between a microcomputer and each input / output device via a serial bus. Is divided into a serial bus for exclusive use of downlink for sending data from the microcomputer to the input / output device and a serial bus for exclusive use of uplink for sending data from the input / output device to the microcomputer.
And a line type, address the input and output device side from the downlink system serial bus, upon receiving the command, the response address to the upstream system serial bus, to give so that without the output of the response code, input and output apparatus at the same time while receiving data from the downlink system serial bus, the data exchange method according to the serial bus to obtain so that outputs data to the upstream system serial bus, the upstream system data format Li
Insert an error flag after load / write data,
Data and commands in the data format
Insert a data checker after the data and read
/ Insert a data checker after the write data,
Data, command data and write data.
Data can be checked independently of each other
Make sure each data check is consistent
Sometimes, response data is output to the upstream serial bus.
Start input, address data, command data part
Data check is OK, write data
When a data check error occurs,
Turn on the error flag during formatting and respond
It is like that. DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 (FIGS. 1 to 4) As shown in FIG. 4, a serial bus 2 is connected from a microcomputer 1 to an input / output device 3 by a downstream serial bus 2 1.
And separated from the input and output device 3 to the upstream system serial bus 2 2 to the microcomputer 1, and a full-duplex. The data format is a data format of the downstream system output from the microcomputer shown in FIG.
As shown in FIG. 2, ID (address) 16 bits, command 2 bits, read / write data 16 bits, downlink system,
It has a 39-bit configuration of 1 undefined bit and 4 bits of data checker for making the data width of the upstream system the same 39 bits. Data is output to the serial bus in the order of Nos. 1-39. When the command is 01, a read operation from the microcomputer is performed. When the command is 10, a write operation from the microcomputer is disabled. The data at the time of reading is dummy data. As shown in FIG. 2, the uplink data format output from the input / output device is 16 bits for ID (address), 2 bits for response code, 16 bits for read / write data, 1 bit for error flag, and data checker. A 4-bit 39-bit configuration was used. Data is output to the serial bus in the order of Nos. 1-39. When the command is 01, the response code of the read operation from the microcomputer is 10; when the command is 10, the response code of the write operation from the microcomputer is invalid; The data at the time of writing is feedback of write data. When the input / output device 3 receives data up to the 23rd bit of the downlink data format, it starts to output uplink data. In other words, from 24 to
16-bit reception operation at the 39th bit and 1
The 16-bit transmission operations up to the 16th bit overlap. In order to make the data widths of the downstream and upstream systems the same (39 bits), in this example, one undefined bit is inserted into the downstream data format. FIG. 3 shows an example of the protocol. Next, the operation of this embodiment will be described. (1) In order to perform a read / write operation on the input / output device 3 with the microcomputer 1,
And it outputs the data to the serial bus 2 1 of the downstream system. In the case of a read operation, the data is output to the downstream serial bus in the order of the ID (address) of the input / output device, the command, and the data checker. In the case of a write operation, ID (address),
The command, write data, and data checker are output to the downstream serial bus in this order. (2) The input / output device 3 receiving the ID (address) and command from the microcomputer from the downstream serial bus examines that the IDs match, and if they match, responds to the command. Start operation. [0020] In the case of the read operation: input and output device 3, starts to output your ID, and the downlink system serial bus 2 1 command. In addition, a read operation is performed on the input / output device to capture data. Data capture time from the input and output device 31, to complete in a few microseconds, may comprise a read data while outputting ID, and the command to the serial bus 2 2 uplink system. When the output of the ID and the command to the upstream serial bus is completed, the read data, the error flag, and the data checker are continuously output to the upstream serial bus. (Error flag:
A flag indicating whether or not a data check error has occurred when receiving data from the downstream serial bus.) In the case of a write operation: the input / output device transmits its own ID and command to the upstream serial bus. Start output. After receiving the write data and the data checker from the downstream serial bus, it confirms that there is no data error, and outputs the write data to the input / output device. When a data error occurs, no write data is output to the input / output device. After outputting the ID and command to the upstream serial bus,
Outputs write data, error flag, and data checker. (3) The microcomputer receives serial data from the input / output device from the upstream serial bus. By using a serial bus full-duplex system (four-wire system), when data exchange of 39 bits width is performed,
When the clock of the serial bus is 1 MHz, 39 × 1 μS + (39−16) × 1 μS = 62 μS where 39: Downstream bit width (39-16): Upstream bit width−Overlapping bit width with downstream system As described above, assuming that the uplink and downlink overlap bit widths are 16 bits, the read / write operation is completed in 62 μS. Second Embodiment (FIG. 5) In the method of the first embodiment, the data check is performed after all downlink data is received.
If D (address) data alone is not data checked) and the ID is garbled,
There is a response from the input / output device that the unit does not expect. " Also, depending on the location (physical) where the data corruption has occurred, it is conceivable that "there is a response from a plurality of input / output devices". Embodiment 2
Is to insert a data checker after ID data and command data in the data format of the downstream system (microcomputer unit → input / output device) so as to prevent the above-mentioned trouble or the like from occurring. As shown in FIG. 5, a data checker for the ID data and command data portion and a data checker for the write data portion are provided. As a result, "ID
"Data, command data" and "write data" can be checked independently of each other. When the input / output device receives the ID data and the command data and the ID match and the data check consistency are confirmed, the upstream system (input / output device → computer /
Unit) starts outputting response data to the serial bus. (No response if an error is found in the data check.) If the data check in the ID data and command data portions is OK and the data check error occurs in the write data portion, the input / output device is turned on. Without writing data to the output device,
Turns on the error flag during formatting and responds. In the downlink data format shown in FIG.
The command is a read operation from the microcomputer when the command is 01, a write operation from the microcomputer when 10 is the command, and invalid otherwise. The data at the time of reading is
This is dummy data. As described above, since the downstream data format as shown in FIG. 5 is used, the serial bus can be efficiently used without any problem by the protocols and access procedures as shown in FIGS. Since the present invention is configured as described above, the following effects can be obtained. (1) The serial bus is made into a 4-wire system and divided into an upstream serial bus and a downstream serial bus, and the serial bus is configured as a full-duplex system. When a read / write operation is performed on an input / output device via the bus, a bus access operation can be performed more efficiently than a two-wire serial bus. (2) By inserting a data checker after ID data and command data in the downlink data format, "ID data and command data"
And "write data" in independent data,
You can check. When the input / output device receives the ID data and the command data from the downstream serial bus output from the microcomputer unit and the ID matches and the data check is consistent, the data is output. Output of response data to the serial bus of the system can be started without any problem. If the ID is garbled data, there may be a problem such as "the computer unit has a response from an input / output device that is not expected" or a location (physical) where the garbled data occurs. There is a response. "
【図面の簡単な説明】
【図1】実施例の形態1の下り系データ・フォーマット
の構成説明図。
【図2】同、上り系データ・フォーマットの構成説明
図。
【図3】同、プロトコルの説明図。
【図4】同、アクセス手順の説明図。
【図5】実施の形態2の下り系データ・フォーマットの
構成説明図。
【図6】従来例の下り系データ・フォーマットの構成説
明図。
【図7】同、下り系データ・アクセス手順の説明図。
【図8】同、上り系データ・フォーマットの構成説明
図。
【図9】同、上り系データ・アクセス手順の説明図。
【図10】同、プロトコルの説明図。
【符号の説明】
1…マイクロコンピュータ
2…シリアル・バス
21…下り系シリアルバス
22…上り系シリアルバス
3…入出力装置
31…入出力デバイスBRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is an explanatory diagram of a configuration of a downlink data format according to a first embodiment of the present invention. FIG. 2 is a configuration explanatory diagram of the same uplink data format. FIG. 3 is an explanatory diagram of the same protocol. FIG. 4 is an explanatory diagram of an access procedure. FIG. 5 is a diagram illustrating a configuration of a downlink data format according to the second embodiment; FIG. 6 is a diagram illustrating the configuration of a conventional downlink data format. FIG. 7 is an explanatory diagram of a downlink data access procedure. FIG. 8 is an explanatory diagram of a configuration of an uplink data format. FIG. 9 is an explanatory diagram of an uplink data access procedure. FIG. 10 is an explanatory diagram of the same protocol. [Description of Reference Numerals] 1 ... microcomputer 2 ... serial bus 2 1 ... downlink system serial bus 2 2 ... up system serial bus 3 ... output device 3 1 ... input-output device
Claims (1)
データ交換をシリアル・バスで行うシリアルバスによる
データ交換方式であって、 シリアルバスをマイクロコンピュータから入出力装置側
へデータを送る下り系専用シリアル・バスと入出力装置
側からマイクロコンピュータへデータを送る上り系専用
シリアル・バスに分けて4線式とし、 入出力装置側を下り系シリアル・バスからアドレス、コ
マンドを受け取った時点で、上り系シリアル・バスへ応
答用アドレス、応答コードの出力をなし得るようにし、 入出力装置側で下り系シリアル・バスからデータを受け
取りながら同時に、上り系シリアル・バスにデータを出
力し得るようにしたシリアルバスによるデータ交換方式
において、 上り系データ・フォーマットのリード/ライトデータの
後にエラー・フラグを挿入し、 下り系データ・フォーマットのアドレスデータとコマン
ドデータの後にデータチェッカを挿入すると共に、リー
ド/ライトデータの後にデータチェッカを挿入し、「ア
ドレス・データ、コマンド・データ」と「ライト・デー
タ」をそれぞれ独立した形でデータ・チェックをなし得
るようにし、 各データ・チェックの整合性が確認された時には、上り
系シリアル・バスに対して応答データの出力を開始し、
アドレス・データ、コマンド・データ部分のデータ・チ
ェックがOKで、ライト・データ部分でデータ・チェッ
ク異常が起きた時には、上り系のデータ・フォーマット
中のエラー・フラグをONにして応答するようにした こ
とを特徴としたシリアルバスによるデータ交換方式。(1) A data exchange method using a serial bus for exchanging data between a microcomputer and each input / output device through a serial bus, wherein the serial bus is connected from the microcomputer to the input / output device side The dedicated serial bus for sending data to the microcomputer and the serial bus for sending data from the input / output device to the microcomputer are divided into 4-wire systems. at the time when the received response address to the upstream system serial bus, to give so that without the output of the response code, at the same time while receiving data from the downlink system serial bus input and output apparatus, the uplink system serial bus data exchange system based on serial bus which was obtained so that the output data
In the case of read / write data of upstream data format,
After that, an error flag is inserted, and the address data and command
Insert a data checker after the
Insert a data checker after read / write data,
Dress data, command data '' and `` write data
Data can be checked independently of each other
When the consistency of each data check is confirmed,
Start outputting response data to the serial bus
Address data and command data
Check is OK and the data check is performed in the write data part.
When an error occurs, the upstream data format
A data exchange method using a serial bus, characterized in that a response is made by turning on an internal error flag .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP23824595A JP3489287B2 (en) | 1995-09-18 | 1995-09-18 | Data exchange method by serial bus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP23824595A JP3489287B2 (en) | 1995-09-18 | 1995-09-18 | Data exchange method by serial bus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0981512A JPH0981512A (en) | 1997-03-28 |
| JP3489287B2 true JP3489287B2 (en) | 2004-01-19 |
Family
ID=17027311
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP23824595A Expired - Lifetime JP3489287B2 (en) | 1995-09-18 | 1995-09-18 | Data exchange method by serial bus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3489287B2 (en) |
-
1995
- 1995-09-18 JP JP23824595A patent/JP3489287B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0981512A (en) | 1997-03-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115878534A (en) | Serial Peripheral Interface (SPI) communication method | |
| JP3489287B2 (en) | Data exchange method by serial bus | |
| JPH0424702A (en) | Control system | |
| US5721891A (en) | Detection of N length bit serial communication stream | |
| JP2005084792A (en) | Data communication unit | |
| JPH0438618Y2 (en) | ||
| JP3695334B2 (en) | Internal communication method of communication terminal | |
| JPS59161956A (en) | Transmission controller | |
| JPH0449431A (en) | Interface circuit with testing function | |
| JP2006100950A (en) | Communications system | |
| JP2508487B2 (en) | Data transmission system | |
| JPH0241535A (en) | Data processor | |
| JP3104504B2 (en) | Address check method | |
| JPH04216237A (en) | Serial communication equipment | |
| JPH0119306B2 (en) | ||
| JPS648504B2 (en) | ||
| JPH0448018B2 (en) | ||
| JPS58190154A (en) | Data transmitter | |
| JPS5829024B2 (en) | Transmission control circuit | |
| JPH11112529A (en) | Communication control device, method and communication control system | |
| JPS581235A (en) | Transfer system for communication bus data | |
| JPS63268333A (en) | Data reception controller | |
| JPS635452A (en) | Transmission controller | |
| JPH047614A (en) | Transmission equipment | |
| JPS63250703A (en) | Machine tool information remote management device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081107 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091107 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101107 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101107 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111107 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111107 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121107 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131107 Year of fee payment: 10 |
|
| EXPY | Cancellation because of completion of term |