JPS6311706B2 - - Google Patents

Info

Publication number
JPS6311706B2
JPS6311706B2 JP53110423A JP11042378A JPS6311706B2 JP S6311706 B2 JPS6311706 B2 JP S6311706B2 JP 53110423 A JP53110423 A JP 53110423A JP 11042378 A JP11042378 A JP 11042378A JP S6311706 B2 JPS6311706 B2 JP S6311706B2
Authority
JP
Japan
Prior art keywords
input
output
signal
output port
port
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
Application number
JP53110423A
Other languages
Japanese (ja)
Other versions
JPS5537649A (en
Inventor
Toshiaki Suzuki
Yoshiaki Daimatsu
Takashi Sakao
Kazuaki Mayumi
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP11042378A priority Critical patent/JPS5537649A/en
Publication of JPS5537649A publication Critical patent/JPS5537649A/en
Publication of JPS6311706B2 publication Critical patent/JPS6311706B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)
  • Information Transfer Systems (AREA)

Description

【発明の詳細な説明】 本発明はマイクロコンピユータの入出力ポート
(I/Oポート)数を容易に拡張して使用するこ
とのできるマイクロコンピユータに関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a microcomputer whose number of input/output ports (I/O ports) can be easily expanded and used.

1チツプマイクロコンピユータ(以下、1チツ
プマイコンと記す)においては少くともCPU、
命令ROM、データRAM、I/Oポートを含ん
でいる。また結合する1チツプマイコンの命令
ROMを除く全ての機能要素を含み命令ROMを
外付けとするエバリユータチツプがあるがここで
はこれをも含めて1チツプマイコンと呼ぶことに
する。
In a 1-chip microcomputer (hereinafter referred to as 1-chip microcomputer), at least a CPU,
Contains instruction ROM, data RAM, and I/O ports. It also combines the instructions of one chip microcontroller
There is an evaluator chip that includes all functional elements except ROM and has an external instruction ROM, but here we will refer to it as a 1-chip microcontroller.

一般に同一構造の1チツプマイコンでもROM
やRAMの容量、I/Oポート数によつていくつ
かの品種を設けている。この場合、品種によつて
I/Oポート数は固定されるのが普通である。用
途によつて品種を選定して専用マイコンとして使
用する場合にはこれで実用上の不便はない。しか
し複数の用途、特にレベルアツプを図つていく様
な用途に同一品種を使用したい場合にはI/Oポ
ート数を加減できれば都合が良い。
In general, even a single-chip microcontroller with the same structure has ROM.
There are several types available depending on the amount of memory, RAM capacity, and number of I/O ports. In this case, the number of I/O ports is usually fixed depending on the product type. This poses no practical inconvenience when selecting a product type depending on the application and using it as a dedicated microcomputer. However, when it is desired to use the same product for multiple purposes, especially for increasing the level of use, it would be convenient if the number of I/O ports could be increased or decreased.

例えば第1の例としてレベル1の製品には3I/
Oポートを使用し、レベル2の製品には5I/Oポ
ートを使用し、レベル3の製品には12I/Oポー
トを使用する様な用途があるとする。ROMの内
容がすべて同一の場合、レベル1〜レベル3まで
のすべてに使用できる品種を選定する。この場
合、しかしレベル1、レベル2に使用する時には
I/Oポートが余る。そこでレベル1に相当する
最少システムに適応する1チツプマイコン(マス
ター側)の品種を選定する。そして、レベル2,
レベル3の用途にはI/O拡張チツプ(スレーブ
側)を設けておき、I/Oポートだけを拡張して
増やすことにより上記問題を解決できる。
For example, in the first example, a level 1 product has 3I/
Suppose that there is an application in which an O port is used, a level 2 product uses 5 I/O ports, and a level 3 product uses 12 I/O ports. If all ROM contents are the same, select a type that can be used for all levels 1 to 3. In this case, however, when used for level 1 and level 2, there are surplus I/O ports. Therefore, a type of 1-chip microcomputer (master side) that is compatible with the minimum system equivalent to level 1 is selected. And level 2,
The above problem can be solved by providing an I/O expansion chip (slave side) for level 3 applications and expanding and increasing only the I/O ports.

第2の例としてエバリエーシヨン用のチツプの
場合、命令ROMを外付けしなければならないた
めプログラムカウンタ出力端子と、命令コード入
力端子が命令ROM内蔵のチツプにくらべて増加
する。このためI/Oポート数が増えればパツケ
ージのピン数が不足するのでチツプを2分割する
ことがある。また生産台数が少ない場合には、エ
バリエーシヨン用チツプと外付けROMを用いて
機器に組み込む場合もある。このときI/Oポー
トはごく少なくても済む品種のエバリエーシヨン
用として組み込み実装される場合がある。そこ
で、少々のI/OポートとCPU部、RAMを1チ
ツプのエバリエーシヨン用チツプ(マスター側)
にまとめておき、I/Oポートの残りはI/O拡
張用チツプ(以下、スレーブ側)に収納する。以
上、2例をあげて1チツプ・マイコンからI/O
ポートの一部を分割した場合の利点を述べた。
As a second example, in the case of a chip for evaluation, since the instruction ROM must be externally attached, the number of program counter output terminals and instruction code input terminals is increased compared to a chip with a built-in instruction ROM. For this reason, if the number of I/O ports increases, the number of pins on the package becomes insufficient, so the chip may be divided into two parts. In addition, if the number of units produced is small, an evaluation chip and an external ROM may be used to incorporate the device into the device. At this time, I/O ports may be incorporated and implemented for variation of a product that requires only a small number of I/O ports. Therefore, I installed a few I/O ports, a CPU section, and a single RAM chip for the evasion (master side).
The remaining I/O ports are stored in an I/O expansion chip (hereinafter referred to as slave side). Above are two examples of I/O from one chip microcontroller.
The advantages of dividing a part of the port were described.

ところが2チツプに分割すると、それぞれのチ
ツプを相互に接続するための信号が必要になる。
またROM,RAM,CPU部,I/Oポートの一
部を含んだ1チツプマイコン側(以下マスター
側)に、I/O拡張チツプの制御信号端子を加え
る必要がある。しかしマスター側だけで使用する
場合にはI/O拡張チツプの制御信号端子は使わ
ないので不要な端子が増える。
However, when it is divided into two chips, signals are required to interconnect each chip.
It is also necessary to add a control signal terminal for the I/O expansion chip to the one-chip microcomputer side (hereinafter referred to as the master side) that includes the ROM, RAM, CPU section, and part of the I/O port. However, when used only on the master side, the control signal terminals of the I/O expansion chip are not used, so the number of unnecessary terminals increases.

本発明は上記従来の欠点を除去し、I/Oポー
トを使つてI/O拡張チツプの制御信号も入出力
することによつて、マスターチツプだけで使用す
る時に、不要なポートをできるだけ少なくするこ
とを目的とする。
The present invention eliminates the above-mentioned drawbacks of the conventional technology and uses I/O ports to input and output control signals for the I/O expansion chip, thereby reducing unnecessary ports as much as possible when only the master chip is used. The purpose is to

また本発明は、拡張時、あるいはマイコンのシ
リーズ化の展開時に、サポートツールのI/O実
現の簡易化をも目的とする。
Another object of the present invention is to simplify I/O implementation of a support tool during expansion or when developing a series of microcomputers.

以下、本発明の一実施例に基づいて詳細な説明
を行なう。
A detailed explanation will be given below based on one embodiment of the present invention.

第1図は1チツプマイコンをマスター側だけで
単独で使用する場合のブロツク図である。同図に
おいて電源,クロツク,割込,シフトバツフア,
タイマ及びリセツト部分の説明は周知であり、本
発明とは直接関係しないので説明を省略する。
FIG. 1 is a block diagram when a 1-chip microcomputer is used solely on the master side. In the figure, power supply, clock, interrupt, shift buffer,
The explanation of the timer and reset portion is well known and is not directly related to the present invention, so the explanation will be omitted.

マスター側の1チツプマイコン1の拡張切換端
子2は開放しておく。この端子2はチツプ内のプ
ルアツプ抵抗によつて電源レベルにプルアツプさ
れ、HIGHレベルを保つ。
The expansion switching terminal 2 of the 1-chip microcomputer 1 on the master side is left open. This terminal 2 is pulled up to the power supply level by a pull-up resistor in the chip and kept at a HIGH level.

専用入出力ポート3〜5はI/Oポート信号を
入出力するポートである。複合入出力ポート6は
入出力デーポート信号とタイミング信号とのいず
れかの信号を入出力する。複合入出力ポート7は
入出力ポート信号とデータ信号とのいずれかの信
号を入出力する。複合入出力ポート8は入出力ポ
ート信号とコントロール信号とのいずれかを入出
力する。
Dedicated input/output ports 3 to 5 are ports for inputting and outputting I/O port signals. The composite input/output port 6 inputs/outputs either an input/output data port signal or a timing signal. The composite input/output port 7 inputs/outputs either an input/output port signal or a data signal. The composite input/output port 8 inputs/outputs either an input/output port signal or a control signal.

拡張切換端子2がHIGHレベルの時にはポート
信号を入出力する様に切換えられている。
When the expansion switching terminal 2 is at HIGH level, it is switched to input and output port signals.

第2図は1チツプマイコンのマスター側1に
I/O拡張チツプ(以下スレーブ側)18を増設
して使用する場合のブロツク図である。この時に
マスター側のマイコン1の拡張切換端子2は
LOWレベルに設定する。専用入出力ポート3〜
5はI/Oポート信号を入出力する。
FIG. 2 is a block diagram when an I/O expansion chip (hereinafter referred to as slave side) 18 is added to the master side 1 of a one-chip microcomputer. At this time, the expansion switching terminal 2 of the microcomputer 1 on the master side is
Set to LOW level. Dedicated input/output port 3~
5 inputs and outputs I/O port signals.

複合入出力ポート6〜8は拡張切換端子2が
LOWレベルなので、タイミング信号と、データ
バスと、コントロール信号から成る拡張制御信号
を入出力する。
Composite input/output ports 6 to 8 have expansion switching terminal 2.
Since it is at LOW level, it inputs and outputs extended control signals consisting of timing signals, data buses, and control signals.

この時にマスター側のマイコン1のI/Oポー
ト6〜8は拡張制御信号を入出力するために入出
力ポートがなくなるので、代りにスレーブ側18
のI/Oポート9,10,11から入出力され
る。また、拡張されたI/Oポート12〜17も
新たにスレーブ側18から入出力される。
At this time, the I/O ports 6 to 8 of the microcomputer 1 on the master side have no input/output ports because they input and output extended control signals, so the I/O ports 18 on the slave side
It is input and output from I/O ports 9, 10, and 11 of. Further, the expanded I/O ports 12 to 17 are also newly input/output from the slave side 18.

次に第3図,第4図ブロツク図にもとづいてチ
ツプ内部の構成、動作を述べる。まず第3図にお
いて1チツプマイコンをマスター側だけで使用す
る場合について述べる。まず拡張切換端子2はプ
ルアツプされてHIGHレベルになる。この時に切
換回路として動作するマルチプレクサ23〜25
はI/Oポート信号側を入出力する様に選択され
ている。
Next, the internal structure and operation of the chip will be described based on the block diagrams of FIGS. 3 and 4. First, in FIG. 3, we will discuss the case where a 1-chip microcomputer is used only on the master side. First, the expansion switching terminal 2 is pulled up and becomes HIGH level. Multiplexers 23 to 25 that operate as switching circuits at this time
is selected to input/output the I/O port signal side.

出力命令実行時はデータバス30のデータが
I/O用レジスタ20〜22にラツチされる。
I/O用レジスタ20〜22のラツチ出力はマル
チプレクサ23〜25を経由して複合入出力ポー
ト6〜8に出力する。
When an output command is executed, data on the data bus 30 is latched into the I/O registers 20-22.
The latch outputs of I/O registers 20-22 are output to composite input/output ports 6-8 via multiplexers 23-25.

入力命令実行時は複合入出力ポート6〜8のデ
ータが切換回路としてのマルチプレクサ23〜2
5を経由してデータバス30に入力する。
When an input command is executed, the data of composite input/output ports 6 to 8 is transferred to multiplexers 23 to 2 as switching circuits.
5 to the data bus 30.

この様にして複合入出力ポート6〜8にはI/
Oポート信号が入出力される。
In this way, composite input/output ports 6 to 8 have I/O ports.
O port signals are input and output.

次に第3図マスター側と、第4図スレーブ側と
を接続してI/Oポートを拡張して使用する場合
について述べる。まず拡張切換端子2はLOWレ
ベルにする。この時、切換回路として動作するマ
ルチプレクサ20〜22はそれぞれタイミング信
号側と、データバス信号側と、コントロール信号
側を選択している。
Next, a case will be described in which the master side shown in FIG. 3 and the slave side shown in FIG. 4 are connected to expand and use the I/O ports. First, set expansion switching terminal 2 to LOW level. At this time, multiplexers 20 to 22 operating as switching circuits select the timing signal side, the data bus signal side, and the control signal side, respectively.

従つて複合入出力ポート6〜8からはタイミン
グ信号とI/Oポートに入出力するためのデータ
バス信号と、コントロール信号から成る拡張制御
信号が入出力される。またマスター側とスレーブ
側は相互に複合、結合入出力ポート6―6a,7
―7a,8―8aで接続されている。複合入出力
ポート8aから入力されたコントロール信号は
I/Oコントロール回路43において、結合入出
力ポート6aから入力されたタイミング信号と
ANDゲートされる。入出力命令それぞれに必要
なタイミングでゲートされたコントロール信号を
I/Oコントロール信号線54に出力する。出力
命令の実行時には結合入出力ポート7aからデー
タバスに送られて来たデータをレジスタ44〜5
2にラツチするとともに対応するポート9〜17
に出力する。
Therefore, extended control signals consisting of timing signals, data bus signals for inputting and outputting to the I/O ports, and control signals are inputted and outputted from the composite input/output ports 6 to 8. In addition, the master side and slave side are mutually combined and combined input/output ports 6-6a, 7
-7a and 8-8a are connected. In the I/O control circuit 43, the control signal input from the composite input/output port 8a is combined with the timing signal input from the combined input/output port 6a.
AND gated. A gated control signal is output to the I/O control signal line 54 at the timing required for each input/output command. When an output command is executed, the data sent from the combined input/output port 7a to the data bus is transferred to the registers 44 to 5.
2 and the corresponding ports 9-17
Output to.

入力命令の実行時にはポート9〜17からデー
タを入力してデータバス53に出力し、結合入出
力ポート7aからマスター側に送る。
When an input command is executed, data is input from ports 9 to 17, output to the data bus 53, and sent to the master side from the combined input/output port 7a.

次に第3図,第4図を具体回路化したものを第
5図,第6図に示す。第5図において201〜2
12はDフリツプフロツプ、215は出力命令信
号線、216は拡張切換信号線、217は入力命
令信号線、218は出力命令信号線、219はデ
ータバスおよび入出力切換信号線、220は入力
命令信号線、221は出力命令信号線、222は
入力命令信号線、224〜255,293〜30
4はトランジスタ、256〜279は出力ドライ
バ・トランジスタ、280〜291は入出力端
子、292はORゲート、306は切換回路であ
る。
Next, FIGS. 5 and 6 show concrete circuits of FIGS. 3 and 4. 201-2 in Figure 5
12 is a D flip-flop, 215 is an output command signal line, 216 is an expansion switching signal line, 217 is an input command signal line, 218 is an output command signal line, 219 is a data bus and input/output switching signal line, and 220 is an input command signal line. , 221 is an output command signal line, 222 is an input command signal line, 224-255, 293-30
4 is a transistor, 256 to 279 are output driver transistors, 280 to 291 are input/output terminals, 292 is an OR gate, and 306 is a switching circuit.

また第6図において401〜412はマスター
側との接続端子、413はポートアドレスデコー
ダ、414はポートアドレスラツチDフリツプフ
ロツプ、415はI/Oコントロール・エンコー
ダ・デコーダ、418〜422はスレーブ側の
I/Oポート端子、423〜427はANDゲー
ト、428〜432はI/OポートDフリツプフ
ロツプ、433〜437はプルアツプ・トランジ
スタ、438〜442はI/Oドライバ・トラン
ジスタ、443〜452はトランスフアゲート・
トランジスタ、453はポートアドレス信号線で
ある。
In FIG. 6, 401 to 412 are connection terminals with the master side, 413 is a port address decoder, 414 is a port address latch D flip-flop, 415 is an I/O control encoder decoder, and 418 to 422 are I/Os on the slave side. O port terminals, 423-427 are AND gates, 428-432 are I/O port D flip-flops, 433-437 are pull-up transistors, 438-442 are I/O driver transistors, 443-452 are transfer gates.
The transistor 453 is a port address signal line.

次に動作を説明する。まずマスター側だけで使
用する場合を第5図イ〜ハにもとづき述べる。
Next, the operation will be explained. First, the case where it is used only on the master side will be described based on FIGS. 5A to 5C.

拡張切換端子2を開放状態にすると、拡張切換
信号線216はHIGHレベルになつているので、
切換回路306を構成するトランジスタ224〜
235がOFFになり、トランジスタ293〜3
04はON状態になる。この結果、第5図イにお
いて切換回路306は、出力ラツチ用フリツプフ
ロツプ201,202,203,204の出力を
トランジスタ257,259,261,263に
伝達し、第5図ロにおいて切換回路306は出力
ラツチ用フリツプフロツプ205,206,20
7,208の出力をトランジスタ265,26
7,269,271に伝達し、第5図ハにおい
て、切換回路306は出力ラツチ用フリツプフロ
ツプ209,210,211,212の出力をト
ランジスタ273,275,277,279に伝
達する。出力命令を実行すると入出力端子に出力
したいデータがデータバス30上に乗せられると
ともに、ポートアドレス毎に独立した出力命令信
号線215,218,221の中で出力アドレス
に対応した一本にトリガパルスが出力される。入
出力端子280,281,282,283,に出
力する場合、出力命令信号線215によるトリガ
パルスに同期して出力ラツチ用フリツプフロツプ
201,202,203,204が動作し、該当
するポートに出力命令が実行されるまでデータを
保持する。このようにして、出力命令実行時には
データバス30から出力ラツチ用フリツプフロツ
プ201〜212にラツチしてトランジスタ25
6〜279による出力ドライバを駆動して入出力
端子280〜291に出力する。入力命令実行時
には出力ドライバのエンハンスメント・トランジ
スタ257,259,261,263,265,
267,269,271,273,275,27
7,279をOFFにする。すると、端子280
〜291は出力ドライバのプルアツプ用デプレツ
シヨン・トランジスタ256,258,260,
262,264,266,268,270,27
2,274,276,278によつて適当なイン
ピーダンスを持ち電源VDDにプルアツプされる。
When the expansion switching terminal 2 is opened, the expansion switching signal line 216 becomes HIGH level.
Transistors 224 to 224 forming the switching circuit 306
235 is turned off, transistors 293-3
04 is in the ON state. As a result, the switching circuit 306 in FIG. flip-flop 205, 206, 20
7,208 output to transistors 265, 26
7, 269, 271, and in FIG. When an output command is executed, the data to be output to the input/output terminal is placed on the data bus 30, and a trigger pulse is sent to one of the output command signal lines 215, 218, and 221, which are independent for each port address, and corresponds to the output address. is output. When outputting to the input/output terminals 280, 281, 282, 283, the output latch flip-flops 201, 202, 203, 204 operate in synchronization with the trigger pulse from the output command signal line 215, and the output command is sent to the corresponding port. Retain data until executed. In this way, when an output command is executed, the data bus 30 is latched to the output latch flip-flops 201 to 212, and the transistor 25 is latched.
The output drivers 6 to 279 are driven to output to input/output terminals 280 to 291. When executing an input command, the output driver enhancement transistors 257, 259, 261, 263, 265,
267, 269, 271, 273, 275, 27
7,279 is turned off. Then, terminal 280
~291 are output driver pull-up depletion transistors 256, 258, 260,
262, 264, 266, 268, 270, 27
2, 274, 276, and 278 with appropriate impedance and are pulled up to the power supply VDD.

入力命令を実行するとポートアドレス毎に独立
した入力命令信号線217,220,222の中
で入力アドレスに対応した一本にパルスが出力さ
れる。入出力端子280,281,282,28
3からデータを読み込む場合、入力命令信号線2
17のパルスによつてトランジスタ236,23
7,238,239が導通状態になり、端子28
0〜283のレベルをデータバス30に伝達す
る。このようにして入出力端子280〜291に
入力されたデータは、データバス30に入力され
る。
When an input command is executed, a pulse is output to one of the input command signal lines 217, 220, and 222, which are independent for each port address, and corresponds to the input address. Input/output terminals 280, 281, 282, 28
When reading data from 3, input command signal line 2
17 pulses cause transistors 236, 23
7, 238, 239 become conductive, and terminal 28
The levels 0 to 283 are transmitted to the data bus 30. The data thus input to the input/output terminals 280 to 291 is input to the data bus 30.

次にスレーブ側を拡張接続する場合を第5図イ
〜ハ及び第6図イ,ロにもとづき述べる。
Next, the case of expanding connection on the slave side will be described based on FIGS. 5A to 5C and FIGS. 6A and 6B.

まずマスター側第5図の部分を述べる。拡張切
換端子2をLOWレベルにすると拡張切換信号線
216がLOWレベルになるので切換回路306
を構成するトランジスタ224〜235がONに
なり、トランジスタ293〜304はOFFにな
る。
First, the part shown in Figure 5 on the master side will be described. When the extension switching terminal 2 is set to LOW level, the extension switching signal line 216 becomes LOW level, so the switching circuit 306
Transistors 224 to 235 constituting the circuit are turned on, and transistors 293 to 304 are turned off.

第5図イにおいて切換回路306は切換信号が
LOWレベルなので、トランジスタ293,29
4,295,296がOFFになり、トランジス
タ224,225,226,227がONされる
ことにより、タイミング信号T1,T2,T3,
T4がトランジスタ257,259,261,2
63のゲートに印加される。
In FIG. 5A, the switching circuit 306 receives the switching signal.
Since it is LOW level, transistors 293 and 29
4,295,296 are turned OFF and transistors 224, 225, 226, 227 are turned ON, thereby timing signals T1, T2, T3,
T4 is transistor 257, 259, 261, 2
63 gates.

トランジスタ256,258,260,262
はプルアツプ抵抗と等価な働きをするものであ
り、トランジスタ257,259,261,26
3はインバータとして動作し、タイミング信号T
1,T2,T3,T4の反転信号が端子280,
281,282,283に出力される。
Transistors 256, 258, 260, 262
has the same function as a pull-up resistor, and the transistors 257, 259, 261, 26
3 operates as an inverter, and the timing signal T
The inverted signals of 1, T2, T3, and T4 are connected to terminals 280,
281, 282, and 283.

同様にして第5図ロにおいて切換回路306は
切換信号216がLOWレベルなのでトランジス
タ297,298,299,300がOFFにさ
れ、トランジスタ228,229,230,23
1がONされている。
Similarly, in the switching circuit 306 in FIG.
1 is turned on.

始めにマスター側からデータを出力する命令を
実行中には切換信号219はLOWレベルなので
トランジスタ252,253,254,255が
OFFされ、トランジスタ248,249,25
0,251がONされることにより、データバス
信号B1,B2,B4,B8が、トランジスタ2
65,267,269,271のゲートに印加さ
れる。トランジスタ264,266,268,2
70はプルアツプ抵抗と等価な働きをするもので
あり、トランジスタ265,267,269,2
71はインバータとして動作し、データバス信号
B1,B2,B4,B8の反転信号が端子28
4,285,286,287に出力される。
First, while the command to output data from the master side is being executed, the switching signal 219 is at LOW level, so the transistors 252, 253, 254, and 255 are turned off.
OFF, transistors 248, 249, 25
0 and 251 are turned on, data bus signals B1, B2, B4, and B8 are transferred to transistor 2.
It is applied to the gates of 65, 267, 269, and 271. Transistor 264, 266, 268, 2
70 functions equivalent to a pull-up resistor, and transistors 265, 267, 269, 2
71 operates as an inverter, and the inverted signals of the data bus signals B1, B2, B4, and B8 are sent to the terminal 28.
4,285,286,287.

次にマスター側にデータを入力する命令を実行
中には切換信号219はHIGHレベルなのでトラ
ンジスタ248,249,250,251が
OFFにされ、トランジスタ252,253,2
54,255がONされることにより、LOWレ
ベルがトランジスタ265,267,269,2
71のゲートに印加される。
Next, while executing the command to input data to the master side, the switching signal 219 is at HIGH level, so the transistors 248, 249, 250, and 251 are activated.
turned off, transistors 252, 253, 2
54, 255 are turned on, the LOW level becomes the transistors 265, 267, 269, 2.
71 gate.

トランジスタ264,266,268,270
はプルアツプ抵抗と等価な働きをするものであ
り、トランジスタ265,267,269,27
1はOFF状態なので、端子284,285,2
86,287は高抵抗でプルアツプされ、入力可
能な状態に設定される。
Transistors 264, 266, 268, 270
has the same function as a pull-up resistor, and the transistors 265, 267, 269, 27
1 is in the OFF state, so terminals 284, 285, 2
Pins 86 and 287 are pulled up with high resistance and set to an input-enabled state.

そこで端子284,285,286,287の
信号は切換信号219がHIGHレベルなのでトラ
ンジスタ240,241,242,243がON
されることにより、データバスB1,B2,B
4,B8に伝達される。
Therefore, since the switching signal 219 of the terminals 284, 285, 286, and 287 is at HIGH level, the transistors 240, 241, 242, and 243 are turned on.
data buses B1, B2, B
4, transmitted to B8.

同様にして第5図ハにおいて切換回路306は
切換信号216がLOWレベルなのでトランジス
タ301,302,303,304がOFFにさ
れ、トランジスタ232,233,234,23
5がONされることにより、コントロール信号C
1,C2,C4,C8がトランジスタ273,2
75,277,279のゲートに印加される。
Similarly, in the switching circuit 306 in FIG.
5 is turned ON, the control signal C
1, C2, C4, C8 are transistors 273, 2
It is applied to the gates of 75, 277, and 279.

トランジスタ272,274,276,278
はプルアツプ抵抗と等価な働きをするものであ
り、トランジスタ273,275,277,27
9はインバータとして動作し、タイミング信号C
1,C2,C4,C8の反転信号が端子288,
289,290,291に出力される。
Transistors 272, 274, 276, 278
has the same function as a pull-up resistor, and the transistors 273, 275, 277, 27
9 operates as an inverter and receives timing signal C
The inverted signals of 1, C2, C4, and C8 are connected to terminals 288,
289, 290, and 291.

従つて、タイミング信号線31のタイミング信
号T1〜T4と、データバス30のデータB1〜
B8と、コントロール信号線32のコントロール
信号C1〜C8が入出力ドライバ256〜279
を駆動して入出力端子280〜291に出力す
る。
Therefore, the timing signals T1 to T4 on the timing signal line 31 and the data B1 to T4 on the data bus 30
B8 and the control signals C1 to C8 of the control signal line 32 are input/output drivers 256 to 279.
is driven and output to input/output terminals 280-291.

マスター側と、スレーブ側の接続は入出力端子
280〜291とマスター側との接続端子401
〜412で接続される。
The connection between the master side and the slave side is through the input/output terminals 280 to 291 and the connection terminal 401 between the master side and the master side.
~412.

次に、スレーブ側第6図の動作を述べる。マス
ター側との接続端子409〜412,401〜4
04より入力されたコントロール信号と、タイミ
ング信号T1〜T4はI/Oコントロールデコー
ダ・エンコーダ415によつてコントロール信号
RD1,WT1,RD2,WT2がつくられる。
Next, the operation of the slave side shown in FIG. 6 will be described. Connection terminals with master side 409-412, 401-4
The control signal input from 04 and the timing signals T1 to T4 are converted into control signals by the I/O control decoder/encoder 415.
RD1, WT1, RD2, and WT2 are created.

入出力命令実行ポートアドレスは接続端子40
1にタイミング信号が入つた時にデータバス53
からポートアドレスラツチ414にラツチされ
る。このラツチ出力はポートアドレスデコーダ4
13によつてデコードされ、ポートアドレス信号
線453にポートアドレスを出力する。ポートア
ドレスデコーダ413でデコードするアドレス
は、少なくともマスター側とスレーブ側を接続す
るためにマスター側が使用できなくなつたI/O
ポートアドレスを含んでいる。このことにより、
拡張のためにマスター側が失つたI/Oポートを
復元可能にする。このため、マスター側単独使用
時のプログラムがそのまま拡張時に用いることが
でき、マイコンのシリーズ化の展開時にサポート
ツールのI/O実現の簡易化を図ることができ
る。
The input/output command execution port address is the connection terminal 40
When the timing signal is input to the data bus 53
The address is latched into the port address latch 414 from then on. This latch output is the port address decoder 4.
13 and outputs the port address to the port address signal line 453. The address decoded by the port address decoder 413 is at least an I/O address that the master side can no longer use to connect the master side and slave side.
Contains the port address. Due to this,
To enable restoration of an I/O port lost by a master side due to expansion. Therefore, the program when used alone on the master side can be used as is for expansion, and it is possible to simplify the I/O implementation of the support tool when developing a series of microcomputers.

すなわち、ポートアドレス信号453は4ビツ
ト単位の各ポートアドレスをデコードして得られ
る信号であり、ポートアドレスデコーダ413か
ら出力される。その出力信号線は、16本で構成さ
れている。すなわちポートアドレス信号線453
はポートアドレス0に対応するポートアドレス信
号を453―0、ポートアドレス1に対応するポ
ートアドレス信号を453―1とし、以下同様に
してポートアドレス15に対応するポートアドレ
ス信号を453―15とする。そのうちのポート
アドレス信号453―9がゲート423,42
4,425,426及びトランジスタ448,4
49,450,451のゲートに印加される。
That is, the port address signal 453 is a signal obtained by decoding each port address in units of 4 bits, and is output from the port address decoder 413. Its output signal lines consist of 16 lines. In other words, the port address signal line 453
The port address signal corresponding to port address 0 is set to 453-0, the port address signal corresponding to port address 1 is set to 453-1, and the port address signal corresponding to port address 15 is set to 453-15 in the same manner. Of these, port address signal 453-9 is sent to gates 423 and 42.
4,425,426 and transistors 448,4
49, 450, and 451 gates.

端子401,402,403,404には、そ
れぞれが重複しない4相クロツクパルスが印加さ
れる。これらのパルスは命令実行マシンサイクル
と同一繰り返し周期で、かつ、命令実行サイクル
と完全に同期している。
Terminals 401, 402, 403, and 404 are each applied with four-phase clock pulses that do not overlap. These pulses have the same repetition period as the instruction execution machine cycle and are completely synchronized with the instruction execution cycle.

出力命令を実行時には、初めに出力するポート
アドレスを指定し、次に、出力データを指定す
る。ポートアドレスの指定は、端子401にタイ
ミング信号が印加されている時に行い、出力デー
タの指定は端子404にタイミング信号が印加さ
れている時にデータバス信号を端子405,40
6,407,408を経由して行う。
When executing an output command, first specify the port address for output, and then specify the output data. The port address is specified when the timing signal is applied to the terminal 401, and the output data is specified when the data bus signal is sent to the terminals 405 and 40 when the timing signal is applied to the terminal 404.
6,407,408.

また、出力命令を実行中である旨は、端子40
9,410,411,412を経由して、I/O
コントロールデコーダエンコーダ415に出力す
ることにより、各ポートへの書き込み指令がスレ
ーブ側に伝えられる。
Also, the fact that the output command is being executed is indicated by the terminal 40.
I/O via 9,410,411,412
By outputting to the control decoder encoder 415, a write command to each port is transmitted to the slave side.

ここでポートアドレス指定の動作をさらに細か
く説明すると、端子401にタイミング信号が印
加された時、データバス53のデータをポートア
ドレスラツチ414にラツチする。この時、デー
タバスには出力ポートアドレスがエンコードされ
てのせられており、ポートアドレスラツチ414
の出力を、ポートアドレスデコーダ413に入力
することにより、指定された出力ポートアドレス
に対応するデコーダ出力信号413―9がHIGH
レベルになる。この状態で、第6図ロに示すゲー
ト423,424,425,426,427は
AND条件の一方を満たしており、書き込みのた
めのトリガパルス待ちになり、1マシンサイクル
間、この状態を保持する。
To explain the operation of port addressing in more detail, when a timing signal is applied to terminal 401, data on data bus 53 is latched into port address latch 414. At this time, the output port address is encoded and placed on the data bus, and the port address latch 414
By inputting the output of 1 to the port address decoder 413, the decoder output signal 413-9 corresponding to the specified output port address becomes HIGH.
become the level. In this state, the gates 423, 424, 425, 426, 427 shown in FIG.
One of the AND conditions is satisfied, the program waits for a trigger pulse for writing, and this state is maintained for one machine cycle.

次に、ポート出力データ指定動作を詳細に説明
する。前記アドレス指定と同じマシンサイクル内
に端子409,410,411,412にコント
ロール信号がのせられ、ポートへの書き込み指令
がI/Oコントロールデコーダエンコーダ415
によつて解読される。
Next, the port output data designation operation will be explained in detail. A control signal is placed on the terminals 409, 410, 411, and 412 within the same machine cycle as the address specification, and a write command to the port is sent to the I/O control decoder encoder 415.
deciphered by.

この結果、第6図イにおけるI/Oコントロー
ルデコーダエンコーダ415の上側半分のデコー
ド平面で出力命令がデコードされ、左から2番目
もしくは、左から4番目のデコード出力線が選択
される準備が整い、端子404のタイミング信号
が印加された時、デコード出力が能動となり、エ
ンコード出力WT1信号をHIGHレベルにする。
As a result, the output command is decoded on the upper half decoding plane of the I/O control decoder encoder 415 in FIG. When the timing signal of the terminal 404 is applied, the decode output becomes active and the encode output WT1 signal becomes HIGH level.

この時、端子405,406,407,408
を経由して出力データがデータバス53に入力さ
れており、WT1信号と、デコーダ出力413―
9信号が共にHIGHレベルのためゲート423,,
424,425,426が開き、出力ポートラツ
チ428,429,430,431に出力データ
が取り込まれる。
At this time, terminals 405, 406, 407, 408
The output data is input to the data bus 53 via the WT1 signal and the decoder output 413-
Since both 9 signals are at HIGH level, the gate 423,,
424, 425, and 426 are opened, and output data is taken into output port latches 428, 429, 430, and 431.

さらに、出力ポートラツチ出力は、トランジス
タ438,439,440,441を駆動し、端
子418,419,420,421に出力され
る。
Furthermore, the output port latch output drives transistors 438, 439, 440, and 441 and is output to terminals 418, 419, 420, and 421.

同様にして入力命令を実行するとまず端子40
1にタイミング信号が印加されている期間はポー
トアドレスをエンコードした信号がデータバス5
3に乗せられており、ポートアドレスラツチ41
4にアドレス情報をラツチするとともにポートア
ドレスデコーダ413の出力を一本だけHIGHレ
ベルにする。
Similarly, when you execute an input command, first the terminal 40
During the period when the timing signal is applied to 1, the signal encoding the port address is sent to data bus 5.
3, and the port address latch 41
At the same time, only one output of the port address decoder 413 is set to HIGH level.

次に端子403にタイミング信号が印加されて
いる期間はポート入力を指示するコードをエンコ
ードしたコントロール信号が端子409〜412
に乗せられ、I/Oコントロールデコーダ・エン
コーダ415の出力のRD1信号をHIGHレベル
にする。
Next, during the period when the timing signal is applied to the terminal 403, a control signal encoded with a code instructing port input is sent to the terminals 409 to 411.
The RD1 signal output from the I/O control decoder/encoder 415 is set to HIGH level.

この結果トランジスタ443,444,44
5,446がONし、端子418,419,42
0,421上のポート入力データがトランジスタ
443,444,445,446を経由してデー
タバス416に入力される。
As a result, transistors 443, 444, 44
5,446 turns on, terminals 418, 419, 42
Port input data on ports 0 and 421 are input to data bus 416 via transistors 443, 444, 445, and 446.

出力命令実行時にはデータバス53からI/O
ポートDフリツプフロツプ428〜432に出力
したいデータをラツチする。このラツチ出力で出
力ドライバ433〜442を駆動し、スレーブ側
I/Oポート端子418〜421,422……に
出力する。
I/O from data bus 53 when executing an output command
Data to be output to port D flip-flops 428-432 is latched. This latch output drives the output drivers 433 to 442 and outputs them to slave side I/O port terminals 418 to 421, 422, . . . .

入力命令実行時にはス挿レーブ側I/Oポート
端子418〜421,422……からデータを入
力し、トランジスタ443〜452がONになる
時にデータバス53に読み込む。
When an input command is executed, data is input from the slave-side I/O port terminals 418 to 421, 422, .

上記実施例においては、I/Oポート端子を用
いてI/O拡張用チツプの制御信号も入出力させ
る。このためI/Oポート信号と、拡張制御信号
を選択切換えて入出力させるための切換回路と、
拡張切換端子をマスタ側に設けている。すなわ
ち、拡張切換端子を1ピン増やすことによつて
I/Oポート数をそれ以上にたくさん増やすこと
ができるものである。
In the above embodiment, the I/O port terminals are also used to input and output control signals for the I/O expansion chip. For this purpose, a switching circuit for selectively switching input/output of the I/O port signal and the expansion control signal,
An expansion switching terminal is provided on the master side. That is, by increasing the number of expansion switching terminals by one pin, the number of I/O ports can be further increased.

さらに、I/Oポートを拡張しない時には拡張
制御信号端子をマスター側に専用端子として未使
用状態のまま放置しなくても良く、効率的に端子
が活用できる。
Furthermore, when the I/O port is not expanded, the expansion control signal terminal does not have to be left unused as a dedicated terminal on the master side, and the terminal can be used efficiently.

上記実施例より明らかなように本発明によれば
マスター側だけで使用する最少システムを構成し
た時、拡張制御信号入出力端子を減らすことがで
きる。またI/O拡張時にもスレーブ側を汎用チ
ツプとして用意しておけば、すべてのマスター側
チツプに対してのI/O拡張が行なえる。
As is clear from the above embodiments, according to the present invention, when a minimum system is configured to be used only on the master side, the number of expansion control signal input/output terminals can be reduced. Further, even when I/O is expanded, if the slave side is prepared as a general-purpose chip, I/O expansion can be performed for all master side chips.

さらに、マスター側単独使用時のプログラムが
そのまま拡張時に用いることができ、マイコンの
シリーズ化の展開時にサポートツールのI/O実
現の簡易化を図ることができる。
Furthermore, the program when used alone on the master side can be used as is for expansion, and it is possible to simplify I/O implementation of support tools when developing a series of microcomputers.

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

第1図,第2図は本発明の一実施例によるマイ
クロコンピユータのブロツク図、第3図および第
4図はそれぞれ要部の詳細な構成を示す図、第5
図イ〜ハおよび第6図イ,ロは要部のさらに詳細
な構成を示す結線図である。 1……マスター側、18……スレーブ側、3〜
5,9〜17……入出力ポート、6〜8……複合
入出力ポート、6a〜8a……結合入出力ポー
ト、23〜25……マルチプレクサ、2……拡張
切換端子、306……切換回路、453……ポー
トアドレスデコーダ。
1 and 2 are block diagrams of a microcomputer according to an embodiment of the present invention, FIGS. 3 and 4 are diagrams showing detailed configurations of main parts, respectively, and FIG.
Figures I to C and Figures 6A and 6B are wiring diagrams showing more detailed configurations of essential parts. 1...Master side, 18...Slave side, 3~
5, 9-17...Input/output port, 6-8...Combined input/output port, 6a-8a...Combined input/output port, 23-25...Multiplexer, 2...Extension switching terminal, 306...Switching circuit , 453...Port address decoder.

Claims (1)

【特許請求の範囲】[Claims] 1 入出力ポート信号を入出力する専用の入出力
ポート、入出力ポート信号とタイミング信号との
いずれかの信号を入出力する第1の複合入出力ポ
ート、入出力ポート信号とデータ信号とのいずれ
かの信号を入出力する第2の複合入出力ポート、
入出力ポート信号とコントロール信号とのいずれ
かの信号を入出力する第3の複合入出力ポート、
前記第1,第2,第3の複合入出力ポートにそれ
ぞれ前記入出力ポート信号もしくは前記タイミン
グ信号,データ信号,コントロール信号のいずれ
か一方を選択して入出力するための切換回路、お
よびこの切換回路の選択制御を行なう拡張切換端
子をもつマスター側と、前記マスター側の第1,
第2,第3の複合入出力ポートにそれぞれ結合す
る第1,第2,第3の結合入出力ポート、前記第
1の複合入出力ポートより入力したタイミング信
号と、前記第2の複合入出力ポートより入力した
データ信号に含まれる前記マスター側の第1,第
2,第3の複合入出力ポートにそれぞれ割当てら
れている入出力ポートアドレスを含む拡張された
入出力ポートアドレス信号とによつて入出力ポー
トアドレスをデコードして該入出力ポートを能動
レベルにするアドレスデコーダ、前記第1の複合
入出力ポートより入力したタイミング信号と、前
記第3の複合入出力ポートより入力したコントロ
ール信号とから書込み読出し用コントロール信号
を発生する入出力コントロールデコーダ・エンコ
ーダ、および前記アドレスデコーダが能動レベル
を出力するとき動作する前記マスター側の第1,
第2,第3の複合入出力ポートに代わる3つの入
出力ポートを含む拡張された入出力ポートをもつ
スレーブ側とから構成され、前記マスター側単独
あるいは前記マスター側とスレーブ側を接続して
使用可能なことを特徴とするマイクロコンピユー
タ。
1. A dedicated input/output port that inputs and outputs input/output port signals, a first composite input/output port that inputs and outputs either the input/output port signal or the timing signal, or either the input/output port signal or the data signal. a second composite input/output port that inputs and outputs the signal;
a third composite input/output port that inputs and outputs either an input/output port signal or a control signal;
A switching circuit for selectively inputting and outputting either the input/output port signal or the timing signal, data signal, or control signal to the first, second, and third composite input/output ports, and this switching circuit. a master side having an expansion switching terminal for controlling circuit selection;
first, second, and third combined input/output ports coupled to the second and third combined input/output ports, a timing signal input from the first combined input/output port, and the second combined input/output port; by an expanded input/output port address signal including input/output port addresses respectively assigned to the first, second, and third composite input/output ports on the master side included in the data signal input from the port. an address decoder that decodes an input/output port address and sets the input/output port to an active level; a timing signal input from the first composite input/output port; and a control signal input from the third composite input/output port; an input/output control decoder/encoder that generates a write/read control signal; and a first one on the master side that operates when the address decoder outputs an active level.
It consists of a slave side with expanded input/output ports including three input/output ports in place of the second and third composite input/output ports, and can be used alone on the master side or by connecting the master side and slave side. A microcomputer that is characterized by the following:
JP11042378A 1978-09-07 1978-09-07 Microcomputer Granted JPS5537649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11042378A JPS5537649A (en) 1978-09-07 1978-09-07 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11042378A JPS5537649A (en) 1978-09-07 1978-09-07 Microcomputer

Publications (2)

Publication Number Publication Date
JPS5537649A JPS5537649A (en) 1980-03-15
JPS6311706B2 true JPS6311706B2 (en) 1988-03-15

Family

ID=14535374

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11042378A Granted JPS5537649A (en) 1978-09-07 1978-09-07 Microcomputer

Country Status (1)

Country Link
JP (1) JPS5537649A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60225961A (en) * 1984-04-25 1985-11-11 Ascii Corp Interruption controller of cpu
JPH0792792B2 (en) * 1985-08-23 1995-10-09 株式会社日立製作所 Data processing device
CA1268570A (en) * 1987-08-14 1990-05-01 Melvin J. Roberts Telephone tone detector

Also Published As

Publication number Publication date
JPS5537649A (en) 1980-03-15

Similar Documents

Publication Publication Date Title
US4870562A (en) Microcomputer capable of accessing internal memory at a desired variable access time
CA1193026A (en) Variable cycle-time microcomputer
JPS6116088B2 (en)
US4250547A (en) Information processing apparatus capable of effecting parallel processings by using a divided common bus
CN112099856A (en) Embedded system and system startup method
JPS6311706B2 (en)
US5588124A (en) Microcomputer
US5546566A (en) Emulation system for microcomputer
JPH0756749B2 (en) Function selection circuit
JPS638493B2 (en)
US7058842B2 (en) Microcontroller with multiple function blocks and clock signal control
JPS58166419A (en) One-chip microcomputer
JP3074978B2 (en) Emulation device
JPH06103106A (en) Program debug device
JPH01239485A (en) Large-scale integrated circuit
JPH04125477A (en) Semiconductor integrated circuit device
JP2792491B2 (en) Emulation device
JPS5999551A (en) Address generation circuit
JPH02311942A (en) Cpu external access bus system
JPH0143328B2 (en)
JPS61211741A (en) Microcomputer
JPH0533413B2 (en)
JPS62251829A (en) Symbolic processing system and method
JPS6131897B2 (en)
JPS6214245A (en) One-chip microcomputer