JP3495533B2 - Microcomputer clock switching circuit - Google Patents

Microcomputer clock switching circuit

Info

Publication number
JP3495533B2
JP3495533B2 JP32037096A JP32037096A JP3495533B2 JP 3495533 B2 JP3495533 B2 JP 3495533B2 JP 32037096 A JP32037096 A JP 32037096A JP 32037096 A JP32037096 A JP 32037096A JP 3495533 B2 JP3495533 B2 JP 3495533B2
Authority
JP
Japan
Prior art keywords
circuit
clock
microcomputer
frequency
power supply
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
JP32037096A
Other languages
Japanese (ja)
Other versions
JPH10161768A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP32037096A priority Critical patent/JP3495533B2/en
Publication of JPH10161768A publication Critical patent/JPH10161768A/en
Application granted granted Critical
Publication of JP3495533B2 publication Critical patent/JP3495533B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、バッテリーを使用
する携帯用電子機器に使用して好適なマイクロコンピュ
ータのクロック切換回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a clock switching circuit of a microcomputer suitable for use in a portable electronic device using a battery.

【0002】[0002]

【従来の技術】電子機器は、一般に、マイクロコンピュ
ータを内蔵して各種動作が実現可能となっている。マイ
クロコンピュータを動作させるには、外部から所定周波
数を有する基準クロックを印加し、このクロックを分周
又は逓倍して当該マイクロコンピュータを動作させるの
に適切な周波数を有するシステムクロックを作成すると
いった構成が設けられる。
2. Description of the Related Art Generally, electronic equipment has a built-in microcomputer so that various operations can be realized. To operate the microcomputer, a reference clock having a predetermined frequency is externally applied, and this clock is divided or multiplied to create a system clock having an appropriate frequency for operating the microcomputer. It is provided.

【0003】ところで、マイクロコンピュータ内部に設
けられる逓倍回路は、一例としては、電圧制御発振器、
電圧制御発振器の出力を分周する為に電圧制御発振器の
出力に複数個直列接続されて分周回路を構成するTフリ
ップフロップ、電圧制御発振器の出力及びTフリップフ
ロップの各出力から更に導出されて接続された複数のト
ランスミッションゲート、基準クロックと複数のトラン
スミッションゲートの共通出力とが印加されてその周波
数差に応じた電圧を電圧制御発振器に帰還するコンパレ
ータと、から成っている(図1の一部に示されている構
成)。そして、複数のトランスミッションゲートのうち
何れか1つを選択的にオンしてやることにより所定周波
数の逓倍クロックを電圧制御発振器の出力から得ること
ができるが、複数のトランスミッションゲートをオンオ
フする為のその制御電極は、各トランスミッションゲー
トに対応するマイクロコンピュータの複数の外部端子と
接続されている。つまり、逓倍クロックの周波数を変更
するには、複数の外部端子のハイレベル又はローレベル
の設定を変更することで対応していた。
By the way, the multiplication circuit provided inside the microcomputer is, for example, a voltage controlled oscillator,
In order to divide the output of the voltage controlled oscillator, a plurality of T flip-flops are connected in series to the output of the voltage controlled oscillator to form a frequency dividing circuit, and further derived from the output of the voltage controlled oscillator and each output of the T flip-flop. It is composed of a plurality of transmission gates connected to each other, a comparator to which a reference clock and a common output of the plurality of transmission gates are applied, and which returns a voltage according to the frequency difference to a voltage controlled oscillator (part of FIG. 1). Configuration). Then, by selectively turning on any one of the plurality of transmission gates, a multiplied clock of a predetermined frequency can be obtained from the output of the voltage controlled oscillator. However, the control electrode for turning on and off the plurality of transmission gates. Are connected to a plurality of external terminals of the microcomputer corresponding to each transmission gate. That is, in order to change the frequency of the multiplied clock, it is necessary to change the high level or low level setting of the plurality of external terminals.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、マイク
ロコンピュータの外部端子のレベル変更を行う為には、
各外部端子毎に、各外部端子をハイレベル又はローレベ
ルと切り換え接続させる為のスイッチ回路を設けなけれ
ばならず、外付部品が多くなると共にこれに伴いコスト
高及び装置の大型化を避けられない問題があった。
However, in order to change the level of the external terminal of the microcomputer,
For each external terminal, it is necessary to provide a switch circuit for switching and connecting each external terminal to high level or low level, which increases the number of external parts and avoids high cost and size increase of the device. There was no problem.

【0005】更に、上記構成から得られる逓倍クロック
の周波数をトランスミッションゲートの選択によって変
更すると、このトランスミッションゲートのオンオフ変
更時点から所定期間(数msec程度)経過するまで
は、逓倍クロックの状態が不安定となってしまう。従っ
て、マイクロコンピュータの動作中に逓倍クロックの周
波数を変更してしまうと、不安定な逓倍クロックによっ
てマイクロコンピュータが誤動作してしまう恐れがある
為、マイクロコンピュータの正常動作を保持する為にも
当該マイクロコンピュータの動作中には逓倍クロックの
周波数変更は禁止されていた。つまり、マイクロコンピ
ュータ内部で使用される逓倍クロックの周波数変更を行
う場合には、マイクロコンピュータの動作を一旦停止
し、外部端子のハイレベル又はローレベルへの接続変更
を行い、その後マイクロコンピュータをリセット状態と
してから新たな逓倍クロックでの動作に移行しなければ
ならなかった。その結果、マイクロコンピュータの動作
中における逓倍クロックの周波数変更ができない為、或
る動作モードにおいてはクロック周波数が低くてよい場
合であっても、高い周波数のままであるので無駄な消費
電流が生じてしまう問題があった。また、マイクロコン
ピュータのリセットから逓倍クロックの状態が安定する
までの間は、逓倍クロックを使用できない為、逓倍クロ
ックの使用をこの期間は禁止しなければならず、マイク
ロコンピュータのイニシャライズ以降の動作が遅れてし
まう問題もあった。
Further, if the frequency of the multiplied clock obtained from the above configuration is changed by selection of the transmission gate, the state of the multiplied clock is unstable until a predetermined period (several msec) elapses from the time when the transmission gate is turned on / off. Will be. Therefore, if the frequency of the multiplied clock is changed during operation of the microcomputer, the unstable multiplied clock may cause the microcomputer to malfunction. Therefore, in order to maintain the normal operation of the microcomputer, It was prohibited to change the frequency of the multiplied clock during the operation of the computer. In other words, when changing the frequency of the multiplication clock used inside the microcomputer, temporarily stop the operation of the microcomputer, change the connection of the external terminal to high level or low level, and then reset the microcomputer. Then, it was necessary to shift to the operation with a new multiplied clock. As a result, since the frequency of the multiplied clock cannot be changed during the operation of the microcomputer, even if the clock frequency may be low in a certain operation mode, the high frequency remains as it is, resulting in unnecessary current consumption. There was a problem. In addition, since the multiplied clock cannot be used from the reset of the microcomputer until the state of the multiplied clock becomes stable, the use of the multiplied clock must be prohibited during this period, and the operation after the initialization of the microcomputer is delayed. There was also the problem of being lost.

【0006】さて、一具体例として、携帯用電子機器に
上記マイクロコンピュータを使用した場合、携帯用電子
機器はバッテリー駆動されている為、使用すれば、当然
のことながら電源電圧は低下していくことになる。しか
し、電源電圧の低下に関係なく、マイクロコンピュータ
内部で発生する逓倍クロックの周波数は固定のままであ
る。すると、逓倍クロックの固定周波数に起因して消費
電流を小さくできないことから、電源電圧と消費電流と
の間において、電源電圧の低下に伴う消費電流量は相対
的に大きくなり、これより、バッテリーの寿命が短くな
ってしまう問題があった。
Now, as a specific example, when the above microcomputer is used in a portable electronic device, the portable electronic device is driven by a battery. Therefore, if it is used, the power supply voltage will naturally decrease. It will be. However, the frequency of the multiplication clock generated inside the microcomputer remains fixed regardless of the decrease in the power supply voltage. Then, since the current consumption cannot be reduced due to the fixed frequency of the multiplication clock, the current consumption amount due to the decrease in the power supply voltage becomes relatively large between the power supply voltage and the current consumption. There was a problem that the life was shortened.

【0007】携帯用電子機器の一例としては、電子スチ
ルカメラが挙げられる。この電子スチルカメラは、撮影
画像をバイナリデータに変換してメモリに記憶させる機
能を有している。例えば、この機能を実行する為に固定
された逓倍クロックを使用すると、電源電圧が低下して
も、常に一定の消費電流を使用してしまう為、撮影画像
数が限られてしまう問題があった。具体的には、満充電
のバッテリーを電子スチルカメラに装着したら、理想的
にはメモリに記憶容量を余すことなく撮影画像を記憶さ
せたいところであるが、これが不可能となり、撮影をあ
きらめるか、又は、別のバッテリーを装着し直さなけれ
ばならなかった。
An example of the portable electronic device is an electronic still camera. This electronic still camera has a function of converting a captured image into binary data and storing the binary data in a memory. For example, if a fixed multiplication clock is used to execute this function, a constant current consumption is always used even if the power supply voltage drops, and the number of captured images is limited. . Specifically, when a fully charged battery is attached to an electronic still camera, ideally, I would like to store the captured image in the memory without leaving the memory capacity, but this becomes impossible, or I give up shooting, or , Had to reinstall another battery.

【0008】そこで、本発明は、マイクロコンピュータ
の動作中においてプログラム制御で逓倍クロックの逓倍
数を可変でき、且つ逓倍クロックの周波数を変更したと
してもマイクロコンピュータを正常動作させることので
きる、マイクロコンピュータのクロック切換回路を提供
することを目的とする。
In view of the above, the present invention provides a microcomputer in which the multiplication number of the multiplied clock can be changed by program control during operation of the microcomputer, and the microcomputer can operate normally even if the frequency of the multiplied clock is changed. An object is to provide a clock switching circuit.

【0009】[0009]

【課題を解決するための手段】本発明は、前記問題点を
解決する為に成されたものであり、その特徴とするとこ
ろは、基準クロックに対し、複数の分周クロックを選択
的に発生可能な分周回路と、前記分周回路から選択的に
出力される分周クロックが印加されることにより、該分
周クロックの分周数だけ前記基準クロックを逓倍した逓
倍クロックを発生する逓倍回路と、前記分周回路から何
れか1つの分周クロックのみを選択的に発生させる為に
前記分周回路の分周数を選択する選択回路と、発振状態
の安定した所定周波数の発振クロックを発生する発振回
路と、前記逓倍クロックの状態が安定するまでは前記発
振クロックを選択出力し、前記逓倍クロックの状態が安
定した後は前記逓倍クロックを選択出力する切換制御回
路と、を備え、前記逓倍クロックの状態が安定するまで
は前記発振クロックを基にマイクロコンピュータを動作
させ、前記逓倍クロックの状態が安定した後はこの逓倍
クロックを基に前記マイクロコンピュータを動作させる
様にした点である。特に、前記切換制御回路は、少なく
とも前記マイクロコンピュータがリセットされた時又は
前記マイクロコンピュータの動作中に前記分周回路の分
周数が変更された時に一方の論理値となるフラグ手段
と、同時に計数を開始してその後オーバーフローした時
に前記フラグ手段を他方の論理値とするタイマー手段と
を含み、前記フラグ手段が一方の論理値の時は前記発振
クロックを選択出力し、前記フラグ手段が他方の論理値
の時は前記逓倍クロックを選択出力することを特徴とす
る。また、前記タイマー手段は、少なくとも前記マイク
ロコンピュータがリセットされた時又は前記マイクロコ
ンピュータの動作中に前記分周回路の分周数が変更され
た時から前記逓倍クロックの状態が安定するまでの期間
を経過した後に、オーバーフローすることを特徴とす
る。
The present invention has been made to solve the above problems, and is characterized in that a plurality of divided clocks are selectively generated with respect to a reference clock. A frequency dividing circuit capable of generating a frequency-divided clock that is obtained by multiplying the reference clock by the frequency division number of the frequency-divided clock by applying a frequency-divided clock that is selectively output from the frequency-divided circuit. A selection circuit for selecting the frequency division number of the frequency division circuit to selectively generate only one frequency division clock from the frequency division circuit; and an oscillation clock of a predetermined frequency with a stable oscillation state. A switching control circuit that selectively outputs the oscillation clock until the state of the multiplied clock stabilizes, and selectively outputs the multiplied clock after the state of the multiplied clock stabilizes, To the state of the multiplied clock is stabilized activates the microcomputer on the basis of the oscillation clock, after the state of the multiplied clock is stabilized in that was set to operate the microcomputer based on the multiplied clock. In particular, the switching control circuit counts at the same time with flag means that becomes one logical value at least when the microcomputer is reset or when the frequency dividing number of the frequency dividing circuit is changed during the operation of the microcomputer. And timer means for setting the flag means to the other logical value when it overflows, and when the flag means has one logical value, the oscillation clock is selectively output, and the flag means has the other logical value. When the value is a value, the multiplied clock is selectively output. Further, the timer means has at least a period from when the microcomputer is reset or when the frequency division number of the frequency divider is changed during the operation of the microcomputer until the state of the multiplied clock becomes stable. It is characterized by overflow after the elapse.

【0010】更に、基準クロックに対し、複数の分周ク
ロックを選択的に発生可能な分周回路と、前記分周回路
から選択的に出力される分周クロックが印加されること
により、該分周クロックの分周数だけ前記基準クロック
を逓倍した逓倍クロックを発生する逓倍回路と、複数の
アドレスに前記分周回路の分周数を選択するための複数
の選択データが記憶されたメモリと、前記複数の選択デ
ータの何れか1つを選択出力し、この選択データによっ
て前記分周回路の分周数を変更させる選択回路と、を備
え、マイクロコンピュータの動作中においてプログラム
制御によって前記分周回路の分周数を変更可能としたこ
とも特徴とする。
Further, by applying a frequency dividing circuit capable of selectively generating a plurality of frequency dividing clocks and a frequency dividing clock selectively output from the frequency dividing circuit to the reference clock, A multiplication circuit that generates a multiplication clock that is obtained by multiplying the reference clock by the division number of the division clock; and a memory that stores a plurality of selection data for selecting the division number of the division circuit at a plurality of addresses, A selection circuit for selectively outputting any one of the plurality of selection data and changing the frequency division number of the frequency division circuit according to the selection data; and the frequency division circuit under program control during operation of the microcomputer. It is also characterized in that the frequency division number of can be changed.

【0011】[0011]

【発明の実施の形態】本発明の詳細を図面に従って具体
的に説明する。図1は、本発明のマイクロコンピュータ
のクロック切換回路を示す回路ブロック図であり、マイ
クロコンピュータ内部に設けられているものとする。
尚、このマイクロコンピュータは、バッテリー駆動され
る携帯用電子機器に内蔵され、バッテリーから電源電圧
VDD(例えば5ボルト)が供給されて動作するものと
する。
BEST MODE FOR CARRYING OUT THE INVENTION The details of the present invention will be specifically described with reference to the drawings. FIG. 1 is a circuit block diagram showing a clock switching circuit of a microcomputer of the present invention, which is provided inside the microcomputer.
The microcomputer is incorporated in a battery-powered portable electronic device, and operates by being supplied with a power supply voltage VDD (for example, 5 V) from the battery.

【0012】図1において、(1)はAD変換回路であ
り、所定時間間隔毎のサンプリングを行い、電源電圧V
DDのアナログ値を所定ビット数のデジタル値に変換す
るものである。尚、AD変換回路(1)は、逐次比較
型、一括比較型の何れでもよく、また、ビット分解能も
用途に応じて適当に選択すればよい。(2)はレジスタ
であり、AD変換回路(1)によりAD変換されたデジ
タル値がセットされるものである。(3)はRAMであ
り、RAM(3)の特定アドレスADXには、電源電圧
VDDが所定電圧VX(例えば3ボルト)まで下降して
しまった時の当該電圧VXに対応するバイナリデータが
基準データとして書き込まれている。(4)は比較回路
であり、レジスタ(2)のセット値とRAM(3)のア
ドレスADXに書き込まれた基準データとが比較され
る。比較回路(4)は、レジスタ(2)の値が基準デー
タより大きい時(電源電圧VDDが電圧VXより大の
時)にはローレベルを出力し、逆に、レジスタ(2)の
値が基準データと一致した時(電源電圧VDDが電圧V
Xまで下降した時)にはハイレベルを出力するものとす
る。RAM(3)の別の特定アドレスADY、ADZに
は、各々、電源電圧VDDがVX以上の時に対応するテ
ーブルデータYと、電源電圧VDDがVX以下となった
時に対応するテーブルデータZとが書き込まれている。
比較回路(4)の比較動作は、マイクロコンピュータの
プログラム制御で行われる。
In FIG. 1, (1) is an AD conversion circuit, which performs sampling at predetermined time intervals and supplies a power supply voltage V
The analog value of DD is converted into a digital value having a predetermined number of bits. The AD conversion circuit (1) may be either a successive approximation type or a batch comparison type, and the bit resolution may be appropriately selected according to the application. Reference numeral (2) is a register in which the digital value AD-converted by the AD conversion circuit (1) is set. (3) is a RAM, and binary data corresponding to the voltage VX when the power supply voltage VDD has dropped to a predetermined voltage VX (for example, 3 volts) is the reference data at the specific address ADX of the RAM (3). Is written as. (4) is a comparison circuit, which compares the set value of the register (2) with the reference data written in the address ADX of the RAM (3). The comparison circuit (4) outputs a low level when the value of the register (2) is larger than the reference data (when the power supply voltage VDD is higher than the voltage VX), and conversely, the value of the register (2) is the reference. When it matches the data (power supply voltage VDD is voltage V
When it has dropped to X), it outputs a high level. The table data Y corresponding to the power supply voltage VDD of VX or higher and the table data Z corresponding to the power supply voltage VDD of VX or lower are written to the other specific addresses ADY and ADZ of the RAM (3). Has been.
The comparison operation of the comparison circuit (4) is performed by program control of the microcomputer.

【0013】ANDゲート(5)(6)及びORゲート
(7)は切換回路を構成し、ANDゲート(5)(6)
の一方の入力は、各々、RAM(3)の特定アドレスA
DY、ADZの読み出し出力と接続され、ANDゲート
(5)の他方の入力には比較回路(4)の出力が反転印
加されると共にANDゲート(6)の他方の入力には比
較回路(4)の出力が直接印加される。即ち、電源電圧
VDDがVX以上の時は、ORゲート(7)からテーブ
ルデータYが出力され、また、電源電圧VDDがVX以
下に下降した時は、ORゲート(7)からテーブルデー
タZが出力される。ANDゲート(5)(6)及びOR
ゲート(7)はテーブルデータX、Yの各ビット数だけ
設けられ、ANDゲート(5)(6)の一方の入力はテ
ーブルデータの各ビットと接続され、他方の入力は比較
回路(4)の出力が共通に印加される。(8)はレジス
タであり、テーブルデータY又はZの何れか一方がセッ
トされる。
The AND gates (5) and (6) and the OR gate (7) form a switching circuit, and the AND gates (5) and (6).
One input of each is a specific address A of the RAM (3).
The output of the comparison circuit (4) is inversely applied to the other input of the AND gate (5) and the comparison circuit (4) is connected to the other input of the AND gate (6). Output is applied directly. That is, the table data Y is output from the OR gate (7) when the power supply voltage VDD is VX or higher, and the table data Z is output from the OR gate (7) when the power supply voltage VDD drops to VX or lower. To be done. AND gates (5) (6) and OR
The gate (7) is provided for each number of bits of the table data X and Y, one input of the AND gates (5) and (6) is connected to each bit of the table data, and the other input of the AND gates (5) and (6) is connected to the comparison circuit (4). Outputs are commonly applied. (8) is a register in which either one of the table data Y or Z is set.

【0014】(9)は分周回路であり、例えば9個のT
フリップフロップ(10)をカスケード接続することに
より構成される。初段のTフリップフロップ(10)の
入力点及び初段から終段までの9個のTフリップフロッ
プ(10)の出力点、の合計10個の点には、各々トラ
ンスミッションゲート(11)が接続され、当該10個
のトランスミッションゲート(11)を開閉する為の制
御端子はレジスタ(8)の各ビット出力と接続されてい
る。即ち、レジスタ(8)は10ビット構成であり、R
AM(3)の各アドレスの1ワードも10ビットとなっ
ているものとする。尚、電源電圧VDDのデジタル値が
セットされるレジスタ(2)のビット数が10ビット未
満の場合、RAM(3)の特定アドレスADXに書き込
まれる基準データもレジスタ(2)のビット数と同一ビ
ット数であり、この場合、特定アドレスADXにおける
10ビットから基準データのビット数を除くビットは無
視される。
(9) is a frequency divider circuit, for example, nine Ts
It is configured by connecting flip-flops (10) in cascade. A transmission gate (11) is connected to each of a total of 10 points of the input point of the first stage T flip-flop (10) and the output points of the nine T flip-flops (10) from the first stage to the final stage, A control terminal for opening and closing the ten transmission gates (11) is connected to each bit output of the register (8). That is, the register (8) has a 10-bit configuration and R
It is assumed that one word of each address of AM (3) is also 10 bits. When the number of bits of the register (2) in which the digital value of the power supply voltage VDD is set is less than 10 bits, the reference data written in the specific address ADX of the RAM (3) has the same number of bits as the number of bits of the register (2). This is a number, and in this case, bits excluding the number of bits of the reference data from 10 bits in the specific address ADX are ignored.

【0015】コンパレータ(12)及び電圧制御発振器
VCO(13)は逓倍回路を構成する。コンパレータ
(12)の一方の入力及び電圧制御発振器(13)のク
ロック入力には基準クロック(例えば32KHz)が印
加され、コンパレータ(12)の他方の入力には10個
のトランスミッションゲート(11)の何れか1個の出
力が印加される。コンパレータ(12)は基準クロック
と選択されたトランスミッションゲート(11)から出
力される分周クロックとの周波数の差に応じた電圧を出
力し、この電圧は電圧制御発振器(13)の制御入力に
印加され、基準クロックの逓倍制御が行われる。具体的
には、初段のTフリップフロップ(10)の出力に接続
されたトランスミッションゲート(11)がレジスタ
(8)の出力で開き、基準クロックの2分周クロックが
当該トランスミッションゲート(11)を介してコンパ
レータ(12)の他方の入力に印加されると、2倍の周
波数差に対応する電圧がコンパレータ(12)から電圧
制御発振器(13)に印加され、これより、電圧制御発
振器(13)からは基準クロックを2倍周した逓倍クロ
ックを得ることができる。逓倍クロックが2倍周で安定
すれば、初段のTフリップフロップ(10)の出力は基
準クロックと同一周波数となり、電圧制御発振器(1
3)の出力は2倍周を継続することになる。
The comparator (12) and the voltage controlled oscillator VCO (13) form a multiplication circuit. A reference clock (for example, 32 KHz) is applied to one input of the comparator (12) and the clock input of the voltage controlled oscillator (13), and one of the ten transmission gates (11) is applied to the other input of the comparator (12). Only one output is applied. The comparator (12) outputs a voltage according to the frequency difference between the reference clock and the divided clock output from the selected transmission gate (11), and this voltage is applied to the control input of the voltage controlled oscillator (13). Then, the multiplication control of the reference clock is performed. Specifically, the transmission gate (11) connected to the output of the first stage T flip-flop (10) is opened by the output of the register (8), and the reference clock divided by 2 is transmitted through the transmission gate (11). When applied to the other input of the comparator (12), a voltage corresponding to the doubled frequency difference is applied from the comparator (12) to the voltage controlled oscillator (13). Can obtain a multiplied clock obtained by doubling the reference clock. If the multiplied clock stabilizes at the double frequency, the output of the first stage T flip-flop (10) has the same frequency as the reference clock, and the voltage controlled oscillator (1
The output of 3) will continue to double the frequency.

【0016】(14)は内部クロック発生回路であり、
電圧制御発振器(13)から出力された逓倍クロックが
後述する切換回路を介して印加され、この逓倍クロック
を基に、マイクロコンピュータを動作させる為のシステ
ムクロックCP1、・・・CPnを出力するものであ
る。(15)はRC発振回路であり、例えば1MHzの
発振クロックを発生するものである。RC発振回路(1
5)から出力される発振クロックは、RC発振回路(1
5)の特性上、その発振状態が瞬時に安定する。(1
6)は上記した切換回路であり、電圧制御発振器(1
3)の逓倍クロック出力とRC発振回路(15)の発振
クロック出力とを選択的に切り換えて出力するものであ
る。(17)はフラグであり、マイクロコンピュータの
リセット時に発生するリセット信号RSTにより論理値
「0」となる。また、フラグ(17)は、マイクロコン
ピュータの動作制御を行う為のプログラムデータが記憶
されたROM(図示せず)から読み出されたプログラム
データの解読結果に基づき、レジスタ(8)のセット内
容が変更された時に発生するクリア信号CLRによって
も論理値「0」となる。フラグ(17)の値が論理値
「0」の時は、切換回路(16)はこのフラグ(17)
の出力が印加されてRC発振回路(15)の発振クロッ
クを選択出力する。(18)はタイマー回路であり、フ
ラグ(17)が論理値「0」にセットされた後、前記R
OMのプログラムデータの解読結果に基づき、計数を開
始し、オーバーフローした時に発生するオーバーフロー
信号OFによりフラグ(17)を論理値「1」とするも
のである。フラグ(17)が論理値「1」となると、切
換回路(16)はこのフラグ(17)の出力が印加され
て電圧制御発振器(13)の逓倍クロックを選択出力す
る。尚、タイマー回路(18)が計数を開始してからオ
ーバーフロー信号OFを出力するまでの期間は、トラン
スミッションゲート(11)の切り換えが行われてから
逓倍クロックの状態が安定するのに十分な時間に設定さ
れているものとする。
(14) is an internal clock generation circuit,
The multiplied clock output from the voltage controlled oscillator (13) is applied through a switching circuit described later, and system clocks CP1, ... CPn for operating the microcomputer are output based on the multiplied clock. is there. (15) is an RC oscillating circuit, which generates an oscillating clock of 1 MHz, for example. RC oscillator circuit (1
The oscillation clock output from 5) is the RC oscillation circuit (1
Due to the characteristic of 5), the oscillation state is instantly stabilized. (1
6) is the switching circuit described above, which is a voltage controlled oscillator (1
The output of the multiplied clock of 3) and the oscillation clock output of the RC oscillator circuit (15) are selectively switched and output. Reference numeral (17) is a flag, which becomes a logical value "0" by a reset signal RST generated when the microcomputer is reset. Further, the flag (17) indicates that the set content of the register (8) is based on the decoding result of the program data read from the ROM (not shown) in which the program data for controlling the operation of the microcomputer is stored. The logical value "0" is also obtained by the clear signal CLR generated when changed. When the value of the flag (17) is the logical value "0", the switching circuit (16) outputs the flag (17).
Is applied to selectively output the oscillation clock of the RC oscillator circuit (15). Reference numeral (18) is a timer circuit, and after the flag (17) is set to the logical value "0", the R
Based on the decoding result of the program data of the OM, counting is started, and the flag (17) is set to the logical value "1" by the overflow signal OF generated when the overflow occurs. When the flag (17) becomes the logical value "1", the switching circuit (16) is applied with the output of the flag (17) and selectively outputs the multiplied clock of the voltage controlled oscillator (13). The period from the start of counting by the timer circuit (18) to the output of the overflow signal OF is a time sufficient for the state of the multiplied clock to stabilize after the transmission gate (11) is switched. It is assumed to be set.

【0017】本発明の実施の形態は、以上の如く構成さ
れており、例えば、電源電圧VDDがVX以上の時は、
終段のTフリップフロップ(10)の出力である102
4分周クロックがコンパレータ(12)に印加される様
に、テーブルデータYを「0000000001」と設
定し、また、電源電圧VDDがVX以下となった時は、
8段目のTフリップフロップ(10)の出力である25
6分周クロックがコンパレータ(12)に印加される様
に、テーブルデータZを「0000000100」と設
定しておく。こうすることにより、電源電圧VDDがV
X以上の時は、約33MHzの逓倍クロックを得ること
ができ、また、電源電圧VDDがバッテリー使用により
低下してVX以下となった時は、逓倍クロックを約8M
Hzに切り換えて周波数を低下させることができる。こ
れより、電源電圧がVX以下となった時のバッテリーの
消費電流を低減することができ、結果的にバッテリーの
寿命を長くすることができる。
The embodiment of the present invention is configured as described above. For example, when the power supply voltage VDD is VX or higher,
The output 102 of the final stage T flip-flop (10)
When the table data Y is set to "0000000001" so that the clock divided by 4 is applied to the comparator (12), and when the power supply voltage VDD becomes VX or less,
25 which is the output of the T flip-flop (10) in the eighth stage
The table data Z is set to "0000000100" so that the clock divided by 6 is applied to the comparator (12). By doing so, the power supply voltage VDD is V
When X or more, a multiplied clock of about 33 MHz can be obtained, and when the power supply voltage VDD drops below VX due to the use of a battery, the multiplied clock is about 8M.
The frequency can be reduced by switching to Hz. As a result, the current consumption of the battery when the power supply voltage becomes VX or less can be reduced, and as a result, the life of the battery can be lengthened.

【0018】また、逓倍クロックの周波数を変更すべ
く、異なるトランスミッションゲート(11)をオンさ
せた場合は、フラグ(17)が論理値「0」となる為、
逓倍クロックの状態が安定するまではRC発振回路(1
5)の発振クロックでマイクロコンピュータが動作する
ことになる。従って、マイクロコンピュータの動作中に
おいて、逓倍クロックの周波数を変更する場合でも当該
逓倍クロックの状態が不安定な期間はRC発振回路(1
5)の発振クロック出力を用いてマイクロコンピュータ
を動作させる為、マイクロコンピュータの誤動作を防止
でき、マイクロコンピュータの動作中における逓倍クロ
ックの周波数変更が可能となる。更に、逓倍クロックの
周波数変更をプログラム制御で行う為、マイクロコンピ
ュータに逓倍クロックの周波数変更の為の外部端子を設
けたり、スイッチ回路等の外部素子を設けたりすること
が不要となり、コスト高を抑えると共に小型の電子機器
への適用範囲が広がることになる。
When different transmission gates (11) are turned on in order to change the frequency of the multiplied clock, the flag (17) becomes the logical value "0".
The RC oscillation circuit (1
The microcomputer operates with the oscillation clock of 5). Therefore, even when the frequency of the multiplied clock is changed during the operation of the microcomputer, the RC oscillation circuit (1
Since the microcomputer is operated by using the oscillation clock output of 5), the malfunction of the microcomputer can be prevented and the frequency of the multiplication clock can be changed during the operation of the microcomputer. Further, since the frequency of the multiplied clock is changed by program control, it is not necessary to provide an external terminal for changing the frequency of the multiplied clock or an external element such as a switch circuit in the microcomputer, which suppresses cost increase. At the same time, the range of application to small electronic devices will be expanded.

【0019】尚、分周回路(9)を9個のTフリップフ
ロップ(10)で構成したが、これは、分周数の選択幅
を広げることが目的であって、必ずしもこの数に限定さ
れるものではなく、これ以上でもこれ以下であってもよ
い。レジスタ(8)のビット数及びテーブルデータY、
Zについても、Tフリップフロップ(10)の数に伴
い、同様のことが言える。但し、デーブルデータY、Z
が10ビットを越える場合は、RAM(3)の各アドレ
スのビット数を増やすか、或いは、RAM(3)とは別
個のレジスタ等を使用すればよい。
Although the frequency dividing circuit (9) is composed of nine T flip-flops (10), this is for the purpose of widening the selection range of the frequency dividing number, and is not necessarily limited to this number. However, it may be more or less than this. Number of bits of register (8) and table data Y,
The same applies to Z, depending on the number of T flip-flops (10). However, table data Y, Z
If the number exceeds 10 bits, the number of bits of each address of the RAM (3) may be increased, or a register or the like separate from the RAM (3) may be used.

【0020】また、本発明の実施の形態では、電源電圧
VDDの低下検出をVXの1値のみを境に行う場合を説
明したが、これに限定されることなく、電源電圧VDD
の低下検出をVX1、VX2、・・・といった2値以上
で検出してもよい。例えば、電源電圧VDDの低下検出
をVX1及びVX2(<VX1)で行う場合、電圧VX
1及びVX2に相当する2つの基準データA、Bを準備
し、また、レジスタ(2)の値と基準データA、Bとを
比較する2つの比較回路を準備し、この2つの比較回路
は、電源電圧VDDの低下状態に応じて何れか一方が動
作する様に設計しておく。更に、3つのテーブルデータ
を準備し、2つの比較回路の出力で何れか1つのテーブ
ルデータを選択できる様に切換回路を構成すればよい。
Further, in the embodiment of the present invention, the case where the decrease of the power supply voltage VDD is detected only when the value of VX is 1 is described, but the present invention is not limited to this.
May be detected by two or more values such as VX1, VX2, .... For example, when the decrease of the power supply voltage VDD is detected by VX1 and VX2 (<VX1), the voltage VX
Two reference data A and B corresponding to 1 and VX2 are prepared, and two comparison circuits for comparing the value of the register (2) with the reference data A and B are prepared. It is designed so that one of them operates depending on the state of decrease in the power supply voltage VDD. Furthermore, it is sufficient to prepare three table data and configure the switching circuit so that any one of the table data can be selected by the output of the two comparison circuits.

【0021】以上の動作は、マイクロコンピュータのR
OMから読み出されたプログラムデータの解読結果に基
づき、ソフトウエアで処理される。
The above operation is performed by the microcomputer R
It is processed by software based on the decoding result of the program data read from the OM.

【0022】[0022]

【発明の効果】本発明によれば、マイクロコンピュータ
の動作中に当該マイクロコンピュータを動作させる為の
逓倍クロックの周波数変更を、マイクロコンピュータを
誤動作させることなくプログラム制御で行うことができ
る。この為、マイクロコンピュータの動作モードによっ
て比較的低い逓倍クロックでよい時は周波数変更を行っ
て逓倍クロックの周波数を低くでき、これより当該マイ
クロコンピュータを携帯用電子機器に内蔵した場合には
消費電流の低減を実現でき、バッテリー寿命を長くする
ことが可能となる。即ち、消費電流の細かい制御が可能
となる。また、逓倍クロックの周波数変更の為に従来必
要であった外部素子が不要となると共にその為の外部端
子をマイクロコンピュータに設ける必要もなく、これよ
りマイクロコンピュータの小型化を実現できると共にコ
スト高となるのを抑えることが可能となる。更に、マイ
クロコンピュータのリセット後の動作も従来に比べて速
やかに行われることになる。
According to the present invention, it is possible to change the frequency of the multiplication clock for operating the microcomputer during the operation of the microcomputer by program control without causing the microcomputer to malfunction. Therefore, the frequency of the multiplied clock can be lowered by changing the frequency when a relatively low multiplied clock is required depending on the operation mode of the microcomputer, and when the microcomputer is built in a portable electronic device, the consumption current is reduced. Reduction can be realized and battery life can be extended. That is, it is possible to finely control the consumption current. Further, an external element, which has been conventionally required for changing the frequency of the multiplication clock, is unnecessary, and it is not necessary to provide an external terminal for that purpose in the microcomputer, which enables miniaturization of the microcomputer and high cost. It becomes possible to suppress that. Further, the operation after the reset of the microcomputer can be performed more quickly than in the conventional case.

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

【図1】本発明のマイクロコンピュータのクロック切換
回路を示す回路ブロック図である。
FIG. 1 is a circuit block diagram showing a clock switching circuit of a microcomputer of the present invention.

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

(3) RAM (9) 分周回路 (11) トランスミッションゲート (12) コンパレータ (13) 電圧制御発振器 (15) RC発振回路 (16) 切換回路 (17) フラグ (18) タイマー回路 (3) RAM (9) Frequency divider (11) Transmission gate (12) Comparator (13) Voltage controlled oscillator (15) RC oscillator circuit (16) Switching circuit (17) Flag (18) Timer circuit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平1−255021(JP,A) 特開 平3−130812(JP,A) 特開 平4−96810(JP,A) 特開 平5−66866(JP,A) 特開 平5−282067(JP,A) 特開 平5−307422(JP,A) 特開 平6−35562(JP,A) 特開 平6−242852(JP,A) 特開 平7−23441(JP,A) 特開 昭61−269718(JP,A) 特開 平7−123001(JP,A) 特開 平8−30351(JP,A) 特開 平5−35359(JP,A) 特開 平8−286780(JP,A) 特開 平7−5948(JP,A) 実開 平3−74019(JP,U) (58)調査した分野(Int.Cl.7,DB名) G06F 1/04 301 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A 1-255021 (JP, A) JP-A 3-130812 (JP, A) JP-A 4-96810 (JP, A) JP-A 5- 66866 (JP, A) JP 5-282067 (JP, A) JP 5-307422 (JP, A) JP 6-35562 (JP, A) JP 6-242852 (JP, A) JP 7-23441 (JP, A) JP 61-269718 (JP, A) JP 7-123001 (JP, A) JP 8-30351 (JP, A) JP 5-35359 (JP, A) JP-A-8-286780 (JP, A) JP-A-7-5948 (JP, A) Actual development 3-74019 (JP, U) (58) Fields investigated (Int.Cl. 7) , DB name) G06F 1/04 301

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 基準クロックを分周し、複数の分周クロ
ックを選択的に発生する分周回路と、 該分周回路から選択的に出力される分周クロックが印加
されることにより、該分周クロックを逓倍した逓倍クロ
ックを発生する逓倍回路と、 基準電源回路の基準電圧と電源電圧とのレベル比較を行
う比較回路と、 該比較回路の出力信号に応じて、前記分周回路から1つ
の分周クロックを選択する選択回路と、複数のアドレスに前記分周回路の分周クロックを選択す
るための複数の選択データが記憶されたメモリとを備
え、 前記複数の選択データの何れか1つを前記比較回路の出
力に応じて選択出力し、前記選択データによって、前記
分周回路から1つの分周クロックを選択させることを特
徴とするマイクロコンピュータのクロック切換回路。
1. A dividing circuit for dividing a reference clock to selectively generate a plurality of divided clocks, and a dividing clock selectively output from the dividing circuit, A multiplication circuit that generates a multiplication clock that is a multiplication of a divided clock, a comparison circuit that compares the levels of the reference voltage of the reference power supply circuit and the power supply voltage, and one of the frequency division circuits A selection circuit for selecting one divided clock and a selected clock for the divided circuit for a plurality of addresses
Memory for storing multiple selection data for
For example, output of the comparison circuit any one of the plurality of selection data
Selective output according to the force,
It is special to select one divided clock from the divider circuit.
A clock switching circuit for a microcomputer.
【請求項2】 A/D変換器を備え、前記比較回路において、前記A/D変換器により、 電源
電圧をデジタル変換し、デジタル変換された前記電源電
圧値と基準のデジタル値との比較を行い、結果に応じ
て、前記分周回路の分周クロックを選択し、前記逓倍回
路からの周波数を変更可能としたことを特徴とする請求
項1記載のマイクロコンピュータのクロック切換回路。
2. An A / D converter is provided, and in the comparison circuit, the power supply voltage is digitally converted by the A / D converter, and the digitally converted power supply voltage value is compared with a reference digital value. 2. The clock switching circuit of the microcomputer according to claim 1, wherein the frequency dividing clock of the frequency dividing circuit is selected according to the result and the frequency from the frequency multiplying circuit can be changed.
【請求項3】 書き換え可能な保持回路を備え、 該保持回路の保持値は、マイクロコンピュータのプログ
ラム制御によって、変更可能としたことを特徴とする請
求項1記載のマイクロコンピュータのクロック切換回
路。
3. A clock switching circuit for a microcomputer according to claim 1, further comprising a rewritable holding circuit, wherein a holding value of the holding circuit can be changed by program control of the microcomputer.
JP32037096A 1996-11-29 1996-11-29 Microcomputer clock switching circuit Expired - Fee Related JP3495533B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32037096A JP3495533B2 (en) 1996-11-29 1996-11-29 Microcomputer clock switching circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32037096A JP3495533B2 (en) 1996-11-29 1996-11-29 Microcomputer clock switching circuit

Publications (2)

Publication Number Publication Date
JPH10161768A JPH10161768A (en) 1998-06-19
JP3495533B2 true JP3495533B2 (en) 2004-02-09

Family

ID=18120725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32037096A Expired - Fee Related JP3495533B2 (en) 1996-11-29 1996-11-29 Microcomputer clock switching circuit

Country Status (1)

Country Link
JP (1) JP3495533B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445269B (en) * 2020-11-02 2024-04-09 鹏城实验室 Clock switching method, complex programmable logic device and FPGA board card

Also Published As

Publication number Publication date
JPH10161768A (en) 1998-06-19

Similar Documents

Publication Publication Date Title
JP4226872B2 (en) Charge pump circuit and voltage signal generation method
JP3443896B2 (en) Digitally controlled oscillator
JP3258923B2 (en) Semiconductor integrated circuit device
US6763471B1 (en) Single chip microcomputer with reduced channel leakage current during a stable low speed operation state
US5606293A (en) Clock generator for microcomputer having reduced start-up time
KR100286155B1 (en) Oscillator circuit integrated in integrated circuit
KR19980082198A (en) Semiconductor device and its power-on reset circuit
JP2003023343A (en) Delay signal generating circuit
JP3495533B2 (en) Microcomputer clock switching circuit
US6107846A (en) Frequency multiplication circuit
US6970026B2 (en) Power-on reset circuit and method for low-voltage chips
JP4390036B2 (en) Power circuit
JP2002372959A (en) Voltage generation circuit, display device driving circuit, voltage multiplier, display device, electronic device provided in the display device and starting method for voltage generation circuit
US6229369B1 (en) Clock control circuit
US6631467B1 (en) Microcomputer timing control circuit provided with internal reset signal generator triggered by external reset signal
JPH10229327A (en) Frequency adjustment device for oscillation circuit
JPH1041793A (en) Multiplication switch circuit
US6486717B2 (en) Divider with cycle time correction
US9680453B1 (en) Oscillator circuit
JP2006260190A (en) Marginless determination circuit
JP3260169B2 (en) Pulse swallow type variable frequency divider
JPH08204566A (en) A/d converter
JP2002217689A (en) Frequency variable rc oscillator and microcomputer
JP3469827B2 (en) PLL circuit
JPS6069895A (en) Semiconductor integrated circuit

Legal Events

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