JPH04213106A - One chip microcomputer - Google Patents

One chip microcomputer

Info

Publication number
JPH04213106A
JPH04213106A JP2401026A JP40102690A JPH04213106A JP H04213106 A JPH04213106 A JP H04213106A JP 2401026 A JP2401026 A JP 2401026A JP 40102690 A JP40102690 A JP 40102690A JP H04213106 A JPH04213106 A JP H04213106A
Authority
JP
Japan
Prior art keywords
power save
save mode
ram
chip microcomputer
reset
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
JP2401026A
Other languages
Japanese (ja)
Inventor
Kenichi Ono
健一 小野
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2401026A priority Critical patent/JPH04213106A/en
Publication of JPH04213106A publication Critical patent/JPH04213106A/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

PURPOSE:To exactly operate the releasing operation of the power save mode of a one chip microcomputer having the power save mode by a few RAM and program utilizing amount. CONSTITUTION:The one chip microcomputer 7 is equipped with an RAM enable register 11 which inputs a reset signal 12 and a power save mode releasing signal 13, and whose value is set to be 1 or o by each input signal. The power save mode releasing operation can be realized by a few RAM and program capacity, so that the areas can be availably utilized. And also, the above mentioned operations can be exactly operated by 100%, so that a reliability can be improved.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、パワーセーブモードを
有するワンチップマイクロコンピュータにおいて、パワ
ーセーブモードを解除して通常動作モードへ復帰させる
方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for canceling the power save mode and returning to the normal operation mode in a one-chip microcomputer having a power save mode.

【0002】0002

【従来の技術】システムの低消費電力化を目的として、
近年、ワンチップマイクロコンピュータでは、通常の動
作が不要な時は、CPUおよび周辺機能動作を停止し、
RAMデータの保持のみを行なう低消費電力動作モード
(以下パワーセーブモードと称する)を備えるようにな
った。このような、パワーセーブモードを備えたワンチ
ップマイクロコンピュータにおける、パワーセーブモー
ドから通常動作モードへの復帰方式については、従来、
特開昭57−147198号公報に開示されるものがあ
る。図3は、その方式を実施するためのシステム構成を
示す図である。図3において、1はバッテリ、2はパワ
ーセーブモード解除スイッチ、3はパワーオンリセット
装置、4はパワーセーブモード信号発生装置、5はリセ
ット端子、7はワンチップマイクロコンピュータ、8は
CPU、9はRAM、10は内部データバスである。
[Background Art] For the purpose of reducing system power consumption,
In recent years, one-chip microcomputers have stopped the operation of the CPU and peripheral functions when normal operation is not required.
A low power consumption operation mode (hereinafter referred to as power save mode) is now provided in which only RAM data is held. Conventionally, methods for returning from power save mode to normal operation mode in such a one-chip microcomputer equipped with power save mode have been
There is one disclosed in JP-A-57-147198. FIG. 3 is a diagram showing a system configuration for implementing the method. In FIG. 3, 1 is a battery, 2 is a power save mode release switch, 3 is a power-on reset device, 4 is a power save mode signal generator, 5 is a reset terminal, 7 is a one-chip microcomputer, 8 is a CPU, and 9 is a RAM 10 is an internal data bus.

【0003】ワンチップマイクロコンピュータ7の動作
は、バッテリ1が接続された時点から開始し、まず、パ
ワーオンリセット装置3により、リセット端子5を介し
、CPU8に対してリセット信号が入力される。このと
きCPU8は、プログラムの所定番地から動作を開始し
、まず、RAM9の特定領域をチェックし、パワーセー
ブモードに入る前に書込まれるべき所定の値が、書込ま
れているかどうかをチェックする。ここでは、パワーオ
ンリセット時であるため、RAM9には所定の値は書込
まれておらず、従ってCPU8は、RAM9のデータは
不定と判断し、RAM9をイニシャライズする。さらに
CPU8は、通常動作モードでの必要動作を終了後は、
消費電流低減のためパワーセーブモードに移行する。こ
のとき、パワーセーブモードに移行する前に、予めパワ
ーセーブモードから通常動作モードに復帰した際の、R
AM9の状態をチェックできるように、RAM9の特定
領域に所定の値を書込む動作を行なっておく。次に、パ
ワーセーブモード時において、スイッチ2をONするこ
とにより、パワーセーブモードが解除される。このとき
、CPU8は、予め書込んだRAM9のデータを読出し
て、書込み時と変化ないかをチェックするが、パワーセ
ーブモード解除時には変化がないため、RAM9のデー
タを保持したまま、通常動作モードでの処理を行なう。
The operation of the one-chip microcomputer 7 starts when the battery 1 is connected. First, a reset signal is inputted to the CPU 8 by the power-on reset device 3 via the reset terminal 5. At this time, the CPU 8 starts operating from a predetermined location in the program, and first checks a specific area of the RAM 9 to see if a predetermined value that should be written before entering the power save mode has been written. . Here, since it is a power-on reset time, the predetermined value is not written in the RAM 9, so the CPU 8 determines that the data in the RAM 9 is undefined, and initializes the RAM 9. Furthermore, after the CPU 8 completes the necessary operations in the normal operation mode,
Shifts to power save mode to reduce current consumption. At this time, before transitioning to power save mode, R
In order to check the state of AM9, a predetermined value is written in a specific area of RAM9. Next, in the power save mode, the power save mode is canceled by turning on the switch 2. At this time, the CPU 8 reads the pre-written data in the RAM 9 and checks to see if it has changed from when it was written. However, since there is no change when the power save mode is canceled, the CPU 8 retains the data in the RAM 9 and returns to the normal operation mode. Process.

【0004】0004

【発明が解決しようとする課題】従来のパワーセーブモ
ード解除方法では、パワーオンリセット時の不定RAM
データと、パワーセーブモードに入る前に書込まれるべ
き判定データとを比較するため、両者が一致する可能性
があった。このとき、ワンチップマイクロコンピュータ
は誤動作してしまう。ここで、比較するRAMのデータ
数(ビット数)をnとすると、両者の値が一致する確率
xは、次の式で表わされる。
[Problems to be Solved by the Invention] In the conventional power save mode release method, the undefined RAM is
Since the data is compared with the determination data that should be written before entering the power save mode, there is a possibility that the two will match. At this time, the one-chip microcomputer malfunctions. Here, if the number of data (number of bits) of the RAM to be compared is n, the probability x that both values match is expressed by the following equation.

【0005】[0005]

【数1】[Math 1]

【0006】数1より、パワーオンリセット時に、ワン
チップマイクロコンピュータが誤動作する確率xを低く
しようとすると、RAMデータのビット数nを大きくと
る必要がある。例えば、n=16の場合、x=1.5×
10−5 となり、ワンチップマイクロコンピュータの
10万個につき、誤動作するものが1.5 個発生する
ことになる。この不良発生率を低くしようとした場合、
多くのRAM領域、およびプログラム領域を余分に使用
して、パワーセーブモード解除動作を行なわなければな
らないという問題点があり、その結果、RAM容量,プ
ログラム容量の不足が生じる可能性がある。
From Equation 1, in order to reduce the probability x that the one-chip microcomputer malfunctions at the time of power-on reset, it is necessary to increase the number of bits n of RAM data. For example, if n=16, x=1.5×
10-5, which means that for every 100,000 one-chip microcomputers, 1.5 will malfunction. If you try to reduce this defect rate,
There is a problem in that a large amount of RAM area and program area must be used to perform the power save mode release operation, and as a result, there is a possibility that the RAM capacity and program capacity will be insufficient.

【0007】本発明は、以上の点に鑑み行なわれたもの
で、上記の如く、余分なRAM領域およびプログラム領
域を使用することなく、しかも、確実に、パワーセーブ
モード解除動作を行なうことのできるワンチップマイク
ロコンピュータを提供することにある。
The present invention has been made in view of the above points, and as described above, it is possible to perform the power save mode cancellation operation reliably without using extra RAM area and program area. Our goal is to provide a one-chip microcomputer.

【0008】[0008]

【課題を解決するための手段】上記問題点を解決するた
め、本発明では、パワーセーブモードを有するワンチッ
プマイクロコンピュータにおいて、リセット信号と、パ
ワーセーブモード解除信号とを識別できるRAMイネー
ブルレジスタ(以下RAMEと称する)を設けた。
[Means for Solving the Problems] In order to solve the above-mentioned problems, the present invention provides a RAM enable register (hereinafter referred to as RAME) was established.

【0009】[0009]

【作用】本発明の構成による、ワンチップマイクロコン
ピュータでは、リセットがかかった場合には、RAME
の値が0に、また、パワーセーブモード解除時には、R
AMEの値が1となる。一方、CPUはいずれの場合も
、プログラム上の同じ番地から動作を開始する。このと
き、RAMEの値が0のときはRAMデータのイニシャ
ライズを行ない、RAMEの値が1のときは、RAMデ
ータを保存したまま次の処理を行なうプログラム構成と
することで、従来例の如く余分なRAM領域、およびプ
ログラム領域を使うことなく、リセットがかかったのか
、パワーセーブモードが解除された状態なのかを容易に
識別することが可能である。
[Operation] In the one-chip microcomputer according to the configuration of the present invention, when a reset is applied, the RAME
When the value of R becomes 0, and when power save mode is canceled, R
The value of AME becomes 1. On the other hand, in either case, the CPU starts operating from the same address on the program. At this time, if the value of RAME is 0, the RAM data is initialized, and if the value of RAME is 1, the program structure is such that the next process is performed while saving the RAM data, so that the excess data is saved as in the conventional example. It is possible to easily identify whether a reset has been applied or the power save mode has been canceled without using a large RAM area or program area.

【0010】0010

【実施例】図1に、本発明の一実施例である、パワーセ
ーブモードからの復帰検出回路を示す。図1において、
パワーオンリセット装置3は、バッテリ1の電圧が下が
ったとき、ワンチップマイクロコンピュータ7に対し、
リセット端子5を介して、リセット信号12を入力する
。また、パワーセーブモード解除信号発生装置4は、ス
イッチ2をONした際に立上りエッジを発生させ、マイ
クロコンピュータ7に対し、パワーセーブモード解除端
子(以下PSMC端子と称する)6を介して、パワーセ
ーブモード解除信号(以下PSMC信号と称する)13
を入力する。一方、RAME11は、前記リセット信号
12入力時は値を0に、また、PSMC信号入力時は値
を1に設定するレジスタである。このとき、それら入力
信号は、CPU8に対しては、どちらもリセット動作を
行なう。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows a circuit for detecting return from power save mode, which is an embodiment of the present invention. In Figure 1,
When the voltage of the battery 1 drops, the power-on reset device 3 causes the one-chip microcomputer 7 to
A reset signal 12 is input via the reset terminal 5. Further, the power save mode release signal generator 4 generates a rising edge when the switch 2 is turned on, and sends a power save mode signal to the microcomputer 7 via a power save mode release terminal (hereinafter referred to as PSMC terminal) 6. Mode release signal (hereinafter referred to as PSMC signal) 13
Enter. On the other hand, RAME11 is a register that sets the value to 0 when the reset signal 12 is input, and sets the value to 1 when the PSMC signal is input. At this time, both of these input signals perform a reset operation on the CPU 8.

【0011】図2は、パワーセーブモードからの復帰検
出プログラムのフローチャート例を示す図である。図1
の実施例を、図2を用いて説明する。まず、パワーオン
リセット時(ステップ106)には、リセット信号13
の入力により、RAME11の値を0に設定する(ステ
ップ108)。このときには、CPU8は、初期設定ル
ーチン(ステップ101)を経て、RAME11の値を
判定(ステップ102)し、その結果(RAME11の
値は0のためNOへ進む)、RAM9に対し、イニシャ
ライズ(ステップ103)を行なう。その後、メインル
ーチン(ステップ104)に入り、予めプログラムされ
た処理を行なう。メインルーチンでの処理が終了すると
、ワンチップマイクロコンピュータ7は、消費電流低減
のためパワーセーブモード(ステップ105)に移る。 パワーセーブモードの解除は、リセット信号12あるい
はパワーセーブモード解除信号13のいずれかで行なう
が、リセット信号12入力の場合は、上記説明(ステッ
プ106より)と同様である。パワーセーブモード解除
信号12入力の場合(ステップ107)には、RAME
11の値が1に設定される。このときには、CPU8は
、初期設定ルーチン(ステップ101)を経て、RAM
E11の値を判定(ステップ102)し、その結果(R
AME11の値は1のためYESに進む)、RAM9の
データを保存したまま、メインルーチン(ステップ10
4)に入る。
FIG. 2 is a diagram showing an example of a flowchart of a program for detecting return from power save mode. Figure 1
An example will be described using FIG. 2. First, at the time of power-on reset (step 106), the reset signal 13
By inputting , the value of RAME11 is set to 0 (step 108). At this time, the CPU 8 goes through the initial setting routine (step 101), determines the value of RAME11 (step 102), and as a result (proceeds to NO because the value of RAME11 is 0), initializes the RAM9 (step 103). ). Thereafter, the main routine (step 104) is entered and pre-programmed processing is performed. When the processing in the main routine is completed, the one-chip microcomputer 7 shifts to a power save mode (step 105) to reduce current consumption. The power save mode is canceled using either the reset signal 12 or the power save mode release signal 13, and in the case of inputting the reset signal 12, the same as the above explanation (from step 106) is performed. In the case of power save mode release signal 12 input (step 107), RAME
The value of 11 is set to 1. At this time, the CPU 8 goes through the initial setting routine (step 101), and then the RAM
The value of E11 is determined (step 102), and the result (R
The value of AME11 is 1, so proceed to YES), and proceed to the main routine (step 10) with the data in RAM9 saved.
4) Enter.

【0012】0012

【発明の効果】本発明によれば、ワンチップマイクロコ
ンピュータのパワーセーブモード解除動作を、使用する
RAM領域およびプログラム領域が少ない量で実現でき
るため、RAMおよびプログラム領域の有効活用、ある
いは小容量化(小形化)ができる。また、上記動作を、
100%確実に行なうことができ、信頼性の向上に効果
がある。
According to the present invention, the power save mode release operation of a one-chip microcomputer can be realized with a small amount of RAM area and program area, which makes it possible to effectively utilize the RAM and program area, or to reduce the capacity. (miniaturization) is possible. Also, the above operation,
This can be done with 100% certainty and is effective in improving reliability.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】パワーセーブモードからの復帰検出回路図であ
る。
FIG. 1 is a circuit diagram for detecting return from power save mode.

【図2】パワーセーブモードからの復帰検出フローチャ
ート図である。
FIG. 2 is a flowchart for detecting return from power save mode.

【図3】パワーセーブモードからの復帰方法を示す従来
例である。
FIG. 3 is a conventional example showing a method of returning from power save mode.

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

5…リセット端子、6…パワーセーブモード解除端子、
10…内部データバス、11…RAMイネーブルレジス
タ。
5...Reset terminal, 6...Power save mode release terminal,
10...Internal data bus, 11...RAM enable register.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】パワーセーブモードを有するワンチップマ
イクロコンピュータにおいて、リセット信号と、パワー
セーブモード解除信号とを識別できるレジスタを設けた
ことを特徴とするワンチップマイクロコンピュータ。
1. A one-chip microcomputer having a power save mode, characterized in that the one-chip microcomputer is provided with a register that can distinguish between a reset signal and a power save mode release signal.
JP2401026A 1990-12-10 1990-12-10 One chip microcomputer Pending JPH04213106A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2401026A JPH04213106A (en) 1990-12-10 1990-12-10 One chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2401026A JPH04213106A (en) 1990-12-10 1990-12-10 One chip microcomputer

Publications (1)

Publication Number Publication Date
JPH04213106A true JPH04213106A (en) 1992-08-04

Family

ID=18510887

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2401026A Pending JPH04213106A (en) 1990-12-10 1990-12-10 One chip microcomputer

Country Status (1)

Country Link
JP (1) JPH04213106A (en)

Similar Documents

Publication Publication Date Title
JP2696511B2 (en) Return method from power down mode
JPS59200327A (en) Control system of peripheral device
WO2002012988A9 (en) Method and system for providing gated clock signal to a csr block
JPH04213106A (en) One chip microcomputer
JPH0532142A (en) Watch dog timer device of microcomputer system supply
JPH10105422A (en) Control circuit of protecting device
JP3110222B2 (en) Microcomputer
JP2751822B2 (en) Memory control method for FIFO memory device
JP2702972B2 (en) Memory initialization method
JPS59163653A (en) Debug device
JP2001203324A (en) Integrated circuit and method for controlling its operation
JPS6278617A (en) Power saving mpu system
JPS60258623A (en) Microcomputer
JP2000020498A (en) Microcomputer and its restoring method
JPS59227094A (en) Electronic computer
JPS60120443A (en) Detecting circuit of undefined instruction
JP2000330669A (en) Reset circuit of semiconductor integrated circuit
JPH1115745A (en) Automatic return circuit for i/o interface, and i/o interface
JPH07129435A (en) Processor with runaway monitoring function
JPH1021145A (en) Reset protection circuit
JPH03252831A (en) Method for collecting ras information by dma transfer
JPH0830442A (en) Program starting method for computer control unit, and computer control unit
JPH04359309A (en) Reset circuit for microcomputer device
JPH06131207A (en) Fault control method for input/output device
JPH0447734U (en)