JP3781901B2 - Timing system - Google Patents

Timing system Download PDF

Info

Publication number
JP3781901B2
JP3781901B2 JP20117798A JP20117798A JP3781901B2 JP 3781901 B2 JP3781901 B2 JP 3781901B2 JP 20117798 A JP20117798 A JP 20117798A JP 20117798 A JP20117798 A JP 20117798A JP 3781901 B2 JP3781901 B2 JP 3781901B2
Authority
JP
Japan
Prior art keywords
correction
time
unit
voltage
power supply
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
JP20117798A
Other languages
Japanese (ja)
Other versions
JP2000019273A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP20117798A priority Critical patent/JP3781901B2/en
Publication of JP2000019273A publication Critical patent/JP2000019273A/en
Application granted granted Critical
Publication of JP3781901B2 publication Critical patent/JP3781901B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electric Clocks (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、発振器による発振出力に基づいて計時動作して時計情報を得る計時システムに係り、特に電源電圧の変動により発振周波数が変動する場合の計時動作への影響を補正する計時システムに関するものである。
【0002】
【従来の技術】
近年、カメラその他の電子機器において、時計機能を組み込んで時計付きとすることが頻繁に行なわれている。このような、電子機器における時計情報を得るための計時システムでは、一般に、定電圧回路を用いて定電圧を得る電源回路、該定電圧回路による定電圧を用いて所定周波数で発振する発振器および該発振器の発振出力をカウントして計時し、時計情報を得る計時手段が設けられる。該時計情報は、単なる時計のみならず、日付および曜日等の情報を提供するカレンダ情報としても利用されている。計時システムにおいては、計時動作を安定に行なわせることが必要であるため、一般に、安定な発振周波数を得ることが可能なセラミック振動子または水晶振動子等を用いた発振器が用いられる。
【0003】
ところで、カメラ等に代表される携帯型の電子機器においては、多くの場合、主電源として電池を用いているため、撮影等に使用する時以外には電源の消費を抑制するため省電力状態で動作させることが多い。しかし、時計情報を維持するためには、省電力状態においても、計時システムを正常に稼働させる必要がある。
一般に、省電力状態においては、メモリの記憶内容の保持および計時システムの動作維持のみを達成すればよいので、通常動作時よりもかなり低い電圧を供給する。このため、発振周波数の安定なセラミック振動子等を用いた発振器といえども、比較的安価な発振器では、発振周波数が若干変動することは避けられない。特に、カメラ等の小型携帯用電子機器においては、製品を安価に提供するためにも発振器に多大なコストをさくことは望ましくない。
【0004】
ところで、特開平5−75445号公報には、コンデンサ(C)および抵抗(R)によるCR発振回路による安価なCR発振器を用いて、発振周波数精度を高める技術が開示されている。CR発振器は、発振周波数が電源電圧および周囲温度等により変動するため、セラミック振動子等を用いた発振器に比して周波数精度が低い。そこで、特開平5−75445号公報においては、電源電圧および周囲温度等を変化させた際の周波数変動に対応する補正情報によって、CR発振器の発振周波数精度を高めるようにしている。
【0005】
【発明が解決しようとする課題】
上述した特開平5−75445号公報においては、電源電圧および周囲温度等の変化による発振周波数変動を補正するが、CR発振器における周波数変動の要因は電源電圧および周囲温度等のみに限らず、しかも電源電圧および周囲温度等の変化を検出し補正する動作を迅速にしかも正確に行なうことも困難である。したがって、特開平5−75445号公報に開示されたCR発振器は、時計機能等の計時用クロックとして充分な精度を得ることはできない。
【0006】
また、セラミック振動子等を用いた正確な発振器においても電源電圧が大きく変化する場合には、発振周波数の変動を避けることはできない。すなわち、省電力状態の電源電圧と昇圧して通常動作状態とした電源電圧とで、発振器の発振周波数が異なる。このため、該発振器の出力を用いた計時動作による時計機能に誤差を生じる。特にセラミック振動子等を用いていても比較的安価な構成の発振器においては、発振周波数の変動が大きくなりがちである。
さらに、カメラ等のように携帯型の電子機器においては、省電力状態と通常使用状態とが頻繁に切換えられるので、電源電圧が頻繁に変化することになり、時計機能の計時誤差が増大する。また、切換選択される電源電圧の差が大きければ、計時誤差は一層大きくなる傾向がある。
【0007】
本発明は、上述した事情に鑑みてなされたもので、発振器の電源電圧の変化による発振周波数の誤差を適切に補正して、計時誤差を低減し得る計時システムを提供することを目的としている。
特に、本発明の請求項1の目的は、電源電圧による周波数変動を含む電圧特性が悪い発振器でも電源電圧の変化による発振周波数の誤差に基づく計時誤差を低減し、低コスト化を達成しつつ、高い補正精度を達成し得る計時システムを提供することにある。
特に、本発明の請求項2の目的は、計時補正を簡略化し得る計時システムを提供することにある。
特に、本発明の請求項3の目的は、計時補正処理の簡略化を図った計時システムを提供することにある。
【0008】
特に、本発明の請求項4の目的は、合理的な補正処理を可能とする計時システムを提供することにある。
特に、本発明の請求項5の目的は、計時処理の安定化を図った計時システムを提供することにある。
特に、本発明の請求項6の目的は、安価に効果的な計時補正を実現し得る計時システムを提供することにある。
特に、本発明の請求項7の目的は、効率の良い計時補正を可能とする計時システムを提供することにある
【0009】
【課題を解決するための手段】
請求項1に記載した本発明に係る計時システムは、上述した目的を達成するために、なる複数の電圧を出力する電源回路と、
前記電源回路出力する電圧を電源とし、各出力電圧に応じた周波数で発振する発振器と、
前記発振器の発振出力を用いて計時する計時手段と、
前記電源回路の出力電圧を選択的に切換制御する電圧切換手段と
記電源回路の出力電圧の変化に基づく前記発振器の発振周波数変動に対応して計時補正を施す計時補正手段と
を備え、
前記計時補正手段は、前記電圧切換手段により選択される時間的割合が最も大きい状態を基準電圧状態とし、該基準電圧状態での前記電源回路の出力電圧における前記発振器の周波数を基準周渡数として、前記電源回路の出力電圧の変化に基づく前記発振器の発信周波数変動に対応し、且つ計時誤差が規定時間に達する時間を補正間隔として、該補正間隔毎に前記規定時間ずつ計時補正を施し、
さらに、
前記基準周波数との誤差が生じる電圧選択状態を被補正電圧状態として該被補正電圧状態における経過時間を計時し、且つ保持する補正用計時手段を有し、
該補正用計時手段は、前記経過時間が前記補正間隔に達する以前に前記基準電圧状態に移行した場合には、該経過時間の計時を停止して保持するとともに、前記被補正電圧状態に復帰した際には、前記経過時間の計時を継続するように構成したことを特徴としている。
【0010】
請求項2に記載した本発明に係る計時システムは、前記補正用計時手段は、計時保持している経過時間が前記補正間隔に達して、前記計時補正手段による補正が施されると、該経過時間をリセットする手段を含むこと
を特徴としている。
請求項3に記載した本発明に係る計時システムは、前記計時補正手段が、計時誤差が1秒に達する時間を補正間隔とし、該補正間隔毎に1秒ずつ計時補正する手段を含むことを特徴としている。
【0011】
請求項4に記載した本発明に係る計時システムは、前記計時補正手段が、前記補正間隔の単位を補正間隔単位とし、該補正間隔が1時間未満であるときは該補正間隔単位を分単位とし、1日未満であるときは時間単位とし、1月未満であるときは日単位とし、1年未満であるときは月単位とし、そして1年以上であるときは年単位とする手段を含むことを特徴としている。
請求項5に記載した本発明に係る計時システムは、前記計時補正手段が、1分間に1秒以上の誤差を発生する場合には、前記補正間隔を1分とし且つ補正量を秒単位として、該補正間隔1分毎に上記補正量を補正する手段を含むことを特徴としている。
【0012】
請求項6に記載した本発明に係る計時システムは、前記計時補正手段が、予め別途に外部計測装置により測定して求めた前記補正間隔、補正量および補正間隔単位を記憶する記憶手段を含むことを特徴としている。
請求項7に記載した本発明に係る計時システムは、前記計時補正手段が、前記基準電圧状態の基準周波数においては補正を行わない手段であることを特徴としている。
【0014】
【作用】
すなわち、本発明の請求項1による計時システムは、なる複数の電圧を出力する電源回路と、
前記電源回路出力する電圧を電源とし、各出力電圧に応じた周波数で発振する発振器と、
前記発振器の発振出力を用いて計時する計時手段と、
前記電源回路の出力電圧を選択的に切換制御する電圧切換手段と
記電源回路の出力電圧の変化に基づく前記発振器の発振周波数変動に対応して計時補正を施す計時補正手段と
を備え、
前記計時補正手段は、前記電圧切換手段により選択される時間的割合が最も大きい状態を基準電圧状態とし、該基準電圧状態での前記電源回路の出力電圧における前記発振器の周波数を基準周渡数として、前記電源回路の出力電圧の変化に基づく前記発振器の発信周波数変動に対応し、且つ計時誤差が規定時間に達する時間を補正間隔として、該補正間隔毎に前記規定時間ずつ計時補正を施し、
さらに、
前記基準周波数との誤差が生じる電圧選択状態を被補正電圧状態として該被補正電圧状態における経過時間を計時し、且つ保持する補正用計時手段を有し、
該補正用計時手段は、前記経過時間が前記補正間隔に達する以前に前記基準電圧状態に移行した場合には、該経過時間の計時を停止して保持するとともに、前記被補正電圧状態に復帰した際には、前記経過時間の計時を継続するように構成したものである。
このような構成により、定電圧電源に対する発振周波数が安定な発振器の電源電圧の変化による発振周波数の誤差を適切に補正し、特に、電源電圧による周波数変動を含む電圧特性が悪い発振器でも電源電圧の変化による発振周波数の誤差に基づく計時誤差を低減し、低コスト化を達成しつつ、一層高い補正精度を達成することができる。
【0015】
また、本発明の請求項2による計時システムは、前記補正計時手段が、計時保持している経過時間が前記補正間隔に達して、前記計時補正手段による補正が施されると、該経過時間をリセットする手段を含む。
このような構成により、特に、計時補正を一層簡略化することができる。
本発明の請求項3による計時システムは、計時誤差が1秒に達する時間を補正間隔とし、該補正間隔毎に1秒ずつ計時補正する手段を前記計時補正手段が含む。このような構成により、特に、計時補正処理を一層簡略化することができる。
【0016】
本発明の請求項4による計時システムは、前記計時補正手段が、前記補正間隔の単位を補正間隔単位とし、該補正間隔が1時間未満であるときは該補正間隔単位を分単位とし、1日未満であるときは時間単位とし、1月未満であるときは日単位とし、1年未満であるときは月単位とし、そして1年以上であるときは年単位とする手段を含む。
このような構成により、特に、合理的な補正処理が可能となる。
本発明の請求項5による計時システムは、1分間に1秒以上の誤差が発生する場合には、前記補正間隔を1分とし且つ補正量を秒単位として、該補正間隔1分毎に上記補正量を補正する手段を前記計時補正手段が含む。
このような構成により、特に、計時処理を一層安定化することができる。
【0017】
本発明の請求項6による計時システムは、前記計時補正手段が、予め別途に外部計測装置を用いた実験により測定して求めた前記補正間隔、補正量および補正間隔単位を記憶する記憶手段を含む。
このような構成により、特に、安価に効果的な計時補正を実現することができる。
本発明の請求項7による計時システムは、前記計時補正手段が、前記基準電圧状態の基準周波数においては補正を行わない手段である。
このような構成により、特に、効率の良い計時補正が可能となる。
【0019】
【発明の実施の形態】
以下、実施の形態に基づき、図面を参照して本発明の、例えばカメラのような電子機器システムに組み込んだ計時システムを詳細に説明する。例えば、この計時システムをカメラに組み込んだ場合には、時計機能付きカメラとして構成される。
図1は、本発明の一つの実施の形態に係る計時システムの構成を示している。図1に示す計時システムは、この場合時計機能付きカメラに組み込んでいるものとする。図1の計時システムは、CPU(中央処理装置)1、定電圧発生回路2、電源電池3、第1の発振器4、第2の発振器5、液晶表示器(以下、「LCD」と称する)6、不揮発性メモリ(以下、「EEPROM」と称する)7、メインスイッチ8、時計モードスイッチ9および時計セットスイッチ10を具備している。
【0020】
CPU(中央処理装置)1は、電源入力端VCCとグラウンドコモン端子GCとの間に与えられる定電圧発生回路2の出力を電源としてカメラ機能部分(図示していない)を含むシステム全体を制御する。このCPU1については、後に詳述する。
定電圧発生回路2は、電源電池3の出力電圧を用い、電池電源3の出力電圧そのままの3Vおよびそれを昇圧した5Vの定電圧を、CPU1の制御に従って選択的に切換えてCPU1に供給する。
電源電池3は、この計時システムの電源であり、3Vの電圧を定電圧発生回路2に供給する。
第1および第2の発振器4および5は、2系統クロックを発生する発振器であり、これら第1および第2の発振器4および5の動作は、CPU1により制御される。
【0021】
第1の発振器4は、セラミック振動子X1、コンデンサC1およびC2を有するセラミック発振器である。該第1の発振器4は、システムの動作待機状態においてCPU1により用いられるが、システムの休止状態では使用されず、CPU1の制御により停止される。
第2の発振器5は、水晶振動子X2、抵抗R、コンデンサC3およびC4を有する水晶発振器であり、システムの動作待機状態および休止状態の何れにおいても動作してCPU1に計時クロックを供給する。該第2の発振器5は、計時用の発振器であり、安定な発振周波数で発振するが、電源電圧が3Vのときと5Vのときとでは、若干発振周波数が変動する。
【0022】
LCD6は、CPU1により制御されて、計時に基づく時計表示を行なう。EEPROM7は、電子的に消去・書換え可能で且つ不揮発性のメモリであり、システム出荷前の調整値等を格納する。この場合、該EEPROM7に後述する補正間隔値および補正量等を格納する。
メインスイッチ8は、操作時にのみオンとなる自己復帰形のスイッチSW1からなり、システムを起動して、CPU1を動作待機状態とするとともに、システムを停止させてCPU1を休止状態とする。これら動作待機状態と休止状態は、メインスイッチ8のスイッチSW1の操作によるトグル動作にて切換えられ、メインスイッチ8のスイッチSW1の操作毎に交互に選択される。なお、CPU1が動作待機状態にあるときには、カメラ機能部分等の操作により、必要に応じてカメラ等の動作状態に設定され、所定の如く動作する。
【0023】
時計モードスイッチ9は、やはり操作時にのみオンとなる自己復帰形のスイッチSW2からなり、CPU1が動作待機状態にあるときにのみ、操作結果がCPU1で受け入れられ、LCD6等による時計表示の表示モードを変更する。この場合、時計モードスイッチ9のスイッチSW2の操作毎に、CPU1は、年月日表示→月日年表示→日月年表示→日時分表示→年月日表示と順次繰り返してLCD6による表示形態を変更する。
時計セットスイッチ10は、やはり自己復帰形のスイッチSW3およびスイッチSW4からなり、CPU1が動作待機状態にあるときにのみ、操作結果がCPU1で受け入れられ、LCD6等による時計表示の表示時刻および日時等を修正・設定する。スイッチSW4の操作によって、年、月、日、時および分の各項目のうちの修正・設定したい項目が順次選択される。項目が選択されると選択された項目の表示が点減する。この点滅状態で、スイッチSW3が有効となり、スイッチSW3の操作毎に点滅表示されている項目の値が「+1」される。
【0024】
CPU1は、メインスイッチ8のスイッチSW1の操作により起動して、動作待機状態となり、再度の操作により休止状態となる。CPU1は、このメインスイッチ8の動作による動作待機状態および休止状態の切換に連動して、制御端子CTLを介して定電圧発生回路2の出力電圧を制御し、動作待機状態においては5V、休止状態においては3Vの電源電圧をCPU1の電源入力端VCCとグラウンドコモン端子GCとの間に供給させる。
CPU1は、休止状態においては、定電圧回路2の出力電圧制御、計時用の第2の発振器5の駆動、該第2の発振器5の発振クロック出力を用いた計時制御、該計時動作の補正制御、計時結果のLCD6による表示制御、EEPROM7の不揮発保持制御、EEPROM7のアクセス制御およびメインスイッチ8の操作入力処理のみを行なう。
【0025】
CPU1は、動作待機状態においては、休止状態の制御処理に加えて、第1の発振器4の駆動、該第1の発振器4の発振クロック出力を用いた各種処理、時計モードスイッチ9の操作入力処理および時計セットスイッチ10の操作入力処理を行なう。
EEPROM7には、調整段階で、CPU1の電源入力端VCCに供給される電源電圧が3Vの場合の計時用の第2の発振器5の発振周波数と、該電源電圧が5V時の第2の発振器5の発振周波数とを、周波数測定装置等を用いて実測する。そして、発振周波数の相違により、1秒の誤差を生じる時間を分単位、時単位、日単位または月単位で求め、これを補正間隔とし、補正量を1秒としてEEPROM7に格納する。また、実測結果から1分以内に1秒を超える大きな誤差を生じる場合には、補正間隔を1分とし、秒単位の補正量をEEPROM7に格納する。
【0026】
CPU1は、電源電圧が3V(休止状態)の場合は、基準周波数であるため計時補正は行わない。そして、CPU1は、電源電圧が5V(動作待機状態)の場合には、計時動作に伴い、補正間隔時間を計測保持して、EEPROM7に格納された補正間隔および補正量に従って計時補正を行なう。なお、補正間隔時間は、計測途中で休止状態に移行した場合には、その値を保持して、次に動作待機状態になった時点で計測を再開継続し、与えられた補正間隔に達した時点で、該補正間隔時間の計測値をリセットする。
【0027】
次にこのように構成された計時システムの動作について、図2〜図4に示すフローチャートを参照して詳細に説明する。
図2は、メインスイッチ8による動作を示すフローチャートであり、自己復帰形のスイッチSW1をオン操作する度に割込み起動される。スイッチSW1がオン操作されると、まず、CPU1により休止状態か否かが判別され(ステップS11)、休止状態(定電圧発生回路2の出力電圧は3V)であれば、定電圧発生回路2の昇圧機能がオンとなって、定電圧発生回路2の出力電圧が5Vとなる(ステップS12)。すなわち、電圧発生回路2は、スイッチSW1の操作に応答してCPU1の制御により昇圧動作を開始し、CPU1の電源入力端VCCに供給される電源電圧は、電池電圧3Vから5Vに変化する。
【0028】
そして、第1の発振器4が発振動作を開始して、メインクロックをCPU1に供給して(ステップS13)、システムを動作待機状態に設定して、割込待ちに戻る。
この動作待機状態では、第1および第2の発振器4および5は両方とも発振していて、2系統のクロックを発振出力している。
このような動作待機状態で再度スイッチSW1をオン操作すると、ステップS11で、CPU1により休止状態か否かが判別され、休止状態(定電圧発生回路2の出力電圧は3V)でなければ、CPU1は休止状態へ移行して、第1の発振器4の動作が停止されて、メインクロックが停止される(ステップS14)。そして、定電圧発生回路2の昇圧機能がオフとなって、定電圧発生回路2の出力電圧が3Vとなる(ステップS15)。すなわち、電圧発生回路2は、スイッチSW1の操作に応答してCPU1の制御により昇圧動作を停止し、CPU1の電源入力端VCCに供給される電源電圧は、電池電圧3Vに変化する。
【0029】
なお、2系統クロックの第1および第2の発振器4および5のうちの計時用の第2の発振器5のみは、常時、動作待機状態および休止状態の何れにおいても発振し、休止状態においては第1の発振器4は停止する。また、定電圧発生回路2は、CPU1の制御により、昇圧動作をオフとして、昇圧を停止し、CPU1ヘの供給電源電圧は、5Vから3Vに戻る。
時計計時動作に係るスイッチ9,10におけるスイッチSW2〜4は、CPU1が動作待機状態にあるときにのみ受け付け可能であり、LCD6による時計表示の設定を変更することができる。
【0030】
時計モードスイッチ9を構成するスイッチSW2は、操作毎に図3に示すような表示モードの変更処理が行なわれる。まず、スイッチSW2が操作されると、CPU1は、前回の時計表示モード、つまりその時点での時計表示モードが、「年月日モード」であるか否かを判定し(ステップS21)、「年月日モード」であれば、この順序で表示する「年月日モード」に時計表示モードの表示をし(ステップS22)、割込み待ちに戻る。
スイッチSW2が操作されたときに、ステップS21で、従前の時計表示モードが、「年月日モード」でないと判定されれば、「月日年モード」であるか否かを判定し(ステップS23)、「月日年モード」であれば、月日年をこの順序で表示し(ステップS24)、割込み待ちに戻る。
【0031】
スイッチSW2が操作されたときに、ステップS21で、従前の時計表示モードが、「年月日モード」でないと判定され、ステップS23で、「月日年モード」でもないと判定されれば、次に「日月年モード」であるか否かを判定し(ステップS25)、「日月年モード」であれば、この順序で表示し(ステップS26)、割込み待ちに戻る。
スイッチSW2が操作されたときに、ステップS21で、従前の時計表示モードが、「年月日モード」でないと判定され、ステップS23で、「月日年モード」でないと判定され、ステップS25で「日月年モード」でないと判定されれば、「日時分モード」に時計表示モードを変更し(ステップS27)、割込み待ちに戻る。
すなわち、スイッチSW2による操作入力毎に、時計表示モードを、年月日表示→月日年表示→日月年表示→日時分表示→年月日表示と逐次繰り返し切換えることができる。
【0032】
なお、時計セットスイッチ10のスイッチSW3およびSW4は、時計/日付表示の年、月、日、時および分の修正用のスイッチである。スイッチSW4の操作により、年、月、日、時および分の項目のうちの修正する項目を選択する。スイッチSW4を操作すると、修正項目が年→月→日→時→分の順序で逐次選択されて、選択された項目の表示が点減表示となる。スイッチSW3は、この点滅表示状態において有効となり、スイッチSW3の操作毎に、点滅表示されている項目の値が+1される。
なお、EEPROM7には、システム出荷前の調整値等が格納されており、本発明の計時システムでは、このEEPROM7に計時補正のための補正間隔値および補正量を格納している。
【0033】
すなわち、調整段階で、CPU1の電源電圧が3Vの場合の時計用の第2の発振器5の発振周波数と電源電圧が5Vの場合の発振周波数とを周波数測定装置等を用いて測定する。この測定結果に基づきこれら発振周波数の相違により、1秒の誤差を生じる時間を分単位、時単位、日単位または月単位で算出し、これらを補正間隔とし、補正量を1秒としてEEPROM7に格納する。さらに、測定結果から1分間で1秒を超える誤差を生じると算定された場合には補正間隔を1分とし、秒単位の補正量をEEPROM7に格納する。
このような情報をEEPROM7に格納した状態での計時補正制御プログラムのフローチャートを図4に示す。
【0034】
図4に示す処理は、計時用の第2の発振器5の発振出力を分周して1秒間隔で割込を発生させた場合の1秒間隔で実行される割込処理である。1秒毎の割込みをカウントして、時計を1秒ずつ進めることにより、時計の計時を行なう(ステップS31)。
この場合、電源電圧が3Vの休止状態における周波数を基準周波数としている。割込み発生時の時計カウント処理後、電源電圧が3Vの休止状態にあるか否かを判定し(ステップS32)、割込発生時に電源電圧が3Vの休止状態にあるときは、基準周波数であるため計時補正は行わずに、処理を終了して、次の割込み待ちに戻る。
【0035】
ステップS32で休止状態にないと判定された場合、すなわち割込み発生時に電源電圧が5Vの待機状態にある場合には、EEPROM7に格納された値に基づいて計時補正を行う。まず、1分あたりの補正量が1を超えるか1以下かが判別され(ステップS33)、補正量が1を超える場合には、経過時間のカウント値が1分すなわち60秒に達したか否かを判定し(ステップS34)、達していなければ、処理を終了して、次の割込み待ちに戻る。
ステップS34で、経過時間のカウント値が60秒に達したと判定されると、その都度、その時点での計時結果に対して、秒データとして補正量、つまり補正秒数を加算して(ステップS35)、補正を行い、経過時間の秒カウント値をクリアして(ステップS36)、処理を終了して、次の割込み待ちに戻る。
【0036】
ステップS33で、1分あたりの補正量が1以下と判定された場合には、補正間隔単位のカウント数が補正間隔に一致した場合に+1秒の補正を行う(ステップS37〜S49)。
すなわち、補正間隔単位が分単位、時単位、日単位および月単位のいずれであるかが判定され(ステップS37)、分単位と判定された場合には、経過時間の分単位のカウント値が補正間隔に達したか否かを判定し(ステップS38)、達していなければ、処理を終了して、次の割込み待ちに戻る。
ステップS38で、経過時間の補正分のカウント値が補正間隔に達したと判定されると、その都度、その時点での計時結果に対して、秒データとして1秒を加算して(ステップS39)、補正を行い、経過時間の分カウント値をクリアして(ステップS40)、処理を終了して、次の割込み待ちに戻る。
【0037】
ステップS37で、補正間隔単位が時単位と判定された場合には、経過時間の時単位のカウント値が補正間隔に達したか否かを判定し(ステップS41)、達していなければ、処理を終了して、次の割込み待ちに戻る。
ステップS41で、経過時間の補正時のカウント値が補正間隔に達したと判定されると、その都度、その時点での計時結果に対して、秒データとして1秒を加算して(ステップS42)、補正を行い、経過時間の時カウント値をクリアして(ステップS43)、処理を終了して、次の割込み待ちに戻る。
ステップS37で、補正間隔単位が日単位と判定された場合には、経過時間の日単位のカウント値が補正間隔に達したか否かを判定し(ステップS44)、達していなければ、処理を終了して、次の割込み待ちに戻る。
【0038】
ステップS41で、経過時間の補正日のカウント値が補正間隔に達したと判定されると、その都度、その時点での計時結果に対して、秒データとして1秒を加算して(ステップS45)、補正を行い、経過時間の日カウント値をクリアして(ステップS46)、処理を終了して、次の割込み待ちに戻る。
ステップS37で、補正間隔単位が月単位と判定された場合には、経過時間の月単位のカウント値が補正間隔に達したか否かを判定し(ステップS47)、達していなければ、処理を終了して、次の割込み待ちに戻る。
ステップS47で、経過時間の補正月のカウント値が補正間隔に達したと判定されると、その都度、その時点での計時結果に対して、秒データとして1秒を加算して(ステップS48)、補正を行い、経過時間の月カウント値をクリアして(ステップS49)、処理を終了して、次の割込み待ちに戻る。
【0039】
また、経過時間が、補正間隔に一致する以前に、メインスイッチ8が操作されて休止状態(電源電圧3V)に移行した場合は、その時点での電源電圧5Vにおける経過時間のカウント値を記憶しておき、再度、動作待機状態(電源電圧5V)に復帰した際に、前回記憶した経過時間のカウント値から経過時間のカウントを開始する。
このようにして、電圧特性の悪い計時用の発振器を用いた場合にも、適切な補正を行うことができ、従って高精度の計時による時計機能を提供することができる。また、計時用の発振器として、電圧特性が悪い低コストの発振器を用いることができるので、計時システムの低コスト化も可能となる。
【0040】
【発明の効果】
以上述べたように、本発明の請求項1の計時システムによれば、定電圧電源に対する発振周波数が安定な発振器の電源電圧の変化による発振周波数の誤差を適切に補正し、特に、電源電圧による周波数変動を含む電圧特性が悪い発振器でも電源電圧の変化による発振周波数の誤差に基づく計時誤差を一層高い補正精度で且つ効率良く低減し、低コスト化を達成し得る計時システムを提供することができる。
【0041】
また、本発明の請求項2の計時システムによれば、前記補正用計時手段が、計時保持している経過時間が前記補正間隔に達して、前記計時補正手段による補正が施されると、該経過時間をリセットする手段を含む構成により、特に、計時補正一層簡略化することができる。
本発明の請求項3の計時システムによれば、計時誤差が1秒に達する時間を補正間隔とし、該補正間隔毎に1秒ずつ計時補正する手段を前記計時補正手段が含む構成により、特に、計時補正処理を一層簡略化することができる。
【0042】
本発明の請求項4の計時システムによれば、前記計時補正手段が、前記補正間隔の単位を補正間隔単位とし、該補正間隔が1時間未満であるときは該補正間隔単位を分単位とし、1日未満であるときは時間単位とし、1月未満であるときは日単位とし、1年未満であるときは月単位とし、そして1年以上であるときは年単位とする手段を含む構成により、特に、合理的な補正処理が可能となる。
本発明の請求項5の計時システムによれば、1分間に1秒以上の誤差が発生する場合には、前記補正間隔を1分とし且つ補正量を秒単位として、該補正間隔1分毎に上記補正量を補正する手段を前記計時補正手段が含む構成により、特に、計時処理を一層安定化することができる。
【0043】
本発明の請求項6の計時システムによれば、前記計時補正手段が、予め別途に外部計測装置により測定して求めた前記補正間隔、補正量および補正間隔単位を記憶する記憶手段を含む構成により、特に、安価に効果的な計時補正を実現することができる。
本発明の請求項7の計時システムによれば、前記計時補正手段を、前記基準電圧状態の基準周波数においては補正を行わない手段とすることにより、特に、効率の良い計時補正が可能となる。
【図面の簡単な説明】
【図1】 本発明の一つの実施の形態に係る計時システムの構成を模式的に示すブロック図である。
【図2】 図1の計時システムにおけるメインスイッチ操作時の動作を説明するためのフローチャートである。
【図3】 図1の計時システムにおける時計モードスイッチ操作時の動作を説明するためのフローチャートである。
【図4】 図1の計時システムにおける計時補正を含む時計割込処理時の動作を説明するためのフローチャートである。
【符号の説明】
1 CPU(中央処理装置)
2 定電圧発生回路
3 電源電池
4 第1の発振器
5 第2の発振器
6 液晶表示装置(LCD)
7 不揮発性メモリ(EEPROM)
8 メインスイッチ
9 時計モードスイッチ
10 時計セットスイッチ
X1 セラミック振動子
X2 水晶振動子
R抵抗
C1,C2,C3,C4 コンデンサ
SW1 ,SW2,SW3,SW4 スイッチ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a clocking system that obtains clock information by clocking based on an oscillation output from an oscillator, and more particularly to a clocking system that corrects the influence on clocking operation when the oscillation frequency fluctuates due to fluctuations in power supply voltage. is there.
[0002]
[Prior art]
In recent years, in cameras and other electronic devices, it is frequently performed to incorporate a clock function and have a clock. In such a timekeeping system for obtaining clock information in an electronic device, generally, a power supply circuit that obtains a constant voltage using a constant voltage circuit, an oscillator that oscillates at a predetermined frequency using a constant voltage by the constant voltage circuit, and the Time counting means for obtaining clock information by counting the oscillation output of the oscillator and providing time information is provided. The clock information is used not only as a clock but also as calendar information for providing information such as date and day of the week. In the timekeeping system, it is necessary to stably perform the timekeeping operation. Therefore, generally, an oscillator using a ceramic vibrator or a crystal vibrator that can obtain a stable oscillation frequency is used.
[0003]
By the way, in portable electronic devices represented by cameras and the like, in many cases, a battery is used as a main power source. Therefore, in a power saving state in order to suppress power consumption except when used for photographing or the like. It is often operated. However, in order to maintain the clock information, it is necessary to operate the timing system normally even in the power saving state.
In general, in the power saving state, only the retention of the stored contents of the memory and the maintenance of the operation of the timing system need be achieved. For this reason, even with an oscillator using a ceramic resonator or the like having a stable oscillation frequency, it is inevitable that the oscillation frequency slightly varies with a relatively inexpensive oscillator. In particular, in small portable electronic devices such as cameras, it is not desirable to reduce the cost of an oscillator in order to provide a product at a low cost.
[0004]
By the way, Japanese Patent Laid-Open No. 5-75445 discloses a technique for improving the oscillation frequency accuracy by using an inexpensive CR oscillator by a CR oscillation circuit using a capacitor (C) and a resistor (R). The CR oscillator has a lower frequency accuracy than an oscillator using a ceramic vibrator or the like because the oscillation frequency varies depending on the power supply voltage and the ambient temperature. Therefore, in Japanese Patent Laid-Open No. 5-75445, the oscillation frequency accuracy of the CR oscillator is improved by correction information corresponding to frequency fluctuations when the power supply voltage, the ambient temperature, and the like are changed.
[0005]
[Problems to be solved by the invention]
In the above-mentioned Japanese Patent Application Laid-Open No. 5-75445, oscillation frequency fluctuations due to changes in the power supply voltage and ambient temperature are corrected. However, the cause of the frequency fluctuations in the CR oscillator is not limited to the power supply voltage and ambient temperature. It is also difficult to quickly and accurately perform an operation for detecting and correcting changes in voltage and ambient temperature. Therefore, the CR oscillator disclosed in Japanese Patent Application Laid-Open No. 5-75445 cannot obtain sufficient accuracy as a clock for clock functions.
[0006]
Even in an accurate oscillator using a ceramic vibrator or the like, if the power supply voltage changes greatly, fluctuations in the oscillation frequency cannot be avoided. That is, the oscillation frequency of the oscillator differs between the power supply voltage in the power saving state and the power supply voltage that has been boosted to the normal operation state. For this reason, an error occurs in the clock function by the time measuring operation using the output of the oscillator. In particular, even in the case of using a ceramic vibrator or the like, in an oscillator having a relatively inexpensive configuration, fluctuations in oscillation frequency tend to be large.
Furthermore, in a portable electronic device such as a camera, the power saving state and the normal use state are frequently switched, so that the power supply voltage changes frequently, and the time measurement error of the clock function increases. Further, if the difference between the power supply voltages to be switched and selected is large, the time measurement error tends to be further increased.
[0007]
  The present invention has been made in view of the above-described circumstances., DepartureIt is an object of the present invention to provide a timing system capable of appropriately correcting an oscillation frequency error due to a change in power supply voltage of a vibrator and reducing a timing error.
In particular, the object of claim 1 of the present invention is to achieve a reduction in cost by reducing a time error based on an oscillation frequency error due to a change in power supply voltage even in an oscillator having poor voltage characteristics including frequency fluctuations due to the power supply voltage.While achieving high correction accuracyIt is to provide a timekeeping system.
In particular, the object of claim 2 of the present invention is toSimplify timing correctionIt is to provide a timekeeping system.
In particular, an object of claim 3 of the present invention is to provide a timing system that simplifies the timing correction process.
[0008]
  In particular, an object of claim 4 of the present invention is to provide a timing system that enables a rational correction process.
In particular, an object of claim 5 of the present invention is to provide a timekeeping system in which timekeeping processing is stabilized.
In particular, an object of claim 6 of the present invention is to provide a timing system capable of realizing effective timing correction at low cost.
In particular, an object of claim 7 of the present invention is to provide a timing system that enables efficient timing correction..
[0009]
[Means for Solving the Problems]
  In order to achieve the above-described object, the timing system according to the present invention described in claim 1DifferentPluralPower ofA power supply circuit that outputs pressure,
The power supply circuitButoutputVoltagePowerAccording to each output voltageAn oscillator that oscillates at a frequency;
Clocking means for clocking using the oscillation output of the oscillator;
Voltage switching means for selectively switching and controlling the output voltage of the power supply circuit;,
in frontCorresponding to fluctuations in the oscillation frequency of the oscillator based on changes in the output voltage of the power supply circuitTotalA time correction means for correcting the time, and
With
The time correction means has a state in which the time ratio selected by the voltage switching means is the largest as a reference voltage state, and uses the frequency of the oscillator in the output voltage of the power supply circuit in the reference voltage state as a reference frequency. , Corresponding to the oscillation frequency fluctuation of the oscillator based on the change in the output voltage of the power supply circuit, and the time when the time error reaches the specified time as a correction interval, the time correction is performed by the specified time for each correction interval,
further,
A correction timing means for measuring and holding an elapsed time in the corrected voltage state with the voltage selection state in which an error from the reference frequency is generated as a corrected voltage state;
When the elapsed time shifts to the reference voltage state before the elapsed time reaches the correction interval, the correction timing unit stops and holds the elapsed time and returns to the corrected voltage state. When configured, it was configured to continue counting the elapsed time.It is characterized by that.
[0010]
  The timekeeping system according to the present invention described in claim 2 is:The correction timing means includes means for resetting the elapsed time when the elapsed time held by the time reaches the correction interval and the correction by the time correction means is performed.
It is characterized by.
According to a third aspect of the present invention, there is provided the timekeeping system according to the present invention, wherein the timekeeping correction means includes means for correcting the timekeeping by 1 second every correction interval, with a time when the timekeeping error reaches 1 second as a correction interval. It is said.
[0011]
In the timing system according to the present invention described in claim 4, the timing correction means uses the correction interval unit as a correction interval unit, and when the correction interval is less than one hour, sets the correction interval unit as a minute unit. Including means to set the time unit when it is less than one day, the day unit when it is less than one month, the month unit when it is less than one year, and the year unit when it is one year or more It is characterized by.
In the timekeeping system according to the present invention described in claim 5, when the time correction means generates an error of 1 second or more per minute, the correction interval is 1 minute and the correction amount is in seconds. A means for correcting the correction amount every one minute is included.
[0012]
The timekeeping system according to the present invention described in claim 6 includes storage means for storing the correction interval, the correction amount, and the correction interval unit obtained by the time correction means previously separately measured by an external measurement device. It is characterized by.
The timekeeping system according to the present invention described in claim 7 is characterized in that the time correction unit is a unit that does not perform correction at a reference frequency in the reference voltage state.
[0014]
[Action]
  That is, the timing system according to claim 1 of the present invention is:DifferentPluralPower ofA power supply circuit that outputs pressure,
The power supply circuitButoutputVoltagePowerAccording to each output voltageAn oscillator that oscillates at a frequency;
Clocking means for clocking using the oscillation output of the oscillator;
Voltage switching means for selectively switching and controlling the output voltage of the power supply circuit;,
in frontCorresponding to fluctuations in the oscillation frequency of the oscillator based on changes in the output voltage of the power supply circuitTotalA time correction means for correcting the time, and
With
The time correction means has a state in which the time ratio selected by the voltage switching means is the largest as a reference voltage state, and uses the frequency of the oscillator in the output voltage of the power supply circuit in the reference voltage state as a reference frequency. , Corresponding to the oscillation frequency fluctuation of the oscillator based on the change in the output voltage of the power supply circuit, and the time when the time error reaches the specified time as a correction interval, the time correction is performed by the specified time for each correction interval,
further,
A correction timing means for measuring and holding an elapsed time in the corrected voltage state with the voltage selection state in which an error from the reference frequency is generated as a corrected voltage state;
When the elapsed time shifts to the reference voltage state before the elapsed time reaches the correction interval, the correction timing unit stops and holds the elapsed time and returns to the corrected voltage state. In this case, the elapsed time is continuously measured.
With such a configuration, an error in the oscillation frequency due to a change in the power supply voltage of the oscillator having a stable oscillation frequency with respect to the constant voltage power supply is appropriately corrected. Reduced clocking error based on oscillation frequency error due to change, achieving low costWhile achieving higher correction accuracycan do.
[0015]
  In addition, the timekeeping system according to claim 2 of the present invention includesCorrection timingMeansAnd means for resetting the elapsed time when the elapsed time held by the time measurement reaches the correction interval and correction is performed by the time correction means.
With such a configuration, especially, TotalTime correctionSimplify furtherbe able to.
In the timekeeping system according to claim 3 of the present invention, the time correction means includes means for correcting the time when the time error reaches 1 second as a correction interval, and correcting the time by 1 second every correction interval. With such a configuration, in particular, the time correction process can be further simplified.
[0016]
In the time measuring system according to claim 4 of the present invention, the time correction means uses the correction interval unit as a correction interval unit, and when the correction interval is less than one hour, the correction interval unit as a minute unit, Means less than 1 hour, less than 1 month, more than 1 year, less than 1 year, more than 1 year, and more than 1 year.
With such a configuration, it is particularly possible to perform a rational correction process.
In the time measuring system according to claim 5 of the present invention, when an error of 1 second or more occurs in one minute, the correction interval is set to 1 minute and the correction amount is set to a second unit, and the correction is performed every 1 minute. The time correction means includes means for correcting the quantity.
With such a configuration, in particular, it is possible to further stabilize the timing process.
[0017]
The timekeeping system according to claim 6 of the present invention includes a storage means for storing the correction interval, the correction amount, and the correction interval unit, which are obtained by the time correction means previously measured by an experiment separately using an external measuring device. .
With such a configuration, it is possible to realize particularly effective time correction at a low cost.
In the timekeeping system according to claim 7 of the present invention, the time correction unit does not perform correction at the reference frequency in the reference voltage state.
With such a configuration, particularly efficient time correction can be performed.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, based on an embodiment, a time measuring system incorporated in an electronic device system such as a camera of the present invention will be described in detail with reference to the drawings. For example, when this timing system is incorporated in a camera, it is configured as a camera with a clock function.
FIG. 1 shows the configuration of a timing system according to one embodiment of the present invention. In this case, the timekeeping system shown in FIG. 1 is incorporated in a camera with a clock function. 1 includes a CPU (central processing unit) 1, a constant voltage generation circuit 2, a power supply battery 3, a first oscillator 4, a second oscillator 5, and a liquid crystal display (hereinafter referred to as “LCD”) 6. A nonvolatile memory (hereinafter referred to as “EEPROM”) 7, a main switch 8, a timepiece mode switch 9, and a timepiece set switch 10.
[0020]
A CPU (central processing unit) 1 controls the entire system including a camera function part (not shown) using an output of a constant voltage generation circuit 2 applied between a power input terminal VCC and a ground common terminal GC as a power source. . The CPU 1 will be described in detail later.
The constant voltage generation circuit 2 uses the output voltage of the power source battery 3 to selectively switch 3V, which is the output voltage of the battery power source 3 as it is, and a constant voltage of 5V obtained by boosting it, to the CPU 1 under the control of the CPU 1.
The power supply battery 3 is a power supply for this timing system, and supplies a voltage of 3 V to the constant voltage generation circuit 2.
The first and second oscillators 4 and 5 are oscillators that generate dual-system clocks, and the operations of the first and second oscillators 4 and 5 are controlled by the CPU 1.
[0021]
The first oscillator 4 is a ceramic oscillator having a ceramic vibrator X1 and capacitors C1 and C2. The first oscillator 4 is used by the CPU 1 in the system operation standby state, but is not used in the system inactive state and is stopped by the control of the CPU 1.
The second oscillator 5 is a crystal oscillator having a crystal resonator X2, a resistor R, and capacitors C3 and C4. The second oscillator 5 operates in both an operation standby state and a sleep state of the system, and supplies a clock to the CPU 1. The second oscillator 5 is a time-measurement oscillator and oscillates at a stable oscillation frequency. However, the oscillation frequency slightly varies between the power supply voltage of 3V and 5V.
[0022]
The LCD 6 is controlled by the CPU 1 to perform a clock display based on time measurement. The EEPROM 7 is an electronically erasable / rewritable and non-volatile memory, and stores adjustment values and the like before system shipment. In this case, a correction interval value and a correction amount, which will be described later, are stored in the EEPROM 7.
The main switch 8 is composed of a self-returning switch SW1 that is turned on only at the time of operation. The main switch 8 starts up the system, puts the CPU 1 into an operation standby state, stops the system, and puts the CPU 1 into a sleep state. The operation standby state and the resting state are switched by a toggle operation by the operation of the switch SW1 of the main switch 8, and are alternately selected every time the switch SW1 of the main switch 8 is operated. When the CPU 1 is in the operation standby state, the camera is set to the operation state as necessary by operating the camera function part or the like, and operates in a predetermined manner.
[0023]
The clock mode switch 9 is composed of a self-returning switch SW2 that is turned on only during operation. Only when the CPU 1 is in an operation standby state, the operation result is accepted by the CPU 1, and the display mode of the clock display by the LCD 6 or the like is changed. change. In this case, every time the switch SW2 of the clock mode switch 9 is operated, the CPU 1 sequentially repeats the date display on the LCD 6 in the order of date display, date display, date display, date display, date display, date display, date display. change.
The clock set switch 10 is also composed of a self-returning switch SW3 and a switch SW4. Only when the CPU 1 is in an operation standby state, the operation result is accepted by the CPU 1, and the display time and date of the clock display by the LCD 6 or the like are set. Modify and set. By the operation of the switch SW4, the item to be corrected / set among the items of year, month, day, hour and minute is sequentially selected. When an item is selected, the display of the selected item is reduced. In this blinking state, the switch SW3 becomes effective, and the value of the item blinking displayed every time the switch SW3 is operated is “+1”.
[0024]
The CPU 1 is activated by the operation of the switch SW1 of the main switch 8, enters an operation standby state, and enters a dormant state by performing another operation. The CPU 1 controls the output voltage of the constant voltage generation circuit 2 through the control terminal CTL in conjunction with switching between the operation standby state and the hibernation state by the operation of the main switch 8. In FIG. 3, a power supply voltage of 3V is supplied between the power input terminal VCC of the CPU 1 and the ground common terminal GC.
In the rest state, the CPU 1 controls the output voltage of the constant voltage circuit 2, drives the second oscillator 5 for timing, controls the timing using the oscillation clock output of the second oscillator 5, and controls the correction of the timing operation. Only the display control of the timing result by the LCD 6, the nonvolatile holding control of the EEPROM 7, the access control of the EEPROM 7, and the operation input processing of the main switch 8 are performed.
[0025]
In the operation standby state, the CPU 1 drives the first oscillator 4, performs various processes using the oscillation clock output of the first oscillator 4, and inputs the operation of the clock mode switch 9 in addition to the control process in the sleep state. And the operation input process of the clock set switch 10 is performed.
In the EEPROM 7, at the adjustment stage, the oscillation frequency of the second oscillator 5 for clocking when the power supply voltage supplied to the power input terminal VCC of the CPU 1 is 3V, and the second oscillator 5 when the power supply voltage is 5V. Is actually measured using a frequency measuring device or the like. Then, the time at which an error of 1 second occurs due to the difference in oscillation frequency is obtained in minutes, hours, days or months, and this is set as a correction interval, and the correction amount is stored in the EEPROM 7 as 1 second. When a large error exceeding 1 second occurs within 1 minute from the actual measurement result, the correction interval is set to 1 minute, and the correction amount in seconds is stored in the EEPROM 7.
[0026]
When the power supply voltage is 3 V (resting state), the CPU 1 does not perform time correction because it is the reference frequency. When the power supply voltage is 5 V (operation standby state), the CPU 1 measures and holds the correction interval time in accordance with the time measuring operation, and performs time correction according to the correction interval and the correction amount stored in the EEPROM 7. In addition, the correction interval time is held in the middle of the measurement, when the transition to the dormant state is held, the measurement is resumed when the next operation standby state is reached, and reaches the given correction interval At the time, the measurement value of the correction interval time is reset.
[0027]
Next, the operation of the time measuring system configured as described above will be described in detail with reference to the flowcharts shown in FIGS.
FIG. 2 is a flowchart showing the operation of the main switch 8 and is activated when the self-return switch SW1 is turned on. When the switch SW1 is turned on, the CPU 1 first determines whether or not it is in a resting state (step S11). If it is in a resting state (the output voltage of the constant voltage generating circuit 2 is 3V), the constant voltage generating circuit 2 The boosting function is turned on, and the output voltage of the constant voltage generation circuit 2 becomes 5V (step S12). That is, the voltage generation circuit 2 starts a boost operation under the control of the CPU 1 in response to the operation of the switch SW1, and the power supply voltage supplied to the power supply input terminal VCC of the CPU 1 changes from the battery voltage 3V to 5V.
[0028]
Then, the first oscillator 4 starts an oscillating operation, supplies the main clock to the CPU 1 (step S13), sets the system to an operation standby state, and returns to waiting for an interrupt.
In this operation standby state, both the first and second oscillators 4 and 5 oscillate, and oscillate and output two clocks.
When the switch SW1 is turned on again in such an operation standby state, in step S11, the CPU 1 determines whether or not it is in a resting state. If it is not in a resting state (the output voltage of the constant voltage generating circuit 2 is 3V), the CPU 1 The operation shifts to the sleep state, the operation of the first oscillator 4 is stopped, and the main clock is stopped (step S14). Then, the boosting function of the constant voltage generating circuit 2 is turned off, and the output voltage of the constant voltage generating circuit 2 becomes 3V (step S15). That is, the voltage generation circuit 2 stops the boosting operation under the control of the CPU 1 in response to the operation of the switch SW1, and the power supply voltage supplied to the power input terminal VCC of the CPU 1 changes to the battery voltage 3V.
[0029]
Of the first and second oscillators 4 and 5 of the two-system clock, only the second oscillator 5 for timekeeping always oscillates in both the operation standby state and the pause state, and in the pause state, 1 oscillator 4 stops. Further, the constant voltage generation circuit 2 stops the boosting by turning off the boosting operation under the control of the CPU 1, and the power supply voltage to the CPU 1 returns from 5V to 3V.
The switches SW2 to SW4 in the switches 9 and 10 relating to the clocking operation can be accepted only when the CPU 1 is in the operation standby state, and the setting of the clock display by the LCD 6 can be changed.
[0030]
The switch SW2 constituting the timepiece mode switch 9 undergoes display mode change processing as shown in FIG. 3 for each operation. First, when the switch SW2 is operated, the CPU 1 determines whether or not the previous clock display mode, that is, the clock display mode at that time is the “year / month / day mode” (step S21). If it is “month / day mode”, the clock display mode is displayed in the “year / month / day mode” displayed in this order (step S22), and the process returns to waiting for an interrupt.
When the switch SW2 is operated, if it is determined in step S21 that the previous clock display mode is not “year / month / day mode”, it is determined whether or not it is “month / year / year mode” (step S23). ), In the “month / day / year mode”, the month / year / year are displayed in this order (step S24), and the process returns to the interrupt wait state.
[0031]
When the switch SW2 is operated, if it is determined in step S21 that the previous clock display mode is not “year / month / day mode”, and if it is determined in step S23 that it is not “month / day / year mode”, then It is determined whether or not the “day / month / year mode” is set (step S25). If the “day / month / year mode” is selected, the display is performed in this order (step S26), and the process returns to the interrupt wait state.
When the switch SW2 is operated, it is determined in step S21 that the previous clock display mode is not “year / month / day mode”, in step S23 it is determined that it is not “month / day / year mode”. If it is determined that the mode is not the “day / month / year mode”, the clock display mode is changed to the “date / time mode” (step S27), and the process returns to the interrupt wait state.
That is, for each operation input by the switch SW2, the clock display mode can be sequentially switched as follows: year / month / day display → month / day / year display → day / month / year display → date / time display → year / month / day display.
[0032]
The switches SW3 and SW4 of the clock set switch 10 are switches for correcting the year / month / day / hour / minute of the clock / date display. By operating the switch SW4, the item to be corrected is selected from the year, month, day, hour and minute items. When the switch SW4 is operated, the correction items are sequentially selected in the order of year → month → day → hour → minute, and the display of the selected item becomes a dot reduction display. The switch SW3 is effective in this blinking display state, and the value of the item blinking is incremented by 1 every time the switch SW3 is operated.
The EEPROM 7 stores adjustment values and the like before system shipment. In the timekeeping system of the present invention, the EEPROM 7 stores correction interval values and correction amounts for time correction.
[0033]
That is, at the adjustment stage, the oscillation frequency of the second oscillator 5 for a clock when the power supply voltage of the CPU 1 is 3V and the oscillation frequency when the power supply voltage is 5V are measured using a frequency measuring device or the like. Based on this measurement result, the time for generating an error of 1 second is calculated in minutes, hours, days or months based on the difference in the oscillation frequency, and these are set as a correction interval and stored in the EEPROM 7 as a correction amount of 1 second. To do. Further, when it is calculated from the measurement result that an error exceeding 1 second occurs in 1 minute, the correction interval is set to 1 minute, and the correction amount in seconds is stored in the EEPROM 7.
FIG. 4 shows a flowchart of the time correction control program in a state where such information is stored in the EEPROM 7.
[0034]
The process shown in FIG. 4 is an interrupt process executed at intervals of 1 second when the oscillation output of the second oscillator 5 for timing is divided to generate interrupts at intervals of 1 second. The clock is counted by counting interrupts every second and advancing the clock one second at a time (step S31).
In this case, the frequency in the resting state where the power supply voltage is 3 V is set as the reference frequency. After the clock count process at the time of occurrence of an interrupt, it is determined whether or not the power supply voltage is in a 3V quiescent state (step S32). If the power supply voltage is in a 3V quiescent state when an interrupt occurs, it is the reference frequency. The processing is terminated without performing timekeeping correction, and the process returns to waiting for the next interrupt.
[0035]
If it is determined in step S32 that the power supply voltage is 5 V when the interruption occurs, the time correction is performed based on the value stored in the EEPROM 7. First, it is determined whether the correction amount per minute exceeds 1 or less (step S33). If the correction amount exceeds 1, whether the count value of elapsed time has reached 1 minute, that is, 60 seconds. (Step S34), if not reached, the process is terminated and the process returns to waiting for the next interrupt.
When it is determined in step S34 that the elapsed time count value has reached 60 seconds, a correction amount, that is, a corrected number of seconds is added as second data to the time measurement result at that time (step S34). S35), correction is performed, the second count value of the elapsed time is cleared (step S36), the process is terminated, and the process returns to waiting for the next interrupt.
[0036]
If it is determined in step S33 that the correction amount per minute is 1 or less, correction of +1 second is performed when the count number in the correction interval unit matches the correction interval (steps S37 to S49).
That is, it is determined whether the correction interval unit is a minute unit, an hour unit, a day unit, or a month unit (step S37). If it is determined that the unit is a minute unit, the count value in minutes of the elapsed time is corrected. It is determined whether or not the interval has been reached (step S38). If the interval has not been reached, the process is terminated and the process returns to waiting for the next interrupt.
When it is determined in step S38 that the count value for the correction of the elapsed time has reached the correction interval, 1 second is added as second data to the time measurement result at that time (step S39). Then, the correction is made, the count value for the elapsed time is cleared (step S40), the process is terminated, and the process returns to the next interrupt wait.
[0037]
If it is determined in step S37 that the correction interval unit is the hour unit, it is determined whether or not the count value of the elapsed time unit has reached the correction interval (step S41). End and return to waiting for the next interrupt.
When it is determined in step S41 that the count value at the time of correcting the elapsed time has reached the correction interval, 1 second is added as second data to the time measurement result at that time (step S42). Then, the correction is performed, the count value at the elapsed time is cleared (step S43), the process is terminated, and the process returns to the next interrupt wait.
If it is determined in step S37 that the correction interval unit is the daily unit, it is determined whether or not the daily count value of the elapsed time has reached the correction interval (step S44). End and return to waiting for the next interrupt.
[0038]
When it is determined in step S41 that the count value of the correction date of the elapsed time has reached the correction interval, 1 second is added as second data to the time measurement result at that time (step S45). Then, the correction is performed, the day count value of the elapsed time is cleared (step S46), the process is terminated, and the process returns to the next interrupt wait.
If it is determined in step S37 that the correction interval unit is a monthly unit, it is determined whether or not the monthly count value of the elapsed time has reached the correction interval (step S47). End and return to waiting for the next interrupt.
When it is determined in step S47 that the count value of the elapsed time correction month has reached the correction interval, 1 second is added as second data to the time measurement result at that time (step S48). Then, the correction is performed, the month count value of the elapsed time is cleared (step S49), the process is terminated, and the process returns to the next interrupt wait.
[0039]
In addition, when the main switch 8 is operated to shift to a sleep state (power supply voltage 3V) before the elapsed time matches the correction interval, the count value of the elapsed time at the power supply voltage 5V at that time is stored. In addition, when returning to the operation standby state (power supply voltage 5 V) again, counting of elapsed time is started from the count value of elapsed time stored last time.
In this way, even when a clocking oscillator having poor voltage characteristics is used, appropriate correction can be performed, and therefore a clock function with a highly accurate clocking can be provided. In addition, since a low-cost oscillator with poor voltage characteristics can be used as a clock oscillator, the clock system can be reduced in cost.
[0040]
【The invention's effect】
  As described above, the present inventionThe timekeeping system of claim 1According to, ConstantOscillation frequency error due to changes in the power supply voltage of an oscillator with a stable oscillation frequency relative to the voltage power supply is properly corrected. Based on the timing errorHigher correction accuracy and efficiencyIt is possible to provide a timing system that can reduce the cost and achieve cost reduction.
[0041]
  According to the timekeeping system of claim 2 of the present invention,Correction timingMeansA means for resetting the elapsed time when the elapsed time held by the time reaches the correction interval and correction is performed by the time correction means.In particular, the timing correctionSimplify furtherbe able to.
According to the timekeeping system of claim 3 of the present invention, the time correction time is a time when the time error reaches 1 second, and the time correction means includes a means for correcting time by 1 second every correction interval. The time correction process can be further simplified.
[0042]
According to the timekeeping system of claim 4 of the present invention, the time correction means uses the correction interval unit as a correction interval unit, and when the correction interval is less than 1 hour, sets the correction interval unit as a minute unit, By means of means that includes means for time units less than one day, day units for less than one month, month units for less than one year, and year units for more than one year In particular, a rational correction process is possible.
According to the timekeeping system of claim 5 of the present invention, when an error of 1 second or more occurs in one minute, the correction interval is set to 1 minute and the correction amount is set to a second unit, and the correction interval is set every 1 minute. In particular, the timekeeping process can be further stabilized by the configuration in which the time correction means includes the means for correcting the correction amount.
[0043]
According to the timekeeping system of claim 6 of the present invention, the time correction unit includes a storage unit that stores the correction interval, the correction amount, and the correction interval unit obtained by separately measuring in advance using an external measurement device. In particular, it is possible to realize effective time correction at a low cost.
According to the timekeeping system of claim 7 of the present invention, the timekeeping correction means is a means that does not perform correction at the reference frequency in the reference voltage state, so that particularly efficient timekeeping correction is possible.
[Brief description of the drawings]
FIG. 1 is a block diagram schematically showing a configuration of a timing system according to one embodiment of the present invention.
FIG. 2 is a flowchart for explaining an operation when a main switch is operated in the timing system of FIG. 1;
FIG. 3 is a flowchart for explaining an operation when a timepiece mode switch is operated in the timing system of FIG. 1;
4 is a flowchart for explaining an operation at the time of a clock interrupt process including a time correction in the time measuring system of FIG. 1;
[Explanation of symbols]
1 CPU (Central Processing Unit)
2 Constant voltage generator
3 Power battery
4 First oscillator
5 Second oscillator
6 Liquid crystal display (LCD)
7 Nonvolatile memory (EEPROM)
8 Main switch
9 Clock mode switch
10 Clock set switch
X1 Ceramic resonator
X2 crystal unit
R resistance
C1, C2, C3, C4 capacitors
SW1, SW2, SW3, SW4 switch

Claims (7)

なる複数の電圧を出力する電源回路と、
前記電源回路出力する電圧を電源とし、各出力電圧に応じた周波数で発振する発振器と、
前記発振器の発振出力を用いて計時する計時手段と、
前記電源回路の出力電圧を選択的に切換制御する電圧切換手段と
記電源回路の出力電圧の変化に基づく前記発振器の発振周波数変動に対応して計時補正を施す計時補正手段と
を備え、
前記計時補正手段は、前記電圧切換手段により選択される時間的割合が最も大きい状態を基準電圧状態とし、該基準電圧状態での前記電源回路の出力電圧における前記発振器の周波数を基準周渡数として、前記電源回路の出力電圧の変化に基づく前記発振器の発信周波数変動に対応し、且つ計時誤差が規定時間に達する時間を補正間隔として、該補正間隔毎に前記規定時間ずつ計時補正を施し、
さらに、
前記基準周波数との誤差が生じる電圧選択状態を被補正電圧状態として該被補正電圧状態における経過時間を計時し、且つ保持する補正用計時手段を有し、
該補正用計時手段は、前記経過時間が前記補正間隔に達する以前に前記基準電圧状態に移行した場合には、該経過時間の計時を停止して保持するとともに、前記被補正電圧状態に復帰した際には、前記経過時間の計時を継続するように構成したこと
を特徴とする計時システム。
A power supply circuit for outputting a plurality of voltage different,
An oscillator for the power supply circuit a voltage and power supply for output, oscillates at a frequency corresponding to the output voltage,
Clocking means for clocking using the oscillation output of the oscillator;
Voltage switching means for selectively switching the output voltage of the power supply circuit ;
A timer correction means in response to the oscillation frequency variation of the oscillator according to the change in the output voltage before the SL power supply circuit performs a total time of correction
With
The time correction means has a state in which the time ratio selected by the voltage switching means is the largest as a reference voltage state, and uses the frequency of the oscillator in the output voltage of the power supply circuit in the reference voltage state as a reference frequency. , Corresponding to the oscillation frequency fluctuation of the oscillator based on the change in the output voltage of the power supply circuit, and the time when the time error reaches the specified time as a correction interval, the time correction is performed by the specified time for each correction interval,
further,
A correction timing means for measuring and holding an elapsed time in the corrected voltage state with the voltage selection state in which an error from the reference frequency is generated as a corrected voltage state;
When the elapsed time shifts to the reference voltage state before the elapsed time reaches the correction interval, the correction timing unit stops and holds the elapsed time and returns to the corrected voltage state. In this case, the timekeeping system is configured to continue to count the elapsed time .
前記補正用計時手段は、計時保持している経過時間が前記補正間隔に達して、前記計時補正手段による補正が施されると、該経過時間をリセットする手段を含むこと
を特徴とする請求項に記載の計時システム。
The correction time measuring means includes means for resetting the elapsed time when the elapsed time held by the time reaches the correction interval and correction by the time correction means is performed. The timekeeping system according to 1 .
前記計時補正手段は、計時誤差が1秒に達する時間を補正間隔とし、該補正間隔毎に1秒ずつ計時補正する手段を含むことを特徴とする請求項1または2に記載の計時システム。  3. The time measuring system according to claim 1, wherein the time correction means includes means for correcting a time by 1 second every correction interval with a time when the time error reaches 1 second as a correction interval. 前記計時補正手段は、前記補正間隔の単位を補正間隔単位とし、該補正間隔が1時間未満であるときは該補正間隔単位を分単位とし、1日未満であるときは時間単位とし、1月未満であるときは日単位とし、1年未満であるときは月単位とし、そして1年以上であるときは年単位とする手段を含むことを特徴とする請求項3に記載の計時システム。  The time correction means sets the unit of the correction interval as a correction interval unit, when the correction interval is less than one hour, sets the correction interval unit as a minute unit, and when less than one day as a time unit, 4. The timekeeping system according to claim 3, further comprising means for setting a daily unit when it is less than one year, a monthly unit when it is less than one year, and a year unit when it is one year or more. 前記計時補正手段は、1分間に1秒以上の誤差が発生する場合には、前記補正間隔を1分とし且つ補正量を秒単位として、該補正間隔1分毎に上記補正量を補正する手段を含むことを特徴とする請求項1〜4のうちのいずれか1項に記載の計時システム。  The time correction means corrects the correction amount every correction interval every minute when the correction interval is 1 minute and the correction amount is in seconds when an error of 1 second or more occurs per minute. The timekeeping system according to any one of claims 1 to 4, wherein 前記計時補正手段は、予め別途に外部計測装置により測定して求めた前記補正間隔、補正量および補正間隔単位を記憶する記憶手段を含むことを特徴とする請求項1〜5のうちのいずれか1項に記載の計時システム。  6. The timekeeping correction unit includes a storage unit that stores the correction interval, the correction amount, and the correction interval unit obtained by separately measuring in advance using an external measurement device. The timekeeping system according to item 1. 前記計時補正手段は、前記基準電圧状態の基準周波数においては補正を行わない手段であることを特徴とする請求項2〜6のうちのいずれか1項に記載の計時システム。  The timekeeping system according to claim 2, wherein the timekeeping correction unit is a unit that does not perform correction at a reference frequency in the reference voltage state.
JP20117798A 1998-07-01 1998-07-01 Timing system Expired - Fee Related JP3781901B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20117798A JP3781901B2 (en) 1998-07-01 1998-07-01 Timing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20117798A JP3781901B2 (en) 1998-07-01 1998-07-01 Timing system

Publications (2)

Publication Number Publication Date
JP2000019273A JP2000019273A (en) 2000-01-21
JP3781901B2 true JP3781901B2 (en) 2006-06-07

Family

ID=16436642

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20117798A Expired - Fee Related JP3781901B2 (en) 1998-07-01 1998-07-01 Timing system

Country Status (1)

Country Link
JP (1) JP3781901B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011133489A (en) * 2011-03-18 2011-07-07 Toshiba Home Technology Corp Rice cooker

Also Published As

Publication number Publication date
JP2000019273A (en) 2000-01-21

Similar Documents

Publication Publication Date Title
JP6245424B2 (en) OSCILLATOR CIRCUIT CONTROL METHOD, OSCILLATION CIRCUIT, OSCILLATOR, ELECTRONIC DEVICE, AND MOBILE BODY
KR100613541B1 (en) Generator and electric device using the same
US9564087B2 (en) Electrophoretic display device, electronic timepiece, and operating method of an electrophoretic display device
US6072752A (en) Hand display-type electronic timepiece
JP2011199481A (en) Clock system
EP0872784B1 (en) Oscillation circuit, electronic circuit using the same, and semiconductor device, electronic equipment, and timepiece using the same
JP6237992B2 (en) OSCILLATOR CIRCUIT CONTROL METHOD, OSCILLATION CIRCUIT, OSCILLATOR, ELECTRONIC DEVICE, AND MOBILE BODY
JP2001249192A (en) Timepiece and method for controlling it
JPH07154243A (en) Electronic clock device and method and device for correction value decision device
JP3781901B2 (en) Timing system
JP2004288087A (en) Information processor
JP2002228778A (en) Real-time clock and clocking circuit
JPH0128408B2 (en)
JP2009130587A (en) Oscillation circuit and oscillator
JP4640734B2 (en) RTC device
JP4668085B2 (en) Electronic clock
JP3281757B2 (en) Automatic correction device for oscillation error in electronic timepiece
JPH0114552B2 (en)
JPS58199494A (en) Small-sized electronic instrument
JPH04319694A (en) Clock device with time adjustment data memory
JPH06235778A (en) Data transmitting/receiving system for hand type electronic timepiece
JP2018156001A (en) Power supply control device, electronic watch, power supply control method, and program
JP3497264B2 (en) Camera oscillation circuit
JP3379422B2 (en) Oscillator circuit, electronic circuit using the same, semiconductor device using the same, electronic apparatus, and clock
JPH04232520A (en) Microcomputer system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050208

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050411

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: 20060307

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060308

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100317

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110317

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120317

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130317

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140317

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees