JP2010134942A - 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
JP2010134942A
JP2010134942A JP2009294245A JP2009294245A JP2010134942A JP 2010134942 A JP2010134942 A JP 2010134942A JP 2009294245 A JP2009294245 A JP 2009294245A JP 2009294245 A JP2009294245 A JP 2009294245A JP 2010134942 A JP2010134942 A JP 2010134942A
Authority
JP
Japan
Prior art keywords
real
time clock
event
voltage
data
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
Application number
JP2009294245A
Other languages
Japanese (ja)
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 JP2009294245A priority Critical patent/JP2010134942A/en
Publication of JP2010134942A publication Critical patent/JP2010134942A/en
Withdrawn legal-status Critical Current

Links

Images

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 includes: 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, with the event data having additional data which indicates the operating state of the real-time clock 10, and the time data generated by the time-measuring circuit 18. <P>COPYRIGHT: (C)2010,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つのイベントデータとして記憶する。   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.

特開2003−132470号公報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 or lid, select either by assigning "Close → Open: Rise Signal" or "Open → Close: Fall Signal" Can be detected automatically. 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 In the real-time clock data recording method according to Application Example 8, it is preferable that the additional data includes information that determines which of the plurality of voltage value ranges the applied voltage is included in. A real time clock data recording method.

判定情報を上記のようなものとすることにより、判定情報に基づくリアルタイムクロックの動作状態の把握、解析を、より詳細に行うことが可能となり、記録されたイベントデータの信頼性も向上させることができる。   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 In the real-time clock data recording method according to Application Example 8, the additional data includes information indicating whether or not the oscillation stop of the oscillation circuit of the real-time clock is detected. Real-time clock data recording method.

付加データに上記のような情報を含ませることにより、電源電圧の多寡に起因しない発振器の発振停止があった場合であっても、その情報を検知することが可能となる。このため、記録されたイベントデータの信頼性を向上させることが可能となる。   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の実施形態に係るリアルタイムクロックの構成を示すブロック図である。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.

以下、本発明のリアルタイムクロックに係る実施の形態について図面を参照しつつ詳細に説明する。まず、本発明のリアルタイムクロックに係る第1の実施形態について、図1を参照して説明する。
図1に示すように、本実施形態に係るリアルタイムクロック10は、発振器12、計時回路18、イベント検出回路20、電圧低下検出回路26、設定レジスタ34、メモリ40、制御回路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.
As shown in FIG. 1, the real-time clock 10 according to the present embodiment includes an oscillator 12, a clock circuit 18, an event detection circuit 20, a voltage drop detection circuit 26, a setting register 34, a memory 40, a control circuit 42, and input / output processing. The circuit 46 is basically configured.

前記発振器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. , Month, day, hour, minute, and second are measured in each time register (not shown). 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の外部端子である電源端子28に接続されているとともに、内部に電圧比較部30を備えている。電圧比較部30には予め、基準となる電流の電圧が設定されており、前記電源端子28に対して入力された電流の電圧(印加電圧)と前記基準となる電圧とが比較される。電圧低下検出回路26は、電圧比較部30にて比較された入力電圧の値が基準電圧の値よりも低いと判定された場合に、電圧低下フラグ32を立てるように構成されている。具体的には、電源端子28から入力された電流の電圧が基準電圧の値より低くなった場合に、電圧低下フラグ32に1を立てる(0から1に変更する)のである。なお、基準電圧としては例えば、1.2V程度とすることができる。   The voltage drop detection circuit 26 is connected to a power supply terminal 28 that is an external terminal of the real-time clock 10 and includes a voltage comparison unit 30 therein. 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 is configured to set the voltage drop flag 32 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. 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. When the year, month, day, hour, minute, and second are each indicated by 1 byte as time data, 6 bytes (48 digits) are required, and 1 byte (8 digits) or 2 bytes (16 digits) are added as additional data. Set the value. 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. What is necessary is just to write.

前記メモリ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、および外部端子としての割り込み出力端子44が接続されている。制御回路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 is connected to the above-described timing circuit 18, event detection circuit 20, voltage drop detection circuit 26, setting register 34, memory 40, and interrupt output terminal 44 as an external terminal. 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, in the form of “11XXXXXXX”. As described above, since the maximum value of the 8-bit data constituting the time data starts with “10”, it is easy to distinguish it from the time data by adding the data starting with “11” to the head. . By displaying in this format, even if the user reads a plurality of event data all together and the data is displayed continuously, the top portion (“11”) of the additional data is It plays a role as a header of 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, is connected to the setting register 34 and the memory 42, and 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, etc.) is input to the event input terminal 22 from an event generation device (not shown), the event detection circuit 20 detects the signal, An event occurrence flag 24 is set. Specifically, as described above, the event occurrence flag 24 is changed from “0”, which is displayed when an electrical signal due to event occurrence is not detected, to “1”, which indicates that an electrical signal due to event occurrence has been detected. Perform the change process.

また、電源端子28から入力される電流の電圧については、電圧低下検出回路26における電圧比較部30にて基準電圧と比較される。比較により、印加電圧が基準電圧よりも低いと判定された場合には、電圧低下検出回路26により電圧低下フラグ32が立てられる。具体的には、上述したように、印加電圧が基準電圧以上である場合に示される「0」から、印加電圧が基準電圧より低い事を検出したことを示す「1」に、電圧低下フラグ32を変更する処理を行う。   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, the voltage drop flag 32 changes from “0”, which is indicated when the applied voltage is equal to or higher than the reference voltage, to “1”, which indicates that the applied voltage is lower than the reference voltage. Process to change.

制御回路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 according to 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), it is determined whether or not a decrease in applied voltage has been 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のレジスタ(不図示)に記録された情報(イベント発生フラグ24)の信頼性が低下する。このため、上記のような構成とすることにより、イベント発生の有無の判断が正しいものであるか否かの判断についての信頼性を向上させることができる。   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 reliability of the information (event occurrence flag 24) recorded in the register (not shown) of the event detection circuit 20 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の実施形態に係るリアルタイムクロック10との相違点としては、電圧低下検出回路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. The difference between the real-time clock 110 according to the present embodiment and the real-time clock 10 according to the first embodiment is that the detection voltage by the voltage drop detection circuit 126 can be detected for each of a plurality of levels (voltage value ranges). It is in the point.

具体的には、電圧低下検出回路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 illustrated in FIG. 3, when the first voltage comparison unit 130 a and the second voltage comparison unit 130 b are provided, the threshold value (first threshold value) set in the first voltage comparison unit 130 a The lower limit value (for example, about 1.0 V to 1.5 V) of the current voltage for which the oscillation operation is guaranteed is set, and the threshold value (second threshold value) set in the second voltage comparison unit 130b is determined by the oscillation of the oscillator 112. What is necessary is just to set the oscillation stop voltage (for example, about 0.8V) which stops.

そして、第1電圧比較部130aに入力された電圧の値が動作保証電圧の下限値よりも低いと判定された場合には動作保証外電圧フラグ132aが立てられ、第2電圧比較部130bに入力された電圧の値が発振停止電圧よりも低いと判定された場合には発振停止電圧フラグ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 guaranteed voltage, the non-operation guaranteed voltage flag 132a is set and input to the second voltage comparison unit 130b. When it is determined that the value of the applied voltage 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電圧比較部130a、第2電圧比較部130bの双方に入力され、入力された電流電圧が動作保証電圧の範囲内にある場合には、いずれのフラグも立てられることが無い(図4中、F1=0、F2=0)。これに対し、入力された電源電圧が動作保証電圧の下限値を下回った場合には、第1電圧比較部130aの閾値を下回ったと判定され、動作保証外電圧フラグ132aが立てられる(図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 input to both the first voltage comparison unit 130a and the second voltage comparison unit 130b, and the input current voltage is within the range of the operation guarantee voltage. If it is within the range, none of the flags is raised (F1 = 0, F2 = 0 in FIG. 4). On the other hand, when 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 132a is set (in FIG. 4). F1 = 1). 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.

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

Claims (7)

時刻データを出力するリアルタイムクロックであって、
イベント検出信号が外部から入力されたことを検出するイベント検出回路と、
発振回路から出力された信号に基づいて前記時刻データを生成する計時回路と、
メモリと、
前記イベント検出回路により前記イベント検出信号の入力を検出した場合、前記リアルタイムクロックの動作状態を示す付加データと、前記計時回路により生成された前記時刻データとを有するイベントデータを前記メモリに記録する制御回路と、
を備えたことを特徴とするリアルタイムクロック。
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 which of the rising detection mode and 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,
When the event detection circuit detects an input of the event detection signal, the control circuit includes 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.
JP2009294245A 2007-07-20 2009-12-25 Real-time clock and data recording method of real-time clock Withdrawn JP2010134942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009294245A JP2010134942A (en) 2007-07-20 2009-12-25 Real-time clock and data recording method of real-time clock

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2007189145 2007-07-20
JP2009294245A JP2010134942A (en) 2007-07-20 2009-12-25 Real-time clock and data recording method of real-time clock

Related Parent Applications (1)

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

Publications (1)

Publication Number Publication Date
JP2010134942A true JP2010134942A (en) 2010-06-17

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 Before (1)

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

Family Applications After (1)

Application Number Title Priority Date Filing Date
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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013231636A (en) * 2012-04-27 2013-11-14 Mitsubishi Electric Corp Clock number/time association circuit, identified clock time generation circuit, event execution instruction/time difference generation circuit, event execution device, radar device, and communication device

Families Citing this family (4)

* 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
JP6540478B2 (en) * 2015-11-30 2019-07-10 セイコーエプソン株式会社 Timekeeping device, electronic device, and moving body
JP2018116588A (en) * 2017-01-20 2018-07-26 セイコーエプソン株式会社 Circuit device, real-time clocking device, electronic apparatus, and vehicle
JP7238464B2 (en) 2019-02-26 2023-03-14 セイコーエプソン株式会社 Real-time clock modules, electronic devices and moving objects

Family Cites Families (4)

* 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
JP3909639B2 (en) * 2000-02-15 2007-04-25 株式会社リコー Real-time clock device
JP2003132470A (en) * 2001-10-26 2003-05-09 Seiko Epson Corp Real time clock for electrical equipment
JP5256856B2 (en) * 2007-07-20 2013-08-07 セイコーエプソン株式会社 Real-time clock and data recording method for real-time clock

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013231636A (en) * 2012-04-27 2013-11-14 Mitsubishi Electric Corp Clock number/time association circuit, identified clock time generation circuit, event execution instruction/time difference generation circuit, event execution device, radar device, and communication device

Also Published As

Publication number Publication date
JP2009048614A (en) 2009-03-05
JP2013152733A (en) 2013-08-08
JP5477488B2 (en) 2014-04-23
JP5256856B2 (en) 2013-08-07

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
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
JP5008688B2 (en) Time Element Relay
JP2010054412A (en) Real-time clock
JP2777372B2 (en) Sensor signal processing device
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
JP2007064867A (en) Real-time clock unit
JP2009026169A (en) Method for generating interrupt in event recorder, event recorder, and electronic appliance equipped with the same
CN106997784B (en) Dynamic random access memory and test method for carrying system thereof
JP2621598B2 (en) Magnetic disk drive
JPH05326845A (en) Semiconductor integrated circuit device
JP2022015020A (en) Circuit device and real-time clock device
JP2006030136A (en) Real-time clock circuit, semiconductor integrated circuit, and watt-hour meter device
JP2023161717A (en) Real-time clock module
JP2718402B2 (en) Time measurement circuit for built-in in-circuit emulator
JP2009205213A (en) Event recorder and electronic device therewith
JPH08285970A (en) Electronic timepiece
JPS5849826B2 (en) pulse counting circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110906