JP2015170199A - communication system - Google Patents

communication system Download PDF

Info

Publication number
JP2015170199A
JP2015170199A JP2014045411A JP2014045411A JP2015170199A JP 2015170199 A JP2015170199 A JP 2015170199A JP 2014045411 A JP2014045411 A JP 2014045411A JP 2014045411 A JP2014045411 A JP 2014045411A JP 2015170199 A JP2015170199 A JP 2015170199A
Authority
JP
Japan
Prior art keywords
slave
data
communication
host device
slave select
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014045411A
Other languages
Japanese (ja)
Inventor
哲也 田路
Tetsuya Taji
哲也 田路
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2014045411A priority Critical patent/JP2015170199A/en
Publication of JP2015170199A publication Critical patent/JP2015170199A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a communication system capable of making a signal line for transmitting a slave select signal common without reducing the number of transmittable bits of data.SOLUTION: A microcomputer 10 outputs slave select data corresponding to an IC which should be selected as a communication object by a slave select signal transmitted via a slave select signal line 23 made common to ICs 11-13. The slave select data is binary data which changes in different patterns from each other while a prescribed number of clock signals Clock are output. The slave select data allows a communication object IC to be reliably selected.

Description

本発明は、1つのホストデバイスと複数のスレーブデバイスとの間で、クロック同期式シリアル通信を行う通信システムに関する。   The present invention relates to a communication system that performs clock synchronous serial communication between one host device and a plurality of slave devices.

従来より、1つのホストデバイスと複数のスレーブデバイスとの間でシリアル通信を行う通信方式として、SPI(Serial Peripheral Interface)などに代表されるクロック同期式シリアルデータ通信方式が知られている。この通信方式における、一般的な通信手順を説明すると、まず、ホストデバイスが、通信対象となるスレーブデバイスに、アクティブレベル(通常、Lowレベル)のスレーブセレクト信号を出力して、通信対象として選択する。次いで、ホストデバイスが、クロック信号を送信しつつ、そのクロック信号の立上りエッジ又は立下りエッジに同期するタイミングで、選択したスレーブデバイスに送信すべき送信データを出力する。一方、選択されたスレーブデバイスも、クロック信号に同期するタイミングで、ホストデバイスにて受信されるべき受信データを出力する。このようにして、ホストデバイスとスレーブデバイス間で、クロックに同期してデータの送受信が実行される。そして、すべてのデータの送受信が終了すると、ホストデバイスがスレーブセレクト信号を非アクティブレベルにし、通信を終了させる。   Conventionally, a clock synchronous serial data communication system represented by SPI (Serial Peripheral Interface) or the like is known as a communication system for performing serial communication between one host device and a plurality of slave devices. A general communication procedure in this communication method will be described. First, a host device outputs a slave select signal of an active level (usually, a low level) to a slave device to be a communication target, and selects it as a communication target. . Next, the host device outputs transmission data to be transmitted to the selected slave device at the timing synchronized with the rising edge or falling edge of the clock signal while transmitting the clock signal. On the other hand, the selected slave device also outputs received data to be received by the host device at a timing synchronized with the clock signal. In this manner, data transmission / reception is executed in synchronization with the clock between the host device and the slave device. When transmission / reception of all data is completed, the host device sets the slave select signal to an inactive level and terminates communication.

上述したように、従来は、スレーブセレクト信号をアクティブレベルとすることにより、通信対象となるスレーブデバイスを選択していた。そのため、ホストデバイスと、複数のスレーブデバイスとを、それぞれ独立した信号線によって接続する必要があった。その結果、ホストデバイスは、多数のスレーブセレクト端子(SS端子)を持つ必要があり、SS端子数の増加が1つの課題となっていた。   As described above, conventionally, the slave device to be communicated is selected by setting the slave select signal to the active level. Therefore, it is necessary to connect the host device and the plurality of slave devices by independent signal lines. As a result, the host device needs to have a large number of slave select terminals (SS terminals), and an increase in the number of SS terminals has been one problem.

さらに、多数のSS端子を持つことに起因して、SS端子と各スレーブデバイスとの誤接続、SS端子同士のショート、あるいはアクティブレベルに相当する電位へのショートなどが発生する虞があった。万一、いずれかの事象が実際に発生してしまうと、通信対象ではないスレーブデバイスとの通信が成立してしまい、そのスレーブデバイスが意図しない振る舞いをしてしまう可能性が生じるという問題があった。   Further, due to having a large number of SS terminals, there is a possibility that an erroneous connection between the SS terminals and each slave device, a short circuit between the SS terminals, or a short circuit to a potential corresponding to the active level may occur. If any of these events actually occurs, communication with a slave device that is not the target of communication is established, and the slave device may behave unintentionally. It was.

このような課題を解決可能な通信システムが、例えば特許文献1に開示されている。この特許文献1の通信システムでは、スレーブセレクト信号を送信する信号線を各スレーブデバイスで共通化するとともに、ホストデバイスからの送信データ中に、通信対象となるスレーブデバイスを示す情報を付加している。   A communication system capable of solving such a problem is disclosed in Patent Document 1, for example. In the communication system of Patent Document 1, a signal line for transmitting a slave select signal is shared by each slave device, and information indicating a slave device to be communicated is added to transmission data from a host device. .

特開2004−362067号公報Japanese Patent Laid-Open No. 2004-362067

しかしながら、特許文献1の通信システムのように、ホストデバイスからの送信データ中に通信対象を示す情報を付加すると、その分、送信可能なデータのビット数が減少してしまうという問題が生じる。   However, when information indicating a communication target is added to the transmission data from the host device as in the communication system of Patent Document 1, there is a problem that the number of bits of data that can be transmitted is reduced accordingly.

さらに、特許文献1の通信システムでは、送信データ中の3ビットを利用して、通信対象を示す情報を付加している。しかし、そのビット数で区別可能な上限数以上のスレーブデバイスを接続する場合には、スレーブセレクト信号を送信する信号線の数を増やしている。この場合、上述したような、誤接続やショートなどにより、通信対象ではないスレーブデバイスとの通信が成立してしまう可能性が残る。   Furthermore, in the communication system of Patent Document 1, information indicating a communication target is added using 3 bits in transmission data. However, when connecting more than the upper limit number of slave devices that can be distinguished by the number of bits, the number of signal lines for transmitting slave select signals is increased. In this case, there is a possibility that communication with a slave device that is not a communication target may be established due to an erroneous connection or a short circuit as described above.

本発明は、上述した点に鑑みてなされたものであり、送信可能なデータのビット数を減少させずに、スレーブセレクト信号を送信する信号線を共通化することが可能な通信システムを提供することを目的とする。   The present invention has been made in view of the above points, and provides a communication system capable of sharing a signal line for transmitting a slave select signal without reducing the number of bits of transmittable data. For the purpose.

上記目的を達成するために、本発明に係る通信システムは、1つのホストデバイス(10)と複数のスレーブデバイス(11、12、13)とが、クロック同期式シリアル通信を行うものであって、
ホストデバイスと複数のスレーブデバイスとの間には、
ホストデバイスから複数のスレーブデバイスへクロック信号を送信するための共通のクロック信号ライン(20)と、
クロック信号に同期して、ホストデバイスから複数のスレーブデバイスへデータを送信するための共通の第1通信ライン(21)と、
クロック信号に同期して、複数のスレーブデバイスからホストデバイスへデータを送信するための共通の第2通信ライン(22)と、
ホストデバイスが、通信相手となるスレーブデバイスを選択するスレーブセレクト信号を送信するためのスレーブセレクト信号ライン(23)とが接続されており、
スレーブセレクト信号ラインは、複数のスレーブデバイスに対して共通化されており、
複数のスレーブデバイスには、所定数のクロック信号が出力される間に、それぞれ異なるパターンで変化する2値データが予め割り当てられており、
ホストデバイスは、スレーブセレクト信号により、選択すべきスレーブデバイスに対応した2値データを出力することを特徴とする。
In order to achieve the above object, a communication system according to the present invention is one in which one host device (10) and a plurality of slave devices (11, 12, 13) perform clock synchronous serial communication,
Between the host device and multiple slave devices,
A common clock signal line (20) for transmitting a clock signal from the host device to a plurality of slave devices;
A common first communication line (21) for transmitting data from the host device to the plurality of slave devices in synchronization with the clock signal;
A common second communication line (22) for transmitting data from the plurality of slave devices to the host device in synchronization with the clock signal;
The host device is connected to a slave select signal line (23) for transmitting a slave select signal for selecting a slave device as a communication partner,
The slave select signal line is shared by multiple slave devices.
A plurality of slave devices are pre-assigned binary data that changes in different patterns while a predetermined number of clock signals are output.
The host device outputs binary data corresponding to the slave device to be selected in response to the slave select signal.

このように、本発明に係る通信システムでは、ホストデバイスは、送信データ中に、通信対象となるスレーブデバイスを示す情報を付加するのではなく、スレーブセレクト信号により、選択すべきスレーブデバイスに対応した2値データを出力する。このため、従来とは異なり、通信対象を示す情報の分だけ、送信可能なデータのビット数が減少してしまうことがない。さらに、複数のスレーブデバイスに対して、スレーブセレクト信号ラインを共通化しても、2値データにより、通信対象となるスレーブデバイスを確実に選択することが可能になる。   As described above, in the communication system according to the present invention, the host device does not add information indicating the slave device to be communicated to the transmission data, but corresponds to the slave device to be selected by the slave select signal. Output binary data. Therefore, unlike the prior art, the number of bits of data that can be transmitted does not decrease by the amount of information indicating the communication target. Furthermore, even if the slave select signal line is shared by a plurality of slave devices, the slave device to be communicated can be reliably selected by the binary data.

上述した構成において、ホストデバイスは、2値データとして、すべてスレーブセレクト信号のアクティブレベルとなるパターン以外のパターンを使用することが好ましい。このようにすると、例えばスレーブセレクト信号ラインが、アクティブレベルに相当する電位にショートしてしまった場合などに、容易にそのような異常の発生を検知し、必要な対応を取ることが可能となる。   In the above-described configuration, it is preferable that the host device uses a pattern other than the pattern that becomes the active level of the slave select signal as binary data. In this way, for example, when the slave select signal line is short-circuited to a potential corresponding to the active level, it is possible to easily detect the occurrence of such an abnormality and take necessary measures. .

例えば、複数のスレーブデバイスは、2値データとして、すべてアクティブレベルとなるパターンの2値データを受信した場合、通信動作を終了するようにしても良い。この場合、上述したような異常が発生しても、ホストデバイスが、通信対象ではないスレーブデバイスと誤って通信してしまうことを防止することができる。   For example, the plurality of slave devices may end the communication operation when receiving binary data having a pattern that is all in an active level as binary data. In this case, even if the above-described abnormality occurs, it is possible to prevent the host device from erroneously communicating with a slave device that is not a communication target.

さらに、ホストデバイスと、スレーブデバイスとの間で、データの送受信が同時に実行される場合、ホストデバイスは、スレーブデバイスからのデータを受信しないことに基づいて、故障が発生したことを検出するようにしても良い。これにより、ホストデバイスは、容易に、スレーブセレクト信号ラインが、アクティブレベルに相当する電位にショートした故障などが発生した場合に、その故障を検知することができるようになる。   Furthermore, when data transmission / reception is performed simultaneously between the host device and the slave device, the host device should detect that a failure has occurred based on not receiving data from the slave device. May be. As a result, the host device can easily detect the failure when the slave select signal line is short-circuited to a potential corresponding to the active level.

上記括弧内の参照番号は、本発明の理解を容易にすべく、後述する実施形態における具体的な構成との対応関係の一例を示すものにすぎず、なんら本発明の範囲を制限することを意図したものではない。   The reference numerals in the parentheses merely show an example of a correspondence relationship with a specific configuration in an embodiment described later in order to facilitate understanding of the present invention, and are intended to limit the scope of the present invention. Not intended.

また、上述した特徴以外の、特許請求の範囲の各請求項に記載した技術的特徴に関しては、後述する実施形態の説明及び添付図面から明らかになる。   Further, the technical features described in the claims of the claims other than the features described above will become apparent from the description of embodiments and the accompanying drawings described later.

実施形態に係る通信システムの一例の構成を示す構成図である。It is a block diagram which shows the structure of an example of the communication system which concerns on embodiment. マイコン10が各IC11〜13とクロック同期式シリアル通信を行う場合の各種信号を示したタイミングチャートである。It is the timing chart which showed the various signals in case the microcomputer 10 performs clock synchronous serial communication with each IC11-13. 各ICへのスレーブセレクトデータの割り当ての一例を示す図である。It is a figure which shows an example of allocation of the slave select data to each IC. マイコン10が、IC−A11を通信対象として選択する場合に、マイコン10とIC−A間で通信される各種信号を示したタイミングチャートである。It is the timing chart which showed the various signals communicated between the microcomputer 10 and IC-A, when the microcomputer 10 selects IC-A11 as a communication object. マイコン10において実行される通信処理を示すフローチャートである。4 is a flowchart showing communication processing executed in the microcomputer 10. 被選択ICが決定されるまで、各ICにおいて実行される全スレーブ通信処理を示すフローチャートである。It is a flowchart which shows all the slave communication processes performed in each IC until a to-be-selected IC is determined. 被選択ICによって実行される被選択スレーブ通信処理を示すフローチャートである。It is a flowchart which shows the selected slave communication process performed by selected IC. 変形例1の内容を示すフローチャートである。10 is a flowchart showing the contents of Modification 1; 変形例2の内容を示すフローチャートである。10 is a flowchart showing the contents of Modification 2.

以下、本発明の実施形態に係る通信システムについて、図面を参照しつつ説明する。図1は、本実施形態に係る通信システムの一例の構成を示す構成図である。   Hereinafter, a communication system according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a configuration diagram illustrating a configuration example of a communication system according to the present embodiment.

図1に示すように、本実施形態に係る通信システムは、ホストデバイスとしてのマイコン10と、スレーブデバイスとしての複数のIC(IC−A11、IC−B12、IC−C13など)とを有する。そして、マイコン10と、複数のIC(IC−A11、IC−B12、IC−C13など)との間で、クロック同期式シリアル通信が行われるようになっている。   As shown in FIG. 1, the communication system according to the present embodiment includes a microcomputer 10 as a host device and a plurality of ICs (IC-A11, IC-B12, IC-C13, etc.) as slave devices. Clock synchronous serial communication is performed between the microcomputer 10 and a plurality of ICs (IC-A11, IC-B12, IC-C13, etc.).

マイコン10は、クロック信号Clockを出力するクロック出力端子、各IC11〜13に送信すべき送信データTxを出力する送信データ出力端子、各IC11〜13から出力され、マイコン10にて受信される受信データRxを入力する受信データ入力端子、及び、通信相手となるICを選択するためのスレーブセレクトデータを含むスレーブセレクト信号SSを出力するスレーブセレクト信号出力端子とを有する。   The microcomputer 10 is a clock output terminal that outputs a clock signal Clock, a transmission data output terminal that outputs transmission data Tx to be transmitted to the ICs 11 to 13, and reception data that is output from the ICs 11 to 13 and received by the microcomputer 10. A reception data input terminal for inputting Rx, and a slave select signal output terminal for outputting a slave select signal SS including slave select data for selecting an IC to be a communication partner.

マイコン10のクロック出力端子は、クロック信号ライン20に接続されている。このクロック信号ライン20は、各IC11〜13のクロック信号入力端子に接続されている。すなわち、各IC11〜13に対して共通のクロック信号ライン20が設けられており、マイコン10からのクロック信号Clockは、この共通のクロック信号ライン20を介して、各IC11〜13に与えられる。   The clock output terminal of the microcomputer 10 is connected to the clock signal line 20. The clock signal line 20 is connected to the clock signal input terminals of the ICs 11 to 13. That is, a common clock signal line 20 is provided for each of the ICs 11 to 13, and the clock signal Clock from the microcomputer 10 is given to each of the ICs 11 to 13 via the common clock signal line 20.

マイコン10の送信データ出力端子は、第1通信ライン21に接続されている。第1通信ライン21は、各IC11〜13のデータ入力端子に接続されている。また、マイコン10の受信データ入力端子は、第2通信ライン22に接続されている。第2通信ライン22は、各IC11〜13のデータ出力端子に接続されている。さらに、マイコン10のスレーブセレクト信号出力端子は、スレーブセレクト信号ライン23に接続されている。スレーブセレクト信号ライン23は、各IC11〜13のスレーブセレクト信号入力端子に接続されている。これら第1通信ライン21、第2通信ライン22、及びスレーブセレクト信号ライン23に関しても、図1に示されるように、クロック信号ライン20と同様に、各IC11〜13に対して共通化されている。   A transmission data output terminal of the microcomputer 10 is connected to the first communication line 21. The first communication line 21 is connected to the data input terminals of the ICs 11 to 13. The reception data input terminal of the microcomputer 10 is connected to the second communication line 22. The second communication line 22 is connected to the data output terminals of the ICs 11 to 13. Further, the slave select signal output terminal of the microcomputer 10 is connected to the slave select signal line 23. The slave select signal line 23 is connected to the slave select signal input terminals of the ICs 11 to 13. As shown in FIG. 1, the first communication line 21, the second communication line 22, and the slave select signal line 23 are also shared by the respective ICs 11 to 13, as in the case of the clock signal line 20. .

本実施形態に係る通信システムにおいて行われるシリアル通信は、マイコン10が常に通信の主導権を持つ。すなわち、マイコン10が各IC11〜13とシリアル通信を行う際は、図2に示すように、まずスレーブセレクト信号SSをアクティブレベル(本実施形態ではLowレベル)にして各IC11〜13をシリアル通信可能状態にする。なお、アクティブレベルは、Highレベルであっても良い。   In the serial communication performed in the communication system according to the present embodiment, the microcomputer 10 always has the initiative of communication. That is, when the microcomputer 10 performs serial communication with each of the ICs 11 to 13, as shown in FIG. 2, first, the slave select signal SS is set to the active level (low level in the present embodiment) so that the ICs 11 to 13 can perform serial communication. Put it in a state. The active level may be a high level.

次いで、マイコン10は、図2に示すように、送信データTxの出力を開始する。この送信データTxは、各種コマンドやデータ、アドレス(通信対象ICにおけるメモリやレジスタなどのアドレス)等を含む。例えば、マイコン10は、コマンドとして、通信対象ICが持つデータを読み出したい場合はリード命令を出力し、通信対象ICへデータを書き込みたい場合はライト命令を出力する。また、マイコン10は、コマンドとして、例えば通信対象ICが備える機能を実行させるための命令などを出力したりもする。   Next, the microcomputer 10 starts outputting the transmission data Tx as shown in FIG. The transmission data Tx includes various commands, data, addresses (addresses of memories and registers in the communication target IC), and the like. For example, as a command, the microcomputer 10 outputs a read command as a command when reading data held by the communication target IC, and outputs a write command when writing data into the communication target IC. Further, the microcomputer 10 outputs, for example, a command for executing a function included in the communication target IC as a command.

上述した送信データTxの出力開始と同期して、マイコン10は、スレーブセレクト信号出力端子から、通信相手として選択すべきIC(IC−A11、IC−B12、IC−C13などの中のいずれか)に対応した2値データ(スレーブセレクトデータ)の出力を開始する。   In synchronization with the output start of the transmission data Tx described above, the microcomputer 10 selects an IC (any one of IC-A11, IC-B12, IC-C13, etc.) to be selected as a communication partner from the slave select signal output terminal. Starts to output binary data (slave select data) corresponding to.

そして、マイコン10は、送信データTx及びスレーブセレクトデータの出力後に、各IC11〜13に対してクロック信号Clockを出力する。すると、各IC11〜13は、クロック信号Clockが立ち下がったタイミングで、送信データTx、スレーブセレクトデータの取り込みを行う。但し、各IC11〜13におけるデータの取り込みタイミングは、クロック信号Clockが立ち上がったときであっても良い。以下に、スレーブセレクトデータについて、詳細に説明する。   The microcomputer 10 outputs a clock signal Clock to each of the ICs 11 to 13 after outputting the transmission data Tx and the slave select data. Then, each of the ICs 11 to 13 takes in the transmission data Tx and the slave select data at the timing when the clock signal Clock falls. However, the data capture timing in each of the ICs 11 to 13 may be when the clock signal Clock rises. The slave select data will be described in detail below.

本実施形態に係る通信システムでは、各IC11〜13に対して、所定数のクロック信号Clockが出力される間に、それぞれ異なるパターンで変化するスレーブセレクトデータが予め割り当てられている。そして、各ICは、所定数のクロック信号Clockによって規定されるスレーブセレクトデータ送出期間において、自身に割り当てられたスレーブセレクトデータと同じデータを受信したとき、マイコン10の通信対象として選択されたことを認識する。   In the communication system according to the present embodiment, slave select data that changes in different patterns is assigned in advance to each of the ICs 11 to 13 while a predetermined number of clock signals Clock are output. When each IC receives the same data as the slave select data assigned to itself in the slave select data transmission period defined by the predetermined number of clock signals Clock, it is selected that the IC is selected as the communication target of the microcomputer 10. recognize.

このスレーブセレクトデータの割り当ての一例を図3に示す。なお、図3に示す例では、スレーブセレクトデータが割り当てられるICの数が7であり、そのスレーブセレクトデータとして、3ビット分のデータを用いる例を示している。従って、図3に示す例では、スレーブセレクトデータの送出期間は、クロック信号Clockの3個分に相当することになる。   An example of the assignment of the slave select data is shown in FIG. In the example shown in FIG. 3, the number of ICs to which the slave select data is assigned is 7, and an example is shown in which 3-bit data is used as the slave select data. Therefore, in the example shown in FIG. 3, the transmission period of the slave select data corresponds to three clock signals Clock.

図3に示す例では、IC−A11に対し、“001”のスレーブセレクトデータが割り当てられている。従って、クロック信号Clockが立ち下がる、連続した3回のデータ取り込みタイミングにおいて、スレーブセレクトデータを取り込んだ結果、その値が“001”である場合、IC−A11が通信対象として選択されることになる。この場合、IC−A11は、スレーブセレクトデータの送出期間経過後も、通信動作を継続し、マイコン10との間で、送信データTx及び受信データRxのやり取りを行う。   In the example illustrated in FIG. 3, slave select data “001” is assigned to the IC-A 11. Therefore, if the slave select data is fetched at three consecutive data fetch timings when the clock signal Clock falls, and the value is “001”, the IC-A 11 is selected as a communication target. . In this case, the IC-A 11 continues the communication operation even after the elapse of the slave select data transmission period, and exchanges the transmission data Tx and the reception data Rx with the microcomputer 10.

同様に、図3に示す例では、IC−B12に対して“010”のスレーブセレクトデータが割り当てられ、IC−C13に対して“011”のスレーブセレクトデータが割り当てられ、IC−D14に対して“100”のスレーブセレクトデータが割り当てられ、IC−E15に対して“101”のスレーブセレクトデータが割り当てられ、IC−F16に対して“110”のスレーブセレクトデータが割り当てられ、IC−G17に対して“111”のスレーブセレクトデータが割り当てられている。   Similarly, in the example shown in FIG. 3, slave select data “010” is assigned to IC-B12, slave select data “011” is assigned to IC-C13, and IC-D14 is assigned. “100” slave select data is assigned, “101” slave select data is assigned to IC-E15, “110” slave select data is assigned to IC-F16, and IC-G17 is assigned. Slave select data of “111” is assigned.

このように、各IC11〜17に対して、固有のスレーブセレクトデータが割り当てられているので、マイコン10は、スレーブセレクト信号SSにより、所望のICに対応するスレーブセレクトデータを送出することで、通信対象とすべきICを任意に選択することができる。   Thus, since unique slave select data is assigned to each of the ICs 11 to 17, the microcomputer 10 transmits the slave select data corresponding to the desired IC by the slave select signal SS, thereby enabling communication. An IC to be a target can be arbitrarily selected.

ここで、本実施形態においては、全てのビットが、スレーブセレクト信号SSのアクティブレベルとなる“000”のデータは、スレーブセレクトデータとして用いていない。このため、万一、スレーブセレクト信号ラインが、アクティブレベルに相当するグランド電位にショートしてしまった場合、いずれのIC11〜17とも通信が継続されなくなる。従って、少なくとも、通信対象ではないICとの通信が成立してしまい、そのICが意図しない振る舞いをしてしまうことを確実に防止することができる。   Here, in this embodiment, data of “000” in which all bits are at the active level of the slave select signal SS is not used as slave select data. For this reason, if the slave select signal line is short-circuited to the ground potential corresponding to the active level, communication with any of the ICs 11 to 17 is not continued. Therefore, it is possible to reliably prevent at least communication with an IC that is not a communication target from being established and the IC to behave unintentionally.

次に、図4に示すように、マイコン10が、通信対象としてIC−A11を選択する場合を例に取り、マイコン10における処理、各IC11〜17における処理、及び通信対象として選択されたIC−A11における処理について、図5〜図7のフローチャートを用いて説明する。   Next, as shown in FIG. 4, the case where the microcomputer 10 selects the IC-A 11 as a communication target is taken as an example. The processing in the microcomputer 10, the processing in each of the ICs 11 to 17, and the IC- selected as the communication target The processing in A11 will be described using the flowcharts of FIGS.

まず、図5のフローチャートに基づき、マイコン10における処理について説明する。
マイコン10は、IC−A11との通信を開始する場合、まず、ステップS100において、スレーブセレクト信号SSをアクティブレベルにする。これにより、IC−A11を含むすべてのIC11〜17が通信可能状態となる。
First, processing in the microcomputer 10 will be described based on the flowchart of FIG.
When starting communication with the IC-A 11, the microcomputer 10 first sets the slave select signal SS to an active level in step S100. Thereby, all the ICs 11 to 17 including the IC-A 11 are in a communicable state.

次いで、マイコン10は、ステップS110において、送信データTxの出力を開始するとともに、IC−A11を選択するためのスレーブセレクトデータの出力を開始する。IC−A11のスレーブセレクトデータは“001”であるため、スレーブセレクトデータの出力開始直後は、図4に示すように、スレーブセレクト信号SSはLowレベルに維持される。送信データTx、及びスレーブセレクトデータの出力後、これらのデータのレベルが安定するのに必要な時間が経過した後、マイコン10は、ステップS120において、クロック信号Clockを立ち下げる。すると、ステップS130に示す全スレーブ通信処理が各IC11〜17にて実行されることで、送信データTx、及びスレーブセレクトデータの取り込みが行われる。   Next, in step S110, the microcomputer 10 starts outputting the transmission data Tx and starts outputting slave select data for selecting the IC-A11. Since the slave select data of the IC-A11 is “001”, immediately after the start of the output of the slave select data, the slave select signal SS is maintained at the low level as shown in FIG. After the transmission data Tx and slave select data are output, the microcomputer 10 lowers the clock signal Clock in step S120 after the time necessary for the levels of these data to stabilize has elapsed. Then, all the slave communication processing shown in step S130 is executed by each of the ICs 11 to 17, and the transmission data Tx and the slave select data are captured.

この全スレーブ通信処理について、図6のフローチャートを参照して説明する。全スレーブ通信処理においては、まず、ステップS300において、スレーブセレクト信号SSがアクティブ化されているか否かを判定する。アクティブ化されていないと判定した場合には、ステップS370に進み、マイコン10との通信処理を終了する。一方、スレーブセレクト信号SSがアクティブ化されていると判定した場合には、ステップS310に進む。   This all-slave communication process will be described with reference to the flowchart of FIG. In the all slave communication processing, first, in step S300, it is determined whether or not the slave select signal SS is activated. If it is determined that it has not been activated, the process proceeds to step S370, and the communication process with the microcomputer 10 is terminated. On the other hand, if it is determined that the slave select signal SS is activated, the process proceeds to step S310.

ステップS310では、各IC11〜17は、それぞれのクロック信号入力端子に与えられているクロック信号Clockが立ち下ったか否かを判定する。このとき、クロック信号Clockが立ち下がっていないと判定した場合には、繰り返し、S310の処理を実行することで、クロック信号Clockの立ち下がりを待機する。一方、クロック信号Clockが立ち下がったと判定した場合には、ステップS320の処理に進む。ステップS320では、各IC11〜17において、送信データTx及びスレーブセレクトデータの受信処理が行われる。この受信処理では、送信データTx及びスレーブセレクトデータの1ビット分のデータの取り込みが行われる。   In step S310, each of the ICs 11 to 17 determines whether or not the clock signal Clock applied to each clock signal input terminal has fallen. At this time, when it is determined that the clock signal Clock has not fallen, the process of S310 is repeatedly executed to wait for the fall of the clock signal Clock. On the other hand, if it is determined that the clock signal Clock has fallen, the process proceeds to step S320. In step S320, reception processing of transmission data Tx and slave select data is performed in each IC 11-17. In this reception process, data for one bit of transmission data Tx and slave select data is captured.

ステップS330では、マイコン10にて受信すべき受信データRxを出力する。この受信データRxとして、各IC11〜17は、送信データTxに含まれていたコマンドに応答するデータを送信したり、送信すべき応答データがない場合にはダミーデータを送信したりする。   In step S330, reception data Rx to be received by the microcomputer 10 is output. As the reception data Rx, each of the ICs 11 to 17 transmits data responding to the command included in the transmission data Tx, or transmits dummy data when there is no response data to be transmitted.

なお、スレーブセレクトデータの送出期間中は、全てのIC11〜17にて通信処理動作が行われる。そのため、受信データRxは、全IC11〜17から出力されることになる。この場合、各IC11〜17が、異なる受信データRxを出力したとすると、マイコン10にて受信する受信データRxが不安定となる虞がある。そのため、スレーブセレクトデータの送信期間中、すなわち、全IC11〜17が通信処理動作を行っている期間中は、各IC11〜17から同じ受信データRxが出力されるように構成されている。   During the slave select data transmission period, the communication processing operation is performed in all the ICs 11 to 17. Therefore, the reception data Rx is output from all the ICs 11 to 17. In this case, if the ICs 11 to 17 output different received data Rx, the received data Rx received by the microcomputer 10 may become unstable. For this reason, the same reception data Rx is output from each of the ICs 11 to 17 during the transmission period of the slave select data, that is, during the period when all the ICs 11 to 17 perform the communication processing operation.

続くステップS340では、各IC11〜17が、予め定められた所定数のクロック数分だけ、スレーブセレクトデータの取り込みを実施したか否かにより、スレーブセレクトデータの受信が完了したか否かを判定する。このとき、まだスレーブセレクトデータの受信が完了していないと判定すると、ステップS310からの処理を繰り返す。この場合、各IC11〜17は、まだ、いずれのICが通信対象として選択されたかを判別することができないためである。ただし、すべてのスレーブセレクトデータの受信を待たずとも、1ビットずつスレーブセレクトデータを受信する過程で、自身が選択されないことが明らかとなった時点で、通信処理を停止するようにすることは可能である。一方、スレーブセレクトデータの受信が完了したと判定すると、ステップS350の処理に進む。   In the subsequent step S340, it is determined whether or not the reception of the slave select data is completed by each of the ICs 11 to 17 depending on whether or not the slave select data has been fetched by a predetermined number of clocks. . At this time, if it is determined that the reception of slave select data has not been completed, the processing from step S310 is repeated. In this case, each of the ICs 11 to 17 cannot yet determine which IC has been selected as a communication target. However, it is possible to stop communication processing when it becomes clear that it is not selected in the process of receiving slave select data bit by bit without waiting for reception of all slave select data. It is. On the other hand, if it is determined that the reception of the slave select data is completed, the process proceeds to step S350.

ステップS350では、各IC11〜17が、受信したスレーブセレクトデータが、各々のIC11〜17に割り当てられたスレーブセレクトデータと一致するか否かに基づき、自身が通信対象として選択されたか否かを判定する。この際、自身が選択されたと判定した場合には、ステップS360に進み、マイコン10との通信を継続するため、次のクロック信号Clockの立ち下がりを待機する。一方、自身は選択されなかったと判定した場合には、ステップS370に進んで、マイコン10との通信処理を終了させる。   In step S350, each IC 11-17 determines whether it has been selected as a communication target based on whether the received slave select data matches the slave select data assigned to each IC 11-17. To do. At this time, if it is determined that it has been selected, the process proceeds to step S360 to wait for the next falling of the clock signal Clock in order to continue communication with the microcomputer 10. On the other hand, if it is determined that it has not been selected, the process proceeds to step S370, and the communication process with the microcomputer 10 is terminated.

なお、ステップS370にて、通信処理を終了したICは、スレーブセレクトデータの送出期間終了後に、スレーブセレクト信号SSがアクティブレベルとなっても、通信処理の再開が禁止されるようになっている。この通信処理の再開禁止は、マイコン10が、選択したIC−A11との通信を完了し、スレーブセレクト信号SSを非アクティブ化したときに、解除される。従って、マイコン10は、スレーブセレクトデータの送出期間経過後は、選択した通信対象であるIC−A11とだけ通信を行うことができる。   In step S370, the IC that has completed the communication process is prohibited from resuming the communication process even if the slave select signal SS becomes active after the slave select data transmission period ends. This prohibition of resuming communication processing is canceled when the microcomputer 10 completes communication with the selected IC-A 11 and deactivates the slave select signal SS. Accordingly, the microcomputer 10 can communicate only with the selected communication target IC-A 11 after the slave select data transmission period has elapsed.

再び、図5のフローチャートに戻り、説明を続ける。マイコン10は、上述した全スレーブ通信処理のために所定の時間待機した後、ステップS140にて、クロック信号Clockを立ち上げる。この時点では、各IC11〜17から出力された受信データRxは安定している。そのため、マイコン10は、このクロック信号Clockの立ち上げに伴い、ステップS150において、受信データRxの受信処理を行う。この受信処理では、受信データRxの1ビット分のデータの取り込みが行われる。   Returning to the flowchart of FIG. 5 again, the description will be continued. The microcomputer 10 waits for a predetermined time for all the slave communication processes described above, and then raises the clock signal Clock in step S140. At this time, the reception data Rx output from each of the ICs 11 to 17 is stable. Therefore, the microcomputer 10 performs reception processing of the reception data Rx in step S150 with the rise of the clock signal Clock. In this reception process, one bit of data of the reception data Rx is captured.

続くステップS160では、スレーブセレクトデータの送出が完了したか否かを判定する。この際、まだスレーブセレクトデータの送出が完了していないと判定すると、ステップS110からの処理を繰り返す。一方、スレーブセレクトデータの送出が完了したと判定すると、ステップS170の処理に進む。なお、この時点では、通信対象として、IC−A11が選択済みとなっている。また、IC−A11以外のIC12〜17は、通史処理を停止した状態となっている。   In a succeeding step S160, it is determined whether or not the transmission of the slave select data is completed. At this time, if it is determined that the transmission of slave select data has not been completed, the processing from step S110 is repeated. On the other hand, if it is determined that the transmission of the slave select data is completed, the process proceeds to step S170. At this point, IC-A11 has already been selected as a communication target. Further, the ICs 12 to 17 other than the IC-A 11 are in a state where the history processing is stopped.

ステップS170では、マイコン10は、IC−A11との通信を継続するため、スレーブセレクト信号SSをアクティブレベルに保持する。続くステップS180では、1ビット分の送信データTxを出力し、ステップS190において、クロック信号を立ち下げる。すると、ステップS200に示す被選択スレーブ通信処理が、選択されたIC−A11にて実行されることで、IC−A11にて送信データTxの受信処理が行われる。   In step S170, the microcomputer 10 holds the slave select signal SS at an active level in order to continue communication with the IC-A11. In the following step S180, 1-bit transmission data Tx is output, and in step S190, the clock signal is lowered. Then, the selected slave communication process shown in step S200 is executed by the selected IC-A11, so that the reception process of the transmission data Tx is performed by the IC-A11.

この非選択スレーブ通信処理について、図7のフローチャートを参照して説明する。被選択スレーブ通信処理においては、まず、ステップS400において、スレーブセレクト信号SSがアクティブ化されているか否かを判定する。アクティブ化されていないと判定した場合には、ステップS450に進み、マイコン10との通信処理を終了する。一方、スレーブセレクト信号SSがアクティブ化されていると判定した場合には、ステップS410に進む。   This non-selected slave communication process will be described with reference to the flowchart of FIG. In the selected slave communication process, first, in step S400, it is determined whether or not the slave select signal SS is activated. If it is determined that it is not activated, the process proceeds to step S450, and the communication process with the microcomputer 10 is terminated. On the other hand, if it is determined that the slave select signal SS is activated, the process proceeds to step S410.

ステップS410では、選択されたIC−A11は、クロック信号入力端子に与えられているクロック信号Clockが立ち下ったか否かを判定する。このとき、クロック信号Clockが立ち下がっていないと判定した場合には、繰り返し、S410の処理を実行することで、クロック信号Clockの立ち下がりを待機する。一方、クロック信号Clockが立ち下がったと判定した場合には、ステップS420の処理に進む。ステップS420では、IC−A11において、送信データTxの受信処理が行われる。この受信処理により、送信データTxの1ビット分のデータの取り込みが行われる。   In step S410, the selected IC-A 11 determines whether or not the clock signal Clock applied to the clock signal input terminal has fallen. At this time, when it is determined that the clock signal Clock has not fallen, the process of S410 is repeatedly executed to wait for the fall of the clock signal Clock. On the other hand, if it is determined that the clock signal Clock has fallen, the process proceeds to step S420. In step S420, reception processing of transmission data Tx is performed in IC-A11. By this reception processing, data for one bit of transmission data Tx is captured.

ステップS430では、IC−A11は、マイコン10にて受信すべき受信データRxを出力する。続くステップS440では、IC−A11は、全ての受信データRxの送出が完了したか否かを判定する。この判定処理において、まだ、全ての受信データRxの送出が完了していないと判定すると、ステップS410からの処理を繰り返す。一方、全ての受信データRxの送出を完了したと判定すると、ステップS450に進み、マイコン10との通信処理を終了する。   In step S430, the IC-A 11 outputs reception data Rx to be received by the microcomputer 10. In subsequent step S440, the IC-A 11 determines whether or not the transmission of all the reception data Rx has been completed. In this determination process, if it is determined that transmission of all received data Rx has not been completed, the process from step S410 is repeated. On the other hand, if it is determined that the transmission of all the received data Rx is completed, the process proceeds to step S450, and the communication process with the microcomputer 10 is terminated.

再び、図5のフローチャートに戻り、説明を続ける。マイコン10は、上述した被選択スレーブ通信処理のために所定の時間待機した後、ステップS210にて、クロック信号Clockを立ち上げる。この時点では、選択したIC−A11から出力された受信データRxは安定している。そのため、マイコン10は、このクロック信号Clockの立ち上げに伴い、ステップS220において、受信データRxの受信処理を行う。この受信処理では、受信データRxの1ビット分のデータの取り込みが行われる。   Returning to the flowchart of FIG. 5 again, the description will be continued. The microcomputer 10 waits for a predetermined time for the selected slave communication process described above, and then raises the clock signal Clock in step S210. At this time, the reception data Rx output from the selected IC-A 11 is stable. Therefore, the microcomputer 10 performs reception processing of the reception data Rx in step S220 with the rise of the clock signal Clock. In this reception process, one bit of data of the reception data Rx is captured.

続くステップS230では、全データの通信処理、すなわち、送信データTxの送出処理及び受信データRxの受信処理が完了したか否かを判定する。この際、まだ全データの通信処理が完了していないと判定すると、ステップS180からの処理を繰り返す。一方、全データの通信処理が完了したと判定すると、ステップS240の処理に進む。ステップS240では、スレーブセレクト信号SSを非アクティブレベルにする。これにより、選択されなかった各IC12〜17の通信処理の再開禁止が解除される。   In the subsequent step S230, it is determined whether or not all data communication processing, that is, transmission data Tx transmission processing and reception data Rx reception processing has been completed. At this time, if it is determined that the communication processing of all data has not been completed yet, the processing from step S180 is repeated. On the other hand, if it is determined that the communication process for all data has been completed, the process proceeds to step S240. In step S240, the slave select signal SS is set to an inactive level. As a result, the prohibition of restart of communication processing of each IC 12 to 17 that has not been selected is cancelled.

続くステップS250では、次に通信対象とすべきICが有るか否かを判定し、通信対象とすべきICが有ると判定した場合には、ステップS100からの処理を繰り返す。一方、通信対象とすべきICが無いと判定した場合には、マイコン10は、図5のフローチャートに示す処理を終了する。   In subsequent step S250, it is determined whether or not there is an IC that should be the next communication target. If it is determined that there is an IC that should be the communication target, the processing from step S100 is repeated. On the other hand, if it is determined that there is no IC to be communicated, the microcomputer 10 ends the process shown in the flowchart of FIG.

上述した本実施形態に係る通信システムによれば、マイコン10は、送信データTx中に、通信対象となるICを示す情報を付加するのではなく、スレーブセレクト信号SSにより、通信対象として選択すべきICに対応したスレーブセレクトデータを出力する。このため、従来とは異なり、通信対象を示す情報の分だけ、送信可能なデータのビット数が減少してしまうことがない。さらに、複数のIC11〜17に対して、スレーブセレクト信号ライン23を共通化しても、スレーブセレクトデータにより、通信対象となるICを確実に選択することが可能になる。   According to the above-described communication system according to the present embodiment, the microcomputer 10 should be selected as a communication target by the slave select signal SS instead of adding information indicating the communication target IC to the transmission data Tx. Outputs slave select data corresponding to the IC. Therefore, unlike the prior art, the number of bits of data that can be transmitted does not decrease by the amount of information indicating the communication target. Furthermore, even if the slave select signal line 23 is made common to a plurality of ICs 11 to 17, it is possible to reliably select an IC to be communicated by the slave select data.

また上述した通信システムでは、スレーブセレクトデータとして、すべてアクティブレベルとなるパターン以外のパターンを用いている。このため、例えばスレーブセレクト信号ライン23が、アクティブレベルに相当する電位にショートしてしまっても、いずれのIC11〜17も通信対象として選択されないので、マイコン10が通信対象ではないICと誤って通信してしまうことを防止することができる。   Further, in the communication system described above, a pattern other than the pattern that is all in the active level is used as slave select data. For this reason, for example, even if the slave select signal line 23 is short-circuited to a potential corresponding to the active level, none of the ICs 11 to 17 is selected as a communication target, so the microcomputer 10 erroneously communicates with an IC that is not a communication target. Can be prevented.

以上、本発明の好ましい実施形態について説明したが、本発明は、なんら上述した実施形態に制限されることなく、本発明の主旨を逸脱しない範囲において、種々変形して実施することが可能である。   The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention. .

(変形例1)
例えば、図5のフローチャートに示した、マイコン10の通信処理に関して、図8に示すように変形しても良い。つまり、図5のフローチャートにおけるステップS220の受信データRxの受信処理と、ステップS230の全データの通信完了判定処理との間に、受信データRxの受信ができない状態であるか否かを判定するステップS222を設けても良い。そして、このステップS222において、受信データRxが受信できない状態であると判定したときには、ステップS224に進み、故障が発生したことを検出するようにしても良い。
(Modification 1)
For example, the communication processing of the microcomputer 10 shown in the flowchart of FIG. 5 may be modified as shown in FIG. That is, the step of determining whether or not the reception data Rx cannot be received between the reception processing of the reception data Rx in step S220 and the communication completion determination processing of all data in step S230 in the flowchart of FIG. S222 may be provided. If it is determined in step S222 that the received data Rx cannot be received, the process may proceed to step S224 to detect that a failure has occurred.

上述したように、本実施形態に係る通信システムでは、マイコン10と、複数のIC11〜17あるいは通信対象として選択されたICとの間で、データの送受信が同時期に実行される。それにも係わらず、マイコン10が、受信データRxを受信できないとすると、スレーブセレクト信号ライン23が、アクティブレベルに相当する電位にショートする故障が発生し、いずれのIC11〜17も通信対象として選択されないか、あるいは、通信対象として選択したICになんらかの故障が発生して、受信データRxを出力できない状態である可能性が高い。このように、マイコン10において、受信データRxを受信できないことに基づき、通信システムになんらかの故障が発生したことを検出することができる。   As described above, in the communication system according to the present embodiment, data is transmitted and received between the microcomputer 10 and the plurality of ICs 11 to 17 or the ICs selected as communication targets at the same time. Nevertheless, if the microcomputer 10 cannot receive the received data Rx, a failure occurs in which the slave select signal line 23 is shorted to a potential corresponding to the active level, and none of the ICs 11 to 17 is selected as a communication target. Alternatively, there is a high possibility that some failure occurs in the IC selected as the communication target and the reception data Rx cannot be output. As described above, the microcomputer 10 can detect that a failure has occurred in the communication system based on the fact that the reception data Rx cannot be received.

(変形例2)
また、図6のフローチャートに示した、全スレーブ通信処理に関して、図9に示すように変形しても良い。すなわち、図6のフローチャートにおけるステップS340のスレーブセレクトデータの受信完了判定処理と、ステップS350の被選択判定処理との間に、受信したスレーブセレクトデータに異常が有るか否かを判定するステップS342を追加しても良い。そして、このステップS342において、スレーブセレクトデータに異常有りと判定した場合、ステップS370に進んで、各IC11〜17における通信処理を終了させるようにする。
(Modification 2)
Further, the all slave communication process shown in the flowchart of FIG. 6 may be modified as shown in FIG. That is, step S342 for determining whether or not there is an abnormality in the received slave select data between the slave selection data reception completion determination process in step S340 and the selected determination process in step S350 in the flowchart of FIG. May be added. If it is determined in step S342 that there is an abnormality in the slave select data, the process proceeds to step S370, and the communication processing in each of the ICs 11 to 17 is terminated.

上述したように、本実施形態では、全てのビットが、スレーブセレクト信号SSのアクティブレベルとなるデータは、スレーブセレクトデータとして用いていない。従って、各IC11〜17において、万一、全てのビットがアクティブレベルとなるスレーブセレクトデータを受信した場合、これは明らかに異常とみなすことができるので、各IC11〜17における通信処理を終了させる。   As described above, in this embodiment, data in which all bits are at the active level of the slave select signal SS is not used as slave select data. Accordingly, in the event that each IC 11-17 receives slave select data in which all bits are at an active level, this can be clearly regarded as abnormal, so the communication processing in each IC 11-17 is terminated.

ただし、図6に示す全スレーブ通信処理においても、自身が通信対象として選択されなかった場合、ステップS350→ステップS370を経由して、通信処理が終了される。このため、図6の全スレーブ通信処理においても、全てのビットがアクティブレベルとなるスレーブセレクトデータを受信した場合には、各IC11〜17で通信処理が終了されることになる。図9に示す例は、スレーブセレクトデータが異常である場合に、より確実に、各IC11〜17の通信処理を終了させるためのものである。   However, also in the all slave communication processing shown in FIG. 6, when the device itself is not selected as a communication target, the communication processing is terminated via step S350 → step S370. For this reason, also in the all-slave communication process of FIG. 6, when the slave select data in which all the bits are at the active level is received, the communication process is finished in each of the ICs 11 to 17. The example shown in FIG. 9 is for more reliably ending the communication processing of each of the ICs 11 to 17 when the slave select data is abnormal.

(変形例3)
さらに、上述した実施形態では、各IC11〜17における受信処理を、クロック信号Clockの立ち下がりのタイミングで実施し、マイコン10における受信処理を、クロック信号Clockの立ち上がりのタイミングで実施した。しかしながら、マイコン10と各IC11〜17の受信処理は、クロック信号の立ち下がりもしくは立ち上がりに連動して、全く同じタイミングで実施することも可能である。
(Modification 3)
Further, in the above-described embodiment, the reception process in each of the ICs 11 to 17 is performed at the falling timing of the clock signal Clock, and the reception process in the microcomputer 10 is performed at the rising timing of the clock signal Clock. However, the reception processing of the microcomputer 10 and each of the ICs 11 to 17 can be performed at exactly the same timing in conjunction with the falling or rising of the clock signal.

10 マイコン(ホストデバイス)
11 IC−A(スレーブデバイス)
12 IC−B(スレーブデバイス)
13 IC−C(スレーブデバイス)
20 クロック信号ライン
21 第1通信ライン
22 第2通信ライン
23 スレーブセレクト信号ライン
10 Microcomputer (host device)
11 IC-A (slave device)
12 IC-B (slave device)
13 IC-C (slave device)
20 clock signal line 21 first communication line 22 second communication line 23 slave select signal line

Claims (9)

1つのホストデバイス(10)と複数のスレーブデバイス(11、12、13)とが、クロック同期式シリアル通信を行う通信システムであって、
前記ホストデバイスと前記複数のスレーブデバイスとの間には、
前記ホストデバイスから前記複数のスレーブデバイスへクロック信号を送信するための共通のクロック信号ライン(20)と、
前記クロック信号に同期して、前記ホストデバイスから前記複数のスレーブデバイスへデータを送信するための共通の第1通信ライン(21)と、
前記クロック信号に同期して、前記複数のスレーブデバイスから前記ホストデバイスへデータを送信するための共通の第2通信ライン(22)と、
前記ホストデバイスが、通信相手となるスレーブデバイスを選択するスレーブセレクト信号を送信するためのスレーブセレクト信号ライン(23)とが接続されており、
前記スレーブセレクト信号ラインは、前記複数のスレーブデバイスに対して共通化されており、
前記複数のスレーブデバイスには、所定数のクロック信号が出力される間に、それぞれ異なるパターンで変化する2値データが予め割り当てられており、
前記ホストデバイスは、前記スレーブセレクト信号により、選択すべきスレーブデバイスに対応した前記2値データを出力することを特徴とする通信システム。
A communication system in which one host device (10) and a plurality of slave devices (11, 12, 13) perform clock synchronous serial communication,
Between the host device and the plurality of slave devices,
A common clock signal line (20) for transmitting a clock signal from the host device to the plurality of slave devices;
A common first communication line (21) for transmitting data from the host device to the plurality of slave devices in synchronization with the clock signal;
A common second communication line (22) for transmitting data from the plurality of slave devices to the host device in synchronization with the clock signal;
The host device is connected to a slave select signal line (23) for transmitting a slave select signal for selecting a slave device as a communication partner;
The slave select signal line is shared by the plurality of slave devices,
The plurality of slave devices are pre-assigned binary data that changes in different patterns while a predetermined number of clock signals are output,
The communication system, wherein the host device outputs the binary data corresponding to the slave device to be selected in response to the slave select signal.
前記ホストデバイスは、前記2値データとして、すべて前記スレーブセレクト信号のアクティブレベルとなるパターン以外のパターンを使用することを特徴とする請求項1に記載の通信システム。   2. The communication system according to claim 1, wherein the host device uses a pattern other than a pattern that becomes an active level of the slave select signal as the binary data. 前記複数のスレーブデバイスは、前記2値データとして、すべて前記アクティブレベルとなるパターンの2値データを受信した場合、通信動作を終了することを特徴とする請求項2に記載の通信システム。   3. The communication system according to claim 2, wherein the plurality of slave devices end communication operation when receiving binary data having a pattern that is all at the active level as the binary data. 4. 前記ホストデバイスと、前記スレーブデバイスとの間で、データの送受信が同時期に実行される場合、前記ホストデバイスは、前記スレーブデバイスからのデータを受信しないことに基づいて、故障が発生したことを検出することを特徴とする請求項2又は3に記載の通信システム。   When data transmission / reception is performed between the host device and the slave device at the same time, the host device indicates that a failure has occurred based on not receiving data from the slave device. The communication system according to claim 2, wherein the communication system is detected. 前記ホストデバイスは、前記複数のスレーブデバイスのいずれかと通信を行うとき、最初に、前記スレーブセレクト信号のレベルを、前記複数のスレーブデバイスが通信動作を開始するHigh又はLowのいずれかのアクティブレベルに変化させ、その後、前記スレーブセレクト信号として前記2値データを出力し、当該2値データの出力後、前記スレーブセレクト信号のレベルを前記アクティブレベルとすることを特徴とする請求項1乃至4のいずれか1項に記載の通信システム。   When the host device communicates with any of the plurality of slave devices, first, the level of the slave select signal is set to an active level of either High or Low at which the plurality of slave devices start communication operations. 5. The binary data is output as the slave select signal, and the level of the slave select signal is set to the active level after the binary data is output. The communication system according to claim 1. 前記複数のスレーブデバイスは、前記スレーブセレクト信号としての前記2値データにより選択されなかったことが判明した時点で、前記スレーブセレクト信号が前記アクティブレベルであっても、通信動作を停止することを特徴とする請求項5に記載の通信システム。   The plurality of slave devices stop communication operation even when the slave select signal is at the active level when it is determined that the slave device is not selected by the binary data as the slave select signal. The communication system according to claim 5. 前記2値データにより選択された前記スレーブデバイスは、通信すべき全データの通信が完了すると、通信動作を停止することを特徴とする請求項5に記載の通信システム。   6. The communication system according to claim 5, wherein the slave device selected by the binary data stops communication operation when communication of all data to be communicated is completed. 前記ホストデバイスは、前記2値データにより選択した前記スレーブデバイスとの通信が完了すると、前記スレーブセレクト信号のレベルを非アクティブレベルとすることを特徴とする請求項5乃至7のいずれか1項に記載の通信システム。   8. The host device according to claim 5, wherein when the communication with the slave device selected by the binary data is completed, the level of the slave select signal is set to an inactive level. The communication system described. 前記ホストデバイスと前記複数のスレーブデバイスとは、前記クロック信号に同期して、同時期にデータの送受信を行うものであり、
前記複数のスレーブデバイスは、前記ホストデバイスから前記2値データの出力が終了するまで、前記第2通信ラインを介して、それぞれ同じデータを前記ホストデバイスに送信することを特徴とする請求項5乃至8のいずれか1項に記載の通信システム。
The host device and the plurality of slave devices transmit and receive data at the same time in synchronization with the clock signal,
The plurality of slave devices each transmit the same data to the host device via the second communication line until the output of the binary data from the host device is completed. The communication system according to any one of 8.
JP2014045411A 2014-03-07 2014-03-07 communication system Pending JP2015170199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014045411A JP2015170199A (en) 2014-03-07 2014-03-07 communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014045411A JP2015170199A (en) 2014-03-07 2014-03-07 communication system

Publications (1)

Publication Number Publication Date
JP2015170199A true JP2015170199A (en) 2015-09-28

Family

ID=54202860

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014045411A Pending JP2015170199A (en) 2014-03-07 2014-03-07 communication system

Country Status (1)

Country Link
JP (1) JP2015170199A (en)

Similar Documents

Publication Publication Date Title
CN110532211B (en) Bus system
KR20180017035A (en) Test for 50 nanosecond spike filter
US20190138491A1 (en) Data communication apparatus
US10012975B2 (en) Numerical control system including internal register self-reset function with serial communication signal monitoring
JP2016004388A (en) Communication system and electronic circuit
US11221977B2 (en) Daisy chain mode entry sequence
CN106201973B (en) Method and system for single-wire serial communication interface
WO2012046634A1 (en) Electronic device and serial data communication method
JP6971538B2 (en) Communication equipment, communication methods, programs, and communication systems
JP6696511B2 (en) Communication device, communication method, program, and communication system
US10013374B2 (en) Bidirectional communication method between a master terminal and a slave terminal on a single transmission line
US10740172B2 (en) Communication apparatus, communication method, program, and communication system
US11023023B2 (en) Start-and-stop detecting apparatus and method for I3C bus
JPWO2018150868A1 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, PROGRAM, AND COMMUNICATION SYSTEM
JP2016170666A (en) Semiconductor device and control method thereof
JP2015170199A (en) communication system
EP3459189B1 (en) Communication apparatus, communication method, program, and communication system
CN110673894A (en) Automatic loading method for BOB module ED of home gateway
CN105701056A (en) Data communication device and method for data communication
CN112445744B (en) I2C communication
JP6413979B2 (en) Master node
JP2009187474A (en) Semiconductor device, portable electronic equipment, self-diagnosis method, and self-diagnosis program
TWI832612B (en) Target slave device and address change method for i2c communication system
TWI776180B (en) Electronic system
CN116775537A (en) I under 10bit addressing mode 2 C bus transmission method