JP3030878B2 - Long time timer - Google Patents

Long time timer

Info

Publication number
JP3030878B2
JP3030878B2 JP3008304A JP830491A JP3030878B2 JP 3030878 B2 JP3030878 B2 JP 3030878B2 JP 3008304 A JP3008304 A JP 3008304A JP 830491 A JP830491 A JP 830491A JP 3030878 B2 JP3030878 B2 JP 3030878B2
Authority
JP
Japan
Prior art keywords
microcomputer
time
timer
oscillation
cycle
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.)
Expired - Fee Related
Application number
JP3008304A
Other languages
Japanese (ja)
Other versions
JPH04250715A (en
Inventor
益夫 大田
照夫 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP3008304A priority Critical patent/JP3030878B2/en
Publication of JPH04250715A publication Critical patent/JPH04250715A/en
Application granted granted Critical
Publication of JP3030878B2 publication Critical patent/JP3030878B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Power Sources (AREA)
  • Electronic Switches (AREA)
  • Oscillators With Electromechanical Resonators (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、製品の一機能として用
いられる長時間タイマに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a long time timer used as one function of a product.

【0002】[0002]

【従来の技術】従来、製品の一機能として長時間タイマ
を組み込む場合、安価なものとしてはCR発振によるも
のがあげられる。これは図2に示すように、カウンタ1
1とインバータ12,13とコンデンサ14と抵抗1
5,16からなっており、コンデンサ14と抵抗15の
CR時定数により、インバータ12,13を用いて発振
させ、それを基本クロックとしてカウンタ11をカウン
トアップし、長時間タイマを構成していた。
2. Description of the Related Art Conventionally, when a long time timer is incorporated as one function of a product, an inexpensive one is a CR oscillation. This is, as shown in FIG.
1, inverters 12 and 13, capacitor 14 and resistor 1
Oscillation is performed using the inverters 12 and 13 based on the CR time constant of the capacitor 14 and the resistor 15, and the counter 11 is counted up by using the inverter 12 and 13 as a basic clock to constitute a long time timer.

【0003】[0003]

【発明が解決しようとする課題】しかしながら前記の従
来の構成では、CR時定数のバラツキが20%程度あ
り、それがそのまま長時間タイマのバラツキとなってし
まう。またマイクロコンピュータのみで構成する場合も
あるが、消費電流が多くなったり、その機能のために安
価なマイクロコンピュータが使えなかったりする問題点
があった。
However, in the above-described conventional configuration, the variation of the CR time constant is about 20%, which directly becomes the variation of the long time timer. In some cases, the microcomputer is constituted only by a microcomputer. However, there are problems that the current consumption increases and an inexpensive microcomputer cannot be used due to its function.

【0004】本発明は前記従来の問題点を解決するもの
で、マイクロコンピュータでCR発振回路の1周期を予
め測定しておき、前記CR発振回路からの信号により1
周期の時間ごとに、1周期の時間を加算するようにした
ものである。
The present invention solves the above-mentioned conventional problem. A microcomputer measures one cycle of a CR oscillation circuit in advance and uses a signal from the CR oscillation circuit to measure one cycle.
One cycle time is added for each cycle time.

【0005】このことにより、長時間タイマの誤差を大
幅に改良し、低消費電力で安価に製品の一機能として組
み込むことができる長時間タイマを提供することを目的
としたものである。
Accordingly, it is an object of the present invention to significantly improve the error of the long-time timer, and to provide a long-time timer that can be incorporated as a function of a product with low power consumption and low cost.

【0006】[0006]

【課題を解決するための手段】この目的を達成するため
に、本発明の長時間タイマは、マイクロコンピュータと
前記マイクロコンピュータの基本クロックとして用いる
水晶発振部とタイマの基本時間をつくるCR発振部とか
ら構成され、マイクロコンピュータの動作中水晶発振部
により時間カウントを行ない、CR発振部の1周期の時
間を予め測定しておき、マイクロコンピュータのスリー
プ状態時に水晶発振部を停止し、CR発振部からの信号
により1周期の時間ごとにタイマの時間を加算するもの
である。
In order to achieve this object, a long-time timer according to the present invention comprises a microcomputer, a crystal oscillator used as a basic clock of the microcomputer, and a CR oscillator which generates a basic time of the timer. During operation of the microcomputer, the time is counted by the crystal oscillation unit, the time of one cycle of the CR oscillation unit is measured in advance, and the crystal oscillation unit is stopped when the microcomputer is in the sleep state. , The time of the timer is added for each period of one cycle.

【0007】[0007]

【作用】この構成により、マイクロコンピュータが動作
中には前記CR発振部の1周期の時間Tを測定してお
き、前記マイクロコンピュータがスリープ状態時には水
晶発振部を停止し、前記CR発振部からの信号により1
周期の時間Tごとにタイマ時間を加算することが可能で
ある。
With this configuration, the period T of one cycle of the CR oscillating unit is measured while the microcomputer is operating, and the crystal oscillating unit is stopped when the microcomputer is in the sleep state, and the operation from the CR oscillating unit is stopped. 1 by signal
It is possible to add the timer time for each time T of the cycle.

【0008】[0008]

【実施例】以下、本発明の一実施例について図面を参照
しながら説明する。図1において1はマイクロコンピュ
ータであり、2は水晶またはセラミック発振部であり、
3,4はNANDゲート、5はコンデンサ、6,7は抵
抗である。
An embodiment of the present invention will be described below with reference to the drawings. In FIG. 1, 1 is a microcomputer, 2 is a crystal or ceramic oscillation unit,
3, 4 are NAND gates, 5 is a capacitor, and 6, 7 are resistors.

【0009】以上のように構成された長時間タイマにつ
いて、以下その動作を説明する。まず電源を立ち上げる
とマイクロコンピュータ1は、PortをHizにし、
コンデンサ5と抵抗6により構成されているCR時定数
によるCR発振部を動作させ、INT割込みによる信号
により取り込み、CR発振の1周期を水晶発振部2を原
発振として測定する。その後、他の処理を行なう間はマ
イクロコンピュータ1はPortをLowにし、CR発
振を停止させ、その間のタイマは水晶発振部2によって
行ない、長時間タイマのみの処理となった時、マイクロ
コンピュータ1はPortを再びHizにし、CR発振
を再開し水晶発振部2を停止しスリープ状態に入り、C
R発振部の最終出力部の立ち上がりにより、INT割込
み信号を受けマイクロコンピュータはスリープ状態から
復帰し、CR発振の1周期分を加算して、予め設定した
時間に達するまで再びスリープ状態に入りこれを繰り返
す。
The operation of the long timer configured as described above will be described below. First, when the power is turned on, the microcomputer 1 sets Port to Hiz,
The CR oscillating unit based on the CR time constant constituted by the capacitor 5 and the resistor 6 is operated, fetched by an INT interrupt signal, and one cycle of the CR oscillation is measured using the crystal oscillating unit 2 as the original oscillation. Thereafter, while performing other processing, the microcomputer 1 sets the Port to Low and stops the CR oscillation. During that time, the timer is performed by the crystal oscillating unit 2. The Port is set to Hiz again, the CR oscillation is restarted, the crystal oscillation unit 2 is stopped, and a sleep state is entered.
At the rising edge of the final output of the R oscillating unit, the microcomputer receives an INT interrupt signal, returns from the sleep state, adds one cycle of CR oscillation, and enters the sleep state again until a preset time is reached. repeat.

【0010】以上のように本実施例によれば、マイクロ
コンピュータは低消費電流状態で使用でき、CR発振の
大幅な誤差なしに長時間タイマを構成することができ
る。図3にそのフローチャートを示す。
As described above, according to the present embodiment, the microcomputer can be used in a low current consumption state, and a long time timer can be configured without a large error in CR oscillation. FIG. 3 shows the flowchart.

【0011】[0011]

【発明の効果】以上のように本発明によれば、一機能と
して長時間タイマ機能を必要とされる場合、長時間タイ
マ誤差を少なくし、低消費電力で安価に製品に組み込む
ことが可能になる。
As described above, according to the present invention, when a long-time timer function is required as one function, a long-time timer error can be reduced and low power consumption and low cost can be incorporated into a product. Become.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例による電気回路図FIG. 1 is an electric circuit diagram according to an embodiment of the present invention.

【図2】従来例の電気回路図FIG. 2 is an electric circuit diagram of a conventional example.

【図3】本発明のフローチャートFIG. 3 is a flowchart of the present invention.

【符号の説明】[Explanation of symbols]

1 マイクロコンピュータ 2 水晶またはセラミック発振部 3,4 NANDゲート 5 コンデンサ 6,7 抵抗 DESCRIPTION OF SYMBOLS 1 Microcomputer 2 Crystal or ceramic oscillation part 3, 4 NAND gate 5 Capacitor 6, 7 Resistance

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭64−84183(JP,A) 特開 昭58−113889(JP,A) 特開 昭62−138781(JP,A) 実開 昭60−14535(JP,U) 実開 平3−70427(JP,U) (58)調査した分野(Int.Cl.7,DB名) H03K 17/00 - 17/693 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-64-84183 (JP, A) JP-A-58-113889 (JP, A) JP-A-62-138781 (JP, A) Jpn. 14535 (JP, U) Hikaru Hei 3-70427 (JP, U) (58) Fields investigated (Int. Cl. 7 , DB name) H03K 17/00-17/693

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】マイクロコンピュータまたはこれに相当す
る能動素子と、前記マイクロコンピュータの基本クロッ
クとして用いる水晶発振部と、タイマの基本時間をつく
るCR発振部とから構成され、前記マイクロコンピュー
タの動作中前記水晶発振部により時間カウントを行なう
と共に、前記CR発振部の1周期の時間Tを測定してお
き、前記マイクロコンピュータがスリープ状態時には水
晶発振部を停止し、前記CR発振部からの信号により1
周期の時間Tごとにタイマの時間を加算する長時間タイ
マ。
1. A microcomputer comprising: a microcomputer or an active element corresponding to the microcomputer; a crystal oscillator used as a basic clock of the microcomputer; and a CR oscillator configured to generate a basic time of a timer. The time is counted by the crystal oscillation unit, and the time T of one cycle of the CR oscillation unit is measured. When the microcomputer is in the sleep state, the crystal oscillation unit is stopped.
A long time timer that adds the timer time for each period T of the cycle.
JP3008304A 1991-01-28 1991-01-28 Long time timer Expired - Fee Related JP3030878B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3008304A JP3030878B2 (en) 1991-01-28 1991-01-28 Long time timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3008304A JP3030878B2 (en) 1991-01-28 1991-01-28 Long time timer

Publications (2)

Publication Number Publication Date
JPH04250715A JPH04250715A (en) 1992-09-07
JP3030878B2 true JP3030878B2 (en) 2000-04-10

Family

ID=11689415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3008304A Expired - Fee Related JP3030878B2 (en) 1991-01-28 1991-01-28 Long time timer

Country Status (1)

Country Link
JP (1) JP3030878B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2868472B2 (en) * 1996-07-30 1999-03-10 日本電気アイシーマイコンシステム株式会社 Microcontroller and control method thereof
DE102005018518A1 (en) * 2005-04-20 2006-10-26 Braun Gmbh Method for generating a time base for a microcontroller and circuit arrangement therefor

Also Published As

Publication number Publication date
JPH04250715A (en) 1992-09-07

Similar Documents

Publication Publication Date Title
JP3030878B2 (en) Long time timer
US6326825B1 (en) Accurate time delay system and method utilizing an inaccurate oscillator
JP2000010955A (en) Test mode setting circuit of mcu
JPH01260518A (en) Microcomputer
JPH04102910A (en) Microcomputer
JP3584821B2 (en) Microcomputer with built-in CR oscillation clock
JP3137750B2 (en) Oscillation stabilization time guarantee circuit
US4235072A (en) Motor drive circuit in digital type electronic time piece
JPS5850060A (en) Electronic calculator
JPH0441634Y2 (en)
JPH03165617A (en) Initial state clock generating circuit
JPS6076807A (en) Clock shaping circuit
JP2586262B2 (en) X-ray controller
JPH0722245B2 (en) Oscillator circuit
JP3216303B2 (en) Sphygmomanometer pressure measuring device
JPS5943765B2 (en) semiconductor integrated circuit
KR940006610Y1 (en) Variable circuit for lagging the on-time of inverter
KR960005979B1 (en) Mono stable multivibrater
KR810000549Y1 (en) Alarm electronic timepiece
JP2540544Y2 (en) Counter circuit
JPH0352326A (en) Power-on reset circuit
JPH05313795A (en) Semiconductor integrated circuit
JP3144811B2 (en) Monitoring timer circuit
JPS62243510A (en) Cooker with clock
JPH0333909A (en) Standby circuit for microcomputer

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees