JP2009111967A - Data reception apparatus and microcomputer - Google Patents
Data reception apparatus and microcomputer Download PDFInfo
- Publication number
- JP2009111967A JP2009111967A JP2008151618A JP2008151618A JP2009111967A JP 2009111967 A JP2009111967 A JP 2009111967A JP 2008151618 A JP2008151618 A JP 2008151618A JP 2008151618 A JP2008151618 A JP 2008151618A JP 2009111967 A JP2009111967 A JP 2009111967A
- Authority
- JP
- Japan
- Prior art keywords
- setting value
- temperature
- correction
- period setting
- value
- 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.)
- Granted
Links
Images
Landscapes
- Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)
- Manipulation Of Pulses (AREA)
Abstract
Description
本発明は、CR発振回路から出力されるクロック信号を用いたデータ受信装置および当該データ受信装置を備えたマイクロコンピュータに関する。 The present invention relates to a data receiving device using a clock signal output from a CR oscillation circuit and a microcomputer provided with the data receiving device.
通信装置やマイクロコンピュータ(マイコン)では、正確で安定した基準クロックを生成するために発振子が用いられている。特許文献1、2には、水晶発振器における経年変化補正を行う技術が開示されている。しかし、発振子は比較的高価であるため、発振子を用いない発振子レスの構成が望まれている。発振子の代用回路としてCR発振回路があるが、CR発振回路は温度変化および電源電圧変化により発振周期が変化し易く、特に温度が変化する環境、特に車載機器のように温度変化の大きい環境下では基準クロックとして使用することができない。
In communication apparatuses and microcomputers (microcomputers), an oscillator is used to generate an accurate and stable reference clock.
例えば、車載LANの通信プロトコルであるLIN(Local Interconnect Network)では、マスタノードから送信されるフレームのヘッダに0x55なるシンクバイトフィールド(Synch Byte Field)が付加されている。スレーブノードでは、この時間を基準クロックを用いて計数することにより1ビット時間(bit time)の正確な値を算出して通信レートを得るようになっている(例えば特許文献3参照)。しかし、この同期信号を検出する間に温度変化が生じて基準クロックが変動すると、正しくデータの送受信を行えない。 For example, in a LIN (Local Interconnect Network) which is a communication protocol for in-vehicle LAN, a sync byte field (Synch Byte Field) of 0x55 is added to the header of a frame transmitted from a master node. In the slave node, the communication rate is obtained by calculating an accurate value of 1 bit time by counting this time using a reference clock (see, for example, Patent Document 3). However, if the reference clock fluctuates due to a temperature change during the detection of this synchronization signal, data cannot be transmitted / received correctly.
これに対し、特許文献4には、温度変化に応じて発振周波数が変化した場合に、CR発振回路の時定数を変化させることなく、通信回路のデータ送信時間が一定となるように制御するマイコンが開示されている。通信回路により管理される1フレームのデータ送信時間を一定とするための通信レートCMRを決定するデータを予めメモリに記憶しておき、検出温度に応じてメモリに記憶されているデータを読み出し、決定した通信レートCMRを通信回路に設定する。また、データが不足する温度領域では、高低2点間を一次関数で補間することにより近似の通信レートCMRを得ている。
特許文献4記載の補正手段では、製品ごとに事前に初期特性を測定し、その特性に対応したデータをメモリに書き込む必要がある。誤差を低減するには極力多くの温度についてデータを準備することが好ましいが、データ数が増加すると初期特性の測定工数および書込工数が増大してコストが上昇する。また、上述したように数点のデータのみを準備してその間を直線補間すると、補間される温度領域の初期特性に誤差が生じ易い。初期特性の誤差は、出荷後の実動作においては補正することができない。さらに、CR発振回路は、同じ温度条件、電圧条件であっても時間経過とともに徐々に発振周波数が変化する。特許文献4記載の補正手段では、再度データを書き換えない限り経年変化による誤差を補正できない。 In the correction means described in Patent Document 4, it is necessary to measure the initial characteristics for each product in advance and write data corresponding to the characteristics in the memory. In order to reduce the error, it is preferable to prepare data for as many temperatures as possible. However, as the number of data increases, the number of man-hours for initial characteristics and the number of man-hours for writing increase, thereby increasing costs. Also, as described above, if only several points of data are prepared and linear interpolation is performed between them, an error tends to occur in the initial characteristics of the temperature region to be interpolated. The error in the initial characteristic cannot be corrected in the actual operation after shipment. Further, the oscillation frequency of the CR oscillation circuit gradually changes with time even under the same temperature condition and voltage condition. The correction means described in Patent Document 4 cannot correct errors due to secular change unless data is rewritten again.
本発明は上記事情に鑑みてなされたもので、その目的は、CR発振回路に温度変化、電圧変化または経年変化が生じても正確な周波数を持つクロック信号を生成できるデータ受信装置およびマイクロコンピュータを提供することにある。 The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a data receiving apparatus and a microcomputer that can generate a clock signal having an accurate frequency even when a temperature change, a voltage change, or a secular change occurs in the CR oscillation circuit. It is to provide.
請求項1に記載した手段によれば、温度検出手段によりCR発振器周辺の温度を検出し、その検出温度に対応した周期設定値(例えば逓倍数、分周比)を記憶手段から読み出して発振回路に与える。発振回路は、CR発振器の発振信号をその周期設定値に基づいて逓倍または分周してクロック信号を出力する。この周期設定値は、受信手段で受信する正確な通信レートを持つデータ信号の単位ビット長を基準として補正されたものなので、クロック信号の周期は上記通信レートと同程度の精度を有することになる。従って、温度変化が生じても正確な周期を持つクロック信号を生成可能となる。
According to the means described in
クロック信号を用いて受信手段でデータ信号を受信するとき、そのデータ信号の単位ビット長を、上記発振回路から出力されるクロック信号の計数により計測する。そして、このクロック信号の計数値(実際値)と、単位ビット長に対する基準周期に基づく基準計数値(基準値)とに基づいて、そのときの検出温度に対応した周期設定値を補正し、補正後の周期設定値を検出温度に対応させて記憶手段に書き込む。 When the data signal is received by the receiving means using the clock signal, the unit bit length of the data signal is measured by counting the clock signal output from the oscillation circuit. Then, based on the count value (actual value) of this clock signal and the reference count value (reference value) based on the reference cycle for the unit bit length, the cycle set value corresponding to the detected temperature at that time is corrected and corrected. The later cycle set value is written in the storage means in correspondence with the detected temperature.
本手段によれば、データ信号を受信してその単位ビット長の計測を実行するごとに、その計測時の検出温度における記憶された周期設定値を最新の値に更新でき、或いは当該検出温度における記憶された周期設定値が存在しない場合(補間等により周期設定値を求めている場合)には、周期設定値を新たに生成して記憶することができる。すなわち、データ受信装置は、受信するデータ信号の同期信号などにおける単位ビット長に基づいて当該温度における周期設定値を次々に学習する機能を有している。 According to this means, every time a data signal is received and the unit bit length is measured, the stored cycle setting value at the detected temperature at the time of measurement can be updated to the latest value, or at the detected temperature. When the stored cycle setting value does not exist (when the cycle setting value is obtained by interpolation or the like), the cycle setting value can be newly generated and stored. That is, the data receiving device has a function of successively learning the cycle set value at the temperature based on the unit bit length in the synchronization signal of the received data signal.
従って、周期設定値の初期値の数が少ない場合や初期値に誤差が存在する場合であっても、正確な規定通信レートを持つデータ信号を受信するに従って、温度補正に用いる周期設定値を拡充することができる。また、CR発振周期に経年変化が生じても、上記更新によりその誤差をキャンセルすることができる。 Therefore, even if the initial value of the cycle setting value is small or there is an error in the initial value, the cycle setting value used for temperature correction is expanded as a data signal having an accurate specified communication rate is received. can do. Even if the CR oscillation cycle changes over time, the error can be canceled by the above update.
請求項2に記載した手段によれば、当該検出温度に対応する周期設定値を補正する場合、他の温度に対応する周期設定値も合わせて補正する。すなわち、補正後の周期設定値と当該検出温度に対応した補正前の周期設定値との差分を演算し、記憶手段に記憶されている各温度に対応した周期設定値に前記差分を加算する。これにより、経年変化によるずれが生じた場合に、全温度範囲の周期設定値を一度に補正することができる。また、極端に高い温度や低い温度などのように発生頻度が少ない温度に対応した周期設定値が補正されずに初期の誤差や経年変化が残存し続けることを防止できる。 According to the second aspect of the present invention, when the cycle set value corresponding to the detected temperature is corrected, the cycle set value corresponding to another temperature is also corrected. That is, the difference between the corrected cycle setting value and the cycle setting value before correction corresponding to the detected temperature is calculated, and the difference is added to the cycle setting value corresponding to each temperature stored in the storage means. Thereby, when the shift | offset | difference by a secular change arises, the period setting value of the whole temperature range can be correct | amended at once. In addition, it is possible to prevent the initial error and the secular change from continuing to remain without correcting the cycle set value corresponding to the temperature with low occurrence frequency such as extremely high temperature or low temperature.
請求項3に記載した手段によれば、当該検出温度に対応する周期設定値を補正する場合、他の温度に対応する周期設定値も合わせて補正する。すなわち、補正後の周期設定値と当該検出温度に対応した補正前の周期設定値との差分を演算し、記憶手段に記憶されている各温度に対応した周期設定値に、上記差分を各温度に応じて重み付けして得た値を加算する。これにより、温度ごとに異なる初期の誤差特性や経年変化の特性まで考慮したより適切な補正ができる。
According to the means described in
請求項4に記載した手段によれば、補正により得られる周期設定値が所定回数だけ連続して一致した場合に、当該補正後の周期設定値を温度検出手段により検出された温度に対応させて記憶手段に書き込む。これによりフィルタ作用が得られ、誤計測などによる誤周期設定値を排除でき、周期設定値を安定させることができる。 According to the means described in claim 4, when the cycle setting value obtained by the correction coincides continuously a predetermined number of times, the corrected cycle setting value is made to correspond to the temperature detected by the temperature detection unit. Write to storage means. Thereby, a filter action is obtained, an erroneous cycle set value due to erroneous measurement or the like can be eliminated, and the cycle set value can be stabilized.
請求項5に記載した手段によれば、所定回数だけ連続して一致しない場合であっても、補正により得られる周期設定値が所定回数だけ連続して単調に増加または減少した場合に、当該補正後の周期設定値を温度検出手段により検出された温度に対応させて記憶手段に書き込む。これにより、温度変化により周期設定値が一定せず絶えず単調に変化する場合に、周期設定値の補正がいつまでも反映されない事態を防止することができる。
According to the means described in
請求項6ないし10に記載した手段は、それぞれ請求項1ないし5に記載した手段に対し、CR発振器周辺の検出温度のみならずCR発振器に供給される電源電圧にも対応させて周期設定値の記憶、読み出し、補正およびクロック周期の設定を実行する。すなわち、CR発振器に供給される電源の電圧を検出する電圧検出手段を備え、温度検出手段により検出された温度および電圧検出手段により検出された電圧に対応した周期設定値を記憶手段から読み出して発振回路に与える。補正手段は、受信手段で受信する正確な通信レートを持つデータ信号の単位ビット長を基準として周期設定値を補正し、補正後の周期設定値を検出温度および検出電圧に対応させて記憶手段に書き込む。これらの手段によれば、CR発振器周辺の温度およびCR発振器の電源電圧における周期設定値を次々に学習し、温度変動のみならず電源電圧変動が生じても、正確な周期を持つクロック信号を生成可能となる。
The means described in claims 6 to 10 is different from the means described in
請求項11に記載した手段によれば、受信手段で受信するデータ信号に含まれる所定の同期信号を検出したときに単位ビット長を計測するので、例えばマスタからの正確な規定通信レートを持つデータ信号を受信するごとに周期設定値を補正することができる。
According to the means described in
請求項12に記載した手段によれば、補正前後の周期設定値の差分を演算し、その差分が所定の制限値以下である場合に限り周期設定値の補正および補正後の周期設定値の記憶手段への書き込みを実行する。想定される温度変動(および電圧変動)の最大幅に対応した周期設定値の変化幅を制限値として設定すれば、それを超える誤った補正を回避することができる。
According to the means described in
請求項13に記載した手段によれば、マイクロコンピュータが上述した何れかのデータ受信装置を備え、そのデータ受信装置でデータ信号を受信することにより、CR発振回路で正確な周波数を持つクロック信号を生成してシステムクロック信号とすることができる。本手段によれば、発振子を搭載する必要がないためコストを下げることができる。また、データ信号を受信するごとに、クロック信号の周期を決定する周期設定値を学習(補正)し続けるので、温度変化、電圧変化または経年変化が生じても正確な周波数を持つクロック信号を生成できる。
According to the means described in
請求項14に記載した手段によれば、データ受信装置の補正手段が周期設定値の補正演算を実行することに替えて、上位コンピュータが補正演算を実行する。そのため、マイクロコンピュータは、データ信号を送信するデータ送信装置を備え、データ受信装置の計測手段によるクロック信号の計数値と記憶手段から読み出された周期設定値とをデータ送信装置により上位コンピュータに送信する。上位コンピュータは、クロック信号の計数値とデータ信号の単位ビット長に対する基準周期に基づく基準計数値とに基づいて周期設定値を補正し、マイクロコンピュータに送信する。本手段によれば、発振子レスであって小規模で安価なマイクロコンピュータの処理負担を軽減でき、演算処理能力の不足を補うことができる。
According to the means described in
(第1の実施形態)
以下、本発明の第1の実施形態について図1ないし図4を参照しながら説明する。
図1は、車両のECU(Electronic Control Unit)に搭載されているワンチップマイクロコンピュータの電気的構成を示す機能ブロック図である。このマイコン1は、CPU2、EEPROM3(記憶手段に相当)、RAM4、ROM5、A/D変換器6、例えばUART(Universal Asynchronous Receiver/Transmitter)などの通信回路7(受信手段に相当)、CR発振回路8および温度検出回路9(温度検出手段に相当)を備えている。温度検出回路9以外の回路は、アドレスバス10およびデータバス11を介してCPU2に接続されている。CPU2は、本発明でいうクロック周期設定手段、計測手段および補正手段に相当する。これらの各回路には、電源線14とグランド15を通して電源(電圧Vcc)が供給されている。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a functional block diagram showing an electrical configuration of a one-chip microcomputer mounted on an ECU (Electronic Control Unit) of a vehicle. The
CR発振回路8は、CR発振器12およびPLL(Phase Locked Loop)回路13から構成されている。PLL回路13は、CR発振器12の発振信号を逓倍数設定値FMULRに基づいて逓倍し、さらに分周比設定値FDIVRに基づいて分周してクロック信号CLKを生成し出力する。逓倍数設定値FMULRおよび分周比設定値FDIVRは、本発明でいう周期設定値に相当し、それぞれCR発振回路8内のレジスタに格納される。
The
クロック信号CLKは、マイコン1のシステムクロックとしてCPU2、A/D変換器6、通信回路7などに供給される。以下では周期設定値として分周比設定値FDIVRを一定とし逓倍数設定値FMULRを補正する場合について説明するが、逓倍数設定値FMULRを一定とし分周比設定値FDIVRを補正し、或いは逓倍数設定値FMULRと分周比設定値FDIVRの両者を補正してもよい。
The clock signal CLK is supplied to the
温度検出回路9は、電源線14とグランド15との間に接続された抵抗16とダイオード17〜19との直列回路により構成されている。抵抗16とダイオード17との接続ノードは、A/D変換器6の入力端子に接続されている。周知のようにダイオードの順方向電圧Vfは、−2.0〜−2.5mV/℃の温度特性を有している。A/D変換器6を介してダイオード17〜19の順方向電圧3・Vfを入力することにより、A/D変換値に対応して温度を検出することができる。この温度検出回路9は、CR発振器12(またはその周辺)の温度を検出することができるように、半導体基板上でCR発振器12に近接して形成されている。
The
通信回路7は、車載LANのシリアル通信プロトコルであるLINのスレーブノードとして機能する。通信回路7がフレーム(データ信号に相当)を受信するときの各ビットの取込タイミングおよび通信回路7が送信するときの通信レート(ボーレート)は、CR発振回路8から出力されるクロック信号CLKの周波数に基づいて定まるため、クロック信号CLKの周波数(周期)が変動すると送受信に支障が生じる。
The communication circuit 7 functions as a slave node of LIN, which is a serial communication protocol for in-vehicle LAN. The timing at which each bit is captured when the communication circuit 7 receives a frame (corresponding to a data signal) and the communication rate (baud rate) when the communication circuit 7 transmits the clock signal CLK output from the
LIN仕様2.0によれば、マスタノードの発振周波数の許容誤差(Oscillator Tolerance)は±0.5%未満であり、スレーブノードの発振周波数の許容誤差は±1.5%未満である。また、スレーブノードにおける同期前の規定周波数からのずれは±14%未満である。何らの補正手段も持たない一般のCR発振回路を用いて、例えば−40℃から+125℃の広範な温度範囲で発振周波数を±1.5%未満の変動に保つことは極めて難しい。 According to LIN specification 2.0, the master node oscillation frequency tolerance (Oscillator Tolerance) is less than ± 0.5%, and the slave node oscillation frequency tolerance is less than ± 1.5%. The deviation from the specified frequency before synchronization in the slave node is less than ± 14%. It is extremely difficult to keep the oscillation frequency within a fluctuation of less than ± 1.5% in a wide temperature range of, for example, −40 ° C. to + 125 ° C. by using a general CR oscillation circuit having no correction means.
そこで、本実施形態では、CPU2は、EEPROM3に逓倍数設定値FMULRと検出温度T(実際にはA/D変換値)とを対応付けて記憶し、EEPROM3からその時々の検出温度T(A/D変換値)に対応した逓倍数設定値FMULRを読み出してそれをCR発振回路8内のレジスタに与え、PLL回路13の逓倍数を制御する。上述したように、本実施形態では分周比設定値FDIVRを一定としている。
Therefore, in the present embodiment, the
さらに、CPU2は、マスタノードから送信されるフレームのうちシンクバイトフィールド(Synch Byte Field)を受信するごとに、クロック信号CLKを計数することにより1ビット時間(単位ビット長に相当)を計測し、その計数値XAと1ビット時間に対する基準周期に基づく基準計数値XB(=1ビット時間/基準周期)とに基づいて、検出温度Tに対応する逓倍数設定値FMULRを補正し、当該補正後の逓倍数設定値FMULRを当該検出温度T(A/D変換値)に対応させてEEPROM3に書き込む。
Further, every time the
以下、本実施形態の作用を図2ないし図4を参照しながら具体的に説明する。
まず、マイコン1を製品として出荷する前の検査工程で、逓倍数設定値FMULRの初期値を設定しEEPROM3に書き込む。すなわち、マイコン1を所定の温度Tの環境下で動作させ、クロック信号CLKが規定周波数(例えば4MHz)に一致するように逓倍数設定値FMULRを決定する。そして、A/D変換器6が出力するA/D変換値(検出温度Tと等価)と上記決定した逓倍数設定値FMULRとを対応させてEEPROM3に書き込む。これを複数の温度例えば−40℃、25℃、125℃の3点で実行する。
Hereinafter, the operation of the present embodiment will be described in detail with reference to FIGS.
First, in an inspection process before the
また、製品ごとに逓倍数設定値FMULRを決定して書き込むことに替えて、設計値または当該製品ロットの代表値等に基づいて逓倍数設定値FMULRを算出し、それをA/D変換値(検出温度T)に対応させてEEPROM3に書き込んでもよい。後述するように、マイコン1は、逓倍数設定値FMULRに多少の誤差が存在しても、その後の学習処理により誤差をキャンセルすることができる。
Further, instead of determining and writing the multiplication number setting value FMULR for each product, the multiplication number setting value FMULR is calculated based on the design value or the representative value of the product lot, and the A / D conversion value ( It may be written in the
図2は、製品出荷後のマイコン1が実行するCR発振周期の補正処理を示すフローチャートである。CPU2は、ステップP1においてA/D変換器6からA/D変換値を入力する。このA/D変換値は、CR発振器12の温度Tに対応している。続いてステップP2に移行し、EEPROM3からA/D変換値(つまり検出温度T)に対応した逓倍数設定値FMULRを読み出し、ステップP3でそれをCR発振回路8内のレジスタに設定する。
FIG. 2 is a flowchart showing a CR oscillation cycle correction process executed by the
A/D変換値に対応した逓倍数設定値FMULRが存在しない場合には、例えば当該A/D変換値を挟み込むように存在する2つのA/D変換値に対応した逓倍数設定値FMULRに基づいて一次関数で補間して逓倍数設定値FMULRを求めればよい。PLL回路13は、レジスタFMULRの値に従って原発振信号を逓倍し、その後一定の分周比設定値FDIVRに従って分周してクロック信号CLKを出力する。
When there is no multiplication number setting value FMULR corresponding to the A / D conversion value, for example, based on the multiplication number setting value FMULR corresponding to two A / D conversion values existing so as to sandwich the A / D conversion value. The multiplication value set value FMULR may be obtained by interpolation with a linear function. The
CPU2は、ステップP4においてLINのマスタノードから送信された同期信号を検出したか否かを判断する。図3は、LINのフレーム構成を示している。マスタノードから送信されたフレームのヘッダは、新たなフレームの開始を示す13ビット長のブレークフィールド、0x55のデータ値を持つシンクバイトフィールドおよび識別フィールドから構成されている。通信回路7がブレークフィールドとシンクバイトフィールドを受信した時点でそれがヘッダであることを認識できる。
The
通信回路7が同期信号であるシンクバイトフィールドを含むヘッダを受信していない期間は、ステップP1ないしP4の処理を繰り返し実行する。この期間は、逓倍数設定値FMULRの補正がなされず、EEPROM3に既に記憶されている逓倍数設定値FMULRを用いてクロック信号CLKが生成される。
During a period in which the communication circuit 7 does not receive a header including a sync byte field that is a synchronization signal, the processes of steps P1 to P4 are repeatedly executed. During this period, the multiplication number setting value FMULR is not corrected, and the clock signal CLK is generated using the multiplication number setting value FMULR already stored in the
一方、通信回路7がシンクバイトフィールドを受信するとステップP5に移行し、1ビット長を計測する。具体的には、シンクバイトフィールドのスタートビットと第7ビットの両ダウンエッジの間の時間8Tbitをクロック信号CLKを計数することにより計測し、その計数値を8で除すことにより1ビット時間の計数値XAを得る。例えば、マスタノードが9600bpsの正確な通信レートで送信した場合、クロック信号CLKが正確に4MHzであれば計数値は416となる。この1ビット時間(1/9600=104.2μs)に対する基準周期(1/4MHz=0.25μs)に基づく計数値を基準計数値XBとする。
On the other hand, when the communication circuit 7 receives the sync byte field, the process proceeds to step P5 to measure the 1-bit length. Specifically, the
CPU2は、ステップP6に移行し、以下の(1)式により補正後の逓倍数設定値FMULRを演算し、それをPLL回路13のレジスタに設定する。設定後、PLL回路13は補正後の新たな逓倍数設定値FMULRに従って原発振信号を逓倍する。
補正後のFMULR=現在のFMULR×XB/XA …(1)
The
FMULR after correction = Current FMULLR × XB / XA (1)
その後、ステップP7に移行し、補正後の逓倍数設定値FMULRをA/D変換値(検出温度T)に対応させてEEPROM3に書き込む。当該検出温度Tに対応する逓倍数設定値FMULRが既にEEPROM3に書き込まれている場合には周期設定値の更新(上書き)となり、書き込まれていない場合(補正前の逓倍数設定値FMULRを補間等により求めた場合)には、逓倍数設定値FMULRを新たにEEPROM3に書き込むことになる。以上のステップP1〜P7の処理は、繰り返し実行される。
Thereafter, the process proceeds to step P7, and the corrected multiplication number setting value FMULR is written in the
図4は、温度変化に対するCR発振器12の発振周波数(黒丸)と逓倍数設定値FMULR(白丸)の特性を示している。(a)は補正前の特性で、(b)は検出温度TでCR発振器12の発振周波数がずれたと仮定した場合の逓倍数設定値FMULRの補正方法を示している。ただし、実際には発振周波数が検出温度Tだけで大きくずれることはなく、(b)に示す場合には少なくとも検出温度Tに近い温度範囲においても発振周波数がずれている。
FIG. 4 shows the characteristics of the oscillation frequency (black circle) and multiplication factor set value FMULR (white circle) of the
CR発振器12は、一般に温度上昇とともに発振周波数が低下する特性を持っているため、逓倍数設定値FMULRは温度上昇とともに増加する特性となる。CPU2は、同期信号の検出を条件にステップP5〜P7を実行するごとに、そのときの検出温度Tに対応した逓倍数設定値FMULRを補正する。図4(b)に示す場合、CR発振器12の発振周波数ひいてはクロック信号CLKの周波数が低下したため計数値XAが減少し、当該検出温度Tにおける逓倍数設定値FMULRを増加させるような補正がなされている。
Since the
以上説明したように、本実施形態によればCR発振器12の温度を示すA/D変換値とCR発振回路8の逓倍数を決める逓倍数設定値FMULRとを対応付けてEEPROM3に記憶する。そして、マイコン1の動作中は、A/D変換値(検出温度T)に応じた逓倍数設定値FMULRを読み出してCR発振回路8のレジスタに設定するので、温度変化によりCR発振器12の発振周波数がずれてもクロック信号CLKの周波数を一定化することができる。
As described above, according to the present embodiment, the A / D conversion value indicating the temperature of the
CPU2は、マスタノードから送られてくるフレームの同期信号を受信するごとに、クロック信号CLKを計数して1ビット長を計測する。LINでは、マスタノードから正確な通信レートでフレームが送信されてくるので、CPU2は、上記1ビット長のクロック信号CLKによる計数値XAと正規の1ビット時間を基準周期で除して得られる基準計数値XBとに基づいて逓倍数設定値FMULRを補正し、補正後の逓倍数設定値FMULRを検出温度Tに対応させてEEPROM3に書き込む。
Each time the
これにより、マスタノードからの同期信号を受信するごとに、その時のCR発振器12の温度に対応した逓倍数設定値FMULRを最新の値に更新できる。また、当該温度に対応した逓倍数設定値FMULRが記憶されていない場合には、新たに生成して記憶することができる。つまり、マイコン1は、CR発振回路8の温度に対応した逓倍数設定値FMULRを次々に学習することができる。マイコン1は、LINの通信波形の波形を用いて補正を行うので、別に基準信号を準備する必要がない。
Thereby, every time a synchronization signal is received from the master node, the multiplication number setting value FMULR corresponding to the temperature of the
逓倍数設定値FMULRの初期値の数が少ない場合や初期値に誤差が存在する場合であっても、正確な規定通信レートを持つ同期信号を受信するに従って、温度補正に用いる逓倍数設定値FMULRを拡充することができる。また、CR発振器12に経年変化が生じた場合でも、逓倍数設定値FMULRを補正してクロック信号CLKの周波数を正確な値に一定に保つことができる。さらに、長時間に亘りマスタノードからの同期信号を受信することがなくても、その後受信すれば正しく補正することができる。これにより、ビットずれによる通信エラーを生ずることなくデータの送受信を行うことができる。
Even when the number of initial values of the multiplier setting value FMULR is small or when there is an error in the initial value, the multiplier setting value FMULR used for temperature correction is received as a synchronization signal having an accurate prescribed communication rate is received. Can be expanded. Further, even when the
さらに、温度変化または経年変化にかかわらずクロック信号CLKの周波数が一定となるため、クロック信号CLKをシステムクロックとして用いることができる。その結果、発振子が不要となり、発振子を用いてシステムクロックを生成していた従来のマイコンに比べ低コストとなる。 Further, since the frequency of the clock signal CLK is constant regardless of temperature change or aging change, the clock signal CLK can be used as a system clock. As a result, an oscillator is not required, and the cost is lower than that of a conventional microcomputer that uses the oscillator to generate a system clock.
(第2の実施形態)
次に、本発明の第2の実施形態について図5および図6を参照しながら説明する。
本実施形態は、第1の実施形態に対しEEPROM3に記憶されている逓倍数設定値FMULRの補正方法が異なる。図5は、CR発振周期の補正処理を示すフローチャートであり、図2と同一の処理ステップには同一のステップ番号を付している。ステップP11では、次の(2)式により、補正後の逓倍数設定値FMULRと現在の(補正前の)逓倍数設定値FMULRとの差分ΔFMULRを求める。そして、EEPROM3に記憶されている全ての逓倍数設定値FMULRに対しそれぞれ差分ΔFMULRを加算する。
ΔFMULR=補正後のFMULR−現在のFMULR …(2)
(Second Embodiment)
Next, a second embodiment of the present invention will be described with reference to FIGS.
This embodiment is different from the first embodiment in a method of correcting the multiplication number setting value FMULR stored in the
ΔFMULR = FMULR after correction−Current FMULR (2)
図6は、図4と同様に温度変動に対するCR発振器12の発振周波数(黒丸)と逓倍数設定値FMULR(白丸)の変化特性を示している。図6(b)に示すように、1つの検出温度Tにおける補正量ΔFMULRを、EEPROM3に記憶されている各温度に対応する全ての逓倍数設定値FMULRに一様に反映させている。この補正方法によれば、CR発振器12に経年変化が生じた場合に、全ての逓倍数設定値FMULRを一度に補正することができる。また、極端に高い温度や低い温度などのように発生頻度が少ない温度に対応した逓倍数設定値FMULRが補正されずに放置される事態を防ぐことができる。
FIG. 6 shows the change characteristics of the oscillation frequency (black circle) and multiplication factor set value FMULR (white circle) of the
なお、上述した補正方法に替えて、EEPROM3に記憶されている全ての逓倍数設定値FMULRに対し、それぞれ差分ΔFMULRを各温度に応じて重み付けして得た値を加算してもよい。経年変化による発振周波数のずれが温度に依存する場合には、そのずれの傾向に合わせた重み付けをすることにより一層正確な補正を行うことができる。
Instead of the correction method described above, a value obtained by weighting the difference ΔFMULR according to each temperature may be added to all multiplication number setting values FMULR stored in the
(第3の実施形態)
次に、本発明の第3の実施形態について図7を参照しながら説明する。
本実施形態も、第1の実施形態に対しEEPROM3に記憶されている逓倍数設定値FMULRの補正方法が異なる。図7は、CR発振周期の補正処理を示すフローチャートであり、図2と同一の処理ステップには同一のステップ番号を付している。
(Third embodiment)
Next, a third embodiment of the present invention will be described with reference to FIG.
This embodiment also differs from the first embodiment in the correction method of the multiplication number setting value FMULR stored in the
CPU2は、ステップP21において、(2)式により算出した差分ΔFMULRが3回連続して一致したか否かを判断する。ここで、一致している場合(YES)にはステップP7に移行し、補正後の逓倍数設定値FMULRをA/D変換値(検出温度T)に対応させてEEPROM3に書き込む。ただし、差分ΔFMULRが0の場合であって、既にEEPROM3に当該検出温度Tに対応した逓倍数設定値FMULRが書き込まれている場合には、書き込みは不要である。
In step P21, the
一方、一致していない(NO)場合にはステップP22に移行し、補正後の逓倍数設定値FMULRが所定回数(例えば3回)連続して単調に増加または単調に減少しているか否かを判断する。単調に増減変化している場合(YES)にはステップP7に移行し、単調に変化していない場合(NO)にはステップP1に戻る。 On the other hand, if they do not match (NO), the process proceeds to step P22, and it is determined whether or not the corrected multiplication number setting value FMULR has increased or decreased monotonously continuously for a predetermined number of times (for example, 3 times). to decide. If the change is monotonous (YES), the process proceeds to Step P7. If the change is not monotonous (NO), the process returns to Step P1.
ステップP21を設けることによりフィルタ作用が得られ、計測誤差などによる逓倍数設定値FMULRの誤書き換えを防止できる。また、ステップP22を設けることにより、急激な温度変化が生じた場合に上記フィルタ作用により逓倍数設定値FMULRの書き換えが妨げられることまたは遅れることを防止できる。 By providing step P21, a filter action is obtained, and erroneous rewriting of the multiplication number set value FMULR due to a measurement error or the like can be prevented. In addition, by providing Step P22, it is possible to prevent rewriting of the multiplication factor set value FMULR from being hindered or delayed by the filter action when a sudden temperature change occurs.
(第4の実施形態)
次に、本発明の第4の実施形態について図8を参照しながら説明する。
図8は、CR発振周期の補正処理を示すフローチャートである。図2と同一の処理ステップには同一のステップ番号を付し、説明を省略する。ステップP6で補正後の逓倍数設定値FMULRを演算した後ステップP31に移行し、(2)式を用いて補正後の逓倍数設定値FMULRと現在の(補正前の)逓倍数設定値FMULRとの差分ΔFMULRを求め、その絶対値|ΔFMULR|を得る。
(Fourth embodiment)
Next, a fourth embodiment of the present invention will be described with reference to FIG.
FIG. 8 is a flowchart showing a CR oscillation cycle correction process. The same processing steps as those in FIG. 2 are denoted by the same step numbers, and description thereof is omitted. After calculating the corrected multiplication number setting value FMULR in step P6, the process proceeds to step P31, and using the equation (2), the corrected multiplication number setting value FMULR and the current (before correction) multiplication number setting value FMULR are calculated. Difference ΔFMULR is obtained, and its absolute value | ΔFMULR | is obtained.
続いて、ステップP32において、差分|ΔFMULR|と制限値Dmとを比較する。差分|ΔFMULR|が制限値Dm以下である場合にはステップP7に移行し、補正後の逓倍数設定値FMULRをEEPROM3に書き込む。一方、差分|ΔFMULR|が制限値Dmより大きい場合には、その補正後の逓倍数設定値FMULRを破棄し(PLL回路13のレジスタを補正前の値に戻す)、ステップP7を飛ばしてステップP1に戻る。想定される温度変動の最大幅に対応した逓倍数設定値FMULRの変化幅を制限値Dmとして設定すれば、それを超える誤った補正を回避することができる。
Subsequently, in step P32, the difference | ΔFMULR | is compared with the limit value Dm. If the difference | ΔFMULR | is equal to or less than the limit value Dm, the process proceeds to step P7, and the corrected multiplication number setting value FMULR is written in the
(第5の実施形態)
次に、本発明の第5の実施形態について図9および図10を参照しながら説明する。
本実施形態は、第1の実施形態の構成を基にして、さらにCR発振回路8(CR発振器12)に印加される電源電圧Vccの変化によりCR発振器12の発振周波数がずれても、クロック信号CLKの周波数を一定化するものである。第1の実施形態と同様に、分周比設定値FDIVRを一定とし逓倍数設定値FMULRを補正する場合について説明する。
(Fifth embodiment)
Next, a fifth embodiment of the present invention will be described with reference to FIGS.
This embodiment is based on the configuration of the first embodiment, and even if the oscillation frequency of the
図9は、マイコンの電気的構成を示す機能ブロック図であり、図1と同一構成部分には同一符号を付している。マイコン21は、分圧などにより電源電圧Vccを検出する電圧検出回路22(電圧検出手段に相当)を備えており、その検出した電圧はA/D変換器6に入力されている。
FIG. 9 is a functional block diagram showing the electrical configuration of the microcomputer. The same components as those in FIG. The
CPU2は、EEPROM3に逓倍数設定値FMULRと検出温度T(実際にはA/D変換値)および検出電圧Vcc(実際にはA/D変換値)とを対応付けて記憶し、EEPROM3からその時々の検出温度T(A/D変換値)および検出電圧Vcc(A/D変換値)に対応した逓倍数設定値FMULRを読み出してそれをCR発振回路8内のレジスタに与え、PLL回路13の逓倍数を制御する。
The
さらに、CPU2は、マスタノードから送信されるフレームのうちシンクバイトフィールドを受信するごとに、検出温度Tおよび検出電圧Vccに対応する逓倍数設定値FMULRを補正し、当該補正後の逓倍数設定値FMULRを当該検出温度T(A/D変換値)および検出電圧Vcc(A/D変換値)に対応させてEEPROM3に書き込む。
Further, every time the
マイコン21を製品として出荷する前の検査工程では、逓倍数設定値FMULRの初期値を設定しEEPROM3に書き込む。すなわち、マイコン1を所定の温度Tおよび電源電圧Vccの環境下で動作させ、クロック信号CLKが規定周波数(例えば4MHz)に一致するように逓倍数設定値FMULRを決定する。そして、A/D変換器6が出力するA/D変換値(検出温度T、検出電圧Vccと等価)と上記決定した逓倍数設定値FMULRとを対応させてEEPROM3に書き込む。これを複数の温度(例えば−40℃、25℃、125℃)および複数の電圧(例えば4.95V、5.00V、5.05V)で実行し、組み合わせとして9個の逓倍数設定値FMULRを得る。なお、設計値または代表値等に基づいて逓倍数設定値FMULRを決定してもよい。
In the inspection process before the
図10は、マイコン21が実行するCR発振周期の補正処理を示すフローチャートであり、図2に示す処理と同一の処理には同一のステップ番号を付している。CPU2は、ステップP41において、CR発振器12の温度Tに対応するA/D変換値と、CR発振器12に供給される電源電圧Vccに対応するA/D変換値とを入力する。続いてステップP42に移行し、EEPROM3からA/D変換値(つまり検出温度Tと検出電圧Vcc)に対応した逓倍数設定値FMULRを読み出し、ステップP3でそれをCR発振回路8内のレジスタに設定する。その後、既述したステップP3〜P6を経て補正後の逓倍数設定値FMULRを演算し、ステップP47で補正後の逓倍数設定値FMULRをA/D変換値(検出温度T、検出電圧Vcc)に対応させてEEPROM3に書き込む。
FIG. 10 is a flowchart showing a CR oscillation cycle correction process executed by the
本実施形態によれば、第1の実施形態と同様の効果が得られる他、温度変化のみならず電源電圧変化によりCR発振器12の発振周波数がずれても、クロック信号CLKの周波数を一定化することができる。
According to the present embodiment, the same effect as that of the first embodiment can be obtained, and the frequency of the clock signal CLK is made constant even when the oscillation frequency of the
(第6の実施形態)
次に、本発明の第6の実施形態について図11および図12を参照しながら説明する。
図11は、車両用アクチュエータの制御システムの構成を示している。アクチュエータ31は、モータ32と該モータ32を制御するマイコン33とを搭載している。上位に位置するECU34(上位コンピュータに相当)および複数(図11では3個)のアクチュエータ31は、バス35により相互接続されてLINによる通信が可能となっている。ここで、ECU34がマスタノードであり、アクチュエータ31がスレーブノードである。
(Sixth embodiment)
Next, a sixth embodiment of the present invention will be described with reference to FIGS.
FIG. 11 shows the configuration of a control system for a vehicle actuator. The
アクチュエータ31のマイコン33は、上述したマイコン1またはマイコン21と同様の電気的構成を備えているが、CPU2が実行する処理内容が一部異なっている。以下では、マイコン1と同様の電気的構成を備えているものについて説明する。なお、通信回路7は、データの送信も可能であって、本発明でいう受信手段およびデータ送信装置に相当する。
The
図12は、CR発振周期の補正処理を示すフローチャートである。CPU2は、ステップP5で1ビット時間の計数値XAを得た後、自ら逓倍数設定値FMULRの補正演算をするのではなく、ステップP51で現在の(補正前の)逓倍数設定値FMULR、計数値XAおよびA/D変換値(検出温度T)をECU34に送信する。
FIG. 12 is a flowchart showing a CR oscillation cycle correction process. After obtaining the count value XA for one bit time in step P5, the
ECU34は、アクチュエータ31からこれらのデータを受信すると、アクチュエータ31のマイコン33に代わって(1)式を用いて逓倍数設定値FMULRの補正演算をし、その演算した値と書き換えるべきデータ(記憶すべきEEPROM3のアドレス)とを含む書き換え指令をアクチュエータ31に送信する。1ビット時間の計数値XAは、ECU34が自ら有している。マイコン33は、ステップP52で書き換え指令を受信し、受信した補正後の逓倍数設定値FMULRをPLL回路13のレジスタに設定する。続くステップP7で、受信した補正後の逓倍数設定値FMULRをA/D変換値(検出温度T)に対応させてEEPROM3に書き込む。
When the
アクチュエータ31のマイコン33は、発振子レスとすることで小規模で安価な構成とした点に特に有用性があるが、その分だけ処理能力を切り詰めた設計となっている。本実施形態によれば、マイコン33の処理負担を軽減することができるので、マイコン33の持つ演算処理能力の不足を補うことができる。
The
(その他の実施形態)
なお、本発明は上記し且つ図面に示す各実施形態に限定されるものではなく、例えば以下のように変形または拡張が可能である。
第5の実施形態に対しても第2の実施形態と同様の変形が可能である。すなわち、CPU2は、(2)式により差分ΔFMULRを求め、EEPROM3に記憶されている各温度および各電源電圧に対応した全ての逓倍数設定値FMULRに対しそれぞれ差分ΔFMULRを加算してもよい。また、EEPROM3に記憶されている各温度および各電源電圧に対応した全ての逓倍数設定値FMULRに対し、それぞれ差分ΔFMULRを各温度および電源電圧に応じて重み付けして得た値を加算してもよい。
(Other embodiments)
The present invention is not limited to the embodiments described above and shown in the drawings, and can be modified or expanded as follows, for example.
The fifth embodiment can be modified similarly to the second embodiment. That is, the
第5の実施形態に対しても第3の実施形態と同様の変形が可能である。すなわち、CPU2は、差分ΔFMULRが所定回数だけ連続して一致した場合に、補正後の逓倍数設定値FMULRをA/D変換値(検出温度Tと検出電圧Vcc)に対応させてEEPROM3に書き込むようにしてもよい。一致していない場合でも、補正後の逓倍数設定値FMULRが所定回数だけ連続して単調に増加または単調に減少している場合には、補正後の逓倍数設定値FMULRをA/D変換値(検出温度Tと検出電圧Vcc)に対応させてEEPROM3に書き込むようにしてもよい。
The fifth embodiment can be modified similarly to the third embodiment. That is, when the difference ΔFMULR continuously matches a predetermined number of times, the
第5の実施形態に対して、第2の実施形態と同様の変形および第3の実施形態と同様の変形を同時に施してもよい。
発振回路と、CR発振器に供給される電源の電圧を検出する電圧検出手段と、周期設定値を検出電圧に関連付けて記憶する記憶手段と、検出電圧に対応した周期設定値を記憶手段から読み出して発振回路に与えるクロック周期設定手段と、受信手段と、受信するデータ信号の単位ビット長をクロック信号を計数することにより計測する計測手段と、計数値と基準計数値とに基づいて検出電圧に対応した周期設定値を補正するとともに、当該補正後の周期設定値を当該検出電圧に対応させて記憶手段に書き込む補正手段とを備えた構成としてもよい。
The fifth embodiment may be subjected to the same modification as the second embodiment and the same modification as the third embodiment at the same time.
An oscillation circuit; voltage detection means for detecting the voltage of a power source supplied to the CR oscillator; storage means for storing the cycle setting value in association with the detection voltage; and reading the cycle setting value corresponding to the detection voltage from the storage means. Corresponding to the detection voltage based on the count value and the reference count value, the clock cycle setting means to be given to the oscillation circuit, the reception means, the measurement means for measuring the unit bit length of the received data signal by counting the clock signal The cycle setting value may be corrected, and the correction unit may be configured to write the corrected cycle setting value to the storage unit in association with the detected voltage.
PLL回路13のレジスタに逓倍数設定値FMULRおよび分周比設定値FDIVRの初期値を設定しておけば、EEPROM3への初期値の書き込みを不要とすることができる。この場合も、マイコン1がマスタノードからの同期信号を受信するごとに、その時のCR発振器12の温度に対応した逓倍数設定値FMULRが新たなデータとしてEEPROM3に記憶される。
If the initial values of the multiplication number setting value FMULR and the frequency division ratio setting value FDIVR are set in the register of the
逓倍数設定値FMULRと分周比設定値FDIVRとを用いてクロック信号CLKの周波数を一定化する場合には、分周比設定値FDIVRも併せて検出温度或いは検出温度と電源電圧に対応させてEEPROM3に書き込めばよい。
受信手段はLINを用いて送受信する通信回路7に限られず、他の通信ネットワーク、通信形式でデータ信号を受信するものであってもよい。
When the frequency of the clock signal CLK is made constant using the multiplication number setting value FMULR and the division ratio setting value FDIVR, the frequency division ratio setting value FDIVR is also associated with the detected temperature or the detected temperature and the power supply voltage. What is necessary is just to write in EEPROM3.
The receiving means is not limited to the communication circuit 7 that transmits and receives using LIN, and may receive data signals in other communication networks and communication formats.
シンクバイトフィールドのスタートビットと第7ビットの両ダウンエッジの間の時間8Tbitを計数して計数値XAとし、この8Tbitに対する基準周期に基づく計数値を基準計数値XBとしてもよい。8Tbitを計測することは、1ビット時間Tbitを計測することと実質的に等価である。本発明でいう単位ビット長には、1ビット長に限らず所定単位を構成するビット長(2ビット長、…、8ビット長、…)も含まれる。 The time 8Tbit between the start bit and the 7th bit down edge of the sync byte field may be counted as the count value XA, and the count value based on the reference period for the 8Tbit may be used as the reference count value XB. Measuring 8 Tbit is substantially equivalent to measuring 1 bit time Tbit. The unit bit length referred to in the present invention is not limited to 1 bit length but also includes bit lengths (2 bit length,..., 8 bit length,...) Constituting a predetermined unit.
第2の実施形態と第3の実施形態とを組み合わせることも可能である。例えば、差分ΔFMULRが3回連続して一致した場合に、EEPROM3に記憶されている全ての逓倍数設定値FMULRに対しそれぞれ差分ΔFMULRを加算する。補正後の逓倍数設定値FMULRが所定回数連続して単調に増加または減少している場合も同様である。
It is also possible to combine the second embodiment and the third embodiment. For example, when the difference ΔFMULR coincides three times in succession, the difference ΔFMULR is added to all the multiplication number setting values FMULR stored in the
抵抗16に替えて定電流回路を採用すると電源電圧Vccが変動する場合でも正確な温度検出が可能となる。温度検出手段は、温度検出回路9に限られず、温度を検出可能に構成される回路であればどのようなものであってもよい。
If a constant current circuit is employed instead of the
1、21、33はマイクロコンピュータ、2はCPU(クロック周期設定手段、計測手段、補正手段)、3はEEPROM(記憶手段)、7は通信回路(受信手段、データ送信装置)、8はCR発振回路、9は温度検出回路(温度検出手段)、12はCR発振器、22は電圧検出回路(電圧検出手段)、34はECU(上位コンピュータ)である。 1, 2 and 33 are microcomputers, 2 is a CPU (clock cycle setting means, measurement means, correction means), 3 is an EEPROM (storage means), 7 is a communication circuit (reception means, data transmission device), and 8 is a CR oscillation. A circuit, 9 is a temperature detection circuit (temperature detection means), 12 is a CR oscillator, 22 is a voltage detection circuit (voltage detection means), and 34 is an ECU (upper computer).
Claims (14)
前記CR発振器周辺の温度を検出する温度検出手段と、
前記周期設定値を前記温度検出手段により検出された温度に関連付けて記憶する記憶手段と、
前記温度検出手段により検出された温度に対応した周期設定値を前記記憶手段から読み出して前記発振回路に与えるクロック周期設定手段と、
前記クロック信号を用いてデータ信号を受信する受信手段と、
前記受信手段で受信するデータ信号の単位ビット長を前記クロック信号を計数することにより計測する計測手段と、
前記計測手段による前記クロック信号の計数値と前記単位ビット長に対する基準周期に基づく基準計数値とに基づいて、前記温度検出手段により検出された温度に対応した周期設定値を補正するとともに、当該補正後の周期設定値を当該検出温度に対応させて前記記憶手段に書き込む補正手段とを備えていることを特徴とするデータ受信装置。 An oscillation circuit that outputs a clock signal by multiplying or dividing the oscillation signal of the CR oscillator based on the period setting value;
Temperature detecting means for detecting the temperature around the CR oscillator;
Storage means for storing the cycle set value in association with the temperature detected by the temperature detection means;
A clock cycle setting unit that reads a cycle set value corresponding to the temperature detected by the temperature detection unit from the storage unit and supplies the cycle setting value to the oscillation circuit;
Receiving means for receiving a data signal using the clock signal;
Measuring means for measuring a unit bit length of a data signal received by the receiving means by counting the clock signal;
Based on the count value of the clock signal by the measuring means and the reference count value based on the reference period for the unit bit length, the period setting value corresponding to the temperature detected by the temperature detecting means is corrected, and the correction A data receiving apparatus comprising: a correction unit that writes a later cycle set value in the storage unit in association with the detected temperature.
前記CR発振器周辺の温度を検出する温度検出手段と、
前記CR発振器に供給される電源の電圧を検出する電圧検出手段と、
前記周期設定値を前記温度検出手段により検出された温度と前記電圧検出手段により検出された電圧とに関連付けて記憶する記憶手段と、
前記温度検出手段により検出された温度および前記電圧検出手段により検出された電圧に対応した周期設定値を前記記憶手段から読み出して前記発振回路に与えるクロック周期設定手段と、
前記クロック信号を用いてデータ信号を受信する受信手段と、
前記受信手段で受信するデータ信号の単位ビット長を前記クロック信号を計数することにより計測する計測手段と、
前記計測手段による前記クロック信号の計数値と前記単位ビット長に対する基準周期に基づく基準計数値とに基づいて、前記温度検出手段により検出された温度および前記電圧検出手段により検出された電圧に対応した周期設定値を補正するとともに、当該補正後の周期設定値を当該検出温度および検出電圧に対応させて前記記憶手段に書き込む補正手段とを備えていることを特徴とするデータ受信装置。 An oscillation circuit that outputs a clock signal by multiplying or dividing the oscillation signal of the CR oscillator based on the period setting value;
Temperature detecting means for detecting the temperature around the CR oscillator;
Voltage detecting means for detecting a voltage of a power source supplied to the CR oscillator;
Storage means for storing the cycle set value in association with the temperature detected by the temperature detection means and the voltage detected by the voltage detection means;
A clock cycle setting unit that reads out the cycle setting value corresponding to the temperature detected by the temperature detection unit and the voltage detected by the voltage detection unit from the storage unit and supplies the cycle setting value to the oscillation circuit;
Receiving means for receiving a data signal using the clock signal;
Measuring means for measuring a unit bit length of a data signal received by the receiving means by counting the clock signal;
Based on the count value of the clock signal by the measuring means and the reference count value based on the reference period for the unit bit length, the temperature detected by the temperature detecting means and the voltage detected by the voltage detecting means correspond to A data receiving apparatus comprising: a correcting unit that corrects the cycle set value and writes the corrected cycle set value in the storage unit in correspondence with the detected temperature and the detected voltage.
前記データ受信装置の補正手段が周期設定値の補正演算を実行することに替えて、前記データ受信装置の計測手段によるクロック信号の計数値と記憶手段から読み出された周期設定値とを前記データ送信装置により上位コンピュータに送信し、その上位コンピュータにおいて前記クロック信号の計数値とデータ信号の単位ビット長に対する基準周期に基づく基準計数値とに基づいて補正された周期設定値を受信し、この受信した補正後の周期設定値を前記発振回路に設定するとともに前記データ受信装置の記憶手段に書き込むことを特徴とする請求項13記載のマイクロコンピュータ。 A data transmission device for transmitting a data signal;
Instead of the correction means of the data receiving apparatus executing the correction operation of the period setting value, the count value of the clock signal by the measuring means of the data receiving apparatus and the period setting value read from the storage means are used as the data. Transmitted to a higher-level computer by a transmission device, and receives a cycle setting value corrected based on the count value of the clock signal and a reference count value based on a reference cycle with respect to a unit bit length of the data signal in the higher-level computer. 14. The microcomputer according to claim 13, wherein the corrected period setting value is set in the oscillation circuit and written to the storage means of the data receiving device.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008151618A JP4462371B2 (en) | 2007-10-12 | 2008-06-10 | Data receiving apparatus and microcomputer |
US12/285,581 US8099621B2 (en) | 2007-10-12 | 2008-10-09 | Data reception apparatus and microcomputer having the same |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007266843 | 2007-10-12 | ||
JP2008151618A JP4462371B2 (en) | 2007-10-12 | 2008-06-10 | Data receiving apparatus and microcomputer |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009111967A true JP2009111967A (en) | 2009-05-21 |
JP4462371B2 JP4462371B2 (en) | 2010-05-12 |
Family
ID=40779917
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008151618A Expired - Fee Related JP4462371B2 (en) | 2007-10-12 | 2008-06-10 | Data receiving apparatus and microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4462371B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012199622A (en) * | 2011-03-18 | 2012-10-18 | Denso Corp | Oscillation frequency correction apparatus |
JP2016122901A (en) * | 2014-12-24 | 2016-07-07 | 国立大学法人東北大学 | Receiving data restoration device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11340820A (en) * | 1998-05-26 | 1999-12-10 | Alps Electric Co Ltd | Reference oscillating frequency setting system for data communication equipment |
JP2006121171A (en) * | 2004-10-19 | 2006-05-11 | Matsushita Electric Ind Co Ltd | Clock supplying device with frequency correction function |
JP2006270917A (en) * | 2005-02-28 | 2006-10-05 | Denso Corp | Microcomputer |
JP2007194711A (en) * | 2006-01-17 | 2007-08-02 | Denso Corp | Microcomputer |
-
2008
- 2008-06-10 JP JP2008151618A patent/JP4462371B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11340820A (en) * | 1998-05-26 | 1999-12-10 | Alps Electric Co Ltd | Reference oscillating frequency setting system for data communication equipment |
JP2006121171A (en) * | 2004-10-19 | 2006-05-11 | Matsushita Electric Ind Co Ltd | Clock supplying device with frequency correction function |
JP2006270917A (en) * | 2005-02-28 | 2006-10-05 | Denso Corp | Microcomputer |
JP2007194711A (en) * | 2006-01-17 | 2007-08-02 | Denso Corp | Microcomputer |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012199622A (en) * | 2011-03-18 | 2012-10-18 | Denso Corp | Oscillation frequency correction apparatus |
JP2016122901A (en) * | 2014-12-24 | 2016-07-07 | 国立大学法人東北大学 | Receiving data restoration device |
Also Published As
Publication number | Publication date |
---|---|
JP4462371B2 (en) | 2010-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6832777B2 (en) | Semiconductor device | |
JP6140459B2 (en) | Sensor data transmission device | |
US7260657B2 (en) | Serial data transferring apparatus | |
US20110026572A1 (en) | Baud rate error detection circuit and baud rate error detection method | |
JP4462371B2 (en) | Data receiving apparatus and microcomputer | |
CN112448874A (en) | Vehicle-mounted communication device and time synchronization method thereof | |
EP3101552A1 (en) | System and method of realignment of read data by spi controller | |
US7356719B2 (en) | Microcomputer | |
KR101699047B1 (en) | Apparatus and Method for Amending Clock Error for Vehicle | |
JP4487937B2 (en) | Microcomputer | |
US8099621B2 (en) | Data reception apparatus and microcomputer having the same | |
CN116170008A (en) | Frequency compensation method, device, medium and clock system of oscillator | |
JP2016197807A (en) | Communication device and communication method | |
US11507525B2 (en) | High speed communication system | |
CN114500209A (en) | Frequency offset compensation method, system, electronic device and computer readable storage medium | |
JP5565349B2 (en) | Oscillation frequency correction device | |
US20060161367A1 (en) | System and method for calibrating the clock frequency of a clock generator unit over a data line | |
JP4127535B2 (en) | Oscillator frequency correction method | |
CN110233620B (en) | Self-correction algorithm applied to clock system of USB slave device | |
CN115688649B (en) | Time sequence early warning circuit system, method and digital integrated circuit | |
US11604483B2 (en) | Current generator circuit and diagnostic circuit | |
JP2017033055A (en) | Electronic control device, actuator, and sensor | |
CN102414567A (en) | Correction device, probability density function measuring device, jitter measuring device, jitter separating device, electronic device, correction method, program, and recording medium | |
JP6102785B2 (en) | Physical quantity sensor | |
JP2007333451A (en) | Method for updating corrected value of incremental encoder |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090819 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090915 |
|
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: 20100126 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100208 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130226 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4462371 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140226 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |