JP6875823B2 - Data transmitter / receiver - Google Patents
Data transmitter / receiver Download PDFInfo
- Publication number
- JP6875823B2 JP6875823B2 JP2016206916A JP2016206916A JP6875823B2 JP 6875823 B2 JP6875823 B2 JP 6875823B2 JP 2016206916 A JP2016206916 A JP 2016206916A JP 2016206916 A JP2016206916 A JP 2016206916A JP 6875823 B2 JP6875823 B2 JP 6875823B2
- Authority
- JP
- Japan
- Prior art keywords
- clock
- unit
- data
- transmission
- reception
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は調歩同期方式によりシリアル通信を行うデータ送受信装置に関する。 The present invention relates to a data transmission / reception device that performs serial communication by a pace synchronization method.
従来のデータ送受信装置は特許文献1に開示される。このデータ送受信装置は送信部と受信部とを有し、送信部と受信部との間で調歩同期方式によりシリアル通信を行う。送信部は所定周期で発振してクロックを発生するクロック発生部を有する。送信部は所定ビット数のデータを有するデータ列を受信部に送信する。
A conventional data transmission / reception device is disclosed in
送信部から送信されるデータ列の先頭にはスタートビットが付加されており、受信部は受信したスタートビットのビット幅に相当するパルスを検出し、このビット幅の周期を有するクロックを生成する。これにより、送信部と受信部とのクロックを確実に同期させ、送信部から受信部へデータ列を正常に送信することができる。 A start bit is added to the beginning of the data string transmitted from the transmitting unit, and the receiving unit detects a pulse corresponding to the bit width of the received start bit and generates a clock having a period of this bit width. As a result, the clocks of the transmitting unit and the receiving unit can be reliably synchronized, and the data string can be normally transmitted from the transmitting unit to the receiving unit.
しかしながら、上記特許文献1に開示されたデータ送受信装置によると、スタートビットのパルス幅を検出して、そのパルス幅からクロックを生成するクロック生成手段を必要とするため、データ送受信装置が複雑な構成になる問題があった。
However, according to the data transmission / reception device disclosed in
本発明は、上記問題点に鑑み、簡易な構成で送信部と受信部とのクロックを同期させてデータ列を確実に送信できるデータ送受信装置を提供することを目的とする。 In view of the above problems, it is an object of the present invention to provide a data transmission / reception device capable of reliably transmitting a data string by synchronizing the clocks of a transmission unit and a reception unit with a simple configuration.
上記目的を達成するために本発明のデータ送受信装置は、送信部と受信部との間で調歩同期方式によるシリアル通信を行ない、スタートビットとストップビットとの間に所定ビット数のデータを配したデータ列を送受信するデータ送受信装置において、前記送信部は所定周期で発振する第1クロックを出力する第1クロック出力部を有し、前記受信部は所定周期で発振する第2クロックを出力する第2クロック出力部を有し、前記受信部が受信エラーを検知した場合に、前記送信部又は前記受信部が前記第1クロックと前記第2クロックとの周期のズレ量を補正し、前記第1クロックと前記第2クロックとを同期させて前記送信部から前記受信部へ前記データ列の再送信を行うことを特徴している。 In order to achieve the above object, the data transmission / reception device of the present invention performs serial communication between the transmission unit and the reception unit by a pace synchronization method, and arranges a predetermined number of data between the start bit and the stop bit. In a data transmission / reception device for transmitting / receiving a data string, the transmission unit has a first clock output unit that outputs a first clock that oscillates in a predetermined cycle, and the reception unit outputs a second clock that oscillates in a predetermined cycle. It has two clock output units, and when the receiving unit detects a reception error, the transmitting unit or the receiving unit corrects the amount of difference in the period between the first clock and the second clock, and the first It is characterized in that the clock and the second clock are synchronized to retransmit the data string from the transmitting unit to the receiving unit.
また、本発明は上記構成のデータ送受信装置において、前記受信部が前記ズレ量を検出し、前記送信部が前記ズレ量を補正することを特徴としている。 Further, the present invention is characterized in that, in the data transmission / reception device having the above configuration, the receiving unit detects the deviation amount, and the transmitting unit corrects the deviation amount.
また、本発明は上記構成のデータ送受信装置において、前記受信部が前記ズレ量を検出するとともに前記ズレ量を補正することを特徴としている。 Further, the present invention is characterized in that, in the data transmission / reception device having the above configuration, the receiving unit detects the deviation amount and corrects the deviation amount.
また、本発明は上記構成のデータ送受信装置において、前記送信部が前記ズレ量を検出するとともに前記ズレ量を補正することを特徴としている。 Further, the present invention is characterized in that, in the data transmission / reception device having the above configuration, the transmission unit detects the deviation amount and corrects the deviation amount.
また、本発明は上記構成のデータ送受信装置において、前記スタートビットの周期に基づいて前記ズレ量を検出することを特徴としている。 Further, the present invention is characterized in that, in the data transmission / reception device having the above configuration, the deviation amount is detected based on the cycle of the start bit.
また、本発明は上記構成のデータ送受信装置において、前記データ列が前記ストップビットに連続するとともに前記ストップビットと同レベルの複数ビットから成る空白期間を有することを特徴としている。 Further, the present invention is characterized in that, in the data transmission / reception device having the above configuration, the data string is continuous with the stop bits and has a blank period composed of a plurality of bits having the same level as the stop bits.
また、本発明は上記構成のデータ送受信装置において、前記空白期間が前記データ列のビット数の1/2以上のビット数から成ることを特徴としている。 Further, the present invention is characterized in that, in the data transmission / reception device having the above configuration, the blank period is composed of a bit number of 1/2 or more of the bit number of the data string.
また、本発明は上記構成のデータ送受信装置において、前記受信部から前記送信部に送信された所定のパルス幅のパルス信号から成る補正量測定用信号に基づいて前記ズレ量を検出することを特徴としている。 Further, the present invention is characterized in that, in the data transmission / reception device having the above configuration, the deviation amount is detected based on a correction amount measurement signal composed of a pulse signal having a predetermined pulse width transmitted from the reception unit to the transmission unit. It is supposed to be.
本発明のデータ送受信装置によると、受信部が受信エラーを検知した場合に、送信部又は受信部が第1クロックと第2クロックとの周期のズレ量を補正し、第1クロックと第2クロックとを同期させて送信部から受信部へデータ列の再送信を行う。これにより、簡易な構成で送信部の第1クロックと受信部の第2クロックとを同期させて受信部によりデータ列を確実に受信することができる。 According to the data transmission / reception device of the present invention, when the receiving unit detects a reception error, the transmitting unit or the receiving unit corrects the amount of deviation between the cycles of the first clock and the second clock, and the first clock and the second clock. The data string is retransmitted from the transmitting unit to the receiving unit in synchronization with. As a result, the data string can be reliably received by the receiving unit by synchronizing the first clock of the transmitting unit and the second clock of the receiving unit with a simple configuration.
<第1実施形態>
以下に図面を参照して本発明の実施形態を説明する。図1は第1実施形態のデータ送受信装置を備えた冷蔵庫1を示す側面断面図である。冷蔵庫1は断熱箱体2の上方から順に冷蔵室3、冷凍室4、野菜室5が設けられる。
<First Embodiment>
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a side sectional view showing a
冷蔵室3は貯蔵物を冷蔵保存し、冷凍室4は貯蔵物を冷凍保存する。野菜室5は冷蔵室3よりも高温に維持され、野菜等の貯蔵物を冷蔵保存する。断熱箱体2の背面下部には電装ボックス37が配される。
The refrigerating
冷蔵室3は一端を枢支される回動式の扉3aによって開閉される。扉3aの前面には操作パネル40(図2参照)が配される。冷凍室4及び野菜室5はそれぞれ収納ケース(不図示)と一体に形成される引出式の扉4a、5aによって開閉される。
The refrigerating
冷凍室4及び冷蔵室3の背面にはダンパ35を介して連通する冷気通路7、8が設けられる。冷気通路7には冷却器31及び送風機32が配され、冷凍室4に臨む吐出口7aが開口する。冷気通路8には冷蔵室3に臨む吐出口8aが開口する。
野菜室5の後方には機械室6が設けられ、機械室6内には冷凍サイクルを運転する圧縮機30が設置される。圧縮機30には冷媒が流通する冷媒管(不図示)を介して凝縮器(不図示)、キャピラリチューブ(不図示)、冷却器31が順に接続され、圧縮機30に戻る。これにより、冷凍サイクルが運転され、冷却器31が冷気通路7を流通する空気と熱交換して冷気が生成される。
A machine room 6 is provided behind the
送風機32を駆動すると冷気通路7に空気が流通する。この時、ダンパ35を開くと冷気通路8に冷気が流通する。冷気通路7、8を流通する冷気はそれぞれ吐出口7a、8aを介して冷凍室4及び冷蔵室3に吐出される。
When the
冷凍室4には冷気を冷気通路7に戻す戻り口(不図示)が設けられる。冷蔵室3には野菜室5に連通する連通路(不図示)が導出され、野菜室5には冷気を冷気通路7に戻す戻り口(不図示)が設けられる。
The
図2は扉3aの前面に設けた操作パネル40の正面図を示している。操作パネル40は複数の操作キーを有する操作部41と、表示パネル43及び複数のインジケータ44を有した表示部42とを備えている。
FIG. 2 shows a front view of the
操作部41は冷蔵庫1の冷蔵室3や冷凍室4の温度設定等のユーザ設定条件を入力する。表示パネル43は液晶パネル等により形成され、設定温度等を表示する。インジケータ44は操作パネル40の背面に配したLEDの発光によって動作中の運転モード等を表示する。これにより、表示部42は冷蔵庫1の動作状態を表示により報知する。また、表示部42は操作部41による設定時に入力状態の表示を行う。
The
図3は冷蔵庫1のデータ送受信装置60を示すブロック図である。データ送受信装置60は操作部41で入力された操作コマンド信号を電装ボックス37内に収納された制御基板20に送信する。データ送受信装置60は送信部61と受信部62とを有し、UART(Universal Asynchronous Receiver Transmitter )によって調歩同期方式によるシリアル通信を行う。なお、送信部61と受信部62は共に送受信可能であり、半二重通信による双方向通信が可能である。送信部61が受信状態となるときは、受信部62が送信状態となる。
FIG. 3 is a block diagram showing a data transmission /
送信部61は操作パネル40の背後に配される制御基板10を備えている。受信部62は電装ボックス37(図1参照)内に配される制御基板20を備えている。制御基板10にはマイクロコンピュータ11が設けられ、制御基板20にはマイクロコンピュータ21が設けられる。
The
マイクロコンピュータ11は各部を制御するCPU12を有し、CPU12には記憶部13、クロック出力部(第1クロック出力部)15、I/F14が接続される。マイクロコンピュータ11は操作部41の駆動を制御する。
The
マイクロコンピュータ21は各部を制御するCPU22を有し、CPU22には記憶部23、クロック出力部(第2クロック出力部)25、I/F24が接続される。マイクロコンピュータ21は記憶部23に記憶された設定状態に基づいて圧縮機30、送風機32及びダンパ35の駆動を制御する。
The
クロック出力部15、25はマイクロコンピュータ11、21の内部クロックであり、例えば、抵抗とコンデンサによる発振回路から成る。クロック出力部25は所定の周期T1で発振する第1クロックを出力し、クロック出力部25は所定の周期T2で発振する第2クロックを出力する。
The
また、クロック出力部15、25はマイクロコンピュータ11、21からの制御によって第1クロック、第2クロックの周期T1、T2を変更可能である。例えば、クロック出力部15、25が発振回路の出力クロックを分周する分周回路を備えている場合に、分周比をマイクロコンピュータ11、21からの信号によって任意に設定することで第1クロック、第2クロックの周期T1、T2を変更することができる。
Further, the
記憶部13、23はROM及びRAMから成り、それぞれCPU12、22によって実行される制御プログラムや各種データを格納する。また、記憶部13、23はCPU12、22による演算の一時記憶を行う。I/F14、24は通信線18を介して互いにシリアル通信を行う。
The
図4は送信部61と受信部62間で送受信されるデータ列を説明する図である。図4(a)はデータ列のビット構造を示している。図4(b)及び図4(c)はそれぞれ第1クロック及び第2クロックを示している。
FIG. 4 is a diagram illustrating a data string transmitted / received between the transmitting
データ列は送信部61と受信部62間で送受信される通信データに複数含まれており、データ列毎に順次送信される。データ列は複数ビットから成るデータD0〜D7を有する。また、データD0〜D7の前にスタートビットS1が付加され、データD0〜D7の後にパリティビットP及びストップビットS2が順に付加されている。また、データ列の最後尾にはストップビットS2に連続した複数ビットから成る空白期間Bが付加されている。
A plurality of data strings are included in the communication data transmitted / received between the
スタートビットS1はローレベル「0」の信号であり1ビットから成る。受信部62はスタートビットS1を検知してデータD0〜D7の始まりを認識する。
The start bit S1 is a low level "0" signal and consists of 1 bit. The receiving
ストップビットS2はハイレベル「1」の信号であり1ビットから成る。受信部62はストップビットS2を検知してデータD0〜D7の終わりを認識する。なお、ストップビットS2を1.5ビットあるいは2ビットとしてもよい。
The stop bit S2 is a high level "1" signal and consists of 1 bit. The receiving
データD0〜D7は夫々ローレベル「0」又はハイレベル「1」の信号を組み合わせて構成され、全部で8ビット(1バイト)から成る。 The data D0 to D7 are each composed of a combination of low level "0" or high level "1" signals, and consist of 8 bits (1 byte) in total.
パリティビットPはデータD0〜D7が正常に送られたか否かを検査するために付加されており、1ビットから成る。パリティビットPは偶数パリティ又は奇数パリティを選択することができる。 The parity bit P is added to check whether or not the data D0 to D7 have been sent normally, and is composed of one bit. The parity bit P can be selected from even parity or odd parity.
空白期間Bは後述するクロックのズレ量検出の精度向上を目的としており、例えば、11ビットから成る。また、空白期間Bにおいて全てストップビットS2と同レベル、すなわちハイレベル「1」の信号が選択されている。これにより、受信部62はハイレベル「1」の信号を所定数連続して受信した際に空白期間Bであることを検知することができる。そして、空白期間Bの後にローレベル「0」の信号を検知したときに次のデータ列のスタートビットS1を受信したことを認識することができる。
The blank period B is intended to improve the accuracy of detecting the amount of clock deviation, which will be described later, and is composed of, for example, 11 bits. Further, in the blank period B, all signals having the same level as the stop bit S2, that is, a high level "1" signal are selected. As a result, the receiving
送信部61はクロック出力部15で出力される第1クロックの周期T1に基づいてデータ列を1ビットずつ送信する。
The
一方、受信部62はクロック出力部25で出力される第2クロックの周期T2に基づいて送信部61から送信されたデータ列を1ビットずつ受信する。周期T1と周期T2とは一致する必要があり、両者のズレ量が所定量以上発生すると送信部61と受信部62との同期が外れてデータ列を正常に送信することができない。
On the other hand, the receiving
図5は第1、第2クロックの周期を説明する図である。クロック出力部15、25で出力される第1、第2クロックは同一の周期T’の基準クロックを出力するように設定されている。
FIG. 5 is a diagram for explaining the cycles of the first and second clocks. The first and second clocks output by the
しかし、クロック出力部15、25はマイクロコンピュータ11、21の内部クロックであるため、個々の発振回路の素子ばらつきや冷蔵庫1の使用環境や使用年数により、第1、第2クロックの周期T1、T2が基準クロックの周期T’から夫々ずれる場合がある。周期T1と周期T2との間にズレ量が発生した場合に、以下の方法によりズレ量を補正する。
However, since the
図6はデータ列の送受信状態を説明する図である。送信部61は複数のデータ列を順次送信する。受信部62のCPU22は複数のデータ列のスタートビットS1の周期Tsを第2クロックのカウント数N2により測定する。データ列は送信部61から第1クロックに基づいて送信され、スタートビットS1の周期Ts間は第1クロックの所定のカウント数N1になっている。これにより、第1クロックに対する第2クロックのズレ量δはT2/T1=N1/N2で表わされる。
FIG. 6 is a diagram illustrating a transmission / reception state of the data string. The
CPU22はクロック出力部25が出力する第2クロックの周期T2に対してズレ量δを補正する。即ち、第2クロックのズレ量δを補正して周期をT2/δにする。これにより、第1クロックと第2クロックとを同期させることができる。
The
なお、空白期間Bが長ければ送信部61から受信部62へのデータD0〜D7の送信速度は低下する。しかし、スタートビットS1の周期Tsが長くなるため、周期Tsの測定誤差を低減してズレ量δの検出精度を向上することができる。
If the blank period B is long, the transmission speed of the data D0 to D7 from the
また、スタートビットS1、データD0〜D7、パリティビットP及びストップビットS2の合計のビット数よりも長いビット数により空白期間Bを形成すると、スタートビットS1を確実に検出できるためより望ましい。即ち、空白期間Bをデータ列のビット数の1/2以上のビット数に形成するとよい。 Further, it is more desirable to form the blank period B with a number of bits longer than the total number of bits of the start bit S1, the data D0 to D7, the parity bit P, and the stop bit S2, because the start bit S1 can be reliably detected. That is, the blank period B may be formed to have a number of bits that is ½ or more of the number of bits in the data string.
なお、データが符号化によりハイレベル「1」の連続するビット数を所定数以下にできる場合は、空白期間Bを該所定数よりも長いビット数に形成してもよい。また、スタートビットS1の検出精度は低下するが、データ列から空白期間Bを省いてもよい。 If the number of consecutive bits of the high level "1" can be reduced to a predetermined number or less by encoding the data, the blank period B may be formed to have a number of bits longer than the predetermined number. Further, although the detection accuracy of the start bit S1 is lowered, the blank period B may be omitted from the data string.
また、スタートビットの周期Tsからズレ量δを検出したが、空白期間Bの時間からズレ量δを導出してもよい。また、第1クロックの周期T1と第2クロックの周期T2との比をズレ量δとしているが、周期T1と周期T2との差Tx(図5参照)をズレ量としてもよい。 Further, although the deviation amount δ is detected from the period Ts of the start bit, the deviation amount δ may be derived from the time of the blank period B. Further, although the ratio of the period T1 of the first clock to the period T2 of the second clock is defined as the deviation amount δ, the difference Tx between the period T1 and the period T2 (see FIG. 5) may be used as the deviation amount.
図7はデータ送受信装置60の動作を示す図である。例えば、操作部41から温度を下げる操作が入力されると、制御基板10から制御基板に20に操作コマンド信号を送信して圧縮機30等が制御される。
FIG. 7 is a diagram showing the operation of the data transmission /
ステップ#11で送信部61のCPU12はI/F14から通信線18を介して受信部62に対して複数のデータ列を含む操作コマンド信号(通信データ)を送信する。I/F14から送信された操作コマンド信号はI/F24で受信されてCPU22に転送される。
In
ステップ#12でCPU22は操作コマンド信号を正常に受信できたか否かを判断する。正常に操作コマンド信号を受信できた場合、ステップ#14で送信部61に正常に操作コマンド信号が正常に受信できたことを知らせる正常受信信号を送信する。
In
一方、第1クロックの周期T1と受信部62の第2クロックの周期T2とが同期しない場合、受信部62は操作コマンド信号を正常に受信できない。このため、ステップ#12でCPU22はパリティチェック等によって受信エラーと判定する。
On the other hand, when the cycle T1 of the first clock and the cycle T2 of the second clock of the receiving
CPU22は受信エラーと判定すると、ステップ#21で続いて次に受信するデータ列のスタートビットS1の周期Tsを測定して周期T1と周期T2のズレ量δを検出する。ズレ量δは記憶部23に記憶される。
When the
次に、ステップ#23で受信部62はクロック出力部25が出力する第2クロックの周期T2に対してズレ量δを補正して周期をT2/δにする。そして、ステップ#25で受信部62はズレ量δを補正した第2クロックに基づいて送信部61に操作コマンド信号の再送信を要求する再送信要求信号を送信する。
Next, in
送信部61は第2クロックが第1クロックに一致するように補正されているため再送信要求信号を正常に受信することができる。これにより、ステップ#26で送信部61はI/F14から通信線18を介して受信部62に対して操作コマンド信号を再送信する。
Since the
I/F14から送信された操作コマンド信号はI/F24で受信されてCPU22に転送される。CPU22はズレ量δを補正した第2クロックが第1クロックに一致するため正常に操作コマンド信号を受信することができる。そして、CPU22は受信した操作コマンド信号に従って、圧縮機30を制御運転する。
The operation command signal transmitted from the I /
本実施形態によると、受信部62が受信エラーを検知した場合に、受信部62により第1クロックと第2クロックとの周期のズレ量δを検出する。そして、受信部62によりズレ量δを補正し、第1クロックと第2クロックとを同期させて送信部61から受信部62へデータ列の再送信を行う。
According to the present embodiment, when the receiving
これにより、第1クロックと第2クロックとの周期のズレ量δを補正してデータ列を再送信するため、簡易な構成で第1クロックと第2クロックとを同期させて受信部62によりデータ列を確実に受信することができる。従って、受信エラーが発生してもデータ列の送受信を継続して行うことができる。
As a result, in order to correct the deviation amount δ of the period between the first clock and the second clock and retransmit the data string, the data is synchronized by the first clock and the second clock by the receiving
また、スタートビットS1の周期Tsに基づいてズレ量δを検出する。これにより、周期Tsのビット数が大きいため周期Tsを精度よく検出でき、ズレ量δを正確に検出できる。従って、第1クロックと第2クロックとを確実に同期させることができる。 Further, the deviation amount δ is detected based on the period Ts of the start bit S1. As a result, since the number of bits of the period Ts is large, the period Ts can be detected accurately, and the deviation amount δ can be accurately detected. Therefore, the first clock and the second clock can be reliably synchronized.
また、データ列がストップビットS2に連続したハイレベルの複数ビットから成る空白期間Bを有する。これにより、スタートビットS1を正確に検知することができ、周期Ts及びズレ量δをより正確に検出できる。 Further, the data string has a blank period B composed of a plurality of high-level bits continuous with the stop bit S2. As a result, the start bit S1 can be detected accurately, and the period Ts and the deviation amount δ can be detected more accurately.
また、空白期間Bがデータ列のビット数の1/2以上のビット数から成るので、スタートビットS1をより正確に検知することができる。 Further, since the blank period B is composed of a number of bits that is ½ or more of the number of bits of the data string, the start bit S1 can be detected more accurately.
<第2実施形態>
図8は第2実施形態に係るデータ送受信装置60の動作を示す図である。なお、第1実施形態と同一部分は同一符号を付して説明を省略する。本実施形態は送信部61側でズレ量δを補正する点が第1実施形態と異なる。
<Second Embodiment>
FIG. 8 is a diagram showing the operation of the data transmission /
ステップ#12で受信部62のCPU22が受信エラーと判定すると、ステップ#21で受信部62は第1実施形態と同様に周期T1と周期T2のズレ量δを検出する。
When the
次に、ステップ#22で受信部62はズレ量δのデータを送信部61に送信する。この時、受信部62はボーレートを所定値に下げて送信する。また、送信部61は受信部62から正常受信を知らせる信号を所定期間受信しないタイムアウト発生時に、ボーレートを所定値に下げて待機する。これにより、送信部61がズレ量δのデータを受信することができる。
Next, in
ステップ#23では送信部61のCPU12は受信したズレ量δに基づいてクロック出力部15が出力する第1クロックのズレ量δを補正して周期をT1・δにする。そして、ステップ#26で送信部61はズレ量δを補正した第1クロックに基づいて操作コマンド信号を再送信する。
In
I/F14から送信された操作コマンド信号はI/F24で受信されてCPU22に転送される。CPU22はズレ量δを補正した第1クロックが第2クロックに一致するため正常に操作コマンド信号を受信することができる。
The operation command signal transmitted from the I /
本実施形態によると、第1実施形態と同様の効果を得ることができる。また、ズレ量δの検出を受信部62で行い、ズレ量δの補正を送信部61で行う。このため、各マイクロコンピュータ11、21の処理を分散して負担を軽減することができる。また、受信部62のマイクロコンピュータ21の性能が低い場合でも送信部61のマイクロコンピュータ11によりズレ量δを補正してデータ列の送受信を行うことができる。
According to this embodiment, the same effect as that of the first embodiment can be obtained. Further, the receiving
本実施形態において、ステップ#22でボーレートを下げずに第1実施形態と同様に受信部62により第2クロックに対してズレ量δを補正して送信してもよい(T2/δ)。この時、ステップ#26以降では送信部61により第1クロックに対してズレ量δを補正して送信を行う。これにより、マイクロコンピュータ11、21の処理を分散できる。
In the present embodiment, the receiving
また、ステップ#22でデータ列のデータのビット数を下げて(例えば、4ビット)ズレ量δのデータを送信してもよい。これにより、データ長が短くなるため受信エラーの発生を回避し、送信部61がズレ量δのデータを受信することができる。
Further, in
<第3実施形態>
図9は第3実施形態に係るデータ送受信装置60の動作を示す図である。なお、第1実施形態と同一部分は同一符号を付して説明を省略する。本実施形態は送信部61側でズレ量δを検出して補正する点が第1実施形態と異なる。
<Third Embodiment>
FIG. 9 is a diagram showing the operation of the data transmission /
ステップ#12で受信部62のCPU22が受信エラーと判定すると、ステップ#13で受信部62は送信部61に補正量測定用信号を送信する。補正量測定用信号は第1実施形態で上述したような第1クロックと第2クロックとの周期のズレ量δを検出することができるデータ列を用いる。
If the
送信部61は第1クロックと第2クロックが同期していないため受信部62から送信された補正量測定用信号の受信エラーとなる。このため、ステップ#21で送信部61のCPU12は順次受信するデータ列のスタートビットS1の周期Tsを測定し、ズレ量δを検出して記憶部13に記憶する。
Since the first clock and the second clock are not synchronized in the
ステップ#23では送信部61のCPU12は受信したズレ量δに基づいてクロック出力部15が出力する第1クロックのズレ量δを補正して周期をT1・δにする。そして、ステップ#26で送信部61はズレ量δを補正した第1クロックに基づいて操作コマンド信号を再送信する。
In
本実施形態によると、第1実施形態と同様の効果を得ることができる。また、受信部62のマイクロコンピュータ21の性能が低い場合でも送信部61のマイクロコンピュータ11によりズレ量δを補正してデータ列の送受信を行うことができる。
According to this embodiment, the same effect as that of the first embodiment can be obtained. Further, even when the performance of the
<第4実施形態>
次に第4実施形態を説明する。本実施形態は第3実施形態に対してズレ量測定信号の構成が異なっている。その他の部分は第3実施形態と同様である。
<Fourth Embodiment>
Next, a fourth embodiment will be described. In this embodiment, the configuration of the deviation amount measurement signal is different from that in the third embodiment. Other parts are the same as those in the third embodiment.
図9のステップ#12で受信部62のCPU22が受信エラーと判定すると、ステップ#13で受信部62は送信部61に所定のパルス幅のパルス信号から成る補正量測定用信号を送信する。補正量測定用信号のパルス幅は予め決められたカウント数N20の第2クロックにより生成される。
When the
ステップ#21で送信部61のCPU12は受信した補正量測定用信号のパルス幅からズレ量δを検出する。即ち、補正量測定用信号のパルス幅は第1クロックのカウント数N10により検出される。第1クロックの周期T1及び第2クロックの周期T2からT1・N10=T2・N20が成立する。これにより、ズレ量δはT2/T1=N10/N20で表わされる。
In
ステップ#23では送信部61のCPU12は受信したズレ量δに基づいてクロック出力部15が出力する第1クロックのズレ量δを補正して周期をT1・δする。そして、ステップ#26で送信部61はズレ量δを補正した第1クロックに基づいて操作コマンド信号を再送信する。
In
本実施形態によると、第3実施形態と同様の効果を得ることができる。なお、本実施形態において、補正量測定用信号を13ビット以上のビット数にしてUART以外の通信によって送信すると望ましく、16ビットにするとより望ましい。これにより、補正量測定用信号のパルス幅の検出精度を向上することができる。 According to this embodiment, the same effect as that of the third embodiment can be obtained. In the present embodiment, it is desirable to set the correction amount measurement signal to 13 bits or more and transmit it by communication other than UART, and it is more preferable to set the correction amount measurement signal to 16 bits. Thereby, the detection accuracy of the pulse width of the correction amount measurement signal can be improved.
<第5実施形態>
図10は第5実施形態に係るデータ送受信装置60の動作を示す図である。なお、第1実施形態と同一部分は同一符号を付して説明を省略する。本実施形態は受信部62が正常に操作コマンド信号を受信するまで送信部62の記憶部13に予め記憶された複数のズレ予想量δhに基づいて第1クロックを補正する点が第1実施形態と異なる。
<Fifth Embodiment>
FIG. 10 is a diagram showing the operation of the data transmission /
図10のステップ#12で受信部62のCPU22が受信エラーと判定すると、ステップ#21で受信部62は送信部61に操作コマンド信号の再送信を要求する再送信要求信号を送信する。この時、受信部62はボーレートを所定値に下げて送信する。また、送信部61は受信部62から正常受信を知らせる信号を所定期間受信しないタイムアウト発生時に、ボーレートを所定値に下げて待機する。これにより、送信部61が受信部62からの再送信要求信号を受信することができる。
If the
また、タイムアウト発生時に、送信部61は受信部62からの再送信要求信号の受信を待たずに、ステップ#22に移行してもよい。
Further, when a timeout occurs, the transmitting
ステップ#22では再送信が必要と判断した送信部61のCPU12が予め記憶されたズレ予想量δhに基づいてクロック出力部15が出力する第1クロックを補正して周期をT1・δhにする。そして、ステップ#11に戻り、送信部61は補正した第1クロックに基づいて操作コマンド信号を再送信する。
In
ステップ#12でCPU22が操作コマンド信号を正常に受信できたと判断するまで、受信部62及び送信部61はステップ♯11〜ステップ♯22を繰り返して第1クロックを補正する。
The receiving
ステップ#12で受信部62のCPU22が正常に受信したと判定すると、ステップ#14で受信部62は送信部61に操作コマンド信号を正常に受信したことを知らせる信号を送信する。受信部62からの正常受信信号を受信した送信部61は、設定されているズレ予想量δhを記憶し、以後はこのズレ予想量δhによって第1クロックを補正する。
If it is determined in
ここで、ズレ予想量δhは第1クロックと第2クロックの最大ズレ量に基づいて決定され、最大ズレ量は第1クロック、第2クロックの仕様により予め定められた周波数の範囲から導出される。例えば、第1クロックの周波数の範囲が1.2kHzの周波数に対して−4%より大きく+4%より小さい範囲にあり、第2クロックの周波数の範囲が1.2kHzの周波数に対して−6%より大きく+6%より小さい範囲にある場合に、最大ズレ量は10.6%=(1.2×1.04)/(1.2×0.94)と導出される。 Here, the expected deviation amount δh is determined based on the maximum deviation amount of the first clock and the second clock, and the maximum deviation amount is derived from the frequency range predetermined by the specifications of the first clock and the second clock. .. For example, the frequency range of the first clock is greater than -4% and less than + 4% with respect to the frequency of 1.2 kHz, and the frequency range of the second clock is -6% with respect to the frequency of 1.2 kHz. When it is larger and less than + 6%, the maximum deviation amount is derived as 10.6% = (1.2 × 1.04) / (1.2 × 0.94).
また、補正後の第1クロックは第2クロックに一致させなくてもズレ量δが誤差の範囲内(許容ズレ量の範囲内)に有れば受信部62は正常に操作コマンドを受信することができる。
Further, even if the corrected first clock does not match the second clock, if the deviation amount δ is within the error range (within the allowable deviation amount range), the receiving
例えば、図4(a)のデータ列では、スタートビットS1からストップビットS2まで図4(b)の第1クロックで11クロック分の長さがある。このとき、図4(a)のデータ列のスタートビットS1の始まり(立ち下がり)に図4(c)の第2クロックの立ち上がりを同期させ、図4(c)の第2クロックの1クロック目の立ち下がりによりスタートビットS1の中央(50%)でビット認識を開始する。また、第2クロックの11クロック目の立ち下がりによりストップビットS2の中央(50%)でビット認識を行っている。 For example, in the data string of FIG. 4A, there is a length of 11 clocks from the start bit S1 to the stop bit S2 in the first clock of FIG. 4B. At this time, the rise of the second clock of FIG. 4 (c) is synchronized with the start (fall) of the start bit S1 of the data string of FIG. 4 (a), and the first clock of the second clock of FIG. 4 (c) is synchronized. Bit recognition is started at the center (50%) of the start bit S1 due to the falling edge of. Further, bit recognition is performed at the center (50%) of the stop bit S2 due to the falling edge of the 11th clock of the second clock.
すなわち、図4(c)の第2クロックの同期開始から、ストップビットS2のビット認識までは、10.5クロックの長さとなる。そして、ストップビットS2を正常にビット認識するためには、ストップビットS2の中央に対して、クロック周期の±50%未満である必要がある。 That is, the length from the start of synchronization of the second clock in FIG. 4C to the bit recognition of the stop bit S2 is 10.5 clocks. Then, in order to recognize the stop bit S2 normally, it is necessary to be less than ± 50% of the clock period with respect to the center of the stop bit S2.
従って、クロック1周期当たりの許容ズレ量は、±50%÷10.5=±4.7%となる。換言すれば、ズレ量δが−4.7%より大きく+4.7%より小さい範囲内であればズレ量δは誤差の範囲内にある。 Therefore, the permissible amount of deviation per clock cycle is ± 50% ÷ 10.5 = ± 4.7%. In other words, if the amount of deviation δ is greater than -4.7% and less than + 4.7%, the amount of deviation δ is within the margin of error.
つまり、ステップ#22において送信部61が補正するズレ予想量δhは最大ズレ量の範囲内であるとともに、補正後の第1クロックと第2クロックのズレ量δが誤差の範囲内にあれば受信部62は正常に操作コマンド信号を受信することができる。
That is, if the expected deviation amount δh corrected by the
従って、ズレ予想量δhを上記許容ズレ量以下(例えば、4%)毎に刻みながら最大ズレ量の範囲内で第1クロックを補正することにより、補正後の第1クロックと第2クロックとのズレ量δを確実に誤差の範囲に補正することができる。 Therefore, by correcting the first clock within the range of the maximum deviation amount while stepping the expected deviation amount δh every time below the allowable deviation amount (for example, 4%), the corrected first clock and the second clock can be adjusted. The amount of deviation δ can be reliably corrected within the error range.
具体的には、ステップ#22で送信部61が補正するズレ予想量δhを0%、+4%、−4%、+8%、−8%、+12%、−12%のいずれかの値に設定することで、受信部62は正常に操作コマンド信号を受信することができる。ズレ予想量δhの設定順序は任意であるが、0%から順に上記の並びのように徐々に大きくしてもよい。また、前回正常受信した時のズレ予想量δhを初期値としてもよい。
Specifically, the expected deviation amount δh corrected by the
本実施形態によると、ズレ予想量δhを誤差として許容できる許容ズレ量以下の値毎に刻みながら、最大ズレ量の範囲内で第1クロックの補正を繰り返す。これにより、第2〜4の実施形態と同様に第1クロックと第2クロックとの周期のズレ量δを補正して確実にデータ列の送受信を行うことができる。また、ズレ量δ検出のための信号や処理を用意しなくても、第1クロックと第2クロックとのズレ量δを補正することができる。 According to the present embodiment, the correction of the first clock is repeated within the range of the maximum deviation amount while incrementing the expected deviation amount δh for each value equal to or less than the allowable deviation amount that can be tolerated as an error. As a result, the data string can be reliably transmitted / received by correcting the difference amount δ of the period between the first clock and the second clock as in the second to fourth embodiments. Further, the deviation amount δ between the first clock and the second clock can be corrected without preparing a signal or processing for detecting the deviation amount δ.
また、その他の実施形態において、CPU12、22を冷蔵庫1のAC電源に含まれるACクロックに接続し、ACクロックから共通の第1、第2クロックを生成してもよい。この場合、第1、第2クロックは周期のズレが発生しないため、送信部61と受信部62とを確実に同期させることができる。また、制御基板上にタイマを設けて第1、第2クロックを生成してもよい。
Further, in another embodiment, the
また、送信部61と受信部62とが同一の制御基板上に設けられていてもよい。この時、基準クロックの周期T’に対する第1クロック及び第2クロックの周期T1、T2のズレ量を予め測定して記憶し、通信時に第1クロック及び第2クロックをそれぞれ補正してもよい。
Further, the transmitting
また、データ送受信装置60が冷蔵庫1に設けられるが、電子レンジ、洗濯機等の他の電気機器に設けられていてもよい。
Further, although the data transmission /
本発明によると、複数のマイクロコンピュータを備えた冷蔵庫、電子レンジ、洗濯機等の電気機器に利用することができる。 According to the present invention, it can be used for electric devices such as refrigerators, microwave ovens, and washing machines equipped with a plurality of microcomputers.
1 冷蔵庫
2 断熱箱体
3 冷蔵室
3a、4a、5a 扉
4 冷凍室
5 野菜室
6 機械室
7、8 冷気通路
10、20 制御基板
11、21 マイクロコンピュータ
12、22 CPU
13、23 記憶部
14、24 通信部
15、25 クロック出力部(第1、第2クロック出力部)
18 通信線
30 圧縮機
31 冷却器
32 送風機
35 ダンパ
37 電装ボックス
40 操作パネル
41 操作部
42 表示部
43 表示パネル
44 インジケータ
60 データ送受信装置
61 送信部
62 受信部
B 空白期間
D0〜D7 データ
P パリティビット
S1 スタートビット
S2 ストップビット
T1、T2 周期
Ts スタートビットの周期
Tx 差
δ ズレ量
δh ズレ予想量
1
13, 23
18
Claims (6)
前記送信部は所定周期で発振する第1クロックを出力する第1クロック出力部を有し、前記受信部は所定周期で発振する第2クロックを出力する第2クロック出力部を有し、前記受信部が受信エラーを検知した場合に、
前記受信部が前記第1クロックと前記第2クロックとの周期のズレ量を検出するとともに補正し、前記第1クロックと前記第2クロックとを同期させて前記受信部から前記送信部へ前記受信エラーを検知したデータ列の再送信要求信号を送信し、前記送信部から前記受信部へ前記データ列の再送信を行うことを特徴とするデータ送受信装置。 In a data transmission / reception device that performs serial communication between a transmission unit and a reception unit by a pace synchronization method and transmits / receives a data string in which a predetermined number of bits of data are arranged between a start bit and a stop bit.
The transmitting unit has a first clock output unit that outputs a first clock that oscillates in a predetermined cycle, and the receiving unit has a second clock output unit that outputs a second clock that oscillates in a predetermined cycle. When the unit detects a reception error,
The receiving unit detects and corrects the amount of difference in the period between the first clock and the second clock, synchronizes the first clock and the second clock, and receives the data from the receiving unit to the transmitting unit. A data transmission / reception device characterized in that a data string re-transmission request signal for which an error has been detected is transmitted, and the data string is retransmitted from the transmission unit to the reception unit.
前記送信部は所定周期で発振する第1クロックを出力する第1クロック出力部を有し、前記受信部は所定周期で発振する第2クロックを出力する第2クロック出力部を有し、前記受信部が受信エラーを検知した場合に、
前記受信部が前記第1クロックと前記第2クロックとの周期のズレ量を検出し、前記受信部から前記送信部へ前記受信エラーを検知したデータ列の再送信要求信号を送信し、前記再送信要求信号は前記ズレ量を含み、前記送信部が前記ズレ量に基づいて前記第1クロックと前記第2クロックとの周期のズレ量を補正し、前記送信部から前記受信部へ前記データ列の再送信を行うことを特徴とするデータ送受信装置。 In a data transmission / reception device that performs serial communication between a transmission unit and a reception unit by a pace synchronization method and transmits / receives a data string in which a predetermined number of bits of data are arranged between a start bit and a stop bit.
The transmitting unit has a first clock output unit that outputs a first clock that oscillates in a predetermined cycle, and the receiving unit has a second clock output unit that outputs a second clock that oscillates in a predetermined cycle. When the unit detects a reception error,
The receiving unit detects the amount of difference in the period between the first clock and the second clock, transmits the re-transmission request signal of the data string in which the reception error is detected from the receiving unit to the transmitting unit, and retransmits the data string. The transmission request signal includes the deviation amount, and the transmission unit corrects the deviation amount of the period between the first clock and the second clock based on the deviation amount, and the data string from the transmission unit to the reception unit. A data transmission / reception device characterized by retransmitting a clock.
前記送信部は所定周期で発振する第1クロックを出力する第1クロック出力部を有し、前記受信部は所定周期で発振する第2クロックを出力する第2クロック出力部を有し、前記受信部が受信エラーを検知した場合に、
前記受信部から前記送信部へ前記受信エラーを検知したデータ列の再送信要求信号を送信し、
前記再送信要求信号は前記第1クロックと前記第2クロックとの周期のズレ量を検出するための補正量測定信号を含み、
前記送信部が前記補正量測定信号に基づいて前記第1クロックと前記第2クロックとの周期のズレ量を検出するとともに補正し、前記第1クロックと前記第2クロックとを同期させて、前記送信部から前記受信部へ前記データ列の再送信を行うことを特徴とするデータ送受信装置。 In a data transmission / reception device that performs serial communication between a transmission unit and a reception unit by a pace synchronization method and transmits / receives a data string in which a predetermined number of bits of data are arranged between a start bit and a stop bit.
The transmitting unit has a first clock output unit that outputs a first clock that oscillates in a predetermined cycle, and the receiving unit has a second clock output unit that outputs a second clock that oscillates in a predetermined cycle. When the unit detects a reception error,
A re-transmission request signal of the data string in which the reception error is detected is transmitted from the receiving unit to the transmitting unit.
The retransmission request signal includes a correction amount measurement signal for detecting a period deviation between the first clock and the second clock.
The transmission unit detects and corrects the amount of difference in the period between the first clock and the second clock based on the correction amount measurement signal, synchronizes the first clock and the second clock, and then synchronizes the first clock with the second clock. A data transmission / reception device characterized in that the data string is retransmitted from the transmission unit to the reception unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016206916A JP6875823B2 (en) | 2016-10-21 | 2016-10-21 | Data transmitter / receiver |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016206916A JP6875823B2 (en) | 2016-10-21 | 2016-10-21 | Data transmitter / receiver |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018067877A JP2018067877A (en) | 2018-04-26 |
JP6875823B2 true JP6875823B2 (en) | 2021-05-26 |
Family
ID=62086326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016206916A Active JP6875823B2 (en) | 2016-10-21 | 2016-10-21 | Data transmitter / receiver |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6875823B2 (en) |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0898284A (en) * | 1994-07-25 | 1996-04-12 | Nippondenso Co Ltd | Data receiver, data transmitter and data communication equipment |
JP2001308839A (en) * | 2000-04-21 | 2001-11-02 | Fujikura Ltd | Circuit and method for clock synchronization |
JP2005303631A (en) * | 2004-04-09 | 2005-10-27 | Yazaki Corp | Data communications system |
JP4783245B2 (en) * | 2006-09-01 | 2011-09-28 | 株式会社日立製作所 | Transceiver, transmitter, and receiver |
JP4644822B2 (en) * | 2007-01-17 | 2011-03-09 | 日本電信電話株式会社 | Automatic frequency control circuit |
JP4880068B2 (en) * | 2008-03-28 | 2012-02-22 | パイオニア株式会社 | Transmission device, reception device, and content reproduction system |
JP5670622B2 (en) * | 2009-04-23 | 2015-02-18 | ザインエレクトロニクス株式会社 | Transmission device, reception device, transmission / reception system, and image display system |
JP2011035473A (en) * | 2009-07-29 | 2011-02-17 | Renesas Electronics Corp | Baud rate error detection circuit and baud rate error detection method |
JP5017348B2 (en) * | 2009-10-26 | 2012-09-05 | ザインエレクトロニクス株式会社 | Transmission device, reception device, transmission / reception system, and image display system |
US8447004B2 (en) * | 2011-01-27 | 2013-05-21 | Freescale Semiconductor, Inc. | Estimation and compensation of clock variation in received signal |
-
2016
- 2016-10-21 JP JP2016206916A patent/JP6875823B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018067877A (en) | 2018-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102792591B (en) | The pulse width modulation synchronization of switchmode converter | |
JP5607595B2 (en) | refrigerator | |
US6795871B2 (en) | Appliance sensor and man machine interface bus | |
EP2741032B1 (en) | Refrigerator | |
JP2014526821A (en) | Wireless communication system | |
US5524444A (en) | Temperature control of an appliance using ambient air temperature determination | |
JP6875823B2 (en) | Data transmitter / receiver | |
EP2116796A1 (en) | Cooling storage and method for controlling compressor for the cooling storage | |
EP0976996A2 (en) | Self regulating device for controlling refrigerators and freezers | |
US20140345391A1 (en) | Flow meter device | |
TWI485987B (en) | Clock generation devices and methods and data transmission methods | |
CN107678421B (en) | A kind of pulse matching system and method in train control system | |
CN107664371A (en) | Refrigerating appliance and its control method | |
CN111585681B (en) | Household appliance | |
JP5905811B2 (en) | Frequency synchronization accuracy monitoring method, frequency synchronization accuracy monitoring device, communication method, and communication system | |
JP6202274B2 (en) | Air conditioner | |
KR102442306B1 (en) | Compressor driving apparatus and home appliance including the same | |
JP6103903B2 (en) | Wireless communication device | |
CN110686358A (en) | Variable frequency air conditioner fault diagnosis method based on detection tool | |
KR101132606B1 (en) | method for operating duet-refrigerator | |
KR930007678B1 (en) | Method of transmitting data in room air conditioner | |
JP3034743B2 (en) | Communications system | |
TW201319496A (en) | Wireless control system of refrigerator | |
JP2014055703A (en) | Refrigerator | |
JPS60120124A (en) | Abnormality detecting device for air-conditioning machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190920 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200608 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200804 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201005 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20210322 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20210324 |
|
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: 20210330 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210423 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6875823 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |