JPH11316626A - Microcontroller - Google Patents

Microcontroller

Info

Publication number
JPH11316626A
JPH11316626A JP10123471A JP12347198A JPH11316626A JP H11316626 A JPH11316626 A JP H11316626A JP 10123471 A JP10123471 A JP 10123471A JP 12347198 A JP12347198 A JP 12347198A JP H11316626 A JPH11316626 A JP H11316626A
Authority
JP
Japan
Prior art keywords
input
control
output function
function units
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10123471A
Other languages
Japanese (ja)
Inventor
Kazumasa Ozawa
一将 小沢
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP10123471A priority Critical patent/JPH11316626A/en
Publication of JPH11316626A publication Critical patent/JPH11316626A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)
  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a microcontroller capable of effectively reducing power consumption without significantly changing existing circuits. SOLUTION: This microcontroller has input/output function parts 50-1 to 50-4 for performing operation related to an input/output function, plural control registers 41-44 provided corresponding to the respective plural input/output function parts 50-1 to 50-4 so as to output control signals for turning any correspondent input/output function part into active or inactive state based on written control data, and control means 70 for writing the control data for turning the respective plural input/output function parts to active or inactive state into the plural control registers 41-44.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコントロ
ーラに係り、特に内蔵する各種入出力機能部について、
それらを選択的に動作状態または非動作状態にするよう
に制御する回路を有するマイクロコントローラに関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcontroller, and more particularly to various built-in input / output function units.
The present invention relates to a microcontroller having a circuit that controls a circuit to selectively activate or deactivate them.

【0002】[0002]

【従来の技術】マイクロコントローラの設計に際し、低
電力動作への意識がさほど高くなかった従来では、入出
力回路(以下、I/O回路と記す。)内部に供給される
システムクロックによって、I/O回路内部の一部の回
路が入出力機能とは無関係に常に動作している場合等が
あり、電力消費を増加させる一因となる場合があった。
2. Description of the Related Art Conventionally, when designing microcontrollers, the consciousness of low power operation has not been so high. In the past, I / O circuits (hereinafter referred to as I / O circuits) are controlled by a system clock supplied to the inside of the circuit. In some cases, some circuits inside the O-circuit are always operating irrespective of the input / output function, and this may contribute to an increase in power consumption.

【0003】[0003]

【発明が解決しようとする課題】マイクロコントローラ
及びI/O回路の低電力化設計に際しては回路構成の変
更、機能的な変更、プロセス的な変更等、多くの工数を
必要とすることが多い。
In designing a microcontroller and an I / O circuit with low power, many man-hours such as a change in circuit configuration, a change in function, and a change in process are often required.

【0004】そこで従来のマイクロコントローラ内の既
存回路に大幅な変更を施すことなく、かつ効果的に低電
力化を図ることが要求されている。
[0004] Therefore, it is required to effectively reduce the power consumption without making significant changes to existing circuits in a conventional microcontroller.

【0005】本発明はこのような事情に鑑みてなされた
ものであり、既存回路を大幅に変更することなく、効果
的に消費電力の低減を図ることができるマイクロコント
ローラを提供することを目的とする。
The present invention has been made in view of such circumstances, and has as its object to provide a microcontroller capable of effectively reducing power consumption without largely changing an existing circuit. I do.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に請求項1に記載の発明は、入出力機能に関連する動作
を行う複数の入出力機能部と、各々前記複数の入出力機
能部の各々に対応して設けられ、書き込まれた制御デー
タに基づいて該対応する入出力機能部を動作状態または
非動作状態にする制御信号を出力する複数の制御レジス
タと、前記複数の入出力機能部の各々を動作状態または
非動作状態にするための制御データを前記複数の制御レ
ジスタの少なくとも1つに書き込む制御手段とを有する
ことを特徴とする。
According to a first aspect of the present invention, a plurality of input / output function units for performing operations related to input / output functions and a plurality of the input / output function units are provided. A plurality of control registers provided corresponding to each of the plurality of input / output functions and outputting a control signal for setting the corresponding input / output function unit to an operation state or a non-operation state based on the written control data; and And control means for writing control data for setting each of the units to an operation state or a non-operation state in at least one of the plurality of control registers.

【0007】請求項1に記載のマイクロコントローラで
は、制御手段によりユーザの選択に応じて複数の入出力
機能部の各々を動作状態または非動作状態にするための
制御データが複数の入出力機能部の各々に対応して設け
られた前記複数の制御レジスタの少なくとも1つに書き
込まれる。制御データが書き込まれた制御レジスタから
は書き込まれた制御データに応じて前記複数の入出力機
能部の各々を動作状態または非動作状態にする制御信号
が複数の入出力機能部の各々に対して出力される。
In the microcontroller according to the present invention, control data for setting each of the plurality of input / output function units to an operation state or a non-operation state in accordance with a user's selection by the control means includes a plurality of input / output function units. Is written to at least one of the plurality of control registers provided corresponding to each of the control registers. A control signal for setting each of the plurality of input / output function units to an operation state or a non-operation state according to the written control data from the control register in which the control data is written is transmitted to each of the plurality of input / output function units. Is output.

【0008】したがって、請求項1に記載のマイクロコ
ントローラによれば、マイクロコントローラが内蔵する
複数の入出力機能部からなるI/O回路のうちユーザが
必要な入出力機能部を複数の入出力機能部の各々に対応
して設けられた各制御レジスタにより選択可能にしたの
で、不要な入出力機能部については非動作状態にするこ
とができ、即ちソフトウェア的に入出力機能を分離可能
とすることができ、それ故既存回路を大幅に変更するこ
となく効果的に消費電力の低減が図れると共に、ユーザ
の用途に柔軟に対応することができる。
Therefore, according to the microcontroller of the first aspect, the input / output function unit required by the user among the plurality of input / output function units included in the microcontroller is provided to the plurality of input / output function units. Each of the sections can be selected by each control register provided, so that unnecessary input / output function sections can be deactivated, that is, the input / output functions can be separated by software. Therefore, it is possible to effectively reduce the power consumption without largely changing the existing circuit and flexibly cope with the use of the user.

【0009】請求項2に記載の発明は、請求項1に記載
のマイクロコントローラにおいて、前記制御手段は、前
記制御レジスタに前記制御データを書き込む際に該制御
データが書き込まれる制御レジスタに対応する前記複数
の入出力機能部を初期化することを特徴とする。
According to a second aspect of the present invention, in the microcontroller according to the first aspect, when the control data is written in the control register, the control means corresponds to the control register in which the control data is written. A plurality of input / output function units are initialized.

【0010】請求項2に記載のマイクロコントローラで
は複数の制御レジスタに複数の入出力機能部の各々を動
作状態または非動作状態にする制御データを書き込む際
に制御手段よりリセット信号が出力され、該制御データ
が書き込まれる制御レジスタに対応する前記複数の入出
力機能部が初期化される。
In the microcontroller according to the second aspect, a reset signal is output from the control means when writing control data for making each of the plurality of input / output function units into an operation state or a non-operation state in the plurality of control registers. The plurality of input / output function units corresponding to the control register into which the control data is written are initialized.

【0011】したがって、請求項2に記載のマイクロコ
ントローラによれば、請求項1に記載の発明により得ら
れる効果に加えて、動作中の入出力機能部及び動作開始
時の入出力機能部を初期化することができる。
Therefore, according to the microcontroller according to the second aspect, in addition to the effects obtained by the first aspect, the input / output function unit during operation and the input / output function unit at the start of operation are initialized. Can be

【0012】請求項3に記載の発明は、入出力機能に関
連する動作を行う複数の入出力機能部と、各々前記複数
の入出力機能部の各々に対応して設けられ、書き込まれ
た第1の制御データに基づいて該対応する入出力機能部
を動作状態または非動作状態にする制御信号を出力する
複数の制御レジスタと、各々前記複数の入出力機能部の
各々に対応して設けられ、該対応する入出力機能部に対
して、書き込まれた第2の制御データに基づいて初期化
を有効または無効にする制御信号を出力する複数のリセ
ット制御レジスタと、前記複数の入出力機能部の各々を
動作状態または非動作状態にするための前記第1の制御
データを前記複数の制御レジスタの少なくとも1つに書
き込み、かつ前記複数の入出力機能部に対する初期化を
有効または無効にするための前記第2の制御データを前
記複数のリセット制御レジスタの少なくとも1つに書き
込むと共に、前記複数の入出力機能部の各々に対して初
期化を行うためのリセット信号を出力する制御手段とを
有することを特徴とする。
According to a third aspect of the present invention, there are provided a plurality of input / output function units for performing operations related to input / output functions, and a plurality of input / output function units provided and written in correspondence with each of the plurality of input / output function units. A plurality of control registers for outputting a control signal for setting the corresponding input / output function unit to an operation state or a non-operation state based on one control data; and a plurality of control registers provided corresponding to each of the plurality of input / output function units. A plurality of reset control registers for outputting a control signal for enabling or disabling initialization to the corresponding input / output function unit based on the written second control data; and the plurality of input / output function units. Write the first control data to each of the plurality of control registers to activate or deactivate each of the plurality of control registers, and enable or disable initialization of the plurality of input / output function units. Control means for writing the second control data for writing to at least one of the plurality of reset control registers, and outputting a reset signal for initializing each of the plurality of input / output function units; It is characterized by having.

【0013】請求項3に記載のマイクロコントローラで
は、制御手段により複数の入出力機能部の各々を動作状
態または非動作状態にするための第1の制御データが複
数の制御レジスタの少なくとも1つに書き込まれ、かつ
前記複数の入出力機能部の各々に対する初期化を有効ま
たは無効にするための第2の制御データが複数のリセッ
ト制御レジスタの少なくとも1つに書き込まれると共
に、前記複数の入出力機能部の各々に対して初期化を行
うためのリセット信号が出力される。
[0013] In the microcontroller according to the third aspect, the first control data for setting each of the plurality of input / output function units to the operation state or the non-operation state by the control means is stored in at least one of the plurality of control registers. Second control data written to enable and disable initialization of each of the plurality of input / output function units is written into at least one of the plurality of reset control registers, and the plurality of input / output function units A reset signal for performing initialization is output to each of the units.

【0014】また前記複数の入出力機能部の各々に対応
して設けられた複数の制御レジスタは、対応する入出力
機能部を書き込まれた第1の制御データに基づいて動作
状態または非動作状態にする制御信号を複数の入出力機
能部の各々に対して出力し、前記複数の入出力機能部の
各々に対応して設けられた複数のリセット制御レジスタ
は、対応する入出力機能部に対して、書き込まれた第2
の制御データに基づいて初期化を有効または無効にする
制御信号を出力する。
A plurality of control registers provided for each of the plurality of input / output function units may be in an operating state or a non-operating state based on the first control data written in the corresponding input / output function unit. To each of the plurality of input / output function units, and a plurality of reset control registers provided corresponding to each of the plurality of input / output function units, And the written second
And outputs a control signal for enabling or disabling initialization based on the control data.

【0015】したがって、請求項3に記載のマイクロコ
ントローラによれば、選択した入出力機能部を使用しな
いときは、消費電力の低減が図れるだけでなく、動作中
の入出力機能部及び動作開始時の入出力機能部を選択的
に初期化することができる。
Therefore, according to the microcontroller of the present invention, when the selected input / output function unit is not used, not only the power consumption can be reduced, but also the input / output function unit during operation and the operation start time. Can be selectively initialized.

【0016】[0016]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して詳細に説明する。本発明の第1の実施の形態
に係るマイクロコントローラの構成を図1に示す。本実
施の形態に係るマイクロコントローラはCPU10と、
ROM20と、RAM30とI/Oレジスタブロック4
0、I/O回路を構成する複数の入出力機能部としての
タイマー50−1、入出力ポート(PORT)50−
2、シリアルI/O(SIO)インターフェース50−
3、アナログ/ディジタル(A/D)変換部50−4、
…を有しており、これらは内部バス60を介して相互に
接続されている。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 shows the configuration of the microcontroller according to the first embodiment of the present invention. The microcontroller according to the present embodiment includes a CPU 10;
ROM 20, RAM 30, and I / O register block 4
0, timer 50-1 as a plurality of input / output function units constituting an I / O circuit, input / output port (PORT) 50-
2. Serial I / O (SIO) interface 50-
3, analog / digital (A / D) converter 50-4,
Are connected to each other via an internal bus 60.

【0017】I/Oレジスタブロック40は、タイマ5
0−1、入出力ポート50−2、シリアルI/Oインタ
ーフェース50−3、アナログ/ディジタル変換部50
−4、…にそれぞれ対応して設けられ、これらを動作状
態または非動作状態になるように制御するタイマ制御レ
ジスタ41、入出力ポート制御レジスタ42、シリアル
I/Oインターフェース制御レジスタ(以下、SIO制
御レジスタと記す。)43、A/D制御レジスタ44、
…と、制御回路70とを有している。
The I / O register block 40 includes a timer 5
0-1, input / output port 50-2, serial I / O interface 50-3, analog / digital converter 50
-4,..., And a timer control register 41, an input / output port control register 42, and a serial I / O interface control register (hereinafter referred to as SIO control) 43, A / D control register 44,
, And a control circuit 70.

【0018】またタイマ制御レジスタ41、入出力ポー
ト制御レジスタ42、SIO制御レジスタ43、A/D
制御レジスタ44、…はアンドゲート80、82、8
4、86を介してタイマー50−1、入出力ポート50
−2、シリアルI/Oインターフェース50−3、アナ
ログ/ディジタル変換部50−4、…に接続されてい
る。タイマ制御レジスタ41、入出力ポート制御レジス
タ42、SIO制御レジスタ43、A/D制御レジスタ
44、…はアンドゲート80、82、84、86の一方
の入力端に接続されており、アンドゲート80、82、
84、86の他方の入力端にはシステムクロックが入力
されるようになっている。タイマ制御レジスタ41、入
出力ポート制御レジスタ42、SIO制御レジスタ4
3、A/D制御レジスタ44、…は本発明の制御レジス
タに相当する。
A timer control register 41, an input / output port control register 42, an SIO control register 43, an A / D
Control registers 44,... Are AND gates 80, 82, 8
Timer 50-1, input / output port 50 via 4, 86
-2, serial I / O interface 50-3, analog / digital converter 50-4,... The timer control register 41, the input / output port control register 42, the SIO control register 43, the A / D control register 44,... Are connected to one input terminals of the AND gates 80, 82, 84, 86. 82,
The other input terminals 84 and 86 receive a system clock. Timer control register 41, input / output port control register 42, SIO control register 4
3, the A / D control registers 44,... Correspond to the control registers of the present invention.

【0019】制御回路70はCPU10からの信号を受
けてI/O回路を構成する複数の入出力機能部の各々を
動作状態または非動作状態にする制御データを、入出力
機能部の各々に対応する制御レジスタに書き込む。ここ
で本実施の形態では入出力機能部の各々を動作状態にす
る制御データは「1」,非動作状態にする制御データは
「0」であるものとする。この制御回路70は本発明の
制御手段に相当する。各制御レジスタでは、制御データ
「1」が設定された場合にはハイレベルの信号が、制御
データ「0」が設定された場合にはローレベルの信号
が、それぞれ出力されるようになっている。
The control circuit 70 receives control signals from the CPU 10 and sets control data for activating or deactivating each of the plurality of input / output function units constituting the I / O circuit in correspondence with each of the input / output function units. Write to the control register. Here, in the present embodiment, it is assumed that the control data for bringing each of the input / output function units into the operation state is “1” and the control data for bringing each of the input / output function units into the non-operation state is “0”. This control circuit 70 corresponds to the control means of the present invention. Each control register outputs a high-level signal when control data “1” is set, and outputs a low-level signal when control data “0” is set. .

【0020】上記構成において、CPU10がROM2
0に格納されているプログラムを読み出し、実行するこ
とにより入出力に関連する制御機能の設定、またはその
設定の変更が行われる。その際にCPU10より制御回
路70にI/O回路を構成する入出力機能部として例え
ば、タイマ50−1、入出力ポート50−2、シリアル
I/Oインターフェース50−3、アナログ/ディジタ
ル変換部50−4を選択し、そのうちタイマー50−
1、アナログ/ディジタル変換部50−4を非動作状態
にするように指令が出されると、制御回路70はタイマ
制御レジスタ41、A/D制御レジスタ44に制御デー
タ「0」を、入出力ポート制御レジスタ42、SIO制
御レジスタ43に制御データ「1」を設定する。
In the above configuration, the CPU 10 is connected to the ROM 2
By reading and executing the program stored in 0, the setting of the control function related to input / output or the change of the setting are performed. At this time, the CPU 10 causes the control circuit 70 to provide an I / O circuit as an input / output function unit such as a timer 50-1, an input / output port 50-2, a serial I / O interface 50-3, -4, and timer 50-
1. When a command is issued to deactivate the analog / digital converter 50-4, the control circuit 70 sends control data “0” to the timer control register 41 and the A / D control register 44, The control data "1" is set in the control register 42 and the SIO control register 43.

【0021】この結果、タイマ制御レジスタ41、A/
D制御レジスタ44の出力はローレベルとなり、アンド
ゲート80、86を介してシステムクロックがタイマー
50−1、アナログ/ディジタル変換部50−4には供
給されないので、タイマー50−1、アナログ/ディジ
タル変換部50−4は非動作状態になる。
As a result, the timer control register 41, A /
The output of the D control register 44 becomes low level, and the system clock is not supplied to the timer 50-1 and the analog / digital converter 50-4 via the AND gates 80 and 86. The unit 50-4 enters a non-operation state.

【0022】また入出力ポート制御レジスタ42、SI
O制御レジスタ43の出力はハイレベルとなり、アンド
ゲート82、84を介してシステムクロックが入出力ポ
ート50−2、シリアルI/Oインターフェース50−
3に供給され、入出力ポート50−2、シリアルI/O
インターフェース50−3は動作状態になる。
The input / output port control register 42, SI
The output of the O control register 43 becomes high level, and the system clock is supplied to the input / output port 50-2 and the serial I / O interface 50- via the AND gates 82 and 84.
3 and input / output port 50-2, serial I / O
The interface 50-3 enters an operation state.

【0023】このように本発明の第1の実施の形態に係
るマイクロコントローラによれば、マイクロコントロー
ラが内蔵する複数の入出力機能部からなるI/O回路の
うちユーザが必要な入出力機能部を複数の入出力機能部
の各々に対応して設けられた各制御レジスタにより選択
可能にしたので、不要な入出力機能部については非動作
状態にすることができ、即ちソフトウェア的に入出力機
能を分離可能とすることができ、それ故既存回路を大幅
に変更することなく効果的に消費電力の低減が図れると
共に、ユーザの用途に柔軟に対応することができる。
As described above, according to the microcontroller according to the first embodiment of the present invention, the input / output function unit required by the user among the I / O circuits including a plurality of input / output function units built in the microcontroller. Can be selected by each control register provided corresponding to each of the plurality of input / output function units, so that unnecessary input / output function units can be set to a non-operating state. Can be separated, so that the power consumption can be effectively reduced without largely changing the existing circuit, and it is possible to flexibly cope with the use of the user.

【0024】また本実施の形態では入出力機能部の各々
を動作状態または非動作状態にするための制御データを
対応する制御レジスタに書き込む際に入出力機能部の各
々を初期化しないようにしたので、入出力機能部を動作
状態から非動作状態に、またはその逆の状態に変更させ
た際のその前後で入出力機能の状態は変化せず、例え
ば、タイマ等において動作を中断したときの状態から動
作を再開させることができる。
In this embodiment, each of the input / output function units is not initialized when control data for setting each of the input / output function units to the operation state or the non-operation state is written to the corresponding control register. Therefore, the state of the input / output function does not change before and after changing the input / output function unit from the operating state to the non-operation state, or vice versa, for example, when the operation is interrupted by a timer or the like. Operation can be resumed from the state.

【0025】次に本発明の第2の実施の形態に係るマイ
クロコントローラの構成を図2に示す。本実施の形態が
第1の実施の形態と構成上、異なるのは制御回路70が
入出力機能部を動作状態または非動作状態にする制御デ
ータを上記入出力機能部に対応する制御レジスタに書き
込む際に制御データが書き込まれる制御レジスタに対応
する入出力機能部を初期化するようにした点であり、そ
の他の構成は第1の実施の形態に係るマイクロコントロ
ーラと同一であるので、重複する説明は省略する。
Next, the configuration of a microcontroller according to a second embodiment of the present invention is shown in FIG. This embodiment is different from the first embodiment in the structure of the first embodiment in that the control circuit 70 writes control data for making the input / output function unit in an operation state or a non-operation state in a control register corresponding to the input / output function unit. In this case, the input / output function unit corresponding to the control register into which the control data is written is initialized, and other configurations are the same as those of the microcontroller according to the first embodiment. Is omitted.

【0026】図2に示すように制御回路70から直接、
初期化するためのリセット信号を供給するようにI/O
回路を構成するタイマ50−1、入出力ポート50−
2、シリアルI/Oインターフェース50−3、アナロ
グ/ディジタル変換部50−4、…は制御回路70のリ
セット信号が出力される出力端と直接、接続されてい
る。
As shown in FIG. 2, directly from the control circuit 70,
I / O to supply a reset signal to initialize
Timer 50-1 and input / output port 50- constituting a circuit
2, the serial I / O interface 50-3, the analog / digital converter 50-4,... Are directly connected to the output terminal of the control circuit 70 from which the reset signal is output.

【0027】上記構成において、例えば、動作中のシリ
アルI/Oインターフェース50−3を非動作状態にす
るために制御回路70によりSIO制御レジスタ43に
制御データ「0」が書き込まれる際に、同時に制御回路
70よりシリアルI/Oインターフェース50−3にリ
セット信号が出力され、シリアルI/Oインターフェー
ス50−3は初期化される。
In the above configuration, for example, when the control data 70 is written into the SIO control register 43 by the control circuit 70 in order to deactivate the operating serial I / O interface 50-3, the control is performed simultaneously. A reset signal is output from the circuit 70 to the serial I / O interface 50-3, and the serial I / O interface 50-3 is initialized.

【0028】また非動作状態の入出力機能部を動作状態
にするために制御回路70により対応する制御レジスタ
に制御データ「1」を書き込む場合にも同様に該当する
入出力機能部が初期化される。
Similarly, when the control circuit 70 writes the control data "1" into the corresponding control register in order to make the inactive input / output function unit active, the corresponding input / output function unit is also initialized. You.

【0029】このように本発明の第2の実施の形態に係
るマイクロコントローラによれば、第1の実施の形態に
係るマイクロコントローラにより得られる効果に加え
て、動作中の入出力機能部及び動作開始時の入出力機能
部を初期化することができる。
As described above, according to the microcontroller according to the second embodiment of the present invention, in addition to the effects obtained by the microcontroller according to the first embodiment, the input / output function unit during operation and the operation The input / output function unit at the start can be initialized.

【0030】本発明の第3の実施の形態に係るマイクロ
コントローラの構成を図3に示す。本実施の形態に係る
マイクロコントローラが本発明の第2の実施の形態に係
るマイクロコントローラと構成上、異なるのは、第1、
第2の実施の形態においてI/O回路を構成する各入出
力機能部を動作状態または非動作状態にするための複数
の制御レジスタとは別に、複数の入出力機能部に対応し
て制御回路70により書き込まれた制御データに基づい
て複数の入出力機能部の各々の初期化を有効または無効
にするための制御信号を出力する複数のリセット制御レ
ジスタを設け、入出力機能部の各々の初期化を選択的に
行うことができるようにした点であり、他の構成は同一
であるので重複する説明は省略する。図3では説明の便
宜上、煩雑を避けるためI/O回路を構成する入出力機
能部として、タイマ50−1、シリアルI/Oインター
フェース50−3のみを図示してあるが、これらに限ら
ず、他の入出力機能部にも適用されるものである。
FIG. 3 shows a configuration of a microcontroller according to a third embodiment of the present invention. The microcontroller according to the present embodiment differs from the microcontroller according to the second embodiment of the present invention in configuration in the first,
In the second embodiment, a control circuit corresponding to a plurality of input / output function units is provided separately from a plurality of control registers for setting each input / output function unit constituting an I / O circuit to an operation state or a non-operation state. A plurality of reset control registers for outputting a control signal for enabling or disabling the initialization of each of the plurality of input / output function units based on the control data written by 70; This is because the configuration can be selectively performed, and the other configuration is the same. In FIG. 3, for convenience of explanation, only the timer 50-1 and the serial I / O interface 50-3 are shown as the input / output function units constituting the I / O circuit for the sake of simplicity. It is applied to other input / output function units.

【0031】図3において、本実施の形態に係るマイク
ロコントローラは、I/Oレジスタブロック40に、入
出力機能部としてのタイマ50−1、シリアルI/Oイ
ンターフェース50−3、…に対応してこれらの入出力
機能部の初期化を有効または無効にするための制御信号
を出力するタイマリセット制御レジスタ410、SIO
リセット制御レジスタ430、…が設けられている。タ
イマリセット制御レジスタ410、SIOリセット制御
レジスタ430、…は本発明のリセット制御レジスタに
相当する。
In FIG. 3, the microcontroller according to the present embodiment has an I / O register block 40 corresponding to a timer 50-1, an I / O function unit, a serial I / O interface 50-3,. A timer reset control register 410 for outputting a control signal for enabling or disabling the initialization of these input / output function units;
, Are provided. The timer reset control register 410, the SIO reset control register 430,... Correspond to the reset control register of the present invention.

【0032】タイマリセット制御レジスタ410、SI
Oリセット制御レジスタ430には制御回路70より初
期化を有効とするための制御データ「1」、または初期
化を無効とするための制御データ「0」が書き込まれる
ようになっており、タイマリセット制御レジスタ41
0、SIOリセット制御レジスタ430に制御データ
「1」が書き込まれた場合にはハイレベルの信号が、制
御データ「0」が書き込まれた場合にはローレベルの信
号が出力されるようになっている。
Timer reset control register 410, SI
In the O reset control register 430, control data "1" for validating initialization or control data "0" for invalidating initialization is written from the control circuit 70. Control register 41
0, a high-level signal is output when control data “1” is written to the SIO reset control register 430, and a low-level signal is output when control data “0” is written. I have.

【0033】また制御回路70から各入出力機能部に対
して出力される初期化するためのリセット信号と、タイ
マリセット制御レジスタ410、SIOリセット制御レ
ジスタ430の出力信号との論理積をとるアンドゲート
90、92が設けられている。
An AND gate which takes the logical product of the reset signal for initialization output from the control circuit 70 to each input / output function unit and the output signals of the timer reset control register 410 and the SIO reset control register 430 90 and 92 are provided.

【0034】本実施の形態ではCPU10が、例えば、
タイマ50−1には頻繁に動作/停止を繰り返し行わせ
(その都度、リセットさせない。)、かつシリアルI/
Oインターフェース50−3には例えば、受信エラー検
出等による動作初期化をさせるようなプログラムを実行
するものとする。
In the present embodiment, for example, the CPU 10
The timer 50-1 is frequently operated / stopped repeatedly (not reset each time), and the serial I / O
It is assumed that the O interface 50-3 executes, for example, a program for initializing the operation by detecting a reception error or the like.

【0035】上記構成において、CPU10がプログラ
ムの実行を開始することにより制御回路70によりタイ
マリセット制御レジスタ410にタイマ50−1の初期
化を無効とするための制御データ「0」が、またSIO
リセット制御レジスタ430にはシリアルI/Oインタ
ーフェース50−3の初期化を有効にするための制御デ
ータ「1」が書き込まれる。
In the above configuration, when the CPU 10 starts executing the program, the control circuit 70 causes the timer reset control register 410 to store control data "0" for invalidating the initialization of the timer 50-1 and SIO.
Control data “1” for enabling initialization of the serial I / O interface 50-3 is written in the reset control register 430.

【0036】次いで制御回路70によりタイマ制御レジ
スタ41、SIO制御レジスタ43に制御データ「1」
が書き込まれ、タイマ50−1及びシリアルI/Oイン
ターフェース50−3を動作状態にする。この結果、タ
イマ50−1及びシリアルI/Oインターフェース50
−3は動作を開始する。
Next, the control circuit 70 stores the control data "1" in the timer control register 41 and the SIO control register 43.
Is written, and the timer 50-1 and the serial I / O interface 50-3 are activated. As a result, the timer 50-1 and the serial I / O interface 50
-3 starts operation.

【0037】CPU10がプログラムの実行中に制御回
路70によりタイマ制御レジスタ41に制御データ
「1」、または「0」を書き込むことにより、タイマ5
0−1を動作状態にし、または動作停止、すなわち非動
作状態にする。このとき、タイマリセット制御レジスタ
410には既に制御データ「0」が書き込まれているた
めにタイマ制御レジスタ41への制御データの書き込み
によりアンドゲート90に制御回路70よりリセット信
号が出力されるが、タイマリセット制御レジスタ410
の出力がローレベルであるためにタイマ50−1は初期
化が行われない。このために次の動作開始時には前回の
動作停止時の状態から再開される。
When the CPU 10 writes control data "1" or "0" into the timer control register 41 by the control circuit 70 during execution of the program, the timer 5
0-1 is activated or deactivated, ie, deactivated. At this time, since the control data “0” has already been written to the timer reset control register 410, the control circuit 70 outputs a reset signal to the AND gate 90 by writing the control data to the timer control register 41. Timer reset control register 410
Is low, the timer 50-1 is not initialized. Therefore, when the next operation is started, the operation is restarted from the state at the time when the previous operation was stopped.

【0038】一方、シリアルI/Oインターフェース5
0−3では受信エラー発生時にCPU10のプログラム
の実行により制御回路70によりSIO制御レジスタ4
3に制御データ「0」が書き込まれ、シリアルI/Oイ
ンターフェース50−3にはシステムクロックの供給が
停止されるためにシリアルI/Oインターフェース50
−3は動作を停止する。このとき制御回路70よりアン
ドゲート92にリセッット信号が出力され、しかも既に
SIOリセット制御レジスタ430に制御データ「1」
が書き込まれているので、シリアルI/Oインターフェ
ース50−3にリセット信号が入力され、シリアルI/
Oインターフェース50−3の初期化が行われる。
On the other hand, the serial I / O interface 5
At 0-3, when a reception error occurs, the control circuit 70 executes the SIO control register 4 by executing the program of the CPU 10.
3, the control data "0" is written to the serial I / O interface 50-3.
-3 stops the operation. At this time, the reset signal is output from the control circuit 70 to the AND gate 92, and the control data "1" is already stored in the SIO reset control register 430.
Is written, a reset signal is input to the serial I / O interface 50-3, and the serial I / O interface
The initialization of the O interface 50-3 is performed.

【0039】以上のように本発明の第3の実施の形態に
係るマイクロコントローラによれば、選択した入出力機
能部を使用しないときは、消費電力の低減を図れるだけ
でなく、動作中の入出力機能部及び動作開始時の入出力
機能部を選択的に初期化することができ、上述したよう
なプログラムの実行に対応できる。
As described above, according to the microcontroller according to the third embodiment of the present invention, when the selected input / output function unit is not used, not only can the power consumption be reduced, but also the input / output function during operation can be reduced. The output function unit and the input / output function unit at the start of the operation can be selectively initialized, so that the above-described program can be executed.

【0040】次に本発明の第4の実施の形態に係るマイ
クロコントローラの構成を図4に示す。本実施の形態に
係るマイクロコントローラが第1の実施の形態に係るマ
イクロコントローラと構成上、異なるのは、各入出力機
能部のうち動作状態にするのにシステムクロックを必要
としない非同期回路を含む入出力機能部に対して、その
非同期回路に直接、その入出力機能部に対応して設けら
れた制御レジスタより非動作状態にするための制御信号
を供給するように構成した点であり、その他の構成は同
一であるので、重複する説明は省略する。尚、図4では
説明の便宜上、非同期回路を含む入出力機能部としてタ
イマ50−1のみを例にとり、示し、これに対応してI
/Oレジスタブロック40内の制御レジスタもタイマ制
御レジスタ41のみを示し、その他の要素は省略してい
る。
Next, the configuration of a microcontroller according to a fourth embodiment of the present invention is shown in FIG. The microcontroller according to the present embodiment is different in configuration from the microcontroller according to the first embodiment in that it includes an asynchronous circuit that does not require a system clock to bring the input / output function units into an operation state. The configuration is such that a control signal for disabling the input / output function unit from the control register provided corresponding to the input / output function unit is supplied directly to the asynchronous circuit. Are the same, and redundant description will be omitted. In FIG. 4, for convenience of explanation, only the timer 50-1 is shown and shown as an example of an input / output function unit including an asynchronous circuit.
The control register in the / O register block 40 also shows only the timer control register 41, and other elements are omitted.

【0041】図4において、システムクロックはアンド
ゲート80の一方の入力端に入力されるようになってお
り、タイマ制御レジスタ41の出力は、アンドゲート8
0の他方の入力端を介してタイマ50−1内の同期回路
100に入力されると共に、直接、非同期回路102に
入力されるようになっている。
In FIG. 4, the system clock is input to one input terminal of an AND gate 80, and the output of the timer control register 41 is
0 is input to the synchronous circuit 100 in the timer 50-1 via the other input terminal, and is also directly input to the asynchronous circuit 102.

【0042】上記構成において、CPU10がプログラ
ムを実行することにより制御回路70によりタイマ制御
レジスタ41にタイマ50−1を非動作状態にする制御
データ「0」が書き込まれると、タイマ制御レジスタ4
1の出力はローレベルとなりタイマ50−1内の同期回
路100へのシステムクロックの供給が停止され、かつ
非同期回路102に直接、該非同期回路102を非動作
状態にするローレベルの信号が入力されるので、同期回
路100及び非同期回路102が同時に動作を停止す
る。
In the above configuration, when control data "0" for disabling the timer 50-1 is written into the timer control register 41 by the control circuit 70 by the CPU 10 executing the program, the timer control register 4
The output of 1 becomes low level, the supply of the system clock to the synchronous circuit 100 in the timer 50-1 is stopped, and a low level signal for disabling the asynchronous circuit 102 is directly input to the asynchronous circuit 102. Therefore, the synchronous circuit 100 and the asynchronous circuit 102 stop operating at the same time.

【0043】本発明の第4の実施の形態に係るマイクロ
コントローラによれば、システムクロックを必要としな
い非同期回路を含む入出力機能部についても使用しない
ときは消費電力の低減が図れる。
According to the microcontroller according to the fourth embodiment of the present invention, power consumption can be reduced when an input / output function unit including an asynchronous circuit which does not require a system clock is not used.

【0044】尚、本実施の形態では入出力機能部を初期
化するように構成されていないが、必要に応じて図3に
示した第3の実施の形態のように入出力機能部を選択的
に初期化できるように構成してもよい。
Although the present embodiment is not configured to initialize the input / output function unit, the input / output function unit may be selected as necessary as in the third embodiment shown in FIG. It may be configured to be able to be initialized.

【0045】[0045]

【発明の効果】以上に説明したように請求項1に記載の
マイクロコントローラによれば、マイクロコントローラ
が内蔵する複数の入出力機能部からなるI/O回路のう
ちユーザが必要な入出力機能部を複数の入出力機能部の
各々に対応して設けられた各制御レジスタにより選択可
能にしたので、不要な入出力機能部については非動作状
態にすることができ、ソフトウェア的に入出力機能を分
離可能とすることができ、それ故既存回路を大幅に変更
することなく効果的に消費電力の低減が図れると共に、
ユーザの用途に柔軟に対応することができる。
As described above, according to the microcontroller according to the first aspect, the input / output function unit required by the user among the I / O circuits including a plurality of input / output function units built in the microcontroller. Can be selected by each control register provided corresponding to each of the plurality of input / output function units, so that unnecessary input / output function units can be deactivated, and the input / output function can be set by software. It can be separable, so that power consumption can be effectively reduced without significantly changing existing circuits.
It is possible to flexibly cope with a user's purpose.

【0046】また請求項1に記載のマイクロコントロー
ラによれば、入出力機能部の各々を動作状態または非動
作状態にするための制御データを対応する制御レジスタ
に書き込む際に複数の入出力機能部の各々を初期化しな
いようにしたので、入出力機能部を動作状態から非動作
状態に、またはその逆の状態に変更させた際のその前後
で入出力機能の状態は変化せず、例えば、タイマ等にお
いて動作を中断したときの状態から動作を再開させるこ
とができる。
According to the first aspect of the present invention, a plurality of input / output function units are used when writing control data for setting each of the input / output function units to an operation state or a non-operation state in a corresponding control register. Are not initialized, the state of the input / output function does not change before and after the input / output function unit is changed from the operating state to the inactive state, or vice versa, for example, The operation can be resumed from the state when the operation was interrupted by a timer or the like.

【0047】請求項2に記載のマイクロコントローラに
よれば、複数の制御レジスタに複数の入出力機能部の各
々を動作状態または非動作状態にする制御データを書き
込む際に制御手段よりリセット信号が出力され、該制御
データが書き込まれる制御レジスタに対応する前記複数
の入出力機能部が初期化されるようにしたので、請求項
1に記載の発明により得られる効果に加えて、動作中の
入出力機能部及び動作開始時の入出力機能部を初期化す
ることができる。
According to the microcontroller of the present invention, the reset signal is output from the control means when the control data for making each of the plurality of input / output function units an operation state or a non-operation state is written in the plurality of control registers. The plurality of input / output function units corresponding to the control registers into which the control data is written are initialized, so that in addition to the effects obtained by the invention according to claim 1, the input / output during operation is The function unit and the input / output function unit at the start of the operation can be initialized.

【0048】請求項3に記載のマイクロコントローラに
よれば、複数の入出力機能部の各々を動作状態または非
動作状態にするための複数の制御レジスタとは別に、複
数の入出力機能部に対応して制御手段により書き込まれ
た制御データに基づいて複数の入出力機能部の各々の初
期化を有効または無効にするための制御信号を出力する
複数のリセット制御レジスタを設け、複数の入出力機能
部の各々の初期化を選択的に行うようにしたので、選択
した入出力機能部を使用しないときは、消費電力の低減
が図れるだけでなく、動作中の入出力機能部及び動作開
始時の入出力機能部を選択的に初期化することができ
る。
According to the third aspect of the present invention, a plurality of input / output function units are provided separately from a plurality of control registers for setting each of the plurality of input / output function units to an operation state or a non-operation state. A plurality of reset control registers for outputting a control signal for enabling or disabling initialization of each of the plurality of input / output function units based on control data written by the control means; Since the initialization of each unit is performed selectively, when not using the selected input / output function unit, not only the power consumption can be reduced, but also the input / output function unit during operation and the operation start time The input / output function unit can be selectively initialized.

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

【図1】本発明の第1の実施の形態に係るマイクロコン
トローラの構成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of a microcontroller according to a first embodiment of the present invention.

【図2】本発明の第2の実施の形態に係るマイクロコン
トローラの構成を示すブロック図。
FIG. 2 is a block diagram showing a configuration of a microcontroller according to a second embodiment of the present invention.

【図3】本発明の第3の実施の形態に係るマイクロコン
トローラの構成を示すブロック図。
FIG. 3 is a block diagram showing a configuration of a microcontroller according to a third embodiment of the present invention.

【図4】本発明の第4の実施の形態に係るマイクロコン
トローラの構成を示すブロック図。
FIG. 4 is a block diagram showing a configuration of a microcontroller according to a fourth embodiment of the present invention.

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

10 CPU 20 ROM 30 RAM 40 I/Oレジスタブロック 41 タイマ制御レジスタ 42 入出力ポート制御レジスタ 43 SIO制御レジスタ 44 A/D制御レジスタ 50−1 タイマ 50−2 入出力ポート 50−3 シリアルI/Oインターフェース 50−4 アナログ/ディジタル変換部 60 内部バス 70 制御回路 100 同期回路 102 非同期回路 10 CPU 20 ROM 30 RAM 40 I / O register block 41 Timer control register 42 I / O port control register 43 SIO control register 44 A / D control register 50-1 Timer 50-2 I / O port 50-3 Serial I / O interface 50-4 Analog / Digital Converter 60 Internal Bus 70 Control Circuit 100 Synchronous Circuit 102 Asynchronous Circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 入出力機能に関連する動作を行う複数の
入出力機能部と、 各々前記複数の入出力機能部の各々に対応して設けら
れ、書き込まれた制御データに基づいて該対応する入出
力機能部を動作状態または非動作状態にする制御信号を
出力する複数の制御レジスタと、 前記複数の入出力機能部の各々を動作状態または非動作
状態にするための制御データを前記複数の制御レジスタ
の少なくとも1つに書き込む制御手段と、 を有することを特徴とするマイクロコントローラ。
1. A plurality of input / output function units for performing operations related to input / output functions, each provided corresponding to each of the plurality of input / output function units, and corresponding to each other based on written control data. A plurality of control registers for outputting a control signal for setting the input / output function unit to an operation state or a non-operation state; and the control data for setting each of the plurality of input / output function units to an operation state or a non-operation state. Control means for writing to at least one of the control registers.
【請求項2】 前記制御手段は、前記複数の制御レジス
タに前記制御データを書き込む際に該制御データが書き
込まれる制御レジスタに対応する前記複数の入出力機能
部を初期化することを特徴とする請求項1に記載のマイ
クロコントローラ。
2. The control means initializes the plurality of input / output function units corresponding to the control register to which the control data is written, when writing the control data into the plurality of control registers. The microcontroller according to claim 1.
【請求項3】 入出力機能に関連する動作を行う複数の
入出力機能部と、 各々前記複数の入出力機能部の各々に対応して設けら
れ、書き込まれた第1の制御データに基づいて該対応す
る入出力機能部を動作状態または非動作状態にする制御
信号を出力する複数の制御レジスタと、 各々前記複数の入出力機能部の各々に対応して設けら
れ、該対応する入出力機能部に対して、書き込まれた第
2の制御データに基づいて初期化を有効または無効にす
る制御信号を出力する複数のリセット制御レジスタと、 前記複数の入出力機能部の各々を動作状態または非動作
状態にするための前記第1の制御データを前記複数の制
御レジスタの少なくとも1つに書き込み、かつ前記複数
の入出力機能部に対する初期化を有効または無効にする
ための前記第2の制御データを前記複数のリセット制御
レジスタの少なくとも1つに書き込むと共に、前記複数
の入出力機能部の各々に対して初期化を行うためのリセ
ット信号を出力する制御手段と、 を有することを特徴とするマイクロコントローラ。
3. A plurality of input / output function units that perform operations related to the input / output function, and are provided corresponding to each of the plurality of input / output function units, based on written first control data. A plurality of control registers for outputting a control signal for setting the corresponding input / output function unit to an operation state or a non-operation state; and a plurality of control registers provided corresponding to each of the plurality of input / output function units; A plurality of reset control registers for outputting a control signal for enabling or disabling initialization based on the written second control data to the unit; The second control for writing the first control data for attaining an operation state to at least one of the plurality of control registers and for enabling or disabling initialization of the plurality of input / output function units. Control means for writing control data to at least one of the plurality of reset control registers and outputting a reset signal for initializing each of the plurality of input / output function units. Microcontroller.
JP10123471A 1998-05-06 1998-05-06 Microcontroller Pending JPH11316626A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10123471A JPH11316626A (en) 1998-05-06 1998-05-06 Microcontroller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10123471A JPH11316626A (en) 1998-05-06 1998-05-06 Microcontroller

Publications (1)

Publication Number Publication Date
JPH11316626A true JPH11316626A (en) 1999-11-16

Family

ID=14861456

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10123471A Pending JPH11316626A (en) 1998-05-06 1998-05-06 Microcontroller

Country Status (1)

Country Link
JP (1) JPH11316626A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009087121A (en) * 2007-10-01 2009-04-23 Nec Electronics Corp Semiconductor integrated circuit and control method for semiconductor integrated circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009087121A (en) * 2007-10-01 2009-04-23 Nec Electronics Corp Semiconductor integrated circuit and control method for semiconductor integrated circuit

Similar Documents

Publication Publication Date Title
JP2655615B2 (en) Information processing device
JPH04236682A (en) Microcomputer system
JP2636691B2 (en) Microcomputer
WO2007037930A2 (en) PERFORMING AN N-BIT WRITE ACCESS TO AN MxN-BIT-ONLY PERIPHERAL
JPH07295693A (en) Electric power management unit, computer system and method of accessing plural configuration registers in electric power management unit of computer
JPH11316626A (en) Microcontroller
US5623648A (en) Controller for initiating insertion of wait states on a signal bus
JP3283505B2 (en) Microcomputer
JPH08255034A (en) Low power consumption type data processor
JP2581080B2 (en) Microprocessor for debugging
JPH11259356A (en) Initializing device
JP3006487B2 (en) Emulation device
JPS6043757A (en) Microcomputer of one chip
JPH06259264A (en) Clock control circuit
JPH05324119A (en) Information processor
JPH0443418A (en) Data processor
JP2008191840A (en) Control system and control method
JP2002132579A (en) Register control apparatus
JPH09325935A (en) Bus switching circuit
JPH04205118A (en) Data processing system
JP2000207379A (en) Cpu and microcomputer system
JPH07175748A (en) Microcomputer system
JPH05173715A (en) Input/output circuit
JPH0543142B2 (en)
JPS62248043A (en) Memory switching circuit for fetching microcomputer instruction