JP5636822B2 - Real-time clock module, electronic device and control method - Google Patents

Real-time clock module, electronic device and control method Download PDF

Info

Publication number
JP5636822B2
JP5636822B2 JP2010190440A JP2010190440A JP5636822B2 JP 5636822 B2 JP5636822 B2 JP 5636822B2 JP 2010190440 A JP2010190440 A JP 2010190440A JP 2010190440 A JP2010190440 A JP 2010190440A JP 5636822 B2 JP5636822 B2 JP 5636822B2
Authority
JP
Japan
Prior art keywords
circuit
power supply
signal
supply voltage
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.)
Active
Application number
JP2010190440A
Other languages
Japanese (ja)
Other versions
JP2012048527A5 (en
JP2012048527A (en
Inventor
正樹 若森
正樹 若森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2010190440A priority Critical patent/JP5636822B2/en
Publication of JP2012048527A publication Critical patent/JP2012048527A/en
Publication of JP2012048527A5 publication Critical patent/JP2012048527A5/ja
Application granted granted Critical
Publication of JP5636822B2 publication Critical patent/JP5636822B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、イベントを記録するリアルタイムクロックモジュール、電子機器および制御
方法に関する。
The present invention relates to a real-time clock module, an electronic device, and a control method for recording events.

特許文献1は、バックアップ電源により動作するリアルタイムクロックを有する電子機
器を開示している。このリアルタイムクロックは、発振回路と、イベント検出回路と、イ
ベント記憶メモリーとを有する。このリアルタイムクロックは、バックアップ電源からの
電圧印加により、メイン電源からの電圧印加がない場合であってもイベントを記憶するこ
とができる。
Patent Document 1 discloses an electronic device having a real-time clock that is operated by a backup power source. This real-time clock has an oscillation circuit, an event detection circuit, and an event storage memory. This real-time clock can store events even when there is no voltage application from the main power supply due to voltage application from the backup power supply.

特開2003−132470号公報JP 2003-132470 A

一般的に発振回路は比較的電力消費が大きいので、特許文献1の技術によっても、メモ
リーに記憶されたデータをバックアップ電源だけで維持できる時間には限界があった。
本発明は、電源電圧が低下した場合において、メモリーに記憶されたデータを維持でき
る時間をより長くする技術を提供する。
In general, since an oscillation circuit consumes a relatively large amount of power, there is a limit to the time during which data stored in a memory can be maintained using only a backup power source even with the technique disclosed in Patent Document 1.
The present invention provides a technique for extending the time during which data stored in a memory can be maintained when a power supply voltage is lowered.

[適用例1]電源電圧が印加されてクロック信号を生成する発振回路と、前記クロック信号に基づいて計時データを出力する計時回路と、イベントの入力を検出するイベント検出回路と、前記イベントと前記計時データとを関連付けたデータを、前記イベント検出回路から出力された信号に基づいてメモリーに記録させる記録制御回路と、前記電源電圧を監視する第1電圧検出回路と、前記電源電圧を監視する第2電圧検出回路と、前記第1電圧検出回路から出力された信号に基づいて、前記発振回路の電力消費を低減させるように前記発振回路の動作を制御する第1スイッチ回路と、前記第2電圧検出回路から出力された信号に基づいて、前記イベント検出回路の動作を制御する第2スイッチ回路と、を有するリアルタイムクロックモジュール。
[適用例2]前記発振回路の電力消費を低減させるように前記発振回路の動作を制御することは、前記発振回路の停止を制御することであることを特徴とする、適用例1に記載のリアルタイムクロックモジュール。
[適用例3]前記第1電圧検出回路は、第1閾値と前記電源電圧とを比較した信号を出力することを特徴とする、適用例1または2に記載のリアルタイムクロックモジュール。
[適用例4]前記第1スイッチ回路は、前記第1電圧検出回路から出力された信号、および前記イベント検出回路から出力された信号に基づいて、前記発振回路の動作を制御する、ことを特徴とする適用例1乃至3のいずれか一項に記載のリアルタイムクロックモジュール。
[適用例5]前記第1電圧検出回路から出力された信号に基づいて、前記第1スイッチ回路に信号を出力する遅延回路を有し、前記第1スイッチ回路は、前記遅延回路から出力された信号に基づいて前記発振回路の電力消費を低減させるように前記発振回路の動作を制御する、ことを特徴とする適用例1乃至4のいずれか一項に記載のリアルタイムクロックモジュール。
[適用例6]前記記録制御回路は、前記第1電圧検出回路から出力された信号に基づいて、前記第1スイッチ回路に信号を出力し、前記第1スイッチ回路は、前記記録制御回路から出力された信号に基づいて、前記発振回路の電力消費を低減させるように前記発振回路の動作を制御する、ことを特徴とする請求項1乃至5のいずれか一項に記載のリアルタイムクロックモジュール。
[適用例7]適用例1乃至6のいずれかの項に記載のリアルタイムクロックモジュールを有する電子機器。
[適用例8]発振回路が、電源電圧が印加されてクロック信号を生成するステップと、計時回路が、前記クロック信号に基づいて計時データを出力するステップと、第1電圧検出回路が、前記電源電圧が第1閾値以下になったことを検出した信号を第1スイッチ回路に出力するステップと、前記第1スイッチ回路が、前記発振回路の動作を停止させるステップと、イベント検出回路が、入力されたイベントを検出した信号を記憶制御回路に出力するステップと、前記記憶制御回路が、前記イベントと前記計時データとを関連付けたデータをメモリーに記録させるステップと、第2電圧検出回路が、前記電源電圧が前記第1閾値よりも低い第2閾値以下になったことを検出した信号を第2スイッチ回路に出力するステップと、前記第2スイッチ回路が、前記イベント検出回路の動作を停止させるステップと、を有する制御方法。
本発明は、外部から電源電圧の印加を受けてクロック信号を生成する発振回路と、前記クロック信号に基づいて計時データを出力する計時回路と、前記電源電圧が第1閾値以下になったことを検出する第1電圧検出回路と、入力されたイベントを前記計時データに関連付けて、前記電源電圧に基づいてデータを保持するメモリーに記録させる記録制御回路と、前記電源電圧が前記第1閾値以下になったことが検出された場合、前記発振回路の動作を停止させる第1スイッチ回路とを有するリアルタイムクロックモジュールを提供する。
このリアルタイムクロックモジュールによれば、電源電圧が前記第1閾値以下になったときに発振回路の動作を停止させない場合と比較して、メモリーに記憶されたデータを維持できる時間をより長くすることができる。
[Application Example 1] An oscillation circuit that generates a clock signal when a power supply voltage is applied, a timing circuit that outputs timing data based on the clock signal, an event detection circuit that detects an input of an event, the event, and the event A recording control circuit that records data associated with timing data in a memory based on a signal output from the event detection circuit, a first voltage detection circuit that monitors the power supply voltage, and a first control circuit that monitors the power supply voltage. A second voltage detection circuit, a first switch circuit for controlling the operation of the oscillation circuit to reduce power consumption of the oscillation circuit based on a signal output from the first voltage detection circuit, and the second voltage And a second switch circuit for controlling the operation of the event detection circuit based on a signal output from the detection circuit. Le.
Application Example 2 According to Application Example 1, in which the operation of the oscillation circuit is controlled to reduce the power consumption of the oscillation circuit, the stop of the oscillation circuit is controlled. Real-time clock module.
Application Example 3 The real-time clock module according to Application Example 1 or 2, wherein the first voltage detection circuit outputs a signal obtained by comparing a first threshold value and the power supply voltage.
Application Example 4 The first switch circuit controls the operation of the oscillation circuit based on a signal output from the first voltage detection circuit and a signal output from the event detection circuit. The real-time clock module according to any one of Application Examples 1 to 3.
Application Example 5 A delay circuit that outputs a signal to the first switch circuit based on a signal output from the first voltage detection circuit is provided, and the first switch circuit is output from the delay circuit. The real-time clock module according to any one of application examples 1 to 4, wherein the operation of the oscillation circuit is controlled so as to reduce power consumption of the oscillation circuit based on a signal.
Application Example 6 The recording control circuit outputs a signal to the first switch circuit based on the signal output from the first voltage detection circuit, and the first switch circuit outputs the signal from the recording control circuit. 6. The real-time clock module according to claim 1, wherein the operation of the oscillation circuit is controlled so as to reduce power consumption of the oscillation circuit based on the received signal.
Application Example 7 An electronic device having the real-time clock module according to any one of Application Examples 1 to 6.
Application Example 8 The step in which the oscillation circuit generates a clock signal when a power supply voltage is applied, the step in which the timing circuit outputs timing data based on the clock signal, and the first voltage detection circuit includes the power supply A step of outputting a signal detecting that the voltage has become equal to or lower than a first threshold to the first switch circuit; a step of causing the first switch circuit to stop the operation of the oscillation circuit; and an event detection circuit. Outputting a signal detecting the detected event to the storage control circuit, causing the storage control circuit to record data associating the event with the timing data, and a second voltage detection circuit including the power supply Outputting to the second switch circuit a signal detected that the voltage has become equal to or lower than a second threshold lower than the first threshold; and the second switch Road is, a control method and a step of stopping the operation of said event detection circuit.
The present invention relates to an oscillation circuit that generates a clock signal in response to application of a power supply voltage from the outside, a clock circuit that outputs clock data based on the clock signal, and the power supply voltage is equal to or lower than a first threshold value. A first voltage detection circuit for detecting, a recording control circuit for associating an input event with the time-measured data and recording the data in a memory for holding data based on the power supply voltage; and the power supply voltage is less than or equal to the first threshold value A real-time clock module is provided that includes a first switch circuit that stops the operation of the oscillation circuit when it is detected.
According to this real-time clock module, it is possible to extend the time during which the data stored in the memory can be maintained, as compared with the case where the operation of the oscillation circuit is not stopped when the power supply voltage falls below the first threshold value. it can.

好ましい態様において、このリアルタイムクロックモジュールは、前記電源電圧が前記
第1閾値よりも低い第2閾値以下になったことを検出する第2電圧検出回路と、前記イベ
ントが入力されたことを検出するイベント検出回路と、前記電源電圧が前記第2閾値以下
になったことが検出された場合、前記イベント検出回路の動作を停止させる第2スイッチ
回路とを有してもよい。
このリアルタイムクロックモジュールによれば、電源電圧が前記第1閾値以下になった
場合でもイベントが発生したときにはイベントを検出することができる。
In a preferred aspect, the real-time clock module includes a second voltage detection circuit that detects that the power supply voltage is equal to or lower than a second threshold value that is lower than the first threshold value, and an event that detects that the event is input. A detection circuit and a second switch circuit that stops the operation of the event detection circuit when it is detected that the power supply voltage is equal to or lower than the second threshold value may be included.
According to the real-time clock module, even when the power supply voltage becomes equal to or lower than the first threshold value, the event can be detected when the event occurs.

別の好ましい態様において、前記第1スイッチ回路は、前記発振回路の動作を停止させ
た後、前記電源電圧が前記第2閾値よりも高い場合において前記イベントが入力されたと
き、当該イベントが前記記録制御回路によって前記メモリーに記録される期間、前記発振
回路の動作を再開させてもよい。
このリアルタイムクロックモジュールによれば、電源電圧が前記第1閾値以下になった
場合でもイベントが発生したときにはイベントを記録することができる。
In another preferable aspect, after the first switch circuit stops the operation of the oscillation circuit, when the event is input when the power supply voltage is higher than the second threshold, the event is recorded. The operation of the oscillation circuit may be resumed for a period of time recorded in the memory by the control circuit.
According to the real-time clock module, even when the power supply voltage becomes equal to or lower than the first threshold value, the event can be recorded when the event occurs.

さらに別の好ましい態様において、このリアルタイムクロックモジュールは、前記電源
電圧が前記第1閾値以下になったことが検出された場合、所定の時間の待機の後に前記第
1スイッチ回路に指示を行う遅延回路を有し、前記第1スイッチ回路は、前記遅延回路か
らの指示を受けて、前記発振回路の動作を停止させてもよい。
このリアルタイムクロックモジュールによれば、データの転送時間を確保することがで
きる。
In still another preferred embodiment, the real-time clock module includes a delay circuit that instructs the first switch circuit after waiting for a predetermined time when it is detected that the power supply voltage is equal to or lower than the first threshold value. The first switch circuit may stop the operation of the oscillation circuit in response to an instruction from the delay circuit.
According to this real-time clock module, the data transfer time can be secured.

さらに別の好ましい態様において、前記記録制御回路は、前記電源電圧が前記第1閾値
以下になったことが検出された場合において記録動作中であるか否かを示す信号を前記第
1スイッチ回路に出力し、前記第1スイッチ回路は、前記記録制御回路からの信号が記録
動作中でないことを示す場合、前記発振回路の動作を停止させてもよい。
このリアルタイムクロックモジュールによれば、データの転送時間を確保することがで
きる。
In still another preferred aspect, the recording control circuit sends a signal indicating whether or not a recording operation is being performed to the first switch circuit when it is detected that the power supply voltage is equal to or lower than the first threshold value. The first switch circuit may stop the operation of the oscillation circuit when the signal from the recording control circuit indicates that the recording operation is not being performed.
According to this real-time clock module, the data transfer time can be secured.

また、本発明は、上記いずれかのリアルタイムクロックモジュールを有する電子機器を
提供する。
この電子機器によれば、電源電圧が前記第1閾値以下になったときに発振回路の動作を
停止させない場合と比較して、メモリーに記憶されたデータを維持できる時間をより長く
することができる。
The present invention also provides an electronic device having any one of the above real-time clock modules.
According to this electronic apparatus, it is possible to extend the time during which the data stored in the memory can be maintained as compared with the case where the operation of the oscillation circuit is not stopped when the power supply voltage becomes equal to or lower than the first threshold value. .

さらに、本発明は、発振回路が、外部から電源電圧の印加を受けてクロック信号を生成
するステップと、計時回路が、前記クロック信号に基づいて計時データを出力するステッ
プと、前記電源電圧が第1閾値以下になったことを第1電圧検出回路が検出するステップ
と、記録制御回路が、入力されたイベントを前記計時データに関連付けて、前記電源電圧
に基づいてデータを保持するメモリーに記録させるステップと、前記電源電圧が前記第1
閾値以下になったことが検出された場合、第1スイッチ回路が前記発振回路の動作を停止
させるステップとを有する制御方法を提供する。
この制御方法によれば、電源電圧が前記第1閾値以下になったときに発振回路の動作を
停止させない場合と比較して、メモリーに記憶されたデータを維持できる時間をより長く
することができる。
Further, according to the present invention, an oscillation circuit receives a power supply voltage from the outside to generate a clock signal, a timekeeping circuit outputs timekeeping data based on the clock signal, and the power supply voltage A step in which the first voltage detection circuit detects that the threshold voltage is less than or equal to one threshold, and a recording control circuit associates the input event with the time measurement data and records the event in a memory holding data based on the power supply voltage And the power supply voltage is the first
And a step of causing the first switch circuit to stop the operation of the oscillation circuit when it is detected that the threshold value is below the threshold value.
According to this control method, compared with the case where the operation of the oscillation circuit is not stopped when the power supply voltage becomes equal to or lower than the first threshold value, the time during which the data stored in the memory can be maintained can be made longer. .

第1実施形態に係るRTCモジュール10の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an RTC module 10 according to a first embodiment. RTCモジュール10の動作を示すフローチャートである。4 is a flowchart showing an operation of the RTC module 10. 第2実施形態に係るRTCモジュール20の構成を示すブロック図である。It is a block diagram which shows the structure of the RTC module 20 which concerns on 2nd Embodiment. RTCモジュール20の動作を示すフローチャートである。3 is a flowchart showing the operation of the RTC module 20. 変形例に係るRTCモジュール30の構成を示すブロック図である。It is a block diagram which shows the structure of the RTC module 30 which concerns on a modification. RTCモジュール30の動作を示すフローチャートである。3 is a flowchart showing the operation of the RTC module 30. 電子機器100の構成を示すブロック図である。1 is a block diagram showing a configuration of an electronic device 100. FIG.

1.第1実施形態
図1は、第1実施形態に係るRTC(Real Time Clock、リアルタイムクロック)モジ
ュール10の構成を示すブロック図である。RTCモジュール10は、発振回路11、分
周回路12、記録制御回路13、イベント検出回路14、遅延回路15、計時回路16、
メモリー17、スイッチ回路18、および電圧監視回路19を有する。RTCモジュール
10は、メイン電源Vmainから供給される電源電圧により動作する。RTCモジュー
ル10がメイン電源Vmainから供給される電源電圧により動作していることを「通常
動作」という。メイン電源Vmainからの電源電圧の印加が停止された場合、RTCモ
ジュール10は、バックアップ電源Vbakから供給される電源電圧により動作する。バ
ックアップ電源Vbakは、例えば電池である。RTCモジュール10がバックアップ電
源Vbakから供給される電源電圧により動作していることを「バックアップ動作」とい
う。
1. First Embodiment FIG. 1 is a block diagram showing a configuration of an RTC (Real Time Clock) module 10 according to a first embodiment. The RTC module 10 includes an oscillation circuit 11, a frequency dividing circuit 12, a recording control circuit 13, an event detection circuit 14, a delay circuit 15, a time measuring circuit 16,
A memory 17, a switch circuit 18, and a voltage monitoring circuit 19 are included. The RTC module 10 operates with a power supply voltage supplied from the main power supply Vmain. The operation of the RTC module 10 with the power supply voltage supplied from the main power supply Vmain is referred to as “normal operation”. When the application of the power supply voltage from the main power supply Vmain is stopped, the RTC module 10 operates with the power supply voltage supplied from the backup power supply Vbak. The backup power source Vbak is a battery, for example. The operation of the RTC module 10 by the power supply voltage supplied from the backup power supply Vbak is referred to as “backup operation”.

発振回路11は、電源電圧の印加を受けて、所定の周波数のクロック信号を生成する回
路、例えば水晶発振回路である。分周回路12は、発振回路11により生成されたクロッ
ク信号の周波数を1/nに分周する回路である。分周回路12は、分周した信号を動作ク
ロックとして記録制御回路13、遅延回路15、および計時回路16に出力する。計時回
路16は、動作クロックを用いて時刻を計り、計時データ(例えば、西暦の下2桁、月、
日、曜日、時、分、および秒を示すデータ)を出力する。イベント検出回路14は、外部
からイベント(イベントが起きたことを知らせるイベント信号)が入力されたことを検出
する。この例で、イベント検出回路14は、外部からイベントが入力されると、イベント
を検出したことを示すイベント検出信号を出力する。この例で、イベント検出信号は、所
定のクロック数の間High(H)レベルとなるパルス信号である。記録制御回路13は
、イベント検出信号が入力されると、メモリー17にデータを書き込む。このとき書き込
まれるデータは、例えば、イベントが検出されたことを示すフラグデータと、イベントが
検出された時刻を示す計時データとを含む。メモリー17は揮発性の記憶装置、例えばR
AM(Random Access memory)であり、電源電圧が印加されている間は、記録制御回路1
3により書き込まれたデータを保持する。
The oscillation circuit 11 is a circuit that generates a clock signal having a predetermined frequency in response to application of a power supply voltage, for example, a crystal oscillation circuit. The frequency dividing circuit 12 is a circuit that divides the frequency of the clock signal generated by the oscillation circuit 11 into 1 / n. The frequency dividing circuit 12 outputs the frequency-divided signal as an operation clock to the recording control circuit 13, the delay circuit 15, and the time measuring circuit 16. The clock circuit 16 measures time using the operation clock, and counts time data (for example, the last two digits of the year, month,
Data indicating the day, day of the week, hour, minute, and second). The event detection circuit 14 detects that an event (event signal notifying that an event has occurred) is input from the outside. In this example, when an event is input from the outside, the event detection circuit 14 outputs an event detection signal indicating that the event has been detected. In this example, the event detection signal is a pulse signal that is at a High (H) level for a predetermined number of clocks. The recording control circuit 13 writes data in the memory 17 when the event detection signal is input. The data written at this time includes, for example, flag data indicating that an event has been detected, and time measurement data indicating the time at which the event has been detected. The memory 17 is a volatile storage device such as R
While it is an AM (Random Access Memory) and the power supply voltage is applied, the recording control circuit 1
The data written by 3 is held.

電圧監視回路19(第1電圧検出回路の一例)は、電源電圧を監視する回路であり、コ
ンパレーターを含む。電圧監視回路19には、電源電圧および所定の基準電圧Vth1(
第1閾値の一例)が入力される。電圧監視回路19は、電源電圧および基準電圧Vth1
に応じて電圧監視信号を出力する。この例で、電圧監視信号は、電源電圧が基準電圧Vt
h1を下回っているときはHレベルとなり、電源電圧が基準電圧Vth1を上回っている
ときはLow(L)レベルとなる信号である。ここで、基準電圧Vth1は、メモリー1
7がデータを保持できる最低電圧よりも高い値を有する。
The voltage monitoring circuit 19 (an example of a first voltage detection circuit) is a circuit that monitors a power supply voltage and includes a comparator. The voltage monitoring circuit 19 includes a power supply voltage and a predetermined reference voltage Vth1 (
An example of the first threshold value is input. The voltage monitoring circuit 19 includes a power supply voltage and a reference voltage Vth1
The voltage monitoring signal is output according to In this example, the voltage monitoring signal has a power supply voltage of the reference voltage Vt.
The signal is H level when it is lower than h1, and is Low (L) level when the power supply voltage is higher than the reference voltage Vth1. Here, the reference voltage Vth1 is stored in the memory 1
7 has a value higher than the lowest voltage capable of holding data.

遅延回路15は、メモリー17へのデータの転送時間を確保するための回路である。遅
延回路15には、動作クロックおよび電圧監視信号が入力される。遅延回路15は、動作
クロックおよび電圧監視信号に応じて、スイッチ回路18に電源電圧のオンまたはオフを
指示する制御信号を出力する。この例で、制御信号は、ノーマリーHの信号であり、Hレ
ベルの電圧監視信号が入力されると、すなわち、電源電圧が基準電圧Vth1を下回った
ことを示す信号が入力されると、所定のカウント数待機した後でLレベルとなる。カウン
トの回数は、1つのイベントに関するデータをメモリー17に書き込むのに要する時間よ
りも長い時間に相当する数である。遅延回路15は、カウンターを有しており、Hレベル
の電圧監視信号が入力されると、カウンターを初期化して、動作クロックに同期して1単
位ずつカウンターの値を変化させる。カウンターの値が閾値に達すると、遅延回路15か
ら出力される制御信号はLレベルになる。
The delay circuit 15 is a circuit for securing a data transfer time to the memory 17. An operation clock and a voltage monitoring signal are input to the delay circuit 15. The delay circuit 15 outputs a control signal that instructs the switch circuit 18 to turn on or off the power supply voltage in accordance with the operation clock and the voltage monitoring signal. In this example, the control signal is a normally H signal. When an H level voltage monitoring signal is input, that is, when a signal indicating that the power supply voltage is lower than the reference voltage Vth1 is input, a predetermined signal is input. After waiting for the count number, it becomes L level. The number of counts is a number corresponding to a time longer than the time required to write data related to one event in the memory 17. The delay circuit 15 has a counter. When an H level voltage monitoring signal is input, the delay circuit 15 initializes the counter and changes the value of the counter by one unit in synchronization with the operation clock. When the counter value reaches the threshold value, the control signal output from the delay circuit 15 becomes L level.

スイッチ回路18(第1スイッチ回路の一例)は、発振回路11、分周回路12、記録
制御回路13、イベント検出回路14、および遅延回路15への電源電圧の印加を開始ま
たは停止する回路である。スイッチ回路18には、電源電圧、電圧監視信号および制御信
号が入力される。スイッチ回路18は、電圧監視信号および制御信号に応じて、電源電圧
の印加を開始または停止(オンまたはオフ)する。この例で、スイッチ回路18は、Hレ
ベルの電圧監視信号とLレベルの制御信号が入力されると、発振回路11、分周回路12
、記録制御回路13、イベント検出回路14、および遅延回路15に電源電圧を印加しな
い。電圧監視信号がLレベルのとき、または、制御信号がHレベルのとき、スイッチ回路
18は、発振回路11、分周回路12、記録制御回路13、イベント検出回路14、およ
び遅延回路15に電源電圧を印加する。すなわち、スイッチ回路18は、電源電圧がVt
h1以下になったことが検出された場合、発振回路11の動作を停止させる。
The switch circuit 18 (an example of a first switch circuit) is a circuit that starts or stops the application of the power supply voltage to the oscillation circuit 11, the frequency divider circuit 12, the recording control circuit 13, the event detection circuit 14, and the delay circuit 15. . A power supply voltage, a voltage monitoring signal, and a control signal are input to the switch circuit 18. The switch circuit 18 starts or stops (on or off) the application of the power supply voltage in accordance with the voltage monitoring signal and the control signal. In this example, when an H level voltage monitoring signal and an L level control signal are input to the switch circuit 18, the oscillation circuit 11 and the frequency dividing circuit 12.
The power supply voltage is not applied to the recording control circuit 13, the event detection circuit 14, and the delay circuit 15. When the voltage monitoring signal is at the L level or when the control signal is at the H level, the switch circuit 18 supplies the power supply voltage to the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, the event detection circuit 14, and the delay circuit 15. Is applied. That is, the switch circuit 18 has a power supply voltage of Vt
When it is detected that the frequency is equal to or lower than h1, the operation of the oscillation circuit 11 is stopped.

図2は、RTCモジュール10の動作を示すフローチャートである。図2のフローは、
RTCモジュール10が通常動作からバックアップ動作に移行したことを契機として開始
される。
FIG. 2 is a flowchart showing the operation of the RTC module 10. The flow of FIG.
It is started when the RTC module 10 shifts from the normal operation to the backup operation.

ステップS100において、電圧監視回路19は、電源電圧を監視している。すなわち
、電圧監視回路19は、電源電圧が基準電圧Vth1を下回ったか判断する。電源電圧が
基準電圧Vth1を下回った場合(S100:YES)、電圧監視回路19から出力され
る電圧監視信号はHレベルになる。処理はステップS104に進む。電源電圧が基準電圧
Vth1を下回っていない場合(S100:NO)、電圧監視回路19から出力される電
圧監視信号はLレベルになる。処理はステップS101に進む。
In step S100, the voltage monitoring circuit 19 monitors the power supply voltage. That is, the voltage monitoring circuit 19 determines whether the power supply voltage has fallen below the reference voltage Vth1. When the power supply voltage falls below the reference voltage Vth1 (S100: YES), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes H level. The process proceeds to step S104. When the power supply voltage is not lower than the reference voltage Vth1 (S100: NO), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes L level. The process proceeds to step S101.

ステップS101−S103の処理は、イベント検出回路14および記録制御回路13
による処理であり、遅延回路15、スイッチ回路18、および電圧監視回路19によるス
テップS100およびS104−S111の処理とは並列して行われる。このとき、イベ
ント検出回路14は、イベント入力待ちの状態にある(ステップS101)。すなわち、
イベント検出回路14は、イベントが入力されたか判断する(ステップS102)。イベ
ントが入力されていない場合(S102:NO)、イベント検出回路14は、イベント入
力待ちの状態で待機する。イベントが入力された場合(S102:YES)、イベント検
出回路14は、イベント検出信号を出力する。イベント検出信号が入力されると、記録制
御回路13は、メモリー17にデータを書き込む。すなわち、記録制御回路13は、メモ
リー17にデータを転送する(ステップS103)。
The processing in steps S101 to S103 includes the event detection circuit 14 and the recording control circuit 13.
The processes of steps S100 and S104-S111 by the delay circuit 15, the switch circuit 18, and the voltage monitoring circuit 19 are performed in parallel. At this time, the event detection circuit 14 is waiting for an event input (step S101). That is,
The event detection circuit 14 determines whether an event is input (step S102). When no event is input (S102: NO), the event detection circuit 14 stands by in a state waiting for event input. When an event is input (S102: YES), the event detection circuit 14 outputs an event detection signal. When the event detection signal is input, the recording control circuit 13 writes data in the memory 17. That is, the recording control circuit 13 transfers data to the memory 17 (step S103).

ステップS104−S111の処理は、電源電圧が基準電圧Vth1を下回っていると
きの処理である。電圧監視回路19からHレベルの信号が入力されると、遅延回路15は
、カウントを開始する(ステップS104)。既に説明したようにステップS101−S
103の処理はステップS104−S111の処理とは並列して行われるので、遅延回路
15がカウント中である場合において、記録制御回路13がデータ転送の途中であるとき
は(S105:YES)、記録制御回路13はこの間もデータ転送を行う(ステップS1
06)。カウンターの値が所定の閾値になると、遅延回路15は、カウントを終了する(
ステップS107)。カウントを終了すると、遅延回路15から出力される制御信号はL
レベルになる。Hレベルの電圧監視信号とLレベルの制御信号が入力されると、スイッチ
回路18は、発振回路11、分周回路12、記録制御回路13、イベント検出回路14、
および遅延回路15への電源電圧の印加を停止する。すなわち、スイッチ回路18は、こ
れらの回路をスイッチオフする(ステップS108)。
The processing in steps S104 to S111 is processing when the power supply voltage is lower than the reference voltage Vth1. When the H level signal is input from the voltage monitoring circuit 19, the delay circuit 15 starts counting (step S104). Steps S101-S as already explained
Since the process 103 is performed in parallel with the processes in steps S104 to S111, when the delay circuit 15 is counting and the recording control circuit 13 is in the middle of data transfer (S105: YES), the recording is performed. The control circuit 13 performs data transfer during this time (step S1).
06). When the counter value reaches a predetermined threshold, the delay circuit 15 finishes counting (
Step S107). When the count ends, the control signal output from the delay circuit 15 is L
Become a level. When an H level voltage monitoring signal and an L level control signal are input, the switch circuit 18 includes an oscillation circuit 11, a frequency dividing circuit 12, a recording control circuit 13, an event detection circuit 14,
And the application of the power supply voltage to the delay circuit 15 is stopped. That is, the switch circuit 18 switches off these circuits (step S108).

RTCモジュール10によれば、電源電圧が基準電圧Vth1を下回ると、発振回路1
1の動作が停止される。発振回路11の動作を停止しない場合と比較して、RTCモジュ
ール10の消費電力は低減する。すなわち、メモリー17がデータを保持できる時間は長
くなる。
According to the RTC module 10, when the power supply voltage falls below the reference voltage Vth1, the oscillation circuit 1
The operation of 1 is stopped. Compared with the case where the operation of the oscillation circuit 11 is not stopped, the power consumption of the RTC module 10 is reduced. That is, the time that the memory 17 can hold data becomes longer.

ステップS109−S111の処理は、発振回路11の動作が停止された後、再度動作
を開始するまでの処理である。ステップS109において、発振回路11、分周回路12
、記録制御回路13、およびイベント検出回路14は、動作を停止した状態、すなわち復
帰待ちの状態にある。この間、電圧監視回路19は、電源電圧を監視している。すなわち
、電圧監視回路19は、電源電圧が基準電圧Vth1を上回ったか判断する(ステップS
110)。電源電圧が基準電圧Vth1を下回っている間(S110:NO)、復帰待ち
の状態が維持される。例えばメイン電源の供給が開始されると、電源電圧は上昇する。電
源電圧が基準電圧Vth1を上回ると(S110:YES)、電圧監視回路19から出力
される電圧監視信号はLレベルになる。Lレベルの電圧監視信号が入力されると、発振回
路11、分周回路12、記録制御回路13、イベント検出回路14、および遅延回路15
への電源電圧の印加を開始する。すなわち、スイッチ回路18は、これらの回路をスイッ
チオンする(ステップS111)。メイン電源の供給が開始されると、RTCモジュール
10は、以下、通常動作に移行する。
The processing of steps S109 to S111 is processing until the operation is started again after the operation of the oscillation circuit 11 is stopped. In step S109, the oscillation circuit 11 and the frequency divider 12
The recording control circuit 13 and the event detection circuit 14 are in a stopped state, that is, in a waiting state for return. During this time, the voltage monitoring circuit 19 monitors the power supply voltage. That is, the voltage monitoring circuit 19 determines whether the power supply voltage has exceeded the reference voltage Vth1 (step S
110). While the power supply voltage is lower than the reference voltage Vth1 (S110: NO), the return waiting state is maintained. For example, when the main power supply starts, the power supply voltage increases. When the power supply voltage exceeds the reference voltage Vth1 (S110: YES), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes L level. When an L-level voltage monitoring signal is input, the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, the event detection circuit 14, and the delay circuit 15 are input.
Start application of power supply voltage to. That is, the switch circuit 18 switches on these circuits (step S111). When the supply of main power is started, the RTC module 10 shifts to normal operation hereinafter.

2.第2実施形態
図3は、第2実施形態に係るRTCモジュール20の構成を示すブロック図である。以
下の説明において、第1実施形態と共通する要素には共通の参照符号が用いられる。RT
Cモジュール20は、RTCモジュール10の構成に加え、電圧監視回路21およびスイ
ッチ回路22を有している。
2. Second Embodiment FIG. 3 is a block diagram showing a configuration of an RTC module 20 according to a second embodiment. In the following description, common reference numerals are used for elements common to the first embodiment. RT
The C module 20 includes a voltage monitoring circuit 21 and a switch circuit 22 in addition to the configuration of the RTC module 10.

電圧監視回路21(第2電圧検出回路の一例)は、電源電圧を監視する回路であり、コ
ンパレーターを含む。電圧監視回路21には、電源電圧および所定の基準電圧Vth2(
第2閾値の一例)が入力される。電圧監視回路21は、電源電圧および基準電圧Vth2
に応じて電圧監視信号を出力する。この例で、電圧監視信号は、電源電圧が基準電圧Vt
h2を下回っているときはHレベルとなり、電源電圧が基準電圧Vth2を上回っている
ときはLレベルとなる信号である。ここで、基準電圧Vth2は基準電圧Vth1よりも
低く、かつ、メモリー17が記憶しているデータを維持できる最低電圧よりも高い。
The voltage monitoring circuit 21 (an example of a second voltage detection circuit) is a circuit that monitors a power supply voltage and includes a comparator. The voltage monitoring circuit 21 includes a power supply voltage and a predetermined reference voltage Vth2 (
An example of a second threshold value is input. The voltage monitoring circuit 21 has a power supply voltage and a reference voltage Vth2
The voltage monitoring signal is output according to In this example, the voltage monitoring signal has a power supply voltage of the reference voltage Vt.
This signal is H level when it is lower than h2, and L level when the power supply voltage is higher than the reference voltage Vth2. Here, the reference voltage Vth2 is lower than the reference voltage Vth1 and higher than the lowest voltage at which the data stored in the memory 17 can be maintained.

スイッチ回路22(第2スイッチ回路の一例)は、イベント検出回路14への電源電圧
の印加を開始または停止する回路である。スイッチ回路22には、電源電圧、および電圧
監視回路21からの電圧監視信号が入力される。スイッチ回路22は、電圧監視信号に応
じて、電源電圧の印加を開始または停止する。この例で、スイッチ回路22は、Hレベル
の電圧監視信号が入力されると、イベント検出回路14に電源電圧を印加しない。Lレベ
ルの電圧監視信号が入力されると、スイッチ回路22は、イベント検出回路14に電源電
圧を印加する。すなわち、スイッチ回路22は、電源電圧がVth2以下になったことが
検出された場合、イベント検出回路14の動作を停止させる。
The switch circuit 22 (an example of a second switch circuit) is a circuit that starts or stops the application of the power supply voltage to the event detection circuit 14. The switch circuit 22 receives a power supply voltage and a voltage monitoring signal from the voltage monitoring circuit 21. The switch circuit 22 starts or stops application of the power supply voltage according to the voltage monitoring signal. In this example, the switch circuit 22 does not apply a power supply voltage to the event detection circuit 14 when an H level voltage monitoring signal is input. When an L level voltage monitoring signal is input, the switch circuit 22 applies a power supply voltage to the event detection circuit 14. That is, the switch circuit 22 stops the operation of the event detection circuit 14 when it is detected that the power supply voltage is equal to or lower than Vth2.

RTCモジュール20において、スイッチ回路18には、電源電圧、制御信号、および
電圧監視回路19からの電圧監視信号に加えて、イベント検出信号が入力される。スイッ
チ回路18は、電圧監視信号、制御信号、およびイベント検出信号に応じて、電源電圧の
印加を開始または停止する。この例で、スイッチ回路18は、Hレベルの電圧監視信号と
Lレベルの制御信号とが入力されると、発振回路11、分周回路12、記録制御回路13
、および遅延回路15に電源電圧を印加しない。この状態でイベント検出信号が入力され
ると、スイッチ回路18は、発振回路11、分周回路12、記録制御回路13、および遅
延回路15に電源電圧を印加する。すなわち、スイッチ回路18は、発振回路11の動作
を再開させる。このように、RTCモジュール20において、発振回路11およびイベン
ト検出回路14は、異なるスイッチ回路により電源電圧のオンオフが制御される。
In the RTC module 20, an event detection signal is input to the switch circuit 18 in addition to the power supply voltage, the control signal, and the voltage monitoring signal from the voltage monitoring circuit 19. The switch circuit 18 starts or stops the application of the power supply voltage according to the voltage monitoring signal, the control signal, and the event detection signal. In this example, when an H level voltage monitoring signal and an L level control signal are input to the switch circuit 18, the oscillation circuit 11, the frequency dividing circuit 12, and the recording control circuit 13 are input.
, And no power supply voltage is applied to the delay circuit 15. When an event detection signal is input in this state, the switch circuit 18 applies a power supply voltage to the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, and the delay circuit 15. That is, the switch circuit 18 resumes the operation of the oscillation circuit 11. Thus, in the RTC module 20, the oscillation circuit 11 and the event detection circuit 14 are controlled to be turned on and off by the different switch circuits.

RTCモジュール20において、遅延回路15には、動作クロックおよび電圧監視信号
に加えてイベント検出信号が入力される。電圧監視信号に対する動作と同様に、遅延回路
15は、動作クロックおよびイベント検出信号に応じて、スイッチ回路18に電源電圧の
オンまたはオフを指示する制御信号を出力する。イベント検出信号が入力されると、制御
信号は、所定のカウント数待機した後でLレベルとなる。
In the RTC module 20, the event detection signal is input to the delay circuit 15 in addition to the operation clock and the voltage monitoring signal. Similar to the operation for the voltage monitoring signal, the delay circuit 15 outputs a control signal instructing the switch circuit 18 to turn on or off the power supply voltage in accordance with the operation clock and the event detection signal. When the event detection signal is input, the control signal becomes L level after waiting for a predetermined count number.

図4は、RTCモジュール20の動作を示すフローチャートである。図4のフローは、
RTCモジュール10が通常動作からバックアップ動作に移行したことを契機として開始
される。
FIG. 4 is a flowchart showing the operation of the RTC module 20. The flow of FIG.
It is started when the RTC module 10 shifts from the normal operation to the backup operation.

ステップS200において、電圧監視回路19は、電源電圧を監視している。すなわち
、電圧監視回路19は、電源電圧が基準電圧Vth1を下回ったか判断する。電源電圧が
基準電圧Vth1を下回った場合(S200:YES)、電圧監視回路19から出力され
る電圧監視信号はHレベルになる。処理はステップS204に進む。電源電圧が基準電圧
Vth1を下回っていない場合(S200:NO)、電圧監視回路19から出力される電
圧監視信号はLレベルになる。処理はステップS201に進む。
In step S200, the voltage monitoring circuit 19 monitors the power supply voltage. That is, the voltage monitoring circuit 19 determines whether the power supply voltage has fallen below the reference voltage Vth1. When the power supply voltage falls below the reference voltage Vth1 (S200: YES), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes H level. The process proceeds to step S204. When the power supply voltage is not lower than the reference voltage Vth1 (S200: NO), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes L level. The process proceeds to step S201.

ステップS201−S203の処理は、イベント検出回路14および記録制御回路13
による処理であり、遅延回路15、スイッチ回路18、および電圧監視回路19によるス
テップS200およびS204−S208の処理とは並列して行われる。このとき、イベ
ント検出回路14は、イベント入力待ちの状態にある(ステップS201)。すなわち、
イベント検出回路14は、イベントが入力されたか判断する(ステップS202)。イベ
ントが入力されていない場合(S202:NO)、イベント検出回路14は、イベント入
力待ちの状態で待機する。イベントが入力された場合(S202:YES)、イベント検
出回路14は、イベント検出信号を出力する。イベント検出信号が入力されると、記録制
御回路13は、メモリー17にデータを書き込む。すなわち、記録制御回路13は、メモ
リー17にデータを転送する(ステップS203)。
The processing in steps S201 to S203 includes the event detection circuit 14 and the recording control circuit 13.
The processes of steps S200 and S204 to S208 by the delay circuit 15, the switch circuit 18, and the voltage monitoring circuit 19 are performed in parallel. At this time, the event detection circuit 14 is waiting for an event input (step S201). That is,
The event detection circuit 14 determines whether an event has been input (step S202). When no event is input (S202: NO), the event detection circuit 14 stands by in a state waiting for event input. When an event is input (S202: YES), the event detection circuit 14 outputs an event detection signal. When the event detection signal is input, the recording control circuit 13 writes data in the memory 17. That is, the recording control circuit 13 transfers data to the memory 17 (step S203).

ステップS204−S208の処理は、電源電圧が基準電圧Vth1を下回っていると
きの処理である。電圧監視回路19からHレベルの信号が入力されると、遅延回路15は
、カウントを開始する(ステップS204)。既に説明したようにステップS201−S
203の処理はステップS204−S208の処理とは並列して行われるので、遅延回路
15がカウント中である場合において、記録制御回路13がデータ転送の途中であるとき
は(S205:YES)、記録制御回路13はこの間もデータ転送を行う(ステップS2
06)。カウンターの値が所定の閾値になると、遅延回路15は、カウントを終了する(
ステップS207)。カウントを終了すると、遅延回路15から出力される制御信号はL
レベルになる。Hレベルの電圧監視信号とLレベルの制御信号が入力されると、スイッチ
回路18は、発振回路11、分周回路12、記録制御回路13、および遅延回路15への
電源電圧の印加を停止する。すなわち、スイッチ回路18は、これらの回路をスイッチオ
フする(ステップS208)。
The processing in steps S204 to S208 is processing when the power supply voltage is lower than the reference voltage Vth1. When the H level signal is input from the voltage monitoring circuit 19, the delay circuit 15 starts counting (step S204). Step S201-S as already explained
Since the processing of 203 is performed in parallel with the processing of steps S204 to S208, when the delay control circuit 15 is counting and the recording control circuit 13 is in the middle of data transfer (S205: YES), recording is performed. The control circuit 13 performs data transfer during this time (step S2
06). When the counter value reaches a predetermined threshold, the delay circuit 15 finishes counting (
Step S207). When the count ends, the control signal output from the delay circuit 15 is L
Become a level. When the H level voltage monitoring signal and the L level control signal are input, the switch circuit 18 stops applying the power supply voltage to the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, and the delay circuit 15. . That is, the switch circuit 18 switches off these circuits (step S208).

ステップS209において、電圧監視回路21は、電源電圧を監視している。すなわち
、電圧監視回路21は、電源電圧が基準電圧Vth2を下回ったか判断する。電源電圧が
基準電圧Vth2を下回った場合(S209:YES)、電圧監視回路21から出力され
る電圧監視信号はHレベルになる。処理はステップS217に進む。電源電圧が基準電圧
Vth2を下回っていない場合(S209:NO)、電圧監視回路21から出力される電
圧監視信号はLレベルになる。処理はステップS210に進む。
In step S209, the voltage monitoring circuit 21 monitors the power supply voltage. That is, the voltage monitoring circuit 21 determines whether the power supply voltage has fallen below the reference voltage Vth2. When the power supply voltage falls below the reference voltage Vth2 (S209: YES), the voltage monitoring signal output from the voltage monitoring circuit 21 becomes H level. The process proceeds to step S217. When the power supply voltage is not lower than the reference voltage Vth2 (S209: NO), the voltage monitoring signal output from the voltage monitoring circuit 21 becomes L level. The process proceeds to step S210.

ステップS210−S216の処理は、電源電圧がVth1より低くかつVth2より
高いときの処理である。このとき、発振回路11、分周回路12、記録制御回路13、お
よび遅延回路15には電源電圧が供給されていないが、イベント検出回路14には電源電
圧が供給されている。このとき、イベント検出回路14は、イベント入力待ちの状態にあ
る(ステップS210)。すなわち、イベント検出回路14は、イベントが入力されたか
判断する(ステップS211)。イベントが入力されていない場合(S211:NO)、
イベント検出回路14は、イベント入力待ちの状態で待機する。イベントが入力された場
合(S211:YES)、イベント検出回路14は、イベント検出信号を出力する。
The processing in steps S210 to S216 is processing when the power supply voltage is lower than Vth1 and higher than Vth2. At this time, the power supply voltage is not supplied to the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, and the delay circuit 15, but the power supply voltage is supplied to the event detection circuit 14. At this time, the event detection circuit 14 is waiting for an event input (step S210). That is, the event detection circuit 14 determines whether an event is input (step S211). When no event is input (S211: NO),
The event detection circuit 14 waits in an event input waiting state. When an event is input (S211: YES), the event detection circuit 14 outputs an event detection signal.

このとき、電圧監視回路19からの電圧監視信号はHレベルであり、制御信号はLレベ
ルである。この状態でイベント検出信号が入力されると、スイッチ回路18は、発振回路
11、分周回路12、および記録制御回路13に電源電圧を印加する。すなわち、スイッ
チ回路18は、これらの回路をスイッチオンする(ステップS212)。このとき、遅延
回路15に電源電圧が印加されるので、制御信号はHレベルとなる。この状態で遅延回路
15にイベント検出信号が入力されるので、遅延回路15は、カウントを開始する(ステ
ップS214)。さらに、記録制御回路13にもイベント検出信号が入力されるので、記
録制御回路13は、データをメモリー17に転送する(ステップS214)。カウンター
の値が所定の閾値になると、遅延回路15は、カウントを終了する(ステップS215)
。カウントを終了すると、遅延回路15は、Lレベルの制御信号を出力する。このとき、
電圧監視信号はHレベルのままであるので、Lレベルの制御信号が入力されると、スイッ
チ回路18は、発振回路11、分周回路12、記録制御回路13、および遅延回路15へ
の電源電圧の印加を停止する。すなわち、スイッチ回路18は、これらの回路をスイッチ
オフする(ステップS216)。
At this time, the voltage monitoring signal from the voltage monitoring circuit 19 is at the H level, and the control signal is at the L level. When an event detection signal is input in this state, the switch circuit 18 applies a power supply voltage to the oscillation circuit 11, the frequency dividing circuit 12, and the recording control circuit 13. That is, the switch circuit 18 switches on these circuits (step S212). At this time, since the power supply voltage is applied to the delay circuit 15, the control signal becomes the H level. Since an event detection signal is input to the delay circuit 15 in this state, the delay circuit 15 starts counting (step S214). Further, since the event detection signal is also input to the recording control circuit 13, the recording control circuit 13 transfers the data to the memory 17 (step S214). When the counter value reaches a predetermined threshold value, the delay circuit 15 finishes counting (step S215).
. When the counting ends, the delay circuit 15 outputs an L level control signal. At this time,
Since the voltage monitoring signal remains at the H level, when the L level control signal is input, the switch circuit 18 causes the power supply voltage to the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, and the delay circuit 15. The application of is stopped. That is, the switch circuit 18 switches off these circuits (step S216).

RTCモジュール20においては、発振回路11およびイベント検出回路14は独立し
て電源制御が行われる。したがって、発振回路11が停止しているが、イベント検出回路
14は動作している場合がある。このような場合、イベントが検出されると、発振回路1
1および記録制御回路13に電源電圧が印加され、イベントに関するデータがメモリー1
7に書き込まれる。
In the RTC module 20, the oscillation circuit 11 and the event detection circuit 14 are independently controlled for power. Therefore, the event detection circuit 14 may be operating although the oscillation circuit 11 is stopped. In such a case, when an event is detected, the oscillation circuit 1
1 and the recording control circuit 13 are applied with power supply voltage, and data relating to the event is
7 is written.

電圧監視回路21からHレベルの電圧監視信号が入力されると、スイッチ回路22は、
イベント検出回路14への電源電圧の印加を停止する(ステップS217)。ステップS
218−S220の処理は、発振回路11およびイベント検出回路14の動作が停止され
た後、再度動作を開始するまでの処理である。ステップS218において、発振回路11
、分周回路12、記録制御回路13、イベント検出回路14、および遅延回路15は、動
作を停止した状態、すなわち復帰待ちの状態にある。この間、電圧監視回路19および電
圧監視回路21は、電源電圧を監視している。例えばメイン電源の供給が開始されると、
電源電圧は上昇する。まず、電圧監視回路21は、電源電圧が基準電圧Vth2を上回っ
たか判断する。電源電圧が基準電圧Vth2を上回った場合、電圧監視回路21が出力す
る電圧監視信号はLレベルになる。Lレベルの電圧監視信号が入力されると、スイッチ回
路22は、イベント検出回路14への電源電圧の印加を開始する。また、電圧監視回路1
9は、電源電圧が基準電圧Vth1を上回ったか判断する(ステップS219)。電源電
圧が基準電圧Vth1を下回っている間(S219:NO)、復帰待ちの状態が維持され
る。例えばメイン電源の供給が開始されると、電源電圧は上昇する。電源電圧が基準電圧
Vth1を上回った場合(S219:YES)、電圧監視回路19が出力する電圧監視信
号はLレベルになる。電圧監視回路19からLレベルの電圧監視信号が入力されると、ス
イッチ回路18は、発振回路11、分周回路12、記録制御回路13、および遅延回路1
5への電源電圧の印加を開始する。すなわち、スイッチ回路18は、これらの回路をスイ
ッチオンする(ステップS220)。メイン電源の供給が開始されると、RTCモジュー
ル20は、以下、通常動作に移行する。
When an H level voltage monitoring signal is input from the voltage monitoring circuit 21, the switch circuit 22
Application of the power supply voltage to the event detection circuit 14 is stopped (step S217). Step S
The processing in 218-S220 is processing until the operation is started again after the operations of the oscillation circuit 11 and the event detection circuit 14 are stopped. In step S218, the oscillation circuit 11
The frequency divider circuit 12, the recording control circuit 13, the event detection circuit 14, and the delay circuit 15 are in a stopped state, that is, in a return waiting state. During this time, the voltage monitoring circuit 19 and the voltage monitoring circuit 21 monitor the power supply voltage. For example, when the main power supply starts,
The power supply voltage rises. First, the voltage monitoring circuit 21 determines whether the power supply voltage exceeds the reference voltage Vth2. When the power supply voltage exceeds the reference voltage Vth2, the voltage monitoring signal output from the voltage monitoring circuit 21 becomes L level. When the L-level voltage monitoring signal is input, the switch circuit 22 starts applying the power supply voltage to the event detection circuit 14. The voltage monitoring circuit 1
9 determines whether the power supply voltage exceeds the reference voltage Vth1 (step S219). While the power supply voltage is lower than the reference voltage Vth1 (S219: NO), the return waiting state is maintained. For example, when the main power supply starts, the power supply voltage increases. When the power supply voltage exceeds the reference voltage Vth1 (S219: YES), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes L level. When an L level voltage monitoring signal is input from the voltage monitoring circuit 19, the switch circuit 18 includes the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, and the delay circuit 1.
Application of the power supply voltage to 5 is started. That is, the switch circuit 18 switches on these circuits (step S220). When the main power supply is started, the RTC module 20 shifts to the normal operation.

3.他の実施形態
本発明は上述の実施形態に限定されるものではなく、種々の変形実施が可能である。以
下、変形例をいくつか説明する。以下の変形例のうち、2つ以上のものが組み合わせて用
いられてもよい。
3. Other Embodiments The present invention is not limited to the above-described embodiments, and various modifications can be made. Hereinafter, some modifications will be described. Two or more of the following modifications may be used in combination.

図5は、変形例に係るRTCモジュール30の構成を示すブロック図である。RTCモ
ジュールの構成は、図1および図3で説明したものに限定されない。例えば、遅延回路1
5は省略されてもよい。RTCモジュール30は、遅延回路15を有していない点におい
て、RTCモジュール10と相違する。この場合、記録制御回路13には、電圧監視信号
が入力される。記録制御回路13は、電圧監視信号に応じて、制御信号をスイッチ回路1
8に出力する。この例で、記録制御回路13は、Hレベルの電圧監視信号が入力された場
合、すなわち、電源電圧がVth1以下になったことが検出された場合、電圧監視信号に
応じた制御信号を出力する。このとき、制御信号は、記録制御回路13がメモリー17に
データの転送を行っているときはHレベルになり、データの転送を行っていないときはL
レベルになる。一方、Lレベルの電圧監視信号が入力された場合、電源電圧がVth1を
上回っている場合、記録制御回路13は、データ転送の状態によらず、Hレベルの信号を
出力する。
FIG. 5 is a block diagram showing a configuration of the RTC module 30 according to the modification. The configuration of the RTC module is not limited to that described with reference to FIGS. For example, the delay circuit 1
5 may be omitted. The RTC module 30 is different from the RTC module 10 in that the delay circuit 15 is not provided. In this case, a voltage monitoring signal is input to the recording control circuit 13. The recording control circuit 13 sends a control signal to the switch circuit 1 in accordance with the voltage monitoring signal.
8 is output. In this example, the recording control circuit 13 outputs a control signal corresponding to the voltage monitoring signal when an H level voltage monitoring signal is input, that is, when it is detected that the power supply voltage is equal to or lower than Vth1. . At this time, the control signal becomes H level when the recording control circuit 13 is transferring data to the memory 17 and is L when not transferring data.
Become a level. On the other hand, when an L level voltage monitoring signal is input and the power supply voltage exceeds Vth1, the recording control circuit 13 outputs an H level signal regardless of the data transfer state.

図6は、RTCモジュール30の動作を示すフローチャートである。ステップS300
において、電圧監視回路19は、電源電圧を監視している。電源電圧が基準電圧Vth1
を下回った場合(S300:YES)、電圧監視回路19から出力される電圧監視信号は
Hレベルになる。処理はステップS304に進む。電源電圧が基準電圧Vth1を下回っ
ていない場合(S300:NO)、電圧監視回路19から出力される電圧監視信号はLレ
ベルになる。処理はステップS301に進む。
FIG. 6 is a flowchart showing the operation of the RTC module 30. Step S300
The voltage monitoring circuit 19 monitors the power supply voltage. The power supply voltage is the reference voltage Vth1
(S300: YES), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes H level. The process proceeds to step S304. When the power supply voltage is not lower than the reference voltage Vth1 (S300: NO), the voltage monitoring signal output from the voltage monitoring circuit 19 becomes L level. The process proceeds to step S301.

イベント検出回路14は、イベント入力待ちの状態にある(ステップS301)。すな
わち、イベント検出回路14は、イベントが入力されたか判断する(ステップS302)
。イベントが入力されていない場合(S302:NO)、イベント検出回路14は、イベ
ント入力待ちの状態で待機する。イベントが入力された場合(S302:YES)、イベ
ント検出回路14は、イベント検出信号を出力する。イベント検出信号が入力されると、
記録制御回路13は、メモリー17にデータを書き込む。すなわち、記録制御回路13は
、メモリー17にデータを転送する(ステップS303)。
The event detection circuit 14 is waiting for an event input (step S301). That is, the event detection circuit 14 determines whether an event has been input (step S302).
. When no event is input (S302: NO), the event detection circuit 14 stands by in a state waiting for event input. When an event is input (S302: YES), the event detection circuit 14 outputs an event detection signal. When an event detection signal is input,
The recording control circuit 13 writes data in the memory 17. That is, the recording control circuit 13 transfers data to the memory 17 (step S303).

ステップS304−S306の処理は、電源電圧が基準電圧Vth1を下回っていると
きの処理である。電圧監視回路19からHレベルの信号が入力されると、記録制御回路1
3は、データ転送中であるか判断する(ステップS304)。データ転送中であるか否か
は、例えば、記録制御回路13の内部に設けられたレジスタに記録されるフラグの値によ
り判断される。データ転送中である間、記録制御回路13は、Hレベルの制御信号を出力
する。この間、記録制御回路13は、データをメモリー17に転送する(ステップS30
5)。データの転送が完了すると、記録制御回路13は、Lレベルの制御信号を出力する
。Hレベルの電圧監視信号とLレベルの制御信号が入力されると、スイッチ回路18は、
発振回路11、分周回路12、記録制御回路13、およびイベント検出回路14への電源
電圧の印加を停止する。すなわち、スイッチ回路18は、これらの回路をスイッチオフす
る(ステップS306)。以下、ステップS307−S309の処理は、図2のステップ
S109−S111と同様である。
The processes in steps S304 to S306 are processes when the power supply voltage is lower than the reference voltage Vth1. When an H level signal is input from the voltage monitoring circuit 19, the recording control circuit 1
3 determines whether data is being transferred (step S304). Whether or not data transfer is in progress is determined by, for example, the value of a flag recorded in a register provided in the recording control circuit 13. During the data transfer, the recording control circuit 13 outputs an H level control signal. During this time, the recording control circuit 13 transfers the data to the memory 17 (step S30).
5). When the data transfer is completed, the recording control circuit 13 outputs an L level control signal. When the voltage monitor signal at H level and the control signal at L level are input, the switch circuit 18
Application of the power supply voltage to the oscillation circuit 11, the frequency dividing circuit 12, the recording control circuit 13, and the event detection circuit 14 is stopped. That is, the switch circuit 18 switches off these circuits (step S306). Hereinafter, the processing in steps S307 to S309 is the same as that in steps S109 to S111 in FIG.

遅延回路15を省略してもよい点は、RTCモジュール20についても同様である。別
の例で、RTCモジュール10およびRTCモジュール20は、メモリー17を有してい
なくてもよい。すなわち、記録制御回路13は、外付けのメモリーにデータを書き込んで
もよい。さらに別の例で、発振回路11の発振子は水晶に限定されない。セラミック発振
子またはSAW(Surface Acoustic Wave)振動子が用いられてもよい。また、信号のレ
ベルや、動作に用いられる組み合わせはあくまで例示であり、実施形態で説明したものに
限定されない。
The same applies to the RTC module 20 in which the delay circuit 15 may be omitted. In another example, the RTC module 10 and the RTC module 20 may not have the memory 17. That is, the recording control circuit 13 may write data in an external memory. In yet another example, the oscillator of the oscillation circuit 11 is not limited to a crystal. A ceramic oscillator or a SAW (Surface Acoustic Wave) vibrator may be used. Further, signal levels and combinations used for operations are merely examples, and are not limited to those described in the embodiments.

スイッチ回路18による電源電圧の印加の制御の対象となる回路は、実施形態で説明し
たものに限定されない。例えば、スイッチ回路18は、発振回路11に対してのみ、電源
電圧の印加の制御をおこなってもよい。
The circuit that is the target of control of application of the power supply voltage by the switch circuit 18 is not limited to that described in the embodiment. For example, the switch circuit 18 may control the application of the power supply voltage only to the oscillation circuit 11.

図7は、電子機器100の構成を示すブロック図である。電子機器100は、RTCモ
ジュール10およびプロセッサー50を有する。プロセッサー50は、RTCモジュール
10にイベントを出力する。電子機器100は、例えば、遊戯具、家電製品、時計、また
は自動車である。パチンコ機等の遊戯具の場合、例えば、筐体が開けられたこと、プロセ
ッサーが改造されたこと等がイベントとして用いられる。家電製品の場合、利用頻度、使
用時間等をイベントとして記録させ、リサイクルの際の品質チェックに用いてもよい。自
動車の場合、走行距離、制限値をオーバーした等エンジンの使用状況をイベントとして用
いてもよい。
FIG. 7 is a block diagram illustrating a configuration of the electronic device 100. The electronic device 100 includes an RTC module 10 and a processor 50. The processor 50 outputs an event to the RTC module 10. The electronic device 100 is, for example, a play equipment, a home appliance, a watch, or a car. In the case of an amusement machine such as a pachinko machine, for example, an event that a housing has been opened or a processor has been modified is used. In the case of home appliances, usage frequency, usage time, and the like may be recorded as events and used for quality checks during recycling. In the case of an automobile, the usage status of the engine, such as the travel distance or exceeding the limit value, may be used as an event.

10…RTCモジュール、11…発振回路、12…分周回路、13…記録制御回路、14
…イベント検出回路、15…遅延回路、16…計時回路、17…メモリー、18…スイッ
チ回路、19…電圧監視回路、20…RTCモジュール、21…電圧監視回路、22…ス
イッチ回路、30…RTCモジュール、50…プロセッサー、100…電子機器
DESCRIPTION OF SYMBOLS 10 ... RTC module, 11 ... Oscillator circuit, 12 ... Frequency divider circuit, 13 ... Recording control circuit, 14
... Event detection circuit, 15 ... delay circuit, 16 ... timer circuit, 17 ... memory, 18 ... switch circuit, 19 ... voltage monitoring circuit, 20 ... RTC module, 21 ... voltage monitoring circuit, 22 ... switch circuit, 30 ... RTC module 50 ... Processor 100 ... Electronic equipment

Claims (8)

電源電圧が印加されてクロック信号を生成する発振回路と、
前記クロック信号に基づいて計時データを出力する計時回路と、
イベントの入力を検出するイベント検出回路と、
前記イベントと前記計時データとを関連付けたデータを、前記イベント検出回路から出力された信号に基づいてメモリーに記録させる記録制御回路と、
前記電源電圧を監視する第1電圧検出回路と、
前記電源電圧を監視する第2電圧検出回路と、
前記第1電圧検出回路から出力された信号に基づいて、前記発振回路の電力消費を低減させるように前記発振回路の動作を制御する第1スイッチ回路と、
前記第2電圧検出回路から出力された信号に基づいて、前記イベント検出回路の動作を制御する第2スイッチ回路と、
を有するリアルタイムクロックモジュール。
An oscillation circuit that generates a clock signal when a power supply voltage is applied;
A timing circuit that outputs timing data based on the clock signal;
An event detection circuit for detecting an event input;
A recording control circuit for recording data in which the event and the time measurement data are associated with each other based on a signal output from the event detection circuit;
A first voltage detection circuit for monitoring the power supply voltage;
A second voltage detection circuit for monitoring the power supply voltage;
A first switch circuit for controlling an operation of the oscillation circuit so as to reduce power consumption of the oscillation circuit based on a signal output from the first voltage detection circuit;
A second switch circuit for controlling the operation of the event detection circuit based on a signal output from the second voltage detection circuit;
A real-time clock module.
前記発振回路の電力消費を低減させるように前記発振回路の動作を制御することは、前記発振回路の停止を制御することであることを特徴とする、請求項1に記載のリアルタイムクロックモジュール。   The real-time clock module according to claim 1, wherein controlling the operation of the oscillation circuit so as to reduce power consumption of the oscillation circuit is controlling the stop of the oscillation circuit. 前記第1電圧検出回路は、第1閾値と前記電源電圧とを比較した信号を出力することを特徴とする、請求項1または2に記載のリアルタイムクロックモジュール。   3. The real-time clock module according to claim 1, wherein the first voltage detection circuit outputs a signal obtained by comparing a first threshold value and the power supply voltage. 4. 前記第1スイッチ回路は、前記第1電圧検出回路から出力された信号、および前記イベント検出回路から出力された信号に基づいて、前記発振回路の動作を制御する、
ことを特徴とする請求項1乃至3のいずれか一項に記載のリアルタイムクロックモジュール。
The first switch circuit controls the operation of the oscillation circuit based on a signal output from the first voltage detection circuit and a signal output from the event detection circuit.
The real-time clock module according to claim 1, wherein the real-time clock module is provided.
前記第1電圧検出回路から出力された信号に基づいて、前記第1スイッチ回路に信号を出力する遅延回路を有し、
前記第1スイッチ回路は、前記遅延回路から出力された信号に基づいて前記発振回路の電力消費を低減させるように前記発振回路の動作を制御する、
ことを特徴とする請求項1乃至4のいずれか一項に記載のリアルタイムクロックモジュール。
A delay circuit that outputs a signal to the first switch circuit based on the signal output from the first voltage detection circuit;
The first switch circuit controls the operation of the oscillation circuit to reduce power consumption of the oscillation circuit based on a signal output from the delay circuit;
The real time clock module according to claim 1, wherein the real time clock module is provided.
前記記録制御回路は、前記第1電圧検出回路から出力された信号に基づいて、前記第1スイッチ回路に信号を出力し、
前記第1スイッチ回路は、前記記録制御回路から出力された信号に基づいて、前記発振回路の電力消費を低減させるように前記発振回路の動作を制御する、
ことを特徴とする請求項1乃至5のいずれか一項に記載のリアルタイムクロックモジュール。
The recording control circuit outputs a signal to the first switch circuit based on the signal output from the first voltage detection circuit;
The first switch circuit controls the operation of the oscillation circuit based on a signal output from the recording control circuit so as to reduce power consumption of the oscillation circuit.
The real-time clock module according to claim 1, wherein the real-time clock module is provided.
請求項1乃至6のいずれかの項に記載のリアルタイムクロックモジュールを有する電子機器。   An electronic apparatus comprising the real-time clock module according to claim 1. 発振回路が、電源電圧が印加されてクロック信号を生成するステップと、
計時回路が、前記クロック信号に基づいて計時データを出力するステップと、
第1電圧検出回路が、前記電源電圧が第1閾値以下になったことを検出した信号を第1スイッチ回路に出力するステップと、
前記第1スイッチ回路が、前記発振回路の動作を停止させるステップと、
イベント検出回路が、入力されたイベントを検出した信号を記憶制御回路に出力するステップと、
前記記憶制御回路が、前記イベントと前記計時データとを関連付けたデータをメモリーに記録させるステップと、
第2電圧検出回路が、前記電源電圧が前記第1閾値よりも低い第2閾値以下になったことを検出した信号を第2スイッチ回路に出力するステップと、
前記第2スイッチ回路が、前記イベント検出回路の動作を停止させるステップと、
を有する制御方法。
An oscillation circuit generating a clock signal by applying a power supply voltage;
A timing circuit outputting timing data based on the clock signal;
A first voltage detection circuit outputting to the first switch circuit a signal detected that the power supply voltage has become equal to or lower than a first threshold;
The first switch circuit stopping the operation of the oscillation circuit;
An event detection circuit that outputs a signal that detects the input event to the storage control circuit;
The storage control circuit recording data associating the event and the time data in a memory; and
A second voltage detection circuit that outputs to the second switch circuit a signal that detects that the power supply voltage has become equal to or lower than a second threshold that is lower than the first threshold;
The second switch circuit stopping the operation of the event detection circuit;
Control method.
JP2010190440A 2010-08-27 2010-08-27 Real-time clock module, electronic device and control method Active JP5636822B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010190440A JP5636822B2 (en) 2010-08-27 2010-08-27 Real-time clock module, electronic device and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010190440A JP5636822B2 (en) 2010-08-27 2010-08-27 Real-time clock module, electronic device and control method

Publications (3)

Publication Number Publication Date
JP2012048527A JP2012048527A (en) 2012-03-08
JP2012048527A5 JP2012048527A5 (en) 2013-10-10
JP5636822B2 true JP5636822B2 (en) 2014-12-10

Family

ID=45903307

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010190440A Active JP5636822B2 (en) 2010-08-27 2010-08-27 Real-time clock module, electronic device and control method

Country Status (1)

Country Link
JP (1) JP5636822B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0235223U (en) * 1988-08-26 1990-03-07
JPH0355616A (en) * 1989-07-24 1991-03-11 Sharp Corp Electronic equipment incorporated with storage device
JPH03253927A (en) * 1990-03-03 1991-11-13 Fuji Electric Co Ltd Memory backup circuit for control circuit
JP3120352B2 (en) * 1993-09-29 2000-12-25 セイコーエプソン株式会社 Clock supply system, real-time clock module, operation clock supply unit, and information processing device
JP2004061379A (en) * 2002-07-30 2004-02-26 Ricoh Co Ltd Real time clock and system using real time clock
JP2009037456A (en) * 2007-08-02 2009-02-19 Nec Electronics Corp Micro-controller and its control method

Also Published As

Publication number Publication date
JP2012048527A (en) 2012-03-08

Similar Documents

Publication Publication Date Title
US20160018868A1 (en) Power management circuit and electronic device employing the same
JP2004303208A (en) Oscillator and electronic equipment using the same
US7929648B2 (en) Clock error detection apparatus and method
JP5228392B2 (en) Temperature compensated oscillation circuit, real-time clock device and electronic equipment
US7855581B2 (en) Real time clock monitoring method and system
EP3631938A1 (en) Efficient power distribution
WO2011010146A2 (en) Real-time clock
US8892923B2 (en) Data processing apparatus and method for maintaining a time count value in normal and power saving modes of operation
JP5636822B2 (en) Real-time clock module, electronic device and control method
JP6402664B2 (en) Electronic device and method for initializing control means of electronic device
US8578199B2 (en) Resetting real time clock upon reference clock interruption
JP2011113173A (en) Real-time clock device, information processor and electronic apparatus
JPH10322174A (en) Frequency-multiplying circuit
JP5590174B2 (en) Temperature compensated oscillation circuit, real-time clock device and electronic equipment
JP4353081B2 (en) Electronic device and control method thereof
JP2002228778A (en) Real-time clock and clocking circuit
CN113612884B (en) Method for implementing shutdown alarm clock, electronic device and computer readable storage medium
US20060047991A1 (en) Real time clock architecture and/or method for a system on a chip (SOC) application
JP3624532B2 (en) Electronic timepiece and control method thereof
JP6686934B2 (en) Electronic clock, display control method and program
JP2003270371A (en) Clock device in computer system
JP2019002895A (en) Real-time clock module, electronic apparatus, mobile body, and information processing system
JP2009205213A (en) Event recorder and electronic device therewith
JP5606003B2 (en) Display control device
JP4501823B2 (en) Interrupt signal control device, interrupt signal control method, and interrupt signal control program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130823

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130823

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140513

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140710

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140805

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140904

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141007

R150 Certificate of patent or registration of utility model

Ref document number: 5636822

Country of ref document: JP

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