JP2007328404A - Control method of real time clock device, and real time clock device - Google Patents
Control method of real time clock device, and real time clock device Download PDFInfo
- Publication number
- JP2007328404A JP2007328404A JP2006157144A JP2006157144A JP2007328404A JP 2007328404 A JP2007328404 A JP 2007328404A JP 2006157144 A JP2006157144 A JP 2006157144A JP 2006157144 A JP2006157144 A JP 2006157144A JP 2007328404 A JP2007328404 A JP 2007328404A
- Authority
- JP
- Japan
- Prior art keywords
- real
- time clock
- volatile memory
- time
- time 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.)
- Pending
Links
Images
Abstract
Description
本発明は、リアルタイムクロック装置の制御方法およびリアルタイムクロック装置に関するものである。 The present invention relates to a method for controlling a real-time clock device and a real-time clock device.
リアルタイムクロック装置には、圧電振動子を備えた発振回路や、この発振回路から入力した源振を利用して計時を行うリアルタイムクロック回路、データを書き込んだメモリを備えた構成のものがある。このメモリは、データを電気的に書き換え可能なメモリ(EEPROM)であったり(特許文献1)、データを電気的に読み書きするメモリ(RAM)であったりする(特許文献2)。
前述したリアルタイムクロック装置は、電話やファクシミリ等を始めとして様々な電子機器に搭載されている。この電子機器には、消費電力を削減するために、使用者が使用していない場合に通常の使用状態から低消費電力状態(省電力モード)に移行するものがある。このような電子機器に搭載されたリアルタイムクロック装置は、電子機器の省電力モードへの移行等に伴って通常使用状態からバックアップ状態になり、リアルタイムクロック回路で計時のみを行い、他の動作を停止させている。 The above-described real-time clock device is mounted on various electronic devices such as telephones and facsimiles. Some electronic devices shift from a normal use state to a low power consumption state (power saving mode) when the user is not using them in order to reduce power consumption. The real-time clock device installed in such an electronic device goes from the normal use state to the backup state as the electronic device shifts to the power saving mode, etc., and only the time is measured by the real-time clock circuit, and other operations are stopped. I am letting.
ところで前述したEEPROMは、データの書き込み/読み出し時であっても、バックアップ状態であっても電流を多く消費する。具体的な例としては、EEPROMにおけるデータの書き込み/読み出し時の消費電流と、リアルタイムクロック回路におけるバックアップ状態での消費電流(バックアップ電流)とを比較すると、EEPROMは、リアルタイムクロック回路の約500ないし1000倍の電流を消費する。またEEPROMにおけるバックアップ状態での消費電流と、リアルタイムクロック回路のバックアップ電流とを比較すると、EEPROMは、リアルタイムクロック回路の約2倍の電流を消費する。このためEEPROMを備えたリアルタイムクロック装置は、電流をより多く消費してしまう。そしてリアルタイムクロック装置が搭載された電子機器の電源が電池の場合や、バックアップ状態になったリアルタイムクロック装置を電池で駆動させる場合では、電池の消耗が早くなってしまい、延いては電子機器の製品寿命が短くなってしまうことがある。 By the way, the above-described EEPROM consumes a large amount of current even when writing / reading data or in a backup state. As a specific example, when comparing the current consumption at the time of data writing / reading in the EEPROM with the current consumption (backup current) in the backup state in the real-time clock circuit, the EEPROM has about 500 to 1000 times of the real-time clock circuit. Consumes twice as much current. Further, when the consumption current in the backup state in the EEPROM is compared with the backup current of the real-time clock circuit, the EEPROM consumes about twice the current of the real-time clock circuit. For this reason, the real-time clock device provided with the EEPROM consumes more current. When the power supply of an electronic device equipped with a real-time clock device is a battery, or when a real-time clock device in a backup state is driven by a battery, the battery is consumed quickly, and thus the product of the electronic device. Life may be shortened.
またEEPROMは、供給される電圧によってアクセススピードが異なる。すなわちEEPROMは、約400Hzの速いアクセススピードを確保するために高電圧が必要になる。またEEPROMは、約40Hzの遅いアクセススピードであれば、リアルタイムクロック回路の動作電圧と同程度の電圧が必要になる。しかしリアルタイムクロック装置がバックアップ状態になっているときでは、EEPROMへのアクセススピードを高速にするための高電圧を確保できない。すなわちリアルタイムクロック装置がバックアップ状態では、EEPROMへのアクセススピードを高速にすることはできない。そしてEEPROMへのアクセススピードを低速にした場合では、EEPROMの動作時間が長くなるので、その分消費電流が多くなってしまう。 The access speed of the EEPROM varies depending on the supplied voltage. That is, the EEPROM requires a high voltage in order to ensure a high access speed of about 400 Hz. In addition, the EEPROM requires a voltage comparable to the operating voltage of the real-time clock circuit at a slow access speed of about 40 Hz. However, when the real-time clock device is in a backup state, a high voltage for increasing the access speed to the EEPROM cannot be secured. That is, when the real-time clock device is in the backup state, the access speed to the EEPROM cannot be increased. When the access speed to the EEPROM is lowered, the operation time of the EEPROM becomes longer, and the current consumption increases accordingly.
またEEPROMは、書き換え回数に制限がある。この書き換え可能な回数は104ないし105回程度である。そしてEEPROMのデータの書き換えを頻繁に行うと、例えばリアルタイムクロック装置の製品寿命を10年とした場合に、この製品寿命よりも先にEEPROMの書き換え可能回数の上限に到達してしまい、書き換えができなくなってしまう。またEEPROMに頻繁にアクセスすると、消費電流がより多くなってしまう。したがってEEPROMの書き換えを頻繁に行うと、リアルタイムクロック装置の製品寿命が短くなってしまい、延いてはリアルタイムクロック装置を搭載した電子機器の製品寿命も短くなってしまう。 The EEPROM has a limited number of rewrites. The number of rewrites is about 10 4 to 10 5 times. If the EEPROM data is frequently rewritten, for example, if the product life of the real-time clock device is set to 10 years, the upper limit of the number of times that the EEPROM can be rewritten will reach the upper limit of the product life, and rewriting is possible. It will disappear. Moreover, if the EEPROM is accessed frequently, the current consumption increases. Therefore, if the EEPROM is frequently rewritten, the product life of the real-time clock device is shortened, and further, the product life of an electronic device equipped with the real-time clock device is also shortened.
なお特許文献1ではEEPROMには、リアルタイムクロック装置に利用されるデータのみが書き込まれており、データの書き込みをユーザに開放していない。すなわちリアルタイムクロック装置のユーザは、このユーザが使用するデータ(ユーザデータ)をEEPROMに書き込むことができない。また特許文献2のRAMを備えたリアルタイムクロック装置では、電源供給が止まるとRAMに記憶しているデータが消去されてしまう。このためユーザがユーザデータをRAMに書き込んでも、消去されてしまう。
In
本発明は、低電圧および低電流で動作するリアルタイムクロック装置を提供するとともに、これの制御方法を提供することを目的とする。 An object of the present invention is to provide a real-time clock device that operates at a low voltage and a low current, and to provide a control method therefor.
本発明に係るリアルタイムクロック装置の制御方法は、初期電源投入により、不揮発性メモリで記憶しているリアルタイムデータを揮発性メモリに転送し、このリアルタイムデ
ータの転送が終了すると不揮発性メモリへの電流供給を止め、揮発性メモリに転送したリアルタイムデータと、発振回路から入力した源振とを利用してリアルタイムクロック回路で計時を行うことを特徴としている。不揮発性メモリは、初期電源が投入されたときにのみ電流が選択供給されて動作する。よってリアルタイムクロック装置の電流消費を低減でき、また電圧消費も低減できる。そして計時によって生じるリアルタイムデータの更新は、揮発性メモリで記憶しているリアルタイムデータを書き換えている。したがってリアルタイムクロック装置は低電圧および低電流で動作できる。また不揮発性メモリで記憶しているリアルタイムデータが頻繁に書き換えられるのを防止できる。そして本発明に係るリアルタイムクロック装置が搭載されている電子機器の製品寿命が短くなるのを防止できる。
The control method of the real-time clock device according to the present invention transfers the real-time data stored in the nonvolatile memory to the volatile memory when the initial power is turned on, and supplies current to the nonvolatile memory when the transfer of the real-time data is completed. The real-time clock circuit uses the real-time data transferred to the volatile memory and the source oscillation input from the oscillation circuit. The nonvolatile memory operates by selectively supplying current only when the initial power is turned on. Therefore, current consumption of the real-time clock device can be reduced, and voltage consumption can also be reduced. And the update of the real-time data caused by the timekeeping rewrites the real-time data stored in the volatile memory. Therefore, the real-time clock device can operate at a low voltage and a low current. Moreover, it is possible to prevent the real-time data stored in the nonvolatile memory from being frequently rewritten. And it can prevent that the product life of the electronic device in which the real-time clock device according to the present invention is mounted is shortened.
また本発明に係るリアルタイムクロック装置の制御方法は、リアルタイムクロック回路での計時によって生じたリアルタイムデータの更新を揮発性メモリに記憶し、タイミング信号が発生するとともに、メイン電圧が供給されるときに不揮発性メモリへの電流供給を再開し、更新されたリアルタイムデータを揮発性メモリから不揮発性メモリに転送して、不揮発性メモリが記憶しているリアルタイムデータを書き換えることを特徴としている。 Further, the control method of the real-time clock device according to the present invention stores the real-time data update generated by the time measurement in the real-time clock circuit in the volatile memory, generates a timing signal, and is nonvolatile when the main voltage is supplied. The current supply to the non-volatile memory is resumed, the updated real-time data is transferred from the volatile memory to the non-volatile memory, and the real-time data stored in the non-volatile memory is rewritten.
不揮発性メモリは、記憶しているリアルタイムデータが書き換えられるときに電流が選択供給されて動作する。このためリアルタイムクロック装置は低電圧および低電流で動作できる。またリアルタイムデータの書き換え時は、リアルタイムクロック装置にメイン電圧を供給している。このため不揮発性メモリへのアクセススピードを高速にできる。よって短時間で書き換えが終了するので、リアルタイムクロック装置の消費電流を低減でき、また電圧消費も低減できる。さらに不揮発性メモリで記憶しているリアルタイムデータの書き換えは、揮発性メモリで記憶しているリアルタイムデータが更新されているとき、タイミング信号が発生したとき、およびメイン電圧が供給されているときに行われる。そして、これらの条件が揃っていないときは、揮発性メモリで記憶しているリアルタイムデータを書き換えている。このため不揮発性メモリの書き換え回数を少なくできる。そして本発明に係るリアルタイムクロック装置が搭載されている電子機器の製品寿命が短くなるのを防止できる。 The nonvolatile memory operates by selectively supplying a current when the stored real-time data is rewritten. Therefore, the real-time clock device can operate at a low voltage and a low current. When rewriting real-time data, the main voltage is supplied to the real-time clock device. For this reason, the access speed to the nonvolatile memory can be increased. Therefore, since rewriting is completed in a short time, the current consumption of the real-time clock device can be reduced and the voltage consumption can also be reduced. Furthermore, rewriting of real-time data stored in the non-volatile memory is performed when the real-time data stored in the volatile memory is updated, when a timing signal is generated, and when the main voltage is supplied. Is called. When these conditions are not met, the real-time data stored in the volatile memory is rewritten. For this reason, the number of rewrites of the nonvolatile memory can be reduced. And it can prevent that the product life of the electronic device in which the real-time clock device according to the present invention is mounted is shortened.
また前述した不揮発性メモリは、リアルタイムクロック回路等のシステム(リアルタイムクロック装置)が使用するリアルタイムデータおよび識別情報を記憶するとともに、ユーザが使用するユーザデータを記憶することを特徴としている。これによりリアルタイムクロック装置が搭載される電子機器にユーザデータを記憶する手段を設ける必要が無いので、電子機器の回路構成を簡略化および小型化できる。そして近年では、電子機器の小型化が要求されているので、本発明に係るリアルタイムクロック装置を搭載した電子機器はこの要求に応えることができる。 The nonvolatile memory described above is characterized in that it stores real-time data and identification information used by a system (real-time clock device) such as a real-time clock circuit and user data used by a user. As a result, it is not necessary to provide a means for storing user data in the electronic device on which the real-time clock device is mounted, so that the circuit configuration of the electronic device can be simplified and miniaturized. In recent years, there has been a demand for miniaturization of electronic equipment, and electronic equipment equipped with the real-time clock device according to the present invention can meet this demand.
また本発明に係るリアルタイムクロック装置の制御方法は、不揮発性メモリから揮発性メモリへのリアルタイムデータの転送が終了すると、外部にリセット信号を出力することを特徴としている。これによりリアルタイムクロック装置は、ディレイ付きのリセット集積回路と同等の機能を備えることができる。よってリアルタイムクロック装置が搭載されている電子機器全体の部品点数が少なくなり、電子機器の省コスト化を図ることができる。 The control method of the real-time clock device according to the present invention is characterized in that a reset signal is output to the outside when the transfer of real-time data from the nonvolatile memory to the volatile memory is completed. As a result, the real-time clock device can have the same function as the reset integrated circuit with a delay. Therefore, the number of parts of the entire electronic device on which the real-time clock device is mounted can be reduced, and the cost of the electronic device can be reduced.
そして本発明に係るリアルタイムクロック装置は、源振を出力する発振回路と、リアルタイムデータを記憶した、電流が選択的に供給される不揮発性メモリと、不揮発性メモリからリアルタイムデータを入力して記憶する揮発性メモリと、発振回路から入力した源振と揮発性メモリに保持したリアルタイムデータとを利用して計時を行うリアルタイムクロック回路とを備えたことを特徴としている。 The real-time clock device according to the present invention stores an oscillation circuit that outputs a source oscillation, a non-volatile memory that stores real-time data, selectively supplied with current, and inputs and stores real-time data from the non-volatile memory. It is characterized by comprising a volatile memory, and a real-time clock circuit for measuring time using source oscillation input from an oscillation circuit and real-time data held in the volatile memory.
不揮発性メモリは、初期電源を投入したとき及び記憶しているリアルタイムデータを書き換えるときにのみ電流が選択的に供給されて動作する。このためリアルタイムクロック装置の電流消費を低減でき、また電圧消費も低減できる。またリアルタイムデータの書き換え時は、リアルタイムクロック装置にメイン電圧が供給されている。このため不揮発性メモリへのアクセススピードを高速にでき、書き換えが短時間で終了する。以上のことから、リアルタイムクロック装置の消費電流を低減でき、また電圧消費も低減できる。 The nonvolatile memory operates by selectively supplying current only when the initial power is turned on and when the stored real-time data is rewritten. For this reason, current consumption of the real-time clock device can be reduced, and voltage consumption can also be reduced. When rewriting real-time data, the main voltage is supplied to the real-time clock device. For this reason, the access speed to the nonvolatile memory can be increased, and rewriting is completed in a short time. From the above, the current consumption of the real-time clock device can be reduced and the voltage consumption can also be reduced.
さらに不揮発性メモリで記憶しているリアルタイムデータの書き換えは、揮発性メモリに記憶しているリアルタイムデータが更新されているとき、タイミング信号が発生したとき、およびメイン電圧が供給されているときに行われる。これに対し、これらの条件が揃っていないときは、揮発性メモリに記憶しているリアルタイムデータを書き換えている。このため不揮発性メモリの書き換え回数を少なくできる。そして、このような特徴を有するリアルタイムクロック装置を電子機器に搭載すれば、電子機器の製品寿命が短くなるのを防止できる。 Furthermore, rewriting of real-time data stored in the non-volatile memory is performed when the real-time data stored in the volatile memory is updated, when a timing signal is generated, and when the main voltage is supplied. Is called. On the other hand, when these conditions are not met, the real-time data stored in the volatile memory is rewritten. For this reason, the number of rewrites of the nonvolatile memory can be reduced. If a real-time clock device having such characteristics is mounted on an electronic device, the product life of the electronic device can be prevented from being shortened.
また本発明に係るリアルタイムクロック装置は、源振を出力する発振回路と、リアルタイムデータを記憶した不揮発性メモリと、不揮発性メモリからリアルタイムデータを入力して記憶するとともに、計時によって更新されたリアルタイムデータを記憶する揮発性メモリと、発振回路から入力した源振と揮発性メモリで記憶したリアルタイムデータとを利用して計時を行うリアルタイムクロック回路と、制御部とを備えたことを特徴としている。 The real-time clock device according to the present invention includes an oscillation circuit that outputs a source oscillation, a non-volatile memory that stores real-time data, and real-time data that is input and stored from the non-volatile memory, and real-time data that is updated by timing , A real-time clock circuit for measuring time using source oscillation input from the oscillation circuit and real-time data stored in the volatile memory, and a control unit.
そして前述した制御部は、初期電源投入を検知して不揮発性メモリへ電流を選択供給し、不揮発性メモリから揮発性メモリへリアルタイムデータの転送制御を行うことを特徴としている。また制御部は、揮発性メモリで記憶したリアルタイムデータの更新と、リアルタイムクロック回路で発生したタイミング信号と、メイン電源の投入とを検知して不揮発性メモリへ電流を選択供給し、揮発性メモリから不揮発性メモリへ更新されたリアルタイムデータの転送制御を行うことを特徴としている。 The control unit described above is characterized by detecting the initial power-on, selectively supplying current to the nonvolatile memory, and performing real-time data transfer control from the nonvolatile memory to the volatile memory. In addition, the control unit detects the update of the real-time data stored in the volatile memory, the timing signal generated by the real-time clock circuit, and the turn-on of the main power supply, and selectively supplies the current to the nonvolatile memory. It is characterized by performing transfer control of updated real-time data to a nonvolatile memory.
不揮発性メモリに電流を供給するタイミングは、揮発性メモリへリアルタイムデータを転送するとき、または揮発性メモリから更新されたリアルタイムデータが転送されるときである。そしてリアルタイムクロック回路が計時を行うときは、不揮発性メモリに電流を供給していない。このためリアルタイムクロック装置の消費電流を低減でき、電圧消費も低減できる。また更新されたリアルタイムデータを不揮発性メモリに転送する時は、リアルタイムクロック装置にメイン電圧が供給されている。このため不揮発性メモリへのアクセススピードを高速にでき、データの書き換えが短時間で終了する。よってリアルタイムクロック装置の消費電流を低減でき、また電圧消費も低減できる。さらに不揮発性メモリで記憶しているリアルタイムデータの書き換えは、一定の条件が揃っている時に行われるので、不揮発性メモリの書き換え回数を少なくできる。そして、このような特徴を有するリアルタイムクロック装置を電子機器に搭載すれば、電子機器の製品寿命が短くなるのを防止できる。 The timing for supplying current to the nonvolatile memory is when real-time data is transferred to the volatile memory or when updated real-time data is transferred from the volatile memory. When the real-time clock circuit measures time, no current is supplied to the nonvolatile memory. For this reason, current consumption of the real-time clock device can be reduced, and voltage consumption can also be reduced. When the updated real-time data is transferred to the nonvolatile memory, the main voltage is supplied to the real-time clock device. For this reason, the access speed to the nonvolatile memory can be increased, and data rewriting is completed in a short time. Therefore, current consumption of the real-time clock device can be reduced, and voltage consumption can be reduced. Furthermore, since the real-time data stored in the nonvolatile memory is rewritten when certain conditions are met, the number of times of rewriting the nonvolatile memory can be reduced. If a real-time clock device having such characteristics is mounted on an electronic device, the product life of the electronic device can be prevented from being shortened.
また前述した不揮発性メモリは、リアルタイムデータおよび識別情報の記憶部(システム領域)と、外部から入力したユーザデータの記憶部(ユーザ領域)とを備えたことを特徴としている。これによりリアルタイムクロック装置が搭載される電子機器にユーザデータを記憶する手段を設ける必要が無いので、電子機器の回路構成を簡略化および小型化できる。 Further, the above-described nonvolatile memory includes a storage unit (system region) for real-time data and identification information, and a storage unit (user region) for user data input from the outside. As a result, it is not necessary to provide a means for storing user data in the electronic device on which the real-time clock device is mounted, so that the circuit configuration of the electronic device can be simplified and miniaturized.
また本発明に係るリアルタイムクロック装置は、不揮発性メモリから揮発性メモリへのリアルタイムデータの転送完了を検出する検出手段と、この検出手段から信号を得て、リセット信号を出力するリセット信号出力手段と、を備えたことを特徴としている。これによりリアルタイムクロック装置は、ディレイ付きのリセット集積回路と同等の機能を備えることができる。よってリアルタイムクロック装置が搭載されている電子機器全体の部品点数が少なくなり、電子機器の省コスト化を図ることができる。 In addition, the real-time clock device according to the present invention includes detection means for detecting completion of transfer of real-time data from the nonvolatile memory to the volatile memory, and reset signal output means for obtaining a signal from the detection means and outputting a reset signal. It is characterized by having. As a result, the real-time clock device can have the same function as the reset integrated circuit with a delay. Therefore, the number of parts of the entire electronic device on which the real-time clock device is mounted can be reduced, and the cost of the electronic device can be reduced.
以下に、本発明に係るリアルタイムクロック装置の制御方法およびリアルタイムクロック装置の最良の実施形態について説明する。まず第1の実施形態について説明する。図1は第1の実施形態に係るリアルタイムクロック装置のブロック図である。第1の実施形態に係るリアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック回路16、不揮発性メモリ18、揮発性メモリ20、制御部22、電圧比較器24およびパワーオンリセット回路26を備えている。
The best mode for controlling a real-time clock device and the real-time clock device according to the present invention will be described below. First, the first embodiment will be described. FIG. 1 is a block diagram of a real-time clock device according to the first embodiment. The real-
不揮発性メモリ18は、リアルタイムクロック回路16での計時に用いられるリアルタイムデータを記憶している。この不揮発性メモリ18は、記憶しているデータを電気的に書き換えできるものであればよい。具体的な例としては、不揮発性メモリ18はEEPROMやフラッシュメモリ等であればよい。また揮発性メモリ20は、データを電気的に読み書きできるバッファメモリ(RAM)であればよい。
The
圧電振動子12は、電気信号が供給されると一定の周波数、例えば32.768kHzで発振するものであればよい。そして発振回路14は、この圧電振動子12に電気信号を供給するとともに、圧電振動子12が発振した周波数に応じた信号(源振)を出力する。リアルタイムクロック回路16は、発振回路14の後段に接続している。このリアルタイムクロック回路16は、発振回路14から入力した源振および揮発性メモリ20で記憶しているリアルタイムデータに基づいて計時を行っている。
The
また制御部22は、リアルタイムクロック回路16、不揮発性メモリ18および揮発性メモリ20を制御するものである。そして制御部22は、リアルタイムクロック装置10が電子機器に搭載された場合に、電子機器の演算処理部と接続する。なお演算処理部は、電子機器に搭載されており、電子機器を制御するものである。
The
また電圧比較器24は、電源電圧端子VDDに接続している。そして電圧比較器24は、電源電圧端子VDDを介して供給された電源電圧値を比較して比較結果を制御部22に出力するものである。すなわち電圧比較器24は、リアルタイムクロック装置10に供給された電圧がメイン電圧なのか、それともバックアップ電圧なのかを判断している。またパワーオンリセット回路26は、初期電源投入されたときに、リアルタイムクロック装置10をリセットするために設けられている。このパワーオンリセット回路26の後段に制御部22が接続している。
The
このような構成のリアルタイムクロック装置10の制御方法は、次のようになっている。まず電源電圧端子VDDを介してリアルタイムクロック装置10に初期電源(メイン電圧)を供給すると、パワーオンリセット回路26はこの初期電源投入を検出して、検出結果を制御部22に出力する。制御部22は、検出結果を入力すると、リアルタイムクロック装置10の内部システム、すなわちリアルタイムクロック回路16等の初期設定(リセット)を行う。
The control method of the real-
この後、制御部22の制御によって、不揮発性メモリ18で記憶しているリアルタイムデータを揮発性メモリ20に転送する。この転送によってリアルタイムデータを揮発性メモリ20に記憶する。そしてリアルタイムデータの転送が終了すると、制御部22は不揮発性メモリ18への電流供給を停止する。
Thereafter, the real-time data stored in the
これ以降、リアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック回路16および揮発性メモリ20を使用して計時を行う。すなわち発振回路14は圧電振動子12を発振させて、この発振によって得られた源振をリアルタイムクロック回路16が利用する。またリアルタイムクロック回路16は、揮発性メモリ20にアクセスし、これに記憶しているリアルタイムデータを利用する。なおリアルタイムクロック回路16は、不揮発性メモリ18にアクセスすることはない。したがってリアルタイムクロック装置10は、不揮発性メモリ18に比べて消費電力の小さい揮発性メモリ20を使用するので、低電圧・低電流で動作する。
Thereafter, the real-
またリアルタイムクロック回路16で計時中にリアルタイムデータの更新があった場合は、揮発性メモリ20で記憶しているリアルタイムデータを書き換える。図2は揮発性メモリのデータブロックの説明図である。揮発性メモリ20は、不揮発性メモリ18のブロック毎にリアルタイムデータを記憶している。すなわち揮発性メモリ20は、不揮発性メモリバッファ0、不揮発性メモリバッファ1、…不揮発性メモリバッファnの各ブロックに分けられている。そしてリアルタイムデータの書き換えは更新があったブロック毎に行われ、このブロックに対応したデータ更新フラグを立てる。一例としては、不揮発性メモリバッファ0のリアルタイムデータが更新された場合、この不揮発性メモリバッファ0のリアルタイムデータを書き換えるとともに、このブロックのデータが更新されたことを示すデータ更新フラグ(1)を立てる。
When the real-
またリアルタイムクロック装置10を搭載している電子機器が通常動作状態から省電力モードに移行する場合、リアルタイムクロック装置10は、これに伴って通常動作状態からバックアップ状態になる。この場合、電源電圧端子VDDを介してリアルタイムクロック装置10に供給される電源電圧はメイン電圧からバックアップ電圧に変わり、電圧値が下がる。このときリアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック回路16および揮発性メモリ20のみを動作させて、これらで計時を行う。
When the electronic device equipped with the real
そしてバックアップ状態において、リアルタイムデータの更新があった場合も、前述した通常使用状態と同様にして、揮発性メモリ20で記憶しているリアルタイムデータを書き換える。すなわち揮発性メモリ20は、リアルタイムデータを複数のブロックに分けて記憶しているので、リアルタイムデータの更新があったブロックのデータのみを書き換えるとともに、このブロックのデータが更新されたことを示すデータ更新フラグを立てている。なおリアルタイムクロック装置10は、不揮発性メモリ18よりも消費電力の小さい揮発性メモリ20を使用して計時を行っているので、バックアップ状態でも揮発性メモリ20に記憶されたリアルタイムデータを更新できる。
Even when the real-time data is updated in the backup state, the real-time data stored in the
そして不揮発性メモリ18で記憶しているリアルタイムデータの更新は、次のようにして行っている。すなわちリアルタイムデータの更新は、リアルタイムクロック回路16でタイミング信号が発生したときに行われる。このタイミング信号には、リアルタイムクロック回路16で計時をすることによって発生する桁上げ信号を用いればよい。
The real-time data stored in the
より具体的には、次のようになっている。リアルタイムクロック回路16では源振等を利用して、秒、分、時、曜、日、月、年の計時を行っている。そして秒を計時している場合、リアルタイムクロック回路16の内部に設けられた秒レジスタで00から59までの60進でカウントをして、59から00へ移行するタイミングで秒(下位)レジスタから分(上位)レジスタに桁上げ信号を出力している。分、時、曜、日、月を計時している各カウンタも、秒レジスタと同様の動作を行っている。このため、例えば、時カウンタから曜カウンタまたは日カウンタに出力される桁上げ信号をタイミング信号として利用すればよい。
More specifically, it is as follows. The real-
そして不揮発性メモリ18で記憶しているリアルタイムデータの更新、すなわち揮発性メモリ20から不揮発性メモリ18への更新されたリアルタイムデータの転送は、次の条件を満たす場合に行われる。すなわちタイミング信号が発生した場合において(条件1)、揮発性メモリ20で記憶しているリアルタイムデータに更新があったことを示すデータ更新フラグが立っていて(条件2)、且つ、リアルタイムクロック装置10にメイン電圧が供給されているとき(条件3)に、リアルタイムデータの転送を行う。なおリアルタイムクロック装置10にメイン電圧が供給されているか否かの検出は電圧比較器24で行っている。すなわち電圧比較器24は、リアルタイムクロック装置10にメイン電圧が供給されていることを検出すると、検出結果を制御部22に出力する。このため制御部22は、揮発性メモリ20にデータ更新フラグが立っていること、メイン電圧が供給されていること、およびタイミング信号が発生したことの3つを条件にして、不揮発性メモリ18に電流を供給する。
The real-time data stored in the
この後、揮発性メモリ20から不揮発性メモリ18に、更新されたリアルタイムデータを転送する。すなわち図2に示す場合では、不揮発性メモリバッファ0に対応するデータ更新フラグが立っているので、この対象ブロックのデータ内容(不揮発性メモリバッファ0の更新されたリアルタイムデータ)を揮発性メモリ20から不揮発性メモリ18に転送し、書き込む。この転送が終了すると、再び不揮発性メモリ18への電流供給を停止する。また揮発性メモリ20のデータ更新フラグを降ろす。
Thereafter, the updated real-time data is transferred from the
これにより不揮発性メモリ18に電流を選択的に供給して、この不揮発性メモリ18に記憶されたリアルタイムデータを更新しているので、リアルタイムクロック装置10は、低電圧・低電流で動作する。また不揮発性メモリ18で記憶しているリアルタイムデータが頻繁に書き換えられることはない。
As a result, current is selectively supplied to the
このようなリアルタイムクロック装置10およびこれの制御方法によれば、リアルタイムクロック装置10へ初期電源が投入されたとき、および揮発性メモリ20から不揮発性メモリ18にリアルタイムデータが転送されて書き込まれるときに不揮発性メモリ18へ電流を選択供給する。このため不揮発性メモリ18が動作するときにのみ電流を供給するので、リアルタイムクロック装置10は電流消費および電圧消費も低減できる。したがってリアルタイムクロック装置10は低電圧および低電流で動作できる。またこのリアルタイムクロック装置10を搭載している電子機器の消費電力が小さくなり、特に電子機器が電池で駆動している場合には電池寿命が長くなり、製品寿命が短くなるのを防止できる。
According to such a real-
そして不揮発性メモリ18で記憶しているリアルタイムデータの書き換え時は、リアルタイムクロック装置10にメイン電圧が供給されているので、不揮発性メモリ18へのアクセススピードを高速にできる。よって少ない時間で書き込みを終了できるので、リアルタイムクロック装置10の消費電流を低減でき、また電圧消費も低減できる。
When the real-time data stored in the
また不揮発性メモリで記憶しているリアルタイムデータの書き換えは、前述した3つの条件を満たした時に行っているので、不揮発性メモリ18の書き換え回数を少なくできる。よってリアルタイムクロック装置10は、最低限の書き換え動作により、電力消費を低減できるとともに、電子機器の製品寿命が尽きる前にリアルタイムクロック装置10の書き換え可能回数の上限に到達することがない。
In addition, since the real-time data stored in the nonvolatile memory is rewritten when the above-described three conditions are satisfied, the number of times of rewriting the
なお前述したリアルタイムクロック装置10はリセット信号を出力する構成にできる。図3はリセット信号を出力する構成にした制御部のブロック図である。この構成の場合、前述した制御部22に、制御手段30、検出手段32およびリセット信号出力手段34を設ける。制御手段30は、前述した検出手段32やリセット信号出力手段34、リアルタイムクロック回路16、揮発性メモリ20、不揮発性メモリ18等を制御するとともに、電圧比較器24やパワーオンリセット回路26からの検出結果を入力するものである。また検出手段32は、不揮発性メモリ18から揮発性メモリ20へのリアルタイムデータの転送終了を検出するものである。さらにリセット信号出力手段34は、リセット信号を出力するものである。そしてリアルタイムクロック装置10にリセット信号出力端子(/RST)を設ける。
The real-
このような構成にした場合、リセット信号を出力する動作は次のようになる。リアルタイムクロック装置10に初期電源を投入すると、前述したように不揮発性メモリ18から揮発性メモリ20へリアルタイムデータが転送される。この転送が終了すると、検出手段32が転送終了を検出する。制御手段30は検出手段32から検出結果を受けると、不揮発性メモリ18への電流供給を停止するとともに、リセット信号出力手段34からリセット信号を出力するように制御を行う。この制御によって、リセット信号出力端子(/RST)を介して、リセット信号出力手段34からリアルタイムクロック装置10の外部、すなわち電子機器へリセット信号が出力する。
In the case of such a configuration, the operation for outputting the reset signal is as follows. When the real-
このような構成にすれば、リアルタイムクロック装置10は、ディレイ付きのリセット集積回路と同等の機能を備えることができる。よってリアルタイムクロック装置10を搭載している電子機器全体の部品点数が少なくなり、電子機器の省コスト化を図ることができる。
With this configuration, the real-
次に、第2の実施形態について説明する。なお第2の実施形態では、第1の実施形態と同構成の部分の説明を省略する。図4は第2の実施形態に係るリアルタイムクロック装置のブロック図である。第2の実施形態に係るリアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック回路16、不揮発性メモリ18、揮発性メモリ20、制御部22、電圧比較器24およびパワーオンリセット回路26を備えている。
Next, a second embodiment will be described. In the second embodiment, description of the same configuration as in the first embodiment is omitted. FIG. 4 is a block diagram of a real-time clock device according to the second embodiment. The real-
不揮発性メモリ18は、第1の実施形態と同じものであればよく、例えばEEPROMやフラッシュメモリ等であればよい。この不揮発性メモリ18は、システム領域40とユーザ領域42を備えている。すなわち不揮発性メモリ18は、システム領域40となるリアルタイムデータおよび識別情報(ID−ROM)の記憶部と、ユーザ領域42となるユーザデータの記憶部を備えている。この識別情報は、リアルタイムクロック装置10のシリアルナンバー等の固定データであり、リアルタイムクロック装置10の製造者が設定している。
The
そして製造者は、システム領域40にリアルタイムデータや識別情報を書き込みできるとともに、これらを読み出しできる。なおリアルタイムデータを書き込む場合は、リアルタイムクロック装置10を特殊なモード(テストモード)に設定している。またリアルタイムクロック装置10のユーザは、システム領域40のデータを読み出すことができる。
The manufacturer can write real-time data and identification information in the system area 40 and can read them. When writing real-time data, the real-
また製造者およびユーザは、ユーザ領域42にデータを書き込みできるとともに、読み出しできる。なおユーザ領域42は、ユーザが主に使用する領域になっている。このためリアルタイムクロック装置10を電子機器に搭載したときには、ユーザがユーザ領域42にユーザデータを書き込むとともに、ユーザ領域42からユーザデータを読み出している。すなわちユーザ領域42は、ユーザが使用するユーザデータを記憶している。
In addition, the manufacturer and the user can write and read data in the user area 42. The user area 42 is an area mainly used by the user. Therefore, when the real-
このような不揮発性メモリ18を備えたリアルタイムクロック装置10は、第1の実施形態に係るリアルタイムクロック装置と同様の制御方法になる。すなわちリアルタイムクロック装置10に初期電源を供給したときに、リアルタイムデータ、識別情報およびユーザデータを不揮発性メモリ18から揮発性メモリ20に転送する。この転送が終了したら不揮発性メモリ18への電流供給を停止する。そしてリアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック装置10および揮発性メモリ20を使用して計時を行う。
The real-
リアルタイムデータやユーザデータを更新する場合は、揮発性メモリ20に記憶してあるリアルタイムデータやユーザデータをブロック毎に更新し、このブロックに対応したデータ更新フラグを立てる操作をする。これによりリアルタイムデータやユーザデータに更新が生じたことがわかる。そして揮発性メモリ20にデータ更新フラグが立っていること、リアルタイムクロック装置10にメイン電圧が供給されていること、およびタイミング信号が発生したことの3つを条件にして、不揮発性メモリ18への電流供給を再開する。この後、更新されたリアルタイムデータやユーザデータを揮発性メモリ20から不揮発性メモリ18に転送し、不揮発性メモリ18で記憶しているデータ内容を更新する。この更新が完了すると、不揮発性メモリ18への電流供給を停止するとともに、揮発性メモリ20に立てられていたデータ更新フラグを降ろす。
When updating real-time data or user data, the real-time data or user data stored in the
このようなリアルタイムクロック装置10は、不揮発性メモリ18をシステム領域40とユーザ領域42に分けている。このため本実施形態に係るリアルタイムクロック装置10を搭載した電子機器は、外付け部品としてユーザ領域(ユーザデータ用の記憶部)を搭載する必要がない。これに対し、従来のリアルタイムクロック装置はユーザ領域を備えていない。このため従来のリアルタイムクロック装置を搭載した電子機器は、外付け部品としてユーザ領域を搭載する必要がある。よって本実施形態に係るリアルタイムクロック装置10を搭載した電子機器は、従来のリアルタイムクロック装置を搭載した電子機器に比べ、電子機器の回路構成を簡略化および小型化できる。そして近年では、電子機器の小型化が要求されているので、本実施形態に係るリアルタイムクロック装置10を搭載した電子機器はこの要求に応えることができる。
また本実施形態に係るリアルタイムクロック装置10およびこれの制御方法は、第1の実施形態と同様の効果を奏することができる。
Such a real-
In addition, the real-
なお、このような不揮発性メモリ18を備えたリアルタイムクロック装置10は、ユーザ領域42が必要な電子機器に搭載できる。具体的な一例としては、ディジタルオーディオプレイヤに搭載できる。ディジタルオーディオプレイヤで再生する音楽データには、一定時間内のみしか再生できないものや、許可された者しか再生できなないものがある。そして一定時間内のみしか再生できない音楽データであれば、リアルタイムクロック回路16で生成される計時データに基づいて再生時間の管理を行える。また許可された者しか再生できない音楽データであれば、リアルタイムクロック装置10の識別情報、すなわちシステム領域40で記憶している識別情報に基づいて再生の管理を行える。またユーザ領域42には、音楽データや、ディジタルオーディオプレイヤの再生情報(音楽データの再生順番や音質、音量等)を記憶することができる。このため、リアルタイムクロック装置10の内部にユーザ領域42を設けることにより、ディジタルオーディオプレイヤで使用する様々なユーザデータをリアルタイムクロック装置10で管理できるので、使い勝手が向上するとともに、ディジタルオーディオプレイヤを小型化できる。
Note that the real-
また本実施形態に係るリアルタイムクロック装置10は、図3を用いて説明した構成を備えることもできる。すなわち第2の実施形態に係るリアルタイムクロック装置10は、図3に示す制御手段30、検出手段32およびリセット信号出力手段34を備る構成にできる。そして、このリアルタイムクロック装置10は、初期電源投入時における不揮発性メモリ18から揮発性メモリ20へのリアルタイムデータの転送終了により、リセット信号出力端子(/RST)を介して装置10の外部にリセット信号を出力できる。
The real-
10………リアルタイムクロック装置、14………発振回路、16………リアルタイムクロック回路、18………不揮発性メモリ、20………揮発性メモリ、34………リセット信号出力手段、40………システム領域、42………ユーザ領域。
10... Real
Claims (8)
このリアルタイムデータの転送終了により、前記不揮発性メモリへの電流供給を止め、
前記揮発性メモリで記憶しているリアルタイムデータと、発振回路から入力した源振とを利用してリアルタイムクロック回路で計時を行う、
ことを特徴とするリアルタイムクロック装置の制御方法。 By turning on the initial power, the real-time data stored in the non-volatile memory is transferred to the volatile memory.
By stopping the transfer of this real-time data, the current supply to the nonvolatile memory is stopped,
Time is measured with a real-time clock circuit using real-time data stored in the volatile memory and a source oscillation input from an oscillation circuit.
A method for controlling a real-time clock device.
タイミング信号が発生するとともに、メイン電圧が供給されるときに前記不揮発性メモリへの電流供給を再開し、
更新されたリアルタイムデータを前記揮発性メモリから前記不揮発性メモリに転送して、前記不揮発性メモリが記憶しているリアルタイムデータを書き換える、
ことを特徴とする請求項1または2に記載のリアルタイムクロック装置の制御方法。 Storing in the volatile memory real-time data updates caused by timing in the real-time clock circuit;
When the timing signal is generated and the main voltage is supplied, the current supply to the nonvolatile memory is resumed,
Transferring updated real-time data from the volatile memory to the nonvolatile memory, and rewriting the real-time data stored in the nonvolatile memory;
The method for controlling a real-time clock device according to claim 1 or 2.
リアルタイムデータを記憶した、電流が選択的に供給される不揮発性メモリと、
前記不揮発性メモリからリアルタイムデータを入力して記憶する揮発性メモリと、
前記発振回路から入力した源振と前記揮発性メモリで記憶したリアルタイムデータとを利用して計時を行うリアルタイムクロック回路と、
を備えたことを特徴とするリアルタイムクロック装置。 An oscillation circuit that outputs a source oscillation;
Non-volatile memory that stores real-time data and is selectively supplied with current;
A volatile memory for inputting and storing real-time data from the nonvolatile memory;
A real-time clock circuit for measuring time using source oscillation input from the oscillation circuit and real-time data stored in the volatile memory;
A real-time clock device comprising:
リアルタイムデータを記憶した不揮発性メモリと、
前記不揮発性メモリからリアルタイムデータを入力して記憶するとともに、計時によって更新されたリアルタイムデータを記憶する揮発性メモリと、
前記発振回路から入力した源振と前記揮発性メモリで記憶したリアルタイムデータとを利用して前記計時を行うリアルタイムクロック回路と、
初期電源投入を検知して前記不揮発性メモリへ電流を供給し、前記不揮発性メモリから前記揮発性メモリへリアルタイムデータの転送制御を行うとともに、前記揮発性メモリで記憶したリアルタイムデータの更新と、前記リアルタイムクロック回路で発生したタイミング信号と、メイン電源の投入とを検知して前記不揮発性メモリへ電流を供給し、前記揮発性メモリから前記不揮発性メモリへ更新されたリアルタイムデータの転送制御を行う制御部と、
を備えたことを特徴とするリアルタイムクロック装置。 An oscillation circuit that outputs a source oscillation;
Non-volatile memory storing real-time data;
A volatile memory that inputs and stores real-time data from the nonvolatile memory, and stores real-time data updated by timekeeping, and
A real-time clock circuit that performs the timing using the source oscillation input from the oscillation circuit and the real-time data stored in the volatile memory;
Detecting initial power-on and supplying current to the non-volatile memory, performing real-time data transfer control from the non-volatile memory to the volatile memory, updating real-time data stored in the volatile memory, and Control for detecting the timing signal generated in the real-time clock circuit and turning on the main power supply, supplying current to the nonvolatile memory, and controlling the transfer of updated real-time data from the volatile memory to the nonvolatile memory And
A real-time clock device comprising:
この検出手段から信号を得て、リセット信号を出力するリセット信号出力手段と、
を備えたことを特徴とする請求項5ないし7のいずれかに記載のリアルタイムクロック装置。 Detection means for detecting completion of transfer of real-time data from the nonvolatile memory to the volatile memory;
A reset signal output means for obtaining a signal from the detection means and outputting a reset signal;
The real-time clock device according to claim 5, further comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006157144A JP2007328404A (en) | 2006-06-06 | 2006-06-06 | Control method of real time clock device, and real time clock device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006157144A JP2007328404A (en) | 2006-06-06 | 2006-06-06 | Control method of real time clock device, and real time clock device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007328404A true JP2007328404A (en) | 2007-12-20 |
Family
ID=38928851
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006157144A Pending JP2007328404A (en) | 2006-06-06 | 2006-06-06 | Control method of real time clock device, and real time clock device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007328404A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018120578A (en) * | 2017-01-24 | 2018-08-02 | セイコーエプソン株式会社 | Circuit device, oscillation device, physical quantity measuring device, electronic apparatus, and vehicle |
-
2006
- 2006-06-06 JP JP2006157144A patent/JP2007328404A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018120578A (en) * | 2017-01-24 | 2018-08-02 | セイコーエプソン株式会社 | Circuit device, oscillation device, physical quantity measuring device, electronic apparatus, and vehicle |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100613541B1 (en) | Generator and electric device using the same | |
JP5228392B2 (en) | Temperature compensated oscillation circuit, real-time clock device and electronic equipment | |
KR100521824B1 (en) | Semiconductor device, nonvolatile semiconductor memory device, system having a plurality of semiconductor device or nonvolatile semiconductor memory device, electric card having semiconductor device or nonvolatile semiconductor memory device, and electric device capable of using the electric card | |
JP2007241995A (en) | Semiconductor integrated circuit device | |
JP2007328404A (en) | Control method of real time clock device, and real time clock device | |
US7463547B2 (en) | Micro computer and method of optimizing microcomputer | |
JP2009048614A (en) | Real time clock and data recording method of real time clock | |
JP5983512B2 (en) | Writing device | |
JP5867173B2 (en) | Power activation control device | |
JP2009130587A (en) | Oscillation circuit and oscillator | |
JP4640734B2 (en) | RTC device | |
US20040011869A1 (en) | Content reproduction apparatus | |
JP4079553B2 (en) | Nonvolatile memory device and image forming apparatus | |
JP4702343B2 (en) | Mobile terminal device | |
JP2009206839A (en) | Electronic device and current consumption measurement method in electronic device | |
JP2008225922A (en) | Nonvolatile storage device | |
KR102390879B1 (en) | Battery management system with plurality of operation mode and mode operation method thereof | |
JP2010117990A (en) | Power circuit and electronic apparatus using the same | |
JP4853416B2 (en) | Event recorder and electronic device equipped with the same | |
JPH09213088A (en) | Engine controller | |
KR100635204B1 (en) | Flash memory device with stable auto read function regardless of external voltage and method for controlling auto read of the flash memory device | |
KR20070018986A (en) | Random number generation device, generation method, generator evaluation method, and random number use method | |
JP2007042221A (en) | Method of controlling writing to nonvolatile storage circuit, and semiconductor integrated circuit | |
JP5052221B2 (en) | Semiconductor integrated circuit | |
JP2002042479A (en) | Semiconductor memory |