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 PDF

Info

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
Application number
JP2006157144A
Other languages
Japanese (ja)
Inventor
Tsutomu Ogiwara
勤 荻原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Miyazaki Epson Corp
Original Assignee
Miyazaki Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Miyazaki Epson Corp filed Critical Miyazaki Epson Corp
Priority to JP2006157144A priority Critical patent/JP2007328404A/en
Publication of JP2007328404A publication Critical patent/JP2007328404A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a real time clock device operating at low voltage and low current, and its control method. <P>SOLUTION: The real time clock device 10 comprises an oscillating circuit 14 for outputting source oscillation, a nonvolatile memory 18 that stores real time data and selectively receives current, a volatile memory 20 for receiving the real time data from the nonvolatile memory 18 and holding it, and a real time clock circuit 16 for performing clocking using the source oscillation input from the oscillating circuit 14 and the real time data stored in the volatile memory 20. <P>COPYRIGHT: (C)2008,JPO&INPIT

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)。
特開2001−311786号公報 特開昭62−145413号公報
Some real-time clock devices include an oscillation circuit provided with a piezoelectric vibrator, a real-time clock circuit that uses a source oscillation input from the oscillation circuit, and a memory in which data is written. This memory may be a memory (EEPROM) that can electrically rewrite data (Patent Document 1) or a memory (RAM) that electrically reads and writes data (Patent Document 2).
JP 2001-31786 A Japanese Patent Laid-Open No. Sho 62-145413

前述したリアルタイムクロック装置は、電話やファクシミリ等を始めとして様々な電子機器に搭載されている。この電子機器には、消費電力を削減するために、使用者が使用していない場合に通常の使用状態から低消費電力状態(省電力モード)に移行するものがある。このような電子機器に搭載されたリアルタイムクロック装置は、電子機器の省電力モードへの移行等に伴って通常使用状態からバックアップ状態になり、リアルタイムクロック回路で計時のみを行い、他の動作を停止させている。   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は、書き換え回数に制限がある。この書き換え可能な回数は10ないし10回程度である。そして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 Patent Document 1, only data used for the real-time clock device is written in the EEPROM, and data writing is not open to the user. That is, the user of the real-time clock device cannot write data (user data) used by the user to the EEPROM. In the real-time clock device provided with the RAM of Patent Document 2, when the power supply is stopped, the data stored in the RAM is erased. For this reason, even if the user writes user data in the RAM, the user data is erased.

本発明は、低電圧および低電流で動作するリアルタイムクロック装置を提供するとともに、これの制御方法を提供することを目的とする。   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-time clock device 10 according to the first embodiment includes an oscillation circuit 14 including a piezoelectric vibrator 12, a real-time clock circuit 16, a nonvolatile memory 18, a volatile memory 20, a control unit 22, a voltage comparator 24, and a power-on A reset circuit 26 is provided.

不揮発性メモリ18は、リアルタイムクロック回路16での計時に用いられるリアルタイムデータを記憶している。この不揮発性メモリ18は、記憶しているデータを電気的に書き換えできるものであればよい。具体的な例としては、不揮発性メモリ18はEEPROMやフラッシュメモリ等であればよい。また揮発性メモリ20は、データを電気的に読み書きできるバッファメモリ(RAM)であればよい。   The non-volatile memory 18 stores real-time data used for timing by the real-time clock circuit 16. The nonvolatile memory 18 only needs to be capable of electrically rewriting stored data. As a specific example, the nonvolatile memory 18 may be an EEPROM, a flash memory, or the like. The volatile memory 20 may be a buffer memory (RAM) that can electrically read and write data.

圧電振動子12は、電気信号が供給されると一定の周波数、例えば32.768kHzで発振するものであればよい。そして発振回路14は、この圧電振動子12に電気信号を供給するとともに、圧電振動子12が発振した周波数に応じた信号(源振)を出力する。リアルタイムクロック回路16は、発振回路14の後段に接続している。このリアルタイムクロック回路16は、発振回路14から入力した源振および揮発性メモリ20で記憶しているリアルタイムデータに基づいて計時を行っている。   The piezoelectric vibrator 12 only needs to oscillate at a constant frequency, for example, 32.768 kHz, when an electric signal is supplied. The oscillation circuit 14 supplies an electric signal to the piezoelectric vibrator 12 and outputs a signal (source vibration) corresponding to the frequency oscillated by the piezoelectric vibrator 12. The real time clock circuit 16 is connected to the subsequent stage of the oscillation circuit 14. The real-time clock circuit 16 measures time based on the source oscillation input from the oscillation circuit 14 and the real-time data stored in the volatile memory 20.

また制御部22は、リアルタイムクロック回路16、不揮発性メモリ18および揮発性メモリ20を制御するものである。そして制御部22は、リアルタイムクロック装置10が電子機器に搭載された場合に、電子機器の演算処理部と接続する。なお演算処理部は、電子機器に搭載されており、電子機器を制御するものである。   The control unit 22 controls the real-time clock circuit 16, the nonvolatile memory 18, and the volatile memory 20. And the control part 22 connects with the arithmetic processing part of an electronic device, when the real-time clock apparatus 10 is mounted in an electronic device. The arithmetic processing unit is mounted on the electronic device and controls the electronic device.

また電圧比較器24は、電源電圧端子VDDに接続している。そして電圧比較器24は、電源電圧端子VDDを介して供給された電源電圧値を比較して比較結果を制御部22に出力するものである。すなわち電圧比較器24は、リアルタイムクロック装置10に供給された電圧がメイン電圧なのか、それともバックアップ電圧なのかを判断している。またパワーオンリセット回路26は、初期電源投入されたときに、リアルタイムクロック装置10をリセットするために設けられている。このパワーオンリセット回路26の後段に制御部22が接続している。   The voltage comparator 24 is connected to the power supply voltage terminal VDD. The voltage comparator 24 compares power supply voltage values supplied via the power supply voltage terminal VDD and outputs a comparison result to the control unit 22. That is, the voltage comparator 24 determines whether the voltage supplied to the real-time clock device 10 is a main voltage or a backup voltage. The power-on reset circuit 26 is provided for resetting the real-time clock device 10 when the initial power is turned on. The control unit 22 is connected to the subsequent stage of the power-on reset circuit 26.

このような構成のリアルタイムクロック装置10の制御方法は、次のようになっている。まず電源電圧端子VDDを介してリアルタイムクロック装置10に初期電源(メイン電圧)を供給すると、パワーオンリセット回路26はこの初期電源投入を検出して、検出結果を制御部22に出力する。制御部22は、検出結果を入力すると、リアルタイムクロック装置10の内部システム、すなわちリアルタイムクロック回路16等の初期設定(リセット)を行う。   The control method of the real-time clock device 10 having such a configuration is as follows. First, when an initial power supply (main voltage) is supplied to the real-time clock device 10 via the power supply voltage terminal VDD, the power-on reset circuit 26 detects this initial power-on and outputs the detection result to the control unit 22. When the detection result is input, the control unit 22 performs initial setting (reset) of the internal system of the real-time clock device 10, that is, the real-time clock circuit 16.

この後、制御部22の制御によって、不揮発性メモリ18で記憶しているリアルタイムデータを揮発性メモリ20に転送する。この転送によってリアルタイムデータを揮発性メモリ20に記憶する。そしてリアルタイムデータの転送が終了すると、制御部22は不揮発性メモリ18への電流供給を停止する。   Thereafter, the real-time data stored in the nonvolatile memory 18 is transferred to the volatile memory 20 under the control of the control unit 22. Real-time data is stored in the volatile memory 20 by this transfer. When the transfer of the real-time data is completed, the control unit 22 stops supplying current to the nonvolatile memory 18.

これ以降、リアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック回路16および揮発性メモリ20を使用して計時を行う。すなわち発振回路14は圧電振動子12を発振させて、この発振によって得られた源振をリアルタイムクロック回路16が利用する。またリアルタイムクロック回路16は、揮発性メモリ20にアクセスし、これに記憶しているリアルタイムデータを利用する。なおリアルタイムクロック回路16は、不揮発性メモリ18にアクセスすることはない。したがってリアルタイムクロック装置10は、不揮発性メモリ18に比べて消費電力の小さい揮発性メモリ20を使用するので、低電圧・低電流で動作する。   Thereafter, the real-time clock device 10 uses the oscillation circuit 14 including the piezoelectric vibrator 12, the real-time clock circuit 16, and the volatile memory 20 to measure time. That is, the oscillation circuit 14 oscillates the piezoelectric vibrator 12 and the real time clock circuit 16 uses the source oscillation obtained by this oscillation. The real-time clock circuit 16 accesses the volatile memory 20 and uses real-time data stored therein. The real time clock circuit 16 does not access the nonvolatile memory 18. Therefore, the real-time clock device 10 uses a volatile memory 20 that consumes less power than the non-volatile memory 18, and thus operates at a low voltage and a low current.

またリアルタイムクロック回路16で計時中にリアルタイムデータの更新があった場合は、揮発性メモリ20で記憶しているリアルタイムデータを書き換える。図2は揮発性メモリのデータブロックの説明図である。揮発性メモリ20は、不揮発性メモリ18のブロック毎にリアルタイムデータを記憶している。すなわち揮発性メモリ20は、不揮発性メモリバッファ0、不揮発性メモリバッファ1、…不揮発性メモリバッファnの各ブロックに分けられている。そしてリアルタイムデータの書き換えは更新があったブロック毎に行われ、このブロックに対応したデータ更新フラグを立てる。一例としては、不揮発性メモリバッファ0のリアルタイムデータが更新された場合、この不揮発性メモリバッファ0のリアルタイムデータを書き換えるとともに、このブロックのデータが更新されたことを示すデータ更新フラグ(1)を立てる。   When the real-time clock circuit 16 updates the real-time data during the time measurement, the real-time data stored in the volatile memory 20 is rewritten. FIG. 2 is an explanatory diagram of a data block of the volatile memory. The volatile memory 20 stores real-time data for each block of the nonvolatile memory 18. That is, the volatile memory 20 is divided into blocks of a nonvolatile memory buffer 0, a nonvolatile memory buffer 1,... A nonvolatile memory buffer n. Real-time data rewriting is performed for each updated block, and a data update flag corresponding to this block is set. As an example, when real-time data in the nonvolatile memory buffer 0 is updated, the real-time data in the nonvolatile memory buffer 0 is rewritten, and a data update flag (1) indicating that the data in this block has been updated is set. .

またリアルタイムクロック装置10を搭載している電子機器が通常動作状態から省電力モードに移行する場合、リアルタイムクロック装置10は、これに伴って通常動作状態からバックアップ状態になる。この場合、電源電圧端子VDDを介してリアルタイムクロック装置10に供給される電源電圧はメイン電圧からバックアップ電圧に変わり、電圧値が下がる。このときリアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック回路16および揮発性メモリ20のみを動作させて、これらで計時を行う。   When the electronic device equipped with the real time clock device 10 shifts from the normal operation state to the power saving mode, the real time clock device 10 is changed from the normal operation state to the backup state. In this case, the power supply voltage supplied to the real-time clock device 10 via the power supply voltage terminal VDD changes from the main voltage to the backup voltage, and the voltage value decreases. At this time, the real-time clock device 10 operates only the oscillation circuit 14 including the piezoelectric vibrator 12, the real-time clock circuit 16, and the volatile memory 20 to measure time.

そしてバックアップ状態において、リアルタイムデータの更新があった場合も、前述した通常使用状態と同様にして、揮発性メモリ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 volatile memory 20 is rewritten in the same manner as in the normal use state described above. That is, since the volatile memory 20 stores the real-time data divided into a plurality of blocks, the volatile memory 20 rewrites only the data of the block in which the real-time data has been updated, and also updates the data indicating that the data in this block has been updated. A flag is raised. Since the real-time clock device 10 uses the volatile memory 20 that consumes less power than the non-volatile memory 18 to measure time, the real-time data stored in the volatile memory 20 can be updated even in a backup state.

そして不揮発性メモリ18で記憶しているリアルタイムデータの更新は、次のようにして行っている。すなわちリアルタイムデータの更新は、リアルタイムクロック回路16でタイミング信号が発生したときに行われる。このタイミング信号には、リアルタイムクロック回路16で計時をすることによって発生する桁上げ信号を用いればよい。   The real-time data stored in the nonvolatile memory 18 is updated as follows. That is, real-time data is updated when a timing signal is generated in the real-time clock circuit 16. As the timing signal, a carry signal generated by measuring time by the real-time clock circuit 16 may be used.

より具体的には、次のようになっている。リアルタイムクロック回路16では源振等を利用して、秒、分、時、曜、日、月、年の計時を行っている。そして秒を計時している場合、リアルタイムクロック回路16の内部に設けられた秒レジスタで00から59までの60進でカウントをして、59から00へ移行するタイミングで秒(下位)レジスタから分(上位)レジスタに桁上げ信号を出力している。分、時、曜、日、月を計時している各カウンタも、秒レジスタと同様の動作を行っている。このため、例えば、時カウンタから曜カウンタまたは日カウンタに出力される桁上げ信号をタイミング信号として利用すればよい。   More specifically, it is as follows. The real-time clock circuit 16 measures time in seconds, minutes, hours, days of the week, days, months, and years by using a source oscillation or the like. When the second is counted, the second register provided in the real-time clock circuit 16 counts from 00 to 59 in 60 hex, and the time from 59 to 00 shifts to the second (lower) register. A carry signal is output to the (upper) register. Each counter that measures the minutes, hours, days of the week, days, and months also performs the same operation as the seconds register. For this reason, for example, a carry signal output from the hour counter to the day counter or the day counter may be used as the timing signal.

そして不揮発性メモリ18で記憶しているリアルタイムデータの更新、すなわち揮発性メモリ20から不揮発性メモリ18への更新されたリアルタイムデータの転送は、次の条件を満たす場合に行われる。すなわちタイミング信号が発生した場合において(条件1)、揮発性メモリ20で記憶しているリアルタイムデータに更新があったことを示すデータ更新フラグが立っていて(条件2)、且つ、リアルタイムクロック装置10にメイン電圧が供給されているとき(条件3)に、リアルタイムデータの転送を行う。なおリアルタイムクロック装置10にメイン電圧が供給されているか否かの検出は電圧比較器24で行っている。すなわち電圧比較器24は、リアルタイムクロック装置10にメイン電圧が供給されていることを検出すると、検出結果を制御部22に出力する。このため制御部22は、揮発性メモリ20にデータ更新フラグが立っていること、メイン電圧が供給されていること、およびタイミング信号が発生したことの3つを条件にして、不揮発性メモリ18に電流を供給する。   The real-time data stored in the nonvolatile memory 18 is updated, that is, the updated real-time data is transferred from the volatile memory 20 to the nonvolatile memory 18 when the following condition is satisfied. That is, when a timing signal is generated (condition 1), a data update flag indicating that the real-time data stored in the volatile memory 20 has been updated is set (condition 2), and the real-time clock device 10 When the main voltage is supplied to (condition 3), real-time data is transferred. Whether or not the main voltage is supplied to the real-time clock device 10 is detected by the voltage comparator 24. That is, when the voltage comparator 24 detects that the main voltage is supplied to the real-time clock device 10, the voltage comparator 24 outputs the detection result to the control unit 22. For this reason, the control unit 22 stores the data update flag in the volatile memory 20, that the main voltage is supplied, and that the timing signal is generated. Supply current.

この後、揮発性メモリ20から不揮発性メモリ18に、更新されたリアルタイムデータを転送する。すなわち図2に示す場合では、不揮発性メモリバッファ0に対応するデータ更新フラグが立っているので、この対象ブロックのデータ内容(不揮発性メモリバッファ0の更新されたリアルタイムデータ)を揮発性メモリ20から不揮発性メモリ18に転送し、書き込む。この転送が終了すると、再び不揮発性メモリ18への電流供給を停止する。また揮発性メモリ20のデータ更新フラグを降ろす。   Thereafter, the updated real-time data is transferred from the volatile memory 20 to the nonvolatile memory 18. That is, in the case shown in FIG. 2, since the data update flag corresponding to the nonvolatile memory buffer 0 is set, the data content of the target block (the updated real-time data of the nonvolatile memory buffer 0) is transferred from the volatile memory 20. Transfer to nonvolatile memory 18 and write. When this transfer ends, the current supply to the nonvolatile memory 18 is stopped again. Also, the data update flag of the volatile memory 20 is lowered.

これにより不揮発性メモリ18に電流を選択的に供給して、この不揮発性メモリ18に記憶されたリアルタイムデータを更新しているので、リアルタイムクロック装置10は、低電圧・低電流で動作する。また不揮発性メモリ18で記憶しているリアルタイムデータが頻繁に書き換えられることはない。   As a result, current is selectively supplied to the nonvolatile memory 18 and the real-time data stored in the nonvolatile memory 18 is updated. Therefore, the real-time clock device 10 operates at a low voltage and a low current. In addition, the real-time data stored in the nonvolatile memory 18 is not frequently rewritten.

このようなリアルタイムクロック装置10およびこれの制御方法によれば、リアルタイムクロック装置10へ初期電源が投入されたとき、および揮発性メモリ20から不揮発性メモリ18にリアルタイムデータが転送されて書き込まれるときに不揮発性メモリ18へ電流を選択供給する。このため不揮発性メモリ18が動作するときにのみ電流を供給するので、リアルタイムクロック装置10は電流消費および電圧消費も低減できる。したがってリアルタイムクロック装置10は低電圧および低電流で動作できる。またこのリアルタイムクロック装置10を搭載している電子機器の消費電力が小さくなり、特に電子機器が電池で駆動している場合には電池寿命が長くなり、製品寿命が短くなるのを防止できる。   According to such a real-time clock device 10 and its control method, when the initial power is turned on to the real-time clock device 10 and when real-time data is transferred from the volatile memory 20 to the non-volatile memory 18 for writing. A current is selectively supplied to the nonvolatile memory 18. Therefore, since the current is supplied only when the nonvolatile memory 18 operates, the real-time clock device 10 can reduce current consumption and voltage consumption. Therefore, the real-time clock device 10 can operate at a low voltage and a low current. In addition, the power consumption of the electronic device in which the real-time clock device 10 is mounted is reduced. In particular, when the electronic device is driven by a battery, the battery life is prolonged and the product life can be prevented from being shortened.

そして不揮発性メモリ18で記憶しているリアルタイムデータの書き換え時は、リアルタイムクロック装置10にメイン電圧が供給されているので、不揮発性メモリ18へのアクセススピードを高速にできる。よって少ない時間で書き込みを終了できるので、リアルタイムクロック装置10の消費電流を低減でき、また電圧消費も低減できる。   When the real-time data stored in the nonvolatile memory 18 is rewritten, the main voltage is supplied to the real-time clock device 10, so that the access speed to the nonvolatile memory 18 can be increased. Therefore, since writing can be completed in a short time, the current consumption of the real-time clock device 10 can be reduced and the voltage consumption can also be reduced.

また不揮発性メモリで記憶しているリアルタイムデータの書き換えは、前述した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 nonvolatile memory 18 can be reduced. Therefore, the real-time clock device 10 can reduce power consumption by a minimum rewriting operation, and does not reach the upper limit of the number of times that the real-time clock device 10 can be rewritten before the product life of the electronic device is exhausted.

なお前述したリアルタイムクロック装置10はリセット信号を出力する構成にできる。図3はリセット信号を出力する構成にした制御部のブロック図である。この構成の場合、前述した制御部22に、制御手段30、検出手段32およびリセット信号出力手段34を設ける。制御手段30は、前述した検出手段32やリセット信号出力手段34、リアルタイムクロック回路16、揮発性メモリ20、不揮発性メモリ18等を制御するとともに、電圧比較器24やパワーオンリセット回路26からの検出結果を入力するものである。また検出手段32は、不揮発性メモリ18から揮発性メモリ20へのリアルタイムデータの転送終了を検出するものである。さらにリセット信号出力手段34は、リセット信号を出力するものである。そしてリアルタイムクロック装置10にリセット信号出力端子(/RST)を設ける。   The real-time clock device 10 described above can be configured to output a reset signal. FIG. 3 is a block diagram of a control unit configured to output a reset signal. In the case of this configuration, the control unit 22, the detection unit 32, and the reset signal output unit 34 are provided in the control unit 22 described above. The control unit 30 controls the detection unit 32, the reset signal output unit 34, the real time clock circuit 16, the volatile memory 20, the nonvolatile memory 18 and the like described above, and detects from the voltage comparator 24 and the power-on reset circuit 26. The result is input. The detecting means 32 detects the end of real-time data transfer from the nonvolatile memory 18 to the volatile memory 20. Further, the reset signal output means 34 outputs a reset signal. The real-time clock device 10 is provided with a reset signal output terminal (/ RST).

このような構成にした場合、リセット信号を出力する動作は次のようになる。リアルタイムクロック装置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-time clock device 10 is turned on, the real-time data is transferred from the nonvolatile memory 18 to the volatile memory 20 as described above. When this transfer ends, the detection means 32 detects the end of transfer. When receiving the detection result from the detection means 32, the control means 30 performs control so as to stop the current supply to the nonvolatile memory 18 and to output a reset signal from the reset signal output means 34. With this control, a reset signal is output from the reset signal output means 34 to the outside of the real-time clock device 10, that is, to the electronic device via the reset signal output terminal (/ RST).

このような構成にすれば、リアルタイムクロック装置10は、ディレイ付きのリセット集積回路と同等の機能を備えることができる。よってリアルタイムクロック装置10を搭載している電子機器全体の部品点数が少なくなり、電子機器の省コスト化を図ることができる。   With this configuration, the real-time clock device 10 can have a function equivalent to that of a reset integrated circuit with a delay. Therefore, the number of parts of the entire electronic device on which the real-time clock device 10 is mounted can be reduced, and the cost of the electronic device can be reduced.

次に、第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-time clock device 10 according to the second embodiment includes an oscillation circuit 14 including a piezoelectric vibrator 12, a real-time clock circuit 16, a nonvolatile memory 18, a volatile memory 20, a control unit 22, a voltage comparator 24, and a power-on A reset circuit 26 is provided.

不揮発性メモリ18は、第1の実施形態と同じものであればよく、例えばEEPROMやフラッシュメモリ等であればよい。この不揮発性メモリ18は、システム領域40とユーザ領域42を備えている。すなわち不揮発性メモリ18は、システム領域40となるリアルタイムデータおよび識別情報(ID−ROM)の記憶部と、ユーザ領域42となるユーザデータの記憶部を備えている。この識別情報は、リアルタイムクロック装置10のシリアルナンバー等の固定データであり、リアルタイムクロック装置10の製造者が設定している。   The nonvolatile memory 18 may be the same as that of the first embodiment, and may be, for example, an EEPROM or a flash memory. The nonvolatile memory 18 includes a system area 40 and a user area 42. That is, the nonvolatile memory 18 includes a storage unit for real-time data and identification information (ID-ROM) serving as the system area 40 and a storage unit for user data serving as the user area 42. This identification information is fixed data such as a serial number of the real-time clock device 10 and is set by the manufacturer of the real-time clock device 10.

そして製造者は、システム領域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-time clock device 10 is set to a special mode (test mode). The user of the real-time clock device 10 can read the data in the system area 40.

また製造者およびユーザは、ユーザ領域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-time clock device 10 is mounted on an electronic device, the user writes user data in the user area 42 and reads user data from the user area 42. That is, the user area 42 stores user data used by the user.

このような不揮発性メモリ18を備えたリアルタイムクロック装置10は、第1の実施形態に係るリアルタイムクロック装置と同様の制御方法になる。すなわちリアルタイムクロック装置10に初期電源を供給したときに、リアルタイムデータ、識別情報およびユーザデータを不揮発性メモリ18から揮発性メモリ20に転送する。この転送が終了したら不揮発性メモリ18への電流供給を停止する。そしてリアルタイムクロック装置10は、圧電振動子12を備えた発振回路14、リアルタイムクロック装置10および揮発性メモリ20を使用して計時を行う。   The real-time clock device 10 including such a nonvolatile memory 18 has the same control method as the real-time clock device according to the first embodiment. That is, when initial power is supplied to the real-time clock device 10, real-time data, identification information, and user data are transferred from the nonvolatile memory 18 to the volatile memory 20. When this transfer is completed, the current supply to the nonvolatile memory 18 is stopped. The real-time clock device 10 measures time using the oscillation circuit 14 including the piezoelectric vibrator 12, the real-time clock device 10 and the volatile memory 20.

リアルタイムデータやユーザデータを更新する場合は、揮発性メモリ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 volatile memory 20 is updated for each block, and a data update flag corresponding to this block is set. As a result, it can be seen that the real-time data and the user data are updated. Then, on the condition that the data update flag is set in the volatile memory 20, the main voltage is supplied to the real-time clock device 10, and the timing signal is generated, the nonvolatile memory 18 is loaded. Restart current supply. Thereafter, the updated real-time data and user data are transferred from the volatile memory 20 to the nonvolatile memory 18 and the data content stored in the nonvolatile memory 18 is updated. When this update is completed, the current supply to the nonvolatile memory 18 is stopped and the data update flag set in the volatile memory 20 is lowered.

このようなリアルタイムクロック装置10は、不揮発性メモリ18をシステム領域40とユーザ領域42に分けている。このため本実施形態に係るリアルタイムクロック装置10を搭載した電子機器は、外付け部品としてユーザ領域(ユーザデータ用の記憶部)を搭載する必要がない。これに対し、従来のリアルタイムクロック装置はユーザ領域を備えていない。このため従来のリアルタイムクロック装置を搭載した電子機器は、外付け部品としてユーザ領域を搭載する必要がある。よって本実施形態に係るリアルタイムクロック装置10を搭載した電子機器は、従来のリアルタイムクロック装置を搭載した電子機器に比べ、電子機器の回路構成を簡略化および小型化できる。そして近年では、電子機器の小型化が要求されているので、本実施形態に係るリアルタイムクロック装置10を搭載した電子機器はこの要求に応えることができる。
また本実施形態に係るリアルタイムクロック装置10およびこれの制御方法は、第1の実施形態と同様の効果を奏することができる。
Such a real-time clock device 10 divides the nonvolatile memory 18 into a system area 40 and a user area 42. For this reason, the electronic device in which the real-time clock device 10 according to the present embodiment is mounted does not need to mount a user area (storage unit for user data) as an external component. On the other hand, the conventional real-time clock device does not have a user area. For this reason, an electronic device equipped with a conventional real-time clock device needs to have a user area as an external component. Therefore, an electronic device equipped with the real-time clock device 10 according to the present embodiment can simplify and reduce the circuit configuration of the electronic device as compared with an electronic device equipped with a conventional real-time clock device. In recent years, there has been a demand for downsizing of electronic devices, and electronic devices equipped with the real-time clock device 10 according to the present embodiment can meet this requirement.
In addition, the real-time clock device 10 and the control method thereof according to the present embodiment can achieve the same effects as those of the first embodiment.

なお、このような不揮発性メモリ18を備えたリアルタイムクロック装置10は、ユーザ領域42が必要な電子機器に搭載できる。具体的な一例としては、ディジタルオーディオプレイヤに搭載できる。ディジタルオーディオプレイヤで再生する音楽データには、一定時間内のみしか再生できないものや、許可された者しか再生できなないものがある。そして一定時間内のみしか再生できない音楽データであれば、リアルタイムクロック回路16で生成される計時データに基づいて再生時間の管理を行える。また許可された者しか再生できない音楽データであれば、リアルタイムクロック装置10の識別情報、すなわちシステム領域40で記憶している識別情報に基づいて再生の管理を行える。またユーザ領域42には、音楽データや、ディジタルオーディオプレイヤの再生情報(音楽データの再生順番や音質、音量等)を記憶することができる。このため、リアルタイムクロック装置10の内部にユーザ領域42を設けることにより、ディジタルオーディオプレイヤで使用する様々なユーザデータをリアルタイムクロック装置10で管理できるので、使い勝手が向上するとともに、ディジタルオーディオプレイヤを小型化できる。   Note that the real-time clock device 10 including such a nonvolatile memory 18 can be mounted on an electronic device that requires the user area 42. As a specific example, it can be mounted on a digital audio player. Some music data reproduced by a digital audio player can be reproduced only within a certain period of time, and others can be reproduced only by authorized persons. If the music data can be reproduced only within a predetermined time, the reproduction time can be managed based on the time data generated by the real-time clock circuit 16. If the music data can be reproduced only by an authorized person, the reproduction can be managed based on the identification information of the real-time clock device 10, that is, the identification information stored in the system area 40. The user area 42 can store music data and playback information of the digital audio player (music data playback order, sound quality, volume, etc.). For this reason, by providing the user area 42 in the real time clock device 10, various user data used in the digital audio player can be managed by the real time clock device 10, so that the usability is improved and the digital audio player is downsized. it can.

また本実施形態に係るリアルタイムクロック装置10は、図3を用いて説明した構成を備えることもできる。すなわち第2の実施形態に係るリアルタイムクロック装置10は、図3に示す制御手段30、検出手段32およびリセット信号出力手段34を備る構成にできる。そして、このリアルタイムクロック装置10は、初期電源投入時における不揮発性メモリ18から揮発性メモリ20へのリアルタイムデータの転送終了により、リセット信号出力端子(/RST)を介して装置10の外部にリセット信号を出力できる。   The real-time clock device 10 according to the present embodiment can also have the configuration described with reference to FIG. That is, the real-time clock device 10 according to the second embodiment can be configured to include the control means 30, the detection means 32, and the reset signal output means 34 shown in FIG. The real-time clock device 10 receives a reset signal to the outside of the device 10 via the reset signal output terminal (/ RST) upon completion of transfer of real-time data from the nonvolatile memory 18 to the volatile memory 20 when the initial power is turned on. Can be output.

第1の実施形態に係るリアルタイムクロック装置のブロック図である。It is a block diagram of the real-time clock device concerning a 1st embodiment. 揮発性メモリのデータブロックの説明図である。It is explanatory drawing of the data block of volatile memory. リセット信号を出力する構成にした制御部のブロック図である。It is a block diagram of a control unit configured to output a reset signal. 第2の実施形態に係るリアルタイムクロック装置のブロック図である。It is a block diagram of the real-time clock device concerning a 2nd embodiment.

符号の説明Explanation of symbols

10………リアルタイムクロック装置、14………発振回路、16………リアルタイムクロック回路、18………不揮発性メモリ、20………揮発性メモリ、34………リセット信号出力手段、40………システム領域、42………ユーザ領域。 10... Real time clock device 14... Oscillation circuit 16... Real time clock circuit 18 18 Nonvolatile memory 20 Volatile memory 34 Reset signal output means 40 ... System area, 42 ... User area.

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. The method for controlling a real-time clock device according to claim 1, wherein a reset signal is output to the outside upon completion of transfer of the real-time data. 前記リアルタイムクロック回路での計時によって生じたリアルタイムデータの更新を前記揮発性メモリに記憶し、
タイミング信号が発生するとともに、メイン電圧が供給されるときに前記不揮発性メモリへの電流供給を再開し、
更新されたリアルタイムデータを前記揮発性メモリから前記不揮発性メモリに転送して、前記不揮発性メモリが記憶しているリアルタイムデータを書き換える、
ことを特徴とする請求項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.
前記不揮発性メモリは、システムが使用するリアルタイムデータおよび識別情報を記憶するとともに、ユーザが使用するユーザデータを記憶することを特徴とする請求項1ないし3のいずれかに記載のリアルタイムクロック装置の制御方法。   4. The control of the real-time clock device according to claim 1, wherein the nonvolatile memory stores real-time data and identification information used by the system and user data used by a user. Method. 源振を出力する発振回路と、
リアルタイムデータを記憶した、電流が選択的に供給される不揮発性メモリと、
前記不揮発性メモリからリアルタイムデータを入力して記憶する揮発性メモリと、
前記発振回路から入力した源振と前記揮発性メモリで記憶したリアルタイムデータとを利用して計時を行うリアルタイムクロック回路と、
を備えたことを特徴とするリアルタイムクロック装置。
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または6に記載のリアルタイムクロック装置。   7. The real-time clock device according to claim 5, wherein the nonvolatile memory includes a storage unit for real-time data and identification information, and a storage unit for user data input from the outside. 前記不揮発性メモリから前記揮発性メモリへのリアルタイムデータの転送完了を検出する検出手段と、
この検出手段から信号を得て、リセット信号を出力するリセット信号出力手段と、
を備えたことを特徴とする請求項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:
JP2006157144A 2006-06-06 2006-06-06 Control method of real time clock device, and real time clock device Pending JP2007328404A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (1)

* Cited by examiner, † Cited by third party
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