JP3879523B2 - Microcomputer - Google Patents
Microcomputer Download PDFInfo
- Publication number
- JP3879523B2 JP3879523B2 JP2002024057A JP2002024057A JP3879523B2 JP 3879523 B2 JP3879523 B2 JP 3879523B2 JP 2002024057 A JP2002024057 A JP 2002024057A JP 2002024057 A JP2002024057 A JP 2002024057A JP 3879523 B2 JP3879523 B2 JP 3879523B2
- Authority
- JP
- Japan
- Prior art keywords
- cpu
- output
- microcomputer
- pulse signal
- main clock
- 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 - Lifetime
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Microcomputers (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、マイクロコンピュータに関し、特にマイクロコンピュータでの消費電力を低減するための技術に関する。
【0002】
【従来の技術】
一般に、電子制御装置に搭載されるマイクロコンピュータ(以下、マイコンという)においては、周辺回路に供給するクロック信号や制御対象をオン/オフ制御するための制御信号等として、任意の周期及びデューティ比のパルス信号を繰り返し出力するようにプログラムが設定されることが多々ある。
【0003】
そして、例えば車両に搭載される電子制御装置では、バッテリへの充電が行われないエンジン停止時に、マイコンが上記のパルス信号を繰り返し出力しなければならない場合がある。
このため、マイコンにおいては、より少ない消費電力(消費電流)で任意の周期及びデューティ比のパルス信号を出力可能にしたいという要望がある。
【0004】
そこで、本発明者は、本発明に至る前に下記の[従来例1]〜[従来例3]の構成及び方法を考えた。
[従来例1]
まず、図5(A)に示す従来例1のマイコン101は、プログラムに従い動作するCPU(即ち、命令解読部や演算部等からなる中央演算装置)103及びI/Oポート105に加えて、CPU103を間欠的に動作させるための制御を行う間欠動作制御部107を備えている。
【0005】
そして、このマイコン101においては、CPU103が、所定の動作停止命令を実行して、自分の動作(即ち、マイコンの本来の動作であるプログラム実行動作)を停止する共に、間欠動作制御部107へ動作要求を出すと、間欠動作制御部107が、事前にCPU103によってセットされているタイマ時間の計時を開始して、そのタイマ時間が経過すると、CPU103を停止状態から動作状態へと起床させる。
【0006】
よって、このマイコン101では、CPU103が、動作しなくても良い状態になったと判断すると、上記動作停止命令を実行して、自分の動作を停止すると共に間欠動作制御部107へ動作要求を出力する、といった具合にプログラムを設定すれば、CPU103は、図5(B)の上段に示すように、動作を停止してから間欠動作制御部107で計時されるタイマ時間(図5(B)における「間欠動作の間隔」)が経過すると動作を再開し、動作しなくても良い状態であると判断すると再び動作を停止する、といった具合に、動作と非動作(動作停止)とを繰り返す間欠動作を行うこととなる。
【0007】
そこで、このマイコン101において、出力端子(出力ポート)Pから、ある周期及びデューティ比のパルス信号を低消費電力で繰り返し出力する際には、図5(B)に示すように、上記の間欠動作機能を利用して、CPU103を間欠動作させると共に、CPU103が、動作を再開する毎に出力端子Pの出力レベルを反転させるようにすれば良い。
【0008】
つまり、図5(B)に示すように、CPU103が間欠動作している場合の該CPU103の一時動作時間をTaとし、上記タイマ時間によって決まるCPU103の非動作時間(図5(B)における「間欠動作の間隔」)をTbとすると、出力端子Pの出力レベルは「Ta+Tb」毎に反転することとなるため、TbをソフトウェアによってTb1とTb2とに交互に変えることにより、周期Tが「2×Ta+Tb1+Tb2」で、デューティ比Dが「100×(Ta+Tb1)/T」パーセントのパルス信号が出力端子Pから出力されることとなる。
【0009】
尚、図5(B)は、出力端子Pからのパルス信号の出力開始レベル(最初の出力レベル)がハイレベル(Hi)であると共に、出力端子Pの出力レベルが「Ta+Tb1」の期間にハイレベルとなる場合を例示している。
そして、この従来例1のマイコン101によれば、マイコンの構成要素の中でも特に消費電力が大きいCPU103を、常時動作させるのではなく、間欠的に動作させることとなるため、その分、マイコンでの消費電力を小さく抑えることができ、延いては、当該マイコン101が搭載される電子制御装置での消費電力を抑えることができる。尚、このマイコン101において、CPU103が継続して動作する場合には、CPU103がプログラムに従って出力端子Pの出力レベルを制御する。
【0010】
[従来例2]
次に、図6(A)は、従来例2のマイコン201を表す構成図である。尚、図6(A)において、図5(A)のマイコン101と同じものについては、同一の符号を付しているため、詳細な説明は省略する。
【0011】
図6(A)に示すように、従来例2のマイコン201は、従来例1のマイコン101に対して、CPU103の動作停止中に出力端子Pの出力レベルを反転させるための出力変更機能部203を追加して備えている。
そして、この出力変更機能部203は、CPU103からの計時開始指令を受けると、該CPU103によって事前にセットされている待ち時間の計時を開始して、その待ち時間が経過した時に出力端子Pの出力レベルを反転させる。
【0012】
そこで、このマイコン201において、出力端子Pから、ある周期及びデューティ比のパルス信号を低消費電力で繰り返し出力する際には、図6(B)に示すように、前述の間欠動作機能を利用して、CPU103を間欠動作させると共に、CPU103が、動作を再開する毎に、出力端子Pの出力レベルを一方のレベル(この例ではハイレベル)にし、更に動作を停止する直前毎に、出力変更機能部203へ、当該CPU103の動作停止中に出力端子Pの出力レベルを反転させるための待ち時間Twのセットと計時開始指令とを行うようにすれば良い。
【0013】
つまり、このようにすれば、図6(B)に示すように、CPU103が間欠動作している場合の該CPU103の一時動作時間をTaとし、CPU103の非動作時間(図6(B)における「間欠動作の間隔」)をTbとすると、周期Tが「Ta+Tb」で、デューティ比Dが「100×(Ta+Tw)/T」パーセントのパルス信号が出力端子Pから出力されることとなる。尚、出力変更機能部203への計時開始指令は、CPU103が動作を再開する時毎に行っても良く、この場合には、出力変更機能部203に計時させる待ち時間を、図6(B)におけるTwよりもTaだけ長い時間に設定すれば良い。
【0014】
そして、このマイコン201によっても、CPU103を間欠的に動作させることとなるため、消費電力を小さく抑えることができる。尚、このマイコン201においても、CPU103が継続して動作する場合には、CPU103がプログラムに従って出力端子Pの出力レベルを制御する。
【0015】
[従来例3]
次に、図7(A)は、従来例3のマイコン301を表す構成図である。尚、図7(A)において、図5(A)のマイコン101と同じものについては、同一の符号を付しているため、詳細な説明は省略する。
【0016】
図7(A)に示すように、従来例3のマイコン301は、従来例1のマイコン101と比較すると、間欠動作制御部107に代えて、周波数制御部303を備えている。そして、周波数制御部303は、CPU103により指示された周波数のクロックを生成して、そのクロックをCPU103の動作クロックとして出力する。つまり、このマイコン301は、CPU103の動作速度を変えることができるものである。
【0017】
そして、このマイコン301において、出力端子Pから、ある周期及びデューティ比のパルス信号を低消費電力で繰り返し出力する際には、図7(B)に示すように、CPU103が、周波数制御部303から出力される動作クロックの周波数を通常動作時の周波数(例えば数十MHz)よりも低い周波数(例えば数MHz)に設定して、低速で動作することにより消費電力低減状態となり、その状態で出力端子Pの出力レベルを制御すれば良い。
【0018】
【発明が解決しようとする課題】
しかしながら、まず、上記従来例3のマイコン301では、CPU103が常時動作することとなるため、大幅な消費電力の低減は困難である。
また、上記従来例1,2のマイコン101,201では、CPU103の動作が停止する時間を設けることができるため、従来例3のマイコン301よりも有利であるが、出力端子Pから出力するパルス信号の1周期中にCPU103を少なくとも1回は起床させる必要があるため、消費電力を一層低減するのには限度がある。
【0019】
尚、従来例1のマイコン101では、パルス信号の1周期当たりにCPU103を2回起床させる必要があるのに対して、従来例2のマイコン201によれば、パルス信号の1周期当たりにCPU103を1回起床させるだけで良いため、有利である。しかし、その従来例2のマイコン201でも、パルス信号の1周期毎にCPU103を1回起床させる必要があるため、パルス信号の周期が短い場合には、効果が薄れてくる。
【0020】
本発明は、こうした問題に鑑みなされたものであり、任意の周期及びデューティ比のパルス信号を、より少ない消費電力で出力可能なマイコンを提供することを目的としている。
【0021】
【課題を解決するための手段及び発明の効果】
上記目的を達成するためになされた請求項1に記載のマイコン(マイクロコンピュータ)は、プログラムに従い動作するCPUと、CPUを動作させるためのメインクロック(即ち、CPUの動作クロック)を生成するメインクロック生成手段とを備えている。そして、このマイコンでは、CPUが動作状態と停止状態とを遷移させることができるようになっている。また、CPUの動作停止中にはメインクロック生成手段の動作も停止する。
【0022】
そして更に、このマイコンは、CPUが動作を停止している際に任意の信号を出力できるようにするための手段として、メインクロック生成手段とは別に設けられ、上記メインクロックよりも周波数が低いサブクロックを常時生成するサブクロック生成手段と、そのサブクロックを受けて動作する任意信号出力手段とを備えている。そして、その任意信号出力手段は、CPUからの出力開始指令を受けると、該CPUからの出力停止指令を受けるまでの間、CPUにより設定された周期及びデューティ比のパルス信号を、CPUが動作を停止していても、当該マイコンの特定の出力端子から出力する。
【0023】
よって、このマイコンによれば、CPUの動作を停止させた状態で、任意の周期及びデューティ比のパルス信号を当該マイコンの出力端子から繰り返し出力することができ、延いては、任意の周期及びデューティ比のパルス信号を、より少ない消費電力で出力することができるようになる。つまり、CPUが、自らの動作を停止する前に、上記特定の出力端子から出力したいパルス信号の周期及びデューティ比を任意信号出力手段に設定しておくと共に、該任意信号出力手段に出力開始指令を出力すれば、その後は、当該CPUが動作を停止していても、低速のサブクロックで動作する任意信号出力手段により、CPUによって設定された周期及びデューティ比のパルス信号が上記特定の出力端子から繰り返し出力されるからである。
【0024】
また、このマイコンによれば、CPUが動作している場合でも、任意信号出力手段により所望の周期及びデューティ比のパルス信号を上記特定の出力端子から出力させることができるため、CPUの動作時における処理負荷を低減することもできる。つまり、ソフトウェアによるパルス信号の出力制御が不要となるからである。
【0025】
更に、請求項1に記載のマイコンは、上記低速のサブクロックを受けて動作すると共に、CPUを間欠的に動作させるための制御を行う間欠動作制御手段を備えている。
そして、このマイコンでは、「CPUが、動作を停止する際に間欠動作制御手段へ動作要求を出力し、間欠動作制御手段が、CPUからの動作要求を受けると、メインクロック生成手段の動作を停止させると共に、事前に設定されている設定時間の計時を開始し、その設定時間の経過後に、メインクロック生成手段の動作を再開させ、CPUを停止状態から動作状態へと起床させるためのRUN信号を出力して該CPUを起床させる」という動作が行われることにより、図3の上段に示すようなCPUの間欠動作が実施される。更に、RUN信号は、間欠動作制御手段が次にメインクロック生成手段の動作を停止させるまで継続して出力されるようになっている。尚、図3において「間欠動作の間隔(間欠時間)」と記している期間は、CPUが停止状態となっている期間であり、当該マイコンの実質的な動作であるプログラムの実行動作が停止されている期間である。
【0026】
このような請求項1のマイコンによれば、CPUの動作停止中には、該CPUの動作クロックである高周波数のメインクロックを生成するメインクロック生成手段の動作も停止することとなるため、任意の周期及びデューティ比のパルス信号を、より一層少ない消費電力で出力することができる。
【0027】
ところで、請求項1のマイコンにおいて、間欠動作制御手段が計時する上記設定時間は、固定値であっても良いが、請求項2に記載のように、CPUによって(換言すればプログラムによって)設定されるように構成すれば、高い汎用性が得られ非常に有利である。
【0028】
次に、請求項3に記載のマイコンでは、請求項1,2のマイコンにおいて、任意信号出力手段は、CPUからの出力開始指令を受けてパルス信号の出力動作を開始する時の該パルス信号の最初の出力レベル(即ち、パルス信号の出力開始レベルであり、逆に言えば、パルス信号を出力していない時の出力端子のレベル)が、CPUによって(換言すればプログラムによって)設定されるように構成されている。
【0029】
このような請求項3のマイコンによれば、パルス信号の出力開始レベルをハイレベルとローレベルとの何れかに任意に設定できるようになり、汎用性を高めることができる。
また、請求項4に記載のマイコンでは、請求項1〜3のマイコンにおいて、任意信号出力手段がパルス信号を出力させる出力端子は、CPUによって(換言すればプログラムによって)、当該マイコンの複数の端子のうちの何れかに設定されるようになっている。そして、このマイコンによれば、パルス信号の出力端子を複数の端子の中から任意に選択することができるため、便利である。例えば、当該マイコンが搭載されるプリント配線基板のパターン設計時において、上記パルス信号の配線パターンの経路を容易に変えることができる。
【0030】
【発明の実施の形態】
以下、本発明が適用された実施形態のシングルチップマイコンについて、図面を用いて説明する。
まず図1は、本実施形態のマイコン1の構成を表すブロック図である。
【0031】
図1に示すように、本実施形態のマイコン1は、基本的な構成要素として、プログラムに従い動作するCPU3と、プログラムや固定データが予め格納されるROM5と、CPU3による演算結果を一時記憶するためのRAM6と、当該マイコン1の端子を介して外部との信号の入出力を行うためのI/Oポート7とを備えている。
【0032】
そして更に、マイコン1は、当該マイコン1の外部に設けられる発振素子8と協同してCPU3の動作クロックであるメインクロック(本実施形態では数MHz〜数十MHz)を生成するメイン発振回路9及び該メイン発振回路9を制御する発振制御部11からなるメインクロック発生部13と、上記発振制御部11と協同して、CPU3を間欠的に動作(間欠動作)させるための制御を行う間欠動作制御部15と、CPU3からの出力開始指令を受けると、CPU3からの出力停止指令を受けるまでの間、CPU3により設定された周期及びデューティ比のパルス信号を、CPU3の動作状態に拘わらず、上記I/Oポート7を介して当該マイコン1の出力端子から出力する任意信号出力制御部17と、当該マイコン1の外部に設けられる発振素子18と協同して上記メインクロックよりも周波数が低いサブクロック(本実施形態では数十KHz)を生成するサブ発振回路19とを備えている。
【0033】
そして、本実施形態のマイコン1において、上記発振制御部11と、間欠動作制御部15と、任意信号出力制御部17との各々は、サブ発振回路19で常時生成されるサブクロックを受けて動作する。
尚、本実施形態では、メイン発振回路9が、メインクロック生成手段に相当し、発振制御部11と間欠動作制御部15とが、間欠動作制御手段に相当し、任意信号出力制御部17が、任意信号出力手段に相当している。また、サブ発振回路19が、サブクロック生成手段に相当している。
【0034】
ここで、CPU3は、前述した従来例1のCPU103と同様に、特定の動作停止命令を実行することによって自己の動作を停止することができるようになっている。そして、CPU3は、自ら動作を停止する時に(つまり、上記動作停止命令の実行時に)、間欠動作制御部15へ動作要求を出力するようになっている。また、CPU3は、所定の命令を実行することによって、上記任意信号出力制御部17へ出力開始指令と出力停止指令との各々を出力するようになっている。
【0035】
一方、間欠動作制御部15は、計時すべきタイマ時間(設定時間に相当)がCPU3によってセットされる(書き込まれる)レジスタ15aを備えている。
そして、間欠動作制御部15は、通常時には、メインクロック発生部13の発振制御部11に動作指示を与えて、該発振制御部11にメイン発振回路9を動作させているが、CPU3からの上記動作要求を受けると(即ち、CPU3が動作を停止すると)、発振制御部11に停止指示を出力して、該発振制御部11にメイン発振回路9の動作を停止させると共に、CPU3により事前に上記レジスタ15aへセットされているタイマ時間の計時を開始し、そのタイマ時間が経過すると、発振制御部11に再び動作指示を出力して、該発振制御部11にメイン発振回路9の動作を再開させる。
【0036】
また、メインクロック発生部13の発振制御部11は、上記間欠動作制御部15からの動作指示と停止指示とに応じて、メイン発振回路9の動作と非動作とを切り替えるが、特に、間欠動作制御部15からの動作指示を受けてメイン発振回路9の動作を開始させた際には、その時点からメインクロックの周波数が安定すると見なされる所定の発振安定待ち時間が経過した時に、CPU3へ、該CPU3を停止状態から動作状態へと起床させるためのRUN信号を出力する。
【0037】
尚、上記発振安定待ち時間は、メインクロックの周波数が確実に安定してからCPU3を起床させるために設けられており、サブクロックの数に基づいて計時される。そして、発振制御部11は、上記発振安定待ち時間がCPU3によってセットされる(書き込まれる)レジスタ11aを備えている。また、本実施形態において、発振制御部11は、上記RUN信号を、間欠動作制御部15から次に停止指示を受けるまで(つまり、CPU3の動作が停止してメイン発振回路9の動作を次に停止させる時まで)継続して出力するようになっている。
【0038】
このような発振制御部11及び間欠動作制御部15を備えたマイコン1では、CPU3が、間欠動作制御部15のレジスタ15aへ事前にタイマ時間をセットしておくと共に、実行すべき処理がなくて動作を停止しても良いと判断すると、上記動作停止命令を実行して、自己の動作を停止すると共に間欠動作制御部15へ動作要求を出力する、といった具合にプログラムを設定すれば、図3及び図4の上段に示すようなCPU3の間欠動作(動作と非動作とを繰り返す動作)が実現されることとなる。
【0039】
即ち、CPU3が、動作を停止しても良いと判断して、自らの動作を停止すると共に間欠動作制御部15へ動作要求を出力すると、間欠動作制御部15が、発振制御部11に停止指示を出力してメイン発振回路9の動作を停止させると共に、レジスタ15aにセットされているタイマ時間(設定時間)の計時を開始し、そのタイマ時間が経過すると、発振制御部11に再び動作指示を出力してメイン発振回路9の動作を再開させることとなる。そして、その時点から、前述の発振安定待ち時間が経過すると、発振制御部11からCPU3へRUN信号が出力されて、CPU3が停止状態から動作状態へと起床することとなり、以後は、こうした動作が繰り返されることとにより、CPU3の間欠動作が実施される。
【0040】
次に、任意信号出力制御部17について説明する。
図2に示すように、任意信号出力制御部17は、出力すべきパルス信号の周期がCPU3によって書き込まれる記憶部17aと、出力すべきパルス信号のデューティ比がCPU3によって書き込まれる記憶部17bと、パルス信号の出力開始レベルがCPU3によって書き込まれる記憶部17cと、マイコン1の複数の出力端子P1〜Pnの内でパルス信号を出力すべき出力端子(以下、パルス信号出力対象端子という)を示す出力端子情報が、CPU3によって書き込まれる記憶部17dとを備えている。
【0041】
そして、図4の下段に示すように、任意信号出力制御部17は、CPU3からの出力開始指令を受けるまでは、記憶部17dに書き込まれている出力端子情報に該当するパルス信号出力対象端子(ここでは、P1〜Pnの内のP1であるものとする)の出力レベルを、記憶部17cに書き込まれている出力開始レベルとは反対のレベル(ここでは、ローレベルであるものとする)にし、CPU3からの出力開始指令を受けると、パルス信号出力対象端子P1からのパルス信号の出力を開始する。
【0042】
ここで、この例では、記憶部17cに書き込まれている出力開始レベルがハイレベルであるため、任意信号出力制御部17は、CPU3からの出力開始指令を受けると、パルス信号出力対象端子P1のレベルをローレベルからハイレベルにし、以後は、CPU3からの出力停止指令を受けるまでの間、パルス信号出力対象端子P1から、記憶部17a,17bの各々に書き込まれている周期及びデューティ比のパルス信号を繰り返し出力する。そして、任意信号出力制御部17は、CPU3からの出力停止指令を受けると、パルス信号出力対象端子P1のレベルを保持する。また、任意信号出力制御部17は、出力停止指令を受けた場合に、パルス信号出力対象端子P1のレベルを、CPU3から指定されたレベルで止めることもできる。
【0043】
尚、パルス信号の1周期中におけるハイレベル時間Thは、記憶部17aに書き込まれている周期をTとし、記憶部17bに書き込まれているデューティ比をD[%]とすると、「T×D/100」となる。
以上のような本実施形態のマイコン1によれば、図4に例示するように、CPU3の動作を停止させた状態で、任意の周期及びデューティ比のパルス信号をパルス信号出力対象端子から繰り返し出力することができ、延いては、任意の周期及びデューティ比のパルス信号を、より少ない消費電力で出力することができる。
【0044】
具体的には、図4のように、CPU3が、間欠動作制御部15に動作要求を出力して自らの動作を停止する前に、パルス信号出力対象端子P1から出力したいパルス信号の周期Tとデューティ比Dと出力開始レベルとを任意信号出力制御部17の記憶部17a〜17cに書き込んでおくと共に、その任意信号出力制御部17に出力開始指令を出力すれば(即ち、出力開始指令用の命令を実行すれば)、その後は、CPU3が動作を停止していても、任意信号出力制御部17により、CPU3によって設定された周期T及びデューティ比Dのパルス信号がパルス信号出力対象端子P1から繰り返し出力されるからである。尚、パルス信号の出力を停止したい場合には、CPU3が動作している際に、出力停止指令用の命令を実行して、任意信号出力制御部17へ出力停止指令を出力すれば良い。
【0045】
そして、このような本実施形態のマイコン1によれば、例えば、周辺回路へのクロック信号や、制御対象をオン/オフ制御するための制御信号等を、非常に少ない消費電力で出力することができるようになる。
しかも、本実施形態のマイコン1によれば、CPU3の動作停止中には、CPU3の動作クロックであるメインクロックも停止することとなるため、任意の周期及びデューティ比のパルス信号を、より一層少ない消費電力で出力することができる。
【0046】
また、このマイコン1によれば、CPU3が動作している場合でも、任意信号出力制御部17により所望の周期及びデューティ比のパルス信号をパルス信号出力対象端子から出力させることができるため、CPU3の動作時における処理負荷を低減することもできる。ソフトウェアによるパルス信号の出力制御が不要となるからである。
【0047】
そして更に、本実施形態のマイコン1によれば、プログラムにより、パルス信号の出力開始レベルをハイレベルとローレベルとの何れかに任意に設定でき、また、パルス信号出力対象端子も複数の端子の中から任意に選択することができるため、非常に高い汎用性が得られる。
【0048】
以上、本発明の一実施形態について説明したが、本発明は、種々の形態を採り得ることは言うまでもない。
例えば、間欠動作制御部15が計時するタイマ時間は、CPU3によってセットされる(プログラマブルである)のではなく、固定値であっても良い。但し、そのタイマ時間を任意に設定できる上記実施形態の構成を採用した方が、汎用性が高く有利である。
【図面の簡単な説明】
【図1】 実施形態のマイコンの構成を表すブロック図である。
【図2】 実施形態のマイコン内の任意信号出力制御部を説明するブロック図である。
【図3】 実施形態のマイコンにおけるCPUの間欠動作を表すタイムチャートである。
【図4】 実施形態のマイコンの作用を表すタイムチャートである。
【図5】 従来例1を説明する説明図である。
【図6】 従来例2を説明する説明図である。
【図7】 従来例3を説明する説明図である。
【符号の説明】
1……マイコン(マイクロコンピュータ) 3…CPU 5…ROM
6…RAM 7…I/Oポート 8,18…発振素子
9…メイン発振回路 11…発振制御部 13…メインクロック発生部
15…間欠動作制御部 11a,15a…レジスタ
17…任意信号出力制御部 19…サブ発振回路 P1〜Pn…出力端子[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a microcomputer, and more particularly to a technique for reducing power consumption in a microcomputer.
[0002]
[Prior art]
In general, in a microcomputer (hereinafter referred to as a microcomputer) mounted on an electronic control device, a clock signal supplied to a peripheral circuit, a control signal for controlling on / off of a control target, and the like having an arbitrary cycle and duty ratio. A program is often set to repeatedly output a pulse signal.
[0003]
For example, in an electronic control device mounted on a vehicle, the microcomputer may have to repeatedly output the pulse signal when the engine is stopped when the battery is not charged.
For this reason, there is a demand for a microcomputer to output a pulse signal having an arbitrary cycle and duty ratio with less power consumption (current consumption).
[0004]
Therefore, the present inventor considered the configurations and methods of [Conventional Example 1] to [Conventional Example 3] below before reaching the present invention.
[Conventional example 1]
First, the
[0005]
In the
[0006]
Therefore, in the
[0007]
Therefore, when the
[0008]
That is, as shown in FIG. 5B, when the
[0009]
In FIG. 5B, the output start level (initial output level) of the pulse signal from the output terminal P is high (Hi), and the output level of the output terminal P is high during the period “Ta + Tb1”. The case where it becomes a level is illustrated.
According to the
[0010]
[Conventional example 2]
Next, FIG. 6A is a configuration diagram illustrating the
[0011]
As shown in FIG. 6A, the
When the output
[0012]
Therefore, when the
[0013]
That is, in this way, as shown in FIG. 6B, the temporary operation time of the
[0014]
And since this
[0015]
[Conventional Example 3]
Next, FIG. 7A is a configuration diagram showing the
[0016]
As shown in FIG. 7A, the
[0017]
When the
[0018]
[Problems to be solved by the invention]
However, first, in the
Further, since the
[0019]
In the
[0020]
The present invention has been made in view of these problems, and an object thereof is to provide a microcomputer capable of outputting a pulse signal having an arbitrary period and duty ratio with less power consumption.
[0021]
[Means for Solving the Problems and Effects of the Invention]
The microcomputer according to
[0022]
In addition, this microcomputer can output any signal when the CPU stops operating.ForAs a meansProvided separately from the main clock generation means,Sub clock whose frequency is lower than that of the main clockSubclock generation means that always generates and the subclockArbitrary signal output means for receiving and operatingAndI have. And when the arbitrary signal output means receives the output start command from the CPU, the arbitrary signal output means outputs the pulse signal having the cycle and duty ratio set by the CPU until the output stop command is received from the CPU.Even if has stopped workingOutput from a specific output terminal of the microcomputer.
[0023]
Therefore, according to this microcomputer, it is possible to repeatedly output a pulse signal having an arbitrary cycle and duty ratio from the output terminal of the microcomputer while the operation of the CPU is stopped. Ratio pulse signals can be output with less power consumption. That is, before the CPU stops its own operation, the period and duty ratio of the pulse signal desired to be output from the specific output terminal are set in the arbitrary signal output means, and the output start command is sent to the arbitrary signal output means. After that, even if the CPU has stopped operating, the pulse signal having the cycle and duty ratio set by the CPU is output by the arbitrary signal output means operating at the low-speed subclock. It is because it is repeatedly output from.
[0024]
Further, according to this microcomputer, even when the CPU is operating, the pulse signal having a desired cycle and duty ratio can be output from the specific output terminal by the arbitrary signal output means. The processing load can also be reduced. That is, it is not necessary to control the output of the pulse signal by software.
[0025]
FurtherAnd claims1The microcomputer described in,UpAn intermittent operation control means is provided that operates in response to the low-speed sub-clock and performs control for intermittently operating the CPU.
In this microcomputer, “the CPU outputs an operation request to the intermittent operation control means when stopping the operation, and when the intermittent operation control means receives the operation request from the CPU, the operation of the main clock generation means is stopped. At the same time, start measuring the preset time and restart the operation of the main clock generation means after the set time has elapsed.,Wake up the CPU from the stopped state to the operating stateRUN signal for output to wake up the CPUIs performed, the intermittent operation of the CPU as shown in the upper part of FIG. 3 is performed.Further, the RUN signal is continuously output until the intermittent operation control means next stops the operation of the main clock generating means.Note that the period indicated as “intermittent operation interval (intermittent time)” in FIG. 3 is a period in which the CPU is stopped, and the program execution operation, which is a substantial operation of the microcomputer, is stopped. It is a period.
[0026]
Such claims1According to the microcomputer, when the operation of the CPU is stopped, the high-frequency main clock that is the operation clock of the CPUOf the main clock generation means for generatingTherefore, a pulse signal having an arbitrary cycle and duty ratio can be output with much less power consumption.
[0027]
By the way, claims1In the microcomputer, the set time that is measured by the intermittent operation control means may be a fixed value.2If it is configured to be set by the CPU (in other words, by a program) as described in the above, it is very advantageous to obtain high versatility.
[0028]
Next, the claim3In the microcomputer described in
[0029]
Such claims3According to this microcomputer, the output start level of the pulse signal can be arbitrarily set to either the high level or the low level, and versatility can be improved.
Claims4In the microcomputer according to
[0030]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a single chip microcomputer according to an embodiment to which the present invention is applied will be described with reference to the drawings.
First, FIG. 1 is a block diagram showing the configuration of the
[0031]
As shown in FIG. 1, the
[0032]
Furthermore, the
[0033]
In the
In the present embodiment, the
[0034]
Here, the
[0035]
On the other hand, the intermittent
The intermittent
[0036]
The
[0037]
The oscillation stabilization wait time is provided to wake up the
[0038]
In the
[0039]
That is, when the
[0040]
Next, the arbitrary signal
As shown in FIG. 2, the arbitrary signal
[0041]
Then, as shown in the lower part of FIG. 4, the arbitrary signal
[0042]
Here, in this example, since the output start level written in the
[0043]
The high level time Th in one cycle of the pulse signal is “T × D, where T is the period written in the
According to the
[0044]
Specifically, as shown in FIG. 4, before the
[0045]
According to the
Moreover, according to the
[0046]
Further, according to the
[0047]
Furthermore, according to the
[0048]
As mentioned above, although one Embodiment of this invention was described, it cannot be overemphasized that this invention can take a various form.
For example, the timer time counted by the intermittent
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a microcomputer according to an embodiment.
FIG. 2 is a block diagram illustrating an arbitrary signal output control unit in the microcomputer of the embodiment.
FIG. 3 is a time chart showing an intermittent operation of a CPU in the microcomputer of the embodiment.
FIG. 4 is a time chart showing the operation of the microcomputer according to the embodiment.
FIG. 5 is an explanatory diagram for explaining a conventional example 1;
FIG. 6 is an explanatory diagram for explaining a second conventional example.
FIG. 7 is an explanatory diagram for explaining a conventional example 3;
[Explanation of symbols]
1 ... Microcomputer (microcomputer) 3 ...
6 ... RAM 7 ... I /
9 ...
15: Intermittent
17 ... Arbitrary signal
Claims (4)
該CPUを動作させるためのメインクロックを生成するメインクロック生成手段と、
を備え、前記CPUが動作状態と停止状態とを遷移させることが可能であると共に、前記CPUの動作停止中には前記メインクロック生成手段の動作も停止するマイクロコンピュータであって、
前記メインクロック生成手段とは別に設けられ、前記メインクロックよりも周波数が低いサブクロックを常時生成するサブクロック生成手段と、
前記サブクロックを受けて動作し、前記CPUからの出力開始指令を受けると、該CPUからの出力停止指令を受けるまでの間、前記CPUにより設定された周期及びデューティ比のパルス信号を、前記CPUが動作を停止していても、当該マイクロコンピュータの特定の出力端子から出力する任意信号出力手段と、
前記サブクロックを受けて動作し、前記CPUを間欠的に動作させるための制御を行う間欠動作制御手段とを備え、
前記CPUが、動作を停止する際に前記間欠動作制御手段へ動作要求を出力し、前記間欠動作制御手段が、前記動作要求を受けると、前記メインクロック生成手段の動作を停止させると共に、事前に設定されている設定時間の計時を開始し、その設定時間の経過後に、前記メインクロック生成手段の動作を再開させ、前記CPUを停止状態から動作状態へと起床させるためのRUN信号を出力して該CPUを起床させることにより、前記CPUの間欠動作が実施されるようになっており、
更に、前記RUN信号は、前記間欠動作制御手段が次に前記メインクロック生成手段の動作を停止させるまで継続して出力されるようになっていること、
を特徴とするマイクロコンピュータ。A CPU that operates according to a program;
Main clock generating means for generating a main clock for operating the CPU;
The CPU is capable of transitioning between an operating state and a stopped state, and also stops the operation of the main clock generating means while the CPU is stopped.
A sub clock generating means that is provided separately from the main clock generating means, and that constantly generates a sub clock having a frequency lower than that of the main clock;
When receiving an output start command from the CPU, the CPU operates in response to the sub clock and outputs a pulse signal having a cycle and duty ratio set by the CPU until receiving an output stop command from the CPU. Even if the operation has stopped, arbitrary signal output means for outputting from a specific output terminal of the microcomputer ,
Operates by receiving a pre-Symbol subclock, and a intermittent operation control means for performing control for intermittently operating said CPU,
When the CPU stops the operation, it outputs an operation request to the intermittent operation control means. When the intermittent operation control means receives the operation request, it stops the operation of the main clock generation means, and in advance and starts counting the set time that is set, after a lapse of the set time, the main clock generating means restarts the operation of, and outputs a RUN signal to wake up the CPU from the stopped state to the operating state By waking up the CPU, intermittent operation of the CPU is implemented ,
Further, the RUN signal is continuously output until the intermittent operation control means next stops the operation of the main clock generation means ,
A microcomputer characterized by.
前記間欠動作制御手段は、
前記設定時間が前記CPUによって設定されるように構成されていること、
を特徴とするマイクロコンピュータ。The microcomputer according to claim 1 ,
The intermittent operation control means includes
The set time is configured to be set by the CPU;
A microcomputer characterized by.
前記任意信号出力手段は、
前記CPUからの出力開始指令を受けて前記パルス信号の出力動作を開始する時の該パルス信号の最初の出力レベルが、前記CPUによって設定されるように構成されていること、
を特徴とするマイクロコンピュータ。The microcomputer according to claim 1 or 2 ,
The arbitrary signal output means includes
An initial output level of the pulse signal when the output operation of the pulse signal is started in response to an output start command from the CPU is configured to be set by the CPU.
A microcomputer characterized by.
前記任意信号出力手段が前記パルス信号を出力させる出力端子は、前記CPUによって、当該マイクロコンピュータの複数の端子のうちの何れかに設定されること、
を特徴とするマイクロコンピュータ。The microcomputer according to any one of claims 1 to 3 ,
The output terminal from which the arbitrary signal output means outputs the pulse signal is set by the CPU to any one of a plurality of terminals of the microcomputer,
A microcomputer characterized by.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002024057A JP3879523B2 (en) | 2002-01-31 | 2002-01-31 | Microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002024057A JP3879523B2 (en) | 2002-01-31 | 2002-01-31 | Microcomputer |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2003223430A JP2003223430A (en) | 2003-08-08 |
JP3879523B2 true JP3879523B2 (en) | 2007-02-14 |
Family
ID=27746604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002024057A Expired - Lifetime JP3879523B2 (en) | 2002-01-31 | 2002-01-31 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3879523B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8046615B2 (en) | 2007-10-19 | 2011-10-25 | Denso Corporation | Microcomputer system with reduced power consumption |
JP5402964B2 (en) * | 2011-03-11 | 2014-01-29 | オムロン株式会社 | Mutual monitoring system, management device and system |
JP5532005B2 (en) * | 2011-03-31 | 2014-06-25 | 株式会社デンソー | Semiconductor integrated circuit device |
JP5561329B2 (en) * | 2012-08-27 | 2014-07-30 | 日本精工株式会社 | In-vehicle electronic control unit |
-
2002
- 2002-01-31 JP JP2002024057A patent/JP3879523B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2003223430A (en) | 2003-08-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5261082A (en) | Semiconductor integrated circuit having a plurality of oscillation circuits | |
JPH11143571A (en) | Data processor | |
JPH0854954A (en) | Integrated circuit provided with power saving function | |
JP3879523B2 (en) | Microcomputer | |
JPH08166834A (en) | Clock generating circuit and microcomputer | |
JPH10301661A (en) | Clock supplying device | |
JP3829916B2 (en) | Microcomputer | |
JP5324340B2 (en) | Microcomputer | |
JP2001350739A (en) | Microcomputer | |
JP3461535B2 (en) | Wireless terminal device and control method therefor | |
JP3758477B2 (en) | Microcomputer | |
JP4192485B2 (en) | Microcomputer | |
JP3711849B2 (en) | Microcomputer | |
JP3736348B2 (en) | Single-chip microcomputer that can control output signal with timer | |
JPH0724006B2 (en) | Data processing device | |
JP3925150B2 (en) | Microcomputer and electronic control device for vehicle | |
JP2001117546A (en) | Display device | |
JP2001125691A (en) | Computer and method for controlling intermittent operation of cpu | |
JPH05259825A (en) | Clock generating circuit | |
JP2002202961A (en) | Microcomputer | |
JPS6333806B2 (en) | ||
JP2003296293A (en) | Microcomputer | |
JPH02122318A (en) | Semiconductor integrated circuit device | |
JPS59189426A (en) | Clock supply controlling system | |
JP4019031B2 (en) | Power saving oscillation circuit and portable terminal device using power saving oscillation circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040413 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050712 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050909 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20051122 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060118 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20061017 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061030 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3879523 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101117 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111117 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111117 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121117 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131117 Year of fee payment: 7 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |