JP2007064867A - Real-time clock unit - Google Patents
Real-time clock unit Download PDFInfo
- Publication number
- JP2007064867A JP2007064867A JP2005253127A JP2005253127A JP2007064867A JP 2007064867 A JP2007064867 A JP 2007064867A JP 2005253127 A JP2005253127 A JP 2005253127A JP 2005253127 A JP2005253127 A JP 2005253127A JP 2007064867 A JP2007064867 A JP 2007064867A
- Authority
- JP
- Japan
- Prior art keywords
- data
- time
- date
- clock
- circuit
- 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.)
- Withdrawn
Links
Images
Landscapes
- Electric Clocks (AREA)
Abstract
Description
本発明は、現在時刻を出力するリアルタイムクロック装置に関する。 The present invention relates to a real-time clock device that outputs a current time.
リアルタイムクロック装置は、カレンダ機能と時刻を表示する機能を備えており、多くの電子機器に搭載されていて、電子機器の利用者が現在の日時を容易に知ることができる。また、リアルタイムクロック装置は、所定の時刻または時間に電子機器を動作させたり停止させたりする、電子機器の予約機能に不可欠である。しかし、利用者が電子機器を起動してリアルタイムクロック装置の時刻を実際の時刻に合わせる際に、ボタンの押し間違いなどで間違った日時を入力し、気がつかない場合がある。例えば、13月32日とカレンダ上でありえない日を入力したとすると、リアルタイムクロック装置のカレンダは、13月33日、13月34日、………のようにカウントしてしまい、電子機器の誤動作の原因となる。 The real-time clock device has a calendar function and a function for displaying time, and is mounted on many electronic devices, so that a user of the electronic device can easily know the current date and time. The real-time clock device is indispensable for a reservation function of the electronic device that operates or stops the electronic device at a predetermined time or time. However, when the user activates the electronic device and sets the time of the real-time clock device to the actual time, the user may not be aware of the wrong date and time due to an incorrect button press. For example, if the date of March 32 and the date that cannot be on the calendar is input, the calendar of the real-time clock device counts as March 33, March 34,... Cause.
ところで、データに異常があるか否かを検出する方法として、特許文献1または特許文献2などがある。特許文献1に記載の異常データの検出方法は、制御データと同一のチェック用のミラーデータを2つ用意し、制御データと2つのミラーデータとの間で相互に比較し、多数決方式によって異常データを判別するようにしている。また、特許文献2のデータの異常検出方法は、データを入力(書込み)すると、その書込みデータについてのチェック用データを作成し、このチェック用データと書込みデータとを比較して書込みデータに異常があるか否かを判別している。
特許文献1および特許文献2に記載のデータの異常検出方法においては、入力されたデータに対応したチェック用データを作成して保持しなければならず、専用の特殊な回路を必要とし、回路構成が複雑化する。しかも、特許文献1、2に記載の異常データの検出方法は、複雑なデータチェック回路を必要とする。 In the data abnormality detection methods described in Patent Document 1 and Patent Document 2, check data corresponding to the input data must be created and held, a dedicated special circuit is required, and the circuit configuration Is complicated. Moreover, the abnormal data detection methods described in Patent Documents 1 and 2 require a complicated data check circuit.
本発明は、上記のようにチェック用のデータを特別に作成することなく入力された日時データの異常を検出することができるリアルタイムクロック装置を提供することを目的としている。 An object of the present invention is to provide a real-time clock device capable of detecting an abnormality of input date / time data without specially creating check data as described above.
上記の目的を達成するために、本発明に係るリアルタイムクロック装置は、所定周波数の信号を出力する発振回路部と、前記発振回路部が出力したクロック信号を複数段に分周し、時計用信号を出力する分周回路部と、書替え可能に形成され、前記分周回路部の出力した時計用信号を計数して現在日時の信号を出力する時計・カレンダ回路部と、前記時計・カレンダ回路部に入力された前記日時データの異常を検出し、異常データ検出信号を出力する日時データ異常検出部と、を有することを特徴としている。 In order to achieve the above object, a real-time clock device according to the present invention includes an oscillation circuit unit that outputs a signal of a predetermined frequency, a clock signal output from the oscillation circuit unit divided into a plurality of stages, and a clock signal. The clock / calendar circuit unit that outputs the current date and time by counting the clock signal output from the frequency divider circuit unit, and the clock / calendar circuit unit And a date / time data abnormality detection unit that detects an abnormality of the date / time data input to and outputs an abnormality data detection signal.
このようになっている本発明は、入力された日時データが例えば13月32日とか、24時60分60秒などの現実にありえないデータであることを検出し、異常データ検出信号を出力する。したがって、入力データに対応したチェック用のデータを特別に作成する必要がなく、回路構成を簡素にすることができる。しかも、実際にありえないデータを検出するだけでよいため、複雑な検出回路を必要としない。 In the present invention thus configured, it is detected that the input date and time data is data that is impossible in reality, such as March 32, 24:60:60, and an abnormal data detection signal is output. Therefore, it is not necessary to create special check data corresponding to the input data, and the circuit configuration can be simplified. In addition, since it is only necessary to detect data that cannot actually exist, a complicated detection circuit is not required.
前記日時データ異常検出部は、前記時計・カレンダ回路部の出力する現在日時データの異常の有無を監視するように構成することができる。携帯電話や携帯用ビジュアル・オーディオ機器(AV機器)などの携帯用電子機器は、電池によって動作するようになっている。そして、携帯電話や携帯用AV機器などに用いられているICは、一定の作動電圧を必要とし、電圧がそれ以下になると誤動作をすることがある。リアルタイムクロック装置も同様であって、リアルタイムクロック装置を搭載した携帯用電子機器の電圧が電池の消耗で低下した場合、誤動作することがある。そこで、日時データ異常検出部は、時計・カレンダ回路部が出力する現在日時データを監視し、異常が発生した場合に異常データ検出信号を出力する。これにより、電子機器の利用者(ユーザ)は、リアルタイムクロック装置が正常でないことを知ることができ、現在日時を訂正することにより、電子機器の誤動作を防止することができる。 The date / time data abnormality detection unit may be configured to monitor whether there is an abnormality in the current date / time data output from the clock / calendar circuit unit. Portable electronic devices such as mobile phones and portable visual / audio devices (AV devices) are operated by batteries. An IC used in a mobile phone or a portable AV device requires a certain operating voltage, and may malfunction if the voltage falls below that. The same applies to a real-time clock device, and if the voltage of a portable electronic device equipped with the real-time clock device is reduced due to battery consumption, it may malfunction. Therefore, the date / time data abnormality detection unit monitors the current date / time data output by the clock / calendar circuit unit, and outputs an abnormality data detection signal when an abnormality occurs. Thereby, the user (user) of the electronic device can know that the real-time clock device is not normal, and can correct malfunction of the electronic device by correcting the current date and time.
本発明に係るリアルタイムクロック装置の好ましい実施の形態を、添付図面に従って詳細に説明する。 A preferred embodiment of a real-time clock device according to the present invention will be described in detail with reference to the accompanying drawings.
図1は、実施の形態に係るリアルタイムクロック装置の要部のブロック図である。図1において、リアルタイムクロック装置10は、発振回路部12、分周回路部14、時計・カレンダ回路部16、日時データ異常検出部18、インタフェース回路20を有する。発振回路部12は、例えば音叉型の水晶振動片を備えた発振子22と、発振子22を励振する発振回路24とからなり、所定の周波数である32768Hzのクロック信号を出力する。
FIG. 1 is a block diagram of a main part of the real-time clock device according to the embodiment. In FIG. 1, the real-
分周回路部14は、発振回路部12の出力側に設けてある。分周回路部14は、複数の図示しない1/2分周器を多段に接続した構成となっている。分周回路部14の各1/2分周器は、発振回路部12の出力する32768Hzのクロック信号を順次1/2に分周し、時計用信号すなわち1Hzの1秒信号を出力側に接続した時計・カレンダ回路部16に出力する。時計・カレンダ回路部16は、複数のカウンタ(図示せず)を備えており、分周回路部14の出力した1秒信号を計数して年月日・時分秒の現在日時データを出力するようになっている。時計・カレンダ回路部16の出力した現在日時データは、インタフェース回路20を介してリアルタイムクロック装置10の外部に出力される。なお、時計・カレンダ回路部16は、後述するように、日時データを外部から書き替えることができるようになっている。
The frequency dividing
日時データ異常検出部18は、異常データ検出回路26と異常データ警告フラグ28とを有する。異常データ検出回路26は、時計・カレンダ回路部16とインタフェース回路20とに接続してある。異常データ検出回路26は、詳細を後述するように、インタフェース回路20を介して入力してきた日時データが現実にはありえない日時データであるときに、異常データとして検出する。そして、異常データ検出回路26は、インタフェース回路20から入力した日時データが異常データである場合、異常データ警告フラグ28のフラグを立てる。すなわち、異常データ検出回路26は、入力された日時データが現実にありえないデータである場合、異常データ警告フラグ28のビットを「0」から「1」に書き替える。異常データ警告フラグ28は、日時データが正常の場合、「0」を出力し、日時データが異常である場合に、異常データ検出信号として「1」を出力する。異常データ警告フラグ28の出力は、インタフェース回路20を介して外部に出力される。
The date / time data
リアルタイムクロック装置10は、電子機器に搭載され、インタフェース回路20がバス30を介して電子機器に設けられたMPU(Micro Processing Unit)32に接続される。そして、MPU32は、バス30、インタフェース回路20を介して時計・カレンダ回路部16の出力する現在日時のデータを読み込む。また、MPU32は、電子機器のユーザが電子機器のキーボードなどの入力部を操作して書き込み命令を受けると、時計・カレンダ回路部16に日時データを書き込む。
The real-
異常データ検出回路26は、図2に示したように、カレンダデータ異常検出部34と時刻データ異常検出部36とOR回路38とを有している。カレンダデータ異常検出部34は、年データの異常を検出する年データ異常検出回路40、月データの異常を検出する月データ異常検出回路42、日データの異常を検出する日データ異常検出回路44、年月日データの異常を検出する年月日データ異常検出回路46と、入力端子がこれらの検出回路の出力側に接続されたOR回路48とからなっている。
As shown in FIG. 2, the abnormal
時刻データ異常検出部36は、時データの異常を検出する時データ異常検出回路50、分データの異常を検出する分データ異常検出回路52、秒データの異常を検出する秒データ異常検出回路54と、入力端子がこれらの検出回路の出力側に接続されたOR回路56とから構成してある。そして、カレンダデータ異常検出部34のOR回路48と、時刻データ異常検出部36のOR回路56との出力端子は、OR回路38の入力端子に接続してある。このOR回路38の出力端子は、異常データ警告フラグ28に接続してあって、カレンダデータ異常検出部34と時刻データ異常検出部36とのいずれかの検出回路がデータの異常を検出すると、「1」を出力し、異常データ警告フラグ28のビットを「1」にする。
The time data
このようになっている実施形態の作用は、次のとおりである。
ユーザが電子機器の入力部(図示せず)を介して日時データを入力すると、MPU32は、バス30を介してその日時データをリアルタイムクロック装置10に入力する。すなわち、MPU32は、インタフェース回路20を介して時計・カレンダ回路部16に日時データを書き込み、設定する。インタフェース回路20から入力した日時データは、日時データ異常検出部18の異常データ検出回路26にも入力する。すなわち、日時データのカレンダデータは、カレンダデータ異常検出部34に入力し、時刻データは時刻データ異常検出部36に入力する。
The operation of the embodiment thus configured is as follows.
When the user inputs date / time data via an input unit (not shown) of the electronic device, the
カレンダデータ異常検出部34の年データ異常検出回路40は、入力された年データが0年〜9999年である場合に正常と判断して「0」を出力し、これ以外の年号が入力されたときに異常データであるとして「1」を出力する。月データ異常検出回路42は、入力された月データが1月〜12月である場合に正常と判断して「0」を出力し、これ以外の月が入力されたときに異常データであるとして「1」を出力する。日データ異常検出回路44は、入力された日データが1日〜31日である場合に正常と判断して「0」を出力し、これ以外の日が入力されたときに異常データであるとして「1」を出力する。
The year data
年月日データ異常検出回路46は、入力された年データ、月データ、日データを組み合わせ、カレンダとしてありえないカレンダデータの異常を検出する。すなわち、年月日データ異常検出回路46は、例えば2月、4月、6月、9月、11月の31日、また2月30日、うるう年以外の2月29日が入力されると、異常データとして「1」を出力する。カレンダデータ異常検出部34のOR回路48は、検出回路40、42、44、46のいずれかが「1」を出力すると、OR回路38に「1」を入力する。
The year / month / day data
時刻データ異常検出部36の時データ異常検出回路50は、1日の時間が24時間制に設定されている場合、入力された時データが0時〜23時のときに、正常であるとして「0」を出力し、0時〜23時以外の時データが入力されると、異常データであるとして「1」を出力する。また、時データ異常検出回路50は、1日の時間が12時間制に設定されている場合、入力された時データがAM12時、AM1時〜AM11時、PM12時、PM1時〜PM11時のときに、正常であるとして「0」を出力し、それ以外の時データが入力されると、異常データであるとして「1」を出力する。
The hour data
分データ異常検出回路52は、入力された分データが0分〜59分のときに、正常であるとして「0」を出力し、それ以外の分データが入力されると、異常データであるとして「1」を出力する。また、秒データ異常検出回路54は、入力された秒データが0秒〜59秒のときに、正常であるとして「0」を出力し、それ以外の秒データが入力されると、異常データであるとして「1」を出力する。そして、時刻データ異常検出部36のOR回路56は、検出回路50、52、54のいずれかが「1」を出力すると、OR回路38に「1」を入力する。
The minute data
OR回路38は、OR回路48、56のいずれかが「1」を出力すると、インタフェース回路20から入力した時刻データが異常であるとして「1」を出力し、異常データ警告フラグ28のフラグを立てる。異常データ警告フラグ28に立てられたフラグは、MPU32に割り込み信号を入力してMPU32によって読み出され、ユーザに異常データが入力されたことをブザー音などによって告知する。ユーザは、これによって異常な日時データを入力したことを知ることができ、正しい日時データに訂正して入力することができ、リアルタイムクロック装置10、電子機器の誤動作を防止することができる。しかも、実施形態は、入力データに対応したチェック用データを新たに作成する必要がなく、回路構成を簡素にすることができる。また、カレンダや現実の時刻にないデータを検出するだけであるため、検出回路の構成を簡素にすることができる。
When one of the
なお、上記の実施形態は、本発明の一態様であって、これに限定されるものではない。例えば、前記実施形態においては、入力された日時データの異常を検出する場合について説明したが、時計・カレンダ回路の出力する現在日時データの異常を検出するようにしてもよい。すなわち、日時データ異常検出部18は、所定時間ごと(例えば、1秒ごと)に時計・カレンダ回路部16の出力を読み込み、上記と同様にして時計・カレンダ回路部16が出力する現在日時データの異常を検出する。このようにすることにより、ユーザは、リアルタイムクロック装置10が正常でないことを容易に知ることができる。
In addition, said embodiment is 1 aspect of this invention, Comprising: It is not limited to this. For example, in the above-described embodiment, the case where the abnormality of the input date / time data is detected has been described. However, the abnormality of the current date / time data output from the clock / calendar circuit may be detected. That is, the date / time data
例えば電子機器の電池(図示せず)が消耗し、電池の出力電圧がリアルタイムクロック装置10の動作電圧より低くなると、リアルタイムクロック装置10が誤動作することがある。そして、電圧が正常状態に復帰したときに、日時データ異常検出部18の異常データ検出回路26は、時計・カレンダ回路部16の出力する現在日時データの異常を検出して異常データ警告フラグ28のフラグを立てる。これにより、ユーザは、リアルタイムクロック装置10が正常に動作していないことを容易に知ることができ、正確な現在日時を出力するように修正することができ、電子機器の誤動作などを防止することができる。また、前記実施形態においては、異常データが入力されたときにフラグを立てる場合について説明したが、異常データが入力されたときに、リアルタイムクロック装置10の端子の出力電圧を「H」から[L」に変えるようにしてもよい。
For example, when the battery (not shown) of the electronic device is exhausted and the output voltage of the battery becomes lower than the operating voltage of the real
10………リアルタイムクロック装置、12………発振回路部、14………分周回路部、16………時計・カレンダ回路部、18………日時データ異常検出部、26………異常データ検出回路、28………異常データ警告フラグ。
10... Real-
Claims (2)
前記発振回路部が出力したクロック信号を複数段に分周し、時計用信号を出力する分周回路部と、
書替え可能に形成され、前記分周回路部の出力した時計用信号を計数して現在日時の信号を出力する時計・カレンダ回路部と、
前記時計・カレンダ回路部に入力された前記日時データの異常を検出し、異常データ検出信号を出力する日時データ異常検出部と、
を有することを特徴とするリアルタイムクロック装置。 An oscillation circuit unit that outputs a signal of a predetermined frequency;
Dividing the clock signal output from the oscillation circuit section into a plurality of stages, and outputting a clock signal;
A clock / calendar circuit unit that is formed to be rewritable, counts the clock signal output from the frequency divider unit, and outputs a current date / time signal;
A date / time data abnormality detection unit that detects an abnormality in the date / time data input to the clock / calendar circuit unit and outputs an abnormality data detection signal;
A real-time clock device comprising:
前記日時データ異常検出部は、前記時計・カレンダ回路部の出力する現在日時データの異常の有無を監視することを特徴とするリアルタイムクロック装置。 The real-time clock device according to claim 1,
The real-time clock device, wherein the date / time data abnormality detection unit monitors whether there is an abnormality in the current date / time data output from the clock / calendar circuit unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005253127A JP2007064867A (en) | 2005-09-01 | 2005-09-01 | Real-time clock unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005253127A JP2007064867A (en) | 2005-09-01 | 2005-09-01 | Real-time clock unit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007064867A true JP2007064867A (en) | 2007-03-15 |
Family
ID=37927219
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005253127A Withdrawn JP2007064867A (en) | 2005-09-01 | 2005-09-01 | Real-time clock unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007064867A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10732670B2 (en) | 2017-06-20 | 2020-08-04 | Seiko Epson Corporation | Real-time clock module, electronic device, vehicle, and information processing system |
CN113031428A (en) * | 2019-12-25 | 2021-06-25 | 精工爱普生株式会社 | Real-time clock device and electronic apparatus |
-
2005
- 2005-09-01 JP JP2005253127A patent/JP2007064867A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10732670B2 (en) | 2017-06-20 | 2020-08-04 | Seiko Epson Corporation | Real-time clock module, electronic device, vehicle, and information processing system |
CN113031428A (en) * | 2019-12-25 | 2021-06-25 | 精工爱普生株式会社 | Real-time clock device and electronic apparatus |
CN113031428B (en) * | 2019-12-25 | 2022-09-23 | 精工爱普生株式会社 | Real-time clock device and electronic apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8458506B2 (en) | Real time clock and method for recording data in real time clock | |
US10379571B2 (en) | Timing device, electronic apparatus, and moving object | |
JP5228392B2 (en) | Temperature compensated oscillation circuit, real-time clock device and electronic equipment | |
JP2006197564A (en) | Signal selector circuit and real-time clock device | |
JP5477488B2 (en) | Real-time clock and data recording method for real-time clock | |
JP2007064867A (en) | Real-time clock unit | |
US10809670B2 (en) | Timing apparatus, timing method, and electronic appliance | |
CN111198521B (en) | Real-time clock device for vehicle and operation method thereof | |
JP5590174B2 (en) | Temperature compensated oscillation circuit, real-time clock device and electronic equipment | |
JP2010054412A (en) | Real-time clock | |
US10732670B2 (en) | Real-time clock module, electronic device, vehicle, and information processing system | |
JP5119002B2 (en) | Clock circuit and electronic clock | |
JP3294004B2 (en) | Dual clock system for information equipment | |
KR20200124317A (en) | Programmable display system and programmable indicator | |
JP2007072993A (en) | Calendar ic, and control unit having the same | |
JP2009032142A (en) | Real time clock | |
JP2009017147A (en) | Signal input/output device | |
JP2010237945A (en) | Monitoring control board | |
JP2020155002A (en) | Terminal, server device, method and program | |
JP2020003365A (en) | Gas meter | |
JPS63122988A (en) | World timepiece with voice announcement | |
JP2009026169A (en) | Method for generating interrupt in event recorder, event recorder, and electronic appliance equipped with the same | |
JP3175962B2 (en) | Calendar device | |
KR19990066136A (en) | Real Time Clock Generator | |
CN106909099A (en) | Regulation meter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20070405 |
|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20081104 |