JP6875823B2 - Data transmitter / receiver - Google Patents

Data transmitter / receiver Download PDF

Info

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
Application number
JP2016206916A
Other languages
Japanese (ja)
Other versions
JP2018067877A (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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2016206916A priority Critical patent/JP6875823B2/en
Publication of JP2018067877A publication Critical patent/JP2018067877A/en
Application granted granted Critical
Publication of JP6875823B2 publication Critical patent/JP6875823B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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 Patent Document 1. This data transmission / reception device has a transmission unit and a reception unit, and serial communication is performed between the transmission unit and the reception unit by a pace synchronization method. The transmission unit has a clock generation unit that oscillates at a predetermined cycle to generate a clock. The transmitting unit transmits a data string having a predetermined number of bits of data to the receiving unit.

送信部から送信されるデータ列の先頭にはスタートビットが付加されており、受信部は受信したスタートビットのビット幅に相当するパルスを検出し、このビット幅の周期を有するクロックを生成する。これにより、送信部と受信部とのクロックを確実に同期させ、送信部から受信部へデータ列を正常に送信することができる。 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.

特開平11−177543号公報Japanese Unexamined Patent Publication No. 11-177543

しかしながら、上記特許文献1に開示されたデータ送受信装置によると、スタートビットのパルス幅を検出して、そのパルス幅からクロックを生成するクロック生成手段を必要とするため、データ送受信装置が複雑な構成になる問題があった。 However, according to the data transmission / reception device disclosed in Patent Document 1, the data transmission / reception device has a complicated configuration because it requires a clock generation means for detecting the pulse width of the start bit and generating a clock from the pulse width. There was a problem of becoming.

本発明は、上記問題点に鑑み、簡易な構成で送信部と受信部とのクロックを同期させてデータ列を確実に送信できるデータ送受信装置を提供することを目的とする。 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実施形態のデータ送受信装置を備えた冷蔵庫を示す側面断面図。A side sectional view showing a refrigerator provided with the data transmission / reception device according to the first embodiment of the present invention. 本発明の第1実施形態のデータ送受信装置を備えた冷蔵庫の操作パネルを示す正面図。The front view which shows the operation panel of the refrigerator provided with the data transmission / reception device of 1st Embodiment of this invention. 本発明の第1実施形態のデータ送受信装置を備えた冷蔵庫の構成を示すブロック図。The block diagram which shows the structure of the refrigerator provided with the data transmission / reception device of 1st Embodiment of this invention. 本発明の第1実施形態に係るデータ送受信装置が送受信するデータ列を説明する図。The figure explaining the data string sent and received by the data transmission / reception device which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係る第1、第2クロック出力部から出力する第1、第2クロックの周期を説明する図。The figure explaining the period of the 1st and 2nd clocks output from the 1st and 2nd clock output part which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係るデータ送受信装置が送受信するデータ列の周期を説明する図。The figure explaining the cycle of the data string sent and received by the data transmission / reception device which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係るデータ送受信装置の動作を示す図。The figure which shows the operation of the data transmission / reception device which concerns on 1st Embodiment of this invention. 本発明の第2実施形態に係るデータ送受信装置の動作を示す図。The figure which shows the operation of the data transmission / reception device which concerns on 2nd Embodiment of this invention. 本発明の第3実施形態に係るデータ送受信装置の動作を示す図。The figure which shows the operation of the data transmission / reception device which concerns on 3rd Embodiment of this invention. 本発明の第5実施形態に係るデータ送受信装置の動作を示す図。The figure which shows the operation of the data transmission / reception device which concerns on 5th Embodiment of this invention.

<第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 refrigerator 1 provided with the data transmission / reception device of the first embodiment. The refrigerator 1 is provided with a refrigerating chamber 3, a freezing chamber 4, and a vegetable compartment 5 in this order from above the heat insulating box 2.

冷蔵室3は貯蔵物を冷蔵保存し、冷凍室4は貯蔵物を冷凍保存する。野菜室5は冷蔵室3よりも高温に維持され、野菜等の貯蔵物を冷蔵保存する。断熱箱体2の背面下部には電装ボックス37が配される。 The refrigerating room 3 stores the stored items in a refrigerator, and the freezing room 4 stores the stored items in a frozen state. The vegetable compartment 5 is maintained at a higher temperature than the refrigerating chamber 3, and stores such as vegetables are refrigerated. An electrical box 37 is arranged at the lower part of the back surface of the heat insulating box body 2.

冷蔵室3は一端を枢支される回動式の扉3aによって開閉される。扉3aの前面には操作パネル40(図2参照)が配される。冷凍室4及び野菜室5はそれぞれ収納ケース(不図示)と一体に形成される引出式の扉4a、5aによって開閉される。 The refrigerating chamber 3 is opened and closed by a rotary door 3a whose end is pivotally supported. An operation panel 40 (see FIG. 2) is arranged on the front surface of the door 3a. The freezing chamber 4 and the vegetable compartment 5 are opened and closed by drawer-type doors 4a and 5a integrally formed with a storage case (not shown), respectively.

冷凍室4及び冷蔵室3の背面にはダンパ35を介して連通する冷気通路7、8が設けられる。冷気通路7には冷却器31及び送風機32が配され、冷凍室4に臨む吐出口7aが開口する。冷気通路8には冷蔵室3に臨む吐出口8aが開口する。 Cold air passages 7 and 8 communicating with each other via a damper 35 are provided on the back surfaces of the freezing chamber 4 and the refrigerating chamber 3. A cooler 31 and a blower 32 are arranged in the cold air passage 7, and a discharge port 7a facing the freezing chamber 4 opens. A discharge port 8a facing the refrigerating chamber 3 opens in the cold air passage 8.

野菜室5の後方には機械室6が設けられ、機械室6内には冷凍サイクルを運転する圧縮機30が設置される。圧縮機30には冷媒が流通する冷媒管(不図示)を介して凝縮器(不図示)、キャピラリチューブ(不図示)、冷却器31が順に接続され、圧縮機30に戻る。これにより、冷凍サイクルが運転され、冷却器31が冷気通路7を流通する空気と熱交換して冷気が生成される。 A machine room 6 is provided behind the vegetable room 5, and a compressor 30 for operating the refrigeration cycle is installed in the machine room 6. A condenser (not shown), a capillary tube (not shown), and a cooler 31 are connected in order to the compressor 30 via a refrigerant pipe (not shown) through which a refrigerant flows, and the compressor 30 returns to the compressor 30. As a result, the refrigeration cycle is operated, and the cooler 31 exchanges heat with the air flowing through the cold air passage 7 to generate cold air.

送風機32を駆動すると冷気通路7に空気が流通する。この時、ダンパ35を開くと冷気通路8に冷気が流通する。冷気通路7、8を流通する冷気はそれぞれ吐出口7a、8aを介して冷凍室4及び冷蔵室3に吐出される。 When the blower 32 is driven, air flows through the cold air passage 7. At this time, when the damper 35 is opened, cold air flows through the cold air passage 8. The cold air flowing through the cold air passages 7 and 8 is discharged to the freezing chamber 4 and the refrigerating chamber 3 via the discharge ports 7a and 8a, respectively.

冷凍室4には冷気を冷気通路7に戻す戻り口(不図示)が設けられる。冷蔵室3には野菜室5に連通する連通路(不図示)が導出され、野菜室5には冷気を冷気通路7に戻す戻り口(不図示)が設けられる。 The freezing chamber 4 is provided with a return port (not shown) for returning cold air to the cold air passage 7. A communication passage (not shown) communicating with the vegetable compartment 5 is led out to the refrigerating chamber 3, and a return port (not shown) for returning cold air to the cold air passage 7 is provided in the vegetable compartment 5.

図2は扉3aの前面に設けた操作パネル40の正面図を示している。操作パネル40は複数の操作キーを有する操作部41と、表示パネル43及び複数のインジケータ44を有した表示部42とを備えている。 FIG. 2 shows a front view of the operation panel 40 provided on the front surface of the door 3a. The operation panel 40 includes an operation unit 41 having a plurality of operation keys, and a display unit 42 having a display panel 43 and a plurality of indicators 44.

操作部41は冷蔵庫1の冷蔵室3や冷凍室4の温度設定等のユーザ設定条件を入力する。表示パネル43は液晶パネル等により形成され、設定温度等を表示する。インジケータ44は操作パネル40の背面に配したLEDの発光によって動作中の運転モード等を表示する。これにより、表示部42は冷蔵庫1の動作状態を表示により報知する。また、表示部42は操作部41による設定時に入力状態の表示を行う。 The operation unit 41 inputs user setting conditions such as temperature setting of the refrigerating chamber 3 and the freezing chamber 4 of the refrigerator 1. The display panel 43 is formed of a liquid crystal panel or the like and displays a set temperature or the like. The indicator 44 displays an operating mode or the like during operation by emitting light from an LED arranged on the back surface of the operation panel 40. As a result, the display unit 42 notifies the operating state of the refrigerator 1 by a display. Further, the display unit 42 displays the input state at the time of setting by the operation unit 41.

図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 / reception device 60 of the refrigerator 1. The data transmission / reception device 60 transmits the operation command signal input by the operation unit 41 to the control board 20 housed in the electrical box 37. The data transmission / reception device 60 has a transmission unit 61 and a reception unit 62, and performs serial communication by a UART (Universal Asynchronous Receiver Transmitter) by a synchronous communication method. Both the transmitting unit 61 and the receiving unit 62 can transmit and receive, and bidirectional communication by half-duplex communication is possible. When the transmitting unit 61 is in the receiving state, the receiving unit 62 is in the transmitting state.

送信部61は操作パネル40の背後に配される制御基板10を備えている。受信部62は電装ボックス37(図1参照)内に配される制御基板20を備えている。制御基板10にはマイクロコンピュータ11が設けられ、制御基板20にはマイクロコンピュータ21が設けられる。 The transmission unit 61 includes a control board 10 arranged behind the operation panel 40. The receiving unit 62 includes a control board 20 arranged in the electrical box 37 (see FIG. 1). The control board 10 is provided with the microcomputer 11, and the control board 20 is provided with the microcomputer 21.

マイクロコンピュータ11は各部を制御するCPU12を有し、CPU12には記憶部13、クロック出力部(第1クロック出力部)15、I/F14が接続される。マイクロコンピュータ11は操作部41の駆動を制御する。 The microprocessor 11 has a CPU 12 that controls each unit, and a storage unit 13, a clock output unit (first clock output unit) 15, and an I / F 14 are connected to the CPU 12. The microcomputer 11 controls the drive of the operation unit 41.

マイクロコンピュータ21は各部を制御するCPU22を有し、CPU22には記憶部23、クロック出力部(第2クロック出力部)25、I/F24が接続される。マイクロコンピュータ21は記憶部23に記憶された設定状態に基づいて圧縮機30、送風機32及びダンパ35の駆動を制御する。 The microprocessor 21 has a CPU 22 that controls each unit, and a storage unit 23, a clock output unit (second clock output unit) 25, and an I / F 24 are connected to the CPU 22. The microcomputer 21 controls the drive of the compressor 30, the blower 32, and the damper 35 based on the set state stored in the storage unit 23.

クロック出力部15、25はマイクロコンピュータ11、21の内部クロックであり、例えば、抵抗とコンデンサによる発振回路から成る。クロック出力部25は所定の周期T1で発振する第1クロックを出力し、クロック出力部25は所定の周期T2で発振する第2クロックを出力する。 The clock output units 15 and 25 are internal clocks of the microcomputers 11 and 21, and are composed of, for example, an oscillation circuit using a resistor and a capacitor. The clock output unit 25 outputs a first clock that oscillates in a predetermined period T1, and the clock output unit 25 outputs a second clock that oscillates in a predetermined period T2.

また、クロック出力部15、25はマイクロコンピュータ11、21からの制御によって第1クロック、第2クロックの周期T1、T2を変更可能である。例えば、クロック出力部15、25が発振回路の出力クロックを分周する分周回路を備えている場合に、分周比をマイクロコンピュータ11、21からの信号によって任意に設定することで第1クロック、第2クロックの周期T1、T2を変更することができる。 Further, the clock output units 15 and 25 can change the cycles T1 and T2 of the first clock and the second clock by the control from the microcomputers 11 and 21. For example, when the clock output units 15 and 25 include a frequency dividing circuit that divides the output clock of the oscillation circuit, the first clock can be arbitrarily set by setting the frequency dividing ratio according to the signals from the microcomputers 11 and 21. , The cycles T1 and T2 of the second clock can be changed.

記憶部13、23はROM及びRAMから成り、それぞれCPU12、22によって実行される制御プログラムや各種データを格納する。また、記憶部13、23はCPU12、22による演算の一時記憶を行う。I/F14、24は通信線18を介して互いにシリアル通信を行う。 The storage units 13 and 23 are composed of a ROM and a RAM, and store control programs and various data executed by the CPUs 12 and 22, respectively. Further, the storage units 13 and 23 temporarily store the operations performed by the CPUs 12 and 22. The I / Fs 14 and 24 perform serial communication with each other via the communication line 18.

図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 unit 61 and the receiving unit 62. FIG. 4A shows the bit structure of the data string. 4 (b) and 4 (c) show the first clock and the second clock, respectively.

データ列は送信部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 transmission unit 61 and the reception unit 62, and each data string is sequentially transmitted. The data string has data D0 to D7 composed of a plurality of bits. Further, the start bit S1 is added before the data D0 to D7, and the parity bit P and the stop bit S2 are added in order after the data D0 to D7. Further, a blank period B composed of a plurality of consecutive bits is added to the stop bit S2 at the end of the data string.

スタートビットS1はローレベル「0」の信号であり1ビットから成る。受信部62はスタートビットS1を検知してデータD0〜D7の始まりを認識する。 The start bit S1 is a low level "0" signal and consists of 1 bit. The receiving unit 62 detects the start bit S1 and recognizes the beginning of the data D0 to D7.

ストップビット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 unit 62 detects the stop bit S2 and recognizes the end of the data D0 to D7. The stop bit S2 may be 1.5 bits or 2 bits.

データ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 unit 62 can detect that the blank period B is when a predetermined number of high level "1" signals are continuously received. Then, it can be recognized that the start bit S1 of the next data string is received when the low level "0" signal is detected after the blank period B.

送信部61はクロック出力部15で出力される第1クロックの周期T1に基づいてデータ列を1ビットずつ送信する。 The transmission unit 61 transmits a data string bit by bit based on the period T1 of the first clock output by the clock output unit 15.

一方、受信部62はクロック出力部25で出力される第2クロックの周期T2に基づいて送信部61から送信されたデータ列を1ビットずつ受信する。周期T1と周期T2とは一致する必要があり、両者のズレ量が所定量以上発生すると送信部61と受信部62との同期が外れてデータ列を正常に送信することができない。 On the other hand, the receiving unit 62 receives the data string transmitted from the transmitting unit 61 bit by bit based on the period T2 of the second clock output by the clock output unit 25. It is necessary that the period T1 and the period T2 coincide with each other, and if the amount of deviation between the two occurs by a predetermined amount or more, the transmission unit 61 and the reception unit 62 are out of synchronization and the data string cannot be transmitted normally.

図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 clock output units 15 and 25 are set to output reference clocks having the same period T'.

しかし、クロック出力部15、25はマイクロコンピュータ11、21の内部クロックであるため、個々の発振回路の素子ばらつきや冷蔵庫1の使用環境や使用年数により、第1、第2クロックの周期T1、T2が基準クロックの周期T’から夫々ずれる場合がある。周期T1と周期T2との間にズレ量が発生した場合に、以下の方法によりズレ量を補正する。 However, since the clock output units 15 and 25 are internal clocks of the microcomputers 11 and 21, the cycles T1 and T2 of the first and second clocks depend on the element variation of each oscillation circuit, the usage environment of the refrigerator 1, and the number of years of use. May deviate from the reference clock period T', respectively. When a deviation amount occurs between the period T1 and the period T2, the deviation amount is corrected by the following method.

図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 transmission unit 61 sequentially transmits a plurality of data strings. The CPU 22 of the receiving unit 62 measures the period Ts of the start bits S1 of a plurality of data strings by the count number N2 of the second clock. The data string is transmitted from the transmission unit 61 based on the first clock, and the period Ts of the start bits S1 is a predetermined count number N1 of the first clock. As a result, the amount of deviation δ of the second clock with respect to the first clock is represented by T2 / T1 = N1 / N2.

CPU22はクロック出力部25が出力する第2クロックの周期T2に対してズレ量δを補正する。即ち、第2クロックのズレ量δを補正して周期をT2/δにする。これにより、第1クロックと第2クロックとを同期させることができる。 The CPU 22 corrects the deviation amount δ with respect to the period T2 of the second clock output by the clock output unit 25. That is, the deviation amount δ of the second clock is corrected to set the period to T2 / δ. As a result, the first clock and the second clock can be synchronized.

なお、空白期間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 transmission unit 61 to the reception unit 62 decreases. However, since the period Ts of the start bit S1 becomes long, it is possible to reduce the measurement error of the period Ts and improve the detection accuracy of the deviation amount δ.

また、スタートビット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 / reception device 60. For example, when an operation for lowering the temperature is input from the operation unit 41, an operation command signal is transmitted from the control board 10 to the control board 20 to control the compressor 30 and the like.

ステップ#11で送信部61のCPU12はI/F14から通信線18を介して受信部62に対して複数のデータ列を含む操作コマンド信号(通信データ)を送信する。I/F14から送信された操作コマンド信号はI/F24で受信されてCPU22に転送される。 In step # 11, the CPU 12 of the transmission unit 61 transmits an operation command signal (communication data) including a plurality of data strings from the I / F 14 to the reception unit 62 via the communication line 18. The operation command signal transmitted from the I / F 14 is received by the I / F 24 and transferred to the CPU 22.

ステップ#12でCPU22は操作コマンド信号を正常に受信できたか否かを判断する。正常に操作コマンド信号を受信できた場合、ステップ#14で送信部61に正常に操作コマンド信号が正常に受信できたことを知らせる正常受信信号を送信する。 In step # 12, the CPU 22 determines whether or not the operation command signal can be normally received. If the operation command signal can be normally received, the normal reception signal notifying that the operation command signal has been normally received is transmitted to the transmission unit 61 in step # 14.

一方、第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 unit 62 are not synchronized, the receiving unit 62 cannot normally receive the operation command signal. Therefore, in step # 12, the CPU 22 determines that a reception error is obtained by a parity check or the like.

CPU22は受信エラーと判定すると、ステップ#21で続いて次に受信するデータ列のスタートビットS1の周期Tsを測定して周期T1と周期T2のズレ量δを検出する。ズレ量δは記憶部23に記憶される。 When the CPU 22 determines that the reception error is obtained, the CPU 22 measures the cycle Ts of the start bit S1 of the data string to be received next in step # 21 to detect the deviation amount δ between the cycle T1 and the cycle T2. The deviation amount δ is stored in the storage unit 23.

次に、ステップ#23で受信部62はクロック出力部25が出力する第2クロックの周期T2に対してズレ量δを補正して周期をT2/δにする。そして、ステップ#25で受信部62はズレ量δを補正した第2クロックに基づいて送信部61に操作コマンド信号の再送信を要求する再送信要求信号を送信する。 Next, in step # 23, the receiving unit 62 corrects the deviation amount δ with respect to the period T2 of the second clock output by the clock output unit 25 to set the period to T2 / δ. Then, in step # 25, the receiving unit 62 transmits a retransmission request signal requesting the retransmission of the operation command signal to the transmitting unit 61 based on the second clock corrected for the deviation amount δ.

送信部61は第2クロックが第1クロックに一致するように補正されているため再送信要求信号を正常に受信することができる。これにより、ステップ#26で送信部61はI/F14から通信線18を介して受信部62に対して操作コマンド信号を再送信する。 Since the transmission unit 61 is corrected so that the second clock matches the first clock, the retransmission request signal can be normally received. As a result, in step # 26, the transmission unit 61 retransmits the operation command signal from the I / F 14 to the reception unit 62 via the communication line 18.

I/F14から送信された操作コマンド信号はI/F24で受信されてCPU22に転送される。CPU22はズレ量δを補正した第2クロックが第1クロックに一致するため正常に操作コマンド信号を受信することができる。そして、CPU22は受信した操作コマンド信号に従って、圧縮機30を制御運転する。 The operation command signal transmitted from the I / F 14 is received by the I / F 24 and transferred to the CPU 22. Since the second clock corrected by the deviation amount δ matches the first clock, the CPU 22 can normally receive the operation command signal. Then, the CPU 22 controls and operates the compressor 30 according to the received operation command signal.

本実施形態によると、受信部62が受信エラーを検知した場合に、受信部62により第1クロックと第2クロックとの周期のズレ量δを検出する。そして、受信部62によりズレ量δを補正し、第1クロックと第2クロックとを同期させて送信部61から受信部62へデータ列の再送信を行う。 According to the present embodiment, when the receiving unit 62 detects a reception error, the receiving unit 62 detects the amount δ of the period deviation between the first clock and the second clock. Then, the receiving unit 62 corrects the deviation amount δ, synchronizes the first clock and the second clock, and retransmits the data string from the transmitting unit 61 to the receiving unit 62.

これにより、第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 unit 62 with a simple configuration. The column can be reliably received. Therefore, even if a reception error occurs, the data string can be continuously transmitted and received.

また、スタートビット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 / reception device 60 according to the second embodiment. The same parts as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted. The present embodiment is different from the first embodiment in that the deviation amount δ is corrected on the transmission unit 61 side.

ステップ#12で受信部62のCPU22が受信エラーと判定すると、ステップ#21で受信部62は第1実施形態と同様に周期T1と周期T2のズレ量δを検出する。 When the CPU 22 of the receiving unit 62 determines in step # 12 that a reception error is determined, the receiving unit 62 detects the deviation amount δ between the period T1 and the period T2 in step # 21 as in the first embodiment.

次に、ステップ#22で受信部62はズレ量δのデータを送信部61に送信する。この時、受信部62はボーレートを所定値に下げて送信する。また、送信部61は受信部62から正常受信を知らせる信号を所定期間受信しないタイムアウト発生時に、ボーレートを所定値に下げて待機する。これにより、送信部61がズレ量δのデータを受信することができる。 Next, in step # 22, the receiving unit 62 transmits the data of the deviation amount δ to the transmitting unit 61. At this time, the receiving unit 62 lowers the baud rate to a predetermined value and transmits. Further, the transmitting unit 61 lowers the baud rate to a predetermined value and stands by when a timeout occurs in which the signal for notifying normal reception from the receiving unit 62 is not received for a predetermined period. As a result, the transmission unit 61 can receive the data of the deviation amount δ.

ステップ#23では送信部61のCPU12は受信したズレ量δに基づいてクロック出力部15が出力する第1クロックのズレ量δを補正して周期をT1・δにする。そして、ステップ#26で送信部61はズレ量δを補正した第1クロックに基づいて操作コマンド信号を再送信する。 In step # 23, the CPU 12 of the transmission unit 61 corrects the deviation amount δ of the first clock output by the clock output unit 15 based on the received deviation amount δ, and sets the period to T1 and δ. Then, in step # 26, the transmission unit 61 retransmits the operation command signal based on the first clock corrected by the deviation amount δ.

I/F14から送信された操作コマンド信号はI/F24で受信されてCPU22に転送される。CPU22はズレ量δを補正した第1クロックが第2クロックに一致するため正常に操作コマンド信号を受信することができる。 The operation command signal transmitted from the I / F 14 is received by the I / F 24 and transferred to the CPU 22. Since the first clock corrected by the deviation amount δ matches the second clock, the CPU 22 can normally receive the operation command signal.

本実施形態によると、第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 unit 62 detects the deviation amount δ, and the transmitting unit 61 corrects the deviation amount δ. Therefore, the processing of the microcomputers 11 and 21 can be distributed to reduce the burden. Further, even when the performance of the microcomputer 21 of the receiving unit 62 is low, the data string can be transmitted / received by correcting the deviation amount δ by the microcomputer 11 of the transmitting unit 61.

本実施形態において、ステップ#22でボーレートを下げずに第1実施形態と同様に受信部62により第2クロックに対してズレ量δを補正して送信してもよい(T2/δ)。この時、ステップ#26以降では送信部61により第1クロックに対してズレ量δを補正して送信を行う。これにより、マイクロコンピュータ11、21の処理を分散できる。 In the present embodiment, the receiving unit 62 may correct the deviation amount δ with respect to the second clock and transmit the second clock without lowering the baud rate in step # 22 (T2 / δ). At this time, in step # 26 and thereafter, the transmission unit 61 corrects the deviation amount δ with respect to the first clock and performs transmission. Thereby, the processing of the microcomputers 11 and 21 can be distributed.

また、ステップ#22でデータ列のデータのビット数を下げて(例えば、4ビット)ズレ量δのデータを送信してもよい。これにより、データ長が短くなるため受信エラーの発生を回避し、送信部61がズレ量δのデータを受信することができる。 Further, in step # 22, the number of bits of the data in the data string may be reduced (for example, 4 bits) to transmit the data having a deviation amount δ. As a result, since the data length is shortened, the occurrence of a reception error can be avoided, and the transmission unit 61 can receive the data with the deviation amount δ.

<第3実施形態>
図9は第3実施形態に係るデータ送受信装置60の動作を示す図である。なお、第1実施形態と同一部分は同一符号を付して説明を省略する。本実施形態は送信部61側でズレ量δを検出して補正する点が第1実施形態と異なる。
<Third Embodiment>
FIG. 9 is a diagram showing the operation of the data transmission / reception device 60 according to the third embodiment. The same parts as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted. The present embodiment is different from the first embodiment in that the misalignment amount δ is detected and corrected on the transmission unit 61 side.

ステップ#12で受信部62のCPU22が受信エラーと判定すると、ステップ#13で受信部62は送信部61に補正量測定用信号を送信する。補正量測定用信号は第1実施形態で上述したような第1クロックと第2クロックとの周期のズレ量δを検出することができるデータ列を用いる。 If the CPU 22 of the receiving unit 62 determines in step # 12 that a reception error has occurred, the receiving unit 62 transmits a correction amount measurement signal to the transmitting unit 61 in step # 13. As the correction amount measurement signal, a data string capable of detecting the amount δ of the period deviation between the first clock and the second clock as described above in the first embodiment is used.

送信部61は第1クロックと第2クロックが同期していないため受信部62から送信された補正量測定用信号の受信エラーとなる。このため、ステップ#21で送信部61のCPU12は順次受信するデータ列のスタートビットS1の周期Tsを測定し、ズレ量δを検出して記憶部13に記憶する。 Since the first clock and the second clock are not synchronized in the transmission unit 61, a reception error of the correction amount measurement signal transmitted from the reception unit 62 occurs. Therefore, in step # 21, the CPU 12 of the transmission unit 61 measures the period Ts of the start bits S1 of the sequentially received data strings, detects the deviation amount δ, and stores it in the storage unit 13.

ステップ#23では送信部61のCPU12は受信したズレ量δに基づいてクロック出力部15が出力する第1クロックのズレ量δを補正して周期をT1・δにする。そして、ステップ#26で送信部61はズレ量δを補正した第1クロックに基づいて操作コマンド信号を再送信する。 In step # 23, the CPU 12 of the transmission unit 61 corrects the deviation amount δ of the first clock output by the clock output unit 15 based on the received deviation amount δ, and sets the period to T1 and δ. Then, in step # 26, the transmission unit 61 retransmits the operation command signal based on the first clock corrected by the deviation amount δ.

本実施形態によると、第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 microcomputer 21 of the receiving unit 62 is low, the data string can be transmitted / received by correcting the deviation amount δ by the microcomputer 11 of the transmitting unit 61.

<第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 CPU 22 of the receiving unit 62 determines in step # 12 of FIG. 9 that a reception error is determined, the receiving unit 62 transmits a correction amount measurement signal consisting of a pulse signal having a predetermined pulse width to the transmitting unit 61 in step # 13. The pulse width of the correction amount measurement signal is generated by a second clock having a predetermined count number N20.

ステップ#21で送信部61のCPU12は受信した補正量測定用信号のパルス幅からズレ量δを検出する。即ち、補正量測定用信号のパルス幅は第1クロックのカウント数N10により検出される。第1クロックの周期T1及び第2クロックの周期T2からT1・N10=T2・N20が成立する。これにより、ズレ量δはT2/T1=N10/N20で表わされる。 In step # 21, the CPU 12 of the transmission unit 61 detects the deviation amount δ from the pulse width of the received correction amount measurement signal. That is, the pulse width of the correction amount measurement signal is detected by the count number N10 of the first clock. T1 · N10 = T2 · N20 is established from the cycle T1 of the first clock and the cycle T2 of the second clock. As a result, the amount of deviation δ is represented by T2 / T1 = N10 / N20.

ステップ#23では送信部61のCPU12は受信したズレ量δに基づいてクロック出力部15が出力する第1クロックのズレ量δを補正して周期をT1・δする。そして、ステップ#26で送信部61はズレ量δを補正した第1クロックに基づいて操作コマンド信号を再送信する。 In step # 23, the CPU 12 of the transmission unit 61 corrects the deviation amount δ of the first clock output by the clock output unit 15 based on the received deviation amount δ, and sets the period to T1 and δ. Then, in step # 26, the transmission unit 61 retransmits the operation command signal based on the first clock corrected by the deviation amount δ.

本実施形態によると、第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 / reception device 60 according to the fifth embodiment. The same parts as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted. In the first embodiment, the first embodiment corrects the first clock based on a plurality of expected deviation amounts δh stored in advance in the storage unit 13 of the transmission unit 62 until the reception unit 62 normally receives the operation command signal. Different from.

図10のステップ#12で受信部62のCPU22が受信エラーと判定すると、ステップ#21で受信部62は送信部61に操作コマンド信号の再送信を要求する再送信要求信号を送信する。この時、受信部62はボーレートを所定値に下げて送信する。また、送信部61は受信部62から正常受信を知らせる信号を所定期間受信しないタイムアウト発生時に、ボーレートを所定値に下げて待機する。これにより、送信部61が受信部62からの再送信要求信号を受信することができる。 If the CPU 22 of the receiving unit 62 determines in step # 12 of FIG. 10 that a reception error is determined, the receiving unit 62 transmits a retransmission request signal requesting the transmitting unit 61 to retransmit the operation command signal in step # 21. At this time, the receiving unit 62 lowers the baud rate to a predetermined value and transmits. Further, the transmitting unit 61 lowers the baud rate to a predetermined value and stands by when a timeout occurs in which the signal for notifying normal reception from the receiving unit 62 is not received for a predetermined period. As a result, the transmitting unit 61 can receive the retransmission request signal from the receiving unit 62.

また、タイムアウト発生時に、送信部61は受信部62からの再送信要求信号の受信を待たずに、ステップ#22に移行してもよい。 Further, when a timeout occurs, the transmitting unit 61 may move to step # 22 without waiting for the reception of the retransmission request signal from the receiving unit 62.

ステップ#22では再送信が必要と判断した送信部61のCPU12が予め記憶されたズレ予想量δhに基づいてクロック出力部15が出力する第1クロックを補正して周期をT1・δhにする。そして、ステップ#11に戻り、送信部61は補正した第1クロックに基づいて操作コマンド信号を再送信する。 In step # 22, the CPU 12 of the transmission unit 61, which is determined to require retransmission, corrects the first clock output by the clock output unit 15 based on the estimated deviation amount δh stored in advance, and sets the period to T1 · δh. Then, returning to step # 11, the transmission unit 61 retransmits the operation command signal based on the corrected first clock.

ステップ#12でCPU22が操作コマンド信号を正常に受信できたと判断するまで、受信部62及び送信部61はステップ♯11〜ステップ♯22を繰り返して第1クロックを補正する。 The receiving unit 62 and the transmitting unit 61 repeat steps # 11 to # 22 to correct the first clock until the CPU 22 determines in step # 12 that the operation command signal has been normally received.

ステップ#12で受信部62のCPU22が正常に受信したと判定すると、ステップ#14で受信部62は送信部61に操作コマンド信号を正常に受信したことを知らせる信号を送信する。受信部62からの正常受信信号を受信した送信部61は、設定されているズレ予想量δhを記憶し、以後はこのズレ予想量δhによって第1クロックを補正する。 If it is determined in step # 12 that the CPU 22 of the receiving unit 62 has normally received the signal, the receiving unit 62 transmits a signal informing the transmitting unit 61 that the operation command signal has been normally received in step # 14. The transmission unit 61 that has received the normal reception signal from the reception unit 62 stores the set expected deviation amount δh, and thereafter corrects the first clock with this expected deviation amount δh.

ここで、ズレ予想量δ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 unit 62 normally receives the operation command. Can be done.

例えば、図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 transmission unit 61 in step # 22 is within the range of the maximum deviation amount, and the corrected deviation amount δ of the first clock and the second clock is within the error range, reception is performed. The unit 62 can normally receive the operation command signal.

従って、ズレ予想量δ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 transmission unit 61 in step # 22 is set to any of 0%, + 4%, -4%, + 8%, -8%, + 12%, and -12%. By doing so, the receiving unit 62 can normally receive the operation command signal. The order of setting the expected deviation amount δh is arbitrary, but it may be gradually increased in order from 0% as in the above arrangement. Further, the expected deviation amount δh at the time of the previous normal reception may be used as the initial value.

本実施形態によると、ズレ予想量δ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 CPUs 12 and 22 may be connected to the AC clock included in the AC power supply of the refrigerator 1 to generate a common first and second clocks from the AC clock. In this case, since the first and second clocks do not have a cycle shift, the transmission unit 61 and the reception unit 62 can be reliably synchronized. Further, a timer may be provided on the control board to generate the first and second clocks.

また、送信部61と受信部62とが同一の制御基板上に設けられていてもよい。この時、基準クロックの周期T’に対する第1クロック及び第2クロックの周期T1、T2のズレ量を予め測定して記憶し、通信時に第1クロック及び第2クロックをそれぞれ補正してもよい。 Further, the transmitting unit 61 and the receiving unit 62 may be provided on the same control board. At this time, the deviation amounts of the first clock and the second clock cycles T1 and T2 with respect to the reference clock cycle T'may be measured and stored in advance, and the first clock and the second clock may be corrected at the time of communication, respectively.

また、データ送受信装置60が冷蔵庫1に設けられるが、電子レンジ、洗濯機等の他の電気機器に設けられていてもよい。 Further, although the data transmission / reception device 60 is provided in the refrigerator 1, it may be provided in other electric devices such as a microwave oven and a washing machine.

本発明によると、複数のマイクロコンピュータを備えた冷蔵庫、電子レンジ、洗濯機等の電気機器に利用することができる。 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 Refrigerator 2 Insulation box 3 Refrigerator room 3a, 4a, 5a Door 4 Freezer room 5 Vegetable room 6 Machine room 7, 8 Cold air passage 10, 20 Control board 11, 21 Microcomputer 12, 22 CPU
13, 23 Storage unit 14, 24 Communication unit 15, 25 Clock output unit (1st and 2nd clock output units)
18 Communication line 30 Compressor 31 Cooler 32 Blower 35 Damper 37 Electrical box 40 Operation panel 41 Operation unit 42 Display unit 43 Display panel 44 Indicator 60 Data transmitter / receiver 61 Transmitter unit 62 Receiver B Blank period D0 to D7 Data P parity bit S1 Start bit S2 Stop bit T1, T2 Cycle Ts Start bit cycle Tx Difference δ Deviation amount δh Expected deviation amount

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.
前記受信部から前記送信部へ送信する前記再送信要求信号のボーレートまたはデータビット数は、前記受信部が前記受信エラーを検知したときのデータ列のボーレートまたはデータビット数よりも小さいことを特徴とする請求項2に記載のデータ送受信装置。The baud rate or the number of data bits of the retransmission request signal transmitted from the receiving unit to the transmitting unit is smaller than the baud rate or the number of data bits of the data string when the receiving unit detects the reception error. The data transmission / reception device according to claim 2. 送信部と受信部との間で調歩同期方式によるシリアル通信を行ない、スタートビットとストップビットとの間に所定ビット数のデータを配したデータ列を送受信するデータ送受信装置において、
前記送信部は所定周期で発振する第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.
前記スタートビットの周期に基づいて前記ズレ量を検出することを特徴とする請求項〜請求項4のいずれかに記載のデータ送受信装置。 Data transmission and reception apparatus according to any one of claims 1 to 4, characterized in that to detect the displacement amount based on the period of the start bit. 前記データ列が前記ストップビットに連続するとともに前記ストップビットと同レベルの複数ビットから成る空白期間を有することを特徴とする請求項5に記載のデータ送受信装置。 The data transmission / reception device according to claim 5, wherein 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.
JP2016206916A 2016-10-21 2016-10-21 Data transmitter / receiver Active JP6875823B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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