JPH08179849A - Clock output circuit - Google Patents

Clock output circuit

Info

Publication number
JPH08179849A
JPH08179849A JP6322672A JP32267294A JPH08179849A JP H08179849 A JPH08179849 A JP H08179849A JP 6322672 A JP6322672 A JP 6322672A JP 32267294 A JP32267294 A JP 32267294A JP H08179849 A JPH08179849 A JP H08179849A
Authority
JP
Japan
Prior art keywords
clock
circuit
oscillation
cpu
sampling
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.)
Granted
Application number
JP6322672A
Other languages
Japanese (ja)
Other versions
JP2716386B2 (en
Inventor
浩文 ▲齊▼藤
Hirofumi Saito
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.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP6322672A priority Critical patent/JP2716386B2/en
Publication of JPH08179849A publication Critical patent/JPH08179849A/en
Application granted granted Critical
Publication of JP2716386B2 publication Critical patent/JP2716386B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE: To prevent the runaway of a CPU when oscillation is instable by counting the cycle of clocks from a crystal oscillator corresponding to a sampling clock due to a clock oscillator with speedy oscillation start in the case of using the crystal oscillator for the clock source of the CPU, and supplying a clock to the CPU after detecting that the oscillated clock gets stabilized. CONSTITUTION: This circuit is provided with an oscillation circuit 2 for generating a clock for operating a CPU 6, sampling clock generating circuit 3 for counting the pulse width of this oscillation circuit 2, sampling circuit 4 equipped with a function for comparing the result of counting the pulse width of the oscillated clock from the oscillation circuit 2 corresponding to the sampling clock of the sampling clock generating circuit 3 with a prescribed value and outputting the compared result, and CPU clock selecting circuit 5 for selecting whether supplying the clock from the oscillation circuit 2 to the CPU 6 or not corresponding to the output of this sampling circuit 4.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、クロック出力回路に関
し、特にCPUへのシステムクロックを供給する発振回
路を有するシングルチップマイクロコンピュータのクロ
ック回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a clock output circuit, and more particularly to a clock circuit of a single chip microcomputer having an oscillator circuit for supplying a system clock to a CPU.

【0002】[0002]

【従来の技術】従来の発振回路を有するシングルチップ
マイクロコンピュータのクロック回路としては、特開昭
62−267816号公報がある。その構成は、図8に
示すように、電源投入後、発振信号fを出力する発振回
路32と、発振信号fを入力してシステムクロックaを
出力するシステムクロック発生回路23と、オートリセ
ット信号eを出力するオートリセット回路37と、前記
システムクロックaとオートリセット信号eを入力して
リセット遅延信号iを出力するリセット遅延回路34
と、リセット遅延信号iを入力してシステムリセット信
号jを出力するシステムリセット発生回路35と、シス
テムクロックaとシステムリセット信号jを入力するC
PU36とを有している。図9は、発振回路32の一例
の回路図である。この回路は、水晶振動子9の入出力間
に二個のコンデンサC2とバッファ8と抵抗R11とを
接続し、その発振出力fをインバータ11を介して出力
している。
2. Description of the Related Art As a clock circuit of a conventional single-chip microcomputer having an oscillation circuit, there is JP-A-62-267816. As shown in FIG. 8, the configuration is such that after power is turned on, an oscillation circuit 32 that outputs an oscillation signal f, a system clock generation circuit 23 that inputs the oscillation signal f and outputs a system clock a, and an auto reset signal e. , And a reset delay circuit 34 that inputs the system clock a and the auto reset signal e and outputs a reset delay signal i.
, A system reset generation circuit 35 which inputs the reset delay signal i and outputs the system reset signal j, and a C which inputs the system clock a and the system reset signal j.
And PU 36. FIG. 9 is a circuit diagram of an example of the oscillation circuit 32. In this circuit, two capacitors C2, a buffer 8 and a resistor R11 are connected between the input and output of a crystal oscillator 9, and the oscillation output f thereof is output via an inverter 11.

【0003】次に、図8のブロック図および図10のそ
のタイミング波形図を参照して説明する。オートリセッ
ト回路37は、電源電圧を常にモニターし、CPU36
の動作可能電圧Mに達しているか否かを判定した信号を
出力するものである。まず電源投入をすると発振回路3
2は直ちに発振動作を開始する。ここで、オートリセッ
ト信号eは、電源投入後電源電圧がCPUの動作可能電
圧になり、次第にインアクティブレベルとなる。この
時、電源投入時から発振回路32の発振クロックfが発
振安定状態までになるのに要する時間をt0とする。
Next, description will be made with reference to the block diagram of FIG. 8 and its timing waveform diagram of FIG. The auto reset circuit 37 constantly monitors the power supply voltage, and the CPU 36
The signal for determining whether or not the operable voltage M has been output is output. First, when the power is turned on, the oscillation circuit 3
2 immediately starts oscillating operation. Here, the power supply voltage of the auto reset signal e becomes the operable voltage of the CPU after the power is turned on, and gradually becomes the inactive level. At this time, the time required for the oscillation clock f of the oscillation circuit 32 to reach the oscillation stable state after the power is turned on is t0.

【0004】一方、システムリセット発生回路35のリ
セット信号jが解除されるまでの時間をtnとする。発
振回路32で生成された発振クロックfは、システムク
ロック発生回路33に取り込まれシステムクロックaと
なる。このシステムクロックaを用いてリセット遅延回
路34を動作させる。このリセット遅延回路34は、オ
ートリセット信号eがインアクティブ(HIGH)にな
ったことを検出してからシステムクロックaのカウント
を開始する。
On the other hand, the time until the reset signal j of the system reset generation circuit 35 is released is tn. The oscillation clock f generated by the oscillation circuit 32 is captured by the system clock generation circuit 33 and becomes the system clock a. The reset delay circuit 34 is operated using this system clock a. The reset delay circuit 34 starts counting the system clock a after detecting that the auto reset signal e has become inactive (HIGH).

【0005】リセット遅延回路34に設けられているカ
ウンタにおいて、システムクロックaのクロック数をカ
ウントし、予め設定してあるモジュロ値に達した時、リ
セット遅延回路34はシステムリセット発生回路35へ
リセット遅延信号iをハイアクティブで送る。これを受
けて、システムリセット発生回路35はシステムリセッ
ト信号jをハイにリセットし、CPU36のリセット状
態を解除して、システムクロックaを動作クロックとし
て動作を開始する。
The counter provided in the reset delay circuit 34 counts the number of clocks of the system clock a, and when the preset modulo value is reached, the reset delay circuit 34 resets to the system reset generation circuit 35. Send signal i high active. In response to this, the system reset generation circuit 35 resets the system reset signal j to high, releases the reset state of the CPU 36, and starts operation with the system clock a as the operation clock.

【0006】リセット遅延回路34に設けられているカ
ウンタのモジュロ値は、発振回路32の発振クロック5
が安定状態となるまでに必要な時間t0を予め想定し、
これに相当する値を設定する。つまり、発振クロックf
が発振安定状態になるまでの想定時間をシステムクロッ
クaを周期幅で割った値をモジュロ値として設定してお
けば、発振安定が完了するまでのリセット遅延信号iを
得ることができる。これにより発振不安定な時の発振ク
ロックaをCPU36の動作クロックとして用いること
なく、CPUの暴走を防ぐようにしている。
The modulo value of the counter provided in the reset delay circuit 34 is the oscillation clock 5 of the oscillation circuit 32.
Assuming in advance the time t0 required until is stable,
Set a value equivalent to this. That is, the oscillation clock f
If a value obtained by dividing the system clock a by the period width is set as the modulo value for the estimated time until the oscillation stabilization occurs, the reset delay signal i until the oscillation stabilization is completed can be obtained. This prevents the runaway of the CPU without using the oscillation clock a when the oscillation is unstable as the operation clock of the CPU 36.

【0007】[0007]

【発明が解決しようとする課題】上述した従来のクロッ
ク出力回路では、発振クロックの発振成長時間の変動に
関係なく発振クロックのクロック数をカウントし、予め
カウンタに設定した値に達した時に発振クロックは安定
状態に達したと判断している。一般に、図9に示すよう
な水晶発振器、セラミック発振器等の振動子9を用いる
発振器32は、発振開始時には発振回路内の発振バッフ
ァ8が自己バイアスにより増幅器として最も利得の高い
状態になっている。この状態からの発振成長の様子は図
3の発振出力fの波形で示されている。この発振出力f
は、図3の発振バッファ8の出力に対応しており、まず
発振開始時は自己バイアス点を中心に小振幅で振動を開
始し、次第にこの振幅が拡大される。この振幅が、波形
整形用インバータ11のスレショルド電圧を越えるまで
成長すると、図3の発振クロックaのように出力され
る。
In the above-described conventional clock output circuit, the number of clocks of the oscillation clock is counted regardless of the fluctuation of the oscillation growth time of the oscillation clock, and the oscillation clock is counted when the value reaches the value set in the counter in advance. Has determined that it has reached a stable state. Generally, in the oscillator 32 using the oscillator 9 such as a crystal oscillator or a ceramic oscillator as shown in FIG. 9, the oscillation buffer 8 in the oscillation circuit is in the highest gain state as an amplifier due to self-bias at the start of oscillation. The state of oscillation growth from this state is shown by the waveform of the oscillation output f in FIG. This oscillation output f
Corresponds to the output of the oscillation buffer 8 in FIG. 3, and at the start of oscillation, oscillation starts with a small amplitude centering on the self-bias point, and this amplitude is gradually expanded. When this amplitude grows until it exceeds the threshold voltage of the waveform shaping inverter 11, it is output as the oscillation clock a in FIG.

【0008】この発振成長過程で発振バッファ8は、そ
の出力振幅が自己バイアス点近傍で小振幅状態の期間
は、高利得状態であるため外来の電源ノイズ等に対して
敏感な状態となっている。このノイズにより、図3のよ
うに本来の振動子の機械的振動特性で定まる発振周期と
全く異なる発振のノイズ成分をクロックとして出力して
しまうことがある。このノイズによって発振器の発振成
長そのものが阻害され、ノイズが無くなってから再度発
振成長を開始する事態、すなわち発振成長時間が変動す
ることがある。
During this oscillation growth process, the oscillation buffer 8 is in a high gain state while the output amplitude thereof is in the small amplitude state in the vicinity of the self-bias point, so that the oscillation buffer 8 is sensitive to external power supply noise and the like. . Due to this noise, as shown in FIG. 3, an oscillation noise component completely different from the oscillation period determined by the mechanical vibration characteristic of the original oscillator may be output as a clock. Oscillation growth itself of the oscillator is hindered by this noise, and a situation in which oscillation growth starts again after the noise disappears, that is, oscillation growth time may fluctuate.

【0009】この従来例では、図11のように発振成長
過程の正規でない発振クロックaをカウントして、期待
した発振成長待時間より早く設定モジュロ値に到達して
しまい、リセット遅延信号iが発生して、発振成長過程
の不安定なクロックをCPUクロックとしてCPUへ取
り込んでしまうために、CPUの暴走を引き起こしてし
まうという問題がある。
In this conventional example, as shown in FIG. 11, the irregular oscillation clock a in the oscillation growth process is counted, and the set modulo value is reached earlier than the expected oscillation growth wait time, and the reset delay signal i is generated. Then, since the unstable clock in the oscillation growth process is taken into the CPU as the CPU clock, there is a problem that the CPU runs away.

【0010】この問題は別の特開平4−348410号
公報の中でも扱われているが、本例と同様で一意に設定
した発振成長待期時間を設定しており、その問題は解決
されていない。
Although this problem is dealt with in another Japanese Patent Laid-Open No. 4-348410, the oscillation growth waiting time set uniquely as in this example is set, and the problem is not solved. .

【0011】本発明の目的は、これらの問題を解決し、
発振立上りが確実に完了してからクロックを出力できる
ようにしたクロック出力回路を提供することにある。
The object of the present invention is to solve these problems,
It is an object of the present invention to provide a clock output circuit that can output a clock after the rising of the oscillation is surely completed.

【0012】[0012]

【課題を解決するための手段】本発明のクロック出力回
路の構成は、CPUのクロック周波数より高い周波数の
第1のクロックを出力するサンプリングクロック発生回
路と、前記CPUのクロック周波数を第2のクロックと
して固定振動子により発振させ出力する発振回路と、電
源電圧の立ち上りを検出してオートリセット信号を出力
するオートリセット回路と、前記オートリセット信号に
より初期化された後前記第1のクロックにより前記第2
のクロック周期を計測しこ計数値が予め設定した計数値
に等価な計測値となるとクロック供給許可信号を出力す
るサンプリング回路と、前記クロック供給許可信号が有
効な時前記第2のクロックを前記CPUクロックとして
出力するクロック選択回路とを備えることを特徴とす
る。
A clock output circuit according to the present invention comprises a sampling clock generating circuit for outputting a first clock having a frequency higher than a clock frequency of a CPU, and a clock frequency of the CPU for a second clock. As an oscillation circuit for oscillating and outputting by a fixed oscillator, an auto-reset circuit for detecting a rising of the power supply voltage and outputting an auto-reset signal, and the first clock after being initialized by the auto-reset signal. Two
A clock circuit that outputs a clock supply permission signal when the count value obtained by measuring the clock cycle is equal to the preset count value, and the second clock when the clock supply permission signal is valid. And a clock selection circuit for outputting as a clock.

【0013】[0013]

【実施例】図1は本発明の一実施例のブロック図であ
る。本実施例は、任意の周波数の第1のクロックaを発
生する発振回路2と、そのクロック周期にくらべて短か
い周期の第2のクロックbを発生するサンプリングクロ
ック発生回路3と、電源電圧の立上がりを検出してオー
トリセット信号eを出力するオートリセット回路7と、
第1、第2のクロックおよびオートリセット信号を入力
し、オートリセット信号によって内部状態が初期化され
その初期化完了後、第2のクロックにより第1のクロッ
ク周期をカウント計測し予め設定したカウント値に等価
な計測結果を得ると、すなわち発振回路の発振が安定し
た後、CPUクロック供給許可信号cを出力するサンプ
リング回路4と、発振回路2から出力されるクロックと
クロック供給許可信号cとを入力し、クロック発振許可
信号cが有効な時に第1のクロックaをCPUクロック
dとして出力するCPUクロック選択回路5と、CPU
クロックdを入力としてCPUの動作クロックとして利
用するCPU6とから構成される。
FIG. 1 is a block diagram of an embodiment of the present invention. In this embodiment, an oscillation circuit 2 that generates a first clock a having an arbitrary frequency, a sampling clock generation circuit 3 that generates a second clock b having a shorter cycle than the clock cycle, and a power supply voltage An auto reset circuit 7 that detects a rising edge and outputs an auto reset signal e,
The first and second clocks and the auto reset signal are input, the internal state is initialized by the auto reset signal, and after the initialization is completed, the first clock period is counted and measured by the second clock, and the preset count value is set. Is obtained, that is, after the oscillation of the oscillation circuit is stabilized, the sampling circuit 4 that outputs the CPU clock supply permission signal c, the clock output from the oscillation circuit 2 and the clock supply permission signal c are input. A CPU clock selection circuit 5 for outputting the first clock a as the CPU clock d when the clock oscillation enable signal c is valid;
The CPU 6 uses the clock d as an input and uses it as an operating clock of the CPU.

【0014】ここで第2のクロックを発生するサンプリ
ングクロック発生回路3には、発振精度は劣るが発振成
長が発振開始後直ちに完了する特徴を持つCR発振器
(図2)等で構成し、また第1のクロックを発生する発
振回路2には発振精度は高いが発振成長に時間を要する
水晶発振器等で構成する。本実施例の動作は、図3のタ
イミング波形図に示される。
Here, the sampling clock generating circuit 3 for generating the second clock is composed of a CR oscillator (FIG. 2) or the like which has a characteristic that oscillation growth is inferior but oscillation growth is completed immediately after the start of oscillation. The oscillator circuit 2 for generating the clock 1 is composed of a crystal oscillator or the like which has high oscillation accuracy but requires time for oscillation growth. The operation of this embodiment is shown in the timing waveform chart of FIG.

【0015】サンプリングクロック発生回路3は、CP
U動作に用いるには発振精度は劣るが発振成長が発振開
始後直ちに完了するもので、図2(a)に示すようなC
R発振器で構成する。すなわち、インバータ12および
NOR回路17と、抵抗R1,コンデンサC1から発振
回路を構成し、インバータ18を介して出力bを得てい
る。
The sampling clock generation circuit 3 has a CP
Although the oscillation accuracy is inferior to use for the U operation, the oscillation growth is completed immediately after the oscillation starts, and as shown in FIG.
It consists of R oscillator. That is, the inverter 12 and the NOR circuit 17, the resistor R1 and the capacitor C1 constitute an oscillation circuit, and the output b is obtained via the inverter 18.

【0016】この回路は、その発振精度が±20%程度
であるが、発振立上がりは一発振周期程度の時間であ
る。この出力クロックbを、以下サンプリングクロック
と称す。なおサンプリングクロック発生回路3として
は、図2(b)に示すように、CRの代りに奇数段のイ
ンバータ12を用いることもできる。
Although the oscillation accuracy of this circuit is about ± 20%, the oscillation rise time is about one oscillation cycle. This output clock b is hereinafter referred to as a sampling clock. Note that as the sampling clock generation circuit 3, as shown in FIG. 2B, an odd number of stages of inverters 12 can be used instead of CR.

【0017】発振回路2は、CPU動作に用いる第1の
クロックを発生するもので、発振成長は遅いが、発振精
度の高いクロックを出力し、従来例の図9に示すような
水晶発振器と同様であり、その発振立上がりは数十ms
ec〜数sec程度である。このクロックaを以下発振
クロックと称す。
The oscillator circuit 2 generates the first clock used for the CPU operation, outputs a clock with high oscillation accuracy although the oscillation growth is slow, and is similar to the conventional crystal oscillator as shown in FIG. And the oscillation rise is several tens of ms
ec to several seconds. Hereinafter, this clock a will be referred to as an oscillation clock.

【0018】発振クロックaは、シングルチップマイク
ロコンピュータでサブクロックとして一般的に使用され
ている周波数32KHzとし、そのためサンプリングク
ロックbは周波数320KHzとする。
The oscillation clock a has a frequency of 32 KHz which is generally used as a sub clock in a single chip microcomputer, and therefore the sampling clock b has a frequency of 320 KHz.

【0019】サンプリング回路4は、図4のブロック図
に示されるように、カウンタ13,一致回路14,モジ
ュロレジスタ15および保持回路16から構成される。
保持回路16は、図5(a),(b)にその二例を示し
たように、フリップフロップ19,19a,bから構成
される。これらは、モジュロ値との一致を1回,2回カ
ウントした後に出力cを出力している。カウンタ13,
一致回路14およびモジュロレジスタ15も、図6に示
すように、それぞれシリアルレジスタ21、EX−OR
回路22とAND回路23および設定用オプションスイ
ッチ25とレジスタ24などで構成される。
As shown in the block diagram of FIG. 4, the sampling circuit 4 comprises a counter 13, a coincidence circuit 14, a modulo register 15 and a holding circuit 16.
The holding circuit 16 is composed of flip-flops 19, 19a, and b, as shown in the two examples in FIGS. These output the output c after counting the coincidence with the modulo value once or twice. Counter 13,
The coincidence circuit 14 and the modulo register 15 are also serial registers 21 and EX-OR, respectively, as shown in FIG.
The circuit 22 and the AND circuit 23, the setting option switch 25, the register 24, and the like.

【0020】モジュロレジスタ15は、オプションスイ
ッチ25により設定された1(ハイ)または0(ロウ)
のバイナリデータを記憶保持するもので、カウンタ13
が計数すべき値(モジュロ値)をレジスタ24に設定し
ている。この回路では、オプションスイッチ25が「0
101B」と設定され、モジュロ値「5」を記憶保持し
ている。
The modulo register 15 is set to 1 (high) or 0 (low) set by the option switch 25.
It stores and holds the binary data of
Sets a value (modulo value) to be counted in the register 24. In this circuit, the option switch 25
101B "is set, and the modulo value" 5 "is stored and held.

【0021】以下、図1および図3のタイミング図を参
照して説明する。電源投入すると、発振回路2およびサ
ンプリングクロック発生回路3において発振動作を開始
する。この時、サンプリングクロック発生回路3におい
て発生するサンプリングクロックbは直ちに発振周期が
安定する。オートリセット回路7の出力eは電源投入
後、直ちにロウにセットされ、電源電圧の立上がりを検
出してハイにリセットされる。また、電源電圧がCPU
動作電圧以下に降下した際には、再び自動的にオートリ
セット信号eをロウにセットする。オートリセット信号
eがロウにセットされている間、CPUクロック供給許
可信号出力cは、リセット(ロウ)のままであり、CP
Uクロック出力dもリセット(ロウ)のままである。
A description will be given below with reference to the timing charts of FIGS. 1 and 3. When the power is turned on, the oscillation circuit 2 and the sampling clock generation circuit 3 start the oscillation operation. At this time, the oscillation cycle of the sampling clock b generated in the sampling clock generation circuit 3 is immediately stabilized. The output e of the auto reset circuit 7 is set to low immediately after the power is turned on, and is reset to high by detecting the rising of the power supply voltage. Also, if the power supply voltage is CPU
When the voltage drops below the operating voltage, the automatic reset signal e is automatically set to low again. While the auto reset signal e is set to low, the CPU clock supply enable signal output c remains reset (low) and CP
The U clock output d also remains reset (low).

【0022】オートリセット信号eがインアクティブハ
イにセットされると、図4のサンプリング回路4におい
て、カウンタ13により発振クロックaのハイレベル期
間カウントを実行し、ロウレベルでカウント値がリセッ
トされる。カウンタ13がサンプリングクロックbをカ
ウントし、モジュロレジスタ15にあらかじめ設定した
モジュロ値カウンタ13のカウント値の一致を一致回路
14で判定し一致信号gを出力する。
When the auto reset signal e is set to inactive high, in the sampling circuit 4 of FIG. 4, the counter 13 counts the high level period of the oscillation clock a and resets the count value at low level. The counter 13 counts the sampling clock b, and the match circuit 14 determines whether the count values of the modulo value counter 13 set in advance in the modulo register 15 match, and outputs a match signal g.

【0023】本実施例では、一致信号gが出力されると
同時に、CPUクロック供給許可信号cを出力せずに、
発振安定状態の検出精度を上げるため、この一致信号g
が2回発生した時点で発振が安定したと判断する構成と
している。一致信号gの出力回数は、保持回路16にお
いてカウントされ、保持回路16内にあらかじめ設定し
た値「2」に達した時、保持回路16はCPUクロック
供給許可信号cを出力する。
In the present embodiment, at the same time when the coincidence signal g is output, the CPU clock supply permission signal c is not output,
In order to improve the detection accuracy of the oscillation stable state, this coincidence signal g
It is determined that the oscillation is stable when the two times occur. The number of times the coincidence signal g is output is counted by the holding circuit 16, and when the value reaches a value “2” preset in the holding circuit 16, the holding circuit 16 outputs the CPU clock supply permission signal c.

【0024】図3のタイミング波形図において、まず発
振出力fは、発振回路の発振器そのものの発振波形を示
し、発振クロック出力aは波形整形用インバータ11の
出力の状態を示し、発振開始から発振成長過程を経過し
発振安定状態に至る時間的変化を示している。サンプリ
ングクロックbは電源立上がりと同時に安定発振を開始
している。図4において、サンプリングクロックbの立
下がりをカウンタ13によりカウントし、モジュロレジ
スタ15に予め設定された値「5」に達した時、一致信
号gを出力している。更に、一致信号gは、保持回路1
6であらかじめ設定された値「2」に達した時、CPU
供給許可信号cを出力している。CPU供給許可信号c
がハイになると同時に、CPUクロック選択回路5にお
いてCPUクロックdが出力許可され、CPU6へ出力
される。CPUクロック供給許可信号cは、サンプリン
グクロック発生回路3にも入力され、そのレベルがハイ
のとき、サンプリングクロックbの発生を停止させ、不
要な消費電流の発生を防止する。
In the timing waveform diagram of FIG. 3, the oscillation output f shows the oscillation waveform of the oscillator itself of the oscillation circuit, the oscillation clock output a shows the output state of the waveform shaping inverter 11, and the oscillation growth from the start of oscillation. It shows the change over time in the course of reaching the stable oscillation state. The sampling clock b starts stable oscillation when the power supply rises. In FIG. 4, the falling edge of the sampling clock b is counted by the counter 13, and when the preset value "5" is reached in the modulo register 15, the coincidence signal g is output. Further, the coincidence signal g is the holding circuit 1
When the preset value “2” in 6 is reached, the CPU
The supply permission signal c is output. CPU supply permission signal c
At the same time that the signal goes high, the CPU clock selection circuit 5 permits the output of the CPU clock d and outputs it to the CPU 6. The CPU clock supply permission signal c is also input to the sampling clock generation circuit 3, and when the level thereof is high, the generation of the sampling clock b is stopped to prevent the generation of unnecessary current consumption.

【0025】図7は本発明の第二の実施例のクロック出
力回路のブロック図である。本実施例は、図1と同様で
あり、異なる点はCPU6より出力されたクロックスト
ップ信号mが発振回路2およびオートリセット回路8に
入力される点である。CPU6の実行するクロックスト
ップ命令によりCPU6から出力されるクロックストッ
プ信号mがアクティブとなり、発振回路2の発振クロッ
クaを停止させると共に、オートリセット回路8にクロ
ックストップ状態を伝える。CPU6への割込み要因の
発生によりクロックストップ命令が解除され、クロック
ストップ信号mがインアクティブとなり、発振回路2が
再起動するとともにオートリセット回路8も再起動し、
サンプリング回路4を初期設定し、以下図1で述べたよ
うに動作する。図1では、電源投入後の単発的な動作を
するが、第二の実施例においては、電源投入後はもちろ
んのこと、クロックストップ命令により発振器を停止し
再起動した時でも発振成長検出が第一の実施例と同様に
行われる。
FIG. 7 is a block diagram of a clock output circuit according to the second embodiment of the present invention. The present embodiment is similar to FIG. 1 except that the clock stop signal m output from the CPU 6 is input to the oscillation circuit 2 and the auto reset circuit 8. The clock stop signal m output from the CPU 6 becomes active in response to the clock stop instruction executed by the CPU 6, stops the oscillation clock a of the oscillation circuit 2, and notifies the auto reset circuit 8 of the clock stop state. The clock stop instruction is canceled by the generation of the interrupt factor to the CPU 6, the clock stop signal m becomes inactive, the oscillation circuit 2 is restarted, and the auto reset circuit 8 is restarted,
The sampling circuit 4 is initialized and operates as described below with reference to FIG. In FIG. 1, although the operation is performed once after the power is turned on, in the second embodiment, the oscillation growth detection is performed not only after the power is turned on, but also when the oscillator is stopped and restarted by the clock stop command. The procedure is the same as in the first embodiment.

【0026】[0026]

【発明の効果】以上説明したように、本発明によればC
PUクロック源として高精度の発振周波数の得られる水
晶発振器等を利用する際に、水晶発振器の発振成長過程
で外来ノイズなどによる不要クロック信号の発生がある
場合でも、発振成長が直ちに完了する発振器の発振出力
を用いたサンプリングクロックで水晶発振器出力のクロ
ック周期をカウント計測し、確実に発振成長の完了をこ
の計測結果で判定した後にCPUへ安定したクロックを
供給するため、電源電圧の立上り時や、CPUがクロッ
ク停止状態からのクロック再起動の際に、CPUの暴走
を防止する効果を有する。また、本発明を半導体集積回
路上で実施することにより、低消費電力化、無調整化、
コンパクト化が図られる。
As described above, according to the present invention, C
When using a crystal oscillator or the like that can obtain a highly accurate oscillation frequency as a PU clock source, even if an unnecessary clock signal is generated due to external noise in the oscillation growth process of the crystal oscillator, the oscillator growth is completed immediately. The clock cycle of the crystal oscillator output is counted and measured by the sampling clock using the oscillation output, and the stable clock is supplied to the CPU after the completion of the oscillation growth is surely determined by this measurement result. This has the effect of preventing runaway of the CPU when the CPU is restarted from the clock stopped state. Further, by implementing the present invention on a semiconductor integrated circuit, low power consumption, no adjustment,
It can be made compact.

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

【図1】本発明の第1の実施例のブロック図である。FIG. 1 is a block diagram of a first embodiment of the present invention.

【図2】図1のサンプリングクロック発生回路3の二例
の回路図である。
FIG. 2 is a circuit diagram of two examples of a sampling clock generation circuit 3 of FIG.

【図3】図1の実施例の各部におけるタイミング波形図
である。
FIG. 3 is a timing waveform chart in each part of the embodiment of FIG.

【図4】図1のサンプリング回路4の一例の回路図であ
る。
4 is a circuit diagram of an example of a sampling circuit 4 in FIG.

【図5】図4の保持回路16の二例の回路図である。5A and 5B are circuit diagrams of two examples of a holding circuit 16 in FIG.

【図6】図4のカウンタ,一致回路およびモジュロレジ
スタ一例の回路図である。
6 is a circuit diagram of an example of a counter, a matching circuit, and a modulo register shown in FIG. 4;

【図7】本発明の第2の実施例のブロック図である。FIG. 7 is a block diagram of a second embodiment of the present invention.

【図8】従来のクロック出力回路のブロック図である。FIG. 8 is a block diagram of a conventional clock output circuit.

【図9】図9の発振回路32の一例の回路図である。9 is a circuit diagram of an example of an oscillator circuit 32 of FIG.

【図10】図9の従来例の各部におけるタイミング波形
図である。
FIG. 10 is a timing waveform chart in each part of the conventional example of FIG.

【図11】図9の従来例で外来ノイズのある時の各部の
タイミング波形図である。
FIG. 11 is a timing waveform chart of each part when there is external noise in the conventional example of FIG.

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

2,32 発振回路 3 サンプリングクロック発生回路 4 サンプリング回路 5 クロック選択回路 6 CPU 7 オートリセット回路 8,18 バッファ 9 水晶発振子 11,12 インバータ 13 カウンタ 14 一致回路 15 モジュロレジスタ 16 保持回路 17 サンプリングクロック制御回路 19,19a,b フリップフロップ 21,24 レジスタ 22 EX−OR回路 23 AND回路 25 オプションスイッチ 33 システムクロック発生回路 34 リセット遅延回路 35 システムリセット発生回路 a 発振クロック b サンプリングクロック c クロック供給許可信号 d CPUクロック e オートリセット信号 f 発振出力 g 一致信号 h クロックストップ信号 i リセット遅延信号 j システムリセット信号 2, 32 Oscillation circuit 3 Sampling clock generation circuit 4 Sampling circuit 5 Clock selection circuit 6 CPU 7 Auto reset circuit 8, 18 Buffer 9 Crystal oscillator 11, 12 Inverter 13 Counter 14 Matching circuit 15 Modulo register 16 Holding circuit 17 Sampling clock control Circuits 19, 19a, b Flip-flops 21, 24 Registers 22 EX-OR circuits 23 AND circuits 25 Option switches 33 System clock generation circuits 34 Reset delay circuits 35 System reset generation circuits a Oscillation clocks b Sampling clocks c Clock supply permission signals d CPU Clock e Auto reset signal f Oscillation output g Match signal h Clock stop signal i Reset delay signal j System reset signal

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 CPUのクロック周波数より高い周波数
の第1のクロックを出力するサンプリングクロック発生
回路と、前記CPUのクロック周波数を第2のクロック
として固定振動子により発振させ出力する発振回路と、
電源電圧の立ち上りを検出してオートリセット信号を出
力するオートリセット回路と、前記オートリセット信号
により初期化された後前記第1のクロックにより前記第
2のクロック周期を計測しこ計数値が予め設定した計数
値に等価な計測値となるとクロック供給許可信号を出力
するサンプリング回路と、前記クロック供給許可信号が
有効な時前記第2のクロックを前記CPUクロックとし
て出力するクロック選択回路とを備えることを特徴とす
るクロック出力回路。
1. A sampling clock generation circuit for outputting a first clock having a frequency higher than the clock frequency of the CPU, and an oscillation circuit for oscillating and outputting the clock frequency of the CPU as a second clock by a fixed oscillator.
An auto-reset circuit that detects the rising of the power supply voltage and outputs an auto-reset signal, and measures the second clock cycle by the first clock after being initialized by the auto-reset signal, and sets a count value in advance. A sampling circuit that outputs a clock supply permission signal when the measured value is equivalent to the counted value, and a clock selection circuit that outputs the second clock as the CPU clock when the clock supply permission signal is valid. Characteristic clock output circuit.
【請求項2】 固体振動子が水晶振動子またはセラミッ
ク振動子からなる請求項1記載のクロック出力回路。
2. The clock output circuit according to claim 1, wherein the solid oscillator is a crystal oscillator or a ceramic oscillator.
【請求項3】 サンプリングクロック発生回路がCR発
振器または複数のインバータを用いたリングオシレータ
からなる請求項1記載のクロック出力回路。
3. The clock output circuit according to claim 1, wherein the sampling clock generation circuit comprises a CR oscillator or a ring oscillator using a plurality of inverters.
【請求項4】 サンプリングクロック発生回路はクロッ
ク供給許可信号が出力された後には第1のクロックの出
力を停止する請求項1記載のクロック出力回路。
4. The clock output circuit according to claim 1, wherein the sampling clock generation circuit stops the output of the first clock after the clock supply permission signal is output.
【請求項5】 サンプリング回路はクロック供給許可信
号が第2のクロック周期を計測した計数値が予め設定し
た計数値の複数倍の計測値となった時に出力される請求
項1記載のクロック出力回路。
5. The clock output circuit according to claim 1, wherein the sampling circuit outputs the clock supply permission signal when the count value obtained by measuring the second clock cycle is a multiple of a preset count value. .
【請求項6】 発振回路はCPUのクロックストップ命
令によりその動作を停止し前記CPUのクロックストッ
プ命令解除によりその動作を再起動し、オートリセット
回路も前記クロックストップ命令解除により再起動する
請求項1記載のクロック出力回路。
6. The oscillation circuit stops its operation in response to a CPU clock stop command, restarts its operation in response to the CPU's clock stop command cancellation, and the auto reset circuit also restarts in response to the clock stop command cancellation. The described clock output circuit.
JP6322672A 1994-12-26 1994-12-26 Clock output circuit Expired - Lifetime JP2716386B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6322672A JP2716386B2 (en) 1994-12-26 1994-12-26 Clock output circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6322672A JP2716386B2 (en) 1994-12-26 1994-12-26 Clock output circuit

Publications (2)

Publication Number Publication Date
JPH08179849A true JPH08179849A (en) 1996-07-12
JP2716386B2 JP2716386B2 (en) 1998-02-18

Family

ID=18146325

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6322672A Expired - Lifetime JP2716386B2 (en) 1994-12-26 1994-12-26 Clock output circuit

Country Status (1)

Country Link
JP (1) JP2716386B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001120735A (en) * 1999-10-27 2001-05-08 Toyomaru Industry Co Ltd Pachinko machine
JP2009151600A (en) * 2007-12-21 2009-07-09 Oki Semiconductor Co Ltd Clock signal generator
JP2010268105A (en) * 2009-05-13 2010-11-25 Renesas Electronics Corp Microcomputer

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001120735A (en) * 1999-10-27 2001-05-08 Toyomaru Industry Co Ltd Pachinko machine
JP2009151600A (en) * 2007-12-21 2009-07-09 Oki Semiconductor Co Ltd Clock signal generator
JP2010268105A (en) * 2009-05-13 2010-11-25 Renesas Electronics Corp Microcomputer
DE102010019630A1 (en) 2009-05-13 2010-12-09 Nec Electronics Corp., Kawasaki microcomputer

Also Published As

Publication number Publication date
JP2716386B2 (en) 1998-02-18

Similar Documents

Publication Publication Date Title
US5623234A (en) Clock system
JPH0685666A (en) Integrated clock-signal generation circuit
KR20030044886A (en) Clock generating circuit and clock generating method
TWI638517B (en) Mitigation of long wake-up delay of a crystal oscillator
JPH08179849A (en) Clock output circuit
JP2001350739A (en) Microcomputer
US6870353B2 (en) Power supply control circuit and LSI using the same
JP2776772B2 (en) Oscillation control circuit
US6496078B1 (en) Activating on-chip oscillator using ring oscillator
JP2852271B2 (en) Microcomputer
JP2921494B2 (en) Oscillation circuit
US6177821B1 (en) Microcomputer with frequency multiplication circuit
JP4122128B2 (en) Edge detection circuit
JP3177139B2 (en) Oscillation restart controller
JP2906757B2 (en) Semiconductor device
JPH0572297A (en) Semiconductor integrated circuit
JPH0535359A (en) Clock oscillator
JPH0713655A (en) Semiconductor integrated circuit
JP3144811B2 (en) Monitoring timer circuit
JPH07152460A (en) Voltage detection reset circuit
JPH0922403A (en) Integrated circuit having reset control function
JPH0756649A (en) Clock generating circuit
JP2006209186A (en) Clock control device and electronic device
JPH01236732A (en) Reset circuit
JPH04105108A (en) Clock generating circuit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19971007