JPS63148363A - Microcomputer - Google Patents
MicrocomputerInfo
- Publication number
- JPS63148363A JPS63148363A JP61295840A JP29584086A JPS63148363A JP S63148363 A JPS63148363 A JP S63148363A JP 61295840 A JP61295840 A JP 61295840A JP 29584086 A JP29584086 A JP 29584086A JP S63148363 A JPS63148363 A JP S63148363A
- Authority
- JP
- Japan
- Prior art keywords
- mode
- mode register
- setting
- circuit
- signal
- 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.)
- Granted
Links
- 230000002093 peripheral effect Effects 0.000 claims abstract description 8
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 claims abstract description 7
- 101100524639 Toxoplasma gondii ROM3 gene Proteins 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000000034 method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 206010048669 Terminal state Diseases 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はマイクロコンピュータに関し、特にそのモード
レジスタの設定に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer, and particularly to the setting of its mode register.
従来、この種のマイクロコビュータに於ては、機能の多
様化に対応するため、周辺回路の動作状態の設定、端子
状態の設定を行うモードレジスタを有している。このモ
ードレジスタの設定方法について第4図に示した例を用
いて説明する。初期動作でリセット回路1かちリセット
信号101が入りCPU2が動作を開始する。ROM3
の任意のエリアにはモードレジスタ4にモードデータ値
を設定する命令が予め定義されている。リセット信号1
01解除後、プログラムが実行されバス102.103
、プロセッサ(CPU)2を介して初期値がROM3か
らモードレジスタ4に転送され周辺回路5の動作モード
が設定される。モードレジスタ4の変更時も同様にRO
M3に格納されているプログラムでモードレジスタ4を
設定する命令を定義してあり、プログラムが実行されC
PU2を介して設定値がモードレジスタ4に転送されセ
ットされる形式であった。なお、ROM3の読み出しア
ドレスは、プログラムカウンタ(pc)6により行なわ
れ、そのPC6は、入力された命令を解釈する命令デコ
ーダ7の出力によってコントロールされる。またCPU
2の実行に際しては、データ等の処理にバス104を介
してRAM8が使用される。Conventionally, this type of microcomputer has a mode register for setting the operating state of peripheral circuits and setting the terminal state in order to cope with diversification of functions. A method of setting this mode register will be explained using the example shown in FIG. In the initial operation, a reset signal 101 is input to the reset circuit 1, and the CPU 2 starts operating. ROM3
An instruction for setting a mode data value in the mode register 4 is predefined in an arbitrary area. Reset signal 1
After 01 release, the program is executed and bus 102.103
, the initial value is transferred from the ROM 3 to the mode register 4 via the processor (CPU) 2, and the operating mode of the peripheral circuit 5 is set. Similarly, when changing mode register 4, RO
The program stored in M3 defines an instruction to set mode register 4, and when the program is executed, C
The setting value was transferred to the mode register 4 via the PU 2 and set therein. Note that the reading address of the ROM 3 is determined by a program counter (PC) 6, and the PC 6 is controlled by the output of an instruction decoder 7 that interprets input instructions. Also CPU
When executing 2, the RAM 8 is used for data processing via the bus 104.
従来のモードレジスタの設定、変更は、プログラムが介
在していたので、初期値設定の際、リセット解除後にC
PUの初期状態が設定された状態で即座に実行できず、
又設定の変更などを行うと長いプログラムが必要となり
、ROM容量が増大するとともに、処理時間が多くかか
るという欠点を有していた。Conventionally, setting and changing the mode register involved a program, so when setting the initial value, the C
It cannot be executed immediately with the initial state of the PU set,
Furthermore, changing the settings requires a long program, which increases the ROM capacity and takes a long time to process.
本発明のマイクロコンピュータは、プログラムカウンタ
の進行に伴い、ROMに格納されたプログラムを実行す
るとともに周辺回路の動作状態を設定するモードレジス
タに前記ROMに格納されたモード情報を転送するマイ
クロコンピュータにおいて、リセット信号を出力するリ
セット回路と、入力された命令からモードレジスタ設定
命令をデコードしモード設定信号を出力する命令デコー
ダと、前記ROMへのアドレス信号を出力するプログラ
ムカウンタと、前記モードレジスタおよび前記ROMへ
のアドレス信号を出力するモードレジスタ設定用プログ
ラムカウンタと、前記リセット信号およびモード設定信
号を入力し、前記リセット信号またはモード設定信号の
いずれかが発生したとき制御信号を発生する制御信号発
生回路と、前記制御信号を入力し前記制御信号が発生し
たとき、前記モードレジスタ設定用プログラムカウンタ
の出力にアドレス信号を発生させ、他のとき前記プログ
ラムカウンタの出力にアドレス信号を発生させるプログ
ラムカウンタセレクト回路と、前記制御信号を入力し前
記ROMからのモード情報を前記モードレジスタに転送
するモード転送回路とを含み構成される。The microcomputer of the present invention is a microcomputer that executes a program stored in a ROM and transfers mode information stored in the ROM to a mode register that sets the operating state of peripheral circuits as a program counter advances. a reset circuit that outputs a reset signal, an instruction decoder that decodes a mode register setting instruction from an input instruction and outputs a mode setting signal, a program counter that outputs an address signal to the ROM, and the mode register and the ROM. a program counter for setting a mode register that outputs an address signal to the mode register, and a control signal generation circuit that receives the reset signal and the mode setting signal and generates a control signal when either the reset signal or the mode setting signal is generated. , a program counter select circuit that inputs the control signal and generates an address signal at the output of the mode register setting program counter when the control signal is generated, and generates an address signal at the output of the program counter at other times; , a mode transfer circuit that inputs the control signal and transfers mode information from the ROM to the mode register.
次に本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.
第1図は本発明の一実施例を示すブロック図である。第
2図は本発明の動作タイミングチャートである。第3図
はR,OM B上の記憶状態を示す概念図である。まず
、ROMB上の特定番地に予めモードレジスタ4の初期
値定義しておく。次にリセット回路1からリセット信号
101が出力される。このリセット信号101を受けた
制御信号発生回路9により制御信号が出力される。この
制御信号を受けたPCセレクト回路10がモードレジス
タ設定用PC11を選択し、このモードレジスタ設定用
pciiのPC(プログラムカウンタ〉をROMB上に
初期値(第3図のB)が定義された先頭アドレスに設定
するとともにモード転送回路12が開き、バス102を
介して出力されるROM3のモード値をモードレジスタ
4へ転送する。FIG. 1 is a block diagram showing one embodiment of the present invention. FIG. 2 is an operation timing chart of the present invention. FIG. 3 is a conceptual diagram showing the storage state on R and OM B. First, an initial value of the mode register 4 is defined in advance at a specific address on the ROMB. Next, a reset signal 101 is output from the reset circuit 1. A control signal is output by the control signal generation circuit 9 which receives this reset signal 101. The PC select circuit 10 that receives this control signal selects the mode register setting PC 11, and sets the PC (program counter) of the mode register setting PCII to the top of the ROMB where the initial value (B in Figure 3) is defined. At the same time as the address is set, the mode transfer circuit 12 opens and transfers the mode value of the ROM 3 output via the bus 102 to the mode register 4.
具体的にモードレジスタ4を書き込みモードにし、そし
て、モードレジスタ設定用PCIIの動作によりROM
B上の定義された初期値(B)は順次、モード転送回路
12を通しバス102からモードレジスタ4にCPU2
を介さずに転送される(第2図の201の期間〉。リセ
ット解除に伴い、モード転送回路12は閉じられ、モー
ドレジスタは、読み出しモードとなって周辺回路5ヘモ
ードが伝えられる。その後、通常のPC(プログラムカ
ウンタ)6が動作し、CPU2が動作してプログラムを
実行される(第2図の202の期間)。さらに、プログ
ラムが進行して次のモードレジスタ設定命令(第3図の
A)を実行すると命令デコーダ7によりデコードされモ
ード設定信号が出力され制御信号発生回路9よりリセッ
ト信号101と同様の信号が出力され、初期値設定時と
同様に制御信号発生回路9が動作しPCセレクト回路1
0がモードレジスタ設定用PC11の選択し、モードレ
ジスタ設定用PCIIのPCをモードレジスタ値が定義
された先頭アドレス(第3図のC)に設定するとともに
モード転送回路12を開き、かつ、モードレジスタ4を
書き込みモードとする。モードレジスタ設定用PC11
の動作によりROM B上の定義されたモードレジスタ
値はバス102を通りモードレジスタ4に新しく転送さ
れる(第2図の203の期間)。その後の動作はリセッ
ト時と同様に動作する。その後、再び、CPUが動作し
プログラムを実行する。次のモードレジスタ設定命令が
あれば同様の事をくり返す。なお、実施例においては、
モードレジスタ4を1個で示したが複数個有している場
合においても同様に扱えることはいうまでもない。Specifically, the mode register 4 is set to write mode, and the ROM is set by the operation of the mode register setting PCII.
The initial value (B) defined on B is sequentially transferred from the bus 102 to the mode register 4 through the mode transfer circuit 12 to the CPU 2.
(period 201 in FIG. 2). Upon release of the reset, the mode transfer circuit 12 is closed, the mode register enters the read mode, and the mode is transmitted to the peripheral circuit 5. After that, the mode is transferred to the peripheral circuit 5. The PC (program counter) 6 operates, the CPU 2 operates, and the program is executed (period 202 in Figure 2).Furthermore, the program progresses and the next mode register setting command (A in Figure 3) is executed. ) is decoded by the instruction decoder 7 and a mode setting signal is output, and the control signal generation circuit 9 outputs a signal similar to the reset signal 101, and the control signal generation circuit 9 operates in the same way as when setting the initial value to select the PC. circuit 1
0 selects the mode register setting PC 11, sets the mode register setting PC II PC to the start address where the mode register value is defined (C in Figure 3), opens the mode transfer circuit 12, and selects the mode register setting PC II. 4 is the write mode. PC11 for mode register setting
As a result of the operation, the defined mode register value on ROM B is newly transferred to mode register 4 via bus 102 (period 203 in FIG. 2). The subsequent operation is the same as that at reset. After that, the CPU operates again and executes the program. If there is a next mode register setting command, the same process is repeated. In addition, in the example,
Although one mode register 4 is shown, it goes without saying that a case in which a plurality of mode registers 4 are provided can be treated in the same manner.
以上説明したように、本発明は、従来のCPUを介して
プログラムによりモードレジスタの設定を行っていたマ
イクロコンピュータに比べ、リセット時及びモードレジ
スタ設定命令時にROM上のモードレジスタ値を直接モ
ードレジスタに設定する回路及び命令を設けることによ
り、ROM容量を少なくでき、さらに処理時間を短縮で
きる効果がある。特に近年においては、マイクロコンピ
ュータの多機能化に伴い、多くのモードレジスタを有す
るようになっており、本発明による上記効果が、プログ
ラム開発の生産性向上、プログラムの機能向上に大きく
寄与すると言える。As explained above, compared to conventional microcomputers in which the mode register is set by a program via the CPU, the present invention allows the mode register value on the ROM to be directly set in the mode register at the time of reset and mode register setting command. By providing a circuit and instructions for setting, the ROM capacity can be reduced and the processing time can be further reduced. Particularly in recent years, as microcomputers have become multi-functional, they have come to have many mode registers, and it can be said that the above-mentioned effects of the present invention greatly contribute to improving the productivity of program development and improving the functionality of programs.
第1図は本発明のマイクロコンピュータの一実施例を示
すブロック図、第2図はリセット時及びモードレジスタ
設定命令実行時のタイミングチャート、第3図はROM
B上のプログラムメモリマツプの一例を示す図、第4図
は従来のマイクロコンピュータの例を示すブロック図で
ある。
1・・・リセット回路、2・・・CPU、3・・・RO
M、4・・・モードレジスタ、5・・・周辺回路、6・
・・PC17・・・命令デコーダ、8・・・RAM、9
・・・制御信号発生回路、10・・・PCセレクト回路
、11・・・モードレジスタ設定用PC112・・・モ
ードて転送回路。
yfi2 図
第3図
肩4図FIG. 1 is a block diagram showing an embodiment of the microcomputer of the present invention, FIG. 2 is a timing chart at the time of reset and when executing a mode register setting command, and FIG. 3 is a ROM
FIG. 4 is a block diagram showing an example of a conventional microcomputer. 1...Reset circuit, 2...CPU, 3...RO
M, 4...Mode register, 5...Peripheral circuit, 6.
...PC17...Instruction decoder, 8...RAM, 9
. . . Control signal generation circuit, 10. . . PC select circuit, 11. . . Mode register setting PC 112 . . . Mode transfer circuit. yfi2 Figure 3 Shoulder Figure 4
Claims (1)
プログラムを実行するとともに周辺回路の動作状態を設
定するモードレジスタに前記ROMに格納されたモード
情報を転送するマイクロコンピュータにおいて、リセッ
ト信号を出力するリセット回路と、入力された命令から
モードレジスタ設定命令をデコードしモード設定信号を
出力する命令デコーダと、前記ROMへのアドレス信号
を出力するプログラムカウンタと、前記モードレジスタ
および前記ROMへのアドレス信号を出力するモードレ
ジスタ設定用プログラムカウンタと、前記リセット信号
およびモード設定信号を入力し、前記リセット信号また
はモード設定信号のいずれかが発生したとき制御信号を
発生する制御信号発生回路と、前記制御信号を入力し前
記制御信号が発生したとき、前記モードレジスタ設定用
プログラムカウンタの出力にアドレス信号を発生させ、
他のとき前記プログラムカウンタの出力にアドレス信号
を発生させるプログラムカウンタセレクト回路と、前記
制御信号を入力し前記ROMからのモード情報を前記モ
ードレジスタに転送するモード転送回路とを含み構成さ
れることを特徴とするマイクロコンピュータ。A reset circuit that outputs a reset signal in a microcomputer that executes a program stored in a ROM and transfers mode information stored in the ROM to a mode register that sets the operating state of peripheral circuits as the program counter progresses. an instruction decoder that decodes a mode register setting instruction from an input instruction and outputs a mode setting signal; a program counter that outputs an address signal to the ROM; and an instruction decoder that outputs an address signal to the mode register and the ROM. a program counter for setting a mode register; a control signal generation circuit that receives the reset signal and the mode setting signal and generates a control signal when either the reset signal or the mode setting signal is generated; When the control signal is generated, generating an address signal at the output of the mode register setting program counter;
At other times, the program counter select circuit generates an address signal at the output of the program counter, and the mode transfer circuit inputs the control signal and transfers mode information from the ROM to the mode register. Features a microcomputer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61295840A JPS63148363A (en) | 1986-12-11 | 1986-12-11 | Microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61295840A JPS63148363A (en) | 1986-12-11 | 1986-12-11 | Microcomputer |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS63148363A true JPS63148363A (en) | 1988-06-21 |
JPH0517595B2 JPH0517595B2 (en) | 1993-03-09 |
Family
ID=17825861
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61295840A Granted JPS63148363A (en) | 1986-12-11 | 1986-12-11 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS63148363A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04304581A (en) * | 1991-04-01 | 1992-10-27 | Fujitsu Ltd | Information processor |
-
1986
- 1986-12-11 JP JP61295840A patent/JPS63148363A/en active Granted
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04304581A (en) * | 1991-04-01 | 1992-10-27 | Fujitsu Ltd | Information processor |
Also Published As
Publication number | Publication date |
---|---|
JPH0517595B2 (en) | 1993-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS6232503B2 (en) | ||
JPH0769791B2 (en) | Microprocessor | |
US4674063A (en) | Information processing apparatus having a sequence control function | |
JPS63148363A (en) | Microcomputer | |
JP2000347899A (en) | Microcomputer | |
JPS6217773B2 (en) | ||
JP2826309B2 (en) | Information processing device | |
JP2583506B2 (en) | Data processing device | |
JPS6339928B2 (en) | ||
KR950006585B1 (en) | Micro program control apparatus and control method thereof | |
JP2637070B2 (en) | Micro instruction start address generation method | |
JP3074809B2 (en) | Programmable controller | |
JPH0667896A (en) | Single chip microcomputer | |
JP2003006043A (en) | Compatible processing circuit and data processor | |
JPH0333929A (en) | Microprogram controller | |
JPS6355090B2 (en) | ||
JPH05274341A (en) | Vector instruction processor | |
JP2743947B2 (en) | Micro program control method | |
JPH0317135B2 (en) | ||
JPH1165829A (en) | Address conversion circuit | |
JPH0194437A (en) | Information processor | |
JPH04344530A (en) | Micro program control circuit | |
JPS638937A (en) | Single chip microcomputer | |
JPH09185525A (en) | Protocol debugging system | |
JPS6015970B2 (en) | Interrupt processing device in microprocessor |