JP2009048614A - Real time clock and data recording method of real time clock - Google Patents

Real time clock and data recording method of real time clock Download PDF

Info

Publication number
JP2009048614A
JP2009048614A JP2008145530A JP2008145530A JP2009048614A JP 2009048614 A JP2009048614 A JP 2009048614A JP 2008145530 A JP2008145530 A JP 2008145530A JP 2008145530 A JP2008145530 A JP 2008145530A JP 2009048614 A JP2009048614 A JP 2009048614A
Authority
JP
Japan
Prior art keywords
real
time clock
event
data
voltage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008145530A
Other languages
Japanese (ja)
Other versions
JP5256856B2 (en
Inventor
Toru Shiratori
透 白鳥
Toshiya Usuda
俊也 臼田
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.)
Miyazaki Epson Corp
Original Assignee
Miyazaki Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Miyazaki Epson Corp filed Critical Miyazaki Epson Corp
Priority to JP2008145530A priority Critical patent/JP5256856B2/en
Priority to US12/175,099 priority patent/US8209561B2/en
Publication of JP2009048614A publication Critical patent/JP2009048614A/en
Priority to US13/410,784 priority patent/US8458506B2/en
Application granted granted Critical
Publication of JP5256856B2 publication Critical patent/JP5256856B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)
  • Debugging And Monitoring (AREA)
  • Electric Clocks (AREA)
  • Recording Measured Values (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a real time clock which improves the reliability of stored event data. <P>SOLUTION: The real time clock 10 is provided with; an event detection circuit 20 which detects that event detection signals are input from the outside; a time measuring circuit 18 which generates time data on the basis of signals output from an oscillation circuit 16; a memory 40; and a control circuit 42 which records event data to the memory 40 when the input of the event detection signals is detected by the event detection circuit 20, the event data having additional data, which indicate the operational condition of the real time clock 10, and the time data generated by the time measuring circuit 18. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、リアルタイムクロック、およびリアルタイムクロックのデータ記録方法に関
するものである。
The present invention relates to a real-time clock and a data recording method for the real-time clock.

デバイス内部に備えられたメモリに、イベント発生時の時刻情報を記録する装置として
、リアルタイムクロックが知られており、例えば特許文献1に開示されている。特許文献
1に開示されているリアルタイムクロックは、発振回路、分周回路、計時回路、インター
フェース回路、動作制御回路、イベント検出回路、およびイベント記憶メモリにより構成
されるものである。このような構成のリアルタイムクロックにおいてイベント記憶メモリ
は、イベント検出回路により検出されたイベント発生の時刻情報と、発生したイベント固
有の情報とを1つのイベントデータとして記憶する。
特開2003−132470号公報
A real-time clock is known as an apparatus for recording time information when an event occurs in a memory provided in the device, and is disclosed in Patent Document 1, for example. The real-time clock disclosed in Patent Document 1 includes an oscillation circuit, a frequency dividing circuit, a time measuring circuit, an interface circuit, an operation control circuit, an event detection circuit, and an event storage memory. In the real-time clock having such a configuration, the event storage memory stores time information of event occurrence detected by the event detection circuit and information unique to the event that has occurred as one event data.
JP 2003-132470 A

上記のような構成のリアルタイムクロックであれば、イベント記憶メモリに記憶された
イベント情報に基づいて、記録時刻に生じたイベントの特定も可能となる。ここで、特許
文献1では、リアルタイムクロックの電源系統として、いわゆるコンセントからの電力供
給を図るメイン電源と、一次電池または二次電池からの電力供給を図るバックアップ電源
を備える旨が記載されているものの、電圧低下や発振停止等の予期せぬ事態に対する対応
策が講じられていない。このため、電圧低下等が原因で、イベント記憶メモリに対して誤
ったデータが書き込まれた場合があったとしても、記憶されたデータの正否判定を行うこ
とができない。よって、記憶された特定のイベントデータの信頼性が低い。
With the real-time clock configured as described above, it is possible to identify an event that occurred at the recording time based on the event information stored in the event storage memory. Here, Patent Document 1 describes that a real-time clock power supply system includes a main power supply that supplies power from a so-called outlet and a backup power supply that supplies power from a primary battery or a secondary battery. No measures have been taken against unexpected situations such as voltage drop and oscillation stop. For this reason, even if erroneous data is written in the event storage memory due to a voltage drop or the like, the correctness determination of the stored data cannot be performed. Therefore, the reliability of the stored specific event data is low.

そこで本発明では、記憶されたイベントデータの信頼性を向上させる(信頼性の正否判
定を可能とする)ことのできるリアルタイムクロック、およびリアルタイムクロックのデ
ータ記録方法を提供することを目的とする。
Therefore, an object of the present invention is to provide a real-time clock and a data recording method for the real-time clock capable of improving the reliability of stored event data (making it possible to determine whether the reliability is correct or not).

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の
形態または適用例として実現することが可能である。
SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms or application examples.

[適用例1] 時刻データを出力するリアルタイムクロックであって、イベント検出信
号が外部から入力されたことを検出するイベント検出回路と、発振回路から出力された信
号に基づいて前記時刻データを生成する計時回路と、メモリと、前記イベント検出回路に
より前記イベント検出信号の入力を検出した場合、前記リアルタイムクロックの動作状態
を示す付加データと、前記計時回路により生成された前記時刻データとを有するイベント
データを前記メモリに記録する制御回路と、を備えたことを特徴とするリアルタイムクロ
ック。
Application Example 1 A real-time clock that outputs time data, an event detection circuit that detects that an event detection signal is input from the outside, and the time data that is generated based on a signal output from the oscillation circuit Event data including additional data indicating an operation state of the real-time clock when the input of the event detection signal is detected by the time detection circuit, a memory, and the event detection circuit, and the time data generated by the time measurement circuit And a control circuit for recording the data in the memory.

このような構成のリアルタイムクロックによれば、ユーザーがイベントデータが記録さ
れた時点のリアルタイムクロックの動作状態を知ることができ、イベントデータの信頼性
を向上させることができる。
According to the real-time clock having such a configuration, the user can know the operation state of the real-time clock when the event data is recorded, and the reliability of the event data can be improved.

[適用例2]適用例1に記載のリアルタイムクロックであって、電源端子に印加され
る電源電圧の低下を検出する電圧低下検出回路を備え、前記付加データには、前記電圧低
下検出回路で検出された前記電源電圧の低下を示す情報である電圧低下情報を含むことを
特徴とするリアルタイムクロック。
Application Example 2 The real-time clock according to Application Example 1, including a voltage drop detection circuit that detects a drop in power supply voltage applied to a power supply terminal, and the additional data is detected by the voltage drop detection circuit. A real-time clock comprising voltage drop information, which is information indicating a drop in the power supply voltage.

このような構成とすることにより、イベントデータの信頼性向上の他、リアルタイムク
ロックに対して供給された電流電圧の変遷を知ることが可能となる。
With such a configuration, it becomes possible to know the transition of the current voltage supplied to the real-time clock, in addition to improving the reliability of the event data.

[適用例3]適用例2に記載のリアルタイムクロックであって、前記電圧低下検出回
路は、前記電源電圧が第1の閾値より下回っていることを検出する第1電圧比較部を有し
、前記電圧低下検出情報は、前記イベント検出回路により前記イベント検出信号の入力を
検出した時に、前記電源電圧が前記第1の閾値を下回っていることを前記電圧低下検出回
路の前記第1電圧比較部が検出しているか否かを示す情報を含むことを特徴とするリアル
タイムクロック。
[Application Example 3] The real-time clock according to Application Example 2, wherein the voltage drop detection circuit includes a first voltage comparison unit that detects that the power supply voltage is lower than a first threshold value. The voltage drop detection information indicates that the first voltage comparison unit of the voltage drop detection circuit indicates that the power supply voltage is below the first threshold when the event detection circuit detects the input of the event detection signal. A real-time clock including information indicating whether or not it is detected.

このような構成とすることにより、閾値の設定の如何によって、リアルタイムクロック
がどのような動作状態にあったのかを知ることが可能となる。
With such a configuration, it is possible to know what operating state the real-time clock is in depending on how the threshold is set.

[適用例4]適用例3に記載のリアルタイムクロックであって、前記電圧低下検出回
路は、前記第1の閾値よりも低く設定された第2の閾値より前記電源電圧が下回っている
ことを検出する第2電圧比較部を更に有し、前記電圧低下検出情報は、前記電源電圧が前
記第2の閾値より下回っていることを前記電圧低下検出回路の前記第2電圧比較部が検出
しているか否かを示す情報を含むことを特徴とするリアルタイムクロック。
Application Example 4 The real-time clock according to Application Example 3, wherein the voltage drop detection circuit detects that the power supply voltage is lower than a second threshold value set lower than the first threshold value. The voltage drop detection information is detected by the second voltage comparison unit of the voltage drop detection circuit that the power supply voltage is lower than the second threshold value. A real-time clock characterized by including information indicating whether or not.

このような構成とすることにより、システムエラー等が発生した際の解析精度を向上さ
せることができる。
With such a configuration, it is possible to improve analysis accuracy when a system error or the like occurs.

[適用例5]適用例1乃至4のいずれかに記載のリアルタイムクロックであって、前
記発振回路が発振停止していることを検出する発振停止検出回路を備え、前記付加データ
は、前記発振停止検出回路が前記発振停止を検出しているか否かを示す発振停止情報を含
むことを特徴とするリアルタイムクロック。
Application Example 5 The real-time clock according to any one of Application Examples 1 to 4, further comprising an oscillation stop detection circuit that detects that the oscillation circuit has stopped oscillating, wherein the additional data is the oscillation stop A real-time clock comprising oscillation stop information indicating whether or not a detection circuit detects the oscillation stop.

このような構成とすることにより、電源電圧の低下以外の要因により発振器の発振が停
止した場合であってもその検出が可能となり、メモリに記録されたイベントデータの正否
、具体的にはイベントデータに付加された時刻データの正否等を判断することができるよ
うになる。よって、イベントデータの信頼性を向上させることができる。
With such a configuration, even when the oscillation of the oscillator is stopped due to a factor other than a decrease in the power supply voltage, the detection can be performed, and whether the event data recorded in the memory is correct or not, specifically, the event data It is possible to determine whether the time data added to is correct or not. Therefore, the reliability of event data can be improved.

[適用例6]適用例2乃至5のいずれかに記載のリアルタイムクロックであって、前
記イベント検出信号の電圧波形の立上りを検出する立上り検出モードと、立下りを検出す
る立下り検出モードとのいずれか一方を設定することのできる設定レジスタを有し、前記
付加データは、前記イベント検出回路により前記イベント検出信号の入力を検出した時に
、前記立上り検出モードまたは前記立下り検出モードのどちらのモードが前記設定レジス
タに設定されていたかを示す検出情報を含むことを特徴とするリアルタイムクロック。
[Application Example 6] The real-time clock according to any one of Application Examples 2 to 5, wherein a rising edge detection mode for detecting a rising edge of a voltage waveform of the event detection signal and a falling edge detection mode for detecting a falling edge A setting register capable of setting either one of the rising detection mode and the falling detection mode when the additional data is detected by the event detection circuit as input of the event detection signal; A real-time clock including detection information indicating whether or not is set in the setting register.

このような構成とすることによれば、色々な外部機器のイベント発生を検出することが
可能となる。例えば、ドアや蓋の開閉など、一対の動作が行われる物の場合、「閉→開:
立上り信号」、「開→閉:立下り信号」というような割り当てをすることで、どちらかを
選択的に検出することが可能となる。なお、複数の端子を設けた場合には、開閉動作の両
方を検出することも可能となる。
With such a configuration, it is possible to detect the occurrence of events of various external devices. For example, in the case of an object that performs a pair of operations such as opening and closing a door and a lid, “closed → open:
By making assignments such as “rising signal” and “open → closed: falling signal”, it is possible to selectively detect either one. When a plurality of terminals are provided, both opening and closing operations can be detected.

[適用例7]適用例2乃至6のいずれかに記載のリアルタイムクロックであって、前
記イベント検出信号を入力する端子を複数設け、前記制御回路は、前記イベント検出回路
により前記イベント検出信号の入力を検出した場合、前記付加データと、前記時刻データ
と、前記イベント検出信号が入力された前記端子のポート番号とを有する前記イベントデ
ータを前記メモリに記録することを特徴とするリアルタイムクロック。
Application Example 7 The real-time clock according to any one of Application Examples 2 to 6, wherein a plurality of terminals for inputting the event detection signal are provided, and the control circuit is configured to input the event detection signal by the event detection circuit. And detecting the event data having the additional data, the time data, and the port number of the terminal to which the event detection signal is input, in the memory.

このような構成とすることによれば、各入力端子に対してそれぞれ異なるイベントの発
生信号が入力され、記録されることとなるが、端子毎のポート番号を付加情報に付加する
ことで、どの端子、すなわちどのイベントが発生したのかを知ることが可能となる。
According to such a configuration, different event occurrence signals are input and recorded for each input terminal, but by adding a port number for each terminal to the additional information, It is possible to know the terminal, that is, which event has occurred.

[適用例8]イベント発生時の時刻データをメモリに記録する機能を有するリアルタ
イムクロックのデータ記録方法であって、前記時刻データと、前記イベント発生時におけ
るリアルタイムクロックの動作状態を判定した付加データとを有するイベントデータとし
て記録することを特徴とするリアルタイムクロックのデータ記録方法。
Application Example 8 A data recording method of a real time clock having a function of recording time data at the time of event occurrence in a memory, the time data, and additional data for determining an operation state of the real time clock at the time of the event occurrence A real-time clock data recording method comprising: recording as event data having

このようなデータ記録方法によれば、イベントデータの信頼性を向上させることができ
る。
According to such a data recording method, the reliability of event data can be improved.

[適用例9]適用例8に記載のリアルタイムクロックのデータ記録方法であって、前
記付加データは、電源端子に印加される電源電圧が閾値を下回っているか否かを判定した
情報を含むことを特徴とするリアルタイムクロックのデータ記録方法。
Application Example 9 In the real-time clock data recording method according to Application Example 8, the additional data includes information that determines whether or not the power supply voltage applied to the power supply terminal is below a threshold value. A real time clock data recording method.

判定情報を上記のようなものとすることにより、閾値の設定の如何によって、判定情報
に基づいてリアルタイムクロックがどのような動作状態にあったのかを知ることが可能と
なる。
By setting the determination information as described above, it becomes possible to know what operating state the real-time clock is in based on the determination information depending on the setting of the threshold value.

[適用例10]適用例8に記載のリアルタイムクロックのデータ記録方法であって、
前記付加データは、前記印加電圧が、複数の電圧値範囲のいずれに含まれるかを判定した
情報を含むことを特徴とするリアルタイムクロックのデータ記録方法。
[Application Example 10] The real-time clock data recording method according to Application Example 8,
The data recording method for a real-time clock, wherein the additional data includes information for determining which of the plurality of voltage value ranges the applied voltage is included in.

判定情報を上記のようなものとすることにより、判定情報に基づくリアルタイムクロッ
クの動作状態の把握、解析を、より詳細に行うことが可能となり、記録されたイベントデ
ータの信頼性も向上させることができる。
By making the determination information as described above, it becomes possible to grasp and analyze the operation state of the real-time clock based on the determination information in more detail, and to improve the reliability of the recorded event data. it can.

[適用例11]適用例8に記載のリアルタイムクロックのデータ記録方法であって、
前記付加データは、前記リアルタイムクロックの発振回路の発振停止を検出したか否かの
情報を含むことを特徴とするリアルタイムクロックのデータ記録方法。
Application Example 11 The real-time clock data recording method according to Application Example 8,
The real-time clock data recording method, wherein the additional data includes information on whether or not oscillation stop of the oscillation circuit of the real-time clock is detected.

付加データに上記のような情報を含ませることにより、電源電圧の多寡に起因しない発
振器の発振停止があった場合であっても、その情報を検知することが可能となる。このた
め、記録されたイベントデータの信頼性を向上させることが可能となる。
By including the information as described above in the additional data, it is possible to detect the information even when the oscillation of the oscillator is not caused by the power supply voltage. For this reason, it becomes possible to improve the reliability of the recorded event data.

以下、本発明のリアルタイムクロックに係る実施の形態について図面を参照しつつ詳細
に説明する。まず、本発明のリアルタイムクロックに係る第1の実施形態について、図1
を参照して説明する。
図1に示すように、本実施形態に係るリアルタイムクロック10は、発振器12、計時
回路18、イベント検出回路20、電圧低下検出回路26、設定レジスタ34、メモリ4
0、制御回路42、および入出力処理回路46を基本として構成される。
Hereinafter, embodiments of the real-time clock according to the present invention will be described in detail with reference to the drawings. First, a first embodiment according to the real-time clock of the present invention will be described with reference to FIG.
Will be described with reference to FIG.
As shown in FIG. 1, the real-time clock 10 according to this embodiment includes an oscillator 12, a timer circuit 18, an event detection circuit 20, a voltage drop detection circuit 26, a setting register 34, and a memory 4.
0, a control circuit 42, and an input / output processing circuit 46.

前記発振器12は、振動子14と発振回路16とから構成されており、前記振動子14
は前記発振回路16を介して電気信号が入力されることにより所定の周波数で振動する。
そして、発振回路16は、振動子14から出力された信号を増幅して出力する。ここで、
振動子14の構成については特に限定するものでは無いが、広い温度領域で安定した発振
周波数を得るためには、周波数温度特性が良好とされるものを使用することが望ましい。
例えば振動子14を圧電振動子とする場合には、振動片を水晶により構成すると良い。
The oscillator 12 includes a vibrator 14 and an oscillation circuit 16, and the vibrator 14
Vibrates at a predetermined frequency when an electric signal is input through the oscillation circuit 16.
The oscillation circuit 16 amplifies and outputs the signal output from the vibrator 14. here,
The configuration of the vibrator 14 is not particularly limited. However, in order to obtain a stable oscillation frequency in a wide temperature range, it is desirable to use one having good frequency temperature characteristics.
For example, when the vibrator 14 is a piezoelectric vibrator, the vibrating piece may be made of quartz.

前記計時回路18には、上記発振器12が接続されており、発振器12から出力された
信号を分周して1[Hz]の周波数を得ると、この1[Hz]の信号を利用して年、月、日、
時、分、および秒の計時を各計時レジスタ(不図示)で行っている。このような計時回路
18を持つことにより、時刻データを得ることができ、イベントが生じた際(イベント検
出周期毎)の日時等をメモリに記録することが可能となる。なお計時回路18は設定によ
り、上記年、月、日、時、分、および秒の他に、曜日についてのデータも記憶させるよう
にすることができる。
The clock circuit 18 is connected to the oscillator 12. When the signal output from the oscillator 12 is divided to obtain a frequency of 1 [Hz], the signal is output using this 1 [Hz] signal. ,time,
Each time register (not shown) counts the hours, minutes, and seconds. By having such a timer circuit 18, time data can be obtained, and the date and time when an event occurs (every event detection cycle) can be recorded in the memory. In addition to the above year, month, day, hour, minute, and second, the timer circuit 18 can store data on the day of the week by setting.

前記イベント検出回路20は、リアルタイムクロック10の外部端子であるイベント入
力端子22に接続されている。イベント検出回路20は、前記イベント入力端子22に対
してイベントが発生した旨の電気信号が入力されると、イベント発生フラグを立てるよう
に構成されている。このように、イベントの発生をフラグにより示すことで、当該フラグ
に基づいてイベントの有無を判断することができる。具体的には、イベント発生フラグに
1を立てる(0から1に変更する)のである。
The event detection circuit 20 is connected to an event input terminal 22 that is an external terminal of the real-time clock 10. The event detection circuit 20 is configured to set an event generation flag when an electrical signal indicating that an event has occurred is input to the event input terminal 22. Thus, by indicating the occurrence of an event by a flag, it is possible to determine the presence or absence of the event based on the flag. Specifically, the event occurrence flag is set to 1 (changed from 0 to 1).

前記電圧低下検出回路26は、リアルタイムクロック10の外部端子である電源端子2
8に接続されているとともに、内部に電圧比較部30を備えている。電圧比較部30には
予め、基準となる電流の電圧が設定されており、前記電源端子28に対して入力された電
流の電圧(印加電圧)と前記基準となる電圧とが比較される。電圧低下検出回路26は、
電圧比較部30にて比較された入力電圧の値が基準電圧の値よりも低いと判定された場合
に、電圧低下フラグ32を立てるように構成されている。具体的には、電源端子28から
入力された電流の電圧が基準電圧の値より低くなった場合に、電圧低下フラグ32に1を
立てる(0から1に変更する)のである。なお、基準電圧としては例えば、1.2V程度
とすることができる。
The voltage drop detection circuit 26 is a power supply terminal 2 that is an external terminal of the real-time clock 10.
8 and a voltage comparison unit 30 inside. A voltage of a reference current is set in advance in the voltage comparison unit 30, and the voltage of the current (applied voltage) input to the power supply terminal 28 is compared with the reference voltage. The voltage drop detection circuit 26
When it is determined that the value of the input voltage compared by the voltage comparison unit 30 is lower than the value of the reference voltage, the voltage drop flag 32 is set. Specifically, when the voltage of the current input from the power supply terminal 28 becomes lower than the value of the reference voltage, the voltage drop flag 32 is set to 1 (changed from 0 to 1). For example, the reference voltage can be about 1.2V.

前記設定レジスタ34は、記録桁設定データ36やイベント検出周期38を記憶してい
る。ここで、詳細を後述する制御回路42は、メモリ40に時刻を記録する場合、年、月
、日、時、分、秒に対してそれぞれ1バイト(8ビット)のデータ領域を設け、当該デー
タ領域に対してパック形式のBCD(Binary Coded Decimal:2進化10進数)により年
、月、日、時、分、および秒を直列的に並べて示す。なお、時刻データとして示される数
字の最大値は、「年」の単位における「99」であるが。この数値を8ビットの2進数で
示すと、「10011001」となる。
The setting register 34 stores recording digit setting data 36 and an event detection period 38. Here, when the time is recorded in the memory 40, the control circuit 42, which will be described in detail later, provides a data area of 1 byte (8 bits) for each of year, month, day, hour, minute, and second, and the data The year, month, day, hour, minute, and second are serially arranged in a packed BCD (Binary Coded Decimal) for the area. The maximum value of the number shown as time data is “99” in the unit of “year”. When this numerical value is represented by an 8-bit binary number, it becomes “10011001”.

また、記録桁設定データ36は、後述するイベントデータを構成するデータ(時刻デー
タと付加データをあわせたデータ)の桁数を定めている。時刻データとして年、月、日、
時、分、秒をそれぞれ1バイトで示す場合、6バイト(48桁)必要となり、さらに付加
データとして1バイト(8桁)または2バイト(16桁)を加えた値を設定すれば良い。
そして、前記イベント検出周期38は、イベント検出回路20におけるイベント検出の有
無(イベント発生フラグ24の立ちの有無)を確認する周期である。前記記録桁設定デー
タ36や前記イベント検出周期38は、リアルタイムクロック10を出荷した後、ユーザ
により設定することを可能なものとしても良く、その場合は、リアルタイムクロック10
の外部端子を介してデータの書き込みを行うようにすれば良い。
The recording digit setting data 36 defines the number of digits of data (data combining time data and additional data) constituting event data described later. Time, year, month, day,
When the hour, minute, and second are each represented by 1 byte, 6 bytes (48 digits) are required, and a value obtained by adding 1 byte (8 digits) or 2 bytes (16 digits) as additional data may be set.
The event detection period 38 is a period for confirming whether or not an event is detected in the event detection circuit 20 (whether or not the event occurrence flag 24 is standing). The recording digit setting data 36 and the event detection period 38 may be set by the user after the real-time clock 10 is shipped. In this case, the real-time clock 10
Data may be written through the external terminal.

前記メモリ40は、上述した時刻データやイベント発生に関するデータ、および電圧低
下に関するデータを記録する記憶手段である。メモリ40には、詳細を後述する制御回路
42により構成されたイベントデータが、書き込みアドレス毎に割り当てられた領域に記
録される。
The memory 40 is storage means for recording the time data, the data related to the event occurrence, and the data related to the voltage drop. In the memory 40, event data configured by a control circuit 42, which will be described in detail later, is recorded in an area allocated for each write address.

前記制御回路42には、上述した計時回路18、イベント検出回路20、電圧低下検出
回路26、設定レジスタ34、メモリ40、および外部端子としての割り込み出力端子4
4が接続されている。制御回路42は、イベント検出回路20や電圧低下検出回路26か
ら入力されたフラグ情報に基づいて、フラグが立てられている事を検出した時刻データを
計時回路18から読み出す事が可能に構成されている。そして制御回路42では、前記イ
ベント検出回路20や電圧低下検出回路26により検出された各種情報を付加データとし
て、イベント発生時の時刻データの前段(先頭)に結びつける処理が行われる。ここで、
付加データを構成する8ビットのデータは、少なくともその先頭2桁を「11」で始まる
もの、すなわち「11XXXXXX」という形で示すようにすると良い。上述したように
、時刻データを構成する8ビットデータの最大値は「10」で始まるものであるため、「
11」で始まるデータを先頭に付加することにより、時刻データとの区別が容易となる。
このような形式で表示することで、ユーザが、複数のイベントデータをまとめて読み出し
、当該データが連続して表示された場合であっても、前記付加データの先頭部分(「11
」)が各イベントデータのヘッダとしての役割を担い、イベントデータの区切れを容易に
判断することができるようになる。なお、電圧低下に関するデータ(印加電圧の判定情報
)とイベント発生に関するデータを1バイトに示す場合には、前段の4ビットのうちの前
2桁をヘッダとし、後2桁のいずれかにより電圧低下データを示し、後段の4ビットで発
生したイベントの固有データを示すようにすれば良い。すなわち「11(ヘッダ)01(
電圧低下データ)XXXX(イベント固有データ)」とすれば良い。
The control circuit 42 includes the timing circuit 18, the event detection circuit 20, the voltage drop detection circuit 26, the setting register 34, the memory 40, and the interrupt output terminal 4 as an external terminal.
4 is connected. The control circuit 42 is configured to be able to read the time data when it is detected that the flag is set based on the flag information input from the event detection circuit 20 or the voltage drop detection circuit 26 from the time measuring circuit 18. Yes. In the control circuit 42, various information detected by the event detection circuit 20 or the voltage drop detection circuit 26 is used as additional data, and processing for linking to the previous stage (first) of the time data at the time of event occurrence is performed. here,
The 8-bit data constituting the additional data may be indicated by at least the first two digits starting with “11”, that is, “11XXXXXX”. As described above, the maximum value of the 8-bit data constituting the time data starts with “10”.
By adding data starting with “11” to the head, it becomes easy to distinguish from time data.
By displaying in such a format, even when the user reads a plurality of event data at once and displays the data continuously, the head portion of the additional data (“11
") Serves as a header of each event data, and it becomes possible to easily determine the break of event data. When data related to voltage drop (applied voltage determination information) and data related to event occurrence are shown in one byte, the first two digits of the preceding four bits are used as a header, and the voltage drop is caused by either the last two digits. It is only necessary to indicate data and indicate unique data of an event that occurs in the subsequent 4 bits. That is, “11 (header) 01 (
Voltage drop data) XXXX (event specific data) ”may be used.

なお、前記割り込み出力端子44は、任意のイベント入力の発生時に、時刻データやイ
ベント発生に関するデータ、および電圧低下に関するデータの記録と同時に、CPUに対
して信号を割り込み出力させる役割を担う。
The interrupt output terminal 44 plays a role of interrupting and outputting a signal to the CPU simultaneously with recording of time data, data related to event occurrence, and data related to voltage drop when an arbitrary event input occurs.

前記入出力処理回路46は、入出力インターフェースとなっており、設定レジスタ34
およびメモリ42に接続されるとともに、リアルタイムクロック10の外部端子としての
データ入出力端子48に接続されている。入出力処理回路46はデータ入出力端子48を
介して入力される書き込みデータを設定レジスタ34やメモリ40に出力したり、メモリ
40に記録されたイベントデータを読み出したりする役割を担う。
The input / output processing circuit 46 is an input / output interface.
The memory 42 is connected to a data input / output terminal 48 as an external terminal of the real-time clock 10. The input / output processing circuit 46 plays a role of outputting write data input via the data input / output terminal 48 to the setting register 34 and the memory 40 and reading event data recorded in the memory 40.

次に、上記のような構成のリアルタイムクロック10の動作について図2を参照して説
明する。まず、イベント入力端子22に対し、図示しないイベント発生デバイスから、イ
ベントが発生した旨(例えばスイッチのON/OFFなど)の電気信号が入力されると、
イベント検出回路20が当該信号を検出し、イベント発生フラグ24を立てる。具体的に
は、上述したように、イベント発生による電気信号を検出していない場合に示される「0
」から、イベント発生による電気信号を検出したことを示す「1」に、イベント発生フラ
グ24を変更する処理を行う。
Next, the operation of the real-time clock 10 configured as described above will be described with reference to FIG. First, when an electrical signal indicating that an event has occurred (for example, ON / OFF of a switch) is input to the event input terminal 22 from an event generation device (not shown),
The event detection circuit 20 detects the signal and sets the event generation flag 24. Specifically, as described above, “0” indicated when an electric signal due to the occurrence of an event is not detected.
The process of changing the event occurrence flag 24 is performed from “1” to “1” indicating that the electrical signal due to the occurrence of the event has been detected.

また、電源端子28から入力される電流の電圧については、電圧低下検出回路26にお
ける電圧比較部30にて基準電圧と比較される。比較により、印加電圧が基準電圧よりも
低いと判定された場合には、電圧低下検出回路26により電圧低下フラグ32が立てられ
る。具体的には、上述したように、印加電圧が基準電圧以上である場合に示される「0」
から、印加電圧が基準電圧より低い事を検出したことを示す「1」に、電圧低下フラグ3
2を変更する処理を行う。
In addition, the voltage of the current input from the power supply terminal 28 is compared with the reference voltage by the voltage comparison unit 30 in the voltage drop detection circuit 26. When the comparison determines that the applied voltage is lower than the reference voltage, the voltage drop detection circuit 26 sets the voltage drop flag 32. Specifically, as described above, “0” indicated when the applied voltage is equal to or higher than the reference voltage.
To “1” indicating that the applied voltage is lower than the reference voltage, the voltage drop flag 3
2 is changed.

制御回路42には、設定レジスタ34からイベント検出周期38が入力されているので
、この周期に応じてイベント検出回路20でイベント発生を検出したか否かを判断する(
S10)。ここで、イベント検出回路20のイベント発生フラグ24が「0」であった場
合、イベントの発生は検出されていないと判断される(Noの場合)。イベント発生の有
無の判断において、イベントの発生は検出されていないと判断された場合、当該判断の正
否を判断するために、印加電圧の低下が検出されたか否かの判断をする(S20)。ここ
で、印加電圧の低下が検出されていない場合(Noの場合)、イベントデータの書き込み
処理は行わずに処理を終了し、次回のイベント検出周期38のタイミングまで待機する。
Since the event detection cycle 38 is input from the setting register 34 to the control circuit 42, it is determined whether or not an event occurrence is detected by the event detection circuit 20 in accordance with this cycle (
S10). Here, when the event occurrence flag 24 of the event detection circuit 20 is “0”, it is determined that the occurrence of the event has not been detected (in the case of No). When it is determined in the determination of whether or not an event has occurred that an event has not been detected, it is determined whether or not a decrease in applied voltage has been detected in order to determine whether the determination is correct (S20). Here, when the drop of the applied voltage is not detected (in the case of No), the process ends without performing the event data writing process, and waits until the timing of the next event detection cycle 38.

一方、S20において印加電圧の低下が検出された場合には(Yesの場合)、電圧低
下の発生を1つの付加データとしてイベントデータの書き込み処理に移行する。
On the other hand, when a decrease in the applied voltage is detected in S20 (in the case of Yes), the occurrence of the voltage decrease is shifted to event data writing processing as one additional data.

また、S10においてイベントの発生が検出されていると判断された場合には(Yes
の場合)、印加電圧の低下が検出されたか否かの判断をする(S30)。ここでは、印加
電圧の低下が検出されていない場合(Noの場合)でも、印加電圧の低下が検出された場
合(Yesの場合)でも、イベントデータの書き込み処理に移行する。印加電圧の低下の
検出がされたか否かは、イベントの発生が検出されたか否かの判断の正否を判断するため
のものだからである。
If it is determined in S10 that an event has been detected (Yes)
In this case, it is determined whether or not a decrease in the applied voltage is detected (S30). Here, even when a decrease in applied voltage is not detected (in the case of No) or when a decrease in applied voltage is detected (in the case of Yes), the process proceeds to the event data writing process. This is because whether or not a decrease in the applied voltage has been detected is for determining whether or not an event has been detected.

イベントデータの書き込み処理に移行する場合、制御回路42は、計時回路18で記憶
している現在時刻を読み込む。
この後、制御回路42は、イベントの発生並びに電圧低下を示す付加データと、時刻デ
ータを結びつけたイベントデータを構成し、当該イベントデータの書き込み処理を行う。
イベントデータの書き込み処理はまず、メモリ40のアドレスにイベントデータを書き込
む処理を行う(S40)。次に、メモリ40におけるデータの記録領域へイベントデータ
を書き込む処理を行う(S50)。そして、書き込み終了後、メモリ40の書き込みアド
レスに「1」を加算する処理を行う(S60)。なお、イベント情報をメモリ40へ書き
込むには、下位のメモリアドレスから上位のメモリアドレスへ順に書き込んでいっても良
く、上位のメモリアドレスから下位のメモリアドレスへ順に書き込んでいっても良い。な
お、上位のメモリアドレスから下位のメモリアドレスへ順に書き込みを行う場合、書き込
みアドレスから「1」が減算されることとなる。
When shifting to the event data writing process, the control circuit 42 reads the current time stored in the timer circuit 18.
Thereafter, the control circuit 42 configures event data in which the additional data indicating the occurrence of the event and the voltage drop and the time data are combined, and the event data is written.
In the event data write processing, first, event data is written to the address of the memory 40 (S40). Next, a process of writing event data to the data recording area in the memory 40 is performed (S50). Then, after the writing is completed, a process of adding “1” to the write address of the memory 40 is performed (S60). In order to write the event information to the memory 40, the event information may be written sequentially from the lower memory address to the upper memory address, or may be sequentially written from the upper memory address to the lower memory address. When writing is performed in order from the upper memory address to the lower memory address, “1” is subtracted from the write address.

メモリ40の書き込みアドレスに対する「1」の加算処理が終了した後、メモリ40に
対するイベント情報の書き込み処理は終了され、次回のイベント検出周期38のタイミン
グまで待機状態が保たれる。
After the process of adding “1” to the write address of the memory 40 is finished, the process of writing the event information to the memory 40 is finished and the standby state is maintained until the next event detection cycle 38.

このような構成のリアルタイムクロック10によれば、イベント検出周期38毎の印加
電圧の低下も検出することとなる。ここで、入力電流の電圧(印加電圧)が低下した場合
、イベント検出回路20のレジスタ(不図示)に記録された情報(イベント発生フラグ2
4)の信頼性が低下する。このため、上記のような構成とすることにより、イベント発生
の有無の判断が正しいものであるか否かの判断についての信頼性を向上させることができ
る。
According to the real-time clock 10 having such a configuration, a decrease in applied voltage for each event detection period 38 is also detected. Here, when the voltage (applied voltage) of the input current decreases, the information (event occurrence flag 2) recorded in the register (not shown) of the event detection circuit 20
4) The reliability decreases. For this reason, with the above configuration, it is possible to improve the reliability of the determination as to whether or not the determination of the occurrence of an event is correct.

また、メモリ40に対し、時刻データとともに付加データを記録することにより、ユー
ザはイベント発生時の時刻データ以外の情報も得ることができる。例えば、付加データと
してイベント固有のデータを記録するようにすれば、発生したイベントの種類を特定する
ことも可能となる。
Further, by recording the additional data together with the time data in the memory 40, the user can obtain information other than the time data when the event occurs. For example, if event-specific data is recorded as additional data, the type of event that has occurred can be specified.

また、印加電圧の低下を検出した際の情報を単体でも1つのイベントとして記録するよ
うにすることで、リアルタイムクロック10に対して、いつまで正常な電力供給が成され
ていたかの確認が可能となり、システムエラーが発生した際の解析精度が飛躍的に向上す
る。
In addition, by recording the information when a drop in the applied voltage is detected as a single event, it is possible to confirm how long normal power supply has been made to the real-time clock 10, and the system The analysis accuracy when an error occurs is dramatically improved.

また、振動子14を圧電振動子とし、振動片に水晶を使用した場合には、イベントデー
タの記録時刻の高精度化を図ることができ、高分解能なイベント記録が可能となる。
In addition, when the vibrator 14 is a piezoelectric vibrator and crystal is used for the vibrating piece, it is possible to increase the accuracy of the event data recording time, and high-resolution event recording is possible.

次に、本発明のリアルタイムクロックに係る第2の実施形態について、図3を参照して
説明する。本実施形態に係るリアルタイムクロックの殆どの構成は、上述した第1の実施
形態に係るリアルタイムクロック10と同様である。よって、その機能を同一とする箇所
には図面に100を足した符号を付して、その詳細な説明は省略することとする。本実施
形態に係るリアルタイムクロック110と第1の実施形態に係るリアルタイムクロック1
0との相違点としては、電圧低下検出回路126による検出電圧を複数のレベル(電圧値
範囲)毎に検出可能な構成とした点にある。
Next, a second embodiment according to the real-time clock of the present invention will be described with reference to FIG. Most configurations of the real-time clock according to the present embodiment are the same as those of the real-time clock 10 according to the first embodiment described above. Therefore, portions having the same function are denoted by reference numerals added with 100 in the drawings, and detailed description thereof is omitted. A real-time clock 110 according to the present embodiment and a real-time clock 1 according to the first embodiment
The difference from 0 is that the voltage detected by the voltage drop detection circuit 126 can be detected at a plurality of levels (voltage value ranges).

具体的には、電圧低下検出回路126に備える電圧比較部を2つとし、それぞれに異な
る閾値(基準となる電流の電圧)を設定することとしている。例えば図3に示すように、
第1電圧比較部130aと第2電圧比較部130bを備えるようにした場合、第1電圧比
較部130aに設定される閾値(第1の閾値)は、発振器112の発振動作が保証される
電流電圧の下限値(例えば1.0V〜1.5V程度)を設定し、第2電圧比較部130b
に設定される閾値(第2の閾値)は、発振器112の発振が停止する発振停止電圧(例え
ば0.8V程度)を設定すれば良い。
Specifically, the voltage drop detection circuit 126 includes two voltage comparison units, and different threshold values (reference current voltages) are set for the two voltage comparison units. For example, as shown in FIG.
When the first voltage comparison unit 130a and the second voltage comparison unit 130b are provided, the threshold value (first threshold value) set in the first voltage comparison unit 130a is a current voltage that guarantees the oscillation operation of the oscillator 112. Is set to a lower limit (for example, about 1.0 V to 1.5 V), and the second voltage comparison unit 130b is set.
As the threshold value set to (second threshold value), an oscillation stop voltage (for example, about 0.8 V) at which the oscillation of the oscillator 112 stops may be set.

そして、第1電圧比較部130aに入力された電圧の値が動作保証電圧の下限値よりも
低いと判定された場合には動作保証外電圧フラグ132aが立てられ、第2電圧比較部1
30bに入力された電圧の値が発振停止電圧よりも低いと判定された場合には発振停止電
圧フラグ132bが立てられる。すなわち、入力電圧の値が発振停止電圧よりも低い場合
には、動作保証外電圧フラグ132aと発振停止電圧フラグ132bの双方が立てられる
こととなる。
When it is determined that the value of the voltage input to the first voltage comparison unit 130a is lower than the lower limit value of the operation guarantee voltage, the non-operation guarantee voltage flag 132a is set, and the second voltage comparison unit 1
When it is determined that the value of the voltage input to 30b is lower than the oscillation stop voltage, the oscillation stop voltage flag 132b is set. That is, when the value of the input voltage is lower than the oscillation stop voltage, both the non-operation guaranteed voltage flag 132a and the oscillation stop voltage flag 132b are set.

具体的には図4に示すように、電源端子128から入力された電流が第1電圧比較部1
30a、第2電圧比較部130bの双方に入力され、入力された電流電圧が動作保証電圧
の範囲内にある場合には、いずれのフラグも立てられることが無い(図4中、F1=0、
F2=0)。これに対し、入力された電源電圧が動作保証電圧の下限値を下回った場合に
は、第1電圧比較部130aの閾値を下回ったと判定され、動作保証外電圧フラグ132
aが立てられる(図4中、F1=1に変更される)こととなる。さらに、入力電圧が発振
停止電圧を下回った場合には、第2電圧比較部130bの閾値も下回ったと判定されるこ
ととなり、動作保証外電圧フラグ132aに加え、発振停止電圧フラグ132bが立てら
れる(図4中F2=1に変更される)。
Specifically, as shown in FIG. 4, the current input from the power supply terminal 128 is converted into the first voltage comparison unit 1.
30a and the second voltage comparison unit 130b. When the input current voltage is within the range of the operation guarantee voltage, neither flag is set (in FIG. 4, F1 = 0,
F2 = 0). On the other hand, if the input power supply voltage falls below the lower limit value of the operation guarantee voltage, it is determined that the input voltage falls below the threshold value of the first voltage comparison unit 130a, and the non-operation guarantee voltage flag 132
a is set (changed to F1 = 1 in FIG. 4). Furthermore, when the input voltage falls below the oscillation stop voltage, it is determined that the threshold value of the second voltage comparison unit 130b is also below, and the oscillation stop voltage flag 132b is set in addition to the non-operation guaranteed voltage flag 132a ( In FIG. 4, it is changed to F2 = 1).

このように入力電流の電圧低下を段階的に検出することができるようにすることで、リ
アルタイムクロック110の動作状態の解析を詳細に行うことができるようになり、イベ
ントデータとして記録された情報の正否を、より詳細に判定することも可能となる。
By making it possible to detect the voltage drop of the input current step by step in this way, it becomes possible to analyze the operating state of the real-time clock 110 in detail, and the information recorded as event data. It is also possible to determine the correctness in more detail.

次に、本発明のリアルタイムクロックに係る第3の実施形態について、図5を参照して
説明する。なお、本実施形態に係るリアルタイムクロックも、その殆どの構成は、上述し
た第1、第2の実施形態に係るリアルタイムクロック10,110と同様である。よって
、その機能を同一とする箇所には、図面に200を足した符号を付して詳細な説明は省略
することとする。
Next, a third embodiment according to the real-time clock of the present invention will be described with reference to FIG. Note that most of the configuration of the real-time clock according to the present embodiment is the same as that of the real-time clocks 10 and 110 according to the first and second embodiments described above. Therefore, portions having the same function are denoted by reference numerals obtained by adding 200 to the drawings, and detailed description thereof will be omitted.

本実施形態に係るリアルタイムクロック210と第1、第2の実施形態に係るリアルタ
イムクロック10,110との相違点は、発振器212の発振状態を判定する発振停止検
出回路250を備えた点にある。発振停止検出回路250は、発振回路216から計時回
路218へ出力される信号を拾い、発信回路216から出力される信号の有無に基づいて
発振器212の発振が停止されたか否かの判定を行う回路である。
The difference between the real-time clock 210 according to this embodiment and the real-time clocks 10 and 110 according to the first and second embodiments is that an oscillation stop detection circuit 250 that determines the oscillation state of the oscillator 212 is provided. The oscillation stop detection circuit 250 picks up a signal output from the oscillation circuit 216 to the timer circuit 218, and determines whether or not the oscillation of the oscillator 212 is stopped based on the presence or absence of the signal output from the transmission circuit 216. It is.

このため、発振停止検出回路250に対して発振回路216からの信号の入力が途切れ
た場合には、発振器212の発振が停止されたと判定し、発振停止検出フラグ252を立
てる(0から1に変更する)ように構成されている。
Therefore, when the signal input from the oscillation circuit 216 is interrupted to the oscillation stop detection circuit 250, it is determined that the oscillation of the oscillator 212 is stopped, and the oscillation stop detection flag 252 is set (changed from 0 to 1). To be configured).

このような構成とすることにより、電源電圧の低下以外の要因等により発振器212の
発振が停止した場合であっても、その停止、すなわちイベントと共に記憶される時刻の不
具合を検証することが可能となり、記録データの信頼性の向上、記録データの正否の判定
を高い精度で行うことができるようになる。
With such a configuration, even when the oscillation of the oscillator 212 stops due to factors other than a decrease in the power supply voltage, it is possible to verify the stop, that is, the failure of the time stored with the event. Thus, it is possible to improve the reliability of the recorded data and determine whether the recorded data is correct or not with high accuracy.

なお、図5においては、上述した第2の実施形態を示すリアルタイムクロック110の
構成に加え、発振停止検出回路250を設けるように示しているが、第1の実施形態に係
るリアルタイムクロック110に対して発振停止検出回路250を設けるようにしても良
いし、電圧低下検出回路26,126,226を備えないリアルタイムクロックに対して
発振停止検出回路250を設けるようにしても良い。
In FIG. 5, the oscillation stop detection circuit 250 is provided in addition to the configuration of the real-time clock 110 shown in the second embodiment, but the real-time clock 110 according to the first embodiment is different from that shown in FIG. The oscillation stop detection circuit 250 may be provided, or the oscillation stop detection circuit 250 may be provided for a real-time clock that does not include the voltage drop detection circuits 26, 126, and 226.

上記実施形態に係るリアルタイムクロックでは単純に、イベント検出回路によりイベン
トが発生した旨の電気信号が検出された場合にイベント発生フラグを立てる旨記載した。
しかしながら本発明に係るリアルタイムクロックは、入力される電気信号のパルスの立上
り、または立下りを検出してイベント発生フラグを立てるように設定し、これを付加デー
タとして設定しても良い。具体的には、設定レジスタに対してイベント検出における検出
方式設定データ(電気信号の立上りを検出するか、立下りを検出するか)を記録しておき
、これをイベント検出回路に対する指令値とし、時刻データの記録の際、検出された信号
が立上り時のものであるか、立下り時のものであるかを付加データとして記録すれば良い
In the real-time clock according to the above-described embodiment, it is simply described that an event occurrence flag is set when an electric signal indicating that an event has occurred is detected by the event detection circuit.
However, the real-time clock according to the present invention may be set so as to set an event occurrence flag by detecting the rising or falling of a pulse of an input electric signal and setting this as additional data. Specifically, the detection method setting data in event detection (whether the rising of the electrical signal is detected or the falling is detected) is recorded in the setting register, and this is used as a command value for the event detection circuit, When recording time data, it may be recorded as additional data whether the detected signal is at the rising edge or the falling edge.

このような構成によれば、記録された時刻データには、電気信号の立上り、または立下
りのいずれを検出したかの情報も付加されることになる。このため、設定レジスタの内容
を書き換え、記録された時刻データが電気信号の立上りに起因するものか、立下りに起因
するものかという事が設定レジスタから読み取ることができなくなってしまった場合でも
、記録された時刻データに付加された情報に基づいて、その信号が立上り時のものであっ
たのか、立下り時のものであったのかを知ることができるようになる。つまり、イベント
入力端子の設定を付加情報として記録することにより、元の設定値(設定レジスタの設定
値)を知らなくても、前記設定値をユーザが、記録データから読み取ることが可能となる
のである。
According to such a configuration, information on whether the rising or falling of the electrical signal is detected is added to the recorded time data. For this reason, even if the contents of the setting register are rewritten and the recorded time data can no longer be read from the setting register whether it is caused by the rise or fall of the electrical signal, Based on the information added to the recorded time data, it becomes possible to know whether the signal was at the rising edge or at the falling edge. That is, by recording the setting of the event input terminal as additional information, the user can read the setting value from the recorded data without knowing the original setting value (setting value of the setting register). is there.

また、上記実施形態ではいずれも、イベント入力端子は1つとし、ここに入力される電
気信号に対して付加情報を付する旨記載した。この場合、イベント入力端子に入力される
電気信号自体に予め、それぞれ固有の情報が付加されている必要が生ずるが、次のような
構成とすることで、イベント毎の電気信号が同一であっても、制御回路に出力する信号に
対してイベント固有の情報を付加することができるようになる。すなわち、イベント入力
端子を複数設け、それぞれに個別のイベント発生デバイス(不図示)を接続する。そして
、イベント入力端子に入力された電気信号に対して、入力端子毎に割り当てられたポート
番号を付加し、これをイベント固有の情報として制御回路に対して出力し、付加情報を構
成する一のデータとするというものである。
このような構成とした場合であっても、本発明に係るリアルタイムクロックとみなすこと
ができる。
Further, in each of the above embodiments, it is described that the number of event input terminals is one and additional information is attached to the electric signal input thereto. In this case, it is necessary to add specific information to the electric signal itself input to the event input terminal in advance. However, with the following configuration, the electric signal for each event is the same. In addition, event-specific information can be added to the signal output to the control circuit. That is, a plurality of event input terminals are provided, and individual event generation devices (not shown) are connected to each. Then, a port number assigned to each input terminal is added to the electric signal input to the event input terminal, and this is output to the control circuit as event-specific information, and the additional information is configured. Data.
Even in such a configuration, it can be regarded as a real-time clock according to the present invention.

第1の実施形態に係るリアルタイムクロックの構成を示すブロック図である。It is a block diagram which shows the structure of the real-time clock which concerns on 1st Embodiment. リアルタイムクロックの動作を示すフローである。It is a flow which shows operation | movement of a real-time clock. 第2の実施形態に係るリアルタイムクロックの構成を示すブロック図である。It is a block diagram which shows the structure of the real-time clock which concerns on 2nd Embodiment. 第2の実施形態に係るリアルタイムクロックの電源電圧低下に伴うフラグ立ての流れを示すグラフである。It is a graph which shows the flow of flag raising accompanying the power supply voltage fall of the real time clock concerning a 2nd embodiment. 第3の実施形態に係るリアルタイムクロックの構成を示すブロック図である。It is a block diagram which shows the structure of the real-time clock which concerns on 3rd Embodiment.

符号の説明Explanation of symbols

10………リアルタイムクロック、12………発振器、14………振動子、16………
発振回路、18………計時回路、20………イベント検出回路、26………電圧低下検出
回路、34………設定レジスタ、40………メモリ、42………制御回路、46………入
出力処理回路。
10 ... Real time clock, 12 ... Oscillator, 14 ... Vibrator, 16 ...
Oscillation circuit 18 ......... Timer circuit 20 ......... Event detection circuit 26 ......... Voltage drop detection circuit 34 ......... Setting register 40 ... Memory 40 ... Control circuit 46 ... ... I / O processing circuit.

Claims (11)

時刻データを出力するリアルタイムクロックであって、
イベント検出信号が外部から入力されたことを検出するイベント検出回路と、
発振回路から出力された信号に基づいて前記時刻データを生成する計時回路と、
メモリと、
前記イベント検出回路により前記イベント検出信号の入力を検出した場合、前記リアル
タイムクロックの動作状態を示す付加データと、前記計時回路により生成された前記時刻
データとを有するイベントデータを前記メモリに記録する制御回路と、
を備えたことを特徴とするリアルタイムクロック。
A real-time clock that outputs time data,
An event detection circuit for detecting that an event detection signal is input from the outside;
A timing circuit that generates the time data based on a signal output from the oscillation circuit;
Memory,
Control that records event data having additional data indicating an operation state of the real-time clock and the time data generated by the timing circuit in the memory when the event detection circuit detects the input of the event detection signal Circuit,
Real-time clock characterized by comprising.
請求項1に記載のリアルタイムクロックであって、
電源端子に印加される電源電圧の低下を検出する電圧低下検出回路を備え、
前記付加データには、前記電圧低下検出回路で検出された前記電源電圧の低下を示す情
報である電圧低下情報を含むことを特徴とするリアルタイムクロック。
The real-time clock according to claim 1,
A voltage drop detection circuit that detects a drop in the power supply voltage applied to the power supply terminal,
The real time clock characterized in that the additional data includes voltage drop information which is information indicating a drop in the power supply voltage detected by the voltage drop detection circuit.
請求項2に記載のリアルタイムクロックであって、
前記電圧低下検出回路は、前記電源電圧が第1の閾値より下回っていることを検出する
第1電圧比較部を有し、
前記電圧低下検出情報は、前記イベント検出回路により前記イベント検出信号の入力を
検出した時に、前記電源電圧が前記第1の閾値を下回っていることを前記電圧低下検出回
路の前記第1電圧比較部が検出しているか否かを示す情報を含むことを特徴とするリアル
タイムクロック。
The real-time clock according to claim 2,
The voltage drop detection circuit includes a first voltage comparison unit that detects that the power supply voltage is lower than a first threshold,
The voltage drop detection information indicates that when the event detection circuit detects the input of the event detection signal, the first voltage comparison unit of the voltage drop detection circuit indicates that the power supply voltage is below the first threshold value. A real-time clock characterized by including information indicating whether or not is detected.
請求項3に記載のリアルタイムクロックであって、
前記電圧低下検出回路は、前記第1の閾値よりも低く設定された第2の閾値より前記電
源電圧が下回っていることを検出する第2電圧比較部を更に有し、
前記電圧低下検出情報は、前記電源電圧が前記第2の閾値より下回っていることを前記
電圧低下検出回路の前記第2電圧比較部が検出しているか否かを示す情報を含むことを特
徴とするリアルタイムクロック。
The real-time clock according to claim 3,
The voltage drop detection circuit further includes a second voltage comparison unit that detects that the power supply voltage is lower than a second threshold set lower than the first threshold.
The voltage drop detection information includes information indicating whether or not the second voltage comparison unit of the voltage drop detection circuit detects that the power supply voltage is lower than the second threshold. Real time clock.
請求項1乃至4のいずれかに記載のリアルタイムクロックであって、
前記発振回路が発振停止していることを検出する発振停止検出回路を備え、
前記付加データは、前記発振停止検出回路が前記発振停止を検出しているか否かを示す
発振停止情報を含むことを特徴とするリアルタイムクロック。
The real-time clock according to any one of claims 1 to 4,
An oscillation stop detection circuit for detecting that the oscillation circuit has stopped oscillating;
The real-time clock, wherein the additional data includes oscillation stop information indicating whether or not the oscillation stop detection circuit detects the oscillation stop.
請求項2乃至5のいずれかに記載のリアルタイムクロックであって、
前記イベント検出信号の電圧波形の立上りを検出する立上り検出モードと、立下りを検
出する立下り検出モードとのいずれか一方を設定することのできる設定レジスタを有し、
前記付加データは、前記イベント検出回路により前記イベント検出信号の入力を検出し
た時に、前記立上り検出モードまたは前記立下り検出モードのどちらのモードが前記設定
レジスタに設定されていたかを示す検出情報を含むことを特徴とするリアルタイムクロッ
ク。
A real-time clock according to any one of claims 2 to 5,
A setting register capable of setting one of a rising detection mode for detecting a rising of a voltage waveform of the event detection signal and a falling detection mode for detecting a falling;
The additional data includes detection information indicating whether the rising detection mode or the falling detection mode is set in the setting register when the event detection circuit detects the input of the event detection signal. Real-time clock characterized by that.
請求項2乃至6のいずれかに記載のリアルタイムクロックであって、
前記イベント検出信号を入力する端子を複数設け、
前記制御回路は、前記イベント検出回路により前記イベント検出信号の入力を検出した
場合、前記付加データと、前記時刻データと、前記イベント検出信号が入力された前記端
子のポート番号とを有する前記イベントデータを前記メモリに記録することを特徴とする
リアルタイムクロック。
The real-time clock according to any one of claims 2 to 6,
Provide a plurality of terminals for inputting the event detection signal,
The control circuit, when the event detection circuit detects the input of the event detection signal, the event data having the additional data, the time data, and the port number of the terminal to which the event detection signal is input Is recorded in the memory.
イベント発生時の時刻データをメモリに記録する機能を有するリアルタイムクロックの
データ記録方法であって、
前記時刻データと、前記イベント発生時におけるリアルタイムクロックの動作状態を判
定した付加データとを有するイベントデータとして記録することを特徴とするリアルタイ
ムクロックのデータ記録方法。
A data recording method of a real-time clock having a function of recording time data at the time of event occurrence in a memory,
A real-time clock data recording method comprising: recording the time data as event data having the time data and additional data for determining an operation state of the real-time clock at the time of the event occurrence.
請求項8に記載のリアルタイムクロックのデータ記録方法であって、
前記付加データは、電源端子に印加される電源電圧が閾値を下回っているか否かを判定
した情報を含むことを特徴とするリアルタイムクロックのデータ記録方法。
A data recording method for a real-time clock according to claim 8,
The real-time clock data recording method, wherein the additional data includes information that determines whether or not a power supply voltage applied to a power supply terminal is below a threshold value.
請求項8に記載のリアルタイムクロックのデータ記録方法であって、
前記付加データは、前記印加電圧が、複数の電圧値範囲のいずれに含まれるかを判定し
た情報を含むことを特徴とするリアルタイムクロックのデータ記録方法。
A data recording method for a real-time clock according to claim 8,
The data recording method for a real-time clock, wherein the additional data includes information for determining which of the plurality of voltage value ranges the applied voltage is included in.
請求項8乃至10のいずれかに記載のリアルタイムクロックのデータ記録方法であって

前記付加データは、前記リアルタイムクロックの発振回路の発振停止を検出したか否か
の情報を含むことを特徴とするリアルタイムクロックのデータ記録方法。
A data recording method for a real-time clock according to any one of claims 8 to 10,
The real-time clock data recording method, wherein the additional data includes information on whether or not oscillation stop of the oscillation circuit of the real-time clock is detected.
JP2008145530A 2007-07-20 2008-06-03 Real-time clock and data recording method for real-time clock Active JP5256856B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2008145530A JP5256856B2 (en) 2007-07-20 2008-06-03 Real-time clock and data recording method for real-time clock
US12/175,099 US8209561B2 (en) 2007-07-20 2008-07-17 Real time clock and method for recording data in real time clock
US13/410,784 US8458506B2 (en) 2007-07-20 2012-03-02 Real time clock and method for recording data in real time clock

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2007189145 2007-07-20
JP2007189145 2007-07-20
JP2008145530A JP5256856B2 (en) 2007-07-20 2008-06-03 Real-time clock and data recording method for real-time clock

Related Child Applications (2)

Application Number Title Priority Date Filing Date
JP2009294245A Division JP2010134942A (en) 2007-07-20 2009-12-25 Real-time clock and data recording method of real-time clock
JP2013046784A Division JP5477488B2 (en) 2007-07-20 2013-03-08 Real-time clock and data recording method for real-time clock

Publications (2)

Publication Number Publication Date
JP2009048614A true JP2009048614A (en) 2009-03-05
JP5256856B2 JP5256856B2 (en) 2013-08-07

Family

ID=40500726

Family Applications (3)

Application Number Title Priority Date Filing Date
JP2008145530A Active JP5256856B2 (en) 2007-07-20 2008-06-03 Real-time clock and data recording method for real-time clock
JP2009294245A Withdrawn JP2010134942A (en) 2007-07-20 2009-12-25 Real-time clock and data recording method of real-time clock
JP2013046784A Active JP5477488B2 (en) 2007-07-20 2013-03-08 Real-time clock and data recording method for real-time clock

Family Applications After (2)

Application Number Title Priority Date Filing Date
JP2009294245A Withdrawn JP2010134942A (en) 2007-07-20 2009-12-25 Real-time clock and data recording method of real-time clock
JP2013046784A Active JP5477488B2 (en) 2007-07-20 2013-03-08 Real-time clock and data recording method for real-time clock

Country Status (1)

Country Link
JP (3) JP5256856B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013152733A (en) * 2007-07-20 2013-08-08 Seiko Epson Corp Real time clock and data recording method of real time clock
JP2017102515A (en) * 2015-11-30 2017-06-08 セイコーエプソン株式会社 Clocking device, electronic apparatus and movable body
JP2018116588A (en) * 2017-01-20 2018-07-26 セイコーエプソン株式会社 Circuit device, real-time clocking device, electronic apparatus, and vehicle

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5858861B2 (en) * 2012-04-27 2016-02-10 三菱電機株式会社 Clock number / time correspondence circuit, designated clock time generation circuit, event execution instruction / time difference generation circuit, event execution apparatus, radar apparatus, and communication apparatus
JP7238464B2 (en) 2019-02-26 2023-03-14 セイコーエプソン株式会社 Real-time clock modules, electronic devices and moving objects

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6474684A (en) * 1987-09-16 1989-03-20 Koito Kogyo Kk Data collection and storage device
JP2001228932A (en) * 2000-02-15 2001-08-24 Ricoh Co Ltd Real-time clock device
JP2003132470A (en) * 2001-10-26 2003-05-09 Seiko Epson Corp Real time clock for electrical equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5256856B2 (en) * 2007-07-20 2013-08-07 セイコーエプソン株式会社 Real-time clock and data recording method for real-time clock

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6474684A (en) * 1987-09-16 1989-03-20 Koito Kogyo Kk Data collection and storage device
JP2001228932A (en) * 2000-02-15 2001-08-24 Ricoh Co Ltd Real-time clock device
JP2003132470A (en) * 2001-10-26 2003-05-09 Seiko Epson Corp Real time clock for electrical equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6012053494; 'DS1678 Real-Time Event Recorder' datasheet , 2005, p.1-25, Maxim Integrated Products *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013152733A (en) * 2007-07-20 2013-08-08 Seiko Epson Corp Real time clock and data recording method of real time clock
JP2017102515A (en) * 2015-11-30 2017-06-08 セイコーエプソン株式会社 Clocking device, electronic apparatus and movable body
JP2018116588A (en) * 2017-01-20 2018-07-26 セイコーエプソン株式会社 Circuit device, real-time clocking device, electronic apparatus, and vehicle

Also Published As

Publication number Publication date
JP5256856B2 (en) 2013-08-07
JP2010134942A (en) 2010-06-17
JP5477488B2 (en) 2014-04-23
JP2013152733A (en) 2013-08-08

Similar Documents

Publication Publication Date Title
JP5477488B2 (en) Real-time clock and data recording method for real-time clock
US8458506B2 (en) Real time clock and method for recording data in real time clock
JP5228392B2 (en) Temperature compensated oscillation circuit, real-time clock device and electronic equipment
JP2009037456A (en) Micro-controller and its control method
CN101594133B (en) Semiconductor integrated circuit, control method, and information processing apparatus
JP5590174B2 (en) Temperature compensated oscillation circuit, real-time clock device and electronic equipment
WO2004092751A1 (en) Pulse width measuring apparatus with auto-range setting function
JPWO2008075702A1 (en) Signal measuring apparatus and signal measuring method
JP2010054412A (en) Real-time clock
JP2777372B2 (en) Sensor signal processing device
JP5008688B2 (en) Time Element Relay
JP4853416B2 (en) Event recorder and electronic device equipped with the same
JP2007064867A (en) Real-time clock unit
JP5056227B2 (en) Event recorder and time data recording method of event recorder
JP5831853B2 (en) Temperature compensated oscillation circuit, real-time clock device and electronic equipment
JPS62226294A (en) Secular change recordable ic card
JP2022015020A (en) Circuit device and real-time clock device
JP2621598B2 (en) Magnetic disk drive
CN106997784B (en) Dynamic random access memory and test method for carrying system thereof
JPS58197593A (en) Meter sensor
JP2009205213A (en) Event recorder and electronic device therewith
JP2023161717A (en) Real-time clock module
JPH05326845A (en) Semiconductor integrated circuit device
JP3963135B2 (en) Nonvolatile memory test control method
JP2006030136A (en) Real-time clock circuit, semiconductor integrated circuit, and watt-hour meter device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110519

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20110729

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20110729

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110819

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121010

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121016

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130108

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130308

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130408

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

Free format text: PAYMENT UNTIL: 20160502

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5256856

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350