JP2010186377A - Interface method and system - Google Patents

Interface method and system Download PDF

Info

Publication number
JP2010186377A
JP2010186377A JP2009030966A JP2009030966A JP2010186377A JP 2010186377 A JP2010186377 A JP 2010186377A JP 2009030966 A JP2009030966 A JP 2009030966A JP 2009030966 A JP2009030966 A JP 2009030966A JP 2010186377 A JP2010186377 A JP 2010186377A
Authority
JP
Japan
Prior art keywords
code
serial interface
interface circuit
control signal
circuit
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.)
Granted
Application number
JP2009030966A
Other languages
Japanese (ja)
Other versions
JP5388617B2 (en
Inventor
Kenichi Ogasawara
健一 小笠原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New Japan Radio Co Ltd
Original Assignee
New Japan Radio Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New Japan Radio Co Ltd filed Critical New Japan Radio Co Ltd
Priority to JP2009030966A priority Critical patent/JP5388617B2/en
Publication of JP2010186377A publication Critical patent/JP2010186377A/en
Application granted granted Critical
Publication of JP5388617B2 publication Critical patent/JP5388617B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce data volume transmitted from a control part when setting an ID code. <P>SOLUTION: A serial interface circuit 100A of a first step inputs a control signal which shows an ID code from the control part 200, and the serial interface circuits 100B and 100C after second and later steps input the control signals which show the ID codes from the serial interface circuit of a preceding step. When setting an ID code of each serial interface circuit, if the ID code is set by a control signal from the control part 200, the serial interface circuit 100A of the first step generates the ID code of a value which is made by adding +n (n: integer ≥1) to the value of this ID code and sends it to the serial interface circuit 100B of the second step as the control signal. When the ID code is set by the control signal from the serial interface circuit 100A, the serial interface circuit 100B of the second step generates the ID code of the value made by adding +n to the value of this ID code, and sends it to the serial interface circuit 100C as a control signal. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、複数の負荷を個々に制御する複数のシリアルインターフェース回路に負荷を制御するためのシリアルデータとデータクロックを並列的に制御部から送信し、該制御部から特定のIDコードを含むシリアルデータを送信することで、複数のシリアルインターフェース回路の内の該特定のIDコードが設定されたシリアルインターフェース回路が選択されて対応する負荷が制御されるようにしたインターフェース方法およびシステムに関するものである。   The present invention transmits serial data and data clock for controlling a load to a plurality of serial interface circuits that individually control a plurality of loads from a control unit in parallel, and a serial including a specific ID code from the control unit The present invention relates to an interface method and system in which a serial interface circuit in which the specific ID code is set is selected from among a plurality of serial interface circuits and a corresponding load is controlled by transmitting data.

図5に従来のインターフェースシステムの構成を示す(例えば、特許文献1参照)。400A,400B,400Cは、同一構成のシリアルインターフェース回路であり、それぞれクロック入力端子SCL、データ入力端子SDAを備え、制御部500のクロック出力端子SCL、データ出力端子SDAに対してパラレル接続されている。リセット端子RESETは、制御部500のリセット出力端子RESET又は前段のシリアルインターフェース回路の制御出力端子CTRLOに対して接続されている。   FIG. 5 shows a configuration of a conventional interface system (see, for example, Patent Document 1). 400A, 400B, and 400C are serial interface circuits having the same configuration, each including a clock input terminal SCL and a data input terminal SDA, and connected in parallel to the clock output terminal SCL and the data output terminal SDA of the control unit 500. . The reset terminal RESET is connected to the reset output terminal RESET of the control unit 500 or the control output terminal CTRLO of the serial interface circuit at the previous stage.

このインターフェースシステムでは、図6(a)に示すように、初めに、制御部500のリセット出力端子RESETを“0”にセットすることで、1段目のシリアルインターフェース回路500AのIDレジスタ(図示せず)のIDコードが「00h」に初期化されるとともに、制御出力端子CTRLOが“0”になる。これにより、2段目のシリアルインターフェース回路400Bについても同様に処理され、その3段目のシリアルインターフェース回路400Cについても同様に処理され、全てのシリアルインターフェース回路のIDコードが「00h」に初期化される。   In this interface system, as shown in FIG. 6A, first, the reset output terminal RESET of the control unit 500 is set to “0”, whereby the ID register (not shown) of the first stage serial interface circuit 500A is shown. 2) is initialized to “00h” and the control output terminal CTRLO is set to “0”. As a result, the second-stage serial interface circuit 400B is processed in the same manner, and the third-stage serial interface circuit 400C is processed in the same manner, and the ID codes of all the serial interface circuits are initialized to “00h”. The

次に、図6(b)に示すように、制御部500のリセット出力端子RESETを“1”にセットすることで、1段目のシリアルインターフェース回路400AのIDレジスタにIDコードの書込みが可能となる。ここで、制御部500からデータクロックとともに48ビットのシリアルデータを転送するとき、そのシリアルデータの上位の16ビットのデータを「00h」とし、中位の16ビットのデータを「FFh」とし、下位の16ビットのデータを「01h」としておくことにより、上位の「00h」のデータにより、IDコードの一致(「00h」で一致)が検出されて、シリアルインターフェース400Aが選択され、IDレジスタを含む制御レジスタ群(図示せず)が書込み可能となり、中位の16ビットのデータ「FFh」によって、IDレジスタのIDコードが「00h」から「01h」に書き換えられる。   Next, as shown in FIG. 6B, by setting the reset output terminal RESET of the control unit 500 to “1”, the ID code can be written to the ID register of the first stage serial interface circuit 400A. Become. Here, when transferring 48-bit serial data from the control unit 500 together with the data clock, the upper 16-bit data of the serial data is set to “00h”, the middle-order 16-bit data is set to “FFh”, and the lower order By setting the 16-bit data of “01h” to “00h”, the ID code match (matching “00h”) is detected from the upper “00h” data, the serial interface 400A is selected, and the ID register is included. A control register group (not shown) can be written, and the ID code of the ID register is rewritten from “00h” to “01h” by the middle 16-bit data “FFh”.

以上により、このシリアルインターフェース回路400AのIDコードが「00h」以外のデータとなるので、その制御出力端子CTRLOが“0”→“1”に変化し、2段目のシリアルインターフェース回路400Bのリセット入力端子RESETが“1”になり、2段目のシリアルインターフェース回路300BのIDレジスタにIDコードの書込みが可能となる。   Thus, since the ID code of the serial interface circuit 400A becomes data other than “00h”, the control output terminal CTRLO changes from “0” to “1”, and the reset input of the second-stage serial interface circuit 400B. The terminal RESET becomes “1”, and the ID code can be written into the ID register of the second-stage serial interface circuit 300B.

よって、制御部500からデータクロックとともに48ビットのシリアルデータを転送するとき、その上位の16ビットのデータを「00h」とし、中位の16ビットのデータを「FFh」とし、下位の16ビットのデータを「02h」としておくことにより、上位の「00h」のデータにより、IDコードの一致(「00h」で一致)が検出されて、シリアルインターフェース400Bが選択され、中位の16ビットのデータ「FFh」によって、IDレジスタのIDコードが「00h」から「02h」に書き換えられる図6(c))。以下、3段目のシリアルインターフェース回路400Cについても同様な処理により、IDコードが独自のコード(前記した「00h」、「01h」、「02h」以外のコード)に書き換えられる。   Therefore, when transferring 48-bit serial data from the control unit 500 together with the data clock, the upper 16-bit data is set to “00h”, the middle 16-bit data is set to “FFh”, and the lower 16-bit data is transferred. By setting the data to “02h”, the ID code match (match at “00h”) is detected from the upper “00h” data, the serial interface 400B is selected, and the middle 16-bit data “ The ID code of the ID register is rewritten from “00h” to “02h” by “FFh” (FIG. 6C). Thereafter, the ID code is rewritten to a unique code (codes other than the above-mentioned “00h”, “01h”, and “02h”) by the same process for the serial interface circuit 400C at the third stage.

この図5のインターフェースシステムでは、各シリアルインターフェース400A,400B,400Cは、IDコードが設定された後に、クロック入力端子SCLからデータクロックが入力し、データ入力端子SDAから48ビットのシリアルデータが入力すると、当該48ビットのシリアルデータの上位16ビットのデータが、例えば、シリアルインターフェース回路400AのIDコードと合致すると、そのシリアルインターフェース回路400Aの制御レジスタ群が書込み可能となり、シリアルデータの中位の16ビットのデータがアドレスとなって、制御レジスタ群内の特定の制御レジスタが選択され、当該選択された制御レジスタに当該シリアルデータの下位16ビットのデータが書き込まれる。これにより、図示しない負荷が、当該選択された制御レジスタに書き込まれた16ビットのデータに応じて制御される。例えば、当該選択された制御レジスタの負荷が16個のLEDを点灯駆動する回路である場合は、当該選択された制御レジスタに格納されたデータ内容に応じて、その16個のLEDが所定の点灯状態を示すことになる。   In the interface system of FIG. 5, each serial interface 400A, 400B, and 400C receives a data clock from the clock input terminal SCL and a 48-bit serial data from the data input terminal SDA after the ID code is set. When the upper 16 bits of the 48-bit serial data matches, for example, the ID code of the serial interface circuit 400A, the control register group of the serial interface circuit 400A can be written, and the middle 16 bits of the serial data can be written. This data becomes an address, a specific control register in the control register group is selected, and the lower 16 bits of the serial data are written in the selected control register. As a result, a load (not shown) is controlled according to the 16-bit data written in the selected control register. For example, when the load of the selected control register is a circuit that drives and lights 16 LEDs, the 16 LEDs are turned on according to the data content stored in the selected control register. Will indicate the condition.

ところが、上記したインターフェースシステムは、シリアルインターフェース回路毎に制御部500から固有のIDコードを送って設定する必要があり、IDコードの設定時に制御部から転送するデータ量が多くなる問題がある。   However, the above-described interface system needs to be set by sending a unique ID code from the control unit 500 for each serial interface circuit, and there is a problem that the amount of data transferred from the control unit increases when setting the ID code.

本発明の目的は、IDコードの設定時に制御部から転送するデータ量を少なくできるようにしたインターフェース方法およびシステムを提供することである。   An object of the present invention is to provide an interface method and system that can reduce the amount of data transferred from a control unit when setting an ID code.

上記目的を達成するために、請求項1にかかる発明のインターフェース方法は、複数の負荷を個々に制御する複数のシリアルインターフェース回路に前記負荷を制御するためのシリアルデータとデータクロックを並列的に制御部から送信し、該制御部から特定のIDコードを含むシリアルデータを送信することで、前記複数のシリアルインターフェース回路の内の該特定のIDコードが設定されたシリアルインターフェース回路が選択されて対応する負荷が制御されるようにしたインターフェース方法において、前記各シリアルインターフェース回路の内の初段のシリアルインターフェース回路は前記制御部からIDコードを示す制御信号を入力し、2段目以降のシリアルインターフェース回路は前段のシリアルインターフェース回路からIDコードを示す制御信号を入力し、前記各シリアルインターフェース回路のIDコードの設定時に、前記初段のシリアルインターフェース回路は、前記制御部からの前記制御信号によってIDコードが設定されると、該IDコードの値に+n(n:1以上の整数)した値のIDコードを生成して2段目のシリアルインターフェース回路に前記制御信号として送り、前記2段目以降のシリアルインターフェース回路は、前段のシリアルインターフェース回路からの前記制御信号によってIDコードが設定されると、該IDコードの値に+nした値のIDコードを生成して後段のシリアルインターフェース回路に前記制御信号として送る、ことを特徴とする。   To achieve the above object, an interface method according to a first aspect of the present invention controls a serial data and a data clock for controlling the load in parallel to a plurality of serial interface circuits for individually controlling a plurality of loads. By transmitting serial data including a specific ID code from the control unit, a serial interface circuit in which the specific ID code is set among the plurality of serial interface circuits is selected and corresponding. In the interface method in which the load is controlled, the first-stage serial interface circuit of each of the serial interface circuits receives a control signal indicating an ID code from the control unit, and the second-stage and subsequent serial interface circuits are the previous stage. I from the serial interface circuit When a control signal indicating a code is input and the ID code of each serial interface circuit is set, the first stage serial interface circuit sets the ID code when the ID code is set by the control signal from the control unit. An ID code having a value + n (n is an integer of 1 or more) is generated and sent to the second-stage serial interface circuit as the control signal. The second-stage serial interface circuit is the preceding serial interface circuit. When an ID code is set by the control signal from, an ID code having a value obtained by adding + n to the value of the ID code is generated and sent to the serial interface circuit at the subsequent stage as the control signal.

請求項2にかかる発明は、請求項1に記載のインターフェース方法において、前記シリアルインターフェース回路は、入力する前記制御信号の第1の極性のエッジの数によって内部のIDコードが設定され、該IDコードに+nした数の第1の極性のエッジを有する制御信号を後段のシリアルインターフェース回路に出力することを特徴とする。   According to a second aspect of the present invention, in the interface method according to the first aspect, in the serial interface circuit, an internal ID code is set according to the number of first polarity edges of the control signal to be input, and the ID code A control signal having first polarity edges equal to + n is output to the serial interface circuit at the subsequent stage.

請求項3にかかる発明のインターフェースシステムは、複数の負荷を個々に制御する複数のシリアルインターフェース回路と、該各シリアルインターフェース回路に前記負荷を制御するためのシリアルデータとデータクロックを並列的に送信する制御部とを備え、該制御部から特定のIDコードを含むシリアルデータを送信することで、前記複数のシリアルインターフェース回路の内の該特定のIDコードが設定されたシリアルインターフェース回路が選択されて対応する負荷が制御されるようにしたインターフェースシステムにおいて、前記各シリアルインターフェース回路の内の初段のシリアルインターフェース回路は前記制御部からIDコードを示す制御信号を入力し、2段目以降のシリアルインターフェース回路は前段のシリアルインターフェース回路からIDコードを示す制御信号を入力するよう接続され、前記各シリアルインターフェース回路のIDコードの設定時に、前記初段のシリアルインターフェース回路は、前記制御部からの前記制御信号によってIDコードが設定されると、該IDコードの値に+n(n:1以上の整数)した値のIDコードを生成して2段目のシリアルインターフェース回路に前記制御信号として送り、前記2段目以降のシリアルインターフェース回路は、前段のシリアルインターフェース回路からの前記制御信号によってIDコードが設定されると、該IDコードの値に+nした値のIDコードを生成して後段のシリアルインターフェース回路に前記制御信号として送る、ことを特徴とする。   An interface system according to a third aspect of the present invention transmits a plurality of serial interface circuits that individually control a plurality of loads, and serial data and a data clock for controlling the loads to each serial interface circuit in parallel. And a serial interface circuit including the specific ID code is selected from the control unit, and the serial interface circuit in which the specific ID code is set is selected from the plurality of serial interface circuits In the interface system in which the load to be controlled is controlled, the first serial interface circuit of each serial interface circuit receives a control signal indicating an ID code from the control unit, and the second and subsequent serial interface circuits are The first serial The interface circuit is connected to input a control signal indicating an ID code. When setting the ID code of each serial interface circuit, the ID code of the first stage serial interface circuit is set by the control signal from the control unit. Then, an ID code having a value obtained by adding + n (n: an integer of 1 or more) to the ID code value is generated and sent to the second-stage serial interface circuit as the control signal. When an ID code is set by the control signal from the serial interface circuit at the preceding stage, the circuit generates an ID code having a value obtained by adding + n to the value of the ID code and sends the ID code to the serial interface circuit at the subsequent stage as the control signal. It is characterized by that.

請求項4にかかる発明は、請求項3に記載のインターフェースシステムにおいて、前記シリアルインターフェース回路は、入力する前記制御信号の第1の極性のエッジの数によってIDコードが設定されるIDレジスタと、該IDレジスタに設定されたIDコードに+nした数の第1の極性のエッジを有する制御信号を後段のシリアルインターフェース回路に出力する出力パルス発生回路とを備えることを特徴とする。   According to a fourth aspect of the present invention, in the interface system according to the third aspect, the serial interface circuit includes an ID register in which an ID code is set according to the number of edges of the first polarity of the input control signal. And an output pulse generation circuit for outputting a control signal having first polarity edges equal to the number of + n to the ID code set in the ID register to a serial interface circuit at a subsequent stage.

本発明によれば、初段のシリアルインターフェース回路にIDコードを示す制御信号を送ることで、初段のシリアルインターフェース回路にIDコードが設定された後は、2段目以降のシリアルインターフェース回路には、前段のシリアルインターフェース回路のIDコードに+nした値のIDコードが自動的に設定されるので、IDコード設定時に転送するデータ量は初段のシリアルインターフェース回路用のみで済み、初期設定時に制御部から転送するデータ量を大幅に削減することができる。   According to the present invention, after the ID code is set in the first stage serial interface circuit by sending a control signal indicating the ID code to the first stage serial interface circuit, Since the ID code of the value + n is automatically set to the ID code of the serial interface circuit, the amount of data transferred when setting the ID code is only for the first stage serial interface circuit, and is transferred from the control unit at the initial setting. The amount of data can be greatly reduced.

本発明の実施例のインターフェースシステムのブロック図である。It is a block diagram of the interface system of the Example of this invention. 同実施例のインターフェースシステムのシリアルインターフェース回路の詳細なブロック図である。It is a detailed block diagram of the serial interface circuit of the interface system of the embodiment. 同実施例のシリアルインターフェース回路のIDコード設定の動作波形図である。It is an operation | movement waveform diagram of ID code setting of the serial interface circuit of the Example. 同実施例の各シリアルインターフェース回路のIDコード設定の説明図である。It is explanatory drawing of ID code setting of each serial interface circuit of the Example. 従来のインターフェースシステムのブロック図である。It is a block diagram of the conventional interface system. 従来の各シリアルインターフェース回路のIDコード設定の説明図である。It is explanatory drawing of ID code setting of each conventional serial interface circuit.

図1に本発明の1つの実施例のインターフェースシステムの構成を示す。100A,100B,100Cは、互いに同じ構成のシリアルインターフェース回路であり、各々、データクロック入力端子SCL、シリアルデータ入力端子SDA、リセット入力端子RESET、処理クロック入力端子CLK、制御入力端子CTRLI、および制御出力端子CTRLOを備える。   FIG. 1 shows the configuration of an interface system according to one embodiment of the present invention. 100A, 100B, and 100C are serial interface circuits having the same configuration, and each includes a data clock input terminal SCL, a serial data input terminal SDA, a reset input terminal RESET, a processing clock input terminal CLK, a control input terminal CTRLI, and a control output. A terminal CTRLO is provided.

300A,300B,300Cは、シリアルインターフェース回路100A,100B,100Cにより個々に制御される負荷であり、処理クロック入力端子CLK、リセット入力端子RESETを有する。   300A, 300B, and 300C are loads individually controlled by the serial interface circuits 100A, 100B, and 100C, and each include a processing clock input terminal CLK and a reset input terminal RESET.

200は制御部(例えば、MCU)であり、初段のシリアルインターフェース回路100Aの制御入力端子CTRLIに接続される制御出力端子CTRL、各シリアルインターフェース回路100A,100B,100Cのクロック入力端子SCL、データ入力端子SDAにそれぞれ接続されるデータクロック出力端子SCL、シリアルデータ出力端子SDA、および各シリアルインターフェース回路100A,100B,100Cと負荷300A,300B,300Cのリセット入力端子RESET、処理クロック入力端子CLKに接続されるリセット出力端子RESET、処理クロック出力端子CLKを備える。   Reference numeral 200 denotes a control unit (for example, MCU), a control output terminal CTRL connected to the control input terminal CTRLI of the first stage serial interface circuit 100A, a clock input terminal SCL of each serial interface circuit 100A, 100B, 100C, and a data input terminal. Data clock output terminal SCL, serial data output terminal SDA connected to SDA, serial interface circuits 100A, 100B, 100C and reset input terminal RESET of loads 300A, 300B, 300C, and processing clock input terminal CLK, respectively. A reset output terminal RESET and a processing clock output terminal CLK are provided.

なお、各シリアルインターフェース回路100A,100Bの制御出力端子CTRLOは次段のシリアルインターフェース回路の制御入力端子CTRLIに接続されている。   The control output terminal CTRLO of each serial interface circuit 100A, 100B is connected to the control input terminal CTRLI of the next serial interface circuit.

シリアルインターフェース回路100Aを代表して、その内部構成を図2を参照して説明する。101はシフトレジスタであり、制御部200の端子SCL,CDAからデータクロックとシリアルデータを入力して、インストラクションを格納する。102は第1比較回路であり、シフトレジスタ101から転送されるデバイス選択用のアドレス(IDコード)とIDレジスタ103に書き込まれているアドレスADRESI(IDコード)とを比較し、両アドレスが一致するとき、インストラクションデコーダ104をアクティブにする。このインストラクションデコーダ104は、アクティブとなることにより端子SDAからシフトレジスタ101を経由して入力したインストラクションを解読して、負荷300Aを制御する。   The internal configuration of the serial interface circuit 100A will be described with reference to FIG. Reference numeral 101 denotes a shift register which inputs a data clock and serial data from the terminals SCL and CDA of the control unit 200 and stores instructions. Reference numeral 102 denotes a first comparison circuit, which compares a device selection address (ID code) transferred from the shift register 101 with an address ADRESI (ID code) written in the ID register 103, and the two addresses match. At this time, the instruction decoder 104 is activated. When the instruction decoder 104 becomes active, it decodes the instruction input from the terminal SDA via the shift register 101 and controls the load 300A.

IDレジスタ103のIDコードは、端子CTRLIから入力する制御信号の立上りエッジをカウントして、設定される。105は+n加算器であり、IDレジスタ103のアドレスADRESI(IDコード)の値+nの計算をして、第2比較回路106に送る。第2比較回路106では、+n加算器205の値(=ADRESI+n)と、出力パルス計数回路107のアドレスADRESOの値を比較する。出力パルス計数回路107は、第2比較回路106の比較結果に応じて、後記するように、その計数内容が「ADRESI+n」になるまでカウントする。108は3ビットのシフトレジスタからなる立上りエッジ検出回路であり、端子CTRLIから入力する制御信号を処理クロックCLKでサンプリングし、3ビットのシフトレジスタが「011」となったとき、端子CTRLIに入力する制御信号が立上りであることを検出する。109は制御回路であり、立上りエッジ検出回路108、IDレジスタ103、第2比較回路106、処理クロックCLKをカウントするカウンタ110の内容に応じて、IDレジスタ103、出力パルス計数回路107、カウンタ110、端子CTRLOに後段への制御信号を出力する出力パルス発生回路111を制御する。   The ID code of the ID register 103 is set by counting the rising edge of the control signal input from the terminal CTRLI. Reference numeral 105 denotes a + n adder that calculates the value + n of the address ADRESI (ID code) of the ID register 103 and sends it to the second comparison circuit 106. The second comparison circuit 106 compares the value of the + n adder 205 (= ADRESI + n) with the value of the address ADRESO of the output pulse counting circuit 107. The output pulse counting circuit 107 counts until the count content becomes “ADRESI + n”, as will be described later, according to the comparison result of the second comparison circuit 106. Reference numeral 108 denotes a rising edge detection circuit composed of a 3-bit shift register. The control signal input from the terminal CTRLI is sampled by the processing clock CLK, and is input to the terminal CTRLLI when the 3-bit shift register becomes “011”. It is detected that the control signal is rising. Reference numeral 109 denotes a control circuit, which corresponds to the contents of the rising edge detection circuit 108, the ID register 103, the second comparison circuit 106, and the counter 110 that counts the processing clock CLK, the ID register 103, the output pulse counting circuit 107, the counter 110, The output pulse generation circuit 111 that outputs a control signal to the subsequent stage is controlled at the terminal CTRLO.

次に、図3のタイムチャートを参照して、シリアルインターフェース回路100Aの動作を説明する。初期状態では、制御部200の端子RESETから入力するリセット信号により、シリアルインターフェース回路100Aと負荷300Aが初期化される。これにより、IDレジスタ103のアドレスADRESI(IDコード)の値は、「00h」となる。また、制御回路109のステート(STATE)は、IDLEのままである。   Next, the operation of the serial interface circuit 100A will be described with reference to the time chart of FIG. In the initial state, the serial interface circuit 100A and the load 300A are initialized by a reset signal input from the terminal RESET of the control unit 200. As a result, the value of the address ADRESI (ID code) of the ID register 103 becomes “00h”. Further, the state (STATE) of the control circuit 109 remains IDLE.

次に、制御部200の端子CTRLが“0”→“1”に変化すると、処理クロックCLKの3個目に、立上りエッジ検出回路108の3ビットのシフトレジスタのINREG(2)〜(0)が「011」となることにより、立上りが検出される。これにより、制御回路109のステートがIDLE → I_INC → I_WATEと変化する。   Next, when the terminal CTRL of the control unit 200 changes from “0” to “1”, INREG (2) to (0) of the 3-bit shift register of the rising edge detection circuit 108 is added to the third processing clock CLK. Becomes “011”, the rising edge is detected. As a result, the state of the control circuit 109 changes from IDLE → I_INC → I_WAIT.

ステートがI_INCになると、制御回路109は、IDレジスタ103のアドレスADRESI(IDコード)の値をインクリメント(+1)してその内容を「01h」に更新するとともに、出力パルス計数回路107の値を「00h」にセットし、さらにカウンタ110に処理クロックCLKのカウントを開始させる。   When the state becomes I_INC, the control circuit 109 increments (+1) the value of the address ADRESI (ID code) of the ID register 103 to update the content to “01h”, and sets the value of the output pulse counting circuit 107 to “ 00h ", and further causes the counter 110 to start counting the processing clock CLK.

ステートは、処理クロックCLKの1クロックの後にI_WATEになる。この後、カウンタ110のカウント値COUNTが「7」になる以前に、端子CTRLIの制御信号の立上りが再度検出されたときは、制御回路109は、カウンタ110を一旦クリアするとともに、ステートをI_INC → I_WATEにし、これが繰り返される。この繰り返し毎に、IDレジスタ103のアドレスADRESI(IDコード)の値が、インクリメント(+1)される。   The state becomes I_WAIT after one clock of the processing clock CLK. Thereafter, when the rising edge of the control signal at the terminal CTRLI is detected again before the count value COUNT of the counter 110 becomes “7”, the control circuit 109 once clears the counter 110 and changes the state to I_INC → This is repeated for I_WAIT. Each time this is repeated, the value of the address ADRESI (ID code) of the ID register 103 is incremented (+1).

ステートがI_WATEのとき、カウンタ110のカウント値COUNTが「7」を超えると、そのステートが、O_INC → O_WATE1 → O_WATE2と変化する。   When the state is I_WAIT and the count value COUNT of the counter 110 exceeds “7”, the state changes as O_INC → O_WAIT1 → O_WAIT2.

ステートがO_INCになると、制御回路109は、出力パルス計数回路107のADRESOの値をインクリメント(+1)するとともに、カウンタ110を一旦クリアさせてから処理クロックCLKのカウントを開始させる。これにより、出力パルス計数回路107では、そのアドレスADRESOが「00h」から「01h」に変化する。制御回路109は、処理クロックCLKの1クロックで、ステートがO_WATE1に移行する。   When the state becomes O_INC, the control circuit 109 increments the value of ADRESO of the output pulse counting circuit 107 (+1), and once the counter 110 is cleared, starts counting the processing clock CLK. As a result, in the output pulse counting circuit 107, the address ADRESO changes from “00h” to “01h”. In the control circuit 109, the state shifts to O_WAIT1 with one clock of the processing clock CLK.

ステートがO_WATE1になった後は、カウンタ110のカウント値COUNTが「2」になることで、ステートがO_WATE2に移行するとともに、出力パルス発生回路121の端子CTRLOの信号を“0”→“1”に変化させる。   After the state becomes O_WAIT1, the count value COUNT of the counter 110 becomes “2”, so that the state shifts to O_WAIT2, and the signal of the terminal CTRLO of the output pulse generation circuit 121 changes from “0” to “1”. To change.

ステートがO_WATE2になった後、カウンタ120のカウント値COUNTが「6」になると、ステートがO_INCに移行する。これにより、出力パルス計数回路117はADRESOの値がインクリメント(+1)され「02h」に更新されるとともに、出力パルス発生回路121の出力信号CTRLOを“1”→“0”に変化させる。また、カウンタ120を一旦クリアさせる。   After the state becomes O_WAIT2, when the count value COUNT of the counter 120 becomes “6”, the state shifts to O_INC. As a result, the value of ADRESO is incremented (+1) and updated to “02h”, and the output pulse count circuit 117 changes the output signal CTRLO of the output pulse generation circuit 121 from “1” to “0”. Further, the counter 120 is once cleared.

以後、ステートが、O_WATE1→O_WATE2→O_INC→O_WATE1→・・・と同様な動作が繰り返され、出力パルス計数回路117のアドレスADRESOの値のインクリメントと出力パスル発生回路121の出力端子CTRLOの“1”/“0”の変化が繰り返される。   Thereafter, the state is repeated in the same manner as O_WAIT1 → O_WAIT2 → O_INC → O_WAIT1 →... / The change of “0” is repeated.

そして、何度目かのステートO_WATE2において、第2比較回路116において、+n加算器115の出力値「ADRESI+n」と出力パルス計数回路117のアドレスADRESOの値が一致すると、制御回路119のステートは、LOCKに移行し、以降はIDレジスタ113のアドレスADRESIの値、出力パルス計数回路117のアドレスADRESOの値、出力パルス発生回路121の端子CTRLOの値は、現在の値を保持したままロックされる。   In the second state O_WAIT2, when the output value “ADRESI + n” of the + n adder 115 and the address ADRESO of the output pulse counting circuit 117 match in the second comparison circuit 116, the state of the control circuit 119 is LOCK. Thereafter, the value of the address ADRESI of the ID register 113, the value of the address ADRESO of the output pulse counting circuit 117, and the value of the terminal CTRLO of the output pulse generation circuit 121 are locked while retaining the current values.

以上により、シリアルインターフェース回路100Aは、端子CTRLIの信号が2回立ち上がることにより、IDレジスタ113のアドレスADRESI(IDコード)が「02h」に設定される。また、+n加算器115のnの値を「n=1」に設定しておくことで、端子CTRLOが3回立ち上がるので、次段のシリアルインターフェース回路100BのIDレジスタのアドレスADRESI(IDコード)が「03h」に設定される。さらに、次段のシリアルインターフェース回路100CのIDレジスタ113のアドレスADRESI(IDコード)が「04h」に設定される。図4(a)〜(c)にその変化を示した。+n加算器115のnの値を「n=2」に設定した場合は、端子CTRLOは4回立ち上がるので、次段のシリアルインターフェース回路100BのIDレジスタ113のアドレスADRESI(IDコード)は「04h」に設定され、シリアルインターフェース回路100CのIDレジスタ113のアドレスADRESI(IDコード)は「06h」に設定される。   As described above, the serial interface circuit 100A sets the address ADRESI (ID code) of the ID register 113 to “02h” when the signal at the terminal CTRLI rises twice. Also, by setting the value of n of the + n adder 115 to “n = 1”, the terminal CTRLO rises three times, so that the address ADRESI (ID code) of the ID register of the serial interface circuit 100B in the next stage is It is set to “03h”. Further, the address ADRESI (ID code) of the ID register 113 of the serial interface circuit 100C at the next stage is set to “04h”. The changes are shown in FIGS. When the value of n of the + n adder 115 is set to “n = 2”, the terminal CTRLO rises four times, so that the address ADRESI (ID code) of the ID register 113 of the next stage serial interface circuit 100B is “04h”. The address ADRESI (ID code) of the ID register 113 of the serial interface circuit 100C is set to “06h”.

なお、以上の実施例では、制御回路109のステートを切り替えるカウンタ120のカウント値については、自己のIDレジスタ103のアドレスADRESI(IDコード)を設定するためには「7」を、次段のIDレジスタのアドレスADRESO用としては、「2」と「6」を設定したが、これらは任意である。また、+n加算器105のnの値(1以上の整数)は、各シリアルインターフェース回路100A,100B,100Cで共通としたが、異なっていてもよい。さらに、端子SCLに入力するデータクロックと端子CLKに入力する処理クロックを独立にしたが、処理クロックはデータクロックを元にシリアルインターフェース回路の内部で作成してもよい。   In the above embodiment, for the count value of the counter 120 that switches the state of the control circuit 109, “7” is set to set the address ADRESI (ID code) of its own ID register 103, and the ID of the next stage is set. “2” and “6” are set for the register address ADRESO, but these are arbitrary. Further, the value of n (an integer of 1 or more) of the + n adder 105 is common to the serial interface circuits 100A, 100B, and 100C, but may be different. Furthermore, although the data clock input to the terminal SCL and the processing clock input to the terminal CLK are made independent, the processing clock may be created inside the serial interface circuit based on the data clock.

以上のようにして、各シリアルインターフェース回路100A,100B,100CのIDレジスタ113のアドレスADRESI(IDコード)が設定された後は、各シリアルインターフェース回路100A,100B,100Cにおいて、端子SDAから入力するシリアルデータの中のデバイス選択用アドレス(IDコード)と当該のアドレスADRESI(IDコード)が、第1比較回路112において一致することが確認されたとき、当該のインストラクションデコーダ114がアクティブとなり、シリアルデータ中のインストラクションを解読して、負荷300を制御する。   After the address ADRESI (ID code) of the ID register 113 of each serial interface circuit 100A, 100B, 100C is set as described above, the serial interface circuit 100A, 100B, 100C receives a serial input from the terminal SDA. When it is confirmed in the first comparison circuit 112 that the device selection address (ID code) in the data matches the address ADRESI (ID code), the instruction decoder 114 becomes active and And the load 300 is controlled.

100A,100B,100C:シリアルインターフェース回路、101:シフトレジスタ、102:第1比較回路、103:IDレジスタ、104:インストラクションデコーダ、105:+n加算器、106:第2比較回路、107:出力パルス計数回路、108:立上りエッジ検出回路、109:制御回路、110:カウンタ、111:出力パルス発生回路
200:制御部
300A,300B,300C:負荷
100A, 100B, 100C: serial interface circuit, 101: shift register, 102: first comparison circuit, 103: ID register, 104: instruction decoder, 105: + n adder, 106: second comparison circuit, 107: output pulse count Circuit: 108: rising edge detection circuit, 109: control circuit, 110: counter, 111: output pulse generation circuit 200: control unit 300A, 300B, 300C: load

特開2008−117306号公報JP 2008-117306 A

Claims (4)

複数の負荷を個々に制御する複数のシリアルインターフェース回路に前記負荷を制御するためのシリアルデータとデータクロックを並列的に制御部から送信し、該制御部から特定のIDコードを含むシリアルデータを送信することで、前記複数のシリアルインターフェース回路の内の該特定のIDコードが設定されたシリアルインターフェース回路が選択されて対応する負荷が制御されるようにしたインターフェース方法において、
前記各シリアルインターフェース回路の内の初段のシリアルインターフェース回路は前記制御部からIDコードを示す制御信号を入力し、2段目以降のシリアルインターフェース回路は前段のシリアルインターフェース回路からIDコードを示す制御信号を入力し、
前記各シリアルインターフェース回路のIDコードの設定時に、
前記初段のシリアルインターフェース回路は、前記制御部からの前記制御信号によってIDコードが設定されると、該IDコードの値に+n(n:1以上の整数)した値のIDコードを生成して2段目のシリアルインターフェース回路に前記制御信号として送り、
前記2段目以降のシリアルインターフェース回路は、前段のシリアルインターフェース回路からの前記制御信号によってIDコードが設定されると、該IDコードの値に+nした値のIDコードを生成して後段のシリアルインターフェース回路に前記制御信号として送る、
ことを特徴とするインターフェース方法。
Serial data for controlling the load and a data clock are transmitted in parallel from a control unit to a plurality of serial interface circuits that individually control a plurality of loads, and serial data including a specific ID code is transmitted from the control unit. In the interface method in which the serial interface circuit in which the specific ID code is set among the plurality of serial interface circuits is selected and the corresponding load is controlled.
Of the serial interface circuits, the first serial interface circuit receives an ID code control signal from the control unit, and the second and subsequent serial interface circuits receive an ID code control signal from the previous serial interface circuit. Input,
When setting the ID code of each serial interface circuit,
When the ID code is set by the control signal from the control unit, the first-stage serial interface circuit generates an ID code having a value obtained by adding + n (n: an integer of 1 or more) to the ID code value. Send to the serial interface circuit of the stage as the control signal,
When the ID code is set by the control signal from the preceding serial interface circuit, the second and subsequent serial interface circuits generate an ID code having a value + n to the value of the ID code, and the subsequent serial interface circuit Send to the circuit as the control signal,
An interface method characterized by the above.
請求項1に記載のインターフェース方法において、
前記シリアルインターフェース回路は、入力する前記制御信号の第1の極性のエッジの数によって内部のIDコードが設定され、該IDコードに+nした数の第1の極性のエッジを有する制御信号を後段のシリアルインターフェース回路に出力することを特徴とするインターフェース方法。
The interface method according to claim 1,
In the serial interface circuit, an internal ID code is set according to the number of first polarity edges of the control signal to be input, and a control signal having the number of first polarity edges + n is added to the ID code in the subsequent stage. An interface method characterized by outputting to a serial interface circuit.
複数の負荷を個々に制御する複数のシリアルインターフェース回路と、該各シリアルインターフェース回路に前記負荷を制御するためのシリアルデータとデータクロックを並列的に送信する制御部とを備え、該制御部から特定のIDコードを含むシリアルデータを送信することで、前記複数のシリアルインターフェース回路の内の該特定のIDコードが設定されたシリアルインターフェース回路が選択されて対応する負荷が制御されるようにしたインターフェースシステムにおいて、
前記各シリアルインターフェース回路の内の初段のシリアルインターフェース回路は前記制御部からIDコードを示す制御信号を入力し、2段目以降のシリアルインターフェース回路は前段のシリアルインターフェース回路からIDコードを示す制御信号を入力するよう接続され、
前記各シリアルインターフェース回路のIDコードの設定時に、
前記初段のシリアルインターフェース回路は、前記制御部からの前記制御信号によってIDコードが設定されると、該IDコードの値に+n(n:1以上の整数)した値のIDコードを生成して2段目のシリアルインターフェース回路に前記制御信号として送り、
前記2段目以降のシリアルインターフェース回路は、前段のシリアルインターフェース回路からの前記制御信号によってIDコードが設定されると、該IDコードの値に+nした値のIDコードを生成して後段のシリアルインターフェース回路に前記制御信号として送る、
ことを特徴とするインターフェースシステム。
A plurality of serial interface circuits that individually control a plurality of loads, and a control unit that transmits serial data and a data clock for controlling the loads to each serial interface circuit in parallel. An interface system in which a serial interface circuit in which the specific ID code is set is selected from among the plurality of serial interface circuits and a corresponding load is controlled by transmitting serial data including the ID code In
Of the serial interface circuits, the first serial interface circuit receives an ID code control signal from the control unit, and the second and subsequent serial interface circuits receive an ID code control signal from the previous serial interface circuit. Connected to input,
When setting the ID code of each serial interface circuit,
When the ID code is set by the control signal from the control unit, the first-stage serial interface circuit generates an ID code having a value obtained by adding + n (n: an integer of 1 or more) to the ID code value. Send to the serial interface circuit of the stage as the control signal,
When the ID code is set by the control signal from the preceding serial interface circuit, the second and subsequent serial interface circuits generate an ID code having a value + n to the value of the ID code, and the subsequent serial interface circuit Send to the circuit as the control signal,
An interface system characterized by this.
請求項3に記載のインターフェースシステムにおいて、
前記シリアルインターフェース回路は、入力する前記制御信号の第1の極性のエッジの数によってIDコードが設定されるIDレジスタと、該IDレジスタに設定されたIDコードに+nした数の第1の極性のエッジを有する制御信号を後段のシリアルインターフェース回路に出力する出力パルス発生回路とを備えることを特徴とするインターフェースシステム。
The interface system according to claim 3, wherein
The serial interface circuit includes an ID register in which an ID code is set according to the number of first polarity edges of the control signal to be input, and a first polarity having a number obtained by adding + n to the ID code set in the ID register. An interface system comprising: an output pulse generation circuit that outputs a control signal having an edge to a serial interface circuit at a subsequent stage.
JP2009030966A 2009-02-13 2009-02-13 Interface method and system Active JP5388617B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009030966A JP5388617B2 (en) 2009-02-13 2009-02-13 Interface method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009030966A JP5388617B2 (en) 2009-02-13 2009-02-13 Interface method and system

Publications (2)

Publication Number Publication Date
JP2010186377A true JP2010186377A (en) 2010-08-26
JP5388617B2 JP5388617B2 (en) 2014-01-15

Family

ID=42766989

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009030966A Active JP5388617B2 (en) 2009-02-13 2009-02-13 Interface method and system

Country Status (1)

Country Link
JP (1) JP5388617B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014529821A (en) * 2011-09-06 2014-11-13 セミコンダクター・コンポーネンツ・インダストリーズ・リミテッド・ライアビリティ・カンパニー Circuits and electronic modules for automatic addressing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005123685A (en) * 2003-10-14 2005-05-12 Ricoh Co Ltd Equipment expanding system
JP2008117306A (en) * 2006-11-07 2008-05-22 New Japan Radio Co Ltd Interface system
WO2008074126A1 (en) * 2006-12-20 2008-06-26 Mosaid Technologies Incorporated Id generation apparatus and method for serially interconnected devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005123685A (en) * 2003-10-14 2005-05-12 Ricoh Co Ltd Equipment expanding system
JP2008117306A (en) * 2006-11-07 2008-05-22 New Japan Radio Co Ltd Interface system
WO2008074126A1 (en) * 2006-12-20 2008-06-26 Mosaid Technologies Incorporated Id generation apparatus and method for serially interconnected devices
JP2010514016A (en) * 2006-12-20 2010-04-30 モサイド・テクノロジーズ・インコーポレーテッド ID generation apparatus and method for serial interconnected devices

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014529821A (en) * 2011-09-06 2014-11-13 セミコンダクター・コンポーネンツ・インダストリーズ・リミテッド・ライアビリティ・カンパニー Circuits and electronic modules for automatic addressing

Also Published As

Publication number Publication date
JP5388617B2 (en) 2014-01-15

Similar Documents

Publication Publication Date Title
CN110379357B (en) Control method and device for parallel LED drive circuit
JP5388617B2 (en) Interface method and system
US10805126B2 (en) Data generation circuit and transmission device
US20100052757A1 (en) Cooperation circuit
US20140240307A1 (en) Level shift circuit and driving method thereof
JP2008160798A (en) Variable resistor/capacitor rc oscillator
JP2014119766A (en) Communication system
US8923466B2 (en) Multi-phase clock switching device and method thereof
JP2010246011A (en) A/d converter
JP2002278924A (en) System and method for controlling transfer of data, and program therefor
US8593323B2 (en) A/D conversion device
US20150171875A1 (en) Clock generation circuit
JP5453557B2 (en) Single-wire signal regeneration transmission apparatus and method, and single-wire signal regeneration transmission apparatus connected in series
JP6445890B2 (en) Communication method and communication system
US8154496B2 (en) Liquid crystal display drive circuit
JP4826403B2 (en) Synchronization circuit
US11757453B2 (en) Multi-bit gray code generation circuit
US7649471B2 (en) Logic circuit and method for controlling display lights of hard disk
JP2003284012A (en) Data acquiring circuit
JP5092475B2 (en) Delay signal generation circuit
WO2014066418A1 (en) Multi-level encoded data transfer
TW200511785A (en) Level comparator
JP2011175877A (en) Light control method and light control circuit
TWI566230B (en) Multifunctional signal generator
JP2007201802A (en) Data transfer circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121012

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121025

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130514

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130702

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: 20130927

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131008

R150 Certificate of patent or registration of utility model

Ref document number: 5388617

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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