JP2000010783A - Program control method for electronic equipment - Google Patents

Program control method for electronic equipment

Info

Publication number
JP2000010783A
JP2000010783A JP10177174A JP17717498A JP2000010783A JP 2000010783 A JP2000010783 A JP 2000010783A JP 10177174 A JP10177174 A JP 10177174A JP 17717498 A JP17717498 A JP 17717498A JP 2000010783 A JP2000010783 A JP 2000010783A
Authority
JP
Japan
Prior art keywords
cpu
ram
microcomputer
program
saving mode
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
JP10177174A
Other languages
Japanese (ja)
Inventor
Yoshio Kashiwagi
芳雄 柏樹
Yoshihiro Iwata
義弘 岩田
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 Denshi KK
Original Assignee
Hitachi Denshi KK
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 Denshi KK filed Critical Hitachi Denshi KK
Priority to JP10177174A priority Critical patent/JP2000010783A/en
Publication of JP2000010783A publication Critical patent/JP2000010783A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To solve problems of current consumption, a processing speed, etc., generated so far when a program was run on an external memory by using a microcomputer which has a CPU and a RAM in the same packet. SOLUTION: The microcomputer 1 incorporates the CPU 2 and the RAM 3 in the same package. The CPU 2 is able to access a ROM 4 and the internal RAM 3 through an address bus. The program that the CPU 2 reads out is stored in the external ROM 4. Further, a program for a process for switching the microcomputer 1 to power-saving mode is also stored as a data group in the external ROM 4. When the microcomputer 1 is switched to the power-saving mode, the data group is copied to a specific area of the internal RAM 3 and then a jump to the head of the area is made to perform the process for switching to the power-saving mode. After the jump to the area of the RAM 3 is made, the external ROM 3 is not active, so the current consumption of the external ROM 4 is suppressed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロプロセッ
サ(以下、マイコン)および制御用プログラムを内蔵す
る電子機器のプログラム制御方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program control method for an electronic device having a microprocessor (hereinafter, "microcomputer") and a control program.

【0002】[0002]

【従来の技術】従来、この種の電子機器の構成の一例を
図3に示す。CPU2は、この電子機器の各種制御を行
う。その制御用プログラムは外部ROM4に格納されて
いる。また、RAM3は外部ROM4と同様に、CPU
2外部にアドレスバスを通じて接続される。この機器の
電源スイッチ5は、CPU2に接続され、ソフトウェア
で機器の電源制御を行う。この構成の従来例の動作を次
に説明する。こので電子機器が動作中に、電源スイッチ
5を押すと、CPU2は周辺回路の電源をOFF状態に
した後、CPU2自身を省電力モード(CPUの機種に
よって、スタンバイモード、スリープモード等と呼ばれ
る)に切り替える(このCPU2を省電力モードに切り
替える処理も、外部ROM4の中に格納される)。この
とき、CPU2および外部ROM4には電源が供給され
ている(再度電源をONする処理も外部ROM4に格納
されているので、その電源を切ることはできない)が、
外部からは、この機器の電源がOFFになったように見
える。CPU2が省電力モードに切り替わった状態で
も、外部ROM4がアクティブ状態(CPU2のプログ
ラムカウンタ(PC)が外部ROM4のアドレスを指し
た状態)にあるので、大きな電流が消費される。この電
流値はROMの種類により異なるが、スタンバイ状態
(CPU2のプログラムカウンタ(PC)が外部ROM
4のアドレスを指していない状態)に比べると大きな値
になる。
2. Description of the Related Art FIG. 3 shows an example of the configuration of a conventional electronic device. The CPU 2 performs various controls of the electronic device. The control program is stored in the external ROM 4. The RAM 3 has a CPU similar to the external ROM 4.
2 connected to the outside through an address bus. The power switch 5 of this device is connected to the CPU 2 and controls the power of the device by software. The operation of the conventional example having this configuration will be described below. When the power switch 5 is pressed while the electronic device is operating, the CPU 2 turns off the power of the peripheral circuits, and then sets the CPU 2 itself in a power saving mode (called a standby mode, a sleep mode, or the like depending on the type of CPU). (The process of switching the CPU 2 to the power saving mode is also stored in the external ROM 4). At this time, the power is supplied to the CPU 2 and the external ROM 4 (the process of turning on the power again is also stored in the external ROM 4, so the power cannot be turned off).
From the outside, it looks as if the power of this device was turned off. Even when the CPU 2 is switched to the power saving mode, a large current is consumed because the external ROM 4 is in the active state (the program counter (PC) of the CPU 2 points to the address of the external ROM 4). Although this current value differs depending on the type of ROM, the standby state (the program counter (PC) of the CPU 2 is
4 (a state in which address 4 is not pointed).

【0003】次に、同じ図3に示す構成の電子機器にお
いて、別の動作例を説明する。この例で使用するCPU
2は、プログラムを外部メモリにおいて動かす場合、処
理クロックが内部メモリの場合と比べて2〜3倍かかる
(処理速度が1/2〜1/3になる)。これを解決しよ
うとすると、動作クロックを高くする必要が生じ、CP
UやROMの種類が制約される、CPUの消費電流が大
きくなるなどの問題が発生する。
Next, another operation example of the electronic apparatus having the configuration shown in FIG. 3 will be described. CPU used in this example
(2) When the program is run in the external memory, the processing clock is 2-3 times longer than in the case of the internal memory (the processing speed becomes 1/2 to 1/3). In order to solve this, it is necessary to increase the operation clock, and the CP
Problems such as restrictions on the types of U and ROM and an increase in current consumption of the CPU occur.

【0004】[0004]

【発明が解決しようとする課題】前述の従来例の様に、
外部ROMに格納されたプログラムでCPUを動作させ
ると、消費電流や処理速度の面で不利になる場合があ
る。本発明は、これらの問題点を解決することを目的と
する。
SUMMARY OF THE INVENTION As described above,
Operating the CPU with a program stored in an external ROM may be disadvantageous in terms of current consumption and processing speed. The present invention aims to solve these problems.

【0005】[0005]

【課題を解決するための手段】本発明は、上記目的を達
成するため、CPUとRAMを同一パッケージに内蔵し
たマイコンを使用するようにしたものである。また、C
PUが読み出すプログラムの一部をマイコン内部のRA
Mに格納し、状況に応じてこのRAM内のプログラムで
動作させるようにしたものである。例えば、前述の従来
例において、マイコンを省電力モードに切り替える処理
を内部RAMに格納して動作させれば、マイコンが省電
力モードに切り替わった状態でROMがアクティブ状態
にならない(内部RAMがアクティブになる)ので、RO
Mの消費電流はスタンバイ状態での値になる。また、従
来の他の例において、高い処理速度が必要となる処理の
み内部RAMに格納して動作させれば、動作クロックを
高くする必要が生じないので、前述の問題は発生しな
い。
In order to achieve the above object, the present invention uses a microcomputer having a CPU and a RAM incorporated in the same package. Also, C
A part of the program read by the PU is
M and is operated by a program in the RAM according to the situation. For example, in the above-described conventional example, if the process of switching the microcomputer to the power saving mode is stored in the internal RAM and operated, the ROM does not become active when the microcomputer is switched to the power saving mode (the internal RAM becomes active). RO)
The current consumption of M is a value in the standby state. Further, in another conventional example, if only the processing requiring a high processing speed is stored in the internal RAM and operated, the operation clock does not need to be increased, so that the above-described problem does not occur.

【0006】[0006]

【発明の実施の形態】図1と図2に本発明の一実施例を
示す。図1は本実施例の電子機器の内部構成図、図2は
ROMおよびRAMのアドレス割付を示すアドレスマッ
プである。図1に示すように、マイコン1は、同一パッ
ケージ内にCPU2とRAM3を内蔵する。CPUは、
アドレスバスを通して外部ROM4、および内部RAM
3それぞれにアクセスできる。CPU2が読み出すプロ
グラムは外部ROM4に格納されている。また、マイコ
ン1を省電力モードに切り替える処理のプログラムも、
データ群として外部ROM4に格納しておく。
1 and 2 show an embodiment of the present invention. FIG. 1 is an internal configuration diagram of the electronic apparatus of the present embodiment, and FIG. 2 is an address map showing address assignment of a ROM and a RAM. As shown in FIG. 1, the microcomputer 1 includes a CPU 2 and a RAM 3 in the same package. The CPU
External ROM 4 and internal RAM through address bus
3 each can be accessed. The program read by the CPU 2 is stored in the external ROM 4. In addition, a program for processing for switching the microcomputer 1 to the power saving mode is also provided.
The data is stored in the external ROM 4 as a data group.

【0007】さらに、図2に示すようにマイコン1を省
電力モードに切り替える際(例えば、機器の電源スイッ
チ5が押されたとき)には、このデータ群を内部RAM
3の特定領域にコピーした後、この領域の先頭(アドレ
スa)にジャンプする事で、省電力モードへの切り替え
処理が実行される。RAM3領域にジャンプした後は外
部ROM4がアクティブ状態にない(CPU2が外部R
OM4をアクセスしていない)ので、省電力モードでの
外部ROM4の消費電流が抑えられる。同様の構成で、
動作速度が要求される処理(複雑なデータ演算など)を
起動時に内部RAM3にコピーしておけば、この処理が
呼び出されたときCPU2は内部RAM3をアクセスす
るので、同じ動作クロックのままで動作速度を高めるこ
とができる。
Further, as shown in FIG. 2, when the microcomputer 1 is switched to the power saving mode (for example, when the power switch 5 of the device is pressed), this data group is stored in the internal RAM.
After copying to the specific area of No. 3, the processing is switched to the power saving mode by jumping to the head (address a) of this area. After jumping to the RAM 3 area, the external ROM 4 is not in an active state (the CPU 2
Since the OM 4 is not accessed), the current consumption of the external ROM 4 in the power saving mode can be suppressed. With a similar configuration,
If a process requiring an operation speed (such as a complicated data operation) is copied to the internal RAM 3 at the time of startup, the CPU 2 accesses the internal RAM 3 when this process is called. Can be increased.

【0008】[0008]

【発明の効果】本発明により、消費電流、処理速度な
ど、従来外部メモリでプログラムを動作させた場合に生
じていた問題点を解決することができる。
According to the present invention, it is possible to solve problems such as current consumption and processing speed which have conventionally occurred when a program is operated in an external memory.

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

【図1】本発明の一実施例の構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】本発明の一実施例のアドレスマップを示す図。FIG. 2 is a diagram showing an address map according to one embodiment of the present invention.

【図3】従来技術の構成例を示すブロック図。FIG. 3 is a block diagram showing a configuration example of a conventional technique.

【符号の説明】 1:マイコン、 2:CPU、3:
内部RAM、 4:外部ROM、5:
電源スイッチ。
[Description of symbols] 1: microcomputer, 2: CPU, 3:
Internal RAM, 4: External ROM, 5:
Power switch.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 マイクロプロセッサと、該マイクロプロ
セッサに内蔵された内部メモリと、外部メモリとを有す
る電子機器において、 上記マイクロプロセッサを省電力モードとするときに、
上記マイクロプロセッサを省電力モードに切替る処理プ
ログラムを上記外部メモリから上記内部メモリにコピー
した後、該内部メモリをアクセスすることを特徴とする
電子機器のプログラム制御方法。
1. An electronic device having a microprocessor, an internal memory built in the microprocessor, and an external memory, wherein when the microprocessor is set to a power saving mode,
A program control method for an electronic device, wherein a processing program for switching the microprocessor to a power saving mode is copied from the external memory to the internal memory, and the internal memory is accessed.
JP10177174A 1998-06-24 1998-06-24 Program control method for electronic equipment Pending JP2000010783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10177174A JP2000010783A (en) 1998-06-24 1998-06-24 Program control method for electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10177174A JP2000010783A (en) 1998-06-24 1998-06-24 Program control method for electronic equipment

Publications (1)

Publication Number Publication Date
JP2000010783A true JP2000010783A (en) 2000-01-14

Family

ID=16026484

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10177174A Pending JP2000010783A (en) 1998-06-24 1998-06-24 Program control method for electronic equipment

Country Status (1)

Country Link
JP (1) JP2000010783A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6567317B2 (en) 2001-05-25 2003-05-20 Hynix Semiconductor Inc. Controlling output current rambus DRAM

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6567317B2 (en) 2001-05-25 2003-05-20 Hynix Semiconductor Inc. Controlling output current rambus DRAM

Similar Documents

Publication Publication Date Title
US6888332B2 (en) Computer system and method of controlling rotation speed of cooling fan
JP2006107127A (en) Semiconductor integrated circuit device
US5515539A (en) Apparatus and method for reducing power consumption by peripheral devices after downloading a program therefrom
KR20020007294A (en) Data processing unit with access to the memory of another data processing unit during standby
US7219248B2 (en) Semiconductor integrated circuit operable to control power supply voltage
JPH10340127A (en) Information processor
JPH10149237A (en) Semiconductor circuit
JP2000010783A (en) Program control method for electronic equipment
JPH01292416A (en) System for reducing power consumption of processor
JPH08211960A (en) Microcomputer
JP2003044356A (en) Memory mapping system
JP2702743B2 (en) Electronics
JPH117344A (en) Power saving personal computer
JP2000105639A (en) Power saving circuit
JPH0883137A (en) Electronic circuit
JP2001022480A (en) Information processor
JPH0398188A (en) Ic card
JP2000039930A (en) Low power consumption system for electronic equipment
JP2004086556A (en) Microcontroller
JP2001077313A (en) Integrated circuit device
JPH10124200A (en) Portable information terminal
JPH0355614A (en) Electronic equipment
JP2003242025A (en) Memory control system for microcomputer circuit
JPH0883133A (en) Computer system and clock control method for the same
JPH03257608A (en) Microcomputer