[go: up one dir, main page]

JP2896004B2 - Calendar iC correction method - Google Patents

Calendar iC correction method

Info

Publication number
JP2896004B2
JP2896004B2 JP4017222A JP1722292A JP2896004B2 JP 2896004 B2 JP2896004 B2 JP 2896004B2 JP 4017222 A JP4017222 A JP 4017222A JP 1722292 A JP1722292 A JP 1722292A JP 2896004 B2 JP2896004 B2 JP 2896004B2
Authority
JP
Japan
Prior art keywords
calendar
time
error
cpu
crystal
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.)
Expired - Fee Related
Application number
JP4017222A
Other languages
Japanese (ja)
Other versions
JPH05134779A (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.)
Efu Efu Shii Kk
Original Assignee
Efu Efu Shii Kk
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 Efu Efu Shii Kk filed Critical Efu Efu Shii Kk
Priority to JP4017222A priority Critical patent/JP2896004B2/en
Publication of JPH05134779A publication Critical patent/JPH05134779A/en
Application granted granted Critical
Publication of JP2896004B2 publication Critical patent/JP2896004B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electric Clocks (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、時刻を計時するカレ
ンダiCと、この時刻を読出すマイコンを備えたシステ
ムにおいて、カレンダiCの計時誤差を補正する方法に
関する。なお、以下各図において同一の符号は同一もし
くは相当部分を示す。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for correcting a time measurement error of a calendar iC in a system including a calendar iC for measuring time and a microcomputer for reading the time. In the drawings, the same reference numerals indicate the same or corresponding parts.

【0002】[0002]

【従来の技術】図3はこの種の従来のシステムの構成例
を示す。同図において2はカレンダiC、4はこのカレ
ンダiCにクロック周波数を与えるカレンダiC用水晶
発振子(なお以下水晶発振子を単に水晶とも略記す
る)、1はこのカレンダiC2の計時時刻を必要時に読
出すCPU(マイコンとも呼ぶ)である。
2. Description of the Related Art FIG. 3 shows an example of the configuration of a conventional system of this kind. In the figure, reference numeral 2 denotes a calendar iC, 4 denotes a crystal oscillator for a calendar iC which gives a clock frequency to the calendar iC (hereinafter, the crystal oscillator is also simply abbreviated as crystal), and 1 denotes the time measured by the calendar iC2 when necessary. It is a CPU (also called a microcomputer) to issue.

【0003】ところでコンピュータにカレンダ機能を付
加することは一般に広く行われている。カレンダ機能は
多くの場合、図3のように主たる処理を行うCPU1と
は独立したカレンダiC2を用いて計時を行っている。
そしてCPU1がカレンダiC2内の時刻レジスタを読
み出すことによって、時刻を得ている。図3のようなシ
ステムにおいては、カレンダの精度はカレンダiC2に
接続される水晶発振子4のもつ発振周波数特性に左右さ
れる。一般的に広く使われているカレンダiC用の水晶
発振子は、図4に示す温度特性を持つため、温度が変化
すると発振周波数が比較的大きく変化し、時刻に誤差が
生じてしまう。
By the way, adding a calendar function to a computer is generally widely performed. In many cases, the calendar function performs time measurement using a calendar iC2 independent of the CPU 1 that performs main processing as shown in FIG.
Then, the CPU 1 obtains the time by reading the time register in the calendar iC2. In the system as shown in FIG. 3, the accuracy of the calendar depends on the oscillation frequency characteristics of the crystal oscillator 4 connected to the calendar iC2. The generally used crystal oscillator for calendar iC has the temperature characteristics shown in FIG. 4, so that when the temperature changes, the oscillation frequency changes relatively largely, causing an error in time.

【0004】図4のような温度特性の水晶発振子が使わ
れているのは次の3点の要求があるためである。バッ
テリバックアップのような低電圧時でも、発振し続ける
こと。バッテリ消費をできるだけ少なくするために発
振周波数は低いこと。安価であること。
A crystal oscillator having a temperature characteristic as shown in FIG. 4 is used because of the following three requirements. Keep oscillating even at low voltage such as battery backup. The oscillation frequency must be low to minimize battery consumption. Inexpensive.

【0005】これらの要求を満足させるために選べる水
晶は図4に示す温度特性をもつものしかない。そのた
め、一般に温度が変化すると精度も変化するという問題
が従来のシステムでは存在していた。また、特殊な水晶
加工により、温度による精度変化が小さい水晶振動子も
知られているが高価である。次に、このような問題点を
解決した他の従来のシステムを図1および図2を用いて
説明する。図1は他の従来のシステム構成図で図3に対
応するものである。
[0005] Quartz crystals that can be selected to satisfy these requirements have only the temperature characteristics shown in FIG. For this reason, the conventional system has a problem that the accuracy generally changes when the temperature changes. In addition, a crystal resonator whose accuracy changes little due to temperature due to special crystal processing is also known, but is expensive. Next, another conventional system that solves such a problem will be described with reference to FIGS. 1 and 2. FIG. FIG. 1 is another conventional system configuration diagram corresponding to FIG.

【0006】また、図2は図1のCPUの要部動作を示
すフローチャートである。図1において、カレンダiC
2はアラーム機能を持ち、アラームレジスタに設定した
時刻に達した時に(この例では1分毎に)CPU1に割
込信号iNTを出力することができるものを使用した。
3はCPU1を駆動する水晶発振子(マイコン用水晶と
もいう)であり、5はCPU用水晶発振子3から作られ
るCPUクロックCLKでカウント動作をするフリーラ
ンカウンタで、カウント周期は1msecである。また6は
CPU1によって読み書きされるメモリである。
FIG. 2 is a flowchart showing the operation of the main part of the CPU shown in FIG. In FIG. 1, calendar iC
Reference numeral 2 has an alarm function and can output an interrupt signal iNT to the CPU 1 when the time set in the alarm register is reached (in this example, every one minute).
Reference numeral 3 denotes a crystal oscillator for driving the CPU 1 (also referred to as a crystal for a microcomputer). Reference numeral 5 denotes a free-run counter that counts with a CPU clock CLK generated from the crystal oscillator 3 for the CPU, and has a counting cycle of 1 msec. Reference numeral 6 denotes a memory read and written by the CPU 1.

【0007】次に図2を用いてCPU1の要部動作を説
明する。なお以下S1〜S10の符号は図2内のステッ
プを示す。CPU1はカレンダiC2から時刻を読出し
てメモリ6に格納すると共に、カウンタiC2に対し、
1分後に割込み信号iNTを出すよう設定する(S
1)。しかし、カレンダiC2の知らせてくる1分間に
は、カレンダ用水晶4のもつ誤差が含まれている。設定
してすぐ、CPU1はフリーランカウンタ5から、その
時点のフリーランカウンタ値5aを読出してメモリ6に
格納し(S2)、カレンダiC2からの割込を待つ(S
3)。
Next, the operation of the main part of the CPU 1 will be described with reference to FIG. In the following, reference numerals S1 to S10 indicate steps in FIG. The CPU 1 reads the time from the calendar iC2 and stores the time in the memory 6, and also reads the time from the counter iC2.
Set to output an interrupt signal iNT after one minute (S
1). However, one minute notified by the calendar iC2 includes an error of the quartz crystal 4 for calendar. Immediately after the setting, the CPU 1 reads the current free-run counter value 5a from the free-run counter 5, stores it in the memory 6 (S2), and waits for an interrupt from the calendar iC2 (S2).
3).

【0008】次に、カレンダiC2からの割込みが発生
したら処理が次へ進む(S3,分岐有)。即ち割込み発
生後、フリーランカウンタ5を読み出し(S4)、この
読み出し値から前回の読み出し値をさしひくと、カレン
ダiC2が1分といっている時間がCPUクロックを基
準とした値で求まる(S5)。例えば、カレンダiC用
水晶4の周波数偏差が0の時は、カレンダiC2が起こ
す1分の割込間隔にカウンタ値は60000 カウントになる
(1分間=60000msec )。また、カレンダ用水晶4の誤
差が-50ppmだとすると、カウンタは60003 カウントにな
る。同じく誤差が+50ppmの時は59997 カウントになる。
カウント値が60000 より多いか少ないかで、進みぎみか
遅れぎみかを検出する。
Next, when an interrupt from the calendar iC2 occurs, the processing proceeds to the next (S3, with branch). That is, after the interruption occurs, the free-run counter 5 is read (S4), and the previous read value is subtracted from this read value, and the time during which the calendar iC2 is 1 minute is obtained based on the CPU clock (S5). ). For example, when the frequency deviation of the calendar iC crystal 4 is 0, the counter value becomes 60,000 counts in one minute interrupt interval caused by the calendar iC2 (1 minute = 60,000 msec). Assuming that the error of the calendar crystal 4 is -50 ppm, the counter becomes 60003 counts. Similarly, when the error is +50 ppm, it becomes 59997 counts.
Whether the count value is more or less than 60000, it detects whether it is advancing or lagging.

【0009】このようにして誤差が検出されたならば
(S5,分岐有)、次にメモリ6へ誤差の積算値を格納
する(S6)。そして時刻変更ができる最小単位の時刻
誤差に達したら(S7,分岐Y)、時刻変更を行う。即
ち進みぎみなら時刻を遅らせ(S8→S9)、遅れぎみ
なら時刻を進める(S8→S10)。例えば、使用して
いるカレンダiCの時刻変更が秒単位で可能ならば、積
算値が1秒(1000カウント)に達したところで時刻の変
更を行う。
If an error is detected in this way (S5, with branch), then the integrated value of the error is stored in the memory 6 (S6). Then, when the time error of the minimum unit that can change the time is reached (S7, branch Y), the time is changed. That is, the time is advanced if it is just before the time (S8 → S9), and the time is advanced if it is almost the last (S8 → S10). For example, if the time of the calendar iC being used can be changed in seconds, the time is changed when the integrated value reaches 1 second (1000 counts).

【0010】[0010]

【発明が解決しようとする課題】上述した他の従来のシ
ステムで補正を行っているボードは、規定の発振周波数
のマイコン水晶を実装することができれば、最良の補正
効果を得ることができる。しかし、マイコン用水晶も発
振周波数の温度変化は小さいものの、値段の高いものは
図8のように発振周波数のばらつきが数ppmと小さ
く、安いものは図9のようにばらつきが100ppm程
度と大きい。しかし今、仮にカレンダ水晶誤差が0pp
mで、−50ppmのマイコン水晶を実装してしまった
ら、カレンダは−50ppm程度の誤差を生み出してし
まう。
The best correction effect can be obtained for a board which performs correction in the other conventional system described above, if a microcomputer crystal having a specified oscillation frequency can be mounted. However, although the crystal for the microcomputer has a small change in the temperature of the oscillation frequency, the expensive one has a small variation of the oscillation frequency of several ppm as shown in FIG. 8 and the cheap one has a large variation of about 100 ppm as shown in FIG. However, now, suppose the calendar crystal error is 0pp
If a microcomputer crystal of -50 ppm is mounted at m, the calendar generates an error of about -50 ppm.

【0011】これは次の理由による。即ちマイコン用水
晶が基準であるため、たとえカレンダiCが0ppm誤
差の水晶によって誤差ゼロの時間間隔で時刻を知らせて
きても、マイコン側が持つフリーランカウンタ5は50
ppmゆるい速度でカウントしているためにカウント数
が50ppm少ない。マイコンはこれをカレンダ側が5
0ppm短い時間間隔で時刻を知らせてきていると誤認
し、カレンダが進みすぎであると結論づける。そのた
め、実際には必要のない時刻修正を行って、カレンダi
Cの時刻を遅らせてしまう。つまりカレンダは結果とし
て50ppmほど遅れてしまう。
This is for the following reason. That is, since the microcomputer crystal is the reference, even if the calendar iC notifies the time at a time interval of zero error by the crystal having the error of 0 ppm, the free-run counter 5 of the microcomputer side has 50 times.
Since the count is performed at a low ppm rate, the count number is smaller by 50 ppm. The microcomputer uses 5
It mistakenly reports that the time has been notified at a time interval shorter by 0 ppm, and concludes that the calendar has advanced too much. Therefore, the time adjustment that is not actually necessary is performed, and the calendar i
The time of C is delayed. That is, the calendar is delayed by about 50 ppm as a result.

【0012】そこで本発明は、低コストのマイコン用水
晶を利用し、−50ppmのマイコン用水晶をのせた場
合でも、カレンダ誤差を正しく認識してカレンダの誤差
を最小限にすることができるようなカレンダiC補正方
法を提供しようとすることを課題とするものである。
Therefore, the present invention utilizes a low-cost crystal for a microcomputer, and even when a crystal for a microcomputer of -50 ppm is mounted, a calendar error can be correctly recognized and the calendar error can be minimized. It is an object to provide a calendar iC correction method.

【0013】[0013]

【課題を解決するための手段】前記の課題を解決するた
めに、請求項1のカレンダiC補正方法は、カレンダi
C用の水晶発振子(4など)の出力クロックによって計
時動作を行うカレンダiC(2など)と、CPU用の水
晶発振子(3など)の出力クロックによって駆動される
CPU(1など)とを備えたシステムにおいて、前記C
PU用水晶発振子の周波数誤差データ(7aなど)を記
憶する手段(バッテリバックアップRAM7など)を備
え、前記CPUが前記CPU用水晶発振子の出力クロッ
クに基づく計時時間を、さらに前記周波数誤差データを
参照して修正してなる計時時間(以下第1の計時時間と
いう)を基準として前記カレンダiCの計時時間(以下
第2の計時時間という)を補正するようにするものとす
る。
According to a first aspect of the present invention, there is provided a calendar iC correction method, comprising:
A calendar iC (e.g., 2) that performs a timing operation with an output clock of a crystal oscillator for C (e.g., 4) and a CPU (e.g., 1) driven by the output clock of a crystal oscillator for CPU (e.g., 3). A system comprising:
A means (such as a battery backup RAM 7) for storing frequency error data (7a or the like) of the PU crystal oscillator, wherein the CPU measures a time measured based on the output clock of the CPU crystal oscillator, and further stores the frequency error data. The time measured by the calendar iC (hereinafter, referred to as a second time) is corrected based on the time measured by referring to and corrected (hereinafter, referred to as a first time).

【0014】また請求項2のカレンダiC補正方法で
は、請求項1に記載のカレンダiC補正方法において、
前記CPUは所定周期ごとに前記第1の計時時間に対す
る前記第2の計時時間の誤差を(メモリ6などに格納し
て)積算し、この誤差の積算値が時刻変更の最小単位に
達するごとに前記補正を行うものであるようにする。ま
た請求項3のカレンダiC補正方法では、請求項1また
は請求項2に記載のカレンダiC補正方法において、前
記第1の計時時間は前記CPU用水晶発振子の出力クロ
ック(CLKなど)を計数するカウンタ(フリーカウン
タ5など)の計数値に前記の修正を行って計時されるも
のであるようにするものとする。
According to a second aspect of the present invention, there is provided a calendar iC correction method according to the first aspect.
The CPU accumulates an error (stored in the memory 6 or the like) of the second clock time with respect to the first clock time at predetermined intervals, and each time the integrated value of the error reaches a minimum unit of time change. The correction is performed. In the calendar iC correction method according to a third aspect, in the calendar iC correction method according to the first or second aspect, the first clocking time counts an output clock (CLK or the like) of the CPU crystal oscillator. It is assumed that the count value of the counter (such as the free counter 5) is corrected and the time is measured.

【0015】また請求項4のカレンダiC補正方法で
は、請求項3に記載のカレンダiC補正方法において、
前記CPUは、前記カレンダiCが自身の計時する所定
の時間間隔毎に発生する割込要求(1分割込iNTな
ど)に同期して、そのつど1回前記カウンタの計数値を
読取り前記補正を行うものであるようにする。
According to a fourth aspect of the present invention, there is provided a calendar iC correction method according to the third aspect.
The CPU reads the count value of the counter once each time the calendar iC synchronizes with an interrupt request (eg, one-segmented iNT) generated at a predetermined time interval measured by the calendar iC, and performs the correction. Things.

【0016】[0016]

【作用】マイコンに接続される水晶発振子には図5に示
すような周波数変化の小さい温度特性を持つものが一般
的に使われている。マイコンが必要とする周波数帯は高
く、しかもバッテリバックアップ時の動作を要求してい
ないため、図5のような温度特性を持つ水晶発振子を得
ることが容易にかつ安価に実現できるためこのような水
晶発振子が一般的に使用されている。
The crystal oscillator connected to the microcomputer generally has a temperature characteristic with a small frequency change as shown in FIG. Since the frequency band required by the microcomputer is high and does not require operation during battery backup, it is easy and inexpensive to obtain a crystal oscillator having the temperature characteristics shown in FIG. Crystal oscillators are commonly used.

【0017】マイコン用水晶の温度変化に対する周波数
偏差はカレンダiC用水晶のそれと比べて、数分の1か
ら10分の1程度しかない。従って、マイコンの計時す
る時間を基準としてカレンダiC内の時刻レジスタを読
み出し、誤差を抽出して時刻を書き換えてやれば時刻補
正ができる。このように補正した結果、カレンダiCの
時刻はカレンダ用水晶の精度にかかわりなく常にマイコ
ン用水晶の持つ誤差内に納まる。そして誤差は補正前の
数分の1から10分の1程度になる。
The frequency deviation of the crystal for the microcomputer with respect to the temperature change is only about one-tenth to one-tenth that of the crystal for the calendar iC. Therefore, the time can be corrected by reading the time register in the calendar iC based on the time measured by the microcomputer, extracting the error, and rewriting the time. As a result of such correction, the time of the calendar iC always falls within the error of the microcomputer crystal regardless of the accuracy of the calendar crystal. Then, the error is reduced from a fraction to a tenth before correction.

【0018】そして、温度変化に対する周波数偏差は小
さいが規定の発振周波数からは外れたマイコン用水晶を
利用する場合、不揮発性のメモリ7を追加し、この不揮
発性メモリ7へマイコン用水晶の発振周波数誤差を格納
する。マイコンが、その時刻補正処理過程において、収
集したカレンダiC誤差から、メモリ7に格納されたマ
イコン用水晶の誤差データをさしひき修正して、最終的
にカレンダ誤差を求める(請求項1ないし3)。
When using a crystal for a microcomputer which has a small frequency deviation with respect to a temperature change but deviates from a specified oscillation frequency, a non-volatile memory 7 is added, and the oscillation frequency of the crystal for the microcomputer is added to the non-volatile memory 7. Stores the error. In the time correction process, the microcomputer refers to and corrects the error data of the microcomputer crystal stored in the memory 7 from the collected calendar iC error, and finally obtains the calendar error. ).

【0019】またカレンダiCの計時誤差を具体的に求
める際、カレンダiCが例えば1分の計時毎に発生する
割込要求に同期して、マイコンがマイコンクロックを計
数するフリーランカウンタ5の計数値を、そのつど1回
読取る方法を用いることにより、マイコンの時刻補正処
理時間が計時誤差に介入することを防ぐ(請求項4)。
When the time error of the calendar iC is specifically determined, the count value of the free-run counter 5 in which the microcomputer counts the microcomputer clock is synchronized with the calendar iC, for example, in response to an interrupt request generated every one minute. Is read once each time, thereby preventing the time correction processing time of the microcomputer from intervening in the clock error.

【0020】[0020]

【実施例】図6ないし図9を用いて請求項1ないし3に
関わる発明の実施例を説明する。請求項1ないし3に関
わる発明は、低コストのマイコン用水晶を利用し、−5
0ppmのマイコン用水晶をのせた場合でも、カレンダ
誤差を正しく認識してカレンダの誤差を最小限にするこ
とができるようなカレンダiC補正方法を提供するもの
である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the invention according to claims 1 to 3 will be described with reference to FIGS. The invention according to claims 1 to 3 uses a low-cost crystal for a microcomputer, and
An object of the present invention is to provide a calendar iC correction method capable of correctly recognizing a calendar error and minimizing a calendar error even when a 0 ppm microcomputer crystal is mounted.

【0021】即ち、この発明においてはこの例の場合、
フリーランカウンタのカウント数が、50ppm少ない
というところまでは従来とかわらない。しかしカレンダ
が進んでいるのか遅れているのか、最終的な判断をする
前に不揮発性メモリからマイコン用水晶の誤差データを
読み出し、フリーランカウンタ自身の誤差が−50pp
mあるのだということにより修正する(図7のステップ
S4A)。するとカレンダの誤差は0であるという結果
を得て時刻修正を行わないのである。ただし、マイコン
用水晶の周波数誤差はアナログ値で存在する一方で、誤
差データを書込むメモリ、誤差計算値はディジタルであ
るため、ここに、ディジタル化時の丸めの誤差が生じ
る。この丸めの誤差がこの発明によるカレンダiC補正
方法において最終的に残るカレンダ誤差となる。図6は
この発明の一実施例としてのシステム構成図で図1に対
応するものである。図6においては図1に対しカレンダ
iC2内にバッテリバックアップされた4ビットのRA
M7が内蔵されている点が異なる。但し、一般的にはこ
のRAM7はカレンダiC2の外部にあっても差支えな
い。なおカレンダiC2は図1と同様にアラーム機能を
持ちアラームレジスタに設定した時刻に達した時に(こ
の例では1分毎に)CPU1に割込信号iNTを出力す
ることができる。
That is, in the present invention, in this case,
Until the count of the free-run counter is reduced by 50 ppm, it is not different from the conventional one. However, before making a final judgment whether the calendar is advanced or delayed, the error data of the microcomputer crystal is read from the non-volatile memory, and the error of the free-run counter itself is -50 pp.
This is corrected because there is m (step S4A in FIG. 7). Then, the result that the calendar error is 0 is obtained, and the time is not adjusted. However, while the frequency error of the crystal for the microcomputer exists as an analog value, the memory for writing the error data and the error calculation value are digital, so that a rounding error occurs at the time of digitization. This rounding error finally becomes the remaining calendar error in the calendar iC correction method according to the present invention. FIG. 6 is a system configuration diagram as one embodiment of the present invention, corresponding to FIG. In FIG. 6, a 4-bit RA battery-backed up in calendar iC2 in FIG.
The difference is that M7 is incorporated. However, generally, this RAM 7 may be outside the calendar iC2. The calendar iC2 has an alarm function as in FIG. 1 and can output an interrupt signal iNT to the CPU 1 when the time set in the alarm register is reached (every minute in this example).

【0022】ところで前記のバックアップメモリ7には
マイコン用水晶3の周波数誤差が格納されている。この
格納作業は、個々のマイコンボードの出荷試験時に行
い、発振周波数測定をして求められた誤差値を書きこ
む。この書込まれた誤差データはRAM7がバッテリバ
ックアップされているため、以後書き換えない限り、電
源がOFFされても残っている。フリーランカウンタ5
は図1と同様にCPU用水晶3からつくられるCPUク
ロックCLKでカウントするカウンタでカウント周期は
1msecである。
The backup memory 7 stores the frequency error of the crystal 3 for the microcomputer. This storing operation is performed at the time of the shipping test of each microcomputer board, and the error value obtained by measuring the oscillation frequency is written. Since the written error data is backed up in the RAM 7 by a battery, the error data remains even if the power is turned off unless rewritten thereafter. Free run counter 5
1 is a counter that counts with a CPU clock CLK generated from the CPU crystal 3 as in FIG. 1 and has a counting cycle of 1 msec.

【0023】図7は図6のCPU1の補正処理の第1の
実施例を示すフローチャートで図2に対応するものであ
る。図7では図2に対しステップS4Aが付加されてい
る点が異なる。次に図6を参照しつつ図7を説明する
と、CPU1はカレンダiC2に対し、1分後に割込み
を出すよう設定する(S1)。しかしカレンダiC2の
知らせてくる1分間にはカレンダ用水晶4のもつ誤差が
含まれている。設定してすぐCPUはフリーランカウン
タ5からその時点のフリーランカウンタ値((A)とす
る)を読出してメモリ6に収納し(S2)、カレンダi
C2からの割込を待つ(S3)。次にカレンダiC2か
らの割込が発生したら(S3,分岐有)、処理が次へ進
む。
FIG. 7 is a flowchart showing a first embodiment of the correction processing of the CPU 1 of FIG. 6 and corresponds to FIG. FIG. 7 is different from FIG. 2 in that step S4A is added. Next, referring to FIG. 6, referring to FIG. 7, the CPU 1 sets the calendar iC2 to issue an interrupt after one minute (S1). However, one minute notified by the calendar iC2 includes an error of the quartz crystal 4 for calendar. Immediately after the setting, the CPU reads the current free-run counter value (referred to as (A)) from the free-run counter 5 and stores it in the memory 6 (S2).
Wait for an interrupt from C2 (S3). Next, when an interrupt from the calendar iC2 occurs (S3, with branch), the process proceeds to the next.

【0024】割込み発生後、フリーランカウンタ5の値
を読み出し、前回の読出値(A)をさしひくと、カレン
ダiC2が1分といっている時間がCPUクロックCL
Kを基準とした値((B)とする)で求まる(S4)。
例えばカレンダiC用水晶4の周波数偏差が0で、か
つ、マイコン用水晶3の誤差が0の時は、カレンダiC
2が起こす1分の割込間隔でのカウンタ5のカウント値
(B)は60000 カウントになる(1分間=60000msec)。
また、カレンダ用水晶4の誤差が−50ppm 、マイコン用
水晶3の誤差が0の時はカウント値(B)は60003 カウ
ントになる。またカレンダ用水晶4の誤差が+50ppm、
マイコン用水晶3の誤差が0の時はカウント値(B)は
59997 カウントになる。カウント値(B)が60000 より
多いか少ないかで進みぎみか遅れぎみかを検出する。
After the occurrence of the interrupt, the value of the free-run counter 5 is read, and when the previous read value (A) is obtained, the CPU i.c.
It is determined by a value based on K (referred to as (B)) (S4).
For example, when the frequency deviation of the calendar iC crystal 4 is 0 and the error of the microcomputer crystal 3 is 0, the calendar iC
The count value (B) of the counter 5 at the 1-minute interrupt interval caused by 2 becomes 60,000 counts (1 minute = 60,000 msec).
When the error of the quartz crystal 4 for the calendar is -50 ppm and the error of the quartz crystal 3 for the microcomputer is 0, the count value (B) becomes 60003 counts. Also, the error of the crystal 4 for the calendar is + 50ppm,
When the error of the crystal 3 for the microcomputer is 0, the count value (B) is
59997 counts. Whether the count value (B) is more or less than 60,000 is detected to determine whether it is advancing or lagging.

【0025】検出したカウント値(B)にはマイコン水
晶3自身の誤差も含まれている場合がある。例えば、カ
レンダ用水晶4の誤差が+50ppm でマイコン水晶の誤差
も+50ppm のときは、カウント値(B)は60000 であ
る。そこで、バッテリバックアップRAM7からマイコ
ン用水晶3の誤差7aを読出して該カウント値(B)か
ら差引くことでカウント値(B)を修正する(S4
A)。すると残りはカレンダiC用水晶4の誤差になる
のでそれをメモリ6の誤差積算値の更新に使用する(S
5,S6)。積算値が時刻変更ができる最小単位の時刻
誤差に達したら(S7,分岐Y)、時刻変更を行う。進
みぎみなら時刻を遅らせ(S8,S9)、遅れぎみなら
時刻を進める(S8,S10)。例えば使用しているカ
レンダiC2の時刻変更が秒単位で可能ならば、積算値
が1秒(1000カウント)に達したところで時刻の変更を
行なう。
The detected count value (B) may include an error of the microcomputer crystal 3 itself. For example, when the error of the calendar crystal 4 is +50 ppm and the error of the microcomputer crystal is also +50 ppm, the count value (B) is 60000. Therefore, the count value (B) is corrected by reading the error 7a of the microcomputer crystal 3 from the battery backup RAM 7 and subtracting the error 7a from the count value (B) (S4).
A). Then, the remainder becomes an error of the calendar iC crystal 4 and is used for updating the error integrated value of the memory 6 (S
5, S6). When the integrated value reaches the time error of the minimum unit that can change the time (S7, branch Y), the time is changed. If it is just before the time, the time is delayed (S8, S9), and if it is just behind, the time is advanced (S8, S10). For example, if the time of the used calendar iC2 can be changed in seconds, the time is changed when the integrated value reaches 1 second (1000 counts).

【0026】次に図10ないし図13を用いて図6のC
PU1の補正処理の第2の実施例を説明する。図7で述
べた図6のCPU1の第1実施例の補正処理(便宜上補
正処理(2−1)とする)を行った場合、この補正処理
の実行時間が無視できない場合には誤った補正を行うと
いう問題がある。
Next, referring to FIGS. 10 to 13, C of FIG.
A second embodiment of the correction processing of PU1 will be described. When the correction processing (correction processing (2-1) for convenience) of the first embodiment of the CPU 1 in FIG. 6 described in FIG. 7 is performed, if the execution time of this correction processing cannot be ignored, an erroneous correction is performed. There is a problem to do.

【0027】図10はこの問題を説明するためのタイム
チャートで、上から順にCPU1のメインプログラムの
実行、カレンダiC2の割込、CPU1の補正処理プロ
グラムの実行、補正処理(2−1)に基づくフリーラン
カウンタ5の計数値の読込、の夫々のタイミングを示
す。ここでは、1分間毎にカレンダiC2からの割込が
CPU1に上がり、フリーランカウンタ5の値と比較し
て誤差を求めて時刻補正を行っている。ここでフリーラ
ンカウンタ5の分解能1msec、カレンダiC2の時刻補
正最小単位1sec のハードウェアにおいて、カレンダi
C2の誤差ゼロで発振しているとすると、正しい補正が
行われるためには、CPU1はカレンダiC2が通知し
てくる1分間が60000 カウントであると認識しなければ
ならないが、補正処理プログラム実行時間が長い場合に
は、60000 カウントに満たなくなる。これはカレンダi
C2が連続して時刻を刻んでいるのに対し、CPU1は
フリーランカウンタ5の値の読み出しを、補正処理プロ
グラムの終り(読出値An)と始め(読出値Bn)で行
っているためである。但しここで読出値A,Bに対する
添字nはこの補正処理プログラムのそれまでの累計実行
回数(実行番号)を一般的に示すものとする。従ってプ
ログラム実行に時間がかかっている場合、その分だけカ
ウントされなくなる。
FIG. 10 is a time chart for explaining this problem, which is based on execution of the main program of the CPU 1, interruption of the calendar iC2, execution of the correction processing program of the CPU 1, and correction processing (2-1) in order from the top. The timing of reading the count value of the free-run counter 5 is shown. Here, the interrupt from the calendar iC2 is raised to the CPU 1 every minute, and the time is corrected by comparing the value with the value of the free-run counter 5 to obtain an error. Here, in hardware with a resolution of 1 msec of the free-run counter 5 and a minimum unit of time correction of 1 sec of the calendar iC2, the calendar i
Assuming that oscillation occurs with an error of C2 being zero, the CPU 1 must recognize that one minute notified by the calendar iC2 is 60,000 counts in order to perform correct correction. If it is long, it will be less than 60,000 counts. This is calendar i
This is because the CPU 1 reads the value of the free-run counter 5 at the end (read value An) and at the beginning (read value Bn) of the correction processing program, while C2 continuously counts the time. . Here, the subscript n for the read values A and B generally indicates the total number of executions (execution number) of the correction processing program up to that time. Therefore, if the program execution takes a long time, it will not be counted.

【0028】例えば、CPU1の補正処理プログラムの
実行時間がTexe msecかかっているとすると、 CPU1が認識するカレンダの1分間=Bn −An =60000 −Texe +αn −αn-1 =(60000−Texe )+(αn −αn-1) ≒(60000−Texe )msec となる。なおαn −αn-1 は、図10に示す割込応答時
間差であり、正の値の時も、負の値の時もあり、この後
の誤差積算時に相殺されてゼロに近づいていくため、誤
差検出には影響が無い。したがって、式からの変形
が可能となる。
For example, assuming that the execution time of the correction processing program of the CPU 1 is Texe msec, one minute of the calendar recognized by the CPU 1 = Bn−An = 60000−Texe + αn−αn−1 = (60000−Texe) + (Αn−αn−1) ≒ (60000−Texe) msec. Note that αn−αn−1 is the interrupt response time difference shown in FIG. 10, which may be a positive value or a negative value. There is no effect on error detection. Therefore, a transformation from the equation is possible.

【0029】結局、CPU1は補正処理プログラム実行
時間Texe を、カレンダが遅れている時間は誤認して、
このTexe msecを誤差として積み上げて行く。この誤認
した誤差がカレンダiCの時刻補正最小単位の1sec に
達した時、誤った時刻補正を行ってしまうことになる。
図13は図11,図12で後述する図6のCPU1の第
2実施例の補正処理(便宜上補正処理(2−2)とす
る)に基づくフリーランカウンタ5の読込タイミングを
図10に対応して示すタイムチャートである。
After all, the CPU 1 mistakenly recognizes the correction processing program execution time Texe as the time during which the calendar is delayed, and
This Texe msec is accumulated as an error. When the erroneously recognized error reaches the minimum time correction unit of 1 second of the calendar iC, erroneous time correction is performed.
FIG. 13 corresponds to FIG. 10 showing the read timing of the free-run counter 5 based on the correction processing (correction processing (2-2) for convenience) of the CPU 1 of FIG. FIG.

【0030】図13に示すように補正処理(2−2)で
は、1分毎に読み出していたフリーランカウンタの値A
n(n≠0;以下同様)の代りに、二回目以降は、前回
の値Bn−1を用いて、今回の値Bnとの差分を求め、
最終的にカレンダ誤差を求めるようにする。この方法に
よれば、フリーランカウンタ5の値を読み出すのが、カ
レンダiC2の知らせてくる割込要求と同期したタイミ
ングでのみ行われるようになっているので、補正プログ
ラムの実行時間の長さにかかわらず、カレンダ誤差を正
しく認識できるようになる。従って時刻補正を誤って行
うこともなくなる。
As shown in FIG. 13, in the correction process (2-2), the value A of the free-run counter read every minute is read.
Instead of n (n ≠ 0; the same applies hereinafter), for the second and subsequent times, the difference from the current value Bn is obtained using the previous value Bn−1,
Finally, a calendar error is determined. According to this method, the value of the free-run counter 5 is read only at the timing synchronized with the interrupt request notified by the calendar iC2. Regardless, the calendar error can be correctly recognized. Therefore, the time correction is not performed erroneously.

【0031】図11は補正処理(2−2)を実行する場
合における図6のマイコンシステムの全体の処理の流れ
を示しており、図12は補正処理プログラムの詳細な流
れを示す。即ち図11ではカレンダiC2からの割込が
あるたびに、図12の補正処理プログラムがコールされ
る。そしてこの補正処理プログラム実行の後、メイン処
理へリターンする。
FIG. 11 shows the overall processing flow of the microcomputer system of FIG. 6 when the correction processing (2-2) is executed, and FIG. 12 shows the detailed flow of the correction processing program. That is, in FIG. 11, every time there is an interrupt from the calendar iC2, the correction processing program in FIG. 12 is called. After executing the correction processing program, the process returns to the main processing.

【0032】次に図6,図13を参照しつつ、図11,
図12を説明する。なお以下S21〜S23の符号は図
11中の、またS31〜S44の符号は図12中の夫々
のステップを示す。電源投入直後、まずCPU1は図1
1のメイン処理においてカレンダiC2に対して、1分
後に割込を出すように設定する(S21)。設定した直
後にCPU1はフリーランカウンタ5からその時点のフ
リーランカウンタ値A0を読み出しメモリ6に格納して
(S23)、メイン処理を行う中で(S23)、1分後
に来るカレンダiC2から割込を待つ。割込が発生した
ら図12の補正処理プログラムがコールされる。
Next, referring to FIGS. 6 and 13, FIG.
Referring to FIG. In the following, reference numerals S21 to S23 indicate respective steps in FIG. 11, and reference numerals S31 to S44 indicate respective steps in FIG. Immediately after the power is turned on, first, the CPU 1
In the first main process, the interrupt is set to be issued to the calendar iC2 after one minute (S21). Immediately after the setting, the CPU 1 reads the current free-run counter value A0 from the free-run counter 5 and stores it in the memory 6 (S23). During the execution of the main processing (S23), the CPU 1 interrupts from the calendar iC2 coming one minute later. Wait for. When an interrupt occurs, the correction processing program of FIG. 12 is called.

【0033】図12ではまずフリーランカウンタ5の値
B0を読み出し(S31)、前回の読み出し値A0との
差分C=(B0−A0)を取ると、カレンダiC2が1
分といっている時間がCPU用水晶発振子3によるクロ
ックを基準とした値で求められる(S32)。ここで次
の割込時のためにフリーランカウンタ値B0を次のAの
値A1にする(S33)。前記Cの値にはマイコン用水
晶発振子3の誤差も含まれているので、バックアップメ
モリ7内に予め格納してあるマイコン用水晶の誤差値7
aを差し引いて補正する。その結果はDに納められる
(S34)。
In FIG. 12, first, the value B0 of the free-run counter 5 is read (S31), and when the difference C = (B0-A0) from the previous read value A0 is obtained, the calendar iC2 becomes 1
The minute time is obtained by a value based on the clock by the CPU crystal oscillator 3 (S32). Here, the free-run counter value B0 is set to the next value A1 of A for the next interrupt (S33). Since the value of C includes an error of the crystal oscillator 3 for the microcomputer, the error value 7 of the crystal for the microcomputer stored in the backup memory 7 in advance is used.
Correct by subtracting a. The result is stored in D (S34).

【0034】次に、カレンダ水晶の誤差を求めるため
に、更にDの値から60000 を引く。引いた残りEがその
1分間でカレンダiCが生じた誤差である(S35)。
ここで、60000 とは、〔正確な1分=60000 カウント〕
であることに起因したもので、つまり、もしカレンダi
C2が誤差ゼロで動作した場合、 である。そこでこの誤差Eが有れば(S36,分岐
Y)、この誤差Eを積算してFとする(S37)。そし
て、この誤差積算値Fが、時刻変更ができる最小単位に
まで達した時に(S38,分岐Y)、時刻補正を行う。
この時刻補正の手順としては進みぎみなら時刻を遅らせ
(S39→S40)、遅れぎみならば時刻を進める(S
39→S42)。例えば、使用しているカレンダiCの
時刻変更が秒単位で可能ならば、誤差積算値が1秒(10
00カウント)に達したところで時刻の補正を行う。
Next, 60000 is subtracted from the value of D in order to determine the error of the calendar crystal. The subtracted remaining E is the error that caused the calendar iC in the one minute (S35).
Here, 60000 means [exact one minute = 60000 counts]
, That is, if calendar i
If C2 operates with zero error, It is. Therefore, if there is this error E (S36, branch Y), this error E is integrated and set as F (S37). Then, when the error integrated value F reaches the minimum unit in which the time can be changed (S38, branch Y), the time is corrected.
As a procedure of the time correction, the time is advanced if the time is too late (S39 → S40), and if the time is almost late, the time is advanced (S39)
39 → S42). For example, if the time of the calendar iC being used can be changed in seconds, the error integrated value is 1 second (10
(00 count), the time is corrected.

【0035】その後、誤差積算値Fから時刻変更最小単
位を加減算しておく(S41,S43) 。即ち時刻を
1秒遅らせて時刻補正したら1000を引き、1秒進ませて
時刻4) 補正をしたら1000を足しておく。最小単位に
満たない誤差は誤差積算値に5) 残しておく。そして
カレンダiC2から時刻を読取り、次の“分”桁上がり
時に割込が発生するように設定して(S44)、図12
の補正処理プログラムから図11のメイン処理(S2
3)へリターンする。次回の“分”桁上がり時の割込で
再度、図12の補正処理プログラムが走る。
Thereafter, the minimum time change unit is added or subtracted from the error integrated value F (S41, S43). That is, if the time is delayed by 1 second and the time is corrected, subtract 1000 and advance 1 second and time 4) If corrected, add 1000. An error less than the minimum unit is left as 5) in the error integrated value. Then, the time is read from the calendar iC2, and an interrupt is generated at the time of the next "minute" carry (S44).
From the correction processing program of FIG.
Return to 3). The correction processing program of FIG. 12 runs again at the next interruption at the time of “minute” carry.

【0036】[0036]

【発明の効果】カレンダiC用の水晶発振子4の出力ク
ロックによって計時動作を行うカレンダiC2と、CP
U用の水晶発振子3の出力クロックCLKによって駆動
されるCPU1とを備えたシステムにおいて、請求項1
ないし4に関わる発明によれば、前記CPU用水晶発振
子3の周波数の基準発振周波数に対する誤差が無視でき
ない場合、このCPU用水晶発振子3の周波数誤差デー
タ7aを記憶するバッテリバックアップRAM7を備
え、前記CPU1が前記CPU用水晶発振子3の出力ク
ロックCLKを計数するフリーカウンタ5の計時時間
を、さらに前記周波数誤差データ7aを参照して修正し
てなる計時時間を基準として前記カレンダiC2の計時
時間を補正するようにしたので、カレンダの誤差を小さ
くすることができた。カレンダ水晶4の発振周波数の誤
差-56ppm(日差4.8 秒)のマイコン補正を行わせたもの
は、誤差が+3.8ppm (日差0.3 秒)へと改善されたこと
が確認されている。この発明の補正方法によれば、補正
後の誤差は、マイコン用水晶の誤差を不揮発性メモリ7
へ書きこむ時の丸めの誤差に左右される。
According to the present invention, a calendar iC2 which performs a timekeeping operation by an output clock of a crystal oscillator 4 for a calendar iC,
2. A system comprising: a CPU 1 driven by an output clock CLK of a U crystal oscillator 3;
According to the inventions according to the fourth to fourth aspects, when the error of the frequency of the CPU crystal oscillator 3 with respect to the reference oscillation frequency cannot be ignored, the battery backup RAM 7 that stores the frequency error data 7a of the CPU crystal oscillator 3 is provided. The CPU 1 corrects the time measured by the free counter 5 for counting the output clock CLK of the crystal oscillator 3 for the CPU with reference to the time measured by referring to the frequency error data 7a. Was corrected, so that a calendar error could be reduced. It has been confirmed that the microcomputer frequency corrected for the oscillation frequency error of the calendar crystal 4 of -56 ppm (day difference 4.8 seconds) has been improved to +3.8 ppm (day difference 0.3 seconds). According to the correction method of the present invention, the error after the correction is the error of the crystal for the microcomputer,
Depends on the rounding error when writing.

【0037】なお一般には様々な性能のマイコンシステ
ムが存在するが、どんなに高性能のマイコンシステムで
あっても実行時間Texe はゼロにはならない。コストの
制約から実行時間の長いマイコンシステムも存在する。
しかし前述したこの発明に包含される請求項4に関わる
発明によれば、さらにカレンダiC2による1分毎の割
込要求に同期して、そのつど1回、フリーランカウンタ
5から読取った計数値を用いてカレンダ誤差を求めるよ
うにしたので、マイコンの実行時間の長さにかかわら
ず、カレンダ誤差を正しく認識することができるように
なるため、マイコンによるカレンダiC2の補正方法を
スピードの遅い低コストのマイコンシステムにも適用す
ることが可能になった。
In general, there are microcomputer systems of various performances, but the execution time Texe does not become zero no matter how high the microcomputer system. Some microcomputer systems have a long execution time due to cost constraints.
However, according to the invention according to claim 4 included in the present invention, the count value read from the free-run counter 5 once each time is synchronized with a one-minute interrupt request by the calendar iC2. Since the calendar error is obtained by using the microcomputer, the calendar error can be correctly recognized regardless of the length of execution time of the microcomputer. It can be applied to microcomputer systems.

【図面の簡単な説明】[Brief description of the drawings]

【図1】従来のシステム構成図FIG. 1 is a conventional system configuration diagram.

【図2】図1のCPUの要部動作説明用のフローチャー
FIG. 2 is a flowchart for explaining an operation of a main part of the CPU of FIG. 1;

【図3】他の従来のシステム構成図FIG. 3 is a block diagram of another conventional system.

【図4】カレンダiC用水晶発振子の一般的な周波数温
度特性を示す図
FIG. 4 is a diagram showing general frequency-temperature characteristics of a crystal oscillator for calendar iC.

【図5】CPU用水晶発振子の一般的な周波数温度特性
を示す図
FIG. 5 is a diagram showing general frequency temperature characteristics of a crystal oscillator for a CPU.

【図6】請求項1ないし3に関わる発明の実施例として
のシステム構成図
FIG. 6 is a system configuration diagram as an embodiment of the invention according to claims 1 to 3;

【図7】図6のCPUの補正処理の第1の実施例を示す
フローチャート
FIG. 7 is a flowchart showing a first embodiment of a correction process of the CPU in FIG. 6;

【図8】高価なCPU用水晶発振子の周波数温度特性の
バラツキ例を示す図
FIG. 8 is a diagram showing an example of variation in frequency temperature characteristics of an expensive CPU crystal oscillator.

【図9】比較的安価なCPU用水晶発振子の周波数温度
特性のバラツキ例を示す図
FIG. 9 is a diagram showing an example of variation in frequency temperature characteristics of a relatively inexpensive crystal unit for a CPU.

【図10】図7に基づくフリーランカウンタの読取のタ
イミングを示すタイムチャート
FIG. 10 is a time chart showing the timing of reading a free-run counter based on FIG. 7;

【図11】図6のCPUの補正処理の第2の実施例とし
てのメイン処理を示すフローチャート
FIG. 11 is a flowchart showing a main process as a second embodiment of the correction process of the CPU in FIG. 6;

【図12】図11のメイン処理によって起動される割込
処理の詳細を示すフローチャート
FIG. 12 is a flowchart showing details of an interrupt process started by the main process of FIG. 11;

【図13】図11,12に基づくフリーランカウンタの
読取のタイミングを示すタイムチャート
FIG. 13 is a time chart showing the timing of reading a free-run counter based on FIGS. 11 and 12;

【符号の説明】[Explanation of symbols]

1 CPU 2 カレンダiC 3 CPU用水晶発振子 4 カレンダiC用水晶発振子 5 フリーランカウンタ 6 メモリ 7 バッテリバックアップRAM 7a CPU用水晶誤差 iNT 割込信号 DESCRIPTION OF SYMBOLS 1 CPU 2 Calendar iC 3 Crystal oscillator for CPU 4 Crystal oscillator for calendar iC 5 Free-run counter 6 Memory 7 Battery backup RAM 7a Crystal error for CPU iNT interrupt signal

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】カレンダiC用の水晶発振子の出力クロッ
クによって計時動作を行うカレンダiCと、CPU用の
水晶発振子の出力クロックによって駆動されるCPUと
を備えたシステムにおいて、 前記のCPU用水晶発振子の周波数誤差データを記憶す
る手段を備え、 前記CPUが前記CPU用水晶発振子の出力クロックに
基づく計時時間を、さらに前記周波数誤差データを参照
して修正してなる計時時間(以下第1の計時時間とい
う)を基準として前記カレンダiCの計時時間(以下第
2の計時時間という)を補正するようにしたことを特徴
とするカレンダiC補正方法。
1. A system comprising: a calendar iC for performing a timekeeping operation by an output clock of a crystal oscillator for a calendar iC; and a CPU driven by an output clock of a crystal oscillator for a CPU. Means for storing frequency error data of the oscillator, wherein the CPU corrects the time measured based on the output clock of the crystal oscillator for the CPU with reference to the frequency error data (hereinafter referred to as the first time). A time measurement of the calendar iC (hereinafter referred to as a second time measurement) on the basis of the time measurement of the calendar iC.
【請求項2】請求項1に記載のカレンダiC補正方法に
おいて、前記CPUは所定周期ごとに前記第1の計時時
間に対する前記第2の計時時間の誤差を積算し、この誤
差の積算値が時刻変更の最小単位に達するごとに前記補
正を行うものであることを特徴とするカレンダiC補正
方法。
2. The calendar iC correction method according to claim 1, wherein the CPU accumulates an error of the second clock time with respect to the first clock time at predetermined intervals, and the integrated value of the error is time. The calendar iC correction method, wherein the correction is performed each time the minimum unit of change is reached.
【請求項3】請求項1または請求項2に記載のカレンダ
iC補正方法において、前記第1の計時時間は前記CP
U用水晶発振子の出力クロックを計数するカウンタの計
数値に前記の修正を行って計時されるものであることを
特徴とするカレンダiC補正方法。
3. The calendar iC correction method according to claim 1 or 2, wherein the first clocking time is equal to the CP time.
A calendar iC correction method, wherein a count value of a counter for counting an output clock of a U crystal oscillator is clocked by performing the above correction.
【請求項4】請求項3に記載のカレンダiC補正方法に
おいて、前記CPUは、前記カレンダiCが自身の計時
する所定の時間間隔毎に発生する割込要求に同期して、
そのつど1回前記カウンタの計数値を読取り前記補正を
行うものであることを特徴とするカレンダiC補正方
法。
4. The calendar iC correction method according to claim 3, wherein the CPU is configured to synchronize the calendar iC with an interrupt request generated at predetermined time intervals measured by the calendar iC.
A method for correcting the calendar iC by reading the count value of the counter once each time.
JP4017222A 1991-05-18 1992-02-03 Calendar iC correction method Expired - Fee Related JP2896004B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4017222A JP2896004B2 (en) 1991-05-18 1992-02-03 Calendar iC correction method

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP11357191 1991-05-18
JP3-113571 1991-09-17
JP23521391 1991-09-17
JP3-235213 1991-09-17
JP4017222A JP2896004B2 (en) 1991-05-18 1992-02-03 Calendar iC correction method

Publications (2)

Publication Number Publication Date
JPH05134779A JPH05134779A (en) 1993-06-01
JP2896004B2 true JP2896004B2 (en) 1999-05-31

Family

ID=27281727

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4017222A Expired - Fee Related JP2896004B2 (en) 1991-05-18 1992-02-03 Calendar iC correction method

Country Status (1)

Country Link
JP (1) JP2896004B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3538374B2 (en) * 2000-09-11 2004-06-14 エヌ・ティ・ティ・コミュニケーションズ株式会社 Time supply system and time supply device
JP4812290B2 (en) * 2004-12-01 2011-11-09 富士通テン株式会社 Timer device
JP4673772B2 (en) * 2006-03-06 2011-04-20 株式会社ナナオ Display device and correction method

Also Published As

Publication number Publication date
JPH05134779A (en) 1993-06-01

Similar Documents

Publication Publication Date Title
US7738322B2 (en) Radio-wave timepieces and time information receivers
JP2624176B2 (en) Electronic clock and time correction method
KR100687230B1 (en) RCT device and current time correction method of RTC device
EP0651517B1 (en) Clock signal generation circuit having detective circuit detecting loss of reference clock
JP5228392B2 (en) Temperature compensated oscillation circuit, real-time clock device and electronic equipment
JP2896004B2 (en) Calendar iC correction method
US7194648B2 (en) Process for time synchronization of at least two clocks in a microprocessor system
US4114363A (en) Electronic timepiece
CN212364801U (en) RTC calibration circuit of smoke detector MCU
JP2007078405A (en) Timing program of software timepiece
EP2884351B1 (en) Sensor signal acquisition data
CN111897202B (en) RTC calibration circuit and calibration method of smoke detector MCU
JP4711546B2 (en) Temperature correction method for real-time clock and processing device provided with real-time clock
JP2003270369A (en) Time correction method and time correction device for real-time clock
US8630386B2 (en) Clock recovery in a battery powered device
JP2017020852A (en) Embedded device
JP2900154B1 (en) Electronic clock with auto calendar
JP3281757B2 (en) Automatic correction device for oscillation error in electronic timepiece
JPH04319694A (en) Clock device with time adjustment data memory
JPH05274057A (en) Time counting device
JPH0643760Y2 (en) Electronic watch with temperature compensation function
JPH07318669A (en) Dual clock system for information equipment
JP2003240884A (en) Electronic timepiece device, time correction method for electronic timepiece device and time correction program
JPH07219672A (en) High precision clock circuit
JPS5926311Y2 (en) electronic clock

Legal Events

Date Code Title Description
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

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080305

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090305

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090305

Year of fee payment: 10

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090305

Year of fee payment: 10

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090305

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100305

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees