JP3838809B2 - Serial data transfer device - Google Patents
Serial data transfer device Download PDFInfo
- Publication number
- JP3838809B2 JP3838809B2 JP08852699A JP8852699A JP3838809B2 JP 3838809 B2 JP3838809 B2 JP 3838809B2 JP 08852699 A JP08852699 A JP 08852699A JP 8852699 A JP8852699 A JP 8852699A JP 3838809 B2 JP3838809 B2 JP 3838809B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- serial data
- signal
- slave
- output
- 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 - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、マスタデバイスとスレーブデバイスとの間でシリアルにデータの転送を行うシリアルデータ転送装置に関するものである。
【0002】
【従来の技術】
例えば、マイクロコントローラとその周辺デバイスとの間では、8ビット(1バイト)のデータを1つの単位としてデータのやり取りが行われている。シリアルデータ転送装置は、例えばIIC(I2 C)−bus(Inter-IC Controlバス)(以下、単にIICバスという)に代表されるように、8ビットのデータを単位としてデータのやり取りを行うマスタデバイスと複数のスレーブデバイスとの間でシリアルにデータの転送を行うものである。
【0003】
前述のIICバスを適用するシリアルデータ転送装置では、例えばマイクロコントローラ等の制御する側のマスタデバイスと、周辺機器等の制御される側の複数のスレーブデバイスとの間は、データを転送するためのシリアルデータライン(SDA)と、データを保持するクロック信号を転送するためのシリアルクロックライン(SCL)という、プルアップ抵抗により電源に接続された2つの双方向のシリアルラインで相互に接続されている。
【0004】
ここで、シリアルデータラインは、基本的に、シリアルクロックラインがローレベルの期間に変化する。シリアルクロックラインがハイレベルの間に、シリアルデータラインがハイレベルからローレベルに変化すると、データの転送開始を指示するスタート信号(START)であることを意味し、ローレベルからハイレベルに変化すると、データの転送終了を指示するストップ信号(STOP)であることを意味する。
【0005】
マスタデバイスは、まず、1ビットのスタート信号をシリアルデータライン上に出力する。続いて、各々のスレーブデバイスにあらかじめ独自に割り当てられている7ビットの固有アドレスと、これに続くスレーブデバイスへのデータライトまたはスレーブデバイスからのデータリードを指示する1ビットのデータ制御信号とからなる8ビットのパラレルデータを、シリアルデータライン上にMSB(Most Significant Bit)側から順次シリアルに出力する。
【0006】
各々のスレーブデバイスでは、マスタデバイスからシリアルデータライン上に出力される8ビットのパラレルデータを、シリアルクロックラインから供給されるクロック信号に同期して順次シリアルに受信し、これを自分自身にあらかじめ割り当てられている固有アドレスと比較する。そして、自分自身の固有アドレスに一致するスレーブデバイスが、シリアルデータライン上に1ビットのアクノリッジ信号(肯定応答信号)を出力する。
【0007】
マスタデバイスは、スレーブデバイスからシリアルデータライン上に出力されたアクノリッジ信号を確認した後、スレーブデバイスへのデータライトの場合、転送すべき8ビットのパラレルデータをシリアルデータライン上に順次シリアルに出力する。アクノリッジ信号を出力したスレーブデバイスは、シリアルデータライン上にマスタデバイスから出力される8ビットのパラレルデータを順次シリアルに受信し、その後、同じく1ビットのアクノリッジ信号を出力する。
【0008】
マスタデバイスからスレーブデバイスに対しては、必要に応じて所定バイト数のデータが転送される。その後、マスタデバイスは、1ビットのストップ信号をシリアルデータライン上に出力し、スレーブデバイスは、このストップ信号を受け取ってデータの送信終了を確認する。以後同じようにして、マスタデバイスは、所望の固有アドレスを出力して、次にデータを転送すべきスレーブデバイスを順次指定してデータを転送することを繰り返し行う。
【0009】
IICバスを適用するシリアルデータ転送装置では、データを転送すべき複数のスレーブデバイスを順次アクセスする必要がある。したがって、複数の同じスレーブデバイスに対して、例えばスタート、ストップ、アボート等のスレーブデバイスに接続される複数の同じ装置を制御するための同じ制御信号等を含むデータを転送する場合であっても、複数のスレーブデバイスを同時にアクセスすることができないという問題がある。
【0010】
これを解決するために、従来のシリアルデータ転送装置では、複数のスレーブデバイスに各々接続されている装置に制御信号をマスタデバイスから直接接続して同時に制御したり、あるいは、同時に制御することが無理な場合は、シリアルクロックラインから供給されるクロック信号の周波数を高くして、複数のスレーブデバイスにデータを転送したり、制御する時間差を小さくするなどの手法がとられている。
【0011】
しかし、制御信号をスレーブデバイスに接続されている装置に対してマスタデバイスから直接接続すると、シリアルデータラインやシリアルクロックラインの他にライン数が増大して、シリアルデータ転送のメリットが減少するし、クロック信号の周波数を高くしたとしても、同じデータを各々のスレーブデバイスに繰り返し転送するため、スレーブデバイスの数が多くなるほど長時間が必要になり、無駄が多くなるという問題点がある。
【0012】
【発明が解決しようとする課題】
本発明の目的は、前記従来技術に基づく問題点をかえりみて、マスタデバイスから複数のスレーブデバイスに対して同じデータを同時に転送することができるシリアルデータ転送装置を提供することにある。
【0013】
【課題を解決するための手段】
上記目的を達成するために、本発明は、データを転送するためのシリアルデータラインおよび前記データを保持するクロック信号を転送するためのシリアルクロックラインを介して接続される少なくとも1つのマスタデバイスと、複数のスレーブデバイスと、論理手段とを有し、
通常動作モードにおいて、前記マスタデバイスの1つから前記シリアルデータラインを介して前記スレーブデバイスの1つを指定する固有アドレスが転送され、当該固有アドレスを有するスレーブデバイスが第1の端子より前記シリアルデータラインにアクノリッジ信号を出力し、
ローカルモードにおいて、前記マスタデバイスの1つから前記シリアルデータラインを介して前記複数のスレーブデバイスのうちのあらかじめ設定されている複数のスレーブデバイスに共通の共有アドレスが転送され、当該共有アドレスを有するスレーブデバイスが前記第1の端子と異なる第2の端子よりアクノリッジ信号を前記論理手段に出力し、当該論理手段は前記共有アドレスを有するスレーブデバイスから出力される前記アクノリッジ信号の論理をとって前記シリアルデータラインに出力することを特徴とするシリアルデータ転送装置を提供するものである。
ここで、前記論理手段は前記共有アドレスを有する複数のスレーブデバイスの前記第2の端子に入力端子が接続されたORゲートであるのが好ましい。
【0014】
また、本発明は、データを転送するためのシリアルデータラインおよび前記データを保持するクロック信号を転送するためのシリアルクロックラインを介して少なくとも1つのマスタデバイスと接続されるスレーブデバイスであって、
前記マスタデバイスと前記シリアルデータラインを介してデータ通信を行う手段と、
前記マスタデバイスから前記シリアルデータラインを介して転送されるアドレス情報と自分自身に固有の固有アドレスとを比較する手段と、
前記マスタデバイスから前記シリアルデータラインを介して転送されるアドレス情報と他のスレーブデバイスとの共通の共有アドレスとを比較する手段と、
前記マスタデバイスから転送されたアドレス情報が前記固有アドレスであると認識したときに第1の端子からアクノリッジ信号を出力する手段と、
前記マスタデバイスから転送されたアドレス情報が前記共有アドレスであると認識したときに前記第1の端子とは異なる第2の端子からアクノリッジ信号を出力する手段とを有することを特徴とするスレーブデバイスを提供する。
ここで、さらに、セレクト信号の状態に応じて、前記マスタデバイスから送信される前記データがいずれかに保持される第1および第2のレジスタを有し、
前記第1のレジスタの出力は、当該スレーブデバイスに接続される装置に対して直接接続され、前記第2のレジスタの出力は、I/Oポートを介して、当該スレーブデバイスに接続される装置に双方向に接続されているのが好ましい。
【0015】
【発明の実施の形態】
以下に、添付の図面に示す好適実施例に基づいて、本発明のシリアルデータ転送装置を詳細に説明する。
【0016】
図1は、本発明のシリアルデータ転送装置の一実施例のシステム構成図である。同図に示すシリアルデータ転送装置10は、マスタデバイス(MASTER)12と、本発明を適用するスレーブデバイス(Slave1〜3)14およびORゲート16と、従来構成のスレーブデバイス(Slave)18と、プルアップ抵抗19,20と、シリアルデータラインSDAおよびシリアルクロックラインSCLとを有する。
【0017】
ここで、シリアルデータラインSDAはデータ(制御信号を含む)を転送するためのライン、シリアルクロックラインSCLは、データを保持するクロック信号を供給するためのラインであって、それぞれプルアップ抵抗19および20を介して電源VDDに接続されている。マスタデバイス12はスレーブデバイス14を制御する側のデバイスで、そのSCL端子およびSDA端子は、各々シリアルクロックラインSCLおよびシリアルデータラインに接続されている。
【0018】
続いて、スレーブデバイス14は、マスタデバイス12により制御される側のデバイスであって、そのSCL端子およびSDA1端子は、各々シリアルクロックラインSCLおよびシリアルデータラインSDAに接続され、そのSDA2端子はいずれもORゲート16に入力されている。また、ORゲート16の出力は、オープンドレインまたはオープンコレクタの出力であって、シリアルデータラインSDAに接続されている。
【0019】
同じく、スレーブデバイス18は、マスタデバイス12により制御される側のデバイスで、そのSCL端子およびSDA端子は、各々シリアルクロックラインSCLおよびシリアルデータラインに接続されている。なお、スレーブデバイス14およびORゲート16を除く、マスタデバイス12、スレーブデバイス18、プルアップ抵抗19,20、シリアルデータラインSDAおよびシリアルクロックラインSCLは従来公知の構成のものである。
【0020】
本発明のシリアルデータ転送装置10では、シリアルデータラインSDAおよびシリアルクロックラインSCLを介して、マスタデバイス12と複数のスレーブデバイス14,18との間でシリアルにデータの転送が行われる。詳細は後述するが、マスタデバイス12とスレーブデバイス14,18との間で1対1にデータを転送する他、マスタデバイス12から複数のスレーブデバイス14に対して同時にデータを送信することも可能である。
【0021】
続いて、図2に、マスタデバイスの一実施例の構成概略図を示す。
同図に概念的に示すように、マスタデバイス12は、マイクロコントローラ(CPU)22と、シリアルクロックラインSCLを駆動するオープンドレインタイプのN型MOSトランジスタ(以下、NMOSという)からなる出力バッファ24、および、シリアルデータラインSDAを駆動するオープンドレインタイプのNMOSからなる入出力バッファ26とを有する。
【0022】
マスタデバイス12では、マイクロコントローラ22が、あらかじめ設計されているプログラムに応じて全体の動作を制御する。そして、出力バッファ24により、シリアルクロックラインSCL上にクロック信号を出力したり、入出力バッファ26により、シリアルデータラインSDA上に転送すべきデータを出力する、あるいは、シリアルデータラインSDA上に出力されている受信すべきデータを、入力バッファ28を介して取り込む。
【0023】
続いて、図3に、スレーブデバイスの一実施例のブロック構成図を示す。
スレーブデバイス14は本発明に特有の回路構成を有するもので、同図に示すように、フィルタ30と、バスコントロール回路32と、S/P(シリアル/パラレル)変換回路34と、P/S(パラレル/シリアル)変換回路36と、出力レジスタ38(OUTREG0),40(OUTREG1)と、I/O(入力/出力)ポート42と、入出力(の出力部)バッファ44とを有する。
【0024】
スレーブデバイス14において、まず、フィルタ30には、シリアルクロックライン上に出力されるシリアルクロック信号SCL、および、シリアルデータライン上に出力されるシリアルデータ信号SDA1が入力される。これらの信号SCLおよびSDA1はフィルタ30によってノイズを除去され、それぞれシリアルクロック入力信号SCLINおよびシリアルデータ入力信号SDAINとしてフィルタ30から出力される。
【0025】
フィルタ30から出力されるシリアルクロック入力信号SCLINおよびシリアルデータ入力信号SDAINは、バスコントロール回路32に入力される。この他、バスコントロール回路32には、リセット信号RSTL、セレクト信号SEL1H、固有アドレス信号A0〜2、共有アドレス信号CA0〜2、S/P変換回路34から出力されるパラレルデータ、および、P/S変換回路36から出力されるシリアルデータが入力される。
【0026】
ここで、リセット信号RSTLは、このスレーブデバイス14をリセットして初期化するもので、例えばローレベルの時に、スレーブデバイス14はリセットされる。セレクト信号SEL1Hは、S/P変換後のパラレルデータ(S/P変換出力)を出力レジスタ38または40のどちらに保持するのかを指定する信号で、S/P変換後のパラレルデータは、例えばセレクト信号SEL1Hがハイレベルの時に出力レジスタ40に保持される。
【0027】
本発明のシリアルデータ転送装置10では、マスタデバイス12からスレーブデバイス14,18に対して、所望のスレーブデバイス14,18を指定するために、例えば7ビットのアドレス情報が送信される。固有アドレス信号A0〜2は、各々のスレーブデバイス14に独自の固有アドレスを設定するための信号であり、共有アドレス信号CA0〜2は、あらかじめ設定されている複数のスレーブデバイス14に共通の共有アドレスを設定するための信号である。
【0028】
バスコントロール回路32は、このスレーブデバイス14全体の動作を制御する。バスコントロール回路32からは、フィルタ30から入力されるシリアルデータ入力信号SDAINをシリアルクロック入力信号SCLINで順次保持して得られるシリアルデータの他、ライトクロック信号WCLK0,1、I/Oコントロール信号I/OCONT、シリアルデータ出力SDAOUT、および、シリアルデータ出力SDA2が出力される。
【0029】
ここで、ライトクロック信号WCLK0,1は、前述のセレクト信号SEL1Hの状態に応じて、S/P変換回路34から出力されるS/P変換後のパラレルデータを各々出力レジスタ38および40に保持するためのクロック信号である。例えば、セレクト信号SEL1Hがローレベルの時にはライトクロック信号WCLK0が出力され、セレクト信号SEL1Hがハイレベルの時にはライトクロック信号WCLK1が出力される。
【0030】
本発明のシリアルデータ転送装置10では、前述のアドレス情報に続き、スレーブデバイスへのデータライト、または、スレーブデバイスからのデータリードを指示する1ビットのデータ制御信号が送信される。I/Oコントロール信号I/OCONTは、このデータ制御信号の状態に応じて、スレーブデバイス14と、このスレーブデバイス14に接続される装置(以下、接続装置という)との間で、パラレルデータの入出力方向を切り替えるための信号である。
【0031】
データ制御信号がローレベルの時には、マスタデバイス12からスレーブデバイス14,18へのデータライトを意味し、マスタデバイス12からスレーブデバイス14,18を介して接続装置にデータが送信される。一方、データ制御信号がハイレベルの時には、スレーブデバイス14,18からマスタデバイス12へのデータリードを意味し、接続装置側からスレーブデバイス14,18を介してマスタデバイス12にデータが受信される。
【0032】
続いて、図4に、バスコントロール回路の一実施例のブロック構成図を示す。バスコントロール回路32は、デバイスアドレス検出回路50と、WCLK0および1生成回路52,54と、スタート信号/ストップ信号検出回路56と、データ制御信号検出回路58と、SCLカウンタ60と、SDA1およびSDA2コントローラ62および64と、シリアルデータ保持回路66と、コントローラ68とを有する。
【0033】
まず、コントローラ68は、このバスコントロール回路32全体の動作を制御するものである。コントローラ68から出力される各種の制御信号は、スタート信号/ストップ信号検出回路56を除く、他のデバイスアドレス検出回路50、WCLK0および1生成回路52,54、データ制御信号検出回路58、SCLカウンタ60、SDA1およびSDA2コントローラ62および64、ならびに、シリアルデータ保持回路66に供給される。
【0034】
続いて、スタート信号/ストップ信号検出回路56には、シリアルクロック入力信号SCLINおよびシリアルデータ入力信号SDAINが入力される。スタート信号/ストップ信号検出回路56は、データの転送開始を指示するスタート信号(START)、および、データの転送終了を指示するストップ信号(STOP)を検出する。スタート信号/ストップ信号検出回路56による検出結果はコントローラ68に入力される。
【0035】
本発明のシリアルデータ転送装置10では、基本的に、シリアルデータ入力信号SDAINは、シリアルクロック入力信号SCLINがローレベルの間に変化する。スタート信号/ストップ信号検出回路56は、シリアルクロック入力信号SCLINがハイレベルの間に、シリアルデータ入力信号SDAINのハイレベルからローレベルへの変化を見てスタート信号を検出し、ローレベルからハイレベルへの変化を見てストップ信号を検出する。
【0036】
続いて、デバイスアドレス検出回路50には、セレクト信号SEL1H、固有アドレス信号A0〜2、共有アドレス信号CA0〜2、および、S/P変換回路34から供給されるパラレルデータ(S/P変換出力)が入力される。デバイスアドレス検出回路50は、S/P変換出力(アドレス情報)と各々のスレーブデバイス14にあらかじめ設定されている固有アドレス信号A0〜2および共有アドレス信号CA0〜2とを比較する。
【0037】
デバイスアドレス検出回路50の比較結果は、コントローラ68の他、WCLK0,1生成回路52,54にも入力される。WCLK0,1生成回路52,54は、デバイスアドレス検出回路50からの比較結果を受け取り、データ制御信号によってマスタデバイス12からスレーブデバイス14へのデータライトが指定されている場合、セレクト信号SEL1Hの状態に応じて、各々前述のライトクロック信号WCLK0,1を生成する。
【0038】
ここで、図5に、デバイスアドレス検出回路およびWCLK生成回路の一実施例の構成回路図を示す。同図は、図4に示すバスコントロール回路32の点線で囲まれている部分に相当するもので、まず、デバイスアドレス検出回路50は、2つのコンパレータ(CMP)70,72を有する。また、WCLK0生成回路52はANDゲート74を有し、WCLK1生成回路54は、ANDゲート76およびORゲート78を有する。
【0039】
デバイスアドレス検出回路50において、コンパレータ70には、共有アドレス信号CA0〜6およびS/P変換出力SPR0〜6が入力され、同じく、コンパレータ72には、固有アドレス信号A0〜6およびS/P変換出力SPR0〜6が入力される。コンパレータ70,72は各々入力される両方の信号を比較し、その結果、一致が検出されると、コンパレータ70,72からはハイレベルが出力され、不一致であればローレベルが出力される。
【0040】
なお、固有アドレス信号A0〜6、共有アドレス信号CA0〜6の内、固有アドレス信号A0〜2および共有アドレス信号CA0〜2は、図3および図4に示されている信号である。固有アドレス信号A3〜6および共有アドレス信号CA3〜6は、例えばIICバスの規格との互換性を考慮すれば、‘0100’または‘0111’の固定値とする必要がある。また、S/P変換出力SPR0〜6は、S/P変換後のアドレス情報を表すデータである。
【0041】
コンパレータ70の比較結果は、ANDゲート74,76の一方の端子に入力され、ANDゲート74,76の他方の端子にはセレクト信号SEL1Hが入力される。ANDゲート74からはライトクロック信号WCLK0が出力され、ANDゲート76の出力はORゲート78の一方の端子に入力される。また、コンパレータ72の比較結果はORゲート78の他方の端子に入力され、ORゲート78からはライトクロック信号WCLK1が出力される。
【0042】
すなわち、ライトクロック信号WCLK0は、共有アドレス信号CA0〜6とP/S変換出力SPR0〜6とが一致し、かつ、セレクト信号SEL1Hがローレベルの時にアクティブ状態であるハイレベルとなる。一方、ライトクロック信号WCLK1は、固有アドレス信号A0〜6とS/P変換出力SPR0〜6とが一致するか、共有アドレス信号CA0〜6とP/S変換出力SPR0〜6とが一致し、かつ、セレクト信号SEL1Hがハイレベルの時にハイレベルとなる。
【0043】
続いて、データ制御信号検出回路58には、シリアルデータ入力信号SDAINが入力される。データ制御信号検出回路58は、データ制御信号を検出して、マスタデバイス12からスレーブデバイス14,18へのデータライトであるのか、スレーブデバイス14,18からマスタデバイス12へのデータリードであるのかを判断して、I/Oコントロール信号I/OCONTを発生する。データのライト/リードの識別結果はコントローラ68にも入力される。
【0044】
SCLカウンタ60には、シリアルクロック入力信号SCLINおよびシリアルデータ入力信号SDAINが入力される。データの送受信は、例えば8ビット(1バイト)を1つの単位として転送される。このため、SCLカウンタ60は、スタート信号を基準として、シリアルクロック入力信号SCLINをカウントすることにより、データの送信および受信のタイミングを調整する。SCLカウンタ60によるカウント結果はコントローラ68に入力される。
【0045】
同じく、シリアルデータ保持回路66にも、シリアルクロック入力信号SCLINおよびシリアルデータ入力信号SDAINが入力される。シリアルデータ保持回路66は、シリアルクロック入力信号SCLINに同期して、シリアルデータ入力信号SDAINを順次保持する。シリアルデータ保持回路66に保持されたシリアルデータは、図3に示すように、S/P変換回路34に対して順次出力される。
【0046】
SDA1コントローラ62には、P/S変換回路36から供給されるシリアルデータ(P/S変換出力)が入力される。SDA1コントローラ62は、P/S変換回路36からP/S変換出力を受け取り、これをシリアルデータ出力信号SDAOUTとして入出力バッファ44に対して出力する。また、SDA2コントローラ64は、共有アドレスが指定されている場合に、コントローラ68の制御によりアクノリッジ信号を出力する。
【0047】
データライト時には、バスコントロール回路32からシリアルデータが出力され、S/P変換回路34に入力される。S/P変換回路34は、バスコントロール回路32から供給されるシリアルデータを、例えば8ビットのパラレルデータに変換する。S/P変換後のパラレルデータは、出力レジスタ38,40の他、固有アドレス信号A0〜2および共有アドレス信号CA0〜2との比較のために、バスコントロール回路32にもフィードバックされる。
【0048】
続いて、出力レジスタ38,40は、各々バスコントロール回路32から入力される前述のライトクロック信号WCLK0,1により、S/P変換回路34から出力される、例えば8ビットのパラレルデータを保持する。出力レジスタ38に保持されたパラレルデータは、このスレーブデバイス14の接続装置に対して直接出力され、出力レジスタ40から出力されるパラレルデータはI/Oポート42に入力される。
【0049】
I/Oポート42と接続装置とは双方向に接続される。このため、出力レジスタ40は、スレーブデバイス14と接続装置との間で相互にデータをやり取りするのに適している。これに対し、出力レジスタ38に保持されるパラレルデータは接続装置に対して直接出力される。したがって、出力レジスタ38は、例えばスタート、ストップ、アボート等の接続装置を制御するための制御信号を保持するのに適しており、これを接続装置に直結して使用することができる。
【0050】
I/Oポート42には、上記パラレルデータの他、リセット信号RSTLや、バスコントロール回路32からのI/Oコントロール信号I/OCONTが入力される。I/Oポート42は、I/Oコントロール信号I/OCONTの状態に応じて、出力レジスタ40から供給されるパラレルデータを接続装置に対して出力するか、あるいは、接続装置から供給されるパラレルデータを、次に述べるP/S変換回路36に対して出力するのかを制御する。
【0051】
前述のように、I/Oポート42と接続装置との間は、8ビットのパラレルバスで双方向に接続される。データリード時に接続装置から供給されるパラレルデータは、I/Oポート42からP/S変換回路36に対して出力される。
P/S変換回路36は、I/Oポート42から供給される8ビットのパラレルデータをシリアルデータに変換する。P/S変換回路36から出力されるシリアルデータは、前出のバスコントロール回路32に入力される。
【0052】
バスコントロール回路32は、P/S変換回路36から供給されるシリアルデータをシリアルデータ出力SDAOUTとして順次出力する。このシリアルデータ出力SDAOUTは、入出力バッファ44のインバータ46を介してNMOS48のゲートに入力される。入出力バッファ44のNMOS48のソースはグランドに接続され、そのドレインは、シリアルデータ信号SDA1としてシリアルデータライン上に出力される。
【0053】
入出力バッファ44からは、シリアルデータ信号SDA1として、バスコントロール回路32から供給されるシリアルデータ出力SDAOUTが順次出力される。なお、アクノリッジ信号は、固有アドレスが指定されて、1つのスレーブデバイス14のみがアクセスされる場合にSDA1端子から出力され、共有アドレスが指定されて、全てのスレーブデバイス14が同時にアクセスされる場合にはSDA2端子から出力される。
【0054】
次に、本発明のシリアルデータ転送装置10で使用されるデータ形式について説明する。
【0055】
本発明では、マスタデバイス12は、スタート信号に続くアドレス情報として、固有アドレスまたは共有アドレスのどちらかを選択的に出力可能にプログラムされる。以下の説明では、固有アドレスを使用してスレーブデバイス14または18の中の1つを指定するモードを通常処理モードと呼び、共有アドレスを使用してあらかじめ設定されている複数のスレーブデバイス14を同時に指定するモードをローカルモードと呼ぶことにする。
【0056】
図6は、データ形式の一実施例の概念図である。
通常処理モードの場合には、まず、マスタデバイス12からスタート信号(S)が出力され、続いて、固有アドレス信号およびデータ制御信号(R/W)からなる1バイト目のデータが順次シリアルに出力される。これに対し、固有アドレス信号に一致する固有アドレスが設定されているスレーブデバイス14または18から、アクノリッジ信号(A)が出力される。
【0057】
データ制御信号により、ライト(W)が指定された場合には、マスタデバイス12から、固有アドレス信号に一致する固有アドレスが設定されているスレーブデバイス14または18に対してデータ(DATA0〜n)が送信される。該当するスレーブデバイス14または18は、マスタデバイス12から送信されてくるデータを順次シリアルに受け取り、例えば8ビット(1バイト)のデータを受信した後、アクノリッジ信号(A)を出力する。
【0058】
一方、リード(R)が指定された場合には、該当するスレーブデバイス14,18から、マスタデバイス12に対してデータ(DATA0〜n)が送信される。マスタデバイスは、スレーブデバイス14または18からの8ビットのデータを順次シリアルに受信する。スレーブデバイス14,18は、8ビットのデータを送信した後、アクノリッジ信号(A)を出力する。そして、最後に、マスタデバイス12から、ストップ信号(E)が出力される。
【0059】
これに対して、ローカルモードの時は、まず、セレクト信号SEL1Hがハイレベルの場合、すなわち、出力レジスタ40にデータを書き込む場合、マスタデバイス12からスタート信号(S)が出力され、共有アドレス信号と、マスタデバイス12からスレーブデバイス14,18へのデータの書き込みを指示するデータ制御信号(W)とからなる1バイト目のデータが出力される。これ以後のデータ形式は、通常処理モードの場合と同じである。
【0060】
また、セレクト信号SEL1Hがローレベルの場合、すなわち、出力レジスタ38にデータを書き込む場合、セレクト信号SEL1Hがハイレベルの場合と同じように、マスタデバイス12からスレーブデバイス14,18に対して1バイト目のデータが出力され、次いで、1バイトのデータ(DATA0)のみが送信される。その後、スレーブデバイス14,18からアクノリッジ信号(A)が出力され、マスタデバイス12からストップ信号(E)が出力される。
【0061】
次に、図7に示すフローチャートを参照しながら、本発明のシリアルデータ転送装置の動作について説明する。
【0062】
同図フローチャートのステップS1に示すように、まず、リセット信号RSTLがローレベルとされ、シリアルデータ転送装置10が初期化される。初期化の後、ステップS2へ進み、スレーブデバイス14,18は、マスタデバイス12からスタート信号(START)が出力されるのを検出する。なお、スレーブデバイス14,18は、スタート信号が検出されない場合(N)には、スタート信号が検出される(Y)まで繰り返し検出を行う。
【0063】
スタート信号が検出されると(Y)、全てのスレーブデバイス14,18は、マスタデバイス12から、アドレス情報およびデータ制御信号からなる1バイト目のデータを受信する。ステップS3に示すように、各々のスレーブデバイス14,18は、図4に示すSCLカウンタ60のタイミング制御により、受信したアドレス情報とあらかじめ設定されている固有アドレスとを比較して、自分自身が指定されているのかどうかを検出する。
【0064】
その結果、アドレス情報が自分自身の固有アドレスと一致している(Y)スレーブデバイス14または18は、ステップS4に示す通常処理モードに入り、該当するスレーブデバイス14のSDA端子またはスレーブデバイス18のSDA1端子からローレベルのアクノリッジ信号を出力する。以後、図6に示すデータ形式にしたがい、IICバス規格に準拠して、マスタデバイス12とスレーブデバイス14または18との間でデータのやり取りが行われる。
【0065】
一方、マスタデバイス12からのアドレス情報が、自分自身の固有アドレスと一致しない場合(N)にはステップS5へ進む。そして、各々のスレーブデバイス14は、アドレス情報とあらかじめ設定されている共有アドレスとを比較して、アドレス情報が共有アドレスと一致するかどうかを検出する。
この結果、アドレス情報が共有アドレスである場合(Y)には次のステップS6へ進み、共有アドレスでない場合(N)にはステップS2へ戻る。
【0066】
本実施例では、共有アドレスにより全てのスレーブデバイス14(Slave1〜3)が指定され、ローカルモードに入る。ステップS6に示すように、全てのスレーブデバイス14のSDA2端子からローレベルのアクノリッジ信号が出力され、図1に示すORゲート16に入力され、ORゲート16からシリアルデータラインSDA上にローレベルのアクノリッジ信号が出力される。マスタデバイス12は、これを受信してローカルモードに入ったことを確認する。
【0067】
続いて、ステップS7に進み、全てのスレーブデバイス14において、図4に示すSCLカウンタ60のタイミング制御により、データ制御信号(R/W)が検出される。ローカルモードの場合には、全てのスレーブデバイス14が同時にアクセスされるが、マスタデバイス12は全てのスレーブデバイス14から同時にデータを受信(リード)することはできないため、データライト(W)ではない場合(N)にはイリガル動作であるとしてステップS2へ戻る。
【0068】
一方、データライト(W)である場合(Y)、次のステップS8へ進む。ステップS8では、セレクト信号SEL1Hの状態に応じて、2バイト目のデータを出力レジスタ38に保持するのか、あるいは、出力レジスタ40に保持するのかが決定される。そして、2バイト目のデータを出力レジスタ38に保持する場合にはステップS13へ進み、出力レジスタ40に保持する場合にはステップS9へ進む。
【0069】
ここで、2バイト目のデータを出力レジスタ40に保持する場合(Y)、シリアルデータを順次取り込み、ステップS9として、図4に示すSCLカウンタ60の制御により、8ビット(1バイト)のデータを受信したかどうかを検出する。この時、8ビットのデータ入力がない場合(N)には続くデータは存在せず、送信は終了であるからステップS12へ進む。8ビットのデータ入力がある場合(Y)には次のステップS10へ進む。
【0070】
ステップS10において、全てのスレーブデバイス14のSDA2端子から、ローレベルのアクノリッジ信号が出力され、図1に示すORゲート16により、シリアルデータラインSDA上にローレベルのアクノリッジ信号が出力される。マスタデバイス12は、シリアルデータラインSDA上のアクノリッジ信号を検出して、全てのスレーブデバイス14が2バイト目のデータを受信したことを確認し、次のデータを送信する。
【0071】
一方、全てのスレーブデバイス14では、ステップS11に示すように、図3に示すバスコントロール回路32によって発生されるライトクロックWCLK1により、P/S変換回路34によるP/S変換後のパラレルデータが出力レジスタ40に保持される。
【0072】
そして、ステップS12へ進み、全てのスレーブデバイス14はストップ信号を検出する。スレーブデバイス14によりストップ信号が検出された場合(Y)、マスタデバイス12からスレーブデバイス14へのデータの送信は終了となる。一方、ストップ信号が検出されない場合(N)、マスタデバイス12からスレーブデバイス14へ送信されるデータは複数バイトであるから、ステップS9へ戻って次の8ビットのデータを繰り返し受信する。
【0073】
一方、ステップS8において、2バイト目のデータを出力レジスタ38に保持する場合(N)も、出力レジスタ40に保持する場合と同様に動作する。すなわち、ステップS9〜S12に対応するステップS13〜S16にしたがってデータのやり取りが行われる。本実施例では、送信される制御信号のデータは1バイトであるから、ステップS16で、ストップ信号が検出されない場合(N)にはステップS2へ戻って繰り返し処理を行う。
【0074】
本発明のシリアルデータ転送装置は、基本的に以上のようなものである。
なお、マスタデバイス12は1つ以上何個あってもよいし、スレーブデバイス14は2つ以上の複数個であれば何個であってもよい。また、本発明のシリアルデータ転送装置は、通常処理モードではIICバス規格に準拠しているため、上記実施例にも示すように、本発明を適用するスレーブデバイスと従来構成のスレーブデバイスとを共存させて使用するこができる。
【0075】
上記実施例では、IICバス規格との互換性を考慮して、各信号の極性や転送するデータのビット数、具体的な回路構成等を例示しているが、IICバス規格との互換性が不要であれば、本発明は上記具体例には何ら限定されない。
以上、本発明のシリアルデータ転送装置について詳細に説明したが、本発明は上記実施例に限定されず、本発明の主旨を逸脱しない範囲において、種々の改良や変更をしてもよいのはもちろんである。
【0076】
【発明の効果】
以上詳細に説明した様に、本発明のシリアルデータ転送装置は、マスタデバイスからスレーブデバイスに対して、固有アドレスに対応するアドレス情報を送信し、マスタデバイスとアドレス情報に一致する固有アドレスを有するスレーブデバイスとの間で1対1にデータの送受信を行い、これに対して、共有アドレスに対応するアドレス情報を送信し、マスタデバイスからあらかじめ設定されている複数のスレーブデバイスに対して同時にデータを送信するものである。
したがって、本発明のシリアルデータ転送装置によれば、マスタデバイスとあらかじめ設定されている複数のスレーブデバイスとの間で同じデータを転送したい場合に、これを一度のデータ転送で実現することができる。例えば、従来は7個のスレーブデバイスに同じデータを順次送信していたものが、本発明では1回の送信で済み、6回分の送信時間を削減することができる。また、本発明によれば、接続装置に直接出力されるレジスタを設けることにより、あらかじめ設定されている複数のスレーブデバイスに同時にスタート、ストップ、アボート等の制御信号を送信して、同時に複数の接続装置を制御することができる。例えば、本発明は、あらかじめ指定された複数のRAM(ランダムアクセスメモリ)を同時にクリアするとか、あるいは、VTR(ビデオテープレコーダ)を初めとして、レジスタにあらかじめパラメータを設定しておき、同時にスタートさせるというような制御を要求されるあらゆるシステムに適用可能である。
【図面の簡単な説明】
【図1】 本発明のシリアルデータ転送装置の一実施例のブロック構成図である。
【図2】 マスタデバイスの一実施例の構成概略図である。
【図3】 スレーブデバイスの一実施例のブロック構成図である。
【図4】 バスコントロール回路の一実施例のブロック構成図である。
【図5】 デバイスアドレス検出回路およびWCLK生成回路の一実施例の構成回路図である。
【図6】 データ形式の一実施例の概念図である。
【図7】 本発明のシリアルデータ転送装置の動作を表す一実施例のフローチャートである。
【符号の説明】
10 シリアルデータ転送装置
12 マスタデバイス
14,18 スレーブデバイス
16,78 ORゲート
19,20 プルアップ抵抗
22 マイクロコントローラ
24 出力バッファ
26,44 入出力バッファ
28 入力バッファ
30 フィルタ
32 バスコントロール回路
34 S/P変換回路
36 P/S変換回路
38,40 出力レジスタ
42 I/Oポート
46 インバータ
48 N型MOSトランジスタ
50 デバイスアドレス検出回路
52 WCLK0生成回路
54 WCLK1生成回路
56 スタート信号/ストップ信号検出回路
58 データ制御信号検出回路
60 SCLカウンタ
62 SDA1コントローラ
64 SDA2コントローラ
66 シリアルデータ保持回路
68 コントローラ
70,72 コンパレータ
74,76 ANDゲート
SDA シリアルデータライン
SCL シリアルクロックライン[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a serial data transfer apparatus that serially transfers data between a master device and a slave device.
[0002]
[Prior art]
For example, data is exchanged between a microcontroller and its peripheral devices using 8-bit (1 byte) data as one unit. The serial data transfer device is, for example, IIC (I2 As represented by C) -bus (Inter-IC Control bus) (hereinafter simply referred to as IIC bus), serial communication is performed between a master device that exchanges data in units of 8-bit data and a plurality of slave devices. The data is transferred to the network.
[0003]
In the serial data transfer apparatus to which the above-described IIC bus is applied, for example, data is transferred between a controlling master device such as a microcontroller and a plurality of controlled slave devices such as peripheral devices. A serial data line (SDA) and a serial clock line (SCL) for transferring a clock signal holding data are connected to each other by two bidirectional serial lines connected to a power source by a pull-up resistor. .
[0004]
Here, the serial data line basically changes during a period in which the serial clock line is at a low level. If the serial data line changes from the high level to the low level while the serial clock line is at the high level, it means that it is a start signal (START) instructing the start of data transfer, and if it changes from the low level to the high level. , It means a stop signal (STOP) for instructing the end of data transfer.
[0005]
The master device first outputs a 1-bit start signal on the serial data line. Subsequently, it consists of a 7-bit unique address that is uniquely assigned to each slave device in advance, and a 1-bit data control signal for instructing data write to the slave device or data read from the slave device. 8-bit parallel data is sequentially serially output from the MSB (Most Significant Bit) side on the serial data line.
[0006]
Each slave device receives 8-bit parallel data output from the master device on the serial data line serially in synchronization with the clock signal supplied from the serial clock line, and assigns it in advance to itself. Compare with the unique address. Then, the slave device that matches its own unique address outputs a 1-bit acknowledge signal (acknowledgment signal) on the serial data line.
[0007]
After confirming the acknowledge signal output from the slave device on the serial data line, the master device sequentially outputs 8-bit parallel data to be transferred serially on the serial data line in the case of data write to the slave device. . The slave device that has output the acknowledge signal sequentially receives the 8-bit parallel data output from the master device on the serial data line serially, and then outputs the same 1-bit acknowledge signal.
[0008]
A predetermined number of bytes of data are transferred from the master device to the slave device as necessary. Thereafter, the master device outputs a 1-bit stop signal on the serial data line, and the slave device receives this stop signal and confirms the end of data transmission. Thereafter, in the same manner, the master device repeatedly outputs the desired unique address, sequentially designates the slave devices to which data is to be transferred next, and transfers the data.
[0009]
In a serial data transfer apparatus to which the IIC bus is applied, it is necessary to sequentially access a plurality of slave devices to which data is to be transferred. Therefore, even when transferring data including the same control signal for controlling a plurality of the same devices connected to the slave device such as start, stop, abort, etc., to a plurality of the same slave devices, There is a problem that a plurality of slave devices cannot be accessed simultaneously.
[0010]
To solve this problem, conventional serial data transfer devices cannot be controlled simultaneously by connecting control signals directly from the master device to devices connected to a plurality of slave devices, or cannot be controlled simultaneously. In such a case, the frequency of the clock signal supplied from the serial clock line is increased to transfer data to a plurality of slave devices, or to reduce the time difference for control.
[0011]
However, if the control signal is directly connected to the device connected to the slave device from the master device, the number of lines increases in addition to the serial data line and serial clock line, and the merit of serial data transfer decreases. Even if the frequency of the clock signal is increased, since the same data is repeatedly transferred to each slave device, a longer time is required as the number of slave devices increases, and there is a problem that waste increases.
[0012]
[Problems to be solved by the invention]
An object of the present invention is to provide a serial data transfer apparatus capable of simultaneously transferring the same data from a master device to a plurality of slave devices in view of the problems based on the conventional technology.
[0013]
[Means for Solving the Problems]
To achieve the above object, the present invention provides a serial data line for transferring data and a serial clock line for transferring a clock signal holding the data.ConnectedWith at least one master device,With multiple slave devicesAnd logic means,
In the normal operation mode, a unique address designating one of the slave devices is transferred from one of the master devices via the serial data line, and the slave device having the unique address is transferred from the first terminal to the serial data. An acknowledge signal is output to the line,
In the local mode, a common shared address is transferred from one of the master devices to a plurality of slave devices set in advance among the plurality of slave devices via the serial data line, and the slave having the shared address The device outputs an acknowledge signal from the second terminal different from the first terminal to the logic means, and the logic means takes the logic of the acknowledge signal output from the slave device having the shared address and outputs the serial data. Output to lineThe present invention provides a serial data transfer device characterized by the above.
Here, the logic means is preferably an OR gate having an input terminal connected to the second terminals of a plurality of slave devices having the shared address.
[0014]
Further, the present invention is a slave device connected to at least one master device via a serial data line for transferring data and a serial clock line for transferring a clock signal holding the data,
Means for performing data communication with the master device via the serial data line;
Means for comparing address information transferred from the master device via the serial data line with a unique address unique to itself;
Means for comparing address information transferred from the master device via the serial data line with a common shared address with other slave devices;
Means for outputting an acknowledge signal from a first terminal when the address information transferred from the master device is recognized as the unique address;
Means for outputting an acknowledge signal from a second terminal different from the first terminal when the address information transferred from the master device is recognized as the shared address. provide.
Here, in addition, according to the state of the select signal, the data transmitted from the master device is held in any one of the first and second registers,
The output of the first register isThe slave deviceDirectly against the device connected toConnectionThe output of the second register via the I / O port,The slave deviceIt is preferable that it is connected bidirectionally to the device connected to.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a serial data transfer apparatus according to the present invention will be described in detail based on a preferred embodiment shown in the accompanying drawings.
[0016]
FIG. 1 is a system configuration diagram of an embodiment of a serial data transfer apparatus according to the present invention. The serial
[0017]
Here, the serial data line SDA is a line for transferring data (including a control signal), and the serial clock line SCL is a line for supplying a clock signal for holding data. 20 is connected to the power supply VDD. The
[0018]
Subsequently, the
[0019]
Similarly, the
[0020]
In the serial
[0021]
Next, FIG. 2 shows a schematic configuration diagram of an embodiment of a master device.
As conceptually shown in the figure, the
[0022]
In the
[0023]
Next, FIG. 3 shows a block configuration diagram of an embodiment of a slave device.
The
[0024]
In the
[0025]
The serial clock input signal SCLIN and serial data input signal SDAIN output from the
[0026]
Here, the reset signal RSTL resets and initializes the
[0027]
In the serial
[0028]
The
[0029]
Here, the write clock signals WCLK0 and 1 hold the S / P converted parallel data output from the S /
[0030]
In the serial
[0031]
When the data control signal is at a low level, it means data write from the
[0032]
Next, FIG. 4 shows a block diagram of an embodiment of the bus control circuit. The
[0033]
First, the
[0034]
Subsequently, the serial signal input signal SCLIN and the serial data input signal SDAIN are input to the start signal / stop
[0035]
In the serial
[0036]
Subsequently, the device
[0037]
The comparison result of the device
[0038]
Here, FIG. 5 shows a configuration circuit diagram of an embodiment of the device address detection circuit and the WCLK generation circuit. This figure corresponds to a portion surrounded by a dotted line of the
[0039]
In the device
[0040]
Of the unique address signals A0-6 and shared address signals CA0-6, the unique address signals A0-2 and shared address signals CA0-2 are:3 and 4The signal shown in FIG. The unique address signals A 3 to 6 and the shared
[0041]
The comparison result of the
[0042]
That is, the write clock signal WCLK0 becomes high level when the shared address signals CA0-6 match the P / S conversion outputs SPR0-6 and the select signal SEL1H is at low level. On the other hand, in the write clock signal WCLK1, the unique address signals A0-6 and the S / P conversion outputs SPR0-6 match, or the shared address signals CA0-6 and the P / S conversion outputs SPR0-6 match, and When the select signal SEL1H is at a high level, the signal becomes a high level.
[0043]
Subsequently, the serial data input signal SDAIN is input to the data control
[0044]
A serial clock input signal SCLIN and a serial data input signal SDAIN are input to the
[0045]
Similarly, the serial
[0046]
Serial data (P / S conversion output) supplied from the P /
[0047]
At the time of data writing, serial data is output from the
[0048]
Subsequently, the output registers 38 and 40 hold, for example, 8-bit parallel data output from the S /
[0049]
The I /
[0050]
In addition to the parallel data, a reset signal RSTL and an I / O control signal I / OCONT from the
[0051]
As described above, the I /
The P /
[0052]
The
[0053]
The serial data output SDAOUT supplied from the
[0054]
Next, a data format used in the serial
[0055]
In the present invention, the
[0056]
FIG. 6 is a conceptual diagram of an embodiment of a data format.
In the normal processing mode, first, the start signal (S) is output from the
[0057]
When write (W) is specified by the data control signal, data (DATA 0 to n) is transmitted from the
[0058]
On the other hand, when read (R) is designated, data (DATA 0 to n) is transmitted from the
[0059]
In contrast, in the local mode, first, when the select signal SEL1H is at a high level, that is, when data is written to the
[0060]
When the select signal SEL1H is at a low level, that is, when data is written to the
[0061]
next,FIG.The operation of the serial data transfer apparatus of the present invention will be described with reference to the flowchart shown in FIG.
[0062]
As shown in step S1 of the flowchart, first, the reset signal RSTL is set to low level, and the serial
[0063]
When the start signal is detected (Y), all the
[0064]
As a result, the
[0065]
On the other hand, if the address information from the
As a result, if the address information is a shared address (Y), the process proceeds to the next step S6, and if it is not a shared address (N), the process returns to step S2.
[0066]
In this embodiment, all slave devices 14 (Slave1 to 3) are designated by the shared address, and the local mode is entered. As shown in step S6, a low level acknowledge signal is output from the SDA2 terminal of all the
[0067]
Subsequently, the process proceeds to step S7, and the data control signal (R / W) is detected by the timing control of the
[0068]
On the other hand, if it is data write (W) (Y), the process proceeds to the next step S8. In step S8, it is determined whether the second byte data is held in the
[0069]
Here, when the second byte data is held in the output register 40 (Y), serial data is sequentially fetched, and in step S9, 8-bit (1 byte) data is obtained under the control of the
[0070]
In step S10, a low level acknowledge signal is output from the SDA2 terminals of all the
[0071]
On the other hand, as shown in step S11, all
[0072]
In step S12, all
[0073]
On the other hand, in the case where the second byte data is held in the output register 38 (N) in step S8, the operation is the same as the case where it is held in the
[0074]
The serial data transfer apparatus of the present invention is basically as described above.
Note that the number of
[0075]
In the above embodiment, taking account of compatibility with the IIC bus standard, the polarity of each signal, the number of bits of data to be transferred, a specific circuit configuration, and the like are illustrated, but compatibility with the IIC bus standard is illustrated. If not necessary, the present invention is not limited to the above specific examples.
The serial data transfer device according to the present invention has been described in detail above. However, the present invention is not limited to the above-described embodiments, and various improvements and modifications may be made without departing from the spirit of the present invention. It is.
[0076]
【The invention's effect】
As described above in detail, the serial data transfer device of the present invention transmits address information corresponding to the unique address from the master device to the slave device, and has a unique address that matches the master device and the address information. Sends and receives data to and from the device on a one-to-one basis, sends address information corresponding to the shared address, and sends data to multiple slave devices set in advance from the master device To do.
Therefore, according to the serial data transfer apparatus of the present invention, when it is desired to transfer the same data between the master device and a plurality of slave devices set in advance, this can be realized by a single data transfer. For example, in the past, the same data was sequentially transmitted to seven slave devices. However, in the present invention, only one transmission is required, and the transmission time for six transmissions can be reduced. Further, according to the present invention, by providing a register that is directly output to the connection device, a control signal such as start, stop, and abort is simultaneously transmitted to a plurality of preset slave devices, and a plurality of connections are simultaneously performed. The device can be controlled. For example, according to the present invention, a plurality of RAMs (random access memories) designated in advance are simultaneously cleared, or a parameter is set in advance in a register such as a VTR (video tape recorder) and is started simultaneously. It can be applied to any system that requires such control.
[Brief description of the drawings]
FIG. 1 is a block diagram of an embodiment of a serial data transfer apparatus according to the present invention.
FIG. 2 is a schematic configuration diagram of an embodiment of a master device.
FIG. 3 is a block diagram of an embodiment of a slave device.
FIG. 4 is a block diagram of an embodiment of a bus control circuit.
FIG. 5 is a configuration circuit diagram of an embodiment of a device address detection circuit and a WCLK generation circuit.
FIG. 6 is a conceptual diagram of an embodiment of a data format.
FIG. 7 is a flowchart of an embodiment showing the operation of the serial data transfer apparatus of the present invention.
[Explanation of symbols]
10 Serial data transfer device
12 Master device
14,18 Slave device
16,78 OR gate
19, 20 Pull-up resistor
22 Microcontroller
24 Output buffer
26, 44 I / O buffer
28 Input buffer
30 filters
32 Bus control circuit
34 S / P conversion circuit
36 P / S conversion circuit
38, 40 output register
42 I / O port
46 Inverter
48 N-type MOS transistor
50 Device address detection circuit
52 WCLK0 generation circuit
54 WCLK1 Generation Circuit
56 Start signal / stop signal detection circuit
58 Data control signal detection circuit
60 SCL counter
62 SDA1 controller
64 SDA2 controller
66 Serial data holding circuit
68 controller
70,72 Comparator
74,76 AND gate
SDA serial data line
SCL serial clock line
Claims (4)
通常動作モードにおいて、前記マスタデバイスの1つから前記シリアルデータラインを介して前記スレーブデバイスの1つを指定する固有アドレスが転送され、当該固有アドレスを有するスレーブデバイスが第1の端子より前記シリアルデータラインにアクノリッジ信号を出力し、
ローカルモードにおいて、前記マスタデバイスの1つから前記シリアルデータラインを介して前記複数のスレーブデバイスのうちのあらかじめ設定されている複数のスレーブデバイスに共通の共有アドレスが転送され、当該共有アドレスを有するスレーブデバイスが前記第1の端子と異なる第2の端子よりアクノリッジ信号を前記論理手段に出力し、当該論理手段は前記共有アドレスを有するスレーブデバイスから出力される前記アクノリッジ信号の論理をとって前記シリアルデータラインに出力することを特徴とするシリアルデータ転送装置。A serial data line for transferring data, at least one master device connected via a serial clock line for transferring a clock signal holding the data , a plurality of slave devices, and logic means ,
In the normal operation mode, a unique address designating one of the slave devices is transferred from one of the master devices via the serial data line, and the slave device having the unique address is transferred from the first terminal to the serial data. An acknowledge signal is output to the line,
In the local mode, a common shared address is transferred from one of the master devices to a plurality of slave devices set in advance among the plurality of slave devices via the serial data line, and the slave having the shared address The device outputs an acknowledge signal from the second terminal different from the first terminal to the logic means, and the logic means takes the logic of the acknowledge signal output from the slave device having the shared address and outputs the serial data. A serial data transfer device that outputs to a line .
前記マスタデバイスと前記シリアルデータラインを介してデータ通信を行う手段と、 Means for performing data communication with the master device via the serial data line;
前記マスタデバイスから前記シリアルデータラインを介して転送されるアドレス情報と自分自身に固有の固有アドレスとを比較する手段と、 Means for comparing address information transferred from the master device via the serial data line with a unique address unique to itself;
前記マスタデバイスから前記シリアルデータラインを介して転送されるアドレス情報と他のスレーブデバイスとの共通の共有アドレスとを比較する手段と、 Means for comparing address information transferred from the master device via the serial data line with a common shared address with other slave devices;
前記マスタデバイスから転送されたアドレス情報が前記固有アドレスであると認識したときに第1の端子からアクノリッジ信号を出力する手段と、 Means for outputting an acknowledge signal from the first terminal when the address information transferred from the master device is recognized as the unique address;
前記マスタデバイスから転送されたアドレス情報が前記共有アドレスであると認識したときに前記第1の端子とは異なる第2の端子からアクノリッジ信号を出力する手段とを有することを特徴とするスレーブデバイス。 A slave device comprising: means for outputting an acknowledge signal from a second terminal different from the first terminal when the address information transferred from the master device is recognized as the shared address.
前記第1のレジスタの出力は、当該スレーブデバイスに接続される装置に対して直接接続され、前記第2のレジスタの出力は、I/Oポートを介して、当該スレーブデバイスに接続される装置に双方向に接続されていることを特徴とする請求項3に記載のスレーブデバイス。Furthermore, according to the state of the select signal, it has first and second registers that hold the data transmitted from the master device,
The output of the first register is connected directly to the device connected to the slave device, the output of the second register via the I / O ports, the device connected to the slave device The slave device according to claim 3 , wherein the slave device is connected in both directions.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08852699A JP3838809B2 (en) | 1999-03-30 | 1999-03-30 | Serial data transfer device |
US09/536,040 US6779046B1 (en) | 1999-03-30 | 2000-03-27 | Serial-data transfer system which has a normal mode and a local mode and devices for the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08852699A JP3838809B2 (en) | 1999-03-30 | 1999-03-30 | Serial data transfer device |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2000286872A JP2000286872A (en) | 2000-10-13 |
JP2000286872A5 JP2000286872A5 (en) | 2005-05-19 |
JP3838809B2 true JP3838809B2 (en) | 2006-10-25 |
Family
ID=13945295
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP08852699A Expired - Fee Related JP3838809B2 (en) | 1999-03-30 | 1999-03-30 | Serial data transfer device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3838809B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4650253B2 (en) * | 2005-12-19 | 2011-03-16 | ヤマハ株式会社 | Electronic musical instrument bus system |
JP5104222B2 (en) * | 2007-02-06 | 2012-12-19 | セイコーエプソン株式会社 | Serial communication system |
EP3432150B1 (en) | 2010-12-13 | 2021-01-20 | Nokia Technologies Oy | Method and apparatus for 3d capture synchronisation |
JP2014134866A (en) * | 2013-01-08 | 2014-07-24 | New Japan Radio Co Ltd | Communication system |
US9710410B2 (en) * | 2013-10-31 | 2017-07-18 | Qualcomm Incorporated | Camera control slave devices with multiple slave device identifiers |
CN115543906B (en) * | 2022-11-23 | 2023-04-28 | 荣耀终端有限公司 | Data read-write method and device based on I2C bus |
-
1999
- 1999-03-30 JP JP08852699A patent/JP3838809B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2000286872A (en) | 2000-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101911000B (en) | Control bus for connection of electronic devices | |
US7689756B2 (en) | Apparatus and system for an address translation device | |
US20080270654A1 (en) | Bus System for Selectively Controlling a Plurality of Identical Slave Circuits Connected to the Bus and Method Therefore | |
EP1484689B1 (en) | Card identification compatibility | |
US6658493B1 (en) | Microcomputer exchanging data with host computer | |
JPH04332065A (en) | Method for transferring data | |
US20070250652A1 (en) | High speed dual-wire communications device requiring no passive pullup components | |
US6779046B1 (en) | Serial-data transfer system which has a normal mode and a local mode and devices for the same | |
JP3838809B2 (en) | Serial data transfer device | |
KR20010053365A (en) | Improved inter-device serial bus protocol | |
US7032080B2 (en) | Plural station memory data sharing system | |
JPH0884154A (en) | Bus line system | |
JP3900327B2 (en) | Serial data transfer device | |
US7062593B2 (en) | Circuit system and method for data transmission between LPC devices | |
US6463490B1 (en) | Dual data rate transfer on PCI bus | |
KR101816895B1 (en) | Management serial bus for chassis type communication equipment | |
US4910509A (en) | Bus expander for digital TV receiver | |
JPH1188381A (en) | Communication system, usb function device, communication system control method and medium recording communication condition display program | |
US20220188254A1 (en) | Methods for identifying target slave address for serial communication interface | |
US20220188255A1 (en) | Methods for identifying target slave address for serial communication interface | |
KR100295683B1 (en) | General call acknowledge apparatus and method for inter-integrated circuit | |
JPH11312139A (en) | Serial bus extension circuit | |
JPH0895908A (en) | Bus controller | |
JPH03216752A (en) | Integrated circuit | |
JPH0936930A (en) | Communication control circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040716 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040716 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060710 |
|
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: 20060718 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060801 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090811 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100811 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110811 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110811 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120811 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120811 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130811 Year of fee payment: 7 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R360 | Written notification for declining of transfer of rights |
Free format text: JAPANESE INTERMEDIATE CODE: R360 |
|
R360 | Written notification for declining of transfer of rights |
Free format text: JAPANESE INTERMEDIATE CODE: R360 |
|
R371 | Transfer withdrawn |
Free format text: JAPANESE INTERMEDIATE CODE: R371 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
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 |
|
LAPS | Cancellation because of no payment of annual fees |