JP2702743B2 - Electronics - Google Patents
ElectronicsInfo
- Publication number
- JP2702743B2 JP2702743B2 JP63216368A JP21636888A JP2702743B2 JP 2702743 B2 JP2702743 B2 JP 2702743B2 JP 63216368 A JP63216368 A JP 63216368A JP 21636888 A JP21636888 A JP 21636888A JP 2702743 B2 JP2702743 B2 JP 2702743B2
- Authority
- JP
- Japan
- Prior art keywords
- ram
- rom
- cpu
- clock
- 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.)
- Expired - Lifetime
Links
- 230000002093 peripheral effect Effects 0.000 claims description 11
- 101100328887 Caenorhabditis elegans col-34 gene Proteins 0.000 description 24
- 238000000034 method Methods 0.000 description 20
- 230000015654 memory Effects 0.000 description 13
- 230000008569 process Effects 0.000 description 9
- 101100524639 Toxoplasma gondii ROM3 gene Proteins 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000003068 static effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000010355 oscillation Effects 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 2
- JJQDIWJXVDJXRH-KNTRCKAVSA-N (e)-1,5-diphenyl-3-(2-phenylethynyl)pent-1-en-4-yn-3-ol Chemical compound C=1C=CC=CC=1C#CC(C#CC=1C=CC=CC=1)(O)\C=C\C1=CC=CC=C1 JJQDIWJXVDJXRH-KNTRCKAVSA-N 0.000 description 1
- RRLHMJHRFMHVNM-BQVXCWBNSA-N [(2s,3r,6r)-6-[5-[5-hydroxy-3-(4-hydroxyphenyl)-4-oxochromen-7-yl]oxypentoxy]-2-methyl-3,6-dihydro-2h-pyran-3-yl] acetate Chemical compound C1=C[C@@H](OC(C)=O)[C@H](C)O[C@H]1OCCCCCOC1=CC(O)=C2C(=O)C(C=3C=CC(O)=CC=3)=COC2=C1 RRLHMJHRFMHVNM-BQVXCWBNSA-N 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000002401 inhibitory effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Control By Computers (AREA)
- Power Sources (AREA)
- Calculators And Similar Devices (AREA)
Description
【発明の詳細な説明】 [産業上の利用分野] 本発明は電子機器、特にCPU、ROM、RAMおよび周辺デ
バイスから構成されROMないしRAMに格納されたプログラ
ムに応じて上記各構成部材の間でデータ入出力を行なう
電子機器に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to an electronic device, in particular, a CPU, a ROM, a RAM, and peripheral devices. The present invention relates to an electronic device that performs data input / output.
[従来の技術] 従来、全ての回路素子がC−MOSのLSIで構成されてい
る電子機器、例えば乾電池や太陽電池により駆動される
電子式卓上計算機(以下電卓という)などでは、消費電
力は動作クロックに比例するため、高速処理が必要な演
算処理は高周波のクロックを用い、処理が遅くてもよい
キー入力待ちなどにおいては低周波のクロックを用いて
消費電力を低減する技術が提案されている。[Prior Art] Conventionally, in an electronic device in which all circuit elements are configured by a C-MOS LSI, for example, an electronic desk calculator (hereinafter referred to as a calculator) driven by a dry battery or a solar battery, the power consumption operates. A technique has been proposed in which arithmetic processing requiring high-speed processing uses a high-frequency clock because it is proportional to the clock, and uses a low-frequency clock to reduce power consumption when waiting for key input, which may be slow. .
[発明が解決しようとする課題] しかしながら、上記従来構成では次のような欠点があ
った。[Problems to be Solved by the Invention] However, the above-described conventional configuration has the following disadvantages.
(1) 電卓用LSIに内蔵されているROMは低容量かつ低
速であり、ある程度以上の高周波クロックには対応でき
ず、それほど処理の高速化が望めない。(1) The ROM built into the calculator LSI has a low capacity and a low speed, cannot support a high frequency clock of a certain level or more, and cannot expect much higher processing speed.
(2) 電卓用LSIに内蔵されているROMに相当するデバ
イスは半導体メーカの汎用ROMにはない。したがって電
卓を構成する場合、ROMはカスタム設計となるため、開
発期間が長くなるばかりでなくROMのビット単位が高く
なる。(2) There is no device equivalent to the ROM built into the calculator LSI in the general-purpose ROM of the semiconductor manufacturer. Therefore, when configuring a calculator, the ROM is custom designed, which not only increases the development period but also increases the ROM bit unit.
(3) 最近の半導体メーカから域されているROMは大
容量でかつ高速アクセス重視であるため、たとえ全てC
−MOSのROMを用い、かつサイクルタイムを遅くしても、
サイクルタイム1μsec以下では消費電力は低減できな
い。(3) ROMs from recent semiconductor manufacturers are large-capacity and high-speed access-oriented.
-Even if the MOS ROM is used and the cycle time is delayed,
If the cycle time is 1 μsec or less, power consumption cannot be reduced.
本発明の課題は以上の問題を解決し、低周波クロック
を用いても消費電力が低下しないようなROMを用いる場
合でも、処理の高速化と低消費電力化を両立し、しかも
低コストでシステム構成を行なえるようにすることであ
る。The object of the present invention is to solve the above problems, and to achieve both high-speed processing and low power consumption, and to achieve a low-cost system even when using a ROM in which power consumption does not decrease even when a low-frequency clock is used. Configuration.
[課題を解決するための手段] 以上の課題を解決するために、本発明においては、CP
U、ROM、RAMおよび周辺デバイスから構成されROMないし
RAMに格納されたプログラムに応じて上記各構成部材の
間でデータ入出力を行なう電子機器において、装置の基
本動作クロックの周波数を複数段階に切り換える手段
と、装置動作開始時にROMに固定的に記憶されたプログ
ラムの内比較的経常的に使用されしかも高速処理を要し
ないルーチンを前記RAMに転送し、その後前記ルーチン
の動作時に前記切り換え手段により基本動作クロックを
低周波数に切り換え、しかも前記ルーチンの動作時には
前記ROMに対するアクセスを禁止する制御手段を設けた
構成を採用した。[Means for Solving the Problems] In order to solve the above problems, in the present invention, the CP
U, ROM, RAM and peripheral devices
In an electronic device that performs data input / output between the above-described components according to a program stored in a RAM, a unit that switches a frequency of a basic operation clock of the device to a plurality of stages, and is fixedly stored in a ROM at the start of device operation. A routine which is used relatively routinely and which does not require high-speed processing among the programs executed is transferred to the RAM, and then the basic operation clock is switched to a low frequency by the switching means at the time of operation of the routine. Occasionally, a configuration was provided in which control means for inhibiting access to the ROM was provided.
[作用] 以上の構成によれば、所定ルーチンのRAM上での走
行、およびその際の基本動作クロックの周波数低下によ
り消費電力を低減し、また、このルーチンの動作中はRO
Mのアクセスを禁止することにより消費電力が大きいROM
を用いる場合でも低消費電力化が可能である。[Operation] According to the above configuration, power consumption is reduced by running the predetermined routine on the RAM and lowering the frequency of the basic operation clock at that time.
ROM with high power consumption by prohibiting M access
However, power consumption can be reduced even when using.
[実施例] 以下、図面に示す実施例に基づき、本発明を詳細に説
明する。EXAMPLES Hereinafter, the present invention will be described in detail based on examples shown in the drawings.
第1図〜第4図は本発明の第1の実施例を示してい
る。1 to 4 show a first embodiment of the present invention.
第1図は本発明による電子機器の回路構成を示してい
る。ここでは、電卓、あるいはパーソナルコンピュータ
などCPUおよびその周辺素子により構成された装置が示
されている。FIG. 1 shows a circuit configuration of an electronic device according to the present invention. Here, a device such as a calculator or a personal computer constituted by a CPU and its peripheral elements is shown.
第1図において、符号1はクロック発生器で、2種類
の周波数を設定できるようにX1、X2の2つの水晶発振子
を有する。これらのうち、符号X1で示されるものは比較
的高周波数の発振子、符号X2は比較的低周波の発振子で
ある。In FIG. 1, reference numeral 1 denotes a clock generator having two crystal oscillators X1 and X2 so that two kinds of frequencies can be set. Among these, the one indicated by the symbol X1 is a relatively high frequency oscillator, and the symbol X2 is a relatively low frequency oscillator.
クロック発生器1は、キー入力待ちのように比較的処
理が遅くてもよいような場合は前記発振子X2を発振させ
てそのクロックを供給し、キー処理や表示処理などの比
較的高速な処理を必要とする場合は前記発振子X1を発振
させてそのクロックを供給する。The clock generator 1 oscillates the oscillator X2 and supplies its clock when the processing may be relatively slow such as waiting for a key input, and performs relatively high-speed processing such as key processing and display processing. Is required, the oscillator X1 is oscillated to supply its clock.
符号2はC−MOSのCPU(ここではザイログ社のZ−80
(商品名)とする)で、CPU2にはリセットキーK1とパワ
ーオンキーK2が接続されている。リセットキーK1は本発
明電子機器のオール初期設定に、パワーオンキーK2はス
タンバイ(電源最小の機能保持状態)の解除に使用す
る。Reference numeral 2 denotes a C-MOS CPU (here, Z-Log Z-80)
(A product name)), and a reset key K1 and a power-on key K2 are connected to the CPU2. The reset key K1 is used for all initial settings of the electronic apparatus of the present invention, and the power-on key K2 is used for canceling standby (function holding state with minimum power supply).
CPU2には記憶装置としてROM3、RAM4が接続されてい
る。ROM3にはCPU2が実行すべきプログラムや各種データ
が記憶されている。また、RAM4はC−MOSの内部同期型
のスタティックRAMからなる。ROM 3 and RAM 4 are connected to the CPU 2 as storage devices. The ROM 3 stores programs to be executed by the CPU 2 and various data. The RAM 4 is a C-MOS internal synchronous static RAM.
また、符号5はインバータで、本実施例においてはメ
モリのアドレスデコーダとして作用し、RAM4のチップセ
レクト信号を制御する。すなわち、インバータ5はCPU2
のアドレスバス(16ビット)の最上位ビットA15を反転
してRAM4に入力しており、このビットの状態によりROM3
ないしRAM4のいずれかを選択する。本実施例では、ROM3
が低位アドレスに設定され、アドレスデータの最上位ビ
ットA15の理論「0」によりROM3が、また同ビットの論
理「1」によりRAM4が選択される。Reference numeral 5 denotes an inverter, which in this embodiment functions as an address decoder of a memory, and controls a chip select signal of the RAM 4. That is, the inverter 5 is connected to the CPU 2
The most significant bit A15 of the address bus (16 bits) is inverted and input to RAM4.
Or select one of RAM4. In this embodiment, the ROM 3
Is set to the low-order address, and ROM3 is selected by the logic "1" of the most significant bit A15 of the address data, and RAM4 is selected by the logic "1" of the same bit.
符号6は入出力アドレスのデコーダであり、CPU2がア
ドレスバスAを介して出力するアドレスデーダをデコー
ドし、キー入力装置7や表示装置8のいずれかを選択す
る。アドレスデコーダ6はデコード結果に応じてチップ
セレクト信号CS1ないしCS2のいずれかを出力し、キー入
力装置7ないし表示装置8を選択する。なお、メモリ
(ROM3、RAM4)に対するアドレス出力はアドレスデコー
ダ6を介することなく直接出力される。キー入力装置7
はテンキー、フルキーボードなど所定のキー配列により
構成され、表示装置8は液晶表示器などから構成され
る。Reference numeral 6 denotes an input / output address decoder, which decodes address data output from the CPU 2 via the address bus A and selects one of the key input device 7 and the display device 8. The address decoder 6 outputs one of the chip select signals CS1 and CS2 according to the decoding result, and selects the key input device 7 or the display device 8. The address output to the memories (ROM3, RAM4) is directly output without passing through the address decoder 6. Key input device 7
Is constituted by a predetermined key arrangement such as a numeric keypad or a full keyboard, and the display device 8 is constituted by a liquid crystal display or the like.
符号9、10はともにOR回路であり、キー入力装置7や
表示装置8へのリード信号Rおよびライト信号Wを供給
する。キー入力装置7、表示装置8に対して入出力を行
なう場合には、CPU2はいずれかに対応する入出力アドレ
スを出力し、アドレスデコーダ6を介してこれらのいず
れかを選択し、入力、ないし出力に対応してリード信号
Rおよびライト信号Wをキー入力装置7および表示装置
8にOR回路9、10を介して出力する。Reference numerals 9 and 10 denote OR circuits, which supply a read signal R and a write signal W to the key input device 7 and the display device 8, respectively. When performing input / output to / from the key input device 7 and the display device 8, the CPU 2 outputs an input / output address corresponding to any of them, selects one of these via the address decoder 6, and inputs / outputs it. The read signal R and the write signal W are output to the key input device 7 and the display device 8 via the OR circuits 9 and 10 in response to the output.
また、符号11、12も同じくOR回路であり、ROM3やRAM4
のリード信号Rおよびライト信号Wを供給する。ROM3、
RAM4に対する入出力の場合も同じリード信号Rおよびラ
イト信号WがOR回路11、12によりROM3、RAM4に供給され
る。Reference numerals 11 and 12 are also OR circuits, such as ROM3 and RAM4.
The read signal R and the write signal W are supplied. ROM3,
In the case of input / output to / from the RAM 4, the same read signal R and write signal W are supplied to the ROM 3 and the RAM 4 by the OR circuits 11 and 12.
メモリに対して入出力を行なうか、キー入力装置7あ
るいは表示装置8に対して入出力を行なうかはCPU2のメ
モリリクエスト信号Mないしi/oリクエスト信号i/oによ
り制御される。Whether input / output to / from the memory or input / output to / from the key input device 7 or the display device 8 is controlled by a memory request signal M to an i / o request signal i / o of the CPU 2.
また入出力されるデータそのものは、各デバイスに共
通のデータバスDにより制御される。The input / output data itself is controlled by a data bus D common to each device.
以上のCPU2、ROM3、RAM4その他の周辺供給制御用デバ
イス(不図示)はC−MOS素子から構成する。以上まで
に示した構成で問題となるのは、CPU2、RAM4などの素子
はクロック発生器1によってクロックを低周波に切り換
えることでかなりの低消費電力化が可能であるが、ROM3
の消費電力は低周波クロックでもほとんど変化しないこ
とである。The CPU 2, ROM 3, RAM 4, and other peripheral supply control devices (not shown) are composed of C-MOS elements. The problem with the configuration shown above is that elements such as the CPU 2 and the RAM 4 can significantly reduce power consumption by switching the clock to a low frequency by the clock generator 1.
Is that the power consumption hardly changes even with a low frequency clock.
そこで、ROM3に格納されるプログラムのうち、たとえ
常時使用されるキー入力解析ルーチンなどをRAM4に転送
し、RAM4上で処理を実行することが考えられる。これに
より、かなりの省電力が可能となるが、Z−80などダイ
ナミックRAMのリフレッシュ機能および周辺デバイスに
対する直接入出力命令を有し、しかも周辺デバイスおよ
びメモリに対する入出力が明確に区別されないシステム
では、次のような問題がある。Therefore, it is conceivable that, among the programs stored in the ROM 3, for example, a key input analysis routine that is always used is transferred to the RAM 4, and the processing is executed on the RAM 4. This allows considerable power savings, but in a system that has a dynamic RAM refresh function, such as Z-80, and a direct I / O instruction to peripheral devices, and where input / output to peripheral devices and memory is not clearly distinguished, There are the following problems.
それは、メモリリフレッシュ時および、周辺デバイス
に対する直接入出力命令の際に、特定のデータが副作用
的にアドレスバスの上位8ビットに出力されるため、こ
のデータ内容によりROM3がチップセレクトされてしまう
可能性があることである。ROM3はチップセレクトされる
と、センスアンプに大電流が流れ、これにより消費電力
が増大してしまう。The reason is that specific data is output to the upper 8 bits of the address bus as a side effect at the time of memory refresh and at the time of a direct input / output instruction to peripheral devices. There is that. When the ROM3 is chip-selected, a large current flows through the sense amplifier, which increases power consumption.
以上に鑑み、本実施例では、ROMからRAMへ処理ソフト
ウエアを転送して用い、それほど高速処理を必要としな
いルーチンではクロック速度を低下させ、さらに、CPU
のリフレッシュ時、あるいは周辺デバイスに対する入出
力時にROMのチップセレクトを完全に禁止するようにす
る。In view of the above, in the present embodiment, the processing software is transferred from the ROM to the RAM, and the clock speed is reduced in a routine that does not require high-speed processing.
The chip select of the ROM is completely inhibited at the time of refreshing the data or at the time of input / output to / from a peripheral device.
以下、上記構成における動作につき詳細に説明する。
第2図〜第4図は第1図のCPU2の制御手順を示したフロ
ーチャート図で、第2図〜第4図の手順はCPU2の制御プ
ログラムとしてROM3に格納され、後述のようにRAM4に転
送されて用いられる。Hereinafter, the operation in the above configuration will be described in detail.
2 to 4 are flowcharts showing the control procedure of the CPU 2 of FIG. 1. The procedure of FIGS. 2 to 4 is stored in the ROM 3 as a control program of the CPU 2 and transferred to the RAM 4 as described later. It is used.
本実施例において、電池交換などによって初めて電源
が供給された時、または第1図のリセットキーK1が押下
されるとCPU2にリセットがかかり、第2図のステップS1
以降の処理が実行される。In the present embodiment, when power is supplied for the first time due to battery replacement or the like, or when the reset key K1 in FIG. 1 is pressed, the CPU 2 is reset, and step S1 in FIG.
The following processing is executed.
ステップS1では、CPU2およびRAM4やその他のi/o機器
を全て初期化してステップS2に移行する。In step S1, CPU 2 and RAM 4 and all other i / o devices are initialized, and the process proceeds to step S2.
パワーキーK2が押下され、CPU2がスタンバイ状態にな
るとステップS2に移行する。ステップS2の詳細は第3図
に示してある。ここで、第3図を参照して第2図のステ
ップS2の処理を説明する。When the power key K2 is pressed and the CPU 2 enters the standby state, the process proceeds to step S2. Details of step S2 are shown in FIG. Here, the processing of step S2 in FIG. 2 will be described with reference to FIG.
第3図のステップS21ではi/o機器とRAM4の初期設定を
行なってステップS22に移行する。ステップS22ではROM3
に格納されているキー入力待ち処理のプログラムをRAM4
に転送し、続いてステップS23でZ−80の内部レジスタ
であるiレジスタに0FFH(16進数)をセットし、CPU2の
リフレッシュ信号出力時にROM3に選択することを禁止す
る。これは、Z−80はリフレッシュ時にiレジスタの内
容をアドレスバス上位に出力するためである。なお、i
レジスタは、Z−80においては、割り込みベクトルの上
位1バイトを記憶するためのレジスタとしても用いられ
るものである。In step S21 in FIG. 3, the initial settings of the i / o device and the RAM 4 are performed, and the process proceeds to step S22. In step S22, ROM3
Key input wait processing program stored in RAM4
Then, in step S23, 0FFH (hexadecimal number) is set in the i-register, which is an internal register of the Z-80, and the selection of the ROM 3 when the CPU 2 outputs the refresh signal is prohibited. This is because Z-80 outputs the contents of the i register to the upper address bus at the time of refresh. Note that i
The register is also used in the Z-80 as a register for storing the upper byte of the interrupt vector.
再び第2図において、ステップS3ではキー入力待ち処
理を行なう。ここでは、発振子X2による低周波のクロッ
クで動作する。この処理はRAM4上で動作するもので、そ
の詳しい処理手順を第4図で説明する。Referring again to FIG. 2, a key input waiting process is performed in step S3. Here, it operates with a low-frequency clock from the oscillator X2. This processing operates on the RAM 4, and the detailed processing procedure will be described with reference to FIG.
この低速クロックによる処理では、データ入出力の
際、ROM3がチップセレクトされないように配慮する。こ
のようなチップセレクトは前記のように直接入出力命令
の際に生じ得る。In the processing using the low-speed clock, care is taken so that the ROM 3 is not chip-selected during data input / output. Such a chip select can occur at the time of a direct input / output command as described above.
すなわち、Z−80のi/oアクセスには2通りあり、1
つはOUT(n),A in A,(n)のダイレクトアクセス方
法と、もう1つはOUT(c),A in A,(c)のレジスタ
間接アクセス方法である。これらは、いずれも(n)な
いし(c)により示された0〜255のポートアドレスに
Aレジスタの内容を転送するものであるが、これらの入
出力命令においてアドレスバスAに出力されるデータは
実際には次のようになっている。That is, there are two types of Z-80 i / o access.
One is a direct access method of OUT (n), A in A, (n), and the other is a register indirect access method of OUT (c), A in A, (c). These transfer the contents of the A register to the port addresses 0 to 255 indicated by (n) to (c), but the data output to the address bus A in these input / output instructions is In fact, it looks like this:
すなわち、ポートアドレスは上記のように0〜255の
8ビットでありこの8ビットデータn(イミディエイト
データ)またはCレジスタの内容により示される。この
データはアドレスバスの下位8ビットに出力される。ま
た、このときアドレスバスの上位8ビットは、上記ダイ
レクトアクセス法ではAレジスタの内容が、また、レジ
スタ間接アクセス法ではBレジスタの内容が出力され
る。That is, the port address is 8 bits from 0 to 255 as described above, and is indicated by the 8-bit data n (immediate data) or the contents of the C register. This data is output to the lower 8 bits of the address bus. At this time, the upper 8 bits of the address bus output the contents of the A register in the direct access method and the contents of the B register in the register indirect access method.
つまり、Z−80では、IN、OUT命令により周辺入出力
を行なう場合、イミディエイトデータnまたはBレジス
タの内容に応じてアドレス空間内の特定のチップがセレ
クトされてしまうことになる。実際にこれらのアドレス
データの上位8ビットはIN、OUT命令においては必要な
いものであるから、ROM3がチップセレクトされないよう
なデータに設定することができる。That is, in the Z-80, when peripheral input / output is performed by the IN and OUT instructions, a specific chip in the address space is selected according to the immediate data n or the contents of the B register. Actually, the upper 8 bits of these address data are unnecessary for the IN and OUT instructions, so that the data can be set so that the ROM 3 is not chip-selected.
本実施例では、直接入出力の際、上記のレジスタ間接
アクセスを常時用いるものとし、IN、OUT命令に先立
ち、Bレジスタの内容がアドレスバスの最上位ビットA1
5を0にしない値(たとえば1xxxxxxxB(2進数))に設
定してからキースキャン、キーリードなどの入出力処理
を行なう。このようにして、キースキャンやキーリード
時にROM3のチップセレクト端子がアクティブになること
を禁止できる。In this embodiment, the above-mentioned register indirect access is always used at the time of direct input / output, and the contents of the B register are stored in the most significant bit A1 of the address bus prior to the IN and OUT instructions.
Input / output processing such as key scan and key read is performed after 5 is set to a value that is not set to 0 (for example, 1xxxxxxxB (binary number)). In this manner, the activation of the chip select terminal of the ROM 3 during key scan or key read can be prohibited.
第4図のステップS31ではBレジスタに0FFHをセット
し、続いてステップS32でCレジスタにi/oアドレスをセ
ットしてステップS3に移行する。In step S31 of FIG. 4, 0FFH is set in the B register, and then in step S32, the i / o address is set in the C register, and the flow shifts to step S3.
ステップS33ではキースキャン信号を出力してステッ
プS34に移行する。ステップS34ではキーラインを読み込
んでキーが押下されているか否かを判別し、押下されて
いなければステップS35に移行してカーソル処理を行な
った後ステップS31に戻る。キー入力装置7のキーが押
下されていれば、第2図のステップS4に移行する。In step S33, a key scan signal is output, and the flow shifts to step S34. In step S34, a key line is read to determine whether or not a key has been pressed. If the key has not been pressed, the process proceeds to step S35 to perform cursor processing, and then returns to step S31. If the key of the key input device 7 has been pressed, the process proceeds to step S4 in FIG.
第2図のステップS4では押下されたキーの処理を行な
い、続いてステップS5において各キー処理後の表示処理
を行なってステップS3に戻る。In step S4 of FIG. 2, processing of the pressed key is performed. Subsequently, in step S5, display processing after each key processing is performed, and the process returns to step S3.
以上の制御によれば、経常時に使用されるルーチンを
ROM3かRAM4に転送して使用し、速度を要求されない処理
ではクロック速度を低下させ、さらに、ROMに対するチ
ップセレクトを完全に禁止するようにしているため、徹
底した低消費電力化が可能である。ROMとしては、特別
な品種を用いる必要がないため、製造コストも低減でき
る。According to the above control, the routine used regularly is
By transferring the data to the ROM 3 or the RAM 4 and using it without requiring a speed, the clock speed is reduced, and furthermore, the chip select for the ROM is completely prohibited, so that a thorough reduction in power consumption is possible. Since it is not necessary to use a special type of ROM, the manufacturing cost can be reduced.
以上の実施例ではROMとRAMが各々1個の構成とした
が、ROMおよびRAMが複数個あっても同様の効果が得られ
るのは言うまでもない。In the above embodiment, one ROM and one RAM are used. However, it goes without saying that the same effect can be obtained even if there are a plurality of ROMs and RAMs.
特に、RAMに関しては半導体メーカによって内部同期
式のスタティックRAMと完全に非同期のスタティックRAM
とがあり、前者はCPUのクロックを低くすればそれに比
例して消費電力が下がるのに対し、後者はクロックを下
げてもそれに比例して消費電力が下がるとは言えない。
従って、このような2種類のRAMが混在する場合は、前
者のRAMにキー入力待ちのプログラムを転送してその処
理を前者のRAM上で行なうとともに、この時のCPUのクロ
ックを低周波にし、CPUのリフレッシュやキースキャン
時に前述と同様の手法により後者の非同期スタティック
RAMやROMのチップセレクトを選択することを禁止すれ
ば、上記実施例と同様の効果が得られる。In particular, with regard to RAM, semiconductor manufacturers have internal synchronous static RAM and completely asynchronous static RAM.
In the former case, if the CPU clock is lowered, the power consumption will decrease in proportion to it, whereas in the latter case, it can not be said that the power consumption will decrease in proportion to the decrease in the clock.
Therefore, when such two types of RAMs are mixed, a program waiting for key input is transferred to the former RAM and the processing is performed on the former RAM, and the CPU clock at this time is set to a low frequency. When refreshing the CPU or performing key scans, use the same asynchronous static
If the selection of the RAM or ROM chip select is prohibited, the same effect as in the above embodiment can be obtained.
また第1図の実施例では2つの発振子を使用して、キ
ー入力待ちの時とそれ以外の時でCPUに供給するクロッ
クの周波数を変えていたが、第5図に示すように1つの
発振子だけでも、同様に実施することが可能である。In the embodiment of FIG. 1, two oscillators are used to change the frequency of the clock supplied to the CPU at the time of waiting for key input and at other times. However, as shown in FIG. The same operation can be performed using only the oscillator.
第5図において符号X1で示されるものは第1図の発振
子X1と同じく高周波用の発振子であり、発振回路1′の
発振周波数を決定す。発振回路1′は分周回路51とロッ
ク選択回路52に高周波のクロックを供給する。5 is a high frequency oscillator similar to the oscillator X1 in FIG. 1, and determines the oscillation frequency of the oscillation circuit 1 '. The oscillation circuit 1 'supplies a high frequency clock to the frequency dividing circuit 51 and the lock selecting circuit 52.
分周回路51は入力された高周波のクロックを整数分の
1に分周して低周波のクロックに変え、クロック選択回
路52に入力する。分周回路51で分周する分周比は、特定
の数に固定することもできるし、あるいはプリセットカ
ウンタを用いて第1図のCPU2が実行するプログラムの中
で任意の数に設定することもできる。このような構成に
より、クロック選択回路52を介して発振回路1′または
分周回路51により分周されたクロックのいずれかを処理
に応じて選択することができる。The frequency dividing circuit 51 divides the inputted high frequency clock by a factor of 1 to convert it into a low frequency clock, and inputs it to the clock selecting circuit 52. The dividing ratio to be divided by the dividing circuit 51 can be fixed to a specific number, or can be set to an arbitrary number in a program executed by the CPU 2 in FIG. 1 using a preset counter. it can. With such a configuration, either the oscillation circuit 1 'or the clock divided by the frequency dividing circuit 51 can be selected via the clock selecting circuit 52 in accordance with the processing.
また、第1図の実施例におけるメモリマップは第6図
(A)であるが、もし第6図(B)のようにROM3が最低
位、RAM4が最上位に設定され、その中間部に素子が実装
されていない場合には、第3図のステップS23でiレジ
スタにメモリマップの空きエリアのアドレスを設定する
ことにより、CPU2のリフレッシュは空きエリアに行なわ
れるのでリフレッシュ時の消費電力が最小となる。The memory map in the embodiment of FIG. 1 is shown in FIG. 6A. If the ROM 3 is set at the lowest level and the RAM 4 is set at the highest level as shown in FIG. Is not implemented, by setting the address of the free area of the memory map in the i register in step S23 of FIG. 3, the refresh of the CPU 2 is performed in the free area, so that the power consumption at the time of refreshing is minimized. Become.
また、第6図(C)のように、ROM3と、RAM4の間に着
脱可能なカード、(あるいはカセット式)のRAMエリア
4′が設定されるメモリ構成の場合には、第7図に図示
した処理手順に従ってリフレッシュアドレス、すなわち
iレジスタを設定すれば、CPU2のリフレッシュ時の消費
電力をごくわずかにすることができる。Also, in the case of a memory configuration in which a removable card (or cassette type) RAM area 4 'is set between the ROM 3 and the RAM 4 as shown in FIG. If the refresh address, i.e., the i-register is set according to the processing procedure described above, the power consumption of the CPU 2 at the time of refresh can be made very small.
第7図において、ステップS76ではカードRAMが装着さ
れているかどうかを判断するためにカードRAMのエリア
に任意のデータを書き込み、ステップS77に移行する。In FIG. 7, in step S76, arbitrary data is written to the area of the card RAM in order to determine whether or not the card RAM is mounted, and the process proceeds to step S77.
ステップS77ではステップS76で書き込んだデータをカ
ードRAMから読み出し、ステップS78で読み出されたデー
タが正しいかどうかを判別する。正しくなければカード
が装着されていないと判断し、ステップS80に移行してC
PU2のリフレッシュアドレスをカードRAM4の実装エリア
4′に設定する。In step S77, the data written in step S76 is read from the card RAM, and it is determined whether the data read in step S78 is correct. If it is not correct, it is determined that the card has not been installed,
The refresh address of PU2 is set in the mounting area 4 'of the card RAM4.
一方、ステップS78で正しいデータが読み出された場
合はカードRAMが装着さており、そのRAMが前記内部同期
方式のC−MOSスタティックRAMとは限らないので、リフ
レッシュアドレスはRAM4のエリアに設定する。On the other hand, if the correct data is read out in step S78, the refresh address is set in the area of the RAM 4 because the card RAM is mounted and the RAM is not necessarily the C-MOS static RAM of the internal synchronous system.
ここではカードをRAMカードとして説明したが、これ
がROMカードであっても処理手順は同様であり、カード
の装着の有無はカード上のキーワードで行なえばよい。Here, the card has been described as a RAM card, but the processing procedure is the same even if the card is a ROM card, and the presence or absence of the card may be determined by a keyword on the card.
また、第1実施例では説明の都合上CPU2をZ−80で説
明したが、これが他のC−MOSのCPUであっても同様に実
施例可能である。In the first embodiment, the CPU 2 has been described as a Z-80 for convenience of explanation. However, the embodiment can be similarly applied to a CPU of another C-MOS.
殊にナショナルセミコンダクタ社のNSC800(商品名)
のようなCPUでは、第8図に示すようにCPUの制御信号で
あるS0,S1をデコーダ13に入力し、メモリに対する入出
力期間だけアドレスをデコードしてメモリのチップセレ
クトとすれば、CPUがi/o機器をアクセスした時にメモリ
のチップセレクトがアクティブになることを禁止でき
る。In particular, National Semiconductor's NSC800 (trade name)
In such a CPU, as shown in FIG. 8, the control signals S0 and S1 of the CPU are input to the decoder 13, and the address is decoded only during the input / output period to / from the memory, and the chip is selected. It is possible to prohibit the chip select of the memory from being activated when accessing the i / o device.
アドレスデコーダ13はゲート付のアドレスデコーダで
あり、CPUからのアドレス信号、S0信号、S1信号を受け
て、メモリに対するCPUサイクルの時だけROM3またはRAM
4のチップセレクト信号をアクティブにする。The address decoder 13 is an address decoder with a gate, which receives an address signal, a S0 signal, and an S1 signal from the CPU, and reads the ROM 3 or the RAM only during the CPU cycle for the memory.
Activate the chip select signal of 4.
さらに、第1図の実施例においてはCPUのクロックを
遅くすればそれに比例してRAMの消費電流が小さくなる
構成として説明したが、もしカスタム設計などによって
前記RAMと同様の消費電流特性を有するROMを用いること
が可能であれば、第1実施例のRAMの代わりにこのROMに
キー入力待ちの処理を行なうプログラムを格納し、同様
にキー入力待ちの時のCPU2のクロック周波数を遅くして
消費電力を低減できる。Further, in the embodiment shown in FIG. 1, a configuration was described in which the current consumption of the RAM was reduced in proportion to the slowing down of the clock of the CPU. If it is possible to use the CPU, a program for performing a process of waiting for a key input is stored in this ROM instead of the RAM of the first embodiment. Power can be reduced.
さらに、第1図の実施例では第3図のステップS22に
おいてのみキー入力待ちの処理プログラムをROM3からRA
M4へ転送したが、静電気などでRAM4上のプログラムが破
壊されてもある程度対処できるように、第2図のステッ
プS5や第4図のステップS35の次に第3図のステップS2
2,S23と同じプログラム転送処理を挿入してもよい。ま
た、タイマ割込などによって一定時間ごとに第3図のス
テップS22、S23と同じ処理を実行させてもよい。Further, in the embodiment of FIG. 1, a processing program waiting for key input is executed from the ROM 3 by the RA only in step S22 of FIG.
Although transferred to M4, step S5 in FIG. 2 and step S35 in FIG. 3 are followed by step S2 in FIG.
2, the same program transfer processing as in S23 may be inserted. Further, the same processing as steps S22 and S23 in FIG. 3 may be executed at regular intervals by a timer interrupt or the like.
[発明の効果] 以上から明らかなように、本発明によれば、CPU、RO
M、RAMおよび周辺デバイスから構成されたROMないしRAM
に格納されたプログラムに応じて上記各構成部材の間で
データ入出力を行なう電子機器において、装置の基本動
作クロックの周波数を複数段階に切り換える手段と、装
置動作開始時にROMに固定的に記憶されたプログラムの
内比較的経常的に使用されしかも高速処理を要しないル
ーチンを前記RAMに転送し、その後前記ルーチンの動作
時に前記切り換え手段により基本動作クロックを低周波
数に切り換え、しかも前記ルーチンの動作時には前記RO
Mに対するアクセスを禁止する制御手段を設けた構成を
採用しているので、所定ルーチンのRAM上での走行、お
よびその際の基本動作クロックの周波数低下により消費
電力を低減し、また、このルーチンの動作中はROMのア
クセスを禁止することにより低消費電力化が可能であ
る。ROMとしては、低周波クロックを用いても電力消費
が低下しないものを用いても充分省電力効果を期待でき
るから、製造コストを増大させる恐れもない。また、高
速処理が必要な場合には適宜クロックを高周波に切り換
えれば、処理効率を低下させることもないなどの優れた
効果がある。[Effects of the Invention] As is clear from the above, according to the present invention, the CPU, the RO
ROM or RAM composed of M, RAM and peripheral devices
Means for switching the frequency of the basic operation clock of the device to a plurality of stages in an electronic device that performs data input / output between the above-described components according to a program stored in the ROM, and fixedly stored in a ROM at the start of device operation. A routine that is used relatively routinely and does not require high-speed processing is transferred to the RAM, and then the basic operation clock is switched to a low frequency by the switching means during the operation of the routine. The RO
Since a configuration having control means for prohibiting access to M is adopted, power consumption is reduced by running a predetermined routine on RAM and lowering the frequency of a basic operation clock at that time. During operation, power consumption can be reduced by prohibiting ROM access. Even if a ROM that does not reduce power consumption even if a low-frequency clock is used can be expected to sufficiently reduce power consumption, there is no risk of increasing the manufacturing cost. In addition, when high-speed processing is required, the clock can be switched to a high frequency as appropriate, and there is an excellent effect that processing efficiency is not reduced.
第1図は本発明による電子機器の一実施例を示すブロッ
ク図、第2図〜第4図はそれぞれ第1図の電子機器の処
理手順を示すフローチャート図、第5図はクロック供給
の他の実施例を示すブロック図、第6図(A)〜(C)
はそれぞれ本発明によるその他の実施例を説明するメモ
リマップ図、第7図は本発明によるその他の実施例を示
すフローチャート図、第8図は本発明によるさらに異な
る実施例を示すブロック図である。 1……クロック発生器、2……CPU 3……ROM、4……RAM 5……インバータ 6、13……アドレスデコーダ 7……キー入力装置、8……表示装置 13……アドレスデコーダFIG. 1 is a block diagram showing an embodiment of an electronic device according to the present invention, FIGS. 2 to 4 are flowcharts showing processing procedures of the electronic device in FIG. 1, and FIG. 6 (A) to 6 (C) are block diagrams showing an embodiment.
Is a memory map diagram for explaining another embodiment according to the present invention, FIG. 7 is a flowchart showing another embodiment according to the present invention, and FIG. 8 is a block diagram showing still another embodiment according to the present invention. DESCRIPTION OF SYMBOLS 1 ... Clock generator, 2 ... CPU 3 ... ROM, 4 ... RAM 5 ... Inverter 6, 13 ... Address decoder 7 ... Key input device, 8 ... Display device 13 ... Address decoder
Claims (1)
成されROMないしRAMに格納されたプログラムに応じて上
記各構成部材の間でデータ入出力を行なう電子機器にお
いて、装置の基本動作クロックの周波数を複数段階に切
り換える手段と、装置動作開始時にROMに固定的に記憶
されたプログラムの内比較的経常的に使用されしかも高
速処理を要しないルーチンを前記RAMに転送し、その後
前記ルーチンの動作時に前記切り換え手段により基本動
作クロックを低周波数に切り換え、しかも前記ルーチン
の動作時には前記ROMに対するアクセスを禁止する制御
手段を設けたことを特徴とする電子機器。1. An electronic apparatus comprising a CPU, a ROM, a RAM, and a peripheral device and performing data input / output between the respective components according to a program stored in the ROM or the RAM, the frequency of a basic operation clock of the apparatus. Means for switching to a plurality of stages, and a routine which is used relatively regularly among programs fixedly stored in the ROM at the start of operation of the apparatus and which does not require high-speed processing is transferred to the RAM. An electronic apparatus, comprising: a control unit that switches a basic operation clock to a low frequency by the switching unit and that prohibits access to the ROM during the operation of the routine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63216368A JP2702743B2 (en) | 1988-09-01 | 1988-09-01 | Electronics |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63216368A JP2702743B2 (en) | 1988-09-01 | 1988-09-01 | Electronics |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0266664A JPH0266664A (en) | 1990-03-06 |
JP2702743B2 true JP2702743B2 (en) | 1998-01-26 |
Family
ID=16687482
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63216368A Expired - Lifetime JP2702743B2 (en) | 1988-09-01 | 1988-09-01 | Electronics |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2702743B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR970049630A (en) * | 1995-12-30 | 1997-07-29 | 김광호 | External device access method |
JPH11288409A (en) * | 1998-04-02 | 1999-10-19 | Nec Ic Microcomput Syst Ltd | Microcomputer |
JP5721664B2 (en) * | 2012-05-28 | 2015-05-20 | 京セラドキュメントソリューションズ株式会社 | Image forming apparatus |
JP5868535B2 (en) * | 2015-03-17 | 2016-02-24 | 京セラドキュメントソリューションズ株式会社 | Image forming apparatus |
CN111408644A (en) * | 2019-01-07 | 2020-07-14 | 青岛海尔空调电子有限公司 | Forming die and forming process for pipe hole flanging |
-
1988
- 1988-09-01 JP JP63216368A patent/JP2702743B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH0266664A (en) | 1990-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR930008259B1 (en) | Computer system w/slip function | |
US5652536A (en) | Non-glitch clock switching circuit | |
US5774703A (en) | Data processing system having a register controllable speed | |
JP3718251B2 (en) | Data processing device | |
CA1181178A (en) | Computer with expanded addressing capability | |
US5515539A (en) | Apparatus and method for reducing power consumption by peripheral devices after downloading a program therefrom | |
US6496888B1 (en) | Incorporation of bus ratio strap options in chipset logic | |
JPH0426990A (en) | Memory device | |
JPH05108195A (en) | Portable computer | |
JP2702743B2 (en) | Electronics | |
US7219248B2 (en) | Semiconductor integrated circuit operable to control power supply voltage | |
JP3467631B2 (en) | Logic LSI | |
JP2993466B2 (en) | Information processing device | |
US5822762A (en) | Information processing device with decision circuits and partitioned address areas | |
JPS6045828A (en) | Single chip microcomputer | |
JPH10301659A (en) | Microprocessor | |
US7434079B2 (en) | Microcomputer, method of controlling cache memory, and method of controlling clock | |
JPH0855097A (en) | Data processing system and its memory access method | |
KR970006412B1 (en) | Memory Sharing Access Control Unit in Multiprocessor System | |
JPH053015B2 (en) | ||
JPH03257608A (en) | Microcomputer | |
JP2729012B2 (en) | Microprocessor low power consumption circuit | |
JPH0816900B2 (en) | How to build a data processing system | |
JPS63257995A (en) | Refreshing control circuit | |
JPH02118811A (en) | Micro-computer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081003 Year of fee payment: 11 |
|
EXPY | Cancellation because of completion of term |