JPH07109597B2 - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH07109597B2
JPH07109597B2 JP62173593A JP17359387A JPH07109597B2 JP H07109597 B2 JPH07109597 B2 JP H07109597B2 JP 62173593 A JP62173593 A JP 62173593A JP 17359387 A JP17359387 A JP 17359387A JP H07109597 B2 JPH07109597 B2 JP H07109597B2
Authority
JP
Japan
Prior art keywords
address
port
ram
data
switching
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
Application number
JP62173593A
Other languages
Japanese (ja)
Other versions
JPS6417147A (en
Inventor
清 西村
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.)
Rohm Co Ltd
Original Assignee
Rohm 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 Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP62173593A priority Critical patent/JPH07109597B2/en
Publication of JPS6417147A publication Critical patent/JPS6417147A/en
Publication of JPH07109597B2 publication Critical patent/JPH07109597B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 産業上の利用分野 本発明はマイクロコンピュータに関するものであり、よ
り特定的にはRAM(ランダムアクセスメモリ)マップドI
/O型のワンチップマイクロコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer, and more particularly to a RAM (random access memory) mapped I
/ O-type one-chip microcomputer.

従来の技術 RAMマップドI/O型のワンチップマイクロコンピュータは
CPU(中央演算処理装置)内に設けられた命令デコーダ
からRAMに供給される制御信号の線路を分岐して各I/Oポ
ートに接続し、I/Oポートをアクセスするためのアドレ
ス割当をRAMのアドレス空間上に配置した構成をもって
いて、制御信号をRAMと共有するためアドレス信号をデ
コードするだけでI/Oポート用のレジスタ、データレジ
スタを追加できるという利点を有する。また、I/Oポー
ト専用の制御命令はなく、これを実行するための制御信
号線もないので、制御信号を出力する命令デコーダの規
模が小さくできる。
Conventional technology RAM-mapped I / O type one-chip microcomputer
RAM for address allocation for accessing the I / O ports by branching the control signal line supplied from the instruction decoder provided in the CPU (Central Processing Unit) to the RAM and connecting to each I / O port Since the control signal is shared with the RAM, the I / O port register and the data register can be added by simply decoding the address signal. Further, since there is no control instruction dedicated to the I / O port and there is no control signal line for executing this, the scale of the instruction decoder that outputs the control signal can be reduced.

ところで、従来の斯種マイクロコンピュータでは各I/O
ポートはそれぞれ異なるアドレスでアドレッシングされ
る。逆にいえば、1つのアドレスでアドレッシングでき
るI/Oポートは1つだけである。
By the way, in such a conventional microcomputer, each I / O
The ports are addressed with different addresses. Conversely, only one I / O port can be addressed by one address.

発明が解決しようとする問題点 しかしながら、マイクロコンピュータの用途において
は、マイクロコンピュータの出力によって2つの装置を
同時に動かす(連動する)ことがしばしば行われる。例
えば、モータの駆動と、そのモータの作動状態を表すた
めのLED(発光ダイオード)の駆動がそれである。
DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention However, in the application of a microcomputer, it is often the case that two devices are simultaneously moved (interlocked) by the output of the microcomputer. For example, driving a motor and driving an LED (light emitting diode) for indicating the operating state of the motor.

また、複数のI/Oポートを同時に初期化したい場合もあ
る。更に1つのI/Oポートと他のI/Oポートの位置を等価
的に変えたい場合もあるが、上記従来のマイクロコンピ
ュータではこれらの対応が困難、若しくは不可能であっ
た。
There are also cases where you want to initialize multiple I / O ports at the same time. Further, there is a case where it is desired to equivalently change the positions of one I / O port and another I / O port, but it is difficult or impossible for the conventional microcomputer to deal with these.

本発明はこのような問題を解決したマイクロコンピュー
タを提供することを目的とする。
An object of the present invention is to provide a microcomputer that solves such a problem.

問題点を解決するための手段 上述の目的を達成するため本発明では、CPU内に設けら
れた命令デコーダと該命令デコーダからの制御信号が供
給されるRAM及び複数個のI/Oポートを備え該I/Oポート
をアクセスするためのアドレス割当をRAMのアドレス空
間上に配置したRAMマップドI/O型のワンチップマイクロ
コンピュータにおいて、 前記各I/Oポート内にアドレスバスからのアドレスデー
タをデコードする互いにアドレス値の異なる複数のアド
レスデコーダと、 前記複数のアドレスデコーダのアドレスとは異なるアド
レスであって且つ各I/Oポート毎にも異なるアドレスを
もち、データバスからの切り換えデータに基いて前記複
数のアドレスデコーダを切り換える切り換え用RAMと、 前記切り換え用RAMによって選ばれたアドレスデコーダ
によってデコードされるアドレスデータがI/Oポートに
入力されたとき前記データバスからデータを取り込むRA
Mと、 を該I/Oポート内に設けている。
Means for Solving the Problems To achieve the above object, the present invention comprises an instruction decoder provided in a CPU, a RAM to which a control signal from the instruction decoder is supplied, and a plurality of I / O ports. In a RAM-mapped I / O type one-chip microcomputer in which the address allocation for accessing the I / O port is arranged in the RAM address space, the address data from the address bus is decoded in each I / O port. A plurality of address decoders having different address values from each other, and an address different from the addresses of the plurality of address decoders and also different for each I / O port, and based on the switching data from the data bus, A switching RAM for switching a plurality of address decoders and an address decoder selected by the switching RAM. RA that takes in data from the data bus when the address data to be input is input to the I / O port
M and M are provided in the I / O port.

作 用 例えば、従来例であれば1つのI/Oポートは1つのRAMア
ドレスでしかアドレッシングできなかったが、本発明構
成では1つのI/Oポートを複数のRAMアドレスによってア
ドレッシングすることができる。I/Oポートのアドレス
デコーダのアドレス値を複数個に切り換え自在としてい
るからである。そして、その切り換えは前記アドレスデ
コーダによってデコードされるRAMアドレスとは異なる
他のアドレスでアクセスされる切り換え手段に切り換え
用のRAMデータを与えることによって制御される。
Operation For example, in the conventional example, one I / O port can be addressed only by one RAM address, but in the configuration of the present invention, one I / O port can be addressed by a plurality of RAM addresses. This is because the address value of the address decoder of the I / O port can be switched among multiple addresses. The switching is controlled by giving the switching RAM data to the switching means accessed at another address different from the RAM address decoded by the address decoder.

而して、前記アドレスデコーダのアドレス値が切り換え
られることにより、そのI/Oポートは恰も位置が移動若
しくは他のI/Oポートと入れ替わったかのように設定さ
れる。
Thus, by switching the address value of the address decoder, the I / O port is set as if its position had moved or replaced with another I / O port.

実施例 以下、本発明の一実施例を図に基づいて説明する。図に
おいて、(1)はCPU内に設けられるコントロールバス
コントローラであり、その出力はコントロールバス
(2)を通してRAM(3)へ供給されると共に第1のI/O
ポート(4)及び第2のI/Oポート(5)にも供給され
る。一方、CPU外に形成されたアドレスバスコントロー
ラ(6)の出力もアドレスバス(7)を通してRAM
(3)並びに第1、第2のI/Oポート(4)(5)へ与
えられるようになっている。(8)はデータバスであ
り、RAM(3)及び第1、第2のI/Oポート(4)(5)
に接続されている。尚、図の簡単化のためI/Oポートを
2つしか示していないが、実際には同様に接続された多
数のI/Oポートが設けられている。
Embodiment One embodiment of the present invention will be described below with reference to the drawings. In the figure, (1) is a control bus controller provided in the CPU, the output of which is supplied to the RAM (3) through the control bus (2) and the first I / O.
It is also supplied to the port (4) and the second I / O port (5). On the other hand, the output of the address bus controller (6) formed outside the CPU is also RAM through the address bus (7).
(3) and the first and second I / O ports (4) and (5). (8) is a data bus, RAM (3) and first and second I / O ports (4) (5)
It is connected to the. Although only two I / O ports are shown for simplification of the drawing, a large number of I / O ports connected in the same manner are actually provided.

各I/OポートにはそれぞれRAM(RM1)(RM2)が設けられ
ているが、本実施例では、このRAM(RM1)(RM2)に付
随するアドレスデコーダが2つずつ用意されている。
(A1)(B1)及び(A2)(B2)はそれらのアドレスデコ
ーダを示す。
Each I / O port is provided with a RAM (RM 1 ) (RM 2 ), but in this embodiment, two address decoders associated with this RAM (RM 1 ) (RM 2 ) are prepared. ing.
(A 1 ) (B 1 ) and (A 2 ) (B 2 ) denote their address decoders.

これらのアドレスデコーダは他のアドレスとRAMデータ
に基づいて切り換えられる。(C1)(C2)はその切り換
えを行うため各I/Oポート(4)(5)内に設けられた
切り換え用RAMであって、アドレスバス(7)からのア
ドレス信号とデータバス(8)からの切り換えデータに
応答してアドレスデコーダを切り換える。
These address decoders are switched based on other addresses and RAM data. (C 1 ) and (C 2 ) are switching RAMs provided in the respective I / O ports (4) and (5) for performing the switching, and include an address signal from the address bus (7) and a data bus ( The address decoder is switched in response to the switching data from 8).

今、第1のI/Oポート(4)におけるアドレスデコーダ
(A1)はアドレス値がN1、一方アドレスデコーダ(B1
はアドレス値がN2に設定されており、第2のI/Oポート
(5)におけるアドレスデコーダ(A2)はN2、アドレス
デコーダ(B2)はN1にそれぞれアドレス値が設定されて
いるものとし、且つ切り換え用RAM(C1)(C2)に入力
される切り換え信号(RAMデータ)が2ビットであっ
て、切り換え関係が次のようになっているものとする。
Now, the address decoder (A 1 ) in the first I / O port (4) has an address value of N 1 , while the address decoder (B 1 )
Is set the address value in N 2, the address decoder (A 2) in the second I / O port (5) is N 2, the address decoder (B 2) is respectively address value N 1 is set It is assumed that the switching signals (RAM data) input to the switching RAMs (C 1 ) and (C 2 ) are 2 bits, and the switching relationship is as follows.

ここで、第1のI/Oポート(4)並びに第2のI/Oポート
(5)の欄に記載のA1、A2、B1、B2は2ビットRAMデー
タの内容に応じて選択される方のアドレスデコーダを示
しており、<>内に記載のN1又はN2は選択されたアドレ
ス値を示している。
Here, A 1 , A 2 , B 1 and B 2 described in the columns of the first I / O port (4) and the second I / O port (5) depend on the contents of the 2-bit RAM data. The selected address decoder is shown, and N 1 or N 2 shown in <> indicates the selected address value.

このような場合、前記(イ)では第1のI/Oポート
(4)はアドレス値N1、第2のI/Oポート(5)はアド
レス値N2に設定されるので、アドレスバスコントローラ
(6)から与えられるRAMアドレスがN1のときは第1のI
/Oポート(4)のみがアドレッシングされ、N2のときは
第2のI/Oポート(5)のみがアドレッシングされるこ
とになる。
In such a case, since the first I / O port (4) is set to the address value N 1 and the second I / O port (5) is set to the address value N 2 in the above (a), the address bus controller When the RAM address given from (6) is N 1 , the first I
Only the / O port (4) is addressed, and when it is N 2 , only the second I / O port (5) is addressed.

前記(ロ)では、RAMアドレスがN1で第2のI/Oポート
が、N2で第1のI/Oポートがアドレッシングされる。同
様に(ハ)ではRAMアドレスがN1で第1のI/Oポートと第
2のI/Oポートの双方がアドレッシングされ、RAMアドレ
スN2ではどちらもアドレッシングされない。最後に
(ニ)では、RAMアドレスN2によって双方のI/Oポートを
アドレッシングし、N1ではどちらもアドレッシングされ
ない。
In the (b), RAM address second I / O port N 1 is the first I / O port in N 2 is addressed. Similarly, in (c), the RAM address is N 1 , both the first I / O port and the second I / O port are addressed, and neither is addressed at RAM address N 2 . Finally, in (d), both I / O ports are addressed by RAM address N 2 , and neither is addressed by N 1 .

従って、以上のことから例えば第1、第2のI/Oポート
(4)(5)を同時に初期化したい場合には(ハ)又は
(ニ)の状態にして同一の初期データをRAM(RM1)(RM
2)に与えればよい。また、第1、第2のI/Oポート
(4)(5)に同一の命令で初期化以外の連動機能を行
わせることもできる。
Therefore, from the above, when it is desired to initialize the first and second I / O ports (4) and (5) at the same time, the same initial data is set in the RAM (RM) by changing the state to (c) or (d). 1 ) (RM
2 ) to give. Further, the first and second I / O ports (4) and (5) can be made to perform the interlocking function other than initialization by the same instruction.

次に、第1のI/Oポート(4)で行っていた動作を第2
のI/Oポート(5)で行い、第2のI/Oポート(5)で行
っていた動作を第1のI/Oポート(4)で行わせる場合
には、(イ)の状態から(ロ)の状態にして行えばよ
い。この場合には、第1のI/Oポートと第2のI/Oポート
の位置を入れ替えたことと等価になる。
Next, the operation performed in the first I / O port (4) is
If you want to use the first I / O port (4) to perform the operation that was performed on the second I / O port (5) on the first I / O port (5), It may be performed in the state of (b). In this case, it is equivalent to exchanging the positions of the first I / O port and the second I / O port.

以上において本発明を実施例に沿って説明したが、本発
明はこの実施例に限定されるものでなく、特許請求の範
囲に記載した発明の要旨を逸脱しない範囲内で種々の変
更、修正が可能である。例えば、3個以上のI/Oポート
若しくは全てのI/Oポートに上述の構成を設けてもよ
く、又1つのI/Oポートのみに上記の構成を設けるよう
にしてもよいことはいうまでもない。また、上述の
(イ)〜(ニ)における切り換え信号と第1、第2のI/
Oポート(4)(5)のアドレス値との関係は任意に変
えてもよい。更に、各I/Oポートに用意するアドレスデ
コーダの数(従って切り換えアドレス値の数)は図示の
ように2つに限らない。
Although the present invention has been described above according to the embodiment, the present invention is not limited to this embodiment, and various changes and modifications can be made without departing from the scope of the invention described in the claims. It is possible. For example, three or more I / O ports or all I / O ports may be provided with the above configuration, or only one I / O port may be provided with the above configuration. Nor. In addition, the switching signals in the above (a) to (d) and the first and second I /
The relationship with the address values of the O ports (4) and (5) may be arbitrarily changed. Further, the number of address decoders prepared for each I / O port (hence the number of switching address values) is not limited to two as shown in the figure.

発明の効果 以上の通り本発明によれば、1つのI/Oポートを複数のR
AMアドレスでアドレッシングすることができる。そのた
め複数のI/Oポートを単独の命令で同時に初期化した
り、初期化以外の機能動作を連動させたりすることも可
能である。また、I/Oポートの位置を等価的に変えるこ
とができるなど、マイクロコンピュータとしての用途、
並びに機能価値が高められる。
As described above, according to the present invention, one I / O port is connected to a plurality of Rs.
It can be addressed by AM address. Therefore, it is possible to initialize multiple I / O ports at the same time with a single instruction, or to link functional operations other than initialization. In addition, the use as a microcomputer, such as the position of the I / O port can be changed equivalently,
In addition, the functional value is increased.

更に、各I/Oポートについてアドレスデコーダを個別に
切り換えることができるので、複数のI/Oポートのアド
レス組合せをソフト的に達成でき、ハード的に組合せを
作っておく必要はない。従って、応用性がよいとともに
ハード的な接続がシンプルで、且つチップ自体のサイズ
を小さく抑えることができるという効果もある。
Further, since the address decoder can be individually switched for each I / O port, the address combination of a plurality of I / O ports can be achieved by software, and it is not necessary to make the combination by hardware. Therefore, there is an effect that the applicability is good, the hardware connection is simple, and the size of the chip itself can be kept small.

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

図は本発明の一実施例を示すブロック図である。 (1)……コントロールバスコントローラ, (2)……コントロールバス,(3)……RAM, (4)……第1のI/Oポート,(5)……第2のI/Oポー
ト,(7)……アドレスバス,(8)……データバス,
(A1)(B1)(A2)(B2)……アドレスデコーダ,(RM
1)(RM2)……I/Oポート内のRAM, (C1)(C2)……切り換え用RAM, (N1)(N2)……アドレス値。
FIG. 1 is a block diagram showing an embodiment of the present invention. (1) …… Control bus controller, (2) …… Control bus, (3) …… RAM, (4) …… First I / O port, (5) …… Second I / O port, (7) …… Address bus, (8) …… Data bus,
(A 1 ) (B 1 ) (A 2 ) (B 2 ) …… Address decoder, (RM
1 ) (RM 2 ) …… RAM in I / O port, (C 1 ) (C 2 ) …… RAM for switching, (N 1 ) (N 2 ) …… Address value.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】CPU内に設けられた命令デコーダと該命令
デコーダからの制御信号が供給されるRAM及び複数個のI
/Oポートを備え該I/Oポートをアクセスするためのアド
レス割当をRAMのアドレス空間上に配置したRAMマップド
I/O型のワンタッチマイクロコンピュータにおいて、前
記各I/Oポート内に、 アドレスバスからのアドレスデータをデコードする互い
にアドレス値の異なる複数のアドレスデコーダと、 前記複数のアドレスデコーダのアドレスとは異なるアド
レスであって且つ各I/Oポート毎にも異なるアドレスを
もち、データバスからの切り換えデータに基いて前記複
数のアドレスデコーダを切り換える切り換え用RAMと、 前記切り換え用RAMによって選ばれたアドレスデコーダ
によってデコードされるアドレスデータがI/Oポートに
入力されたとき前記データバスからデータを取り込むRA
Mと、 を有することを特徴とするマイクロコンピュータ。
1. An instruction decoder provided in a CPU, a RAM to which a control signal from the instruction decoder is supplied, and a plurality of I's.
RAM-mapped with / O port and address allocation for accessing the I / O port arranged in the RAM address space
In the I / O type one-touch microcomputer, in each of the I / O ports, a plurality of address decoders having different address values for decoding address data from the address bus, and an address different from the addresses of the plurality of address decoders are used. A switching RAM that has a different address for each I / O port and that switches the plurality of address decoders based on the switching data from the data bus, and decodes by the address decoder selected by the switching RAM. RA that takes in data from the data bus when the address data to be input is input to the I / O port
A microcomputer having M and.
JP62173593A 1987-07-11 1987-07-11 Microcomputer Expired - Lifetime JPH07109597B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62173593A JPH07109597B2 (en) 1987-07-11 1987-07-11 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62173593A JPH07109597B2 (en) 1987-07-11 1987-07-11 Microcomputer

Publications (2)

Publication Number Publication Date
JPS6417147A JPS6417147A (en) 1989-01-20
JPH07109597B2 true JPH07109597B2 (en) 1995-11-22

Family

ID=15963470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62173593A Expired - Lifetime JPH07109597B2 (en) 1987-07-11 1987-07-11 Microcomputer

Country Status (1)

Country Link
JP (1) JPH07109597B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0325549A (en) * 1989-06-22 1991-02-04 Nec Corp Selector

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5757331A (en) * 1980-09-24 1982-04-06 Nec Corp Terminal controlling system
JPS58211232A (en) * 1982-06-02 1983-12-08 Nec Corp Microcomputer output circuit
JPS6079452A (en) * 1983-10-06 1985-05-07 Oki Electric Ind Co Ltd Address assignment system for module

Also Published As

Publication number Publication date
JPS6417147A (en) 1989-01-20

Similar Documents

Publication Publication Date Title
US4451881A (en) Data processing system bus for multiple independent users
EP0380851B1 (en) Modular crossbar interconnections in a digital computer
US5182801A (en) Apparatus and method for providing fast data transfer between multiple devices through dynamic reconfiguration of the memory space of the devices
JP2642671B2 (en) Digital crossbar switch
US4991084A (en) N×M round robin order arbitrating switching matrix system
JPH07109597B2 (en) Microcomputer
JPS621047A (en) Semiconductor device containing memory circuit
JPH10326224A (en) Digital signal processor
JPS63142434A (en) Interrupt control system
JP3182906B2 (en) Microcomputer
JP2004213666A (en) Dma module and its operating method
US5408632A (en) Semiconductor memory having a bit position decoder and date re-ordering circuitry for arranging bits in a word of data
JPH0583938B2 (en)
JP2718661B2 (en) Dual port memory controller
JPS61165133A (en) Microcomputer
JP2692180B2 (en) Microcomputer
JPH0575138B2 (en)
KR940001612Y1 (en) Driving circuit which uses multi memory bank in a led display device
JPH10254767A (en) Memory controller and memory system by the controller
JPH0221306A (en) Programmable controller
JPH01297758A (en) Data transmission method between microcomputers
JPH0449456A (en) Microcomputer system
JPH07114791A (en) Access circuit of dual port memory
JPS63244255A (en) Multiprocessor system
JPS62287352A (en) Electronic equipment