JP2004187117A - Serial data communication method - Google Patents
Serial data communication method Download PDFInfo
- Publication number
- JP2004187117A JP2004187117A JP2002353285A JP2002353285A JP2004187117A JP 2004187117 A JP2004187117 A JP 2004187117A JP 2002353285 A JP2002353285 A JP 2002353285A JP 2002353285 A JP2002353285 A JP 2002353285A JP 2004187117 A JP2004187117 A JP 2004187117A
- Authority
- JP
- Japan
- Prior art keywords
- data
- bit
- transmission target
- transmission
- bits
- 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
Links
Images
Landscapes
- Dc Digital Transmission (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、パルストランスが備えられた通信線を経て、送信対象データをシリアルデータとして送信又は受信するシリアルデータ通信方法に関する。
【0002】
【従来の技術】
かかるシリアルデータ通信方法は、データの送信側とデータの受信側との間を電気的に絶縁してグラウンドレベルを独立したものとする等のために、パルストランスが備えられた通信線を経てシリアル形式でデータ通信を行うものである。
このようなデータ通信においては、パルストランスに直流信号を印加し続けるといわゆる磁気飽和を起こし、信号が正しく伝送されないという問題がある。
このため、従来は、特許文献1及び特許文献2に記載のように、同一値のビットが連続する時間間隔を短くするように送信対象データを符号化するエンコーダICを備えるのが一般的であった。
【0003】
【特許文献1】
特開平7−107121号公報
【特許文献2】
特開2001−156862号公報
【0004】
【発明が解決しようとする課題】
しかしながら、上記従来構成では、複雑な符号化処理を実行するために専用のエンコーダICが必要となり、回路構成が複雑化してしまう不都合があった。
本発明は、かかる実情に鑑みてなされたものであって、その目的は、簡便な処理によって低コストでパルストランスの磁気飽和を防止する点にある。
【0005】
【課題を解決するための手段】
上記請求項1記載の構成を備えることにより、パルストランスが備えられた通信線を経て、送信対象データをシリアルデータとして送信又は受信するシリアルデータ通信方法において、前記送信対象データのビット反転データを求め、前記送信対象データと前記ビット反転データとを1データ毎に交互に送信又は受信する。
【0006】
磁気飽和の観点から、パルストランスにとって最悪の条件となるのは、仮に送信対象データのビット長が8ビットであるとすると、「11111111」あるいは「00000000」のように各桁の値が同一のビット値となっているデータの場合である。
このような条件下でも適正にデータを送受信するためには、少なくとも8ビット分のデータを送る時間間隔は磁気飽和を起こさないパルストランスを選定する必要がある。
【0007】
但し、その時間間隔の間で磁気飽和を起こさなくても、更に、その後に、「11111111」あるいは「00000000」というような厳しい条件のデータが連続してしまうと、先行のデータによる磁化がパルストランスに残留しているため、前記時間間隔よりも短い時間で磁気飽和を起こしてしまう。
そこで、送信対象データと、その送信対象データの各桁のビット値をビット反転して生成した前記ビット反転データとを交互に送信又は受信することで、最悪の条件では「11111111」あるいは「00000000」の送信対象データの後に、その送信対象データのビット反転値である「00000000」あるいは「11111111」が続くことを保証して、パルストランスの磁気飽和を防止するのである。
上記のような送信対象データのビット反転データは、データの否定値を求める演算によるソフトウェア処理にて容易に生成することができるので、簡便な処理によって低コストでパルストランスの磁気飽和を防止することができる。
しかも、シリアルデータ通信の受信側では、前記送信対象データと前記ビット反転データとを対比して、対応する桁が互いにビット反転値となっていなかった場合は、データが適正に送受信されず、何らかの通信異常が発生したことを検知でき、データ通信の品質向上にも寄与し得るものとなる。
【0008】
尚、前記送信対象データの「1データ」のデータ長は、請求項1の処理を実行するマイクロプロセッサ等の処理装置における演算処理過程において「1データ」として取り扱われるデータ長であっても良いし、あるいは、シリアルデータに変換された後の「1データ」のデータ長であっても良い。
「1データ」のデータ長を前記処理装置側の「1データ」のデータ長とした場合はもちろん簡便なソフトウェア処理が可能であり、シリアルデータでの「1データ」のデータ長とした場合でも、一般にシリアルデータでの1データはマイクロプロセッサ等においても演算処理が容易なデータ長となっており、簡便なソフトウェア処理が行える。
【0009】
又、上記請求項2記載の構成を備えることにより、パルストランスが備えられた通信線を経て、送信対象データをシリアルデータとして送信又は受信するシリアルデータ通信方法において、前記送信対象データの各ビットを複数のグループに分けて、前記各グループのデータと、そのグループの各ビットの否定値にて構成されるビット反転補助データとを、桁の並びにおいて交互に配置して実送信データを生成し、その実送信データを前記通信線に送信する。
【0010】
すなわち、1つの送信対象データを複数のグループ(1つのグループに属するビット数が1ビットである場合も含む)に分けて考えて、そのグループのデータと、そのグループの各ビットの否定値にて構成されるデータ(ビット反転補助データ)とが交互に並ぶように、送信対象データから実送信データを再構築するのである。
従って、元のデータとビット反転補助データとが短周期で変化することになり、これによってパルストランスが磁気飽和を起こしにくくなって、パルストランスの磁気飽和に対する条件を緩和することができる。この場合、各グループのビット数が少ない程、元のデータとビット反転補助データとの変化の周期が短くなり、パルストランスがより磁気飽和を起こしにくくなる。
もって、簡便な処理によって低コストでパルストランスの磁気飽和を防止することができるものとなった。
しかも、シリアルデータ通信の受信側では、前記元のデータ(前記送信対象データの一部)と前記ビット反転補助データとを対比して、対応する桁が互いにビット反転値となっていなかった場合は、データが適正に送受信されず、何らかの通信異常が発生したことを検知でき、データ通信の品質向上にも寄与し得るものとなる。
【0011】
【発明の実施の形態】
以下、本発明のシリアルデータ通信方法の実施の形態を図面に基づいて説明する。
<第1実施形態>
本第1実施形態では、図1に示すように、夫々図示を省略する各種の機器を管理制御するために設けられている2つの制御装置A,B間でデータ通信を行う場合を例示して発明を説明する。
制御装置A,Bには、夫々、通信インターフェース1,2が取付けられており、この通信インターフェース1,2を介して制御装置A,Bがデータの授受を行う。
【0012】
〔通信インターフェース1,2の構成〕
通信インターフェース1,2の構成は、全く共通であり、制御装置A,Bから受け取った8ビットパラレルのデータを汎用シリアル通信データ形式に変換するUART回路11,21と、レシーバ12a,22a及びドライバ12b,22bからなるライントランシーバ12,22と、パルストランス13,23と、その他抵抗及びコンデンサ等を備えて構成されている。従って、制御装置Aと制御装置Bとが、パルストランス13,23が備えられた通信線CLを経て、送信対象データをシリアルデータとして送信又は受信することになる。
上記UART回路11,21及びライントランシーバ12,22は、例えばRS−422やRS−485等の汎用のシリアルデータ通信用のICをそのまま使用することができる。
【0013】
〔データ送受信処理〕
制御装置A,Bは、上記構成の通信インターフェース1,2を経由してデータの通信を行うときに、例えば8ビット長のデータ「11111111」を連続して送信する場合に、そのまま上記通信インターフェース1,2で送信するとパルストランス13,23が磁気飽和してしまうため、送信データをプログラム上で加工処理している。
【0014】
具体的には、制御装置A,Bは、管理下にある機器からデータ送信要求を受け取ったときに、図3に示す処理を開始する。図3の処理は、プログラムとして制御装置A,Bに記憶されている。
以下、制御装置Aから制御装置Bに対して送信する場合を例にとって説明する。
制御装置Aは、先ず、管理下にある機器からバイト(8ビット)単位で、送信すべきデータ(以下、「送信対象データ」と称する)を取り込む(ステップ#1)。
前記機器からのデータの取り込みが完了すると(ステップ#2)、各バイトデータの夫々について、否定値を求める演算を実行することによって、各ビットの値が、送信対象データの対応桁の否定値にて構成されるビット反転データを求める(ステップ#3)。つまり、送信対象データが例えば「11001101」であるときは、その送信対象データのビット反転データは「00110010」となる。
【0015】
次に、送信対象データとそのデータから求めた前記ビット反転データが1データ毎に交互に並ぶように送信データ列を編成し(ステップ#4)、その送信データ列から1バイト毎に、8ビットパラレルのデータとしてバスラインを経由して通信インターフェース1のUART回路11のバッファに順次書込んで行く(ステップ#5)。
UART回路11は、それのバッファに書込まれた1バイトのデータを8ビットのビット列に変換し、そのビット列の前後に調歩同期のためのスタートビット(”0”)とストップビット(”1”)を付加し、更に前後に待機状態を示す信号ビット(”1”)を付加して、シリアル送信データを生成して、順次にライントランシーバ12のドライバ12bへ送り込んで行く。これによって、前記送信対象データと前記ビット反転データとが1データ毎に交互に送信される。
制御装置Aは、全てのデータをUART回路11のバッファに書込むと処理を終了する(ステップ#6)。
【0016】
このデータ送出によって、パルストランス13には、図2に示すような信号が出力される。
図2(a)では、8ビットデータ「01010101」をLSBから順次送信した場合を示しており、図2(b)では、パルストランス13,23にとって最も磁気飽和を起こしやすい状況である8ビットデータ「11111111」を送信した場合を示している。
図2(a)の場合ではもちろんのこと、最も厳しい条件である図2(b)の場合でも、データ「11111111」の後に、そのデータのビット反転データ「00000000」が続くので、磁気飽和の発生を確実に防止できる。
【0017】
パルストランス13,23を経て制御装置Bの通信インターフェース2へ入力されたデータは、8ビットのパラレルデータとして制御装置Bへ取り込まれる。
通信インターフェース2は、前記送信対象データと前記ビット反転データとを1データ毎に交互に受信するので、制御装置Bは、受信したデータから前記ビット反転データを除去して、本来の送信対象データを抽出する。このとき、前記送信対象データと前記ビット反転データとは、ビット反転の関係にあるので、各ビット同士のXORやAND等の演算を実行することにより通信が正常に終了したか否かのチェックも可能である。
以上、制御装置Aから制御装置Bへデータを送信する場合を説明したが、制御装置Bから制御装置Aへデータを送信する場合も、上記と全く同様の処理が実行される。
【0018】
<第2実施形態>
次に、本発明の第2実施形態について説明する。
本第2実施形態は、図1に示す通信インターフェース1,2の構成は、上記第1実施形態と全く共通であり、制御装置A,Bが実行するデータ送受信処理が上記第1実施形態と異なる。
以下、第2実施形態のデータ送受信処理について説明する。
【0019】
〔データ送受信処理〕
本第2実施形態における制御装置A,Bのデータ送受信処理も、処理目的は上記第1実施形態と同様であり、制御装置A,Bは、上記構成の通信インターフェース1,2を経由してデータの通信を行うときに、例えば8ビット長のデータ「11111111」を連続して送信する場合に、そのまま上記通信インターフェース1,2で送信するとパルストランス13,23が磁気飽和してしまうため、送信データをプログラム上で加工処理している。
【0020】
具体的には、制御装置A,Bは、管理下にある機器からデータ送信要求を受け取ったときに、上記第1実施形態と同様に、図3に示す処理を開始する。図3の処理は、プログラムとして制御装置A,Bに記憶されている点も上記第1実施形態と同様である。後述のように、本第2実施形態は、上記第1実施形態とは、図3のステップ#4の処理のおける処理内容が異なる。
以下、制御装置Aから制御装置Bに対して送信する場合を例にとって説明する。
【0021】
制御装置Aは、先ず、管理下にある機器からバイト(8ビット)単位で、送信すべきデータ(以下、「送信対象データ」と称する)を取り込む(ステップ#1)。
前記機器からのデータの取り込みが完了すると(ステップ#2)、各バイトデータの夫々について、否定値を求める演算を実行することによって、各ビットの値が、送信対象データの否定値にて構成されるビット反転データを求める(ステップ#3)。つまり、送信対象データが例えば「11001101」であるときは、その送信対象データのビット反転データは「00110010」となる。
【0022】
次に、前記送信対象データ及び前記ビット反転データから、実際に制御装置Bに送信する実送信データを編成する(ステップ#4)。
この実送信データは、前記送信対象データの各ビットを複数のグループに分けて、前記各グループのデータと、そのグループの各ビットの否定値にて構成されるビット反転補助データとを、桁の並びにおいて交互に配置して生成する。
より具体的には、前記送信対象データの各ビットを同数のビット数を有する複数のグループに分けて、前記各グループのデータと、そのグループの各ビットのデータの否定値にて構成されるビット反転補助データとを、桁の並びにおいて交互に配置して前記実送信データを生成する。
これによって、1つのデータ内で信号が変化することが保証されることになり、これによってパルストランスが磁気飽和を起こしにくくなって、パルストランスの磁気飽和に対する条件を緩和することができる。
しかも、ビット反転補助データを生成する単位であるグループは、各グループに属するビット数が同一となるように均等にグループ分けしているので、上記実送信データを生成する処理も、ソフトウェアによってより容易に行うことができる。
【0023】
各グループに属するビット数は同一であるので、各グループのビット数は前記送信対象データのビット長の約数となり、上記のように送信対象データのビット長が8ビットの場合、「1ビット」,「2ビット」あるいは「4」ビットのいずれかである。本第2実施形態では、各グループの有するビット数が1ビットである場合を例示する。
【0024】
従って、送信対象データが「Da7 Da6 Da5 Da4 Da3 Da2 Da1 Da0」(Da0〜Da7は、各ビットのビット値を示す)であるときに、夫々の要素が「Da7」,「Da6」,「Da5」,「Da4」,「Da3」,「Da2」,「Da1」及び「Da0」である8つのグループに分けて、それらに対応する前記ビット反転補助データ「/Da7」,「/Da6」,「/Da5」,「/Da4」,「/Da3」,「/Da2」,「/Da1」及び「/Da0」(ここで、「/」は各ビットの否定値を意味するものとする)と、桁の並びにおいて交互に配置することで、送信対象データの下位4ビットに対しては「Da3 /Da3 Da2 /Da2 Da1 /Da1 Da0 /Da0」の8ビットデータ、上位4ビットに対しては「Da7 /Da7 Da6 /Da6 Da5 /Da5 Da4 /Da4」の8ビットデータの2つの実送信データを生成する。つまり、送信対象データが例えば「11001101」であるときは、実送信データは、送信対象データの下位4ビットに対しては「10100110」、上位4ビットに対しては「10100101」となる。この実送信データの生成処理は、例えば、前記送信対象データ及び前記ビット反転データに対して、抽出したいビットのみを「1」としたデータとの論理積によるマスキング処理及びビットシフト処理と、それらの処理結果の論理和をとる処理を実行することにより行う。
【0025】
次に、上記実送信データを、1バイト毎に、バスラインを経由して通信インターフェース1のUART回路11のバッファに順次書込んで行く(ステップ#5)。
UART回路11は、それのバッファに書込まれた1バイトのデータを8ビットのビット列に変換し、そのビット列の前後に調歩同期のためのスタートビット(”0”)とストップビット(”1”)を付加し、更に前後に待機状態を示す信号ビット(”1”)を付加して、シリアル送信データを生成して、順次にライントランシーバ12のドライバ12bへ送り込んで行く。
制御装置Aは、全てのデータをUART回路11のバッファに書込むと処理を終了する(ステップ#6)。
【0026】
このデータ送出によって、パルストランス13には、図4に示すような信号が印加される。図4では、8ビットデータ「11111111」を送信した場合を示している。
このように、「ストップビット」及び「待機状態」のビットを入れても、同値のビットが4ビット以上連続することはないので、いわゆるET積が小さく磁気飽和し易いパルストランスを用いても確実に磁気飽和を防止できる。
【0027】
パルストランス13,23を経て制御装置Bの通信インターフェース2へ入力されたデータは、8ビットのパラレルデータとして制御装置Bへ取り込まれる。
制御装置Bは、受信したデータから前記送信対象データの要素のビット値を抽出して1つのデータに再構成する。
以上、制御装置Aから制御装置Bへデータを送信する場合を説明したが、制御装置Bから制御装置Aへデータを送信する場合も、上記と全く同様の処理が実行される。
【0028】
<その他の実施形態>
以下、本発明のその他の実施形態を列記する。
(1)上記第2実施形態では、前記実送信データを求める場合において、送信対象データを、各グループのビット数が1ビットである8つのグループに分ける場合を例示しているが、各グループのビット数が2ビットである4つのグループに分けるようにしても良いし、各グループのビット数が4ビットである2つのグループに分けるようにしても良い。
(2)上記第1実施形態及び上記第2実施形態では、1つのデータのビット長が8ビットである場合を例示しているが、8ビットより長いビット長のデータ又は短いビット長のデータをシリアル通信する場合にも本発明を適用できる。
【0029】
(3)上記第2実施形態では、前記送信対象データが8ビットの場合を示しているが、奇数ビット数のデータの場合でもダミーのビット(1又は0に固定)を送信対象データのMSB、LSB、または中央のビットの前か後ろの位置に設ける等の処理で偶数ビット数とし、本発明を適用可能である。この場合、通常7ビットのデータが16ビット又は15ビットの送信データとなってしまうが、データの受信が完了した時点でダミーのビット、ダミーのビットの反転データを取り除けば元の各7ビットのデータとして復元できる。
【0030】
(4)上記第2実施形態では、前記送信対象データが8ビットであり、「1」及びデータ長の値(「8」)以外にも約数を持つ場合を示しているが、予め、送信側と受信側での取り決めが設定されていれば、「1」及びデータ長の値以外に約数を持たない奇数ビット数のデータの場合、あるいは前記送信対象データを同数のビット数でない複数のグループに分ける場合にも本発明を適用可能である。
例えば送信対象データ7ビット長のものを下位3ビットとその反転データの3ビット、それに上位4ビットのうちの1ビットを加えて7ビットとして先に送信し、次には上位の4ビットのうち、先に送信したビットの残りのビットと上位4ビットの反転データが送信される等の設定で送信、受信、実データへの復元の実現が可能である。よって、どんな長さの送信対象データ長であっても本願発明を実施出来る。この場合、2ビット程が桁の並びにおいて交互に配置できていない場合ができるが、パルストランスの磁気飽和に充分な余裕がある場合には実施出来る。
【0031】
(5)上記第2実施形態では、前記送信対象データ及び前記ビット反転データに対して、抽出したいビットのみを「1」としたデータとの論理積によるマスキング処理及びビットシフト処理と、それらの処理結果の論理和をとる処理を実行することにより前記実送信データを生成する場合を例示しているが、前記実送信データの生成手法としては種々の手法を用いることが可能であり、例えば、以下のようにしても良い。
すなわち、送信対象データが「Da7 Da6 Da5 Da4 Da3 Da2 Da1 Da0」であるときに、前記実送信データとして、送信対象データの奇数ビットにより生成される8ビットデータ「Da7 /Da7 Da5 /Da5 Da3 /Da3 Da1 /Da1」と、送信対象データの偶数ビットにより生成される8ビットデータ「Da6 /Da6 Da4 /Da4 Da2 /Da2 Da0 /Da0」とを生成する。
【0032】
以下、処理手順を列記する。
▲1▼ 送信対象データ「Da7 Da6 Da5 Da4 Da3 Da2 Da1 Da0」から、ビット反転データ「/Da7 /Da6 /Da5 /Da4 /Da3 /Da2 /Da1 /Da0」を作成する。
▲2▼ ビット反転データを下位桁側に1ビットシフトして「* /Da7 /Da6 /Da5 /Da4 /Da3 /Da2 /Da1」(「*」は任意の値)を作成する。
▲3▼ 送信対象データ及び上記▲2▼で作成したデータをマスク処理して、「Da70 Da5 0 Da3 0 Da1 0」及び「0 /Da7 0 /Da5 0 /Da3 0 /Da1」を作成する。
▲4▼ 上記▲3▼で求めた2つのデータを合成して、2つの実送信データのうちの一つ「Da7 /Da7 Da5 /Da5 Da3 /Da3 Da1 /Da1」を作成する。
▲5▼ 送信対象データを上位桁側に1ビットシフトして「Da6 Da5 Da4 Da3 Da2 Da1 Da0 *」(「*」は任意の値)を作成する。
▲6▼ 上記▲5▼で作成したデータ及び前記ビット反転データをマスク処理して、「Da6 0 Da4 0 Da2 0 Da0 0」及び「0 /Da6 0 /Da4 0 /Da2 0 /Da0」を作成する。
▲7▼ 上記▲6▼で求めた2つのデータを合成して、2つの実送信データのうちの残りの1つ「Da6 /Da6 Da4 /Da4 Da2 /Da2 Da0 /Da0」を作成する。
【0033】
【発明の効果】
上記請求項1記載の構成によれば、送信対象データと前記ビット反転データとを交互に送信又は受信することで、最悪の条件では「11111111」あるいは「00000000」の送信対象データの後に、その送信対象データのビット反転値である「00000000」あるいは「11111111」が続くことを保証して、パルストランスの磁気飽和を防止する。
上記のような送信対象データのビット反転データは、データの否定値を求める演算によるソフトウェア処理にて容易に生成することができるので、簡便な処理によって低コストでパルストランスの磁気飽和を防止することができる。
しかも、シリアルデータ通信の受信側では、前記送信対象データと前記ビット反転データとを対比して、対応する桁が互いにビット反転値となっていなかった場合は、データが適正に送受信されず、何らかの通信異常が発生したことを検知でき、データ通信の品質向上にも寄与し得るものとなる。
【0034】
又、上記請求項2記載の構成によれば、1つの送信対象データを複数のグループ(1つのグループに属するビット数が1ビットである場合も含む)に分けて考えて、そのグループのデータと、そのグループの各ビットの否定値にて構成されるデータ(ビット反転補助データ)とが交互に並ぶように、送信対象データから実送信データを再構築する。
従って、元のデータとビット反転補助データとが短周期で変化することになり、これによってパルストランスが磁気飽和を起こしにくくなって、パルストランスの磁気飽和に対する条件を緩和することができる。この場合、各グループのビット数が少ない程、元のデータとビット反転補助データとの変化の周期が短くなり、パルストランスがより磁気飽和を起こしにくくなる。
もって、簡便な処理によって低コストでパルストランスの磁気飽和を防止することができるものとなった。
しかも、シリアルデータ通信の受信側では、前記元のデータ(前記送信対象データの一部)と前記ビット反転補助データとを対比して、対応する桁が互いにビット反転値となっていなかった場合は、データが適正に送受信されず、何らかの通信異常が発生したことを検知でき、データ通信の品質向上にも寄与し得るものとなる。
【図面の簡単な説明】
【図1】本発明の第1実施形態及び第2実施形態にかかる通信回路の構成図
【図2】本発明の第1実施形態にかかる信号説明図
【図3】本発明の第1実施形態及び第2実施形態にかかるフローチャート
【図4】本発明の第2実施形態にかかる信号説明図
【符号の説明】
CL 通信線
13,23 パルストランス[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a serial data communication method for transmitting or receiving transmission target data as serial data via a communication line provided with a pulse transformer.
[0002]
[Prior art]
Such a serial data communication method uses a serial communication via a communication line provided with a pulse transformer in order to electrically insulate the data transmitting side and the data receiving side so that the ground level is independent. It performs data communication in a format.
In such data communication, there is a problem that if a DC signal is continuously applied to the pulse transformer, so-called magnetic saturation occurs, and the signal is not transmitted correctly.
For this reason, conventionally, as described in
[0003]
[Patent Document 1]
JP-A-7-107121 [Patent Document 2]
Japanese Patent Application Laid-Open No. 2001-156682
[Problems to be solved by the invention]
However, in the above-described conventional configuration, a dedicated encoder IC is required to execute a complicated encoding process, and there is a problem that a circuit configuration is complicated.
The present invention has been made in view of such circumstances, and has as its object to prevent magnetic saturation of a pulse transformer at low cost by simple processing.
[0005]
[Means for Solving the Problems]
By providing the configuration according to
[0006]
From the viewpoint of magnetic saturation, the worst condition for the pulse transformer is that if the bit length of the data to be transmitted is 8 bits, the bit value of each digit is the same, such as "11111111" or "00000000". This is the case of data that is a value.
In order to transmit and receive data properly even under such conditions, it is necessary to select a pulse transformer that does not cause magnetic saturation at a time interval at which data of at least 8 bits is transmitted.
[0007]
However, even if magnetic saturation does not occur during the time interval, and if data of strict conditions such as "11111111" or "00000000" continues after that, the magnetization by the preceding data is changed by the pulse transformer. , Magnetic saturation occurs in a time shorter than the time interval.
Therefore, by alternately transmitting or receiving the transmission target data and the bit-inverted data generated by bit-inverting the bit value of each digit of the transmission target data, under the worst condition, “11111111” or “00000000” This ensures that the data to be transmitted is followed by a bit-reversed value of the data to be transmitted, "00000000" or "11111111", thereby preventing magnetic saturation of the pulse transformer.
Since the bit-inverted data of the transmission target data as described above can be easily generated by software processing by an operation for calculating a negative value of the data, magnetic saturation of the pulse transformer can be prevented at low cost by simple processing. Can be.
Moreover, on the receiving side of the serial data communication, the data to be transmitted is compared with the bit-reversed data, and if the corresponding digits are not bit-reversed values, the data is not properly transmitted / received, and It is possible to detect that a communication abnormality has occurred, and to contribute to improving the quality of data communication.
[0008]
The data length of "1 data" of the transmission target data may be a data length handled as "1 data" in an arithmetic processing process in a processing device such as a microprocessor that executes the processing of
When the data length of “1 data” is the data length of “1 data” on the processing device side, simple software processing is of course possible, and when the data length of “1 data” is serial data, In general, one data of serial data has a data length for which arithmetic processing is easy even in a microprocessor or the like, and simple software processing can be performed.
[0009]
Also, by providing the configuration according to
[0010]
That is, one transmission target data is divided into a plurality of groups (including a case where the number of bits belonging to one group is 1 bit), and the data of the group and the negative value of each bit of the group are considered. The actual transmission data is reconstructed from the transmission target data so that the constituted data (bit inversion auxiliary data) are alternately arranged.
Therefore, the original data and the bit inversion auxiliary data change in a short period, which makes it difficult for the pulse transformer to cause magnetic saturation, and alleviates the condition for the magnetic saturation of the pulse transformer. In this case, the smaller the number of bits in each group, the shorter the period of change between the original data and the bit-reversed auxiliary data, making the pulse transformer less likely to cause magnetic saturation.
Thus, magnetic saturation of the pulse transformer can be prevented at low cost by simple processing.
In addition, on the receiving side of the serial data communication, the original data (part of the transmission target data) and the bit-reversed auxiliary data are compared, and if the corresponding digits are not bit-reversed values, In addition, it is possible to detect that data is not properly transmitted / received and some communication abnormality has occurred, which can contribute to improvement of data communication quality.
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of a serial data communication method according to the present invention will be described with reference to the drawings.
<First embodiment>
In the first embodiment, as shown in FIG. 1, a case where data communication is performed between two control devices A and B provided for managing and controlling various devices (not shown) is illustrated. The invention will be described.
[0012]
[Configuration of
The configurations of the
As the
[0013]
[Data transmission / reception processing]
When performing data communication via the
[0014]
Specifically, when receiving a data transmission request from a device under management, the control devices A and B start the processing shown in FIG. The processing of FIG. 3 is stored in the control devices A and B as a program.
Hereinafter, a case where the signal is transmitted from the control device A to the control device B will be described as an example.
First, the control device A fetches data to be transmitted (hereinafter referred to as “transmission target data”) in byte (8-bit) units from a device under management (step # 1).
When the data has been completely fetched from the device (step # 2), an operation for calculating a negative value is performed for each byte data, so that the value of each bit becomes the negative value of the corresponding digit of the transmission target data. Is obtained (step # 3). That is, when the transmission target data is, for example, “11001101”, the bit-inverted data of the transmission target data is “00110010”.
[0015]
Next, a transmission data sequence is organized so that the transmission target data and the bit-inverted data obtained from the data are alternately arranged for each data (step # 4). The data is sequentially written into the buffer of the UART circuit 11 of the
The UART circuit 11 converts the 1-byte data written in the buffer into an 8-bit bit string, and adds a start bit ("0") for start-stop synchronization and a stop bit ("1") before and after the bit string. ) Is added, and a signal bit ("1") indicating a standby state is added before and after to generate serial transmission data, which is sequentially sent to the
When the control device A writes all data into the buffer of the UART circuit 11, the process ends (step # 6).
[0016]
As a result of this data transmission, a signal as shown in FIG.
FIG. 2A shows a case where 8-bit data “01010101” is sequentially transmitted from the LSB, and FIG. 2B shows a case where the
In the case of FIG. 2A as well as in the case of FIG. 2B, which is the strictest condition, the data “11111111” is followed by the bit-inverted data “00000000” of the data. Can be reliably prevented.
[0017]
The data input to the
Since the
The case where data is transmitted from the control device A to the control device B has been described above. However, when data is transmitted from the control device B to the control device A, exactly the same processing as described above is executed.
[0018]
<Second embodiment>
Next, a second embodiment of the present invention will be described.
In the second embodiment, the configuration of the
Hereinafter, a data transmission / reception process according to the second embodiment will be described.
[0019]
[Data transmission / reception processing]
The data transmission / reception processing of the control devices A and B according to the second embodiment has the same processing purpose as that of the first embodiment, and the control devices A and B transmit data via the
[0020]
Specifically, when receiving a data transmission request from a device under management, the control devices A and B start the processing shown in FIG. 3 as in the first embodiment. The processing in FIG. 3 is the same as that in the first embodiment in that the processing is stored in the control devices A and B as a program. As will be described later, the second embodiment differs from the first embodiment in the processing content in the processing of
Hereinafter, a case where the signal is transmitted from the control device A to the control device B will be described as an example.
[0021]
First, the control device A fetches data to be transmitted (hereinafter referred to as “transmission target data”) in byte (8-bit) units from a device under management (step # 1).
When the data is completely fetched from the device (step # 2), a calculation for obtaining a negative value is performed for each byte data, whereby the value of each bit is constituted by the negative value of the transmission target data. Bit inverted data to be obtained (step # 3). That is, when the transmission target data is, for example, “11001101”, the bit-inverted data of the transmission target data is “00110010”.
[0022]
Next, based on the transmission target data and the bit-reversed data, actual transmission data to be actually transmitted to the control device B is organized (Step # 4).
This actual transmission data divides each bit of the transmission target data into a plurality of groups, and converts the data of each group and the bit-reversal auxiliary data constituted by the negation value of each bit of the group into a digit. They are generated by arranging them alternately in a row.
More specifically, each bit of the transmission target data is divided into a plurality of groups having the same number of bits, and a bit constituted by the data of each group and a negative value of the data of each bit of the group. The actual transmission data is generated by alternately arranging the inverted auxiliary data in the arrangement of the digits.
As a result, it is guaranteed that the signal changes within one data, whereby the pulse transformer is less likely to cause magnetic saturation, and the condition for magnetic saturation of the pulse transformer can be relaxed.
Moreover, the groups that are the units for generating the bit-reversed auxiliary data are equally divided so that the number of bits belonging to each group is the same, so that the processing for generating the actual transmission data is more easily performed by software. Can be done.
[0023]
Since the number of bits belonging to each group is the same, the number of bits in each group is a divisor of the bit length of the transmission target data. If the bit length of the transmission target data is 8 bits as described above, “1 bit” , "2 bits" or "4 bits". In the second embodiment, a case where the number of bits of each group is 1 is exemplified.
[0024]
Therefore, when the transmission target data is “Da 7 Da 6 Da 5 Da 4 Da 3 Da 2 Da 1 Da 0 ” (Da 0 to Da 7 indicate the bit values of each bit), each element is “ Da 7 "," Da 6 "," Da 5 "," Da 4 "," Da 3 "," Da 2 ", divided into eight groups is" Da 1 "and" Da 0 ", corresponding to those The bit inversion auxiliary data “/ Da 7 ”, “/ Da 6 ”, “/ Da 5 ”, “/ Da 4 ”, “/ Da 3 ”, “/ Da 2 ”, “/ Da 1 ” and “/ "Da 0 " (where "/" means a negative value of each bit) and "Da 3 " for the lower 4 bits of the transmission target data by alternately arranging the digits. / Da 3 Da 2 / Da 2 Da 1 /
[0025]
Next, the actual transmission data is sequentially written into the buffer of the UART circuit 11 of the
The UART circuit 11 converts the 1-byte data written in the buffer into an 8-bit bit string, and adds a start bit ("0") for start-stop synchronization and a stop bit ("1") before and after the bit string. ) Is added, and a signal bit ("1") indicating a standby state is added before and after to generate serial transmission data, which is sequentially sent to the
When the control device A writes all data into the buffer of the UART circuit 11, the process ends (step # 6).
[0026]
By this data transmission, a signal as shown in FIG. 4 is applied to the
As described above, even if the "stop bit" and the "standby state" bit are inserted, the same value bit does not continue more than 4 bits, so that the so-called pulse transformer having a small ET product and easily magnetically saturated can be surely used. In addition, magnetic saturation can be prevented.
[0027]
The data input to the
The control device B extracts the bit value of the element of the data to be transmitted from the received data and reconstructs it into one data.
The case where data is transmitted from the control device A to the control device B has been described above. However, when data is transmitted from the control device B to the control device A, exactly the same processing as described above is executed.
[0028]
<Other embodiments>
Hereinafter, other embodiments of the present invention will be listed.
(1) In the second embodiment, when the actual transmission data is obtained, the case where the transmission target data is divided into eight groups in which the number of bits in each group is 1 bit is exemplified. The number of bits may be divided into four groups of two bits, or each group may be divided into two groups of four bits.
(2) In the first embodiment and the second embodiment, the case where the bit length of one data is 8 bits is exemplified. However, data having a bit length longer than 8 bits or data having a shorter bit length is used. The present invention can be applied to serial communication.
[0029]
(3) In the second embodiment, the case where the data to be transmitted has 8 bits is shown. However, even in the case of data having an odd number of bits, dummy bits (fixed to 1 or 0) are set to the MSB of the data to be transmitted, The present invention can be applied to a case where the number of bits is set to an even number by processing such as providing the LSB or a position before or after the center bit. In this case, normally, the 7-bit data becomes 16-bit or 15-bit transmission data. However, when the reception of the data is completed, if the dummy bit and the inverted data of the dummy bit are removed, the original 7-bit data is removed. Can be restored as data.
[0030]
(4) In the second embodiment, the case where the transmission target data is 8 bits and has a divisor other than “1” and the data length value (“8”) is shown. If an agreement is set between the receiving side and the receiving side, the data is an odd number of bits having no divisor other than the value of "1" and the data length, or the transmission target data is divided into a plurality of bits having the same number of bits. The present invention can be applied to the case of dividing into groups.
For example, the transmission target data having a length of 7 bits is transmitted as 7 bits by adding the lower 3 bits and its
[0031]
(5) In the second embodiment, the transmission target data and the bit-reversed data are subjected to a masking process and a bit shift process by a logical product of data in which only bits to be extracted are set to “1”, and the processes thereof. Although the case where the actual transmission data is generated by executing a process of taking a logical sum of the results is illustrated, various methods can be used as a method of generating the actual transmission data. It may be as follows.
That is, when the transmission target data is "Da 7 Da 6 Da 5 Da 4
[0032]
Hereinafter, the processing procedure is listed.
{Circle around (1)} From the transmission target data “Da 7 Da 6 Da 5 Da 4 Da 3 Da 2 Da 1 Da 0 ”, the bit inversion data “/ Da 7 / Da 6 / Da 5 / Da 4 / Da 3 / Da 2 / Da” 1 / Da 0 "to create.
▲ 2 ▼ bit inverted data by one bit shifted to a lower digit side "* / Da 7 / Da 6 / Da 5 /
▲ 3 ▼ by masking the data created by the transmitted data and the ▲ 2 ▼, "Da 7 0 Da 5 0 Da 3 0
▲ 4 ▼ the ▲ 3 ▼ at by combining the two data obtained, one of the two real transmission data "Da 7 / Da 7 Da 5 / Da 5
{Circle around (5)} The data to be transmitted is shifted by one bit to the upper digit side to create “Da 6 Da 5 Da 4 Da 3 Da 2 Da 1 Da 0 *” (“*” is an arbitrary value).
▲ 6 ▼ the ▲ 5 ▼ masked processed data and the bit inverted data created in "Da 6 0 Da 4 0 Da 2 0
{Circle around (7)} The two data obtained in the above [6] are combined, and the remaining one of the two actual transmission data, “Da 6 / Da 6 Da 4 / Da 4 Da 2 / Da 2 Da 0 / Da” 0 ".
[0033]
【The invention's effect】
According to the configuration of the first aspect, by transmitting or receiving the transmission target data and the bit-reversed data alternately, the transmission target data is transmitted after "11111111" or "00000000" in the worst condition. It is ensured that “00000000” or “11111111”, which is the bit inversion value of the target data, continues to prevent magnetic saturation of the pulse transformer.
Since the bit-inverted data of the transmission target data as described above can be easily generated by software processing by an operation for calculating a negative value of the data, magnetic saturation of the pulse transformer can be prevented at low cost by simple processing. Can be.
Moreover, on the receiving side of the serial data communication, the data to be transmitted is compared with the bit-reversed data, and if the corresponding digits are not bit-reversed values, the data is not properly transmitted / received, and It is possible to detect that a communication abnormality has occurred, and to contribute to improving the quality of data communication.
[0034]
According to the configuration of
Therefore, the original data and the bit inversion auxiliary data change in a short period, which makes it difficult for the pulse transformer to cause magnetic saturation, and alleviates the condition for the magnetic saturation of the pulse transformer. In this case, the smaller the number of bits in each group, the shorter the period of change between the original data and the bit-reversed auxiliary data, making the pulse transformer less likely to cause magnetic saturation.
Thus, magnetic saturation of the pulse transformer can be prevented at low cost by simple processing.
In addition, on the receiving side of the serial data communication, the original data (part of the transmission target data) and the bit-reversed auxiliary data are compared, and if the corresponding digits are not bit-reversed values, In addition, it is possible to detect that data is not properly transmitted / received and some communication abnormality has occurred, which can contribute to improvement of data communication quality.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a communication circuit according to a first embodiment and a second embodiment of the present invention. FIG. 2 is a signal explanatory diagram according to the first embodiment of the present invention. FIG. 3 is a first embodiment of the present invention. FIG. 4 is a signal explanatory diagram according to a second embodiment of the present invention.
Claims (2)
前記送信対象データのビット反転データを求め、
前記送信対象データと前記ビット反転データとを1データ毎に交互に送信又は受信するシリアルデータ通信方法。A serial data communication method for transmitting or receiving transmission target data as serial data via a communication line provided with a pulse transformer,
Find bit-inverted data of the transmission target data,
A serial data communication method for alternately transmitting or receiving the transmission target data and the bit-reversed data for each data.
前記送信対象データの各ビットを複数のグループに分けて、前記各グループのデータと、そのグループの各ビットの否定値にて構成されるビット反転補助データとを、桁の並びにおいて交互に配置して実送信データを生成し、
その実送信データを前記通信線に送信するシリアルデータ通信方法。A serial data communication method for transmitting or receiving transmission target data as serial data via a communication line provided with a pulse transformer,
Each bit of the transmission target data is divided into a plurality of groups, and the data of each group and the bit-reversed auxiliary data constituted by the negative value of each bit of the group are alternately arranged in a digit arrangement. To generate actual transmission data,
A serial data communication method for transmitting the actual transmission data to the communication line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002353285A JP2004187117A (en) | 2002-12-05 | 2002-12-05 | Serial data communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002353285A JP2004187117A (en) | 2002-12-05 | 2002-12-05 | Serial data communication method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004187117A true JP2004187117A (en) | 2004-07-02 |
Family
ID=32754605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002353285A Pending JP2004187117A (en) | 2002-12-05 | 2002-12-05 | Serial data communication method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004187117A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011239375A (en) * | 2010-05-10 | 2011-11-24 | Semikron Elektronik Gmbh & Co Kg | Method for sending binary signals via transformer section |
JP2014030244A (en) * | 2005-06-23 | 2014-02-13 | Agere Systems Inc | Single-transformer digital isolation barrier |
JP2016046723A (en) * | 2014-08-25 | 2016-04-04 | ルネサスエレクトロニクス株式会社 | Reception device, communication device, and communication method |
JP2017017381A (en) * | 2015-06-26 | 2017-01-19 | オリンパス株式会社 | Data transmission device, data transmission/reception system, and data transmission method |
-
2002
- 2002-12-05 JP JP2002353285A patent/JP2004187117A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014030244A (en) * | 2005-06-23 | 2014-02-13 | Agere Systems Inc | Single-transformer digital isolation barrier |
US8867182B2 (en) | 2005-06-23 | 2014-10-21 | Agere Systems Inc. | Signal-powered integrated circuit with ESD protection |
JP2011239375A (en) * | 2010-05-10 | 2011-11-24 | Semikron Elektronik Gmbh & Co Kg | Method for sending binary signals via transformer section |
CN102324917A (en) * | 2010-05-10 | 2012-01-18 | 赛米控电子股份有限公司 | Be used for transmitting the method for binary signal through transformer section |
JP2016046723A (en) * | 2014-08-25 | 2016-04-04 | ルネサスエレクトロニクス株式会社 | Reception device, communication device, and communication method |
US10027313B2 (en) | 2014-08-25 | 2018-07-17 | Renesas Electronics Corporation | Receiver, communication device, and communication method |
US10367485B2 (en) | 2014-08-25 | 2019-07-30 | Renesas Electronics Corporation | Receiver, communication device, and communication method |
JP2017017381A (en) * | 2015-06-26 | 2017-01-19 | オリンパス株式会社 | Data transmission device, data transmission/reception system, and data transmission method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4054190B2 (en) | Data transfer system | |
US20160277149A1 (en) | Spc sensor interface with partial parity protection | |
US8015478B2 (en) | Data processing | |
JP2001243049A (en) | Device and method for bus encoding/decoding | |
JPH0697932A (en) | Method and apparatus for encoding of communication signal | |
JP2004187117A (en) | Serial data communication method | |
EP1501014A1 (en) | Data processing method and data checking method | |
US6691275B1 (en) | Encoder with vector-calculated disparity logic | |
CN101361278B (en) | Parity check bit generating circuit, counting circuit and counting method | |
CN106933767B (en) | Comma detection and word alignment method and system suitable for JESD204B protocol | |
US20030002669A1 (en) | Encoder and method for encoding data | |
CN109993005A (en) | To the method and device of the data-signal Reinforced turf of cpu bus | |
JPH1098392A (en) | Crc code generating circuit, code error detecting circuit and crc circuit | |
US6327654B1 (en) | Semiconductor integrated circuit for cryptographic process and encryption algorithm alternating method | |
US5003540A (en) | Error correction coding and decoding circuit for digitally coded information | |
JPH0738626B2 (en) | Word sync detection circuit | |
CN111901070B (en) | Data transmission method | |
CN111308919A (en) | Wheel speed signal transmission method, device, terminal and computer readable storage medium | |
JP2004173199A (en) | Error correction circuit using cyclic code | |
JP6260965B2 (en) | Master circuit and slave circuit using SPI communication | |
CN113625965B (en) | Data storage method, system and device of distributed storage system and storage medium | |
JPS5977745A (en) | Transmission control system | |
JP2006293429A (en) | Device and method for random number generation | |
CN113986625A (en) | Detection method and device for PCS sublayer logic function, electronic equipment and storage medium | |
CN114968689A (en) | FPGA device, MIPI protocol layer testing device and method based on FPGA device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051110 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20051213 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070907 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071011 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080226 |