JP3889205B2 - Master / slave system - Google Patents
Master / slave system Download PDFInfo
- Publication number
- JP3889205B2 JP3889205B2 JP2000188896A JP2000188896A JP3889205B2 JP 3889205 B2 JP3889205 B2 JP 3889205B2 JP 2000188896 A JP2000188896 A JP 2000188896A JP 2000188896 A JP2000188896 A JP 2000188896A JP 3889205 B2 JP3889205 B2 JP 3889205B2
- Authority
- JP
- Japan
- Prior art keywords
- control signal
- master
- slave
- signal line
- master 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
Images
Landscapes
- Multi Processors (AREA)
- Bus Control (AREA)
- Information Transfer Systems (AREA)
- Small-Scale Networks (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、マイクロプロセッサ、コンピュータなどの外部記憶装置などへのアクセス方式に関し、特に、1つのマスタデバイスと複数のスレーブデバイスとの間、複数のマスタデバイスと1つのスレーブデバイスとの間、および複数のマスタデバイスと複数のスレーブデバイスとの間で選択的に行なわれる通信制御に関する。
【0002】
【従来の技術】
従来、少ない接続信号線数で記憶素子などをアクセスする方法として、マスタデバイスとスレーブデバイスとの間で双方向にデータ信号をシリアル伝送するデータ信号線と、マスタデバイスからスレーブデバイスに対してアクセスを制御するためのタイミング信号を伝送するクロック信号線と、マスタデバイスからスレーブデバイスに対して選択信号を伝送する選択信号線との3本の信号線を介して伝送制御するシリアルバス方法が存在した。これを従来例1とする。
【0003】
図6は、従来例1のシリアルバス方法を説明するための図である。
図6において、マスタデバイス64とスレーブデバイス65は、データ信号線61とクロック信号線62と選択信号線63との3本の信号線により構成される通信線(シリアルバス)60を介して接続している。
【0004】
このような構成において、例えば、データの読み出しを行う場合は、マスタデバイス64がスレーブデバイス65へアドレス情報を伝送すると、アドレス情報を受信したスレーブデバイス65が指定されたアドレスからデータを読み出し、アドレス情報を受信してから固定時間(例えば8クロック)後に読み出したデータをマスタデバイス64に送信する。
【0005】
また、データの書き込みを行う場合は、マスタデバイス64がスレーブデバイス65へアドレス情報とデータ情報とを伝送すると、これらを受信したスレーブデバイス65が受信したアドレス情報により指定されたアドレスに受信したデータを書き込む。
【0006】
【発明が解決しようとする課題】
しかしながら、上述のような構成は、1つのマスタデバイスと1つのスレーブデバイスとでデータ通信を行うことが前提であったため、例えば、1つのマスタデバイスと複数のスレーブデバイスとでデータ通信を行う場合は、通信線を構成する選択信号線の数をスレーブデバイスの数と同数に増やさなければならないという問題があった。
【0007】
図7は、1つのマスタデバイスと2つのスレーブデバイスとが通信線により接続された場合の従来例を示す図である。
図7において、1つのマスタデバイス75と2つのスレーブデバイス76、77は、データ信号線71とクロック信号線72と第1の選択信号線73と第2の選択信号線74との4本の信号線により構成される通信線70を介して接続している。
【0008】
このような構成において、マスタデバイス75とスレーブデバイス76とがデータ通信を行う場合は、通信線70を構成する信号線のうち、データ信号線71とクロック信号線72と第1の選択信号線73との3本の信号線によりデータ通信が行われ、マスタデバイス75とスレーブデバイス77とがデータ通信を行う場合は、通信線70を構成する信号線のうち、データ信号線71とクロック信号線72と第2の選択信号線74との3本の信号線によりデータ通信が行われる。
【0009】
すなわち、1つのマスタデバイスと2つのスレーブデバイスとが接続される場合は、データ信号線とクロック信号線が1本ずつと、2本の選択信号線との4本の信号線により構成される通信線が必要になる。
【0010】
また、複数のマスタデバイスと1つのスレーブデバイスとでデータ通信を行う場合も同様の問題があった。
これを解決するために、別の従来例として2線式の方法がある。これを従来例2とする。
【0011】
マスタデバイスとスレーブデバイスとの間で双方向にスレーブアドレスを含めたデータ信号をシリアル伝送するデータ信号線と、マスタデバイスからスレーブデバイスに対してアクセスを制御するためのタイミング信号を伝送するクロック信号線との2本の信号線を介して、伝送制御するシリアルバス方法が存在した。
【0012】
スレーブデバイスは、個々にアドレスを保持しており、データ信号線のスレーブアドレスが一致した時に選択される様にする事により、複数のスレーブにアクセスできる事を可能としている。また、信号線をWIRED−ORとし、同時に複数のマスタがシリアルバスにアクセスした場合には、データ信号線を先にLOWにしたマスタがバスを取得する事で、複数のマスタ間の調停を可能としている。
【0013】
しかしながら、従来例2は、信号線を伝送する信号の立ち上がりおよび立ち下がりスピードがある値以上必要なため、バスの容量がある値以下にする必要があるため、原理的に、従来例1と比較してその最高伝送速度は1/10程度となっている。また、スレーブおよびマスタの数が増加すると、その入出力容量が増加するため、更に信号伝送速度に制約がでるという問題点があるため、マスタおよびスレーブの数を制限する必要があった。
【0014】
また、2本で信号を伝送する事から、従来例1と比較して、その処理が複雑となり、マスタ側での処理が複雑となる問題点も存在する。
また、市販のシリアルメモリーの主流は従来例1の方法であり、入手性・コスト等を勘案すると不利という問題点があった。
【0015】
本発明の目的は、信号線の本数を増やさずに、高速に複数のスレーブデバイスとのアクセスを可能とするマスタデバイス、高速に複数のマスタデバイスとのアクセスを可能とするスレーブデバイス、および高速に複数のマスタデバイスと複数のスレーブデバイスとの間のアクセスを可能とするマスタ・スレーブシステムを提供することである。
【0016】
【課題を解決するための手段】
本発明は、上記課題を解決するため、下記のような構成を採用した。
すなわち、本発明の一態様によれば、本発明のマスタ・スレーブシステムは、1本のデータ信号線と2本の制御信号線とを有する通信線に接続されたマスタデバイスとシリアルメモリを有するスレーブデバイスとを備えるマスタ・スレーブシステムであって、前記マスタデバイスが、前記シリアルメモリと通信するための標準の選択信号およびタイミング信号の前に、それぞれ一定のビットパターンを追加した各ビットパターンを生成する手段と、該生成した各ビットパターンを、通信するスレーブデバイス毎に入れ替えて前記2本の制御信号線に送出する入れ替え手段とを備え、前記スレーブデバイスが、前記2本の制御信号線とそれぞれ接続される2つの制御信号入力端子を有し、前記2本の制御信号線と前記2つの制御信号入力端子との接続の関係に応じて、通信可能な接続の関係の場合は前記一定のビットパターンを除去して前記標準の選択信号およびタイミング信号を生成する一方、逆の接続の関係の場合は全ビットパターンを除去して無信号とする制御信号生成手段を備え、スレーブデバイス毎に前記2本の制御信号線と2つの制御信号入力端子との接続の関係を入れ替えて接続し、前記マスタデバイスが前記入れ替え手段により通信するスレーブデバイスを選択することを特徴とする。
【0017】
また、好適には、前記マスタデバイスがさらに、前記通信線のそれぞれに対応し、前記通信線の状態を監視して前記状態を折り返して読み込むための折り返し読込み手段と、前記通信線を使用しようとする旨の要求を前記通信線に接続された他のマスタデバイスとの間で前記2本の制御信号線を介して相互に通知する通知手段とを備えることが望ましい。
【0018】
上記折返し読込み手段が上記通信線の状態を監視して上記状態を折り返し読むことにより、上記マスタデバイスおよび上記他のマスタデバイスとから上記通信線を使用する旨の要求が2つ(複数)あることを互いに通知するので、2つ(複数)のマスターデバイスが1つのスレーブデバイスと通信することが可能となる。
【0020】
スレーブデバイスを制御する制御信号を生成する手段は各スレーブデバイス毎に通信線の異なる条件により、アクセスに必要な選択信号、タイミング信号などを生成するので、通信線に接続された1つのマスタデバイスと2つ(複数)のスレーブデバイスとが通信することが可能となる。
【0026】
【発明の実施の形態】
以下、本発明の実施の形態を、図面を参照しながら詳細に説明する。
図1は、本発明の全体構成を示す図である。
【0027】
図1において、2つのマスタデバイス21、22と2つのスレーブデバイス31、32は、データ信号線11と第1の制御信号線12と第2の制御信号線13との3本の信号線により構成される通信線10を介して接続している。
【0028】
マスタデバイス21、22は、通信線10の状態を監視して上記状態を折り返し読みこむための折返し読込み手段を有し、通信線10を使用しようとする旨の要求をマスタデバイス21、21間で相互に通知する。
【0029】
また、スレーブデバイス31、32は、制御信号を生成するための制御信号生成手段を有し、アクセスに必要な選択信号、タイミング信号などを生成する。
図1中の第1の制御信号線12と第2の制御信号線13との接続が、スレーブデバイス31とスレーブデバイス32とで入れ替わっている。
【0030】
図2は、本発明が適用されるマスタデバイスの回路構成例を示す図である。
図2において、マスタデバイスは、データ信号線11に接続しているポートPB0、PB1と第1の制御信号線12に接続しているポートPB4、PB5と第2の制御信号線13に接続しているポートPB2、PB3との6つのポートを備えたI/Oポート23と、MPU(マイクロプロセッサユニット)25と、データバス24とを備えている。
【0031】
MPU25は、データバス24を介してI/Oポート23に接続され、I/Oポート23に対してデータをライトし、通信線10上のデータ信号線11、第1の制御信号線12、および第2の制御信号線13を有効にする。なお、図中のRESETnは、電源投入時などにバスに対して信号が誤出力されるのを防ぐためのものである。
【0032】
図3は、本発明が適用されるスレーブデバイスの回路構成例を示す図である。図3において、スレーブデバイスは、データ信号線11に接続しているデータ出力端子(DO)、データ入力端子(DI)と、第1の制御信号線12および第2の制御信号線13に接続しているクロック入力端子(SK)、セレクト入力端子(CS)とを備えたシリアルメモリ34と、フリップフロップ33とを備えている。
【0033】
そして、通信線10を介してマスタデバイスからのアクセスにより、シリアルメモリ34への入出力信号が制御される。
また、別のスレーブデバイスは、図3に示したスレーブデバイスと同様に、データ信号線11に接続しているデータ出力端子(DO)、データ入力端子(DI)と、第1の制御信号線12および第2の制御信号線13に接続しているクロック入力端子(SK)、セレクト入力端子(CS)とを備えたシリアルメモリ34と、フリップフロップ33とを備えているが、図3中の第1の制御信号線12と第2の制御信号線13との位置が通信線10上で入れ替わっている。
【0034】
すなわち、図3に示したスレーブデバイスと上記別のスレーブデバイスとにおいては、通信線10を介して接続されたマスタデバイスで第1の制御信号線12と第2の制御信号線13のドライブ条件を入れ替えることで、図3に示したスレーブデバイスのアクセスと上記別のスレーブデバイスのアクセスとを選択することができる。
【0035】
シリアルメモリ34と通信線10との間に存在する制御信号生成部により、バス上の容量がシリアルメモリには影響せず、制御信号生成部の回路容量だけが影響するため、スレーブおよびマスタの数による通信線の容量の増加により伝送速度の影響は受けない。
【0036】
なお、図中のRESETxは、電源投入時などにバスに対して信号が誤出力されるのを防ぐためのものである。
図4は、図1に示した2つのスレーブデバイス31、32へのアクセスのタイミングを説明するためのタイミングチャートである。
【0037】
マスタデバイス(例えば、図1に示したマスタデバイス21)がスレーブデバイス31を選択する場合、時刻t1において、I/Oポート23のポートPB3に“1" をセットすることで、第2の制御信号線13がオンされる。
【0038】
次に、時刻t2において、I/Oポート23のポートPB5に“1" をセットすることで、第1の制御信号線12がオンされる。
そして、時刻t3において、I/Oポート23のポートPB5に“0" をセットすることで第1の制御信号線12をオフされると、選択するスレーブデバイス31内のシリアルメモリ34のセレクト入力端子(CS)がオンとなる。
【0039】
以降は、I/Oポート23のPB5に“1" 、“0" を書込むことでシリアルメモリ34のクロック入力が与えられ、これと同時に必要なデータをI/Oポート23のポートPB0/PB1からリード/ライトすることで、マスタデバイス21内のMPU25は、スレーブデバイス31、32内のシリアルメモリ34をアクセスすることが可能となる。
【0040】
また、マスタデバイス21がスレーブデバイス32を選択する場合、時刻t1において、I/Oポート23のポートPB5に“1" をセットすることで、第1の制御信号線12がオンされる。
【0041】
次に、時刻t2において、I/Oポート23のポートPB3に“1" をセットすることで、第2の制御信号線13がオンされる。
そして、時刻t3において、I/Oポート23のポートPB3に“0" をセットすることで第2の制御信号線13をオフされると、選択するスレーブデバイス32内のシリアルメモリ34のセレクト入力端子(CS)がオンとなる。
【0042】
以降は、I/Oポート23のPB3に“1" 、“0" を書込むことでシリアルメモリ34のクロック入力が与えられ、これと同時に必要なデータをI/Oポート23のポートPB0/PB1からリード/ライトすることで、マスタデバイス21内のMPU25は、スレーブデバイス31、32内のシリアルメモリ34をアクセスすることが可能となる。
【0043】
図4でのシリアルメモリ34のタイミングは、従来の標準的な3線式のビットパターンの一部を表している。
マスタデバイスは、上記ビットパターンの前にt1〜t3の間、一定のビットパターンを追加したビットパターンを送出している。
【0044】
また、スレーブデバイスでは、制御信号生成部において、t1〜t3の間の一定のビットパターンを除去し、従来の標準的な3線式のビットパターンに変換している。
【0045】
従って、t1〜t3の間の一定のビットパターンの後に続くビットパターンは、如何なるビットパターンでも問題なく伝送でき、スレーブデバイスのシリアルメモリは如何なるプロトコルであっても、本方式により通信可能である。
【0046】
この結果、前述した通信線の入れ替えにより、従来のシリアルメモリの接続可能なスレーブ数の増加が可能となる。
以上の説明では、スレーブデバイスの数が2つであるが、制御信号線の数Nを増やし、各スレーブデバイスにおけるシリアルメモリ34のセレクト入力端子 (CS)の選択条件を変える事で、スレーブデバイスの数をN!まで増やす事も可能である。
【0047】
また、スレーブデバイスにおけるシリアルメモリ34を、従来例2の2線式のものに変更する事により2線式で可能なスレーブ数Mを、信号線の容量の影響を受けずにM*N!個とする事も可能である。
【0048】
図5は、図1に示した2つのマスターデバイス21、22がアクセスする場合の調停動作を説明するためのタイミングチャートである。
マスタデバイス21、22内のMPU25は、I/Oポート23経由で通信線10の状態を監視して上記状態を読み込むことができる。
【0049】
通信線10の使用要求が発生した場合、基本的には第1の制御信号線12、第2の制御信号線13がアクティブでなければ、通信線10が他のマスタデバイスに使用されていないため、通信線10を使用できる。しかし同時に第1の制御信号線12、第2の制御信号線13がアクティブでないと判断した場合、同時にアクセスを実施してしまい衝突が発生するためこれを回避するための調停が必要となる。
【0050】
2つのマスタデバイス21、22が同時にアクセス要求が生じた場合の調停手順を説明する。
マスタデバイス21は、アクセス要求が生じた場合、第1の制御信号線12を駆動し、マスタデバイス22は、アクセス要求が生じた場合、第2の制御信号線13を駆動し、それぞれ要求があることを相手マスタデバイス21、22に通知するものとする。また、マスタデバイス21の方がマスタデバイス22よりも優先権が高いものとする。
【0051】
マスタデバイス21は、アクセス要求が生じると、時刻t11において、第1の制御信号線12、第2の制御信号線13をチェックし、どちらも非アクティブであるため通信線10が使用されていないものと判断し、時刻t12において、直ちに第1の制御信号線12をアクティブとする。
【0052】
一方、マスタデバイス22も、アクセス要求が生じ第1の制御信号線12、第2の制御信号線13をチェックし、そのタイミングが時刻t21(時刻t11と時刻t12との間)であるすると、この場合もどちらも非アクティブであるため通信線10が使用されていないものと判断し、時刻t22において、直ちに第2の制御信号線13をアクティブとする。
【0053】
マスタデバイス21は、相互の使用権要求確認のため第1の制御信号線12をアクティブとしてから一定時間(T)経過後の時刻t13において、再度、第1の制御信号線12のチェックを行なう。
【0054】
また、マスタデバイス22も、相互の使用権要求確認のため第2の制御信号線13をアクティブとしてから一定時間(T)経過後の時刻t23において、再度、第2の制御信号線13のチェックを行なう。
【0055】
そして、第1の制御信号線12、第2の制御信号線13ともにアクティブであることから、マスタデバイス21および22は、互いに他のマスタデバイスであるマスタデバイス22および21からもアクセス要求があることが判る。
【0056】
この時、マスタデバイス22は、自分の優先権がマスタデバイス21よりも低いため、時刻t24において、自分のアクセス要求を放棄し、第2の制御信号線13の駆動を停止する。
【0057】
一方、マスタデバイス21は、自分の優先権がマスタデバイス22よりも高いため通信線10の使用権を獲得することができ、時刻t14において、マスタデバイス22が第2の制御信号線13の駆動を停止するのを確認後、通信線10を使用してスレーブデバイスへのアクセスを行なう。
【0058】
なお、時間Tは、第1の制御信号線12、第2の制御信号線13の状態を監視して上記状態をリードし非アクティブであることを確認し第1の制御信号線12または第2の制御信号線13を出力するまでの時間を補償するもので、時刻t11から時刻t12までの時間、時刻t21から時刻t22までの時間よりも大きい(長い)時間とする。
【0059】
以上、本発明を図面を用いて説明してきたが、本発明は、1つのマスタデバイスと2つのスレーブデバイスとの通信制御に関わらず、1つのマスタデバイスと複数のスレーブデバイスとの通信制御に適用することができる。
【0060】
また、本発明は、複数のマスタデバイスと1つのスレーブデバイスとの通信制御にも適用することができる。
また、本発明は、複数のマスタデバイスと複数のスレーブデバイスとの通信制御にも適用することができる。
【0061】
上述の実施の形態では信号線が3本の場合について説明したが、これに限らず信号線はN本(N≧3、N:自然数)であってもよい。また、本発明は上述の実施の形態の構成に限らず次の構成にしてもよい。
【0062】
N本の信号線によって構成される通信線に接続された(N−1)個以下のマスタデバイスと、(N−1)!個以下のスレーブデバイスとを備えたマスタ・スレーブシステムとする。
【0063】
N本の信号線のうち(N−1)本の信号線をスレーブデバイス毎に接続を入れ替える。
制御信号生成手段はフリップフロップで構成する。
【0064】
N本の信号線は、1本のデータ信号線と、(N−1)本の制御信号線からなる。
すなわち、本発明は、以上に述べた実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内で種々の構成または形状を取ることが出来る。
【0065】
【発明の効果】
以上説明したように、本発明によれば、信号線の本数を増やさずに、複数のスレーブデバイスとの高速アクセスを可能とするマスタデバイス、複数のマスタデバイスとの高速アクセスを可能とするスレーブデバイス、および複数のマスタデバイスと複数のスレーブデバイスと間での高速アクセスを可能とするマスタ・スレーブシステムを提供することが可能となる。
【0066】
また、本発明によれば、信号線の数を増やさずに、従来のマスタおよびスレーブアクセス可能数の増加が可能である。
【図面の簡単な説明】
【図1】本発明の全体構成を示す図である。
【図2】本発明が適用されるマスタデバイスの回路構成例を示す図である。
【図3】本発明が適用されるスレーブデバイスの回路構成例を示す図である。
【図4】図1に示した2つのスレーブデバイス31、32へのアクセスのタイミングを説明するためのタイミングチャートである。
【図5】図1に示した2つのマスターデバイス21、22がアクセスする場合の調停動作を説明するためのタイミングチャートである。
【図6】従来のシリアルバス方法を説明するための図である。
【図7】1つのマスタデバイスと2つのスレーブデバイスとが通信線により接続された場合の従来例を示す図である。
【符号の説明】
10 通信線
11 データ信号線
12 第1の制御信号線
13 第2の制御信号線
21、22 マスタデバイス
23 I/Oポート
24 データバス
25 MPU
31、32 スレーブデバイス
33 フリップフロップ
34 シリアルメモリ
60 通信線
61 データ信号線
62 クロック信号線
63 選択信号線
64 マスタデバイス
65 スレーブデバイス
70 通信線
71 データ信号線
72 クロック信号線
73 第1の制御信号線
74 第2の制御信号線
75 マスタデバイス
76、77 スレーブデバイス[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an access method to an external storage device such as a microprocessor and a computer, and in particular, between one master device and a plurality of slave devices, between a plurality of master devices and one slave device, and a plurality of The present invention relates to communication control selectively performed between a master device and a plurality of slave devices.
[0002]
[Prior art]
Conventionally, as a method of accessing storage elements with a small number of connection signal lines, a data signal line for serial transmission of data signals between a master device and a slave device and access from a master device to a slave device are provided. There has been a serial bus method in which transmission control is performed via three signal lines: a clock signal line for transmitting a timing signal for control and a selection signal line for transmitting a selection signal from a master device to a slave device. This will be referred to as Conventional Example 1.
[0003]
FIG. 6 is a diagram for explaining the serial bus method of the first conventional example.
In FIG. 6, a
[0004]
In such a configuration, for example, when reading data, when the
[0005]
When writing data, when the
[0006]
[Problems to be solved by the invention]
However, since the configuration as described above is based on the assumption that data communication is performed between one master device and one slave device, for example, when data communication is performed between one master device and a plurality of slave devices. There has been a problem that the number of selection signal lines constituting the communication line has to be increased to the same number as the number of slave devices.
[0007]
FIG. 7 is a diagram showing a conventional example when one master device and two slave devices are connected by a communication line.
In FIG. 7, one
[0008]
In such a configuration, when the
[0009]
That is, when one master device and two slave devices are connected, a communication constituted by four signal lines, one data signal line and one clock signal line, and two selection signal lines. A line is needed.
[0010]
The same problem occurs when data communication is performed between a plurality of master devices and one slave device.
In order to solve this, there is a two-wire method as another conventional example. This will be referred to as Conventional Example 2.
[0011]
A data signal line that serially transmits a data signal including a slave address between the master device and the slave device, and a clock signal line that transmits a timing signal for controlling access from the master device to the slave device. There is a serial bus method for controlling transmission via two signal lines.
[0012]
Each slave device holds an address and can be accessed when a plurality of slaves are accessed by selecting the slave address when the slave addresses of the data signal lines match. If the signal line is WIRED-OR and multiple masters access the serial bus at the same time, the master with the data signal line set to LOW first acquires the bus, allowing arbitration between multiple masters. It is said.
[0013]
However, in the conventional example 2, since the rising and falling speeds of the signal transmitted through the signal line are required to be higher than a certain value, the bus capacity needs to be lower than a certain value. The maximum transmission speed is about 1/10. Further, when the number of slaves and masters increases, the input / output capacity increases, and there is a problem that the signal transmission speed is further restricted. Therefore, it is necessary to limit the number of masters and slaves.
[0014]
In addition, since the signal is transmitted by two lines, the processing is complicated as compared with the conventional example 1, and there is a problem that the processing on the master side is complicated.
Further, the mainstream of commercially available serial memories is the method of Conventional Example 1, and there is a problem that it is disadvantageous in view of availability and cost.
[0015]
An object of the present invention is to provide a master device that allows high-speed access to a plurality of slave devices without increasing the number of signal lines, a slave device that enables high-speed access to a plurality of master devices, and a high-speed operation. To provide a master / slave system that enables access between a plurality of master devices and a plurality of slave devices.
[0016]
[Means for Solving the Problems]
The present invention employs the following configuration in order to solve the above problems.
That is, according to one aspect of the present invention, a master-slave system of the present invention, a slave having a master device and a serial memory which is connected to the communication line and a single data signal line and two control signal lines A master / slave system comprising a device, wherein the master device generates each bit pattern in which a certain bit pattern is added before a standard selection signal and timing signal for communication with the serial memory. And a switching means for switching each generated bit pattern for each slave device to be communicated and sending it to the two control signal lines. The slave device is connected to the two control signal lines, respectively. Two control signal input terminals, and the two control signal lines and the two control signal input terminals Depending on the connection relationship, in the case of a communicable connection relationship, the fixed bit pattern is removed to generate the standard selection signal and timing signal, whereas in the reverse connection relationship, all bit patterns are generated. Control signal generating means for removing the signal so as to be no signal is provided, the connection relationship between the two control signal lines and the two control signal input terminals is switched for each slave device, and the master device is connected to the switching means. A slave device to be communicated is selected according to the above.
[0017]
Preferably, the master device further corresponds to each of the communication lines, monitors the state of the communication line, and loops back and reads the state, and tries to use the communication line. It is desirable to provide notification means for notifying each other via the two control signal lines with another master device connected to the communication line.
[0018]
There are two (a plurality) requests to use the communication line from the master device and the other master device by the return reading means monitoring the state of the communication line and reading back the state. Therefore, two (a plurality of) master devices can communicate with one slave device.
[0020]
The means for generating the control signal for controlling the slave device generates a selection signal, a timing signal, etc. necessary for access according to different conditions of the communication line for each slave device, so that one master device connected to the communication line and It becomes possible to communicate with two (plural) slave devices.
[0026]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a diagram showing the overall configuration of the present invention.
[0027]
In FIG. 1, two
[0028]
The
[0029]
The
The connection between the first
[0030]
FIG. 2 is a diagram showing a circuit configuration example of a master device to which the present invention is applied.
In FIG. 2, the master device is connected to the ports PB 0 and PB 1 connected to the data signal
[0031]
The MPU 25 is connected to the I / O port 23 via the data bus 24, writes data to the I / O port 23, the data signal
[0032]
FIG. 3 is a diagram showing a circuit configuration example of a slave device to which the present invention is applied. In FIG. 3, the slave device is connected to the data output terminal (DO) and the data input terminal (DI) connected to the data signal
[0033]
An input / output signal to the serial memory 34 is controlled by access from the master device via the
Further, the other slave devices are similar to the slave device shown in FIG. 3, the data output terminal (DO), the data input terminal (DI) connected to the data signal
[0034]
That is, in the slave device shown in FIG. 3 and the other slave device, the drive conditions of the first
[0035]
Since the control signal generation unit existing between the serial memory 34 and the
[0036]
Note that RESETx in the figure is for preventing a signal from being erroneously output to the bus when the power is turned on.
FIG. 4 is a timing chart for explaining the timing of access to the two
[0037]
When the master device (for example, the
[0038]
Next, by setting “1” to the port PB5 of the I / O port 23 at time t2, the first
At time t3, when the first
[0039]
Thereafter, the clock input of the serial memory 34 is given by writing “1” and “0” to the
[0040]
When the
[0041]
Next, by setting “1” to the port PB3 of the I / O port 23 at time t2, the second
At time t3, when the second
[0042]
Thereafter, the clock input of the serial memory 34 is given by writing “1” and “0” to the PB 3 of the I / O port 23, and at the same time, necessary data is transferred to the ports PB 0 / PB 1 of the I / O port 23. By reading / writing from / to, the MPU 25 in the
[0043]
The timing of the serial memory 34 in FIG. 4 represents a part of a conventional standard three-wire bit pattern.
The master device transmits a bit pattern obtained by adding a certain bit pattern between t1 and t3 before the bit pattern.
[0044]
In the slave device, the control signal generator removes a constant bit pattern between t1 and t3 and converts it into a conventional standard three-wire bit pattern.
[0045]
Therefore, any bit pattern that follows the constant bit pattern between t1 and t3 can be transmitted without any problem, and the serial memory of the slave device can communicate with this system regardless of the protocol.
[0046]
As a result, the number of slaves connectable to the conventional serial memory can be increased by replacing the communication lines described above.
In the above description, the number of slave devices is two. However, by increasing the number N of control signal lines and changing the selection condition of the select input terminal (CS) of the serial memory 34 in each slave device, Number N! It is also possible to increase up to.
[0047]
Further, by changing the serial memory 34 in the slave device to the two-wire type of the conventional example 2, the number of slaves M that can be obtained by the two-wire type can be reduced to M * N without being affected by the capacity of the signal line. It is also possible to make an individual.
[0048]
FIG. 5 is a timing chart for explaining the arbitration operation when the two
The MPU 25 in the
[0049]
When a use request for the
[0050]
An arbitration procedure when two
The
[0051]
When an access request occurs, the
[0052]
On the other hand, when the access request occurs and the
[0053]
The
[0054]
In addition, the
[0055]
Since both the first
[0056]
At this time, since the priority of the
[0057]
On the other hand, the
[0058]
During the time T, the state of the first
[0059]
Although the present invention has been described with reference to the drawings, the present invention is applicable to communication control between one master device and a plurality of slave devices regardless of communication control between one master device and two slave devices. can do.
[0060]
The present invention can also be applied to communication control between a plurality of master devices and one slave device.
The present invention can also be applied to communication control between a plurality of master devices and a plurality of slave devices.
[0061]
Although the case where the number of signal lines is three has been described in the above-described embodiment, the number of signal lines is not limited to this, and may be N (N ≧ 3, N: natural number). Further, the present invention is not limited to the configuration of the above-described embodiment, and may be configured as follows.
[0062]
(N-1) or less master devices connected to a communication line constituted by N signal lines, and (N-1)! A master / slave system with less than one slave device.
[0063]
Of the N signal lines, (N-1) signal lines are switched for each slave device.
The control signal generating means is constituted by a flip-flop.
[0064]
The N signal lines are composed of one data signal line and (N−1) control signal lines.
That is, the present invention is not limited to the embodiments described above, and can take various configurations or shapes without departing from the gist of the present invention.
[0065]
【The invention's effect】
As described above, according to the present invention, a master device that enables high-speed access to a plurality of slave devices and a slave device that enables high-speed access to a plurality of master devices without increasing the number of signal lines. It is possible to provide a master / slave system that enables high-speed access between a plurality of master devices and a plurality of slave devices.
[0066]
Further, according to the present invention, it is possible to increase the number of conventional master and slave accessible without increasing the number of signal lines.
[Brief description of the drawings]
FIG. 1 is a diagram showing an overall configuration of the present invention.
FIG. 2 is a diagram showing a circuit configuration example of a master device to which the present invention is applied.
FIG. 3 is a diagram illustrating a circuit configuration example of a slave device to which the present invention is applied;
4 is a timing chart for explaining access timings to two
FIG. 5 is a timing chart for explaining an arbitration operation when two
FIG. 6 is a diagram for explaining a conventional serial bus method;
FIG. 7 is a diagram showing a conventional example when one master device and two slave devices are connected by a communication line.
[Explanation of symbols]
10
31, 32 Slave device 33 Flip-flop 34 Serial memory 60 Communication line 61 Data signal line 62 Clock signal line 63
Claims (2)
前記マスタデバイスは、The master device is
前記シリアルメモリと通信するための標準の選択信号およびタイミング信号の前に、それぞれ一定のビットパターンを追加した各ビットパターンを生成する手段と、Means for generating each bit pattern with a fixed bit pattern added before the standard selection signal and timing signal for communicating with the serial memory;
該生成した各ビットパターンを、通信するスレーブデバイス毎に入れ替えて前記2本の制御信号線に送出する入れ替え手段と、Replacing means that replaces each generated bit pattern for each slave device to be communicated and sends it to the two control signal lines;
を備え、With
前記スレーブデバイスは、The slave device is
前記2本の制御信号線とそれぞれ接続される2つの制御信号入力端子を有し、前記2本の制御信号線と前記2つの制御信号入力端子との接続の関係に応じて、通信可能な接続の関係の場合は前記一定のビットパターンを除去して前記標準の選択信号およびタイミング信号を生成する一方、逆の接続の関係の場合は全ビットパターンを除去して無信号とする制御信号生成手段、A connection having two control signal input terminals respectively connected to the two control signal lines and capable of communicating according to the connection relationship between the two control signal lines and the two control signal input terminals In the case of the relationship, the constant bit pattern is removed to generate the standard selection signal and the timing signal, whereas in the reverse connection relationship, the control signal generation means for removing all the bit patterns and making no signal ,
を備え、With
スレーブデバイス毎に前記2本の制御信号線と2つの制御信号入力端子との接続の関係を入れ替えて接続し、前記マスタデバイスが前記入れ替え手段により通信するスレーブデバイスを選択することを特徴とするマスタ・スレーブシステム。A master characterized in that the connection relationship between the two control signal lines and two control signal input terminals is switched for each slave device, and the master device selects a slave device to be communicated by the switching means.・ Slave system.
前記通信線のそれぞれに対応し、前記通信線の状態を監視して前記状態を折り返して読み込むための折り返し読込み手段と、Corresponding to each of the communication lines, loop-back reading means for monitoring the state of the communication line and looping back and reading the state;
前記通信線を使用しようとする旨の要求を前記通信線に接続された他のマスタデバイスとの間で前記2本の制御信号線を介して相互に通知する通知手段と、A notification means for notifying the request to use the communication line to each other via the two control signal lines with another master device connected to the communication line;
を備えることを特徴とする請求項1に記載のマスタ・スレーブシステム。The master / slave system according to claim 1, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000188896A JP3889205B2 (en) | 2000-06-23 | 2000-06-23 | Master / slave system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000188896A JP3889205B2 (en) | 2000-06-23 | 2000-06-23 | Master / slave system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002009799A JP2002009799A (en) | 2002-01-11 |
JP3889205B2 true JP3889205B2 (en) | 2007-03-07 |
Family
ID=18688605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000188896A Expired - Lifetime JP3889205B2 (en) | 2000-06-23 | 2000-06-23 | Master / slave system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3889205B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4565613B2 (en) * | 2004-04-07 | 2010-10-20 | キヤノン株式会社 | Serial data transfer method, electronic device, and recording apparatus |
-
2000
- 2000-06-23 JP JP2000188896A patent/JP3889205B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2002009799A (en) | 2002-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5862405A (en) | Peripheral unit selection system having a cascade connection signal line | |
KR100224965B1 (en) | The diagnostic/control system using the multi-level i2c bus | |
US6038623A (en) | Electronic network allowing multi-speed communication | |
US8484390B2 (en) | Message handler and method for controlling access to data of a message memory of a communications module | |
US20030191809A1 (en) | I2C repeater with voltage translation | |
JP3797491B2 (en) | Data interface and high-speed communication system using the same | |
JPH0319740B2 (en) | ||
JP2006318480A (en) | Memory system and method of accessing memory chip of memory system | |
US20090300254A1 (en) | Method for Connecting a Flexray user having a Microcontroller to a Flexray Communications line Via a Flexray Communications Control Device, and Flexray Communications Control Device, Flexray User, and Flexray Communications System for Realizing this Method | |
WO2007127700A2 (en) | High speed dual-wire communications device requiring no passive pullup components | |
US20070038795A1 (en) | Asynchronous bus interface and processing method thereof | |
KR100257712B1 (en) | Information exchange device between processes using internet | |
KR101074611B1 (en) | Communications module assembly comprising an interface module and associated interface module | |
JP3889205B2 (en) | Master / slave system | |
JP3751833B2 (en) | Multi-port Ethernet device and external pin minimization method and device | |
CA2261840A1 (en) | Serial data transfer process, and synchronous serial bus interface implementing such process | |
KR100424850B1 (en) | System of Transferring Data Transmission Velocity | |
JP3829906B2 (en) | Microcomputer with built-in EEPROM interface | |
JP2021068806A (en) | Semiconductor device, semiconductor device connection processing method, and electronic device | |
KR100339653B1 (en) | Apparatus for a control board in a switch | |
JPH07200420A (en) | Resetting controller | |
KR0169789B1 (en) | Method and circuit for transmitting data of blocks | |
JP2534765B2 (en) | I / O bus expansion device for programmable controller | |
KR100323910B1 (en) | Data interface and high-speed communication system using the same | |
KR100295683B1 (en) | General call acknowledge apparatus and method for inter-integrated circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040722 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060622 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060627 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060817 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20061128 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061129 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3889205 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101208 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101208 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111208 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111208 Year of fee payment: 5 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111208 Year of fee payment: 5 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111208 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121208 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121208 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131208 Year of fee payment: 7 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |