JP6302713B2 - Serial communication method and serial communication device - Google Patents

Serial communication method and serial communication device Download PDF

Info

Publication number
JP6302713B2
JP6302713B2 JP2014061303A JP2014061303A JP6302713B2 JP 6302713 B2 JP6302713 B2 JP 6302713B2 JP 2014061303 A JP2014061303 A JP 2014061303A JP 2014061303 A JP2014061303 A JP 2014061303A JP 6302713 B2 JP6302713 B2 JP 6302713B2
Authority
JP
Japan
Prior art keywords
serial data
serial
value
specific
serial communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014061303A
Other languages
Japanese (ja)
Other versions
JP2015184955A (en
Inventor
小笠原 健一
健一 小笠原
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 JP2014061303A priority Critical patent/JP6302713B2/en
Publication of JP2015184955A publication Critical patent/JP2015184955A/en
Application granted granted Critical
Publication of JP6302713B2 publication Critical patent/JP6302713B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Description

本発明は、データ通信を行うシリアル通信方法およびシリアル通信装置に関する。   The present invention relates to a serial communication method and a serial communication apparatus that perform data communication.

従来の1線式のシリアルデータ通信(例えば特許文献1、2)では、図12に示すように、入力データの例えば立上りタイミングで決まる前縁エッジt1の検出パルスTgの立上りから、基準時間T1が経過した時点に発生するストローブパルスStbの立上りタイミングで、入力データの論理を判定していた。図12では、データD(L)はLレベル(以下、「L」と呼ぶ)として、データD(H)はHレベル(以下、「H」と呼ぶ)として判定されるべきデータである。   In the conventional one-wire serial data communication (for example, Patent Documents 1 and 2), as shown in FIG. The logic of the input data has been determined at the rising timing of the strobe pulse Stb generated at the time when it has elapsed. In FIG. 12, data D (L) is data to be determined as L level (hereinafter referred to as “L”), and data D (H) is determined as H level (hereinafter referred to as “H”).

米国特許明細書第5210846号US Pat. No. 5,210,846 米国特許明細書第5398326号US Pat. No. 5,398,326

しかしながら、図12に示す従来方式では、基準時間T1を用いるので、シリアルデータの転送速度を変更し難いという問題がある。例えば、通信速度を上げるために基準時間T1を短く設定した場合は、通信環境が悪くノイズ等によりデータが劣化する際に通信速度を下げようとしても、もはや基準時間T1を変更できないため、ノイズ環境に対応できない。逆に、基準時間T1を長く設定した場合は、通信速度が基準時間T1により制約を受けてしまう。   However, the conventional method shown in FIG. 12 uses the reference time T1, which makes it difficult to change the serial data transfer rate. For example, when the reference time T1 is set short in order to increase the communication speed, the reference time T1 can no longer be changed even if the communication speed is reduced when the communication environment is bad and data deteriorates due to noise or the like. Cannot handle. Conversely, when the reference time T1 is set long, the communication speed is restricted by the reference time T1.

本発明の目的は、シリアルデータの転送速度の変更が容易となったシリアル通信方法およびシリアル通信装置を提供することである。   An object of the present invention is to provide a serial communication method and a serial communication apparatus that make it easy to change the transfer rate of serial data.

上記目的を達成するために、請求項1にかかる発明のシリアル通信方法は、受信したシリアルデータの単位区間内の「H」期間と「L」期間の一方から他方を差し引いた時間差分を検出し、該時間差分の少なくとも極性に応じて前記シリアルデータの論理値を判定するシリアル通信方法において、前記シリアルデータは、前記単位区間の開始点と終了点に同一極性のエッジを持ち、前記開始点と前記終了点の間に逆極性のエッジを持ち、前記時間差分の正の最大値と負の最大値との間の範囲をn個(nは2以上)に分割し、前記論理値をn値とすることを特徴とする。
請求項2にかかる発明は、請求項1に記載のシリアル通信方法において、前記n値は3値以上であり、前記n値のうちの2値の組み合わせで決まる互いに異なる複数の識別コードが形成され、該複数の識別コードの内の特定の識別コードを形成する2値で前記シリアルデータが構成されていることを特徴とする。
請求項3にかかる発明のシリアル通信装置は、受信したシリアルデータの単位区間内の「H」期間と「L」期間をそれぞれ基準クロックでカウントして、前記「H」期間のカウント値と前記「L」期間のカウント値の一方から他方を差し引いた時間差分の少なくとも極性を示す信号を出力するカウント手段と、該カウント手段から出力する前記時間差分の少なくとも極性を示す信号に応じて前記シリアルデータの論理値を判定する判定手段と、を備えることを特徴とするシリアル通信装置において、前記シリアルデータは、前記単位区間の開始点と終了点に同一極性のエッジを持ち、前記開始点と前記終了点の間に逆極性のエッジを持ち、前記時間差分の正の最大値と負の最大値との間の範囲をn個(nは2以上)に分割し、前記論理値をn値とすることを特徴とする。
請求項4にかかる発明は、請求項3に記載のシリアル通信装置において、前記n値は3値以上であり、前記n値のうちの2値の組み合わせで決まる互いに異なる複数の識別コードが形成され、該複数の識別コードの内の特定の識別コードを形成する2値で前記シリアルデータが構成されていることを特徴とする。
請求項5にかかる発明は、請求項4に記載のシリアル通信装置において、前記シリアルデータを送信するマスタ装置と該マスタ装置から送信される前記シリアルデータを受信する複数のスレーブ装置とを備え、前記複数のスレーブ装置には互いに異なる前記識別コードが割り当てられ、前記複数のスレーブ装置の内の特定のスレーブ装置が、該特定のスレーブ装置に割り当てられている識別コードを形成する2値で構成された特定のシリアルデータを受信することで、前記特定のスレーブ装置が識別されるとともに、前記特定のスレーブ装置が前記特定のシリアルデータにより制御されることを特徴とする。
請求項6にかかる発明は、請求項に記載のシリアル通信装置において、前記シリアルデータを送信するマスタ装置と該マスタ装置から送信される前記シリアルデータを受信するスレーブ装置とを備え、前記スレーブ装置は互いに異なる前記識別コードが割り当てられた複数のレジスタを含み、該複数のレジスタの内の特定のレジスタが、該特定のレジスタに割り当てられている識別コードを形成する2値で構成される特定のシリアルデータを受信することで、前記特定のレジスタが識別されるとともに、前記特定のレジスタが該特定のシリアルデータにより制御されることを特徴とする。
In order to achieve the above object, a serial communication method according to a first aspect of the present invention detects a time difference obtained by subtracting the other from one of an “H” period and an “L” period in a unit interval of received serial data. In the serial communication method for determining the logical value of the serial data according to at least the polarity of the time difference, the serial data has edges of the same polarity at the start point and end point of the unit interval, and the start point and An edge having a reverse polarity between the end points, the range between the positive maximum value and the negative maximum value of the time difference is divided into n (n is 2 or more), and the logical value is divided into n values characterized by a.
According to a second aspect of the present invention, in the serial communication method according to the first aspect, the n value is three or more, and a plurality of different identification codes determined by a combination of two of the n values are formed. The serial data is composed of binary values forming a specific identification code among the plurality of identification codes .
The serial communication device according to a third aspect of the present invention counts the “H” period and the “L” period in the unit interval of the received serial data with a reference clock, respectively, and the count value of the “H” period and the “ The count means for outputting a signal indicating at least the polarity of the time difference obtained by subtracting the other from one of the count values of the “L” period, and the serial data according to the signal indicating at least the polarity of the time difference output from the counting means. A determination means for determining a logical value, wherein the serial data has edges of the same polarity at a start point and an end point of the unit section, and the start point and the end point has a polarity opposite edge during, dividing the range between the positive maximum value and a negative maximum value of the time difference into n (n is 2 or more), the logical value n Characterized by a.
According to a fourth aspect of the present invention, in the serial communication device according to the third aspect, the n value is three or more, and a plurality of different identification codes determined by a combination of two of the n values are formed. The serial data is composed of binary values forming a specific identification code among the plurality of identification codes.
The invention according to claim 5 is the serial communication device according to claim 4, comprising a master device that transmits the serial data, and a plurality of slave devices that receive the serial data transmitted from the master device, Different identification codes are assigned to a plurality of slave devices, and a specific slave device among the plurality of slave devices is configured with a binary value forming an identification code assigned to the specific slave device. by receiving the certain serial data, together with the particular slave device is identified, the specific slave device and wherein the Rukoto is controlled by the particular serial data.
The invention according to claim 6 is the serial communication device according to claim 4 , comprising: a master device that transmits the serial data; and a slave device that receives the serial data transmitted from the master device. Includes a plurality of registers to which the identification codes different from each other are assigned, and a specific register among the plurality of registers is constituted by a binary value forming an identification code assigned to the specific register The specific register is identified by receiving serial data, and the specific register is controlled by the specific serial data .

本発明によれば、受信したシリアルデータの単位区間内の「H」期間と「L」期間の一方から他方を差し引いた時間差分を検出し、該時間差分に応じてシリアルデータの論理値を判定するので、その単位時間を調整すること、あるいはその単位時間を計測する基準クロックの周波数を調整することによって、シリアルデータの通信速度を容易に変更することができる。   According to the present invention, the time difference obtained by subtracting the other from one of the “H” period and the “L” period in the unit interval of the received serial data is detected, and the logical value of the serial data is determined according to the time difference. Therefore, the communication speed of the serial data can be easily changed by adjusting the unit time or adjusting the frequency of the reference clock for measuring the unit time.

本発明の第1の実施例のシリアルデータ受信装置のブロック図である。1 is a block diagram of a serial data receiving apparatus according to a first embodiment of the present invention. 図1のシリアルデータ受信装置の動作波形図である。It is an operation | movement waveform diagram of the serial data receiver of FIG. 本発明の第2の実施例のシリアルデータ受信装置のブロック図である。It is a block diagram of the serial data receiver of 2nd Example of this invention. 図3のシリアルデータ受信装置の動作波形図である。FIG. 4 is an operation waveform diagram of the serial data receiving device of FIG. 3. 本発明の第3の実施例のマスタ/スレーブ装置のブロック図である。It is a block diagram of the master / slave apparatus of the 3rd Example of this invention. 図5のスレーブ装置のブロック図である。FIG. 6 is a block diagram of the slave device of FIG. 5. 図6の判定部4Aの動作波形図である。It is an operation | movement waveform diagram of 4 A of determination parts of FIG. 図5のスレーブ装置の判定部4Aの動作波形図である。FIG. 6 is an operation waveform diagram of a determination unit 4A of the slave device of FIG. 本発明の第4の実施例のスレーブ装置の動作波形図である。It is an operation | movement waveform diagram of the slave apparatus of the 4th Example of this invention. 本発明の第4の実施例のスレーブ装置の動作波形図である。It is an operation | movement waveform diagram of the slave apparatus of the 4th Example of this invention. 本発明の第5の実施例のマスタ/スレーブ装置のブロック図である。It is a block diagram of the master / slave apparatus of the 5th Example of this invention. 従来のシリアルデータの「H」と「L」の識別の説明図である。It is explanatory drawing of identification of "H" and "L" of the conventional serial data.

<第1の実施例>
図1に本発明の第1の実施例のシリアルデータ受信装置を示す。1はDFF回路であり、シリアルデータDを基準クロックCLKで保持する。2はアンド回路であり、シリアルデータDとDFF回路1の反転Q出力データを入力して、シリアルデータDの立上りエッジの検出信号n1を出力する。3はアップダウンカウンタであり、DFF回路1のQ出力データD1が「H」のとき基準クロックCLKをアップカウントし、「L」のとき基準クロックCLKをダウンカウントし、アンド回路2の出力データn1が「H」のとき初期化される。4は判定部であり、アップダウンカウンタ3の初期化時のカウント値n2に応じて、シリアルデータDの「H」、「L」の判定を行う。なお、基準クロックCLKとしては、シリアルデータDの先頭に含ませた同期符号から再生したクロックあるいはシリアルデータDと別に送信するクロックを使用する。
<First embodiment>
FIG. 1 shows a serial data receiving apparatus according to a first embodiment of the present invention. Reference numeral 1 denotes a DFF circuit which holds serial data D with a reference clock CLK. An AND circuit 2 inputs serial data D and inverted Q output data of the DFF circuit 1 and outputs a detection signal n1 of the rising edge of the serial data D. Reference numeral 3 denotes an up / down counter. When the Q output data D1 of the DFF circuit 1 is “H”, the reference clock CLK is up-counted. When the Q output data D1 is “L”, the reference clock CLK is down-counted. It is initialized when is “H”. A determination unit 4 determines “H” or “L” of the serial data D according to the count value n2 when the up / down counter 3 is initialized. As the reference clock CLK, a clock regenerated from the synchronization code included at the head of the serial data D or a clock transmitted separately from the serial data D is used.

図2に図1のシリアルデータ受信装置の動作波形を示す。DFF回路1の反転Q出力のデータがシリアルデータDに対して1クロック分遅れているので、1クロック分の「H」パルスがエッジ検出信号n1としてアンド回路2から出力し、これにより、アップダウンカウンタ3が初期化される。このアップダウンカウンタ3は、DFF回路1のQ出力データD1の「H」の期間は「0」〜「9」までアップカウントし、「L」の期間は「9」からダウンカウントし、「−12」までダウンカウントした時点で初期化されるので、最終的なアップダウンカウンタ3のカウント値n2は「−12」となる。   FIG. 2 shows operation waveforms of the serial data receiving apparatus of FIG. Since the data of the inverted Q output of the DFF circuit 1 is delayed by one clock with respect to the serial data D, the “H” pulse for one clock is output from the AND circuit 2 as the edge detection signal n1, thereby up-down Counter 3 is initialized. The up / down counter 3 counts up from “0” to “9” during the “H” period of the Q output data D1 of the DFF circuit 1 and counts down from “9” during the “L” period. Since it is initialized when it counts down to "12", the final count value n2 of the up / down counter 3 is "-12".

図2ではシリアルデータDの論理を判定する単位時間が31クロックであるので、カウント値n2の負の最大値は−30となり、正の最大値は+30となる。よって、例えば、
n2=−30 〜 −1・・・・・「L」
n2= 0 〜 +30・・・・「H」
のようにH/Lの判定基準を判定部4に予め設定しておけば、その判定部4においてシリアルデータDの2値判定が可能となる。図2の例ではシリアルデータDは「L」と判定される。なお、アップダウンカウンタ3の最上位ビットはカウント値の極性を示すので、アップダウンカウンタ3の最上位ビットのみを判定することでも、2値判定が可能となる。このとき、具体的なカウント値n2を判定する必要はない。
In FIG. 2, since the unit time for judging the logic of the serial data D is 31 clocks, the negative maximum value of the count value n2 is −30, and the positive maximum value is +30. So, for example,
n2 = -30 to -1 "L"
n2 = 0 to +30... "H"
As described above, if the determination criterion of H / L is set in the determination unit 4 in advance, the determination unit 4 can perform binary determination of the serial data D. In the example of FIG. 2, the serial data D is determined to be “L”. Since the most significant bit of the up / down counter 3 indicates the polarity of the count value, it is possible to perform binary determination even by determining only the most significant bit of the up / down counter 3. At this time, it is not necessary to determine a specific count value n2.

本実施例によれば、シリアルデータ受信装置の側において、シリアルデータDの判定を行う単位時間(クロックCLKの数)を調整し、あるいはクロックCLKの周波数を調整できるので、それに合わせて送信側でシリアルデータDの通信速度を調整することができる。例えば、通信速度を上げる場合は単位時間を短くし、あるいはクロックCLKの周波数を高くすればよく、通信速度を下げる場合はその逆を行えばよい。   According to the present embodiment, the serial data receiving device can adjust the unit time (number of clocks CLK) for determining the serial data D, or can adjust the frequency of the clock CLK. The communication speed of the serial data D can be adjusted. For example, when the communication speed is increased, the unit time is shortened or the frequency of the clock CLK is increased, and when the communication speed is decreased, the reverse is performed.

<第2の実施例>
第2の実施例では、図3に示すように、図1のシリアルデータ受信装置で説明した判定部4を「L」、「M」、「H」の3値を判定できる判定部4Aに置き換える。図2ではシリアルデータDの論理を判定する単位時間が31クロックであり、カウント値n2の負の最大値は−30となり、正の最大値は+30となるので、この範囲を3分割して、例えば、
n2=−30 〜 −15・・・・・「L」
n2=−14 〜 +14・・・・・「M」
n2=+15 〜 +30・・・・・「H」
のようにし、この判定基準「L」、「M」、「H」のカウント値n2を判定部4Aに設定する。これにより、3値で形成されたシリアルデータDを受信して、判定部4Aで3値判定を行うことができる。図4(a)にn2=−12の場合(D=「L」)の波形を、図3(b)にn2=+8の場合(D=「H」)の波形を、図3(a)にn2=0の場合(D=「M」)の波形を、それぞれ示した。
<Second embodiment>
In the second embodiment, as shown in FIG. 3, the determination unit 4 described in the serial data receiving apparatus in FIG. 1 is replaced with a determination unit 4A that can determine three values of “L”, “M”, and “H”. . In FIG. 2, the unit time for judging the logic of the serial data D is 31 clocks, and the negative maximum value of the count value n2 is −30, and the positive maximum value is +30. For example,
n2 = -30 to -15 "L"
n2 = -14 to +14 "M"
n2 = + 15 to +30... “H”
Thus, the count values n2 of the determination criteria “L”, “M”, and “H” are set in the determination unit 4A. Thereby, the serial data D formed of three values can be received, and the determination unit 4A can perform the three value determination. 4A shows a waveform when n2 = −12 (D = “L”), FIG. 3B shows a waveform when n2 = + 8 (D = “H”), and FIG. The waveforms when n2 = 0 (D = “M”) are shown.

このように、第2の実施例では、シリアルデータDの単位区間に3値のデータを含ませ、シリアルデータ受信装置でそれを識別受信することができる。   As described above, in the second embodiment, ternary data is included in the unit interval of the serial data D, and the serial data receiving device can identify and receive it.

<第3の実施例>
第2の実施例のシリアルデータ受信装置は、上記したようにシリアルデータDに3値を含ませることができるので、3値の内の2値の組み合わせに応じて、特定のシリアルデータ受信装置の識別と当該シリアルデータ受信装置の制御を行うことができる。
<Third embodiment>
Since the serial data receiving apparatus of the second embodiment can include three values in the serial data D as described above, according to the combination of two of the three values, a specific serial data receiving apparatus Identification and control of the serial data receiving apparatus can be performed.

図5に1個のマスタ装置10によって3個のスレーブ装置11,12,13の識別と制御を行う例を示す。ここでは、スレーブ装置11,12,13に、図6に示すシリアルデータ受信装置の構成を採用する。図6において、5は3値の内の2値が識別コードとして割り当てられた識別部、6はシリアルデータDによって制御される制御部である。   FIG. 5 shows an example in which one master device 10 identifies and controls three slave devices 11, 12, and 13. Here, the configuration of the serial data receiving device shown in FIG. 6 is adopted for the slave devices 11, 12, and 13. In FIG. 6, 5 is an identification unit in which two of the three values are assigned as identification codes, and 6 is a control unit controlled by serial data D.

ここでは、マスタ装置10から送信するシリアルデータDとして、単位時間を4クロックとした図7に示すような3値データを使用する。すなわち、n2=「L」と判定されるデータを「0」とし、n2=「M」と判定されるデータを「1」とし、n2=「H」と判定されるデータを「2」とするデータを使用する。そして、図5に示すスレーブ装置11の識別部5には「0、1」の識別コードを割り当て、スレーブ装置12の識別部5には「1、2」の識別コードを割り当て、スレーブ装置13の識別部5には「0、2」の識別コードを割り当てる。   Here, as the serial data D transmitted from the master apparatus 10, ternary data as shown in FIG. 7 with a unit time of 4 clocks is used. That is, data determined as n2 = “L” is “0”, data determined as n2 = “M” is “1”, and data determined as n2 = “H” is “2”. Use the data. Then, an identification code “0, 1” is assigned to the identification unit 5 of the slave device 11 shown in FIG. 5, and an identification code of “1, 2” is assigned to the identification unit 5 of the slave device 12. An identification code “0, 2” is assigned to the identification unit 5.

このようにスレーブ装置11、12、13にそれぞれ異なった識別コードを割り当てると、図8(a)に示すように、「0」と「1」でシリアルデータDを形成するときは、8ビットデータとして、例えば、「0x55」、「0x02」、「0xF0」、「0x38」を構成することができる。この場合は、シリアルデータDに「0」と「1」のデータが含まれるので、スレーブ装置11の識別部5においてそれが識別されて、当該スレーブ装置11が選択される。そして、スレーブ装置11の制御部6において、上記8ビットデータ「0x55」、「0x02」、「0xF0」、「0x38」によって所定の制御が行われる。   If different identification codes are assigned to the slave devices 11, 12, and 13 as described above, as shown in FIG. 8A, when the serial data D is formed with "0" and "1", 8-bit data For example, “0x55”, “0x02”, “0xF0”, and “0x38” can be configured. In this case, since the data “0” and “1” are included in the serial data D, the identification unit 5 of the slave device 11 identifies them, and the slave device 11 is selected. Then, the control unit 6 of the slave device 11 performs predetermined control by the 8-bit data “0x55”, “0x02”, “0xF0”, “0x38”.

また、図8(b)に示すように、「1」と「2」でシリアルデータDを形成したときは、8ビットデータとして、例えば、「0xAA」、「0x20」、「0x0E」、「0x79」を構成することができる。この場合は、シリアルデータDに「1」と「2」のデータが含まれるので、スレーブ装置12の識別部5においてそれが識別されて、当該スレーブ装置12が選択される。そして、スレーブ装置12の制御部6において、上記8ビットデータ「0xAA」、「0x20」、「0x0E」、「0x79」によって所定の制御が行われることになる。   Also, as shown in FIG. 8B, when serial data D is formed with “1” and “2”, as 8-bit data, for example, “0xAA”, “0x20”, “0x0E”, “0x79” Can be configured. In this case, since the data “1” and “2” are included in the serial data D, the identification unit 5 of the slave device 12 identifies them, and the slave device 12 is selected. Then, in the control unit 6 of the slave device 12, predetermined control is performed by the 8-bit data “0xAA”, “0x20”, “0x0E”, “0x79”.

また、図8(c)に示すように、「0」と「2」でシリアルデータDを形成したときは、8ビットデータとして、例えば、「0x33」、「0xB4」、「0xDC」、「0x16」を構成することができる。この場合は、シリアルデータDに「0」と「2」のデータが含まれるので、スレーブ装置13の識別部5においてそれが識別されて、当該スレーブ装置13が選択される。そして、スレーブ装置13の制御部6において、上記8ビットデータ「0x33」、「0xB4」、「0xDC」、「0x16」によって所定の制御が行われることになる。   Further, as shown in FIG. 8C, when the serial data D is formed with “0” and “2”, as the 8-bit data, for example, “0x33”, “0xB4”, “0xDC”, “0x16” Can be configured. In this case, since the data “0” and “2” are included in the serial data D, the identification unit 5 of the slave device 13 identifies them, and the slave device 13 is selected. Then, in the control unit 6 of the slave device 13, predetermined control is performed by the 8-bit data “0x33”, “0xB4”, “0xDC”, and “0x16”.

このように、第3の実施例では、シリアルデータDに含ませた3値データのうちの互いに異なる3種の2値データを識別コードに使用することによって、3つのスレーブ装置の識別と制御を行うことができる。   Thus, in the third embodiment, the three slave devices are identified and controlled by using three different binary data among the three-value data included in the serial data D as the identification code. It can be carried out.

<第4の実施例>
図5〜図8で説明した第3の実施例では、8ビットデータとして、必ず2値を含む必要があるので、1値のみを使用する「0x00」や「0xFF」のデータを作成してもスレーブ装置11、12、13の識別部5で識別されない。そこで、「0x00」や「0xFF」のデータを含ませる必要がある場合には、それを識別する対のデータを1ビットだけ付加して、9ビットデータとする。
<Fourth embodiment>
In the third embodiment described with reference to FIGS. 5 to 8, since it is necessary to always include two values as 8-bit data, even if data of “0x00” or “0xFF” using only one value is created. It is not identified by the identification unit 5 of the slave devices 11, 12, 13. Therefore, when it is necessary to include data of “0x00” or “0xFF”, only one bit is added to identify the pair to make 9-bit data.

図9(a)は、スレーブ装置11用の識別データ「0」、「1」を使用して「0x00」、「0xFF」のデータをマスタ装置10から送信する場合の例である。ここでは、8ビットデータ「0x00」として「0」を使用し、9ビット目に「1」を識別ビットとして付加している。また、8ビットデータ「0xFF」として「1」を使用し、9ビット目に「0」を識別ビットとして付加している。これらにより、識別部5は9ビット目までの識別を行う必要があるものの、8ビットの全データ「0x00」〜「0xFF」を送受信することが可能となる。   FIG. 9A shows an example in which the data “0x00” and “0xFF” are transmitted from the master device 10 using the identification data “0” and “1” for the slave device 11. Here, “0” is used as the 8-bit data “0x00”, and “1” is added to the ninth bit as an identification bit. Further, “1” is used as the 8-bit data “0xFF”, and “0” is added to the ninth bit as an identification bit. As a result, although the identification unit 5 needs to identify up to the ninth bit, it can transmit and receive all 8-bit data “0x00” to “0xFF”.

図9(b)は、スレーブ装置12用の識別データ「1」、「2」を使用して「0x00」、「0xFF」のデータをマスタ装置10から送信する場合の例である。また、図9(c)は、スレーブ装置13用のデータ「0」、「2」を使用して「0x00」、「0xFF」のデータをマスタ装置10から送信する場合の例である。いずれの場合も、8ビットの全データ「0x00」〜「0xFF」を送受信することが可能となる。   FIG. 9B illustrates an example in which the data “0x00” and “0xFF” are transmitted from the master device 10 using the identification data “1” and “2” for the slave device 12. FIG. 9C shows an example in which data “0x00” and “0xFF” are transmitted from the master device 10 using the data “0” and “2” for the slave device 13. In any case, it is possible to transmit / receive all 8-bit data “0x00” to “0xFF”.

なお、以上では8ビットデータの次の9ビット目に識別ビットを付加したが、図10の(a),(b),(c)に示すように、1ビット目に識別ビットを付加し、その後ろに8ビットデータを続ける構成でも、同様にスレーブ装置11、12、13等で識別可能なデータ「0x00」、「0xFF」を実現することができる。   In the above description, an identification bit is added to the next 9 bits of the 8-bit data. However, as shown in (a), (b), and (c) of FIG. Even in the configuration in which 8-bit data is continued thereafter, data “0x00” and “0xFF” that can be similarly identified by the slave devices 11, 12, 13, and the like can be realized.

<第5の実施例>
また、以上ではスレーブ装置11,12,13のそれぞれに2ビットの識別コードを割り当てたが、図11に示すように、1個のスレーブ装置14の中に3個のレジスタ141,142,143が装備されているとき、その3個のレジスタ141,142,143に個々に2ビットの識別コードを割り当てて、当該レジスタ141,142,143を識別し、制御することが可能となる。この場合は、当該レジスタ141,142,143に、それぞれ図6で説明した識別部5と制御部6を設ければよい。
<Fifth embodiment>
In the above description, a 2-bit identification code is assigned to each of the slave devices 11, 12, and 13. However, as shown in FIG. 11, three registers 141, 142, and 143 are included in one slave device 14. When equipped, each of the three registers 141, 142, 143 can be individually assigned a 2-bit identification code to identify and control the registers 141, 142, 143. In this case, the registers 141, 142, and 143 may be provided with the identification unit 5 and the control unit 6 described with reference to FIG.

1:DFF回路、2:アンド回路、3:アップダウンカウンタ、4,4A:判定部、5:識別部、6:制御部
10:マスタ装置、11〜14:スレーブ装置
1: DFF circuit, 2: AND circuit, 3: up / down counter, 4, 4A: determination unit, 5: identification unit, 6: control unit 10: master device, 11-14: slave device

Claims (6)

受信したシリアルデータの単位区間内の「H」期間と「L」期間の一方から他方を差し引いた時間差分を検出し、該時間差分の少なくとも極性に応じて前記シリアルデータの論理値を判定するシリアル通信方法において、
前記シリアルデータは、前記単位区間の開始点と終了点に同一極性のエッジを持ち、前記開始点と前記終了点の間に逆極性のエッジを持ち、
前記時間差分の正の最大値と負の最大値との間の範囲をn個(nは2以上)に分割し、前記論理値をn値とすることを特徴とするシリアル通信方法。
Detecting the received "H" period and "L" time difference obtained by subtracting the other from one period in the unit interval of serial data, serial determines the logical value of the serial data in accordance with at least the polarity of said time difference In the communication method,
The serial data has an edge of the same polarity at the start point and end point of the unit interval, and has an edge of opposite polarity between the start point and the end point,
A serial communication method , wherein a range between a positive maximum value and a negative maximum value of the time difference is divided into n (n is 2 or more), and the logical value is an n value .
請求項1に記載のシリアル通信方法において、
前記n値は3値以上であり、前記n値のうちの2値の組み合わせで決まる互いに異なる複数の識別コードが形成され、該複数の識別コードの内の特定の識別コードを形成する2値で前記シリアルデータが構成されていることを特徴とするシリアル通信方法。
The serial communication method according to claim 1,
The n value is 3 or more, and a plurality of different identification codes determined by a combination of two of the n values are formed, and a binary value that forms a specific identification code among the plurality of identification codes A serial communication method comprising the serial data .
受信したシリアルデータの単位区間内の「H」期間と「L」期間をそれぞれ基準クロックでカウントして、前記「H」期間のカウント値と前記「L」期間のカウント値の一方から他方を差し引いた時間差分の少なくとも極性を示す信号を出力するカウント手段と、該カウント手段から出力する前記時間差分の少なくとも極性を示す信号に応じて前記シリアルデータの論理値を判定する判定手段と、を備えることを特徴とするシリアル通信装置において、
前記シリアルデータは、前記単位区間の開始点と終了点に同一極性のエッジを持ち、前記開始点と前記終了点の間に逆極性のエッジを持ち、
前記時間差分の正の最大値と負の最大値との間の範囲をn個(nは2以上)に分割し、前記論理値をn値とすることを特徴とするシリアル通信装置
The “H” period and the “L” period in the unit interval of the received serial data are counted by the reference clock, respectively, and one of the count value of the “H” period and the count value of the “L” period is subtracted from the other. Counting means for outputting a signal indicating at least the polarity of the time difference, and determining means for determining a logical value of the serial data according to a signal indicating at least the polarity of the time difference output from the counting means. In a serial communication device characterized by
The serial data has an edge of the same polarity at the start point and end point of the unit interval, and has an edge of opposite polarity between the start point and the end point,
A serial communication device , wherein a range between the positive maximum value and the negative maximum value of the time difference is divided into n (n is 2 or more), and the logical value is set to n value.
請求項3に記載のシリアル通信装置において、
前記n値は3値以上であり、前記n値のうちの2値の組み合わせで決まる互いに異なる複数の識別コードが形成され、該複数の識別コードの内の特定の識別コードを形成する2値で前記シリアルデータが構成されていることを特徴とするシリアル通信装置
The serial communication device according to claim 3, wherein
The n value is 3 or more, and a plurality of different identification codes determined by a combination of two of the n values are formed, and a binary value that forms a specific identification code among the plurality of identification codes A serial communication apparatus comprising the serial data.
請求項4に記載のシリアル通信装置において、
前記シリアルデータを送信するマスタ装置と該マスタ装置から送信される前記シリアルデータを受信する複数のスレーブ装置とを備え、
前記複数のスレーブ装置には互いに異なる前記識別コードが割り当てられ、
前記複数のスレーブ装置の内の特定のスレーブ装置が、該特定のスレーブ装置に割り当てられている識別コードを形成する2値で構成された特定のシリアルデータを受信することで、前記特定のスレーブ装置が識別されるとともに、前記特定のスレーブ装置が前記特定のシリアルデータにより制御されることを特徴とするシリアル通信装置。
The serial communication device according to claim 4, wherein
A master device for transmitting the serial data and a plurality of slave devices for receiving the serial data transmitted from the master device;
The plurality of slave devices are assigned different identification codes,
A specific slave device of the plurality of slave devices receives specific serial data composed of two values forming an identification code assigned to the specific slave device, whereby the specific slave device together but are identified, serial communication device, wherein the specific slave device and wherein the Rukoto is controlled by the particular serial data.
請求項に記載のシリアル通信装置において、
前記シリアルデータを送信するマスタ装置と該マスタ装置から送信される前記シリアルデータを受信するスレーブ装置とを備え、
前記スレーブ装置は互いに異なる前記識別コードが割り当てられた複数のレジスタを含み、
該複数のレジスタの内の特定のレジスタが、該特定のレジスタに割り当てられている識別コードを形成する2値で構成される特定のシリアルデータを受信することで、前記特定のレジスタが識別されるとともに、前記特定のレジスタが該特定のシリアルデータにより制御されることを特徴とするシリアル通信装置。
The serial communication device according to claim 4 , wherein
A master device for transmitting the serial data and a slave device for receiving the serial data transmitted from the master device;
The slave device includes a plurality of registers to which the different identification codes are assigned,
A specific register of the plurality of registers receives the specific serial data composed of two values forming an identification code assigned to the specific register, so that the specific register is identified. In addition, the serial register is controlled by the specific serial data .
JP2014061303A 2014-03-25 2014-03-25 Serial communication method and serial communication device Active JP6302713B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014061303A JP6302713B2 (en) 2014-03-25 2014-03-25 Serial communication method and serial communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014061303A JP6302713B2 (en) 2014-03-25 2014-03-25 Serial communication method and serial communication device

Publications (2)

Publication Number Publication Date
JP2015184955A JP2015184955A (en) 2015-10-22
JP6302713B2 true JP6302713B2 (en) 2018-03-28

Family

ID=54351398

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014061303A Active JP6302713B2 (en) 2014-03-25 2014-03-25 Serial communication method and serial communication device

Country Status (1)

Country Link
JP (1) JP6302713B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102017102417A1 (en) 2017-02-08 2018-08-09 Infineon Technologies Ag SENSOR COMPONENTS AND METHOD FOR TRANSMITTING SENSOR DATA AND METHOD FOR CONTROLLING A SENSOR COMPONENT, DEVICE AND METHOD FOR DECODING SENSOR SIGNAL

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6010852A (en) * 1983-06-29 1985-01-21 Fujitsu Ltd Serial data receiver
JP2003016026A (en) * 2001-06-28 2003-01-17 Mitsubishi Electric Corp Serial communication circuit
JP4703394B2 (en) * 2005-12-23 2011-06-15 新日本無線株式会社 Interface system

Also Published As

Publication number Publication date
JP2015184955A (en) 2015-10-22

Similar Documents

Publication Publication Date Title
JP5896602B2 (en) Communication circuit and sampling adjustment method
JP5794352B2 (en) Receiving device and method for detecting number of same-value bits in received bit string
JP5325107B2 (en) Serial digital data communication interface
CN108023846B (en) Method, circuit, device and computer program product for detecting FSK modulation signal
US7844020B2 (en) Transmission system, transmitter, receiver, and transmission method
WO2014181573A1 (en) Signal processing device
EP2051465A3 (en) Configurable demodulator and demodulation method
JP2010504698A5 (en)
JP6302713B2 (en) Serial communication method and serial communication device
TWI436219B (en) Sampling phase selection module for a stream of data bits
CN103888143A (en) Manchester code receiving circuit
IL172301A0 (en) Method and system for measuring average q - factor in optical networks
US10511464B2 (en) Baud rate tracking and compensation apparatus and method
US10598776B2 (en) Method for determining sampling phase of sampling clock signal and associated electronic device
JPH07131495A (en) Decoding circuit for multilevel signal
US9112763B1 (en) Device, system and method for bi-phase modulation decoding
JP2016143430A5 (en)
JP6232313B2 (en) Synchronous serial communication method and slave device
JP2006325191A (en) Communication apparatus
JP2008278459A5 (en)
CN100440876C (en) Communication apparatus
JP5383856B2 (en) Transmitter circuit
JP5704506B2 (en) Communication device and field device system
WO2022041421A1 (en) Adaptive data decoding circuit and led unit circuit
JP2014082697A (en) Serial communication apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170203

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180305

R150 Certificate of patent or registration of utility model

Ref document number: 6302713

Country of ref document: JP

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