JP7086705B2 - Interface circuits and electronic devices - Google Patents
Interface circuits and electronic devices Download PDFInfo
- Publication number
- JP7086705B2 JP7086705B2 JP2018090867A JP2018090867A JP7086705B2 JP 7086705 B2 JP7086705 B2 JP 7086705B2 JP 2018090867 A JP2018090867 A JP 2018090867A JP 2018090867 A JP2018090867 A JP 2018090867A JP 7086705 B2 JP7086705 B2 JP 7086705B2
- Authority
- JP
- Japan
- Prior art keywords
- slave
- address
- interface circuit
- slave address
- register
- 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.)
- Active
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Description
本発明は、マスタデバイスと複数のスレーブデバイスとが2線式の通信手段で接続されたインターフェース回路および電子機器に関する。 The present invention relates to an interface circuit and an electronic device in which a master device and a plurality of slave devices are connected by a two-wire communication means.
近年、電子機器においては、スマートフォンなどのように、多くのセンサ(例えば、カメラ、近接センサ、方位センサ、加速度センサ、角速度センサ、および照度センサ等)を搭載したものが広く普及している。このような電子機器では、センサの制御やセンシングデータの取り込みなどにおいて、I2Cインターフェース等の2線式の通信プロトコルが使われている。 In recent years, electronic devices equipped with many sensors (for example, cameras, proximity sensors, orientation sensors, acceleration sensors, angular velocity sensors, illuminance sensors, etc.) such as smartphones have become widespread. In such electronic devices, a two-wire communication protocol such as an I2C interface is used for sensor control and sensing data acquisition.
ところで、自走式のロボット掃除機等の電子機器においても、多くのセンサ(デバイス)が搭載されるようになっており、さらに普及することが期待されている。ロボット掃除機には、複数の測距センサが搭載され、周辺の障害物との距離を正確に測定し、効率よく掃除を行うことが求められている。そのため、同じ種類の複数のセンサに対して、できるだけ少ない信号線を介してセンシングデータを取得するようにしている。また、複数のデバイスを2線式の通信プロトコルで接続する構成は、ロボット掃除機だけに限らず、例えば、画像形成装置にも適用されている(例えば、特許文献1および特許文献2参照)。
By the way, many sensors (devices) are also installed in electronic devices such as self-propelled robot vacuum cleaners, and it is expected that they will become more widespread. Robot vacuum cleaners are required to be equipped with a plurality of distance measuring sensors to accurately measure the distance to surrounding obstacles and perform efficient cleaning. Therefore, sensing data is acquired for a plurality of sensors of the same type via as few signal lines as possible. Further, the configuration in which a plurality of devices are connected by a two-wire communication protocol is applied not only to a robot vacuum cleaner but also to, for example, an image forming apparatus (see, for example,
特許文献1に記載の画像形成装置では、マスタノードを備えたバス型シリアル通信システムにスレーブノードが接続されており、スレーブノードは、入力されたアナログ電圧値に基づいて、自己のスレーブアドレスを設定するアドレス生成部を備えている。上述した画像形成装置では、アナログ電圧値をA/D変換によって、スレーブアドレスに変換しているので、回路規模が増加し、構成が煩雑になるという課題がある。
In the image forming apparatus described in
特許文献2に記載の画像形成装置は、複数の装填位置に交換可能に装着されるインクカートリッジ(デバイス)と、インクカートリッジに保持されるメモリと、メモリにアクセスするための通信手段とを有しており、アドレス生成手段によって、装填位置とインク種類との対応関係に基づいてアドレスデータを生成している。そして、通信手段には、I2C通信が用いられている。上述した画像形成装置では、インクカートリッジに複数の端子を設け、端子を介して送信する信号の組み合わせによって、スレーブアドレスを設定している。そのため、接続するデバイスの数を多くする場合、アドレスを設定する端子の数を増やす必要があり、デバイスの大型化や煩雑化といった課題がある。
The image forming apparatus described in
本発明は、上記の課題を解決するためになされたものであり、スレーブデバイスを簡便に識別することができるインターフェース回路および電子機器を提供することを目的とする。 The present invention has been made to solve the above problems, and an object of the present invention is to provide an interface circuit and an electronic device capable of easily identifying a slave device.
本発明に係るインターフェース回路は、マスタデバイスと複数のスレーブデバイスとが2線式の通信手段で接続されたインターフェース回路であって、前記マスタデバイスは、前記通信手段に対して別に設けられたアドレス設定手段を介して、前記複数のスレーブデバイスが順に接続されており、前記複数のスレーブデバイスは、前記アドレス設定手段を介して前記マスタデバイスから送信されたスレーブアドレス設定信号によって、それぞれ固有のスレーブアドレスが設定され、且つ、前記固有のスレーブアドレスと併せて、互いに共通したデフォルトスレーブアドレスが設定され、前記スレーブデバイスは、予め設定された有効レジスタを含むレジスタマップを有し、前記デフォルトスレーブアドレスに対する信号を受信した際、前記有効レジスタにアクセスして、前記固有のスレーブアドレスを有効にすることを特徴とする。 The interface circuit according to the present invention is an interface circuit in which a master device and a plurality of slave devices are connected by a two-wire communication means, and the master device is an address setting separately provided for the communication means. The plurality of slave devices are connected in order via the means, and each of the plurality of slave devices has a unique slave address due to a slave address setting signal transmitted from the master device via the address setting means. A default slave address that is set and is common to each other is set in combination with the unique slave address, and the slave device has a register map including preset valid registers and signals to the default slave address. Upon receipt, the valid register is accessed to enable the unique slave address .
本発明に係るインターフェース回路では、前記レジスタマップは、予め設定された制限レジスタを含み、前記制限レジスタは、前記固有のスレーブアドレスを有効にした場合、前記固有のスレーブアドレスに対して送信された通信にのみ、アクセスが許可される構成としてもよい。 In the interface circuit according to the present invention, the register map includes a preset limit register, and the limit register is a communication transmitted to the unique slave address when the unique slave address is enabled. It may be configured to allow access only to.
本発明に係るインターフェース回路では、前記スレーブアドレス設定信号は、複数のパルスを組み合わせた波形とされ、前記複数のスレーブデバイスは、前記パルスの数をカウントして、前記固有のスレーブアドレスを設定する構成としてもよい。 In the interface circuit according to the present invention, the slave address setting signal has a waveform in which a plurality of pulses are combined, and the plurality of slave devices count the number of the pulses to set the unique slave address. May be.
本発明に係るインターフェース回路では、前記スレーブデバイスは、入力されたスレーブアドレス設定信号に対し、前記パルスの数を変更したスレーブアドレス設定信号を、次に接続されたスレーブデバイスへ出力する構成としてもよい。 In the interface circuit according to the present invention, the slave device may be configured to output a slave address setting signal in which the number of pulses is changed with respect to the input slave address setting signal to the next connected slave device. ..
本発明に係る電子機器は、本発明に係るインターフェース回路を備えることを特徴とする。 The electronic device according to the present invention is characterized by comprising an interface circuit according to the present invention.
本発明によると、マスタデバイスからスレーブアドレス設定信号を送信することによって、複数のスレーブデバイスに対し、固有のスレーブアドレスを割り振ることができる。つまり、インターフェース回路内での接続状況に応じて、割り振られるスレーブアドレスが決まるので、スレーブデバイスにおいて、個々にアドレスを特定する処置を必要とせず、簡便に識別することができる。 According to the present invention, a unique slave address can be assigned to a plurality of slave devices by transmitting a slave address setting signal from the master device. That is, since the slave address to be assigned is determined according to the connection status in the interface circuit, the slave device does not need to individually specify the address and can be easily identified.
(第1実施形態)
以下、本発明の第1実施形態に係るインターフェース回路について、図面を参照して説明する。
(First Embodiment)
Hereinafter, the interface circuit according to the first embodiment of the present invention will be described with reference to the drawings.
図1は、本発明の第1実施形態に係るインターフェース回路の概略を示す概略構成図である。 FIG. 1 is a schematic configuration diagram showing an outline of an interface circuit according to a first embodiment of the present invention.
本発明の第1実施形態に係るインターフェース回路1は、マスタデバイス10と複数のスレーブデバイス20とが、2線式の通信手段で接続されている。マスタデバイス10とスレーブデバイス20とは、それぞれに設けられたシリアル通信部2(2線式の通信手段の一例)が、SCLライン71とSDAライン72とに接続されている。SCLライン71は、基準クロックラインであって、SDAライン72は、データラインである。図1では、スレーブデバイス20として、第1スレーブデバイス21ないし第5スレーブデバイス25の5つを接続した構成を示しているが、マスタデバイス10と接続するスレーブデバイス20の数はこれに限らず、適宜変更してもよい。SCLライン71とSDAライン72とは、I/O電源電圧のVIOと抵抗RSCLおよび抵抗RSDAを介して接続され、プルアップされることで通信が行われていないときにハイレベルになる。なお、スレーブデバイス20の詳細な構成については、後述する図4を参照して説明する。
In the
インターフェース回路1では、SCLライン71およびSDAライン72を用いて、2線式の同期式シリアル通信を行っており、シリアル・クロック信号とシリアル・データ信号とを送受信している。シリアル・クロック信号は、バス・マスタが生成しており、シリアル・データ信号は、送受信により、入力と出力との向きが切り替わる双方向通信とされている。なお、I2Cインターフェースとは、2線式の同期式シリアル通信インターフェースのことであって、以下では説明のため、I2Cを用いた通信をI2C通信と呼ぶことがある。マスタデバイス10に対して、複数のスレーブデバイス20を接続した際、スレーブデバイス20では、それぞれ異なる固有のスレーブアドレスを設定することで、いずれのスレーブデバイス20に対する通信であるかを判別することができる。
In the
そこで、インターフェース回路1では、アドレス設定手段3によって、固有のスレーブアドレスを設定する構成とされている。具体的に、マスタデバイス10およびスレーブデバイス20は、それぞれアドレス設定手段3を備えており、マスタデバイス10から、第1スレーブデバイス21、第2スレーブデバイス22、・・・、および第5スレーブデバイス25の順に接続されている。なお、アドレス設定手段3によって行われる通信については、後述する図3を参照して、詳細に説明する。
Therefore, the
図2Aは、I2Cインターフェースにおける通信フォーマットであって、Read時のデータ構成の一例を示す説明図であり、図2Bは、I2Cインターフェースにおける通信フォーマットであって、Write時のデータ構成の一例を示す説明図である。なお、図2Aおよび図2Bでは、マスタデバイス10からスレーブデバイス20へ送信された信号と、スレーブデバイス20からマスタデバイス10へ送信された信号とを区別するため、スレーブデバイス20からマスタデバイス10へ送信された信号をハッチングしている。
FIG. 2A is an explanatory diagram showing an example of a data configuration at the time of Read, which is a communication format in the I2C interface, and FIG. 2B is an explanatory diagram showing an example of a data structure at the time of Write, which is a communication format in the I2C interface. It is a figure. In FIGS. 2A and 2B, in order to distinguish between the signal transmitted from the
図2Aおよび図2Bは、インターフェース回路1で送受信されるデータ構成の一例を示しており、図面の左方から右方へ向かう順でデータが送受信されている。
2A and 2B show an example of a data configuration transmitted / received by the
通信の手順として、先ず、マスタデバイス10は、全てのスレーブデバイス20に対して、スタート・コンディション(Start)と、通信の対象とするスレーブアドレス(Slave Address)と、Read/Writeを指定するデータ(RW)である「0」とを送信する。
As a communication procedure, first, the
マスタデバイス10から送信された信号を受信したスレーブデバイス20では、受信したスレーブアドレスが自己のスレーブアドレスと一致するかどうかを調べる。その結果、スレーブアドレスが一致しない場合は、待機状態に戻る。一方、スレーブアドレスが一致する場合は、「ACK」を送信し、マスタデバイス10に通信可能であることを伝える。
The
その後、図2Aの示すRead時の読取信号RSでは、マスタデバイス10からレジスタのワードアドレス(Word Address)が送信され、スレーブデバイス20が「ACK」を出力する。そして、マスタデバイス10は、ストップ・コンディション(Stop)を発行し、再度、スタート・コンディションとスレーブアドレスとを出力して、Readモードを示す「1」を出力することで、スレーブデバイス20はReadモードになる。
After that, in the read signal RS at the time of Read shown in FIG. 2A, the word address (Word Address) of the register is transmitted from the
通信の対象とされたスレーブデバイス20は、ワードアドレスを先頭とするレジスタ内容(Read Data)を、順次8ビット単位で送信し、マスタデバイス10が「ACK」を出力する。この処理は適宜繰り返され、マスタデバイス10が「ACK」に換えて、「NACK」とストップ・コンディションとを発行することで通信は停止され、スレーブデバイス20は通信待機状態になる。
The
また、図2Bの示すWrite時の書込み信号WSでは、マスタデバイス10がスタート・コンディションとスレーブアドレスとを発行した後、対応するスレーブデバイス20が「ACK」を返す。その後、マスタデバイス10は、書き込みたいレジスタのワードアドレスを送信し、スレーブデバイス20が「ACK」を返して書込み可能状態になる。そして、マスタデバイス10が順次8ビットの書込みデータ(Write Data)を送信して、スレーブデバイス20が「ACK」を出力し、スレーブデバイス20のレジスタに情報が書き込まれる。最後に、マスタデバイス10がストップ・コンディションを発行して通信は停止し、スレーブデバイス20は通信待機状態になる。
Further, in the write signal WS at the time of Write shown in FIG. 2B, after the
図3は、アドレス設定手段を介して送信されるスレーブアドレス設定信号を示す説明図である。 FIG. 3 is an explanatory diagram showing a slave address setting signal transmitted via the address setting means.
図3では、第1スレーブデバイス21ないし第5スレーブデバイス25のそれぞれに対し、送信されるスレーブアドレス設定信号(信号S1ないし信号S5)の波形を示している。図3に示すように、スレーブアドレス設定信号は、複数のパルスPSを組み合わせた波形とされている。
FIG. 3 shows waveforms of slave address setting signals (signals S1 to S5) transmitted to each of the
具体的に、信号S1は、マスタデバイス10から第1スレーブデバイス21に送信されるスレーブアドレス設定信号であって、7つのパルスPSを有している。信号S2は、第1スレーブデバイス21から第2スレーブデバイス22に送信されるスレーブアドレス設定信号であって、6つのパルスPSを有している。信号S3は、第2スレーブデバイス22から第3スレーブデバイス23に送信されるスレーブアドレス設定信号であって、5つのパルスPSを有している。信号S4は、第3スレーブデバイス23から第4スレーブデバイス24に送信されるスレーブアドレス設定信号であって、4つのパルスPSを有している。信号S5は、第4スレーブデバイス24から第5スレーブデバイス25に送信されるスレーブアドレス設定信号であって、3つのパルスPSを有している。つまり、信号S1ないし信号S5では、順にパルスPSの数が1つずつ減っていく。
Specifically, the signal S1 is a slave address setting signal transmitted from the
スレーブアドレス設定手段3では、マスタデバイス10の出力端子(GPIO端子)と第1スレーブデバイス21の入力端子(DI端子)とが接続されている。各スレーブデバイス20の出力端子(DO端子)は、次のスレーブデバイス20のDI端子と接続されている。つまり、インターフェース回路1は、シリアル通信部2とスレーブアドレス設定手段3との2種類で接続されたデイジーチェーン接続になっている。
In the slave address setting means 3, the output terminal (GPIO terminal) of the
第1スレーブデバイス21では、信号S1が入力されると、1番目のパルスPSを遮断して、2番目以降のパルスPSを出力する。第2スレーブデバイス22には、信号S1よりもパルスPSが1つ減った信号S2が入力され、さらに、パルスPSを1つ減らして出力する。このように、スレーブデバイス20は、入力されたスレーブアドレス設定信号に対し、パルスPSの数を変更したスレーブアドレス設定信号を、次に接続されたスレーブデバイス20へ出力する構成とされている。
When the signal S1 is input, the
スレーブアドレス設定手段3では、スレーブアドレス設定終了時までに入力される信号において、パルスPSの立ち上がりエッジの数をカウントして、スレーブアドレスを設定する。図3に示す信号S1ないし信号S5では、立ち上がりエッジ数が3~7になるので、例えば、スレーブアドレスの下位3桁のビットを3~7に設定して、固有のスレーブアドレスを割り振ることができる。つまり、第1スレーブデバイス21では、スレーブアドレスが「0000111」とされ、第2スレーブデバイス22では、スレーブアドレスが「0000110」とされ、第3スレーブデバイス23では、スレーブアドレスが「0000101」とされ、第4スレーブデバイス24では、スレーブアドレスが「0000100」とされ、第5スレーブデバイス25では、スレーブアドレスが「0000011」とされる。なお、スレーブアドレス設定手段3は、連続したスレーブアドレスとはせずに、デコーダや変換テーブルを用いて、任意のI2Cスレーブアドレスに変換してもよい。
The slave address setting means 3 sets the slave address by counting the number of rising edges of the pulse PS in the signal input by the end of the slave address setting. In the signals S1 to S5 shown in FIG. 3, the number of rising edges is 3 to 7, so that, for example, the lower three digits of the slave address can be set to 3 to 7 to allocate a unique slave address. .. That is, in the
本実施の形態において、スレーブアドレスは、7ビットとされているが、これに限定されず、スレーブアドレスのビット数を適宜変更してもよい。スレーブアドレスを7ビットとした際には、最大128のスレーブアドレスを設定できる。 In the present embodiment, the slave address is 7 bits, but the present invention is not limited to this, and the number of bits of the slave address may be appropriately changed. When the slave address is 7 bits, a maximum of 128 slave addresses can be set.
上述したように、複数のスレーブデバイス20は、アドレス設定手段3を介してマスタデバイス10から送信されたスレーブアドレス設定信号によって、それぞれ固有のスレーブアドレスが設定される。このように、マスタデバイス10からスレーブアドレス設定信号を送信することによって、複数のスレーブデバイス20に対し、固有のスレーブアドレスを割り振ることができる。つまり、インターフェース回路1内での接続状況に応じて、割り振られるスレーブアドレスが決まるので、スレーブデバイス20において、個々にアドレスを特定する処置を必要とせず、簡便に識別することができる。
As described above, each of the plurality of
本実施の形態では、パルスPSの数をカウントしているので、微細な波形のずれなどによる誤検知を避けて、簡便に固有のスレーブアドレスを設定できる。また、スレーブアドレス設定信号のパルスPSの数を、順に変更して出力していくことで、それぞれ固有のスレーブアドレスを簡単に設定することができる。 In the present embodiment, since the number of pulse PSs is counted, it is possible to easily set a unique slave address while avoiding erroneous detection due to a minute waveform deviation or the like. Further, by changing the number of pulse PSs of the slave address setting signal in order and outputting them, it is possible to easily set each unique slave address.
(第2実施形態)
次に、本発明の第2実施形態に係るインターフェース回路について、図面を参照して説明する。なお、第2実施形態において、第1実施形態と機能が実質的に等しい構成要素については、同一の符号を付して説明を省略する。
(Second Embodiment)
Next, the interface circuit according to the second embodiment of the present invention will be described with reference to the drawings. In the second embodiment, the components having substantially the same functions as those in the first embodiment are designated by the same reference numerals and the description thereof will be omitted.
図4は、スレーブデバイスの概略を示す概略構成図である。 FIG. 4 is a schematic configuration diagram showing an outline of a slave device.
本発明の第2実施形態に係るインターフェース回路1において、スレーブデバイス20は、シリアル通信部2に相当するI2C回路34と、アドレス設定手段3とに加えて、センサ回路31、制御ロジック32、およびレジスタ33を備えている。センサ回路31は、制御ロジック32およびレジスタ33を介してI2C回路34と接続されている。I2C回路34は、SCL端子(SCLライン71に対応)とSDA端子(SDAライン72に対応)とが接続されており、I2C通信を行う。
In the
アドレス設定手段3は、DI端子とDO端子との間に設けられており、DI端子からの信号の流れに沿って、各部を説明する。DI端子から入力された信号(以下では、DI信号と略す)は、シュミットトリガバッファSB1を通り、カウンタ36、パルス検知手段37、および第1バッファB1に入力される。カウンタ36は、DI信号(例えば、信号S1など)の立ち上がりエッジの数をカウントして、カウント値をデコーダ35に出力する。デコーダ35は、入力されたカウント値を対応するスレーブアドレスに変換し、I2C回路34に出力する。I2C回路34は、入力されたスレーブアドレスに基づいて、通信を行う。
The address setting means 3 is provided between the DI terminal and the DO terminal, and each part will be described along with the flow of signals from the DI terminal. The signal input from the DI terminal (hereinafter abbreviated as DI signal) passes through the Schmitt trigger buffer SB1 and is input to the
パルス検知手段37は、DI信号の1番目のパルスPSを遮断し、立ち上がりエッジと立下りエッジとが各1回検出された後、SW1をONにする。SW1がONになることで、第1バッファB1の出力が第2バッファB2を介して、DO端子に出力される。つまり、第1バッファB1に入力されたDI信号のうち、1番目のパルスPSは、SW1がOFFにされているので出力されず、SW1がONになった後、2番目以降のパルスPSが、DO端子から出力される。 The pulse detecting means 37 cuts off the first pulse PS of the DI signal, detects the rising edge and the falling edge once each, and then turns on SW1. When SW1 is turned ON, the output of the first buffer B1 is output to the DO terminal via the second buffer B2. That is, among the DI signals input to the first buffer B1, the first pulse PS is not output because SW1 is turned off, and after SW1 is turned on, the second and subsequent pulse PSs are displayed. It is output from the DO terminal.
カウンタ36およびパルス検知手段37には、POR38が接続されており、スレーブデバイス20の電源投入時に、POR38は、カウンタ36とパルス検知手段37とをリセットする。電源投入後、マスタデバイス10は、I2C通信を始める前に、スレーブアドレスの設定を行うことで、各スレーブデバイス20に対し固有のスレーブアドレスを割り振ることができる。
A
(第3実施形態)
次に、本発明の第3実施形態に係るインターフェース回路について、図面を参照して説明する。なお、第3実施形態において、第1実施形態および第2実施形態と機能が実質的に等しい構成要素については、同一の符号を付して説明を省略する。
(Third Embodiment)
Next, the interface circuit according to the third embodiment of the present invention will be described with reference to the drawings. In the third embodiment, the components having substantially the same functions as those of the first embodiment and the second embodiment are designated by the same reference numerals and the description thereof will be omitted.
図5は、本発明の第3実施形態に係るインターフェース回路において用いられるレジスタマップの一例を示す説明図である。 FIG. 5 is an explanatory diagram showing an example of a register map used in the interface circuit according to the third embodiment of the present invention.
本発明の第3実施形態に係るインターフェース回路1において、スレーブデバイス20では、固有のスレーブアドレスと併せて、デフォルトスレーブアドレスが設定されている。なお、以下では説明のため、固有のスレーブアドレスをマルチスレーブアドレスと呼ぶことがある。デフォルトスレーブアドレスは、全てのスレーブデバイス20において、予め共通に設定されている。例えば、デフォルトスレーブアドレスを「0101001」に設定した場合、マルチスレーブアドレスは、任意の7ビットのアドレスとされ、デフォルトスレーブアドレスと異なるように設定される。
In the
図5に示すレジスタマップは、スレーブデバイス20の記憶領域に予め記憶されている。レジスタマップでは、レジスタアドレス(ADDR)と、レジスタ(BITの欄)とが関連付けられている。レジスタアドレス「00h」は、複数のスレーブデバイス20に対して共通設定用のレジスタとされ、図5に示すレジスタマップでは、動作モード設定用のレジスタ(COP2~COP7)と、ソフトウェアリセット用レジスタ(RST)と、マルチスレーブアドレスの有効/無効を設定するマルチスレーブレジスタ(MLT_SLV)とを含んでいる。
The register map shown in FIG. 5 is stored in advance in the storage area of the
電源投入後にリセットした際、ソフトウェアリセット用レジスタによって、複数のスレーブデバイス20が初期化され、その後、マスタデバイス10からのアドレス設定信号によって、スレーブアドレスが割り振られる。ここで、マルチスレーブレジスタ(有効レジスタ)を「0」から「1」に変更することで、複数のスレーブデバイス20において、マルチスレーブアドレスが有効になる。つまり、マルチスレーブレジスタが「0」とされているとき、マルチスレーブアドレスは、無効になっている。
When resetting after the power is turned on, the software reset register initializes the plurality of
また、レジスタアドレス「01h」には、各スレーブデバイス20で固有の動作設定用レジスタ(OP0~OP7)が配置されている。レジスタアドレス「02h」およびレジスタアドレス「03h」は、読み取り専用のレジスタとされており、16ビットのデジタル情報(RANGE0~RANGE15)が格納されている。例えば、スレーブデバイス20が測距センサである場合、デジタル情報は、測定した距離値に相当する。上述したレジスタアドレス「01h」ないしレジスタアドレス「03h」に対応するレジスタ(制限レジスタ)へのアクセスに関して、マルチスレーブレジスタが「1」の場合には、マルチスレーブアドレスに対して送信された通信のみがアクセス可能とされている。
Further, at the register address "01h", operation setting registers (OP0 to OP7) unique to each
上述したように、スレーブデバイス20は、予め設定された有効レジスタを含むレジスタマップを有し、デフォルトスレーブアドレスに対する信号を受信した際、有効レジスタにアクセスして、固有のスレーブアドレスを有効にする構成とされている。このように、有効レジスタを設定することで、インターフェース回路1に組み込むスレーブデバイス20と、それ以外のデバイスとを区別することができる。つまり、有効レジスタにアクセスして、固有のスレーブアドレスを有効にすることで、複数のスレーブデバイス20のうちの1つとして認識され、マスタデバイス10との双方向通信が開始される。
As described above, the
また、レジスタマップは、予め設定された制限レジスタを含む。制限レジスタは、マルチスレーブアドレスを有効にした場合、マルチスレーブアドレスに対して送信された通信にのみ、アクセスが許可される。スレーブデバイス20には、マルチスレーブアドレスとデフォルトスレーブアドレスとの2種類が設定されているので、同じ種類の複数のデバイスの通信が衝突することなく取り出すことができる。さらに、制限レジスタへのアクセスを制限して、複数のデバイス間での通信の衝突を避けることができる。
The register map also includes preset limit registers. When the multi-slave address is enabled, the restriction register allows access only to the communication sent to the multi-slave address. Since the
(電子機器)
上述した本発明の第1実施形態ないし第3実施形態に係るインターフェース回路は、電子機器に適用することができる。次に、電子機器の一例であるロボット掃除機について、図面を参照して説明する。
(Electronics)
The interface circuit according to the first to third embodiments of the present invention described above can be applied to an electronic device. Next, a robot vacuum cleaner, which is an example of an electronic device, will be described with reference to the drawings.
図6は、電子機器の一例であるロボット掃除機を示す概略外観図である。 FIG. 6 is a schematic external view showing a robot vacuum cleaner which is an example of an electronic device.
ロボット掃除機50には、進行方向正面を中心に5つの測距センサ60が設けられている。ロボット掃除機50は、自走式とされ、測距センサ60によって障害物までの距離を検知しながら、掃除を行う。測距センサ60は、上述したスレーブデバイス20に相当し、I2C通信を行う。ロボット掃除機50の電源投入時には、5つの測距センサ60に対して、マルチスレーブアドレスを設定することで、5方向の障害物の検知を行い、データをI2C通信経由で取得することができる。
The
なお、今回開示した実施の形態は全ての点で例示であって、限定的な解釈の根拠となるものではない。従って、本発明の技術的範囲は、上記した実施の形態のみによって解釈されるものではなく、特許請求の範囲の記載に基づいて画定される。また、特許請求の範囲と均等の意味および範囲内での全ての変更が含まれる。 It should be noted that the embodiments disclosed this time are examples in all respects and do not serve as a basis for a limited interpretation. Therefore, the technical scope of the present invention is not construed solely by the embodiments described above, but is defined based on the description of the scope of claims. It also includes all changes within the meaning and scope of the claims.
1 インターフェース回路
2 シリアル通信部(通信手段の一例)
3 アドレス設定手段
10 マスタデバイス
20 スレーブデバイス
50 ロボット掃除機(電子機器の一例)
60 測距センサ
71 SCLライン
72 SDAライン
1
3 Address setting means 10
60
Claims (5)
前記マスタデバイスは、前記通信手段に対して別に設けられたアドレス設定手段を介して、前記複数のスレーブデバイスが順に接続されており、
前記複数のスレーブデバイスは、前記アドレス設定手段を介して前記マスタデバイスから送信されたスレーブアドレス設定信号によって、それぞれ固有のスレーブアドレスが設定され、且つ、前記固有のスレーブアドレスと併せて、互いに共通したデフォルトスレーブアドレスが設定され、
前記スレーブデバイスは、
予め設定された有効レジスタを含むレジスタマップを有し、
前記デフォルトスレーブアドレスに対する信号を受信した際、前記有効レジスタにアクセスして、前記固有のスレーブアドレスを有効にすること
を特徴とするインターフェース回路。 An interface circuit in which a master device and a plurality of slave devices are connected by a two-wire communication means.
In the master device, the plurality of slave devices are sequentially connected to the communication means via an address setting means separately provided.
A unique slave address is set for each of the plurality of slave devices by a slave address setting signal transmitted from the master device via the address setting means, and the plurality of slave devices are shared with each other together with the unique slave address. The default slave address is set,
The slave device is
It has a register map containing preset valid registers and
Upon receiving a signal for the default slave address, access the valid register to enable the unique slave address.
An interface circuit featuring.
前記レジスタマップは、予め設定された制限レジスタを含み、
前記制限レジスタは、前記固有のスレーブアドレスを有効にした場合、前記固有のスレーブアドレスに対して送信された通信にのみ、アクセスが許可されること
を特徴とするインターフェース回路。 The interface circuit according to claim 1 .
The register map contains preset limit registers.
The restriction register is an interface circuit characterized in that when the unique slave address is enabled, access is permitted only to the communication transmitted to the unique slave address.
前記スレーブアドレス設定信号は、複数のパルスを組み合わせた波形とされ、
前記複数のスレーブデバイスは、前記パルスの数をカウントして、前記固有のスレーブアドレスを設定すること
を特徴とするインターフェース回路。 The interface circuit according to claim 1 or 2 .
The slave address setting signal is a waveform in which a plurality of pulses are combined.
The plurality of slave devices are an interface circuit characterized in that the number of the pulses is counted and the unique slave address is set.
前記スレーブデバイスは、入力されたスレーブアドレス設定信号に対し、前記パルスの数を変更したスレーブアドレス設定信号を、次に接続されたスレーブデバイスへ出力すること
を特徴とするインターフェース回路。 The interface circuit according to claim 3 .
The slave device is an interface circuit characterized in that, with respect to an input slave address setting signal, a slave address setting signal in which the number of pulses is changed is output to the next connected slave device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018090867A JP7086705B2 (en) | 2018-05-09 | 2018-05-09 | Interface circuits and electronic devices |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018090867A JP7086705B2 (en) | 2018-05-09 | 2018-05-09 | Interface circuits and electronic devices |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019197995A JP2019197995A (en) | 2019-11-14 |
| JP7086705B2 true JP7086705B2 (en) | 2022-06-20 |
Family
ID=68537713
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018090867A Active JP7086705B2 (en) | 2018-05-09 | 2018-05-09 | Interface circuits and electronic devices |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7086705B2 (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114631158A (en) | 2019-10-30 | 2022-06-14 | 佳能株式会社 | Composition and heat transport device |
| JP7169571B2 (en) * | 2020-04-03 | 2022-11-11 | 株式会社藤商事 | game machine |
| JP7169570B2 (en) * | 2020-04-03 | 2022-11-11 | 株式会社藤商事 | game machine |
| JP7169569B2 (en) * | 2020-04-03 | 2022-11-11 | 株式会社藤商事 | game machine |
| US11316711B2 (en) * | 2020-07-29 | 2022-04-26 | Astec International Limited | Systems, devices and methods for automatically addressing serially connected slave devices |
| CN118214740A (en) * | 2022-12-16 | 2024-06-18 | 上海艾为电子技术股份有限公司 | Address allocation method, system, chip and electronic equipment |
| CN119513008A (en) * | 2024-09-25 | 2025-02-25 | 山东云海国创云计算装备产业创新中心有限公司 | Address allocation method, device and system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003032255A (en) | 2001-07-16 | 2003-01-31 | Japan Tobacco Inc | Terminal control system |
| JP2006197516A (en) | 2005-01-17 | 2006-07-27 | Ricoh Co Ltd | Image processing system |
| JP2010166248A (en) | 2009-01-14 | 2010-07-29 | Fuji Electric Retail Systems Co Ltd | Communicating system |
| JP2014144319A (en) | 2014-01-16 | 2014-08-14 | Sophia Co Ltd | Game machine |
| US20180013578A1 (en) | 2016-07-07 | 2018-01-11 | Caterpillar Inc. | Identifying and configuring multiple smart devices on a can bus |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3601652B2 (en) * | 1998-02-25 | 2004-12-15 | ニッタン株式会社 | Communication control device and control system |
-
2018
- 2018-05-09 JP JP2018090867A patent/JP7086705B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003032255A (en) | 2001-07-16 | 2003-01-31 | Japan Tobacco Inc | Terminal control system |
| JP2006197516A (en) | 2005-01-17 | 2006-07-27 | Ricoh Co Ltd | Image processing system |
| JP2010166248A (en) | 2009-01-14 | 2010-07-29 | Fuji Electric Retail Systems Co Ltd | Communicating system |
| JP2014144319A (en) | 2014-01-16 | 2014-08-14 | Sophia Co Ltd | Game machine |
| US20180013578A1 (en) | 2016-07-07 | 2018-01-11 | Caterpillar Inc. | Identifying and configuring multiple smart devices on a can bus |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019197995A (en) | 2019-11-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7086705B2 (en) | Interface circuits and electronic devices | |
| US9990316B2 (en) | Enhanced serial peripheral interface | |
| USRE44270E1 (en) | System for providing access of multiple data buffers to a data retaining and processing device | |
| US7606955B1 (en) | Single wire bus for connecting devices and methods of operating the same | |
| US7181557B1 (en) | Single wire bus for connecting devices and methods of operating the same | |
| EP2927815B1 (en) | Multi-drop serial bus with location detection and method | |
| US5974475A (en) | Method for flexible multiple access on a serial bus by a plurality of boards | |
| US7444453B2 (en) | Address translation device | |
| TWI590061B (en) | Address translation in i2c data communications system | |
| US9003096B2 (en) | Serial interface | |
| KR101711698B1 (en) | Method for processing data, and data processing apparatus | |
| JP2012008982A (en) | Communication interface device and communication method | |
| CN105677598A (en) | Module and method for quickly reading data of multiple MEMS sensors on basis of I2C interface | |
| CN106851183B (en) | Multi-channel video processing system and method based on FPGA | |
| CN115203092A (en) | Single-master multi-slave single-wire communication method, device and equipment | |
| CN105446837A (en) | Method, device and system for detecting whether IIC (inter-integrated circuit) interface device is connected | |
| US20130304999A1 (en) | Electronic device and serial data communication method | |
| US10191883B2 (en) | Inter-integrated circuit bus arbitration system capable of avoiding host conflict | |
| CN119248586B (en) | A simulation verification model with flexibly configurable addressing mode for I2C interface IP verification | |
| TWI614609B (en) | Inter-integrated circuit bus arbitration system | |
| TWI833207B (en) | Device and method for selecting clock frequency in master device of bus system | |
| KR20140123713A (en) | Apparatus and method for accessing of divice through serial interface | |
| KR20160118049A (en) | Electronic apparatus, asynchronous data transmitting method thereof and optical image stabilization module | |
| KR102414408B1 (en) | Control integrated circuit for heterogeneous serial communication protocol and system control apparatus including same | |
| JP4931727B2 (en) | Data communication system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210324 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211222 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220201 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220222 |
|
| 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: 20220510 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220608 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7086705 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |