JPH05289990A - Method for transferring data - Google Patents

Method for transferring data

Info

Publication number
JPH05289990A
JPH05289990A JP4094003A JP9400392A JPH05289990A JP H05289990 A JPH05289990 A JP H05289990A JP 4094003 A JP4094003 A JP 4094003A JP 9400392 A JP9400392 A JP 9400392A JP H05289990 A JPH05289990 A JP H05289990A
Authority
JP
Japan
Prior art keywords
data
line
transfer
microprocessor
serial
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
JP4094003A
Other languages
Japanese (ja)
Inventor
Hiroyuki Iizuka
飯塚  裕之
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4094003A priority Critical patent/JPH05289990A/en
Publication of JPH05289990A publication Critical patent/JPH05289990A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Information Transfer Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

PURPOSE:To provide a data transfer method allowing a controller to use only an output port, a target, or an input port for a/BSY signal indicating the transmission of a data frame. CONSTITUTION:When a target 11, 12, or 13 receiving a token to itself tries to transfer a data frame, the controller 10 transits a data line 1 to a low level before outputting the succeeding token. At the time of checking the low level of the data line 1 by the output timing of the token, the controller 10 aborts the output of the token, asserts a/BSY signal and outputs a clock necessary for the transfer of the data frame to a clock line 2. The target 11, 12, or 13 informs the transfer end of the data frame to the controller 10 by holding the data line 1 at a high level. When the data line 1 is in the high level based upon the output timing of the clock, the controller 10 negates the/BSY signal and restarts the distribution of tokens.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は複数のデバイス間でデー
タフレームをシリアル転送する際のデータ転送方法に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transfer method for serially transferring a data frame between a plurality of devices.

【0002】[0002]

【従来の技術】データ転送の手法は、パラレルデータバ
スを用いたパラレル転送と、シリアルデータバスを用い
たシリアル転送に大別される。パラレル転送は高速のデ
ータ転送に向いているが、マイクロプロセッサやIC等
のデバイスのピン数の増大につながる。オーディオビデ
オ機器や家電機器で使用される1チップのマイクロプロ
セッサは、転送速度の面からシリアル転送で十分である
ため、ピン数の削減につながるシリアル転送を用いてい
る。近年、機器の高機能化に伴い、ビデオテープレコー
ダやカメラ一体型ビデオのように、1つの機器の中に複
数のマイクロプロセッサが内蔵されるようになってい
る。これらのマイクロプロセッサは独立して動作するの
ではく、互いにシリアルデータバスを用いてデータ転送
を行いながら動作している。また、マイクロプロセッサ
だけでなく、各種ICやLSIもこのシリアルデータバ
スに接続可能である。
2. Description of the Related Art Data transfer methods are roughly classified into parallel transfer using a parallel data bus and serial transfer using a serial data bus. Although parallel transfer is suitable for high-speed data transfer, it leads to an increase in the number of pins of devices such as microprocessors and ICs. A one-chip microprocessor used in audio-video equipment and household appliances uses serial transfer, which leads to a reduction in the number of pins, because serial transfer is sufficient in terms of transfer speed. 2. Description of the Related Art In recent years, as devices have become more sophisticated, a plurality of microprocessors have been built in one device, such as a video tape recorder and a camera-integrated video. These microprocessors do not operate independently, but operate while performing data transfer with each other using a serial data bus. Further, not only a microprocessor but also various ICs and LSIs can be connected to this serial data bus.

【0003】従来の機器内でのシリアル転送によるデー
タ転送方法としては、本出願人が先に出願した特願平3
−102444号「データ転送方法」がある。前記出願
ではデータラインとクロックライン以外に、データライ
ンを転送中のデータがトークンなのかデータフレームな
のかを示す制御ライン(以下、/BSYラインと称す)
を用いている。コントローラであるデバイスは、/BS
Yラインが高レベル(以下、ハイと略記する)の場合に
はバスに接続されているデバイスに順にトークンを配布
する。トークンを受信してバスの使用権を取得しデータ
フレームを出力しようとするデバイスは、/BSYライ
ンを低レベル(以下、ロウと略記する)に駆動すること
によってマスタとなり、バスを使用することを他のデバ
イスに知らせる。/BSYラインがロウに変化すればコ
ントローラはトークンの出力を停止し、データフレーム
の転送に必要なクロックを出力する。マスタはこのクロ
ックにしたがってデータフレームの転送を開始する。マ
スタはデータフレームの転送が終了すると/BSYライ
ンをハイに戻す。コントローラは/BSYラインがハイ
に遷移したことを検出し、再びトークンの配布を開始す
る。
As a conventional data transfer method by serial transfer in a device, Japanese Patent Application No.
-102444 "Data Transfer Method" is available. In the above application, in addition to the data line and the clock line, a control line (hereinafter referred to as a / BSY line) indicating whether the data being transferred through the data line is a token or a data frame.
Is used. The device that is the controller is / BS
When the Y line is at a high level (hereinafter abbreviated as high), the tokens are sequentially distributed to the devices connected to the bus. The device that receives the token, acquires the right to use the bus, and tries to output the data frame becomes the master by driving the / BSY line to a low level (hereinafter abbreviated as “low”), and uses the bus. Notify other devices. If the / BSY line changes to low, the controller stops the token output and outputs the clock required for data frame transfer. The master starts transferring the data frame according to this clock. The master returns the / BSY line high when the data frame transfer is complete. The controller detects that the / BSY line has transitioned high and begins token distribution again.

【0004】この手法によれば、転送の衝突が発生しな
いと同時に、転送に際して変調を必要とせず、かつ、任
意のパターンのデータフレームを転送できるデータ転送
方法を提供している。
According to this method, there is provided a data transfer method in which no transfer collision occurs, no modulation is required for transfer, and a data frame having an arbitrary pattern can be transferred.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記デ
ータ転送方法(特願平3−102444号)は以下の課
題を有していた。
However, the above-mentioned data transfer method (Japanese Patent Application No. 3-102444) has the following problems.

【0006】マスタとなるデバイスによって/BSYラ
インはロウに駆動され、また、全てのデバイスは/BS
Yラインをモニタする必要があるため、バスに接続され
る全てのデバイスが/BSYライン用に入出力ポートを
確保しなければならないという課題があった。
The / BSY line is driven low by the master device and all devices are / BS
Since it is necessary to monitor the Y line, there is a problem that all devices connected to the bus must reserve an input / output port for the / BSY line.

【0007】特に、コントローラ以外のデバイス(以
下、ターゲットと称す)が外部割り込みで/BSYライ
ンをモニタする場合には、/BSYライン用に外部割り
込み入力ポートと出力ポートの2つのポートが必要であ
るという課題があった。
In particular, when a device other than the controller (hereinafter referred to as a target) monitors the / BSY line with an external interrupt, two ports, an external interrupt input port and an output port, are necessary for the / BSY line. There was a problem called.

【0008】また、デバイスが外部割り込みを用いずに
シリアル受信割り込みで/BSYラインのレベルをチェ
ックする場合には、シリアル受信割り込みが発生してか
らレベルをチェックするまでの間にマスタが/BSYラ
インを操作すれば/BSYラインのレベルを誤認識する
可能性があるという課題がある。
When the device checks the level of the / BSY line by the serial reception interrupt without using the external interrupt, the master receives the / BSY line between the generation of the serial reception interrupt and the checking of the level. There is a problem that the level of the / BSY line may be erroneously recognized by operating.

【0009】この誤認識を避ける手法としては、マスタ
が1転送単位の転送が終了後一定期間以上経過してから
/BSYラインの操作を行い、マスタ以外のデバイスは
シリアル受信割り込み発生後一定期間以内に/BSYラ
インをチェックするという手法が考えられる。すなわ
ち、/BSYラインの操作タイミングを規定することに
よって、/BSYラインの誤認識を避ける。しかしなが
ら、この手法は一定期間以内に/BSYラインをチェッ
クする必要性から、他の割り込み処理実行中でもシリア
ル受信割り込みを受け付けなければならない。また、/
BSYラインの操作タイミングを決定するためにハード
ウェアタイマもしくはソフトウェアタイマが必要とな
る。以上のように/BSYラインの操作タイミングを規
定することによって誤認識を防ぐ手法はシステム設計上
の制限事項が多くなるという課題があった。
As a method for avoiding this erroneous recognition, the master operates the / BSY line after a certain period of time has passed after the transfer of one transfer unit is completed, and devices other than the master are within a certain period after the serial reception interrupt is generated. A possible method is to check the / BSY line. That is, erroneous recognition of the / BSY line is avoided by defining the operation timing of the / BSY line. However, since this method requires checking the / BSY line within a fixed period, the serial reception interrupt must be accepted even during execution of other interrupt processing. Also,/
A hardware timer or a software timer is required to determine the operation timing of the BSY line. As described above, the method of preventing erroneous recognition by defining the operation timing of the / BSY line has a problem that there are many restrictions in system design.

【0010】本発明は上記従来の課題を解決するもの
で、コントローラは/BSYライン用に出力ポートを使
用し、ターゲットは/BSYライン用に入力ポートを使
用し、また、/BSYラインを外部割り込みポートでモ
ニタする場合でも出力ポートを必要とせず、シリアル受
信割り込みで/BSYラインをモニタする場合でも上述
した制限事項の無いデータ転送方法を実現することを目
的としている。
The present invention solves the above-mentioned conventional problems. The controller uses an output port for the / BSY line, the target uses an input port for the / BSY line, and the / BSY line is interrupted by an external interrupt. An object of the present invention is to realize a data transfer method that does not require an output port even when monitoring with a port and does not have the above-mentioned restrictions even when the / BSY line is monitored with a serial reception interrupt.

【0011】[0011]

【課題を解決するための手段】この目的を達成するため
に本発明のデータ転送方法は、コントローラは予め定め
られた検出タイミングでデータラインのレベル検出を行
い、検出タイミングでデータラインが高レベルであれば
次回の検出タイミングまで制御ラインを偽のレベルに保
つと共にトークンを送信し、検出タイミングでデータラ
インが低レベルであれば、次回の検出タイミングまで制
御ラインを真のレベルに保つと共にクロックラインに1
転送単位分の転送用クロックを出力する。一方、ターゲ
ットは、自分自身宛てのトークンを受信してデータフレ
ームの転送を開始する場合には、データフレームを構成
する各データの転送が完了するまでの間は、次の検出タ
イミングまでにデータラインを低レベルに遷移させると
共に、コントローラが出力する転送用クロックに同期し
てデータラインを用いてデータフレームの転送を行う。
In order to achieve this object, in the data transfer method of the present invention, the controller detects the level of the data line at a predetermined detection timing, and the data line is detected at a high level at the detection timing. If so, the control line is kept at the false level and the token is transmitted until the next detection timing, and if the data line is at the low level at the detection timing, the control line is kept at the true level until the next detection timing and the clock line is changed to the clock line. 1
The transfer clock for the transfer unit is output. On the other hand, when the target receives the token addressed to itself and starts the transfer of the data frame, it waits until the next detection timing until the transfer of each data forming the data frame is completed. Is changed to a low level, and the data frame is transferred using the data line in synchronization with the transfer clock output from the controller.

【0012】[0012]

【作用】本発明は上記した方法により、トークンを取得
したターゲットがマスタとなってデータフレームの転送
を行う場合には、データフレームの転送を行っている間
はコントローラがデータラインのレベルを検出するまで
にデータラインに低レベルを出力する。コントローラは
検出タイミングでデータラインが低レベルであればトー
クンの送信は行わず1転送単位分のデータフレームの転
送に必要なクロックをクロックラインに出力する。マス
タとなったターゲットはこのクロックを利用してデータ
フレームの転送を行う。
According to the present invention, when the target that has obtained the token serves as a master to transfer the data frame by the above-described method, the controller detects the level of the data line during the transfer of the data frame. Output a low level on the data line. If the data line is at the low level at the detection timing, the controller does not transmit the token and outputs the clock necessary for the transfer of the data frame of one transfer unit to the clock line. The target that has become the master uses this clock to transfer data frames.

【0013】[0013]

【実施例】以下、本発明の一実施例について、図面を参
照しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0014】図1は本発明の一実施例のデータ転送方法
を用いてデータ転送を行うシステムのブロック図を示す
ものである。図1において、マイクロプロセッサ10,
11,12,13は1チップのマイクロプロセッサであ
り、データライン1,クロックライン2,/BSYライ
ン3の3つの信号線からなるバスを介して互いに接続さ
れている。データライン1はシリアルデータを転送する
ための信号線で、各マイクロプロセッサのデータ入力ポ
ート16とデータ出力ポート17に共通に接続されてい
る。データ出力ポート17は複数のマイクロプロセッサ
が同時に信号線を駆動しても良いように、オープンドレ
イン形式の出力ポートである。マイクロプロセッサ10
はクロックライン2にシリアルデータの入出力用のクロ
ックをクロック出力ポート18から出力し、他のマイク
ロプロセッサはクロック入力ポート15でこのクロック
を受け取る。/BSYライン3は/BSY信号用の信号
線である。この信号は負論理の信号でデータフレームの
転送を開始するマイクロプロセッサの依頼によってマイ
クロプロセッサ10が出力する。/BSY信号がハイの
場合には何れのマイクロプロセッサもデータフレームの
転送を行っていない。また、/BSY信号がロウの場合
にはマイクロプロセッサ間でデータフレームの転送が行
われている。マイクロプロセッサ11,マイクロプロセ
ッサ12,マイクロプロセッサ13は/BSY信号を入
力とする。
FIG. 1 is a block diagram of a system for performing data transfer using the data transfer method according to an embodiment of the present invention. In FIG. 1, a microprocessor 10,
Reference numerals 11, 12, and 13 are one-chip microprocessors, which are connected to each other via a bus composed of three signal lines: a data line 1, a clock line 2, and a / BSY line 3. The data line 1 is a signal line for transferring serial data, and is commonly connected to the data input port 16 and the data output port 17 of each microprocessor. The data output port 17 is an open drain type output port so that a plurality of microprocessors may simultaneously drive the signal lines. Microprocessor 10
Outputs a clock for inputting / outputting serial data to the clock line 2 from the clock output port 18, and the other microprocessor receives this clock at the clock input port 15. The / BSY line 3 is a signal line for the / BSY signal. This signal is a negative logic signal and is output by the microprocessor 10 at the request of the microprocessor which starts the transfer of the data frame. If the / BSY signal is high, no microprocessor is transferring data frames. When the / BSY signal is low, data frames are being transferred between the microprocessors. The / BSY signal is input to the microprocessor 11, the microprocessor 12, and the microprocessor 13.

【0015】以上のように構成されたシステムで、本発
明のデータ転送方法を実施する場合の動作例について、
以下説明する。
Regarding the operation example when the data transfer method of the present invention is implemented in the system configured as described above,
This will be described below.

【0016】まず、図2を用いてシリアルデータとクロ
ックのタイミングに関して説明する。図2はデータライ
ン1とクロックライン2の信号を示すタイミング図であ
る。図2(a)に示すように、データライン1上を転送
されるシリアルデータはクロックの立ち下がりで出力さ
れる。シリアルデータを取り込む場合はクロックの立ち
上がりで取り込む。クロックの周期はTaである。転送
は8ビット単位で間欠的に行う。8ビットデータの転送
に必要な8個のクロックをバイトクロックと定義する。
図2(b)に示すように、バイトクロックはTbの周期
で間欠的に出力される。
First, the timing of serial data and clock will be described with reference to FIG. FIG. 2 is a timing diagram showing signals on the data line 1 and the clock line 2. As shown in FIG. 2A, the serial data transferred on the data line 1 is output at the falling edge of the clock. When capturing serial data, capture at the rising edge of the clock. The clock cycle is Ta. Transfer is performed intermittently in 8-bit units. Eight clocks required for transfer of 8-bit data are defined as byte clocks.
As shown in FIG. 2B, the byte clock is output intermittently at a cycle of Tb.

【0017】多くの1チップのマイクロプロセッサは8
ビット単位でデータをシリアル転送する機能をハードウ
ェアで実現している。ここでは、このハードウェアをシ
フトバッファと呼ぶことにする。シフトバッファはシフ
トレジスタ及び周辺回路からなり、マイクロプロセッサ
の外部から供給されたクロック(以降、外部クロックと
称す)もしくはマイクロプロセッサの内部で発生したク
ロック(以降、内部クロックと称す)でデータの入力や
出力を行う。シリアルデータを出力する場合にはクロッ
クの立ち下がりでMSBから順に出力し、シリアルデー
タを入力する場合にはクロックの立ち上がりでMSBか
ら順に取り込む。
Many 1-chip microprocessors have 8
The hardware implements the function of serially transferring data bit by bit. Here, this hardware is called a shift buffer. The shift buffer is composed of a shift register and peripheral circuits, and is used for inputting data using a clock supplied from outside the microprocessor (hereinafter referred to as an external clock) or a clock generated inside the microprocessor (hereinafter referred to as an internal clock). Output. When serial data is output, MSB is sequentially output at the falling edge of the clock, and when serial data is input, MSB is sequentially input at the rising edge of the clock.

【0018】シフトバッファから出力されるシリアルデ
ータの出力ポートがデータ出力ポート17であり、シフ
トバッファへ入力されるシリアルデータの入力ポートが
データ入力ポート16である。シフトバッファのクロッ
ク用のポートは入力と出力が独立していなくて、クロッ
ク入出力ポートがあるのみである。このポートは、シフ
トバッファが内部クロックでデータの転送を行う場合に
は出力ポートとして機能し、外部クロックでデータの転
送を行う場合には入力ポートとして機能する。マイクロ
プロセッサ10はクロックを出力する必要があるため、
内部クロックで動作し、他のマイクロプロセッサは外部
クロックで動作する。従って、クロック入出力ポート
は、マイクロプロセッサ10ではクロック出力ポート1
8として機能し、他のマイクロプロセッサではクロック
入力ポート15として機能する。
The output port of serial data output from the shift buffer is the data output port 17, and the input port of serial data input to the shift buffer is the data input port 16. The clock port of the shift buffer does not have independent input and output, only a clock input / output port. This port functions as an output port when the shift buffer transfers data with an internal clock, and as an input port when it transfers data with an external clock. Since the microprocessor 10 needs to output a clock,
It operates on an internal clock and the other microprocessors operate on an external clock. Therefore, the clock input / output port is the clock output port 1 in the microprocessor 10.
8 and as a clock input port 15 in other microprocessors.

【0019】次に、本実施例で使用する用語について説
明する。 「マスタ」:バスの使用権を取得し、データフレームの
転送を開始するマイクロプロセッサをマスタと呼ぶ。マ
イクロプロセッサ10,11,12,13は何れもマス
タになることができるが、複数のマイクロプロセッサが
同時にマスタになることはない。
Next, terms used in this embodiment will be described. “Master”: A microprocessor that acquires the bus usage right and starts transferring a data frame is called a master. Any of the microprocessors 10, 11, 12, and 13 can be a master, but a plurality of microprocessors cannot be masters at the same time.

【0020】「スレーブ」:マスタからデータフレーム
の転送相手として指定されたマイクロプロセッサをスレ
ーブという。データフレームの転送はマスタからスレー
ブに対して行われる。マスタが複数のマイクロプロセッ
サにデータフレームを転送する場合(同報通信)には、
複数のスレーブが存在する。/BSY信号がハイの場合
にはシステム内にマスタ、スレーブ共に存在しない。
"Slave": A microprocessor designated by a master as a data frame transfer partner is called a slave. The data frame is transferred from the master to the slave. When the master transfers data frames to multiple microprocessors (broadcast),
There are multiple slaves. If the / BSY signal is high, there is no master or slave in the system.

【0021】「コントローラ」:バスに接続されたマイ
クロプロセッサの内、クロックを出力するマイクロプロ
セッサをコントローラと呼ぶ。コントローラはシステム
内で1つだけ存在する。図1のシステムではマイクロプ
ロセッサ10がコントローラである。コントローラは後
述するトークンの出力も行う。
"Controller": Among the microprocessors connected to the bus, the microprocessor that outputs a clock is called a controller. There is only one controller in the system. In the system of FIG. 1, the microprocessor 10 is the controller. The controller also outputs the token described later.

【0022】「ターゲット」:バスに接続されたマイク
ロプロセッサで、コントローラ以外のマイクロプロセッ
サをターゲットと呼ぶ。図1ではマイクロプロセッサ1
1,マイクロプロセッサ12,マイクロプロセッサ13
がターゲットである。
"Target": A microprocessor connected to the bus, and a microprocessor other than the controller is called a target. In FIG. 1, the microprocessor 1
1, microprocessor 12, microprocessor 13
Is the target.

【0023】「トークン」:バスの使用権を調停するた
めにコントローラが出力する1バイトのデータである。
トークンを受け取ったマイクロプロセッサはバスを使用
してデータフレームを出力する権利、すなわち、マスタ
になる権利を有する。
"Token": 1-byte data output by the controller to arbitrate the right to use the bus.
The microprocessor that receives the token has the right to output a data frame using the bus, ie to become the master.

【0024】「データフレーム」:データ転送の最小単
位をデータフレームという。データフレームはヘッダ、
ユーザーデータ、チェックバイト、受信応答データから
なる。
"Data frame": The minimum unit of data transfer is called a data frame. Data frame is header,
It consists of user data, check bytes, and reception response data.

【0025】次に、トークンのフォーマットに関して図
3を用いて説明する。図3はトークンのフォーマット図
である。トークンは1バイトで構成されコントローラで
あるマイクロプロセッサ10によって出力される。bit6
〜bit4のADRはトークンの行き先アドレスであり、ト
ークンの行き先のマイクロプロセッサのアドレスを記述
する。バスに接続された各マイクロプロセッサにはそれ
ぞれ固有のアドレス(0〜7)が割り当てられている。
このアドレスの割り当てを(表1)に示す。
Next, the format of the token will be described with reference to FIG. FIG. 3 is a format diagram of a token. The token is composed of 1 byte and is output by the microprocessor 10, which is a controller. bit6
~ ADR of bit4 is the destination address of the token, and describes the address of the destination microprocessor of the token. A unique address (0 to 7) is assigned to each microprocessor connected to the bus.
The allocation of this address is shown in (Table 1).

【0026】[0026]

【表1】 [Table 1]

【0027】(表1)に示したように、0〜7のアドレ
スの内で実際に使用しているのは0〜3の4種類である
が、このバスには最大で8個のマイクロプロセッサを接
続することが可能である。bit3,bit2,bit1,LSBはフ
ォーマットナンバー(FMT)を記録する。フォーマッ
トナンバーによって後述するデータフレームのフォーマ
ットが異なる。ここでは、フォーマットナンバーは「0
000(2進表示)」とする。
As shown in (Table 1), four kinds of addresses 0 to 3 are actually used among addresses 0 to 7, but a maximum of eight microprocessors are provided on this bus. It is possible to connect. Format number (FMT) is recorded in bit3, bit2, bit1, and LSB. The format of the data frame described later differs depending on the format number. Here, the format number is "0
000 (binary display) ".

【0028】次に、図4を用いてデータフレームのフォ
ーマットを説明する。図4はデータフレームのフォーマ
ット図である。データフレームはアドレスデータ60,
コントロールデータ61,ユーザーデータ62,誤り検
出コード(チェックバイト)63,受信応答データ64
からなる。マスタがアドレスデータ60,コントロール
データ61,ユーザーデータ62,誤り検出コード63
の出力を完了すると、次のバイトクロックでスレーブが
1バイトの受信応答データ64を出力する。
Next, the format of the data frame will be described with reference to FIG. FIG. 4 is a format diagram of a data frame. The data frame is address data 60,
Control data 61, user data 62, error detection code (check byte) 63, reception response data 64
Consists of. The master has address data 60, control data 61, user data 62, error detection code 63.
When the output of is completed, the slave outputs 1-byte reception response data 64 at the next byte clock.

【0029】アドレスデータ60はスレーブを指定する
ためのデータである。アドレスデータはビットアサイン
されており、各ビットが1つのマイクロプロセッサに対
応している。アドレスデータのビットパターンとスレー
ブとなるマイクロプロセッサの対応を(表2)に示す。
The address data 60 is data for designating a slave. The address data is bit-assigned, and each bit corresponds to one microprocessor. The correspondence between the bit pattern of the address data and the slave microprocessor is shown in (Table 2).

【0030】[0030]

【表2】 [Table 2]

【0031】(表2)において、×は「1」でも「0」
でもかまわない。アドレスがN(N=0〜7)のマイク
ロプロセッサのアドレスビットはアドレスデータ60の
bitNとなっている。従って、マスタとなったマイクロ
プロセッサはスレーブとなるデバイスを選択的に指定す
ることができる。すなわち、マスタとなったマイクロプ
ロセッサは、スレーブとして指定するマイクロプロセッ
サのアドレスビットを真(1)とし、スレーブとして指
定しないマイクロプロセッサのアドレスビットを偽
(0)としたアドレスデータ60を出力すれば良い。例
えば、マイクロプロセッサ11がマイクロプロセッサ1
2とマイクロプロセッサ13にデータフレームを送る場
合にはアドレスデータ60を「00001100(2進
表示)」とすればよい。この際に、マスタ自身のアドレ
スを示すビットは「0」に設定する。マスタ以外のマイ
クロプロセッサは/BSY信号がアサートされた後で最
初に受信した8ビットデータをアドレスデータとして検
出し、自分自身のアドレスビットが真(1)の場合には
スレーブとして指定されたことを認識し、データフレー
ムの受信を行う。
In Table 2, x is "1" or "0".
But it doesn't matter. The address bit of the microprocessor whose address is N (N = 0 to 7) is
It is bit N. Therefore, the master microprocessor can selectively designate the slave device. That is, the master microprocessor may output address data 60 in which the address bit of the microprocessor designated as the slave is true (1) and the address bit of the microprocessor not designated as the slave is false (0). .. For example, the microprocessor 11 is the microprocessor 1
2 and the microprocessor 13 to send a data frame, the address data 60 may be "00001100 (binary display)". At this time, the bit indicating the address of the master itself is set to "0". The microprocessor other than the master detects the first 8-bit data received as the address data after the / BSY signal is asserted, and if the address bit of its own is true (1), it is designated as the slave. Recognize and receive the data frame.

【0032】コントロールデータ61のMSB,bit6,bit
5,bit4の4ビットはユーザーデータ62の「(バイト
数)−1」を示す。「0000〜1111(2進表
示)」のパターンが可能であるため、ユーザーデータ6
2のバイト数は1〜16の任意の値をとることができ
る。スレーブとなったマイクロプロセッサはこの値を用
いてデータフレーム全体のバイト数を得、データフレー
ムを受信した後に後述する受信応答データ64を出力す
る。コントロールデータ61のbit3でユーザーデータ6
2の内容がコマンドかデータかを示す。このビットが
「0」の場合には、ユーザーデータ62はデータであ
り、「1」の場合には、ユーザーデータ62はコマンド
である。コントロールデータ61のbit2,bit1,LSBは
マスタアドレスであり、マスタになったマイクロプロセ
ッサのアドレスが(表1)と同様のルールで記載され
る。
MSB, bit6, bit of control data 61
The 4 bits of 5 and bit 4 indicate “(byte number) −1” of the user data 62. Since the pattern "0000-1111 (binary display)" is possible, the user data 6
The number of bytes of 2 can take any value of 1 to 16. The slave microprocessor uses this value to obtain the number of bytes in the entire data frame, and after receiving the data frame, outputs the reception response data 64 described later. User data 6 with bit 3 of control data 61
Indicates whether the content of 2 is a command or data. When this bit is "0", the user data 62 is data, and when this bit is "1", the user data 62 is a command. Bit 2, bit 1, and LSB of the control data 61 are master addresses, and the address of the master microprocessor is described in the same rule as (Table 1).

【0033】ユーザーデータ62は、実際にマスタから
スレーブに送られるデータやコマンドである。
The user data 62 is data or commands actually sent from the master to the slave.

【0034】1バイトの誤り検出コード63はエラーチ
ェック用のバイトで、データフレームの先頭バイト(ア
ドレスデータ60)からユーザーデータの最終バイトま
での各ビット毎の奇数パリティが記録される。マスタは
データフレームの先頭からバイト単位で排他的論理和演
算を行い、結果を反転して誤り検出コード63を作成す
る。一方、データフレームを受信したマイクロプロセッ
サは、データフレームの先頭からチェックバイトまでを
バイト単位で排他的論理和演算を行い、結果がFFh
(16進表示)となればエラー無しで受信できたことが
確認できる。
The 1-byte error detection code 63 is a byte for error check, and the odd parity for each bit from the first byte (address data 60) of the data frame to the last byte of the user data is recorded. The master performs an exclusive OR operation in byte units from the beginning of the data frame and inverts the result to create the error detection code 63. On the other hand, the microprocessor that has received the data frame performs an exclusive OR operation in byte units from the beginning of the data frame to the check byte, and the result is FFh.
If it is (hexadecimal display), it can be confirmed that it was possible to receive without error.

【0035】アドレスデータ60,コントロールデータ
61,ユーザーデータ62,誤り検出コード63はマス
タが出力するが、受信応答データ64はスレーブが出力
する。受信応答データ64は1バイトからなる。受信応
答データ64を構成するビットは各々が、1つのマイク
ロプロセッサの受信応答ビットに割り当てられている。
アドレスがN(N=0〜7)のマイクロプロセッサの受
信応答ビットは受信応答データ64のbitNとなってい
る。データフレームを受信したスレーブは誤り検出コー
ド63を用いてデータエラーの有無を検出し、エラーが
無い場合には自分の受信応答ビットのみをロウとした受
信応答データ64をデータライン1に出力する。
The master outputs the address data 60, the control data 61, the user data 62, and the error detection code 63, while the reception response data 64 is output by the slave. The reception response data 64 consists of 1 byte. The bits forming the reception response data 64 are each assigned to the reception response bits of one microprocessor.
The reception response bit of the microprocessor whose address is N (N = 0 to 7) is the bit N of the reception response data 64. The slave that has received the data frame detects the presence or absence of a data error using the error detection code 63, and if there is no error, outputs the reception response data 64 in which only its own reception response bit is set to low on the data line 1.

【0036】各マイクロプロセッサの受信応答データ6
4を(表3)に示す。
Reception response data 6 of each microprocessor
4 is shown in (Table 3).

【0037】[0037]

【表3】 [Table 3]

【0038】(表3)では「0」がデータライン上での
ハイを示し、「1」がロウを示している。データライン
1はワイヤードオア接続されているため、複数のスレー
ブが受信応答データを出力する場合には、論理和演算さ
れた結果がマスタへ送られる。
In Table 3, "0" indicates high on the data line and "1" indicates low. Since the data line 1 is wired-OR connected, when a plurality of slaves output the reception response data, the result of the logical sum operation is sent to the master.

【0039】次に、データフレームの転送に先だって行
われるトークンの配布に関して説明する。
Next, the distribution of tokens performed prior to the transfer of data frames will be described.

【0040】図5はマイクロプロセッサ10が行うトー
クンの配布の様子を示したタイミング図である。トーク
ン30,トークン31,トークン32,トークン33は
それぞれマイクロプロセッサ10,11,12,13に
対するトークンである。マイクロプロセッサ10は、何
れのマイクロプロセッサもデータフレームの転送を行わ
ない場合、Tbの時間間隔で全てのマイクロプロセッサ
に対して順にトークンを配布する。例えば、マイクロプ
ロセッサ12にトークンを送る場合には、マイクロプロ
セッサ10は「10100000(2進表示)」のトー
クンをデータライン1上に出力する。
FIG. 5 is a timing chart showing how tokens are distributed by the microprocessor 10. The token 30, token 31, token 32, and token 33 are tokens for the microprocessors 10, 11, 12, and 13, respectively. When none of the microprocessors transfers the data frame, the microprocessor 10 sequentially distributes the tokens to all the microprocessors at the time interval of Tb. For example, when sending a token to the microprocessor 12, the microprocessor 10 outputs the token of “10100000 (binary display)” on the data line 1.

【0041】各マイクロプロセッサは、自分宛てのトー
クンを受信した場合、マスタとなってデータフレームの
転送を行う権利を有する。ターゲットがデータフレーム
の転送を行う場合、自分宛てのトークンを受信してから
コントローラがデータライン1のレベルをチェックする
までにデータライン1をロウに遷移させる。
Each microprocessor has the right to become a master and transfer a data frame when it receives a token addressed to itself. When the target transfers the data frame, the data line 1 is transited to low before the controller checks the level of the data line 1 after receiving the token addressed to itself.

【0042】図5では全てのターゲット(マイクロプロ
セッサ11,マイクロプロセッサ12,マイクロプロセ
ッサ13)がデータラインをハイに保ったままであり、
かつコントローラ(マイクロプロセッサ10)もデータ
フレームの転送を行っていない。マイクロプロセッサ1
0は各マイクロプロセッサに順次トークンを出力した結
果、何れのマイクロプロセッサもデータフレームの転送
を行わなかった場合、その段階でトークンの出力を停止
する。コントローラも含めて、いずれのマイクロプロセ
ッサもマスタにならない場合には各マイクロプロセッサ
へのトークンの出力は一定間隔(Tc)で行われる。
In FIG. 5, all targets (microprocessor 11, microprocessor 12, microprocessor 13) keep the data line high,
Moreover, the controller (microprocessor 10) is not transferring the data frame either. Microprocessor 1
As a result of 0, the tokens are sequentially output to each microprocessor. As a result, if none of the microprocessors transfers the data frame, the token output is stopped at that stage. When none of the microprocessors including the controller becomes the master, the tokens are output to the respective microprocessors at regular intervals (Tc).

【0043】次に、トークンを受信したターゲットであ
るマイクロプロセッサがデータフレームの転送を行う場
合の動作について、図6,図7,図8を用いて説明す
る。
Next, the operation when the microprocessor, which is the target receiving the token, transfers the data frame will be described with reference to FIGS. 6, 7 and 8.

【0044】図6はマイクロプロセッサ12がマスタと
なって、スレーブであるマイクロプロセッサ11との間
でデータフレームの転送を行う際のタイミング図であ
る。図6において、100は/BSYライン3の信号レ
ベルを示している。101はマイクロプロセッサ10が
出力するバイトクロックを示している。102,10
3,104,105はそれぞれマイクロプロセッサ1
0,マイクロプロセッサ11,マイクロプロセッサ1
2,マイクロプロセッサ13がデータライン上に出力す
る信号を示している。各マイクロプロセッサのデータ出
力はデータライン1に接続されているため、データライ
ン1上でワイヤードアンドされ、結果として106に示
す信号がデータライン1上を流れる。107はマイクロ
プロセッサ10がデータライン1のレベル検出を行う検
出タイミングを示している。107上の矢印で示した時
刻が検出タイミングである。マイクロプロセッサ10は
時間間隔Tbでタイマ割り込みを発生させ、タイマ割り
込みの処理ルーチン(以下、タイマ割り込み処理と称
す)内でデータライン1のレベル検出を行う。
FIG. 6 is a timing chart when the microprocessor 12 serves as a master and transfers a data frame with the slave microprocessor 11. In FIG. 6, 100 indicates the signal level of the / BSY line 3. Reference numeral 101 denotes a byte clock output by the microprocessor 10. 102,10
3, 104 and 105 are microprocessors 1 respectively
0, microprocessor 11, microprocessor 1
2, the signal output from the microprocessor 13 on the data line is shown. Since the data output of each microprocessor is connected to the data line 1, it is wired-and-on the data line 1 and, as a result, the signal shown at 106 flows on the data line 1. Reference numeral 107 indicates a detection timing at which the microprocessor 10 detects the level of the data line 1. The time indicated by the arrow on 107 is the detection timing. The microprocessor 10 generates a timer interrupt at a time interval Tb, and detects the level of the data line 1 in a timer interrupt processing routine (hereinafter referred to as timer interrupt processing).

【0045】図7はマイクロプロセッサ10が行うタイ
マ割込処理の概略フローチャートである。マイクロプロ
セッサ10はマスタでもスレーブでもない場合には図7
に示したフローチャートに従った動作を行う。図6の時
刻t2,t4,t6,・・・,t14でステップ200
が実行される。
FIG. 7 is a schematic flowchart of the timer interrupt processing performed by the microprocessor 10. If the microprocessor 10 is neither a master nor a slave, FIG.
The operation according to the flowchart shown in is performed. At time t2, t4, t6, ..., T14 in FIG.
Is executed.

【0046】図8はターゲットが行うシリアル転送割り
込みの処理ルーチン(以下、シリアル割り込み処理と称
す)の概略フローチャートである。ターゲットは1バイ
トの送信もしくは受信を行ったときにシリアル転送割り
込み(以下、シリアル割り込み称す)を発生させ、図8
に示した動作を行う。図6の時刻t1,t3,t5,・
・・,t15でターゲットはシリアル割り込みが発生し
図8で示したシリアル割り込み処理を開始する。
FIG. 8 is a schematic flowchart of a serial transfer interrupt processing routine (hereinafter referred to as serial interrupt processing) performed by the target. The target generates a serial transfer interrupt (hereinafter referred to as a serial interrupt) when transmitting or receiving 1 byte, and
The operation shown in is performed. Times t1, t3, t5, ...
.. At t15, the target generates a serial interrupt and starts the serial interrupt processing shown in FIG.

【0047】まず、マイクロプロセッサ10はマイクロ
プロセッサ11に対してトークン31を出力すると、時
刻t1でマイクロプロセッサ11とマイクロプロセッサ
12とマイクロプロセッサ13はシリアル割り込みを発
生し、図8で示したシリアル割り込み処理を開始する。
マイクロプロセッサ11はトークン受信後ステップ22
0で/BSYライン3のレベルをチェックする。/BS
Yライン3はハイであるのでステップ221で自分宛て
のトークンであるトークン31を受信したことを検出す
るが、転送すべきデータフレームが無いため、ステップ
222を実行した後シリアル割り込み処理を終了する。
マイクロプロセッサ12,マイクロプロセッサ13も同
様にステップ220で/BSYライン3のレベルがハイ
であると検出するが、自分宛てのトークンではないため
にステップ221を実行してシリアル割り込み処理を終
了する。
First, when the microprocessor 10 outputs the token 31 to the microprocessor 11, the microprocessor 11, the microprocessor 12, and the microprocessor 13 generate a serial interrupt at time t1, and the serial interrupt processing shown in FIG. To start.
After receiving the token, the microprocessor 11 proceeds to step 22.
At 0 / BSY Check line 3 level. / BS
Since the Y line 3 is high, it is detected in step 221 that the token 31, which is the token addressed to itself, is received. However, since there is no data frame to be transferred, step 222 is executed and the serial interrupt processing is terminated.
Similarly, the microprocessor 12 and the microprocessor 13 also detect in step 220 that the level of the / BSY line 3 is high, but since it is not a token addressed to itself, step 221 is executed and the serial interrupt processing ends.

【0048】時刻t2でマイクロプロセッサ10はステ
ップ200でデータライン1のレベルを検出する。デー
タライン1はハイであるため、ステップ201で引き続
き/BSYライン3をハイに保ち、ステップ202でト
ークン32を出力する。
At time t2, the microprocessor 10 detects the level of the data line 1 in step 200. Since data line 1 is high, / BSY line 3 is kept high at step 201 and token 32 is output at step 202.

【0049】時刻t3でターゲットはシリアル割り込み
を発生させる。マイクロプロセッサ11とマイクロプロ
セッサ13はステップ220,221を実行するだけで
シリアル割り込み処理を終了する。これに対し、マイク
ロプロセッサ12はトークン32を受信しているため、
ステップ220,221を実行した後ステップ222を
実行する。マイクロプロセッサ12はマイクロプロセッ
サ11に対してデータフレームの転送を行うためにステ
ップ223でデータライン1上にロウを出力する。さら
に、ステップ224でシフトバッファにデータフレーム
の先頭バイトであるアドレスデータ60を書き込むこと
によって1バイトの転送準備を完了する。このアドレス
データ60の値は「00000010(2進表示)」で
あり、データフレームをアドレス値が1であるマイクロ
プロセッサ11へ送信することを示している。
At time t3, the target generates a serial interrupt. The microprocessor 11 and the microprocessor 13 only execute steps 220 and 221 to end the serial interrupt processing. On the other hand, since the microprocessor 12 receives the token 32,
After executing steps 220 and 221, step 222 is executed. Microprocessor 12 outputs a row on data line 1 in step 223 to transfer the data frame to microprocessor 11. Further, in step 224, the address data 60, which is the first byte of the data frame, is written in the shift buffer to complete the 1-byte transfer preparation. The value of the address data 60 is “00000010 (binary display)”, which indicates that the data frame is transmitted to the microprocessor 11 having the address value of 1.

【0050】時刻t4でマイクロプロセッサ10はデー
タライン1のレベルがロウであることを検出し(ステッ
プ200)、ステップ204で/BSYライン3をロウ
に遷移させる。その後ステップ203でバイトクロック
を出力する。このバイトクロックでマイクロプロセッサ
12のシフトバッファ内のアドレスデータ60がデータ
ライン1上に出力される。
At time t4, the microprocessor 10 detects that the level of the data line 1 is low (step 200), and makes the / BSY line 3 low at step 204. Then, in step 203, the byte clock is output. With this byte clock, the address data 60 in the shift buffer of the microprocessor 12 is output onto the data line 1.

【0051】時刻t5から開始されるシリアル割り込み
処理で、マイクロプロセッサ11とマイクロプロセッサ
13は/BSYライン3がロウであることを検出し(ス
テップ220)、自分はマスタではないので(ステップ
225)ステップ227を実行することになる。ステッ
プ227では、このシリアル割り込みが/BSYライン
3の立ち下がり後最初のシリアル割り込みであるため、
シフトバッファ内に受信しているデータフレームがアド
レスデータ60であると判断する。マイクロプロセッサ
11はアドレスデータ60のbit1が1であるためスレ
ーブとして指定されたと認識しステップ228へ進む
が、マイクロプロセッサ13はアドレスデータ60のbi
t3が0であるためスレーブとして指定されなかったと
認識しシリアル割り込み処理を終了する。ステップ22
8でマイクロプロセッサ11はアドレスデータ60を内
部のRAM領域に用意した受信バッファに書き込んでお
く。一方、マイクロプロセッサ12は時刻t5に開始さ
れるシリアル割り込み処理で、/BSYライン3がロウ
であることを認識し(ステップ220)、自分自身がマ
スタであるため(ステップ225)、ステップ226を
実行する。マイクロプロセッサ12はまだデータフレー
ムの転送を終了していないので、ステップ223,22
4を実行してコントロールデータ61をシフトバッファ
に書き込んでおく。マイクロプロセッサ12は時刻t5
と同様の処理を時刻t7,t9のシリアル割り込み処理
でも行う。
In the serial interrupt processing started from time t5, the microprocessor 11 and the microprocessor 13 detect that the / BSY line 3 is low (step 220), and since they are not masters (step 225), 227 will be executed. In step 227, since this serial interrupt is the first serial interrupt after the falling edge of / BSY line 3,
It is determined that the data frame received in the shift buffer is the address data 60. The microprocessor 11 recognizes that the address data 60 has been designated as a slave because bit 1 of the address data 60 is 1, and proceeds to step 228.
Since t3 is 0, it is recognized that the slave has not been designated, and the serial interrupt process ends. Step 22
At 8, the microprocessor 11 writes the address data 60 in the receive buffer prepared in the internal RAM area. On the other hand, the microprocessor 12 recognizes that the / BSY line 3 is low in the serial interrupt process started at time t5 (step 220) and executes the step 226 because it is the master itself (step 225). To do. Since the microprocessor 12 has not finished transferring the data frame yet, steps 223 and 22 are executed.
4 is executed to write the control data 61 in the shift buffer. Microprocessor 12 has time t5
The same processing is also performed in the serial interrupt processing at times t7 and t9.

【0052】時刻t6でマイクロプロセッサ10はデー
タライン1のレベルがロウであることを検出し(ステッ
プ200)、ステップ204で/BSYライン3をロウ
を出力し、その後ステップ203でバイトクロックを出
力する。これと同じ動作をマイクロプロセッサ10は時
刻t8,t10,t12で行う。
At time t6, the microprocessor 10 detects that the level of the data line 1 is low (step 200), the / BSY line 3 is output low in step 204, and then the byte clock is output in step 203. .. The microprocessor 10 performs the same operation at times t8, t10, and t12.

【0053】時刻t7から開始されるシリアル割り込み
処理で、マイクロプロセッサ11とマイクロプロセッサ
13は時刻t5と同様のステップを経て、ステップ22
7を実行する。前回のステップ227実行時にマイクロ
プロセッサ11は自分自身がスレーブに指定されている
ことを認識しているため、ステップ228へ進み、受信
したデータを受信バッファに書き込んでおく。マイクロ
プロセッサ11は同様の処理を時刻t9でも行う。マイ
クロプロセッサ13は前回のステップ227実行時に自
分自身がスレーブに指定されなかったことを認識してい
るため、受信したデータを読み出すこともなくシリアル
受信割り込みを終了する。マイクロプロセッサ13は時
刻t9,11,13でも同様の処理を行う。
In the serial interrupt process started at time t7, the microprocessor 11 and the microprocessor 13 go through the same steps as at time t5, and then step 22.
Execute 7. At the previous execution of step 227, the microprocessor 11 recognizes that itself is designated as a slave, and therefore the process proceeds to step 228 and the received data is written in the reception buffer. The microprocessor 11 performs the same processing at time t9. Since the microprocessor 13 recognizes that it has not been designated as a slave at the previous execution of step 227, it terminates the serial reception interrupt without reading the received data. The microprocessor 13 also performs the same processing at times t9, 11, and 13.

【0054】以上の手順を経て、マイクロプロセッサ1
2が出力する誤り検出コード63まで転送される。
Through the above procedure, the microprocessor 1
The error detection code 63 output by 2 is transferred.

【0055】時刻t11のシリアル割り込み処理では、
既に誤り検出コード63が送信済みであるので、マイク
ロプロセッサ12はステップ224で「00H(16進
表記)」をシフトバッファに書き込む。一方、マイクロ
プロセッサ11はステップ228でデータフレームがエ
ラー無しで受信できた場合に受信応答データ64をシフ
トバッファに書き込む。この時点でマイクロプロセッサ
11はスレーブではなくなる。これらのデータは時刻t
12のタイマ割り込み処理でマイクロプロセッサ10が
出力するバイトクロックでデータライン1上に出力され
る。シフトバッファは負論理でデータライン1上にデー
タを出力するため、このバイトクロックではマイクロプ
ロセッサ11が出力した受信応答データ64がマイクロ
プロセッサ12によって受信されることとなる。
In the serial interrupt processing at time t11,
Since the error detection code 63 has already been transmitted, the microprocessor 12 writes "00H (hexadecimal notation)" in the shift buffer in step 224. On the other hand, the microprocessor 11 writes the reception response data 64 in the shift buffer when the data frame can be received without error in step 228. At this point microprocessor 11 is no longer a slave. These data are at time t
It is output onto the data line 1 by the byte clock output from the microprocessor 10 in the timer interrupt processing of 12. Since the shift buffer outputs the data on the data line 1 by the negative logic, the reception response data 64 output by the microprocessor 11 is received by the microprocessor 12 at this byte clock.

【0056】時刻t13のシリアル割り込みではマイク
ロプロセッサ12はステップ226で受信応答データ6
4をチェックし、データフレーム転送が終了しているの
でシリアル割り込み処理を終了する。一方、マイクロプ
ロセッサ11は既にスレーブではなくなっているのでス
テップ227を実行後シリアル割り込み処理を終了す
る。従って、時刻t13のシリアル割り込み処理ではデ
ータライン1がロウに駆動されることはない。
In the serial interrupt at time t13, the microprocessor 12 receives the reception response data 6 in step 226.
4 is checked, and since the data frame transfer is completed, the serial interrupt process is completed. On the other hand, since the microprocessor 11 is no longer a slave, it executes step 227 and ends the serial interrupt process. Therefore, the data line 1 is not driven low in the serial interrupt processing at time t13.

【0057】時刻t14でデータライン1のレベルがハ
イであると検出したマイクロプロセッサ10は、ステッ
プ201で/BSYライン3をハイに遷移させ、再びト
ークンの配布を行う。前回のトークン配布はトークン3
2であったので、ステップ202ではマイクロプロセッ
サ13に対するトークンであるトークン33が出力され
る。
When the microprocessor 10 detects that the level of the data line 1 is high at the time t14, it makes the / BSY line 3 high at step 201 and distributes the token again. Last token distribution was token 3
Since it is 2, the token 33, which is the token for the microprocessor 13, is output in step 202.

【0058】上記の説明では、ステップ223とステッ
プ224が別のステップとして実施されるように説明し
たが、スタートコンディション付きのシリアル転送が可
能なシフトバッファを使用すれば1ステップで実行でき
る。以下、図9を用いて詳細に説明する。
In the above description, step 223 and step 224 are described as being performed as separate steps, but they can be performed in one step by using a shift buffer capable of serial transfer with a start condition. Hereinafter, a detailed description will be given with reference to FIG.

【0059】図9は1チップマイクロプロセッサ(例え
ば、MN18888:松下電子工業株式会社製)のスタ
ートコンディション付きシリアル転送のタイミング図で
あり、外部クロック、かつ、スタートコンディション有
りの条件で転送を行う場合のタイミングを示している。
シリアルデータの出力準備ができた段階(時刻t1)、
すなわち、内部のシフトレジスタに送信するデータが書
き込まれた段階でデータ出力ポートはハイインピーダン
ス状態からロウに移行する。この状態で外部からのクロ
ック入力が開始されると(時刻t2)、1バイトのデー
タがMSBから順にデータ出力ポートより出力される。
LSBの出力終了後(時刻t3)データ出力ポートはハ
イに移行する。さらに、所定期間経過すると再びデータ
出力ポートはハイインピーダンス状態に移行する(時刻
t4)。スタートコンディションは転送側と受信側でバ
イト単位の同期を取ることが本来の使用目的である。す
なわち、データの転送に先だって、クロックラインがハ
イの時にデータラインをロウに移行させることによって
受信側はクロックのカウンタをリセットし、結果として
送信側と受信側のバイト単位の同期を取ることが可能で
ある。このようにスタートコンディションは、ノイズに
よる転送のビットずれを防ぐことを目的としている。こ
のスタートコンディションの機能を利用すれば、ターゲ
ットはシフトバッファに転送データを書き込むだけでデ
ータライン1をロウ駆動することができる。すなわち、
図8のステップ223と224は同時に実行されること
になる。
FIG. 9 is a timing chart of serial transfer with a start condition of a one-chip microprocessor (for example, MN18888: manufactured by Matsushita Electronic Industrial Co., Ltd.). In the case of performing transfer under the condition of an external clock and a start condition. The timing is shown.
When the output of serial data is ready (time t1),
That is, when the data to be transmitted is written in the internal shift register, the data output port shifts from the high impedance state to the low state. When an external clock input is started in this state (time t2), 1-byte data is output from the MSB in order from the data output port.
After the output of the LSB ends (time t3), the data output port shifts to high. Further, when a predetermined period has elapsed, the data output port again shifts to the high impedance state (time t4). The original purpose of the start condition is to synchronize the transfer side and the receiving side in byte units. That is, prior to the transfer of data, the receiving side can reset the clock counter by shifting the data line to low when the clock line is high, and as a result, the transmitting side and the receiving side can be synchronized in byte units. Is. As described above, the start condition is intended to prevent bit shift of transfer due to noise. By using the function of the start condition, the target can drive the data line 1 in a row by only writing the transfer data in the shift buffer. That is,
Steps 223 and 224 of FIG. 8 will be performed simultaneously.

【0060】図9に示したタイミングでシリアル転送を
行うマイクロプロセッサを使用する場合、データ出力ポ
ートが3値出力ポートとなっているため、データ出力ポ
ート17とデータライン1の間にオープンコレクタ出力
のゲートを入れる。
When a microprocessor for performing serial transfer at the timing shown in FIG. 9 is used, since the data output port is a ternary output port, an open collector output is provided between the data output port 17 and the data line 1. Insert the gate.

【0061】以上のように本実施例によれば、コントロ
ーラは予め定められた検出タイミングでデータラインの
レベル検出を行い、検出タイミングでデータラインが高
レベルであれば次回の検出タイミングまで制御ラインを
偽のレベルに保つと共にトークンを送信し、検出タイミ
ングでデータラインが低レベルであれば、次回の検出タ
イミングまで制御ラインを真のレベルに保つと共にクロ
ックラインに1転送単位分の転送用クロックを出力し、
一方、ターゲットは、自分自身宛てのトークンを受信し
てデータフレームの転送を開始する場合には、データフ
レームを構成する各データの転送が完了するまでの間
は、次の検出タイミングまでにデータラインを低レベル
に遷移させると共に、コントローラが出力する転送用ク
ロックに同期してデータラインを用いてデータフレーム
の転送を行うことにより、/BSYライン用にコントロ
ーラは出力ポートを、ターゲットは入力ポートを用意す
るだけで良い。また、/BSY信号の操作はバイトクロ
ックの出力直前に行われるため、シリアル割り込みで/
BSYラインをモニタしても/BSY信号の誤認識が発
生しない。
As described above, according to the present embodiment, the controller detects the level of the data line at the predetermined detection timing, and if the data line is at the high level at the detection timing, the control line is set until the next detection timing. If the data line is at the low level at the detection timing while maintaining the false level and the token is transmitted, the control line is maintained at the true level until the next detection timing and the transfer clock for one transfer unit is output to the clock line. Then
On the other hand, when the target receives the token addressed to itself and starts the transfer of the data frame, it waits until the next detection timing until the transfer of each data forming the data frame is completed. To a low level, and by transferring the data frame using the data line in synchronization with the transfer clock output by the controller, the controller prepares the output port and the target prepares the input port for the / BSY line. Just do it. In addition, the / BSY signal is manipulated immediately before the byte clock is output, so a serial interrupt
Even if the BSY line is monitored, erroneous recognition of the / BSY signal does not occur.

【0062】次に、本発明の第2の実施例を図面を用い
て説明する。本実施例では第1の実施例と異なり、マイ
クロプロセッサ11,マイクロプロセッサ12,マイク
ロプロセッサ13は/BSYライン3を外部割り込み入
力ポートでモニタしている。トークンやフレームのフォ
ーマット,トークンの配布手順は第1の実施例と同じで
あるので説明は省略し、トークンを受信したターゲット
であるマイクロプロセッサがデータフレームの転送を行
う場合の動作について、図10,図11,図12,図1
3を用いて説明する。
Next, a second embodiment of the present invention will be described with reference to the drawings. In the present embodiment, unlike the first embodiment, the microprocessor 11, the microprocessor 12, and the microprocessor 13 monitor the / BSY line 3 with the external interrupt input port. Since the format of the token and frame and the token distribution procedure are the same as those in the first embodiment, the description thereof will be omitted, and the operation when the microprocessor which is the target receiving the token transfers the data frame will be described with reference to FIG. 11, 12, and 1
3 will be used for explanation.

【0063】図10はマイクロプロセッサ12がマスタ
となって、スレーブであるマイクロプロセッサ11との
間でデータフレームの転送を行う際のタイミング図であ
る。図10において、100,101,102,10
3,104,105,106,107は図6と同様であ
る。113,114,115はそれぞれマイクロプロセ
ッサ11,マイクロプロセッサ12,マイクロプロセッ
サ13が行う割り込み処理の様子を時系列的に示してい
る。Exで示した割り込み処理は/BSYライン3の立
ち上がりもしくは立ち下がりで起動される外部割り込み
処理である。また、Srで示した割り込み処理はシリア
ル割り込み処理である。
FIG. 10 is a timing chart when the microprocessor 12 serves as a master and transfers a data frame with the microprocessor 11 which is a slave. In FIG. 10, 100, 101, 102, 10
3, 104, 105, 106 and 107 are the same as those in FIG. Reference numerals 113, 114, and 115 respectively show states of interrupt processing performed by the microprocessor 11, the microprocessor 12, and the microprocessor 13 in time series. The interrupt process indicated by Ex is an external interrupt process activated at the rising or falling of the / BSY line 3. Further, the interrupt process indicated by Sr is a serial interrupt process.

【0064】図11はマイクロプロセッサ10が行うタ
イマ割込処理の概略フローチャートである。マイクロプ
ロセッサ10はマスタでもスレーブでもない場合には図
7に示したフローチャートに従った動作を行う。図10
の時刻t2,t4,t6,・・・,t16でステップ2
00が実行される。
FIG. 11 is a schematic flowchart of the timer interrupt processing performed by the microprocessor 10. When the microprocessor 10 is neither a master nor a slave, it operates according to the flowchart shown in FIG. Figure 10
At time t2, t4, t6, ..., t16, step 2
00 is executed.

【0065】図12はターゲットが行うシリアル割り込
み処理の概略フローチャートである。シリアル割り込み
処理では割り込みモードによって実行される処理が異な
る。割り込みモードには「トークン待ち」,「マス
タ」,「アドレス検出」,「スレーブ」の4種がある。
「トークン待ち」では受信したトークンが自分宛てかど
うかを判定する。「マスタ」ではマスタとしてのデータ
フレームの転送を行う。「アドレス検出」では自分自身
がスレーブに指定されたかどうかを判定する。「スレー
ブ」ではスレーブとしてのデータフレームの転送処理を
行う。割り込みモードが「トークン待ち」では/BSY
ライン3はハイであるが、その他の割り込みモードでは
ロウである。
FIG. 12 is a schematic flowchart of the serial interrupt processing performed by the target. In the serial interrupt processing, the processing executed differs depending on the interrupt mode. There are four interrupt modes: "wait for token", "master", "address detection", and "slave".
In "wait for token", it is determined whether the received token is addressed to itself. The "master" transfers the data frame as the master. In "address detection", it is determined whether or not the slave itself has been designated. The "slave" performs a data frame transfer process as a slave. When interrupt mode is "waiting for token" / BSY
Line 3 is high, but low in all other interrupt modes.

【0066】図13はターゲットが行う外部割り込み処
理の概略フローチャートである。ターゲットは/BSY
ライン3の立ち上がり時、もしくは立ち上がり時に外部
割り込みを発生させ、図13に示した処理を実行する。
FIG. 13 is a schematic flowchart of the external interrupt processing performed by the target. Target is / BSY
An external interrupt is generated at the rise of line 3 or at the rise, and the processing shown in FIG. 13 is executed.

【0067】初期状態ではデータフレームの転送要求が
発生しているマイクロプロセッサはマイクロプロセッサ
12とマイクロプロセッサ13であるとする。従って、
マイクロプロセッサ12とマイクロプロセッサ13は割
り込みモード=「トークン待ち」でシリアル割り込みが
許可されている。また、マイクロプロセッサ11,マイ
クロプロセッサ12,マイクロプロセッサ13は/BS
Yライン3の立ち下がり割り込みが許可されている。
In the initial state, it is assumed that the microprocessors in which the data frame transfer request is issued are the microprocessor 12 and the microprocessor 13. Therefore,
The microprocessor 12 and the microprocessor 13 are in interrupt mode = “wait for token” and serial interrupts are permitted. Further, the microprocessor 11, the microprocessor 12, and the microprocessor 13 are / BS.
Falling interrupt on Y line 3 is enabled.

【0068】この状態で、マイクロプロセッサ10はマ
イクロプロセッサ11に対してトークン31を出力す
る。マイクロプロセッサ11はデータフレームの転送要
求が発生していないため、シリアル割り込みは発生しな
い。マイクロプロセッサ12はシリアル割り込み処理1
30で図12に示した処理を行う。まず、ステップ25
9で現在の割り込みモードを判定する。割り込みモード
=「トークン待ち」であるので、ステップ221で受信
したトークンが自分宛てかどうか判定するが、トークン
31はマイクロプロセッサ11宛てのトークンであるた
めシリアル割り込み処理を終了する。マイクロプロセッ
サ13もシリアル割り込み処理140でシリアル割り込
み処理130と同様の処理を行う。
In this state, the microprocessor 10 outputs the token 31 to the microprocessor 11. Since the microprocessor 11 has not issued a data frame transfer request, no serial interrupt occurs. Microprocessor 12 performs serial interrupt processing 1
At 30 the process shown in FIG. 12 is performed. First, step 25
At 9, the current interrupt mode is determined. Since the interrupt mode = “waiting for token”, it is determined in step 221 whether or not the received token is addressed to itself. However, since the token 31 is addressed to the microprocessor 11, the serial interrupt processing ends. The microprocessor 13 also performs the same process as the serial interrupt process 130 in the serial interrupt process 140.

【0069】時刻t2でマイクロプロセッサ10はステ
ップ200でデータライン1のレベルを検出する。デー
タライン1はハイであるため、ステップ251で自分自
身が/BSYライン3にハイを出力中かどうかを判定す
る。時刻t2ではハイを出力中であるので、ステップ2
02でトークン32を出力する。
At time t2, the microprocessor 10 detects the level of the data line 1 in step 200. Since data line 1 is high, step 251 determines if it is outputting a high on / BSY line 3. At time t2, high is being output, so step 2
In 02, the token 32 is output.

【0070】時刻t3でマイクロプロセッサ12とマイ
クロプロセッサ13はシリアル割り込みを発生させる。
マイクロプロセッサ13はシリアル割り込み処理141
でシリアル割り込み処理140と同様の処理を行う。マ
イクロプロセッサ12はシリアル割り込み処理131を
実行する。マイクロプロセッサ12はトークン32を受
信しているため、ステップ259,221を実行した後
ステップ250を実行して割り込みモードを「マスタ」
に変更する。ステップ258では、時刻t5で/BSY
ライン3の立ち下がりによって外部割り込みが発生しな
いようにするため外部割り込みを禁止する。さらに、第
1の実施例と同じようにステップ223,224を実行
する。
At time t3, the microprocessor 12 and the microprocessor 13 generate a serial interrupt.
The microprocessor 13 uses the serial interrupt processing 141
Then, the same processing as the serial interrupt processing 140 is performed. The microprocessor 12 executes the serial interrupt processing 131. Since the microprocessor 12 has received the token 32, it executes steps 259 and 221 and then step 250 to set the interrupt mode to “master”.
Change to. In step 258, at time t5 / BSY
The external interrupt is prohibited in order to prevent the external interrupt from being generated by the fall of the line 3. Further, steps 223 and 224 are executed in the same manner as in the first embodiment.

【0071】時刻t4でマイクロプロセッサ10はデー
タライン1のレベルがロウであることを検出し(ステッ
プ200)、ステップ250で自分自身が/BSYライ
ン3にロウを出力中かどうかを判定する。時刻t4では
ハイを出力中であるので、ステップ204で/BSYラ
イン3にロウを出力する(時刻t5)。
At time t4, the microprocessor 10 detects that the level of the data line 1 is low (step 200), and determines at step 250 whether or not it is outputting a low to the / BSY line 3. Since high is being output at time t4, low is output to the / BSY line 3 in step 204 (time t5).

【0072】時刻t5ではマイクロプロセッサ11とマ
イクロプロセッサ13に/BSYライン3の立ち下がり
による外部割り込みが発生する。外部割り込み処理12
0ではまず図13のステップ274で外部割り込みの割
り込み要因がチェックされる。時刻t5では立ち下がり
割り込みが発生しているので、ステップ272で割り込
みモードが「アドレス検出」に設定される。さらに、ス
テップ273でシリアル割り込みが許可される。同様の
処理をマイクロプロセッサ13は割り込み処理142で
実行する。
At time t5, the microprocessor 11 and the microprocessor 13 generate an external interrupt due to the fall of the / BSY line 3. External interrupt processing 12
At 0, first, the interrupt factor of the external interrupt is checked in step 274 of FIG. Since the falling interrupt has occurred at time t5, the interrupt mode is set to “address detection” in step 272. Further, in step 273, the serial interrupt is enabled. The microprocessor 13 executes the same processing as the interrupt processing 142.

【0073】時刻t6でマイクロプロセッサ10はデー
タライン1のレベルがロウであることを検出し(ステッ
プ200)、ステップ250で自分自身が/BSYライ
ン3にロウを出力中かどうかを判定する。時刻t4では
ロウを出力中であるので、ステップ203でクロックラ
イン2にバイトクロックを出力する。マイクロプロセッ
サ12がシリアル割り込み処理131でシフトバッファ
に書き込んだアドレスデータ60がこのバイトクロック
でデータライン1上に出力される。マイクロプロセッサ
10は時刻t6と同様の処理を時刻t8,t10,t1
2でも繰り返す。
At time t6, the microprocessor 10 detects that the level of the data line 1 is low (step 200), and determines at step 250 whether or not it is outputting a low to the / BSY line 3. Since the row is being output at the time t4, the byte clock is output to the clock line 2 in step 203. The address data 60 written in the shift buffer by the microprocessor 12 in the serial interrupt processing 131 is output onto the data line 1 by this byte clock. The microprocessor 10 performs the same processing as at time t6 at times t8, t10, t1.
Repeat 2

【0074】時刻t7でマイクロプロセッサ11とマイ
クロプロセッサ12はそれぞれシリアル割り込み処理1
21とシリアル割り込み処理143の実行を開始する。
双方のマイクロプロセッサは割り込みモードが「アドレ
ス検出」であるので、ステップ252で自身がスレーブ
として指定されたかどうかを判定する。マイクロプロセ
ッサ11はアドレスデータ60のbit1が1であるため
スレーブとして指定されたと認識しステップ253へ進
むが、マイクロプロセッサ13はアドレスデータ60の
bit3が0であるためスレーブとして指定されなかった
と認識し、ステップ251へ進む。ステップ253でマ
イクロプロセッサ11は割り込みモードを「スレーブ」
に変更する。さらに、ステップ228で第1の実施例と
同様にアドレスデータ60を内部のRAM領域に用意し
た受信バッファに書き込んでおく。その後ステップ25
4で受信終了かどうか判定するが、まだデータフレーム
の受信は完了していないのでそのままシリアル割り込み
処理121を終了する。マイクロプロセッサ11は同様
の処理を誤り検出コード63を受信するまで繰り返す。
一方、スレーブとして指定されなかったマイクロプロセ
ッサ13はステップ251で転送待ちフレームが存在す
るかどうかを判定する。マイクロプロセッサ13はフレ
ームの転送要求が発生しているので、ステップ256で
/BSYライン3の立ち上がりで外部割り込みが発生す
るように設定した後、ステップ257でシリアル割り込
みを禁止してシリアル割り込み処理143を終了する。
従って、マイクロプロセッサ13は外部割り込み処理で
シリアル割り込みを許可するまでシリアル割り込みを発
生しない。一方、マイクロプロセッサ12は時刻t7に
開始されるシリアル割り込み処理132で、割り込みモ
ードが「マスタ」であることを認識し(ステップ25
9)、ステップ226を実行する。マイクロプロセッサ
12はまだデータフレームの転送を終了していないの
で、ステップ223,224を実行してデータフレーム
の第2バイトであるコントロールデータ61をシフトバ
ッファに書き込んでおく。マイクロプロセッサ12はシ
リアル割り込み処理132と同様の処理を誤り検出コー
ド63をシフトバッファに書き込むまで行う。
At time t7, the microprocessor 11 and the microprocessor 12 respectively execute serial interrupt processing 1
21 and the serial interrupt processing 143 is started.
Both microprocessors have an interrupt mode of "address detect", so in step 252 it is determined whether they have been designated as slaves. The microprocessor 11 recognizes that the address data 60 is designated as a slave because bit 1 of the address data 60 is 1, and proceeds to step 253.
Since bit3 is 0, it is recognized that the slave has not been designated, and the process proceeds to step 251. At step 253, the microprocessor 11 sets the interrupt mode to “slave”.
Change to. Further, in step 228, the address data 60 is written in the receive buffer prepared in the internal RAM area as in the first embodiment. Then step 25
In step 4, it is determined whether or not the reception is completed. However, since the reception of the data frame is not completed yet, the serial interrupt processing 121 is ended as it is. The microprocessor 11 repeats the same processing until the error detection code 63 is received.
On the other hand, the microprocessor 13 not designated as the slave determines in step 251 whether or not there is a transfer waiting frame. Since the frame transfer request has been generated, the microprocessor 13 sets in step 256 that an external interrupt is generated at the rising edge of the / BSY line 3, and then in step 257, disables the serial interrupt and executes the serial interrupt processing 143. finish.
Therefore, the microprocessor 13 does not generate the serial interrupt until the serial interrupt is permitted by the external interrupt processing. On the other hand, the microprocessor 12 recognizes that the interrupt mode is "master" in the serial interrupt processing 132 started at time t7 (step 25).
9), execute step 226. Since the microprocessor 12 has not yet completed the transfer of the data frame, it executes steps 223 and 224 and writes the control data 61, which is the second byte of the data frame, in the shift buffer. The microprocessor 12 performs the same process as the serial interrupt process 132 until the error detection code 63 is written in the shift buffer.

【0075】時刻t11のシリアル割り込み処理134
では、既に誤り検出コード63が送信済みであるので、
マイクロプロセッサ12はステップ224で「00H
(16進表記)」をシフトバッファに書き込む。一方、
マイクロプロセッサ11はシリアル割り込み処理123
のステップ228でデータフレームがエラー無しで受信
できた場合に受信応答データ64をシフトバッファに書
き込む。この時点でマイクロプロセッサ11は受信処理
を終了するので、ステップ251に進んで転送待ちフレ
ームの存在をチェックする。マイクロプロセッサ11は
転送待ちフレームが存在しないので、ステップ255に
進み、/BSYライン3の立ち下がりで外部割り込みが
発生するように立ち下がり割り込みを許可しておく。さ
らに、ステップ257でシリアル割り込みを禁止しシリ
アル割り込み処理123を終了する。従って、マイクロ
プロセッサ11は他のマイクロプロセッサが/BSYラ
イン3をハイからロウに変化させるまではバスを無視す
ることになる。もちろん、/BSYライン3がハイの時
にデータフレームの転送要求が発生すれば、マイクロプ
ロセッサ11は割り込みモードを「トークン待ち」とし
てシリアル割り込みを許可すれば良い。
Serial interrupt processing 134 at time t11
Then, since the error detection code 63 has already been transmitted,
The microprocessor 12 sends "00H" at step 224.
(Hexadecimal notation) "is written in the shift buffer. on the other hand,
The microprocessor 11 uses the serial interrupt processing 123.
In step 228, if the data frame can be received without error, the reception response data 64 is written in the shift buffer. At this point, the microprocessor 11 finishes the reception process, and therefore the process proceeds to step 251 to check the existence of the transfer wait frame. Since there is no transfer waiting frame, the microprocessor 11 proceeds to step 255 and permits the falling interrupt so that an external interrupt is generated at the falling of the / BSY line 3. Further, in step 257, the serial interrupt is prohibited and the serial interrupt processing 123 is ended. Therefore, the microprocessor 11 will ignore the bus until another microprocessor changes the / BSY line 3 from high to low. Of course, if a data frame transfer request is generated when the / BSY line 3 is high, the microprocessor 11 may set the interrupt mode to "wait for token" and allow the serial interrupt.

【0076】シリアル割り込み処理123でシフトバッ
ファ内に書き込まれた受信応答データ64は、第1の実
施例と同様に、時刻t12のタイマ割り込み処理でマイ
クロプロセッサ10が出力するバイトクロックでマイク
ロプロセッサ12へ送信される。
The reception response data 64 written in the shift buffer by the serial interrupt processing 123 is sent to the microprocessor 12 by the byte clock output by the microprocessor 10 in the timer interrupt processing at time t12, as in the first embodiment. Sent.

【0077】時刻t13でシリアル割り込みが発生する
のはマイクロプロセッサ12だけである。シリアル割り
込み処理135で、マイクロプロセッサ12はステップ
226で受信応答データ64をチェックし、データフレ
ーム転送が終了しているのでステップ251に進む。マ
イクロプロセッサ12には新たなデータフレームの転送
要求が発生していないので、ステップ251,255,
257を実行する。その結果マイクロプロセッサ11と
同様に、シリアル割り込み禁止で立ち下がり割り込み許
可の状態でシリアル割り込み処理135を終了する。こ
の時点ではデータフレームの転送が終了しているため、
データライン1はハイに保たれたままである。
Only at the microprocessor 12 is the serial interrupt generated at time t13. In the serial interrupt processing 135, the microprocessor 12 checks the reception response data 64 in step 226, and since the data frame transfer is completed, the process proceeds to step 251. Since no new data frame transfer request has been issued to the microprocessor 12, steps 251, 255,
257 is executed. As a result, similarly to the microprocessor 11, the serial interrupt processing 135 is terminated with the falling interrupt enabled and the serial interrupt disabled. At this point, the data frame has been transferred, so
Data line 1 remains held high.

【0078】時刻t14でマイクロプロセッサ10はデ
ータライン1のレベルがハイであることを検出し(ステ
ップ200)、ステップ251で自分自身が/BSYラ
イン3にハイを出力中かどうかを判定する。時刻t14
ではロウを出力中であるので、ステップ201で/BS
Yライン3にハイを出力する(時刻t15)。
At time t14, the microprocessor 10 detects that the level of the data line 1 is high (step 200), and determines at step 251 whether or not it is outputting a high level to the / BSY line 3. Time t14
Since low is being output, in step 201 / BS
High is output to the Y line 3 (time t15).

【0079】時刻t15では/BSYライン3の立ち上
がりに起因する外部割り込みがマイクロプロセッサ13
に発生する。この外部割り込み処理144では図13に
示したフローチャートに従って処理が行われる。まず、
ステップ274で外部割り込みの割り込み要因がチェッ
クされる。時刻t15では立ち上がり割り込みが発生し
ているので、ステップ271で割り込みモードが「トー
クン待ち」に設定される。さらに、ステップ273でシ
リアル割り込みが許可される。
At time t15, the external interrupt caused by the rising edge of the / BSY line 3 is the microprocessor 13
Occurs in. In this external interrupt processing 144, processing is performed according to the flowchart shown in FIG. First,
In step 274, the interrupt factor of the external interrupt is checked. Since the rising interrupt has occurred at time t15, the interrupt mode is set to "wait for token" in step 271. Further, in step 273, the serial interrupt is enabled.

【0080】時刻t16のタイマ割り込み処理でマイク
ロプロセッサ10は時刻t2と同様の処理を行い、ステ
ップ202でトークン33を出力する。
The microprocessor 10 performs the same processing as at time t2 by the timer interrupt processing at time t16, and outputs the token 33 at step 202.

【0081】時刻t17のシリアル割込み処理145で
自分宛てのトークン33を受信したマイクロプロセッサ
13は、マイクロプロセッサ12がシリアル割込み処理
131で実行したのと同じ処理を行い、データライン1
をロウに駆動する。
Upon receipt of the token 33 addressed to itself in the serial interrupt processing 145 at time t17, the microprocessor 13 performs the same processing as that executed by the microprocessor 12 in the serial interrupt processing 131, and the data line 1
Drive low.

【0082】上記の第2の実施例でも、第1の実施例と
同様に、スタートコンディション付きのシリアル転送が
可能なシフトバッファを使用すればステップ223とス
テップ224は1ステップで実行できる。
Also in the second embodiment described above, similarly to the first embodiment, if a shift buffer capable of serial transfer with a start condition is used, steps 223 and 224 can be executed in one step.

【0083】また、図12で示したターゲットのシリア
ル割り込み処理では、説明を分かりやすくするためにス
テップ257ではシリアル割り込みを禁止する処理を行
っている。しかしながら、一般の1チップのマイクロプ
ロセッサでは割り込みが発生すると、その割り込み処理
内で割り込みを許可しない限り次回に割り込みが発生し
ないようになっている。従って、実際のプログラミング
ではステップ257の代わりに、ステップ257を実行
せずに割り込み処理が終了する場合にはシリアル割り込
みを許可するステップが必要になる。
In the target serial interrupt process shown in FIG. 12, the process of inhibiting the serial interrupt is performed in step 257 in order to make the explanation easy to understand. However, when an interrupt occurs in a general one-chip microprocessor, the interrupt is not generated next time unless the interrupt is permitted in the interrupt process. Therefore, in actual programming, instead of step 257, a step of enabling a serial interrupt is required when the interrupt processing ends without executing step 257.

【0084】以上のように本実施例によれば、コントロ
ーラは予め定められた検出タイミングでデータラインの
レベル検出を行い、検出タイミングでデータラインが高
レベルであると共に制御ラインに真のレベルを出力中で
ある場合には制御ラインへの偽のレベルの出力を開始
し、検出タイミングでデータラインが高レベルであると
共に制御ラインに偽のレベルを出力中である場合にはト
ークンを送信し、検出タイミングでデータラインが低レ
ベルであると共に制御ラインに偽のレベルを出力中であ
る場合には制御ラインへの真のレベルの出力を開始し、
検出タイミングでデータラインが低レベルであると共に
制御ラインに真のレベルを出力中である場合にはクロッ
クラインに1転送単位分の転送用クロックを出力し、一
方、ターゲットは、自分自身宛てのトークンを受信して
データフレームの転送を開始する場合には、データフレ
ームを構成する各データの転送が完了するまでの間は、
次の検出タイミングまでにデータラインを低レベルに遷
移させると共に、コントローラが出力する転送用クロッ
クに同期してデータラインを用いてデータフレームの転
送を行うことにより、/BSYライン用にコントローラ
は出力ポートをターゲットは入力ポートを用意するだけ
で良い。また、/BSY信号の操作とバイトクロックや
トークンの送信が全く独立に行われるため、シリアル割
り込みで/BSYラインをモニタしても/BSY信号の
誤認識は発生しない。
As described above, according to the present embodiment, the controller detects the level of the data line at the predetermined detection timing, and the data line is at the high level and the true level is output to the control line at the detection timing. When it is in the middle, it starts outputting the false level to the control line, and when the data line is high level and the false level is being output to the control line at the detection timing, the token is transmitted and detected. When the data line is low level and the false level is being output to the control line at the timing, the output of the true level to the control line is started,
When the data line is low level at the detection timing and the true level is being output to the control line, the transfer clock for one transfer unit is output to the clock line, while the target is the token addressed to itself. When receiving the data and starting the transfer of the data frame, until the transfer of each data forming the data frame is completed,
By shifting the data line to the low level by the next detection timing and transferring the data frame using the data line in synchronization with the transfer clock output from the controller, the controller outputs the / BSY line to the output port. The target only needs to prepare an input port. Further, since the operation of the / BSY signal and the transmission of the byte clock and the token are performed completely independently, even if the / BSY line is monitored by the serial interrupt, the / BSY signal is not erroneously recognized.

【0085】また、ターゲットは制御ラインを外部割り
込み入力ポートでモニタし、データフレームの転送要求
が発生していない場合で、かつ、制御ラインが偽のレベ
ルの場合にはシリアル割り込みを禁止し、制御ラインの
立ち下がり割り込み処理でシリアル割り込みを許可する
ことにより、データフレームの転送要求が発生していな
い場合にトークン受信のためのシリアル割り込み処理を
禁止することができる。
Further, the target monitors the control line at the external interrupt input port, prohibits the serial interrupt when the data frame transfer request is not generated, and when the control line is at the false level, the control is performed. By permitting the serial interrupt in the line falling interrupt process, the serial interrupt process for token reception can be prohibited when the data frame transfer request is not generated.

【0086】また、ターゲットは自分以外のマイクロプ
ロセッサ間でデータフレームの転送が行われている場
合、シリアル割り込みを禁止することにより、制御ライ
ンが低レベルの場合のシリアル割り込み処理の回数を減
らすことができる。
Further, the target can reduce the number of serial interrupt processing when the control line is at a low level by prohibiting the serial interrupt when the data frame is being transferred between the microprocessors other than itself. it can.

【0087】また、ターゲットは自分以外のマイクロプ
ロセッサ間でデータフレームの転送が行われている状態
でデータフレームの転送要求が発生した場合、制御ライ
ンの立ち上がり割り込みでシリアル割り込みを許可する
ことにより、転送要求が発生してからトークン取得まで
のシリアル割り込みの回数を最小限におさえることがで
きる。
When a data frame transfer request is generated while data frames are being transferred between microprocessors other than itself, the target transfers data by enabling a serial interrupt at the rising edge of the control line. It is possible to minimize the number of serial interrupts from request generation to token acquisition.

【0088】なお、上記2つの実施例ではデバイスとし
て汎用のマイクロプロセッサを用いていたが、バスに接
続されるデバイスはマイクロプロセッサに限定されな
い。例えば、DSP等のLSIを接続することも可能で
ある。
Although a general-purpose microprocessor is used as a device in the above two embodiments, the device connected to the bus is not limited to the microprocessor. For example, it is possible to connect an LSI such as a DSP.

【0089】また、上記2つの実施例ではデータフレー
ムをマスタが送信してスレーブが受信していたが、マス
タがスレーブにデータフレームを出力するように指示を
行い、スレーブがデータフレームの出力を行っても良
い。この場合には、トークンのフォーマットナンバーを
変えてデータフレームのフォーマットを変更すれば良
い。
In the above two embodiments, the master transmitted the data frame and the slave received it. However, the master instructs the slave to output the data frame, and the slave outputs the data frame. May be. In this case, the format of the data frame may be changed by changing the format number of the token.

【0090】[0090]

【発明の効果】以上のように発明は、コントローラは予
め定められた検出タイミングでデータラインのレベル検
出を行い、検出タイミングでデータラインが高レベルで
あれば次回の検出タイミングまで制御ラインを偽のレベ
ルに保つと共にトークンを送信し、検出タイミングでデ
ータラインが低レベルであれば、次回の検出タイミング
まで制御ラインを真のレベルに保つと共にクロックライ
ンに1転送単位分の転送用クロックを出力し、一方、タ
ーゲットは、自分自身宛てのトークンを受信してデータ
フレームの転送を開始する場合には、データフレームを
構成する各データの転送が完了するまでの間は、次の検
出タイミングまでにデータラインを低レベルに遷移させ
ると共に、コントローラが出力する転送用クロックに同
期してデータラインを用いてデータフレームの転送を行
うことにより、/BSYライン用にコントローラは出力
ポートをターゲットは入力ポートを用意するだけで良い
という効果が得られる。また、/BSY信号の操作はバ
イトクロックの出力直前に行われるため、シリアル割り
込みで/BSYラインをモニタしても/BSY信号の誤
認識が発生しないという効果が得られる。
As described above, according to the invention, the controller detects the level of the data line at a predetermined detection timing, and if the data line is at the high level at the detection timing, the control line is false until the next detection timing. If the data line is low level at the detection timing while keeping the level, and the data line is at the low level at the detection timing, the control line is kept at the true level until the next detection timing and the transfer clock for one transfer unit is output to the clock line, On the other hand, when the target receives the token addressed to itself and starts the transfer of the data frame, it waits until the next detection timing until the transfer of each data forming the data frame is completed. To the low level and the data line is synchronized with the transfer clock output from the controller. By performing the transfer of data frames using a / controller for BSY line target output port effect that it is only necessary to provide an input port is obtained. Further, since the operation of the / BSY signal is performed immediately before the output of the byte clock, it is possible to obtain the effect that the erroneous recognition of the / BSY signal does not occur even if the / BSY line is monitored by the serial interrupt.

【0091】また、コントローラは検出タイミングでデ
ータラインが高レベルであると共に制御ラインに真のレ
ベルを出力中である場合には制御ラインへの偽のレベル
の出力を開始し、検出タイミングでデータラインが高レ
ベルであると共に制御ラインに偽のレベルを出力中であ
る場合にはトークンを送信し、検出タイミングでデータ
ラインが低レベルであると共に制御ラインに偽のレベル
を出力中である場合には制御ラインへの真のレベルの出
力を開始し、検出タイミングでデータラインが低レベル
であると共に制御ラインに真のレベルを出力中である場
合にはクロックラインに1転送単位分の転送用クロック
を出力することによっても、/BSYライン用にコント
ローラは出力ポートをターゲットは入力ポートを用意す
るだけで良いという効果が得られる。また、/BSY信
号の操作とバイトクロックやトークンの送信が全く独立
に行われるため、シリアル割り込みで/BSYラインを
モニタしても/BSY信号の誤認識は発生しないという
効果が得られる。
When the data line is at the high level at the detection timing and the true level is being output to the control line, the controller starts outputting the false level to the control line, and at the detection timing, the data line is output. Is high level and is outputting a false level to the control line, a token is transmitted, and when the data line is low level and a false level is being output to the control line at the detection timing, When the output of the true level to the control line is started and the data line is at the low level at the detection timing and the true level is being output to the control line, the transfer clock for one transfer unit is supplied to the clock line. By outputting, the controller only needs to prepare an output port and the target an input port for the / BSY line. Effect can be obtained. Further, since the operation of the / BSY signal and the transmission of the byte clock and the token are performed completely independently, even if the / BSY line is monitored by the serial interrupt, there is an advantage that the erroneous recognition of the / BSY signal does not occur.

【0092】さらに、ターゲットは制御ラインを外部割
り込み入力ポートでモニタし、データフレームの転送要
求が発生していない場合で、かつ、制御ラインが偽のレ
ベルの場合にはシリアル割り込みを禁止し、制御ライン
の立ち下がり割り込み処理でシリアル割り込みを許可す
ることにより、データフレームの転送要求が発生してい
ない場合にトークン受信のためのシリアル割り込み処理
を禁止することができるという効果が得られる。
Further, the target monitors the control line at the external interrupt input port, disables the serial interrupt when the data frame transfer request is not generated, and when the control line is at the false level, the control is performed. By permitting the serial interrupt in the line falling interrupt process, it is possible to inhibit the serial interrupt process for token reception when the data frame transfer request is not generated.

【0093】さらに、ターゲットは自分以外のマイクロ
プロセッサ間でデータフレームの転送が行われている場
合、シリアル割り込みを禁止することにより、制御ライ
ンが低レベルの場合のシリアル割り込み処理の回数を減
らすことができるという効果が得られる。
Furthermore, the target can reduce the number of serial interrupt processes when the control line is at a low level by disabling the serial interrupt when the data frame is being transferred between the microprocessors other than itself. The effect that can be obtained is obtained.

【0094】さらに、ターゲットは自分以外のマイクロ
プロセッサ間でデータフレームの転送が行われている状
態でデータフレームの転送要求が発生した場合、制御ラ
インの立ち上がり割り込みでシリアル割り込みを許可す
ることにより、転送要求が発生してからトークン取得ま
でのシリアル割り込みの回数を最小限におさえることが
できるという効果が得られる。
Further, when a data frame transfer request is generated while data frames are being transferred between microprocessors other than itself, the target transfers by permitting a serial interrupt at the rising edge of the control line. This has the effect of minimizing the number of serial interrupts from request generation to token acquisition.

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

【図1】本発明の第1の実施例および第2の実施例にお
けるデータ転送方法を用いてデータ転送を行うシステム
の構成を示すブロック図
FIG. 1 is a block diagram showing a configuration of a system for performing data transfer using a data transfer method according to a first embodiment and a second embodiment of the present invention.

【図2】同第1の実施例および第2の実施例におけるデ
ータライン1とクロックライン2の信号の関係を示すタ
イミング図
FIG. 2 is a timing chart showing a relationship between signals on a data line 1 and a clock line 2 in the first and second embodiments.

【図3】同第1の実施例および第2の実施例におけるト
ークンのフォーマットを示す模式図
FIG. 3 is a schematic diagram showing a format of a token in the first and second embodiments.

【図4】同第1の実施例および第2の実施例におけるデ
ータフレームのフォーマットを示す模式図
FIG. 4 is a schematic diagram showing a format of a data frame in the first and second embodiments.

【図5】同第1の実施例および第2の実施例においてマ
イクロプロセッサ10が行うトークンの配布の様子を示
したタイミング図
FIG. 5 is a timing chart showing how tokens are distributed by the microprocessor 10 in the first and second embodiments.

【図6】同第1の実施例においてマイクロプロセッサ1
2がマスタとなって、スレーブであるマイクロプロセッ
サ11との間でデータフレームの転送を行う際のタイミ
ング図
FIG. 6 is a microprocessor 1 according to the first embodiment.
2 is a master and is a timing chart when transferring a data frame with the microprocessor 11 which is a slave

【図7】同第1の実施例におけるコントローラが実行す
るタイマ割り込み処理の概略フローチャート
FIG. 7 is a schematic flowchart of timer interrupt processing executed by the controller according to the first embodiment.

【図8】同第1の実施例におけるターゲットが実行する
シリアル割り込み処理の概略フローチャート
FIG. 8 is a schematic flowchart of serial interrupt processing executed by the target in the first embodiment.

【図9】同第1の実施例におけるマイクロプロセッサの
スタートコンディション付きシリアル転送のタイミング
FIG. 9 is a timing chart of serial transfer with a start condition of the microprocessor according to the first embodiment.

【図10】同第2の実施例においてマイクロプロセッサ
12がマスタとなって、スレーブであるマイクロプロセ
ッサ11との間でデータフレームの転送を行う際のタイ
ミング図
FIG. 10 is a timing chart when the microprocessor 12 serves as a master and transfers a data frame to and from the slave microprocessor 11 in the second embodiment.

【図11】同第2の実施例におけるコントローラが実行
するタイマ割り込み処理の概略フローチャート
FIG. 11 is a schematic flowchart of timer interrupt processing executed by a controller according to the second embodiment.

【図12】同第2の実施例におけるターゲットが実行す
るシリアル割り込み処理の概略フローチャート
FIG. 12 is a schematic flowchart of serial interrupt processing executed by a target according to the second embodiment.

【図13】同第2の実施例におけるターゲットが実行す
る外部割り込み処理の概略フローチャート
FIG. 13 is a schematic flowchart of an external interrupt process executed by a target according to the second embodiment.

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

1 データライン 2 クロックライン 3 /BSYライン 10,11,12,13, マイクロプロセッサ 14 /BSY信号入力ポート 15 クロック入力ポート 16 データ入力ポート 17 データ出力ポート 18 クロック出力ポート 19 /BSY信号出力ポート 60 アドレスデータ 61 コントロールデータ 62 ユーザーデータ 63 誤り検出コード 64 受信応答データ 1 data line 2 clock line 3 / BSY line 10, 11, 12, 13, microprocessor 14 / BSY signal input port 15 clock input port 16 data input port 17 data output port 18 clock output port 19 / BSY signal output port 60 address Data 61 Control data 62 User data 63 Error detection code 64 Received response data

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 1つのコントローラであるデバイスと1
つ以上のターゲットであるデバイスからなる複数のデバ
イス間でデータフレームを転送するデータ転送方法であ
って、 前記各デバイスは、1転送単位のシリアルデータが各デ
バイス間で間欠的に転送される双方向のデータライン
と、前記シリアルデータの転送用クロックを前記コント
ローラから前記ターゲットに供給するクロックライン
と、マスタとなったデバイスによるデータフレームの転
送が行われていることを前記コントローラが前記ターゲ
ットに示す制御ラインとの3本の信号ラインで互いに接
続されており、 前記コントローラは自身が前記マスタでない場合に予め
定められた検出タイミングで前記データラインのレベル
検出を行い、前記検出タイミングで前記データラインが
高レベルである場合には少なくとも次の検出タイミング
までは前記制御ラインを偽のレベルに保つと共に前記ク
ロックラインと前記データラインを用いてデバイスの1
つにトークンを送信し、前記検出タイミングで前記デー
タラインが低レベルである場合には少なくとも次の検出
タイミングまでは前記制御ラインを真のレベルに保つと
共に前記クロックラインに1転送単位分の転送用クロッ
クを出力し、 前記ターゲットは、前記制御ラインが偽のレベルの場合
に前記データラインと前記クロックラインを介してシリ
アルデータを受信すれば、受信したシリアルデータがト
ークンであると判断し、受信したトークンが自分自信宛
てのトークンであり、かつ、前記マスタとなってデータ
フレームの転送を開始する場合には、データフレームを
構成する各データの転送が完了するまでの間は、次の前
記検出タイミングまでに前記データラインを低レベルに
遷移させると共に、前記コントローラが出力する転送用
クロックに同期して前記データラインを用いてデータフ
レームの転送を行うことを特徴とするデータ転送方法。
1. A device that is a controller and a device that is a controller.
A data transfer method for transferring a data frame between a plurality of devices including one or more target devices, wherein each device is bidirectional in which serial data of one transfer unit is intermittently transferred between the devices. Data line, a clock line that supplies the serial data transfer clock from the controller to the target, and the controller that indicates to the target that the master device is transferring the data frame. Connected to each other by three signal lines, the controller detects the level of the data line at a predetermined detection timing when the controller itself is not the master, and the controller detects that the data line is high at the detection timing. If at least the next detected timing 1 device using the data line and the clock line with up to keep the control line to the level of sham
When the data line is at the low level at the detection timing, the control line is kept at the true level and the clock line is transferred for one transfer unit at least until the next detection timing. Outputting a clock, and if the target receives serial data through the data line and the clock line when the control line is at a false level, the target determines that the received serial data is a token and receives it. When the token is addressed to self-confidence, and when the master becomes the master and starts the transfer of the data frame, the next detection timing until the transfer of each data forming the data frame is completed. The data line to the low level and the transfer clock output from the controller. A data transfer method characterized in that a data frame is transferred using the data line in synchronization with the clock.
【請求項2】 1つのコントローラであるデバイスと1
つ以上のターゲットであるデバイスからなる複数のデバ
イス間でデータフレームを転送するデータ転送方法であ
って、 前記各デバイスは、1転送単位のシリアルデータが各デ
バイス間で間欠的に転送される双方向のデータライン
と、前記シリアルデータの転送用クロックを前記コント
ローラから前記ターゲットに供給するクロックライン
と、マスタとなったデバイスによるデータフレームの転
送が行われていることを前記コントローラが前記ターゲ
ットに示す制御ラインとの3本の信号ラインで互いに接
続されており、 前記コントローラは自身が前記マスタでない場合に予め
定められた検出タイミングで前記データラインのレベル
検出を行い、前記検出タイミングで前記データラインが
高レベルであると共に自身が前記制御ラインに真のレベ
ルを出力中である場合には前記制御ラインへの偽のレベ
ルの出力を開始し、前記検出タイミングで前記データラ
インが高レベルであると共に自身が前記制御ラインに偽
のレベルを出力中である場合には前記クロックラインと
前記データラインを用いてデバイスの1つにトークンを
送信し、前記検出タイミングで前記データラインが低レ
ベルであると共に自身が前記制御ラインに偽のレベルを
出力中である場合には前記制御ラインへの真のレベルの
出力を開始し、前記検出タイミングで前記データライン
が低レベルであると共に自身が前記制御ラインに真のレ
ベルを出力中である場合には前記クロックラインに1転
送単位分の転送用クロックを出力し、 前記ターゲットは、前記制御ラインが偽のレベルの場合
に前記データラインと前記クロックラインを介してシリ
アルデータを受信すれば、受信したシリアルデータがト
ークンであると判断し、受信したトークンが自分自信宛
てのトークンであり、かつ、前記マスタとなってデータ
フレームの転送を開始する場合には、データフレームを
構成する各データの転送が完了するまでの間は、次の前
記検出タイミングまでに前記データラインを低レベルに
遷移させると共に、前記コントローラが出力する転送用
クロックに同期して前記データラインを用いてデータフ
レームの転送を行うことを特徴とするデータ転送方法。
2. A device that is one controller and one device.
A data transfer method for transferring a data frame between a plurality of devices including one or more target devices, wherein each device is bidirectional in which serial data of one transfer unit is intermittently transferred between the devices. Data line, a clock line that supplies the serial data transfer clock from the controller to the target, and the controller that indicates to the target that the master device is transferring the data frame. Connected to each other by three signal lines, the controller detects the level of the data line at a predetermined detection timing when the controller itself is not the master, and the controller detects that the data line is high at the detection timing. At the same time as the If a false level is being output to the control line, the output of the false level to the control line is started, and at the detection timing, the data line is at a high level and itself is outputting a false level to the control line. In some cases, the clock line and the data line are used to send a token to one of the devices, and the data line is at a low level at the detection timing and itself is outputting a false level to the control line. In the case where the output of the true level to the control line is started, the data line is at the low level at the detection timing and the device itself is outputting the true level to the control line, the clock line The transfer clock for one transfer unit is output to the target, and the target is connected to the data line and the clock when the control line is at a false level. When serial data is received via the line, the received serial data is determined to be a token, the received token is addressed to itself, and the master becomes the master to start the data frame transfer. In addition, until the transfer of each data forming the data frame is completed, the data line is transited to the low level by the next detection timing, and in synchronization with the transfer clock output from the controller. A data transfer method, wherein a data frame is transferred using the data line.
【請求項3】 各デバイスにはそれぞれ固有のデバイス
アドレスが割り当てられており、トークンには前記デバ
イスアドレスを識別するアドレス識別子が含まれてお
り、ターゲットは受信したトークン内に含まれるアドレ
ス識別子を識別することによって受信したトークンが自
分宛てか否かを判定することを特徴とする請求項1もし
くは請求項2に記載のデータ転送方法。
3. A device is assigned a unique device address, the token includes an address identifier for identifying the device address, and the target identifies the address identifier included in the received token. The data transfer method according to claim 1 or 2, wherein it is determined whether or not the received token is addressed to itself.
【請求項4】 データフレームの転送はマスタと前記マ
スタから転送相手として指定されたデバイスである1つ
以上のスレーブとの間で行われ、 前記マスタはデータフレームの先頭で前記スレーブを指
定する識別データを出力し、 前記マスタ以外のデバイスは制御ラインが偽のレベルか
ら真のレベルに遷移した後で最初に受信したシリアルデ
ータを前記識別データとして認識し、前記識別データを
用いて自分がスレーブとして指定されたか否かを判定す
ることを特徴とする請求項1もしくは請求項2に記載の
データ転送方法。
4. A data frame is transferred between a master and one or more slaves, which are devices designated by the master as a transfer partner, and the master identifies the slave at the beginning of the data frame. The device outputs data, and the device other than the master recognizes the serial data first received as the identification data after the control line transits from the false level to the true level, and uses the identification data to identify itself as a slave. 3. The data transfer method according to claim 1, wherein it is determined whether or not it is designated.
【請求項5】 ターゲットは1転送単位のシリアルデー
タを受信もしくは送信する毎に起動されるシリアル転送
割り込み処理ルーチンで少なくとも制御ラインのレベル
検出を行うことを特徴とする請求項1もしくは請求項2
に記載のデータ転送方法。
5. The target detects the level of at least a control line in a serial transfer interrupt processing routine that is activated each time one transfer unit of serial data is received or transmitted.
Data transfer method described in.
【請求項6】 ターゲットは、制御ラインを外部割り込
み入力ポートでモニタし、1転送単位のシリアルデータ
を受信もしくは送信する毎に起動されるシリアル転送割
り込み処理ルーチンで少なくともトークンの判定処理お
よびデータフレームの転送処理を行い、データフレーム
の転送要求が発生していない場合で、かつ、制御ライン
が偽のレベルの場合にはシリアル転送割り込みを禁止
し、前記制御ラインが真のレベルに遷移したときに外部
割り込みを発生させ、外部割り込み処理ルーチンでシリ
アル転送割り込みを許可することを特徴とする請求項2
に記載のデータ転送方法。
6. The target monitors at least an external interrupt input port for a control line, and executes a serial transfer interrupt processing routine that is activated each time serial data of one transfer unit is received or transmitted. When a transfer process is performed and a data frame transfer request is not generated, and the control line is at a false level, the serial transfer interrupt is prohibited, and when the control line transitions to the true level, the external 3. An interrupt is generated and a serial transfer interrupt is enabled by an external interrupt processing routine.
Data transfer method described in.
【請求項7】 ターゲットは自分以外のデバイス間でデ
ータフレームの転送が行われている場合、シリアル転送
割り込みを禁止することを特徴とする請求項6に記載の
データ転送方法。
7. The data transfer method according to claim 6, wherein the target prohibits a serial transfer interrupt when a data frame is being transferred between devices other than itself.
【請求項8】 ターゲットは自分以外のデバイス間でデ
ータフレームの転送が行われている状態でデータフレー
ムの転送要求が発生した場合、制御ラインが偽のレベル
に遷移したときに外部割り込みを発生させ、外部割り込
み処理でシリアル転送割り込みを許可することを特徴と
する請求項7に記載のデータ転送方法。
8. The target generates an external interrupt when the control line transitions to a false level when a data frame transfer request occurs while data frames are being transferred between devices other than itself. 8. The data transfer method according to claim 7, wherein the serial transfer interrupt is enabled by the external interrupt processing.
JP4094003A 1992-04-14 1992-04-14 Method for transferring data Pending JPH05289990A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4094003A JPH05289990A (en) 1992-04-14 1992-04-14 Method for transferring data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4094003A JPH05289990A (en) 1992-04-14 1992-04-14 Method for transferring data

Publications (1)

Publication Number Publication Date
JPH05289990A true JPH05289990A (en) 1993-11-05

Family

ID=14098250

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4094003A Pending JPH05289990A (en) 1992-04-14 1992-04-14 Method for transferring data

Country Status (1)

Country Link
JP (1) JPH05289990A (en)

Similar Documents

Publication Publication Date Title
JPH04332065A (en) Method for transferring data
US9274997B2 (en) Point-to-point serial peripheral interface for data communication between devices configured in a daisy-chain
JPH02227765A (en) Data transfer apparatus for digital computer
EP0631239B1 (en) Serial data transfer method and system
JPH0319740B2 (en)
EP3095038A1 (en) Camera control interface extension with in-band interrupt
JPH02227766A (en) Data transfer apparatus for digital computer
KR20170110610A (en) Receive clock calibration for a serial bus
US6763413B2 (en) Method for the serial transfer of data between two electronic bus stations and bus station for use in said method
JP2009535677A (en) I2C clock generation method and system
JP2005128747A (en) Integrated circuit device with transmission/reception macro for serial transfer bus
USRE40261E1 (en) Apparatus and method of partially transferring data through bus and bus master control device
US7203205B2 (en) Polling device and communication apparatus
JPH05289990A (en) Method for transferring data
TW200301437A (en) Improved implementation of wait-states
JPH05173958A (en) Data transfer method
JP4201375B2 (en) Data transfer device
KR0184402B1 (en) Interrupt generating apparatus for i bus
JPH05314067A (en) Data transfer method
JPH11163958A (en) Communication controller
KR19990008189A (en) Method and apparatus for reducing the latency of an interface by overlapping transmitted packets
JP5441219B2 (en) Semiconductor device and serial interface circuit
EP1128272B1 (en) Method for the serial transfer of data between two electronic bus stations and bus station for use in said method
JP2002373145A (en) Direct memory access device
JPH05197678A (en) Device and method for data transfer