JPH06223036A - Serial communication device - Google Patents

Serial communication device

Info

Publication number
JPH06223036A
JPH06223036A JP1170093A JP1170093A JPH06223036A JP H06223036 A JPH06223036 A JP H06223036A JP 1170093 A JP1170093 A JP 1170093A JP 1170093 A JP1170093 A JP 1170093A JP H06223036 A JPH06223036 A JP H06223036A
Authority
JP
Japan
Prior art keywords
serial
register
output
input
registers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1170093A
Other languages
Japanese (ja)
Inventor
Masaki Sato
正毅 佐藤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP1170093A priority Critical patent/JPH06223036A/en
Publication of JPH06223036A publication Critical patent/JPH06223036A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To securely input data and save output-side registers even if processing by a CPU is complex by sharing one register for serial output even for multiple serial inputs and output and providing registers for serial input corresponding to serial input/output parts one to one. CONSTITUTION:The serial communication device is provided with one register (P-S register) 12 for serial output which is used in common by the serial input/ output parts (unit) 16 and 17 and the registers (S-P register) 13 and 14 corresponding to the input/output parts one to one. Namely, one output buffer (P-S register) 12 is provided and the input buffers (S-P register) 13 and 14 as many as the opposite units are provided. Further, the CPU 11 writes data directly in the P-S register 12 through a data bus and data are written from the S-P registers 13 and 14. Further, a timing and switching control part 15 generates clock timing signals for the loading and shifting of the registers 12-14 and functions to switch shift clocks by the opposite-side units.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、メインCPUが複数の
相手先に対してシリアル通信を行なう装置に関し、特に
レジスタの節約に好適なシリアル通信装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus in which a main CPU performs serial communication with a plurality of destinations, and more particularly to a serial communication apparatus suitable for saving registers.

【0002】[0002]

【従来の技術】従来、シリアルインタフェースは、パラ
レルインタフェースに比べて信号線が少なくて済むた
め、高速度を要求されない場合のインタフェースとして
用いられている。また、メインのCPUが複数の相手先
に対してシリアルインタフェースを行なう場合、本来は
その相手先の数だけ出力バッファ(パラレル/シリアル
レジスタ)と入力バッファ(シリアル/パラレルレジス
タ)が必要である。そこで、これらのレジスタを節約す
るために、パラレル/シリアルレジスタとシリアル/パ
ラレルレジスタを共通化し、相手先別に切り換えてイン
タフェースを行なう方法が用いられている。なお、この
種の装置に関するものとしては、例えば、特開昭62−
286148号がある。
2. Description of the Related Art Conventionally, a serial interface requires less signal lines than a parallel interface, and is used as an interface when high speed is not required. Further, when the main CPU performs a serial interface with respect to a plurality of destinations, the output buffers (parallel / serial registers) and the input buffers (serial / parallel registers) are originally required for the number of destinations. Therefore, in order to save these registers, a method is used in which the parallel / serial register and the serial / parallel register are made common and the interface is switched by switching to the other party. A device related to this type is disclosed in, for example, Japanese Patent Laid-Open No. 62-
There is 286148.

【0003】[0003]

【発明が解決しようとする課題】上記従来技術では、パ
ラレル/シリアルレジスタとシリアル/パラレルレジス
タを共通化した場合、ある相手先に対して出力を行なっ
た後、別の相手先に対して出力するときは、前のデータ
出力のシフト時間を待たなければならない。また、デー
タ入力に関しても同様であり、シリアル/パラレルレジ
スタに保持したデータをCPUが取り込む前に別の相手
からのデータ入力があるとデータが失われてしまう。す
なわち、CPUの処理が複雑になり、相手先によってシ
リアル通信をメイン処理で行なったり、割込みで行なう
ようになると、CPUが一つのレジスタから相手先別の
データを時間と順序管理をして正しく取り込むことが困
難になる。但し、データ出力の方はシフト時間を保証す
るだけなので比較的容易に実現できる。本発明の目的
は、このような問題点を改善し、CPUの処理が複雑で
あってもデータ入力が確実に行なえ、かつ出力側のレジ
スタを節約できるシリアル通信装置を提供することにあ
る。また、CPUの処理方法に応じ、相手先を幾つかま
とめて入力を制御できる場合には、グループ化したシリ
アル入出力部ごとに一つのシリアル/パラレルレジスタ
を使用することにより、入力側のレジスタを節約するこ
とを目的とする。
In the above prior art, when the parallel / serial register and the serial / parallel register are used in common, the data is output to one destination and then to another destination. In this case, it is necessary to wait for the shift time of the previous data output. The same applies to data input, and if there is data input from another party before the CPU stores the data held in the serial / parallel register, the data will be lost. In other words, if the processing of the CPU becomes complicated and the other party performs serial communication in the main processing or by the interruption, the CPU correctly takes in the data for each other party from one register by managing the time and order correctly. Becomes difficult. However, the data output can be realized relatively easily because it only guarantees the shift time. An object of the present invention is to provide a serial communication device that solves such a problem, can reliably input data even if the processing of the CPU is complicated, and can save registers on the output side. In addition, depending on the processing method of the CPU, if the input can be controlled collectively for several destinations, one serial / parallel register is used for each grouped serial input / output unit, so that the register on the input side can be controlled. Aim to save.

【0004】[0004]

【課題を解決するための手段】上記目的を達成するた
め、本発明のシリアル通信装置は、複数のシリアル入出
力部(図1のユニット16,17)で共通に使用する1
個のシリアル出力用レジスタ(P→Sレジスタ12)
と、その入出力部と1対1に対応するシリアル入力用レ
ジスタ(S→Pレジスタ13,14)とを備えたことに
特徴がある。また、複数のシリアル入出力部(図3のユ
ニット18〜21)で共通に使用する1個のシリアル出
力用レジスタ(P→Sレジスタ12)と、CPUの処理
に応じて複数のグループに分けられたシリアル入出力部
とそのグループごとに対応するシリアル入力用レジスタ
(S→Pレジスタ33,34)とを備えたことに特徴が
ある。
To achieve the above object, the serial communication device of the present invention is commonly used by a plurality of serial input / output units (units 16 and 17 in FIG. 1).
Number of serial output registers (P → S register 12)
And a serial input register (S → P registers 13 and 14) corresponding to the input / output unit and one-to-one. Further, one serial output register (P → S register 12) commonly used by a plurality of serial input / output units (units 18 to 21 in FIG. 3) and a plurality of groups are divided according to the processing of the CPU. The serial input / output unit and the serial input registers (S → P registers 33 and 34) corresponding to each group are provided.

【0005】[0005]

【作用】本発明においては、複数のシリアル入出力部で
1個のシリアル出力用レジスタを共用する。また、シリ
アル入力用レジスタはシリアル入出力部と1対1に設け
る。そして、タイミング&切換制御部により、各レジス
タのロードおよびシフトのクロックタイミングを発生さ
せ、相手先別にシフトクロックを切り換える。これによ
り、出力側のレジスタ数を削減するとともに、データ入
力を確実に行なうことができる。さらに、CPUの処理
に応じてシリアル入出力部をグループ化し、一つのグル
ープに対して一つのシリアル入力用レジスタを配置する
ことにより、入力側でもレジスタ数を削減することがで
きる。
In the present invention, one serial output register is shared by a plurality of serial input / output units. The serial input register is provided in a one-to-one correspondence with the serial input / output unit. Then, the timing & switching control unit generates clock timings for loading and shifting each register, and switches the shift clock for each destination. As a result, the number of registers on the output side can be reduced and data input can be reliably performed. Further, by grouping the serial input / output units according to the processing of the CPU and arranging one serial input register for each group, the number of registers can be reduced on the input side.

【0006】[0006]

【実施例】以下、本発明の一実施例を図面により説明す
る。 (第1の実施例)図1は、本発明の第1の実施例におけ
るシリアル通信装置の構成図である。図1において、1
1は複数の相手先(ユニット(1)〜ユニット(N))
に対して同期式シリアル入出力を行なうCPUである。
また、12はパラレル/シリアル(P→S)レジスタ、
13,14はシリアル/パラレル(S→P)レジスタ
(1),(N)、15は入力する相手先ユニット別にシ
フトクロックを切り換えるタイミング&切換制御部であ
り、これらがインタフェース部を構成する。また、1
6,17は入出力対象のユニット(1),(N)であ
る。また、SOD(Serial Output Data)は出力データ、
SID(Serial Input Data)1,Nは入力データ、SC
K(Serial Clock)1,Nはシフトクロックをそれぞれ示
す。本実施例では、出力バッファ(P→Sレジスタ)は
1個であり、入力バッファ(S→Pレジスタ)は相手先
ユニットの数(N個)だけ持つ。また、CPU11は、
データバスを介して直接P→Sレジスタ12に対してデ
ータを書き込み、S→Pレジスタ13,14からはデー
タを読み込む。また、タイミング&切換制御部15は、
レジスタ12〜14のロードとシフトのクロックタイミ
ングを発生させ、相手先ユニット別にシフトクロックを
切り換える機能を持つ。なお、相手先の識別は、予めア
ドレスを分けて決めておき、P→Sレジスタ12にライ
トした際のアドレスをデコードすることにより行なう。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. (First Embodiment) FIG. 1 is a block diagram of a serial communication apparatus according to the first embodiment of the present invention. In FIG. 1, 1
1 is multiple destinations (unit (1) to unit (N))
Is a CPU that performs synchronous serial input / output with respect to.
12 is a parallel / serial (P → S) register,
Reference numerals 13 and 14 denote serial / parallel (S → P) registers (1) and (N), and 15 denotes a timing & switching control section for switching a shift clock for each input destination unit, which constitute an interface section. Also, 1
Reference numerals 6 and 17 denote input / output target units (1) and (N). Also, SOD (Serial Output Data) is output data,
SID (Serial Input Data) 1, N is input data, SC
K (Serial Clock) 1 and N indicate shift clocks, respectively. In this embodiment, the number of output buffers (P → S registers) is one, and the number of input buffers (S → P registers) is equal to the number of destination units (N). In addition, the CPU 11
Data is directly written to the P → S register 12 via the data bus, and data is read from the S → P registers 13 and 14. Further, the timing & switching control unit 15
It has a function of generating clock timings for loading and shifting the registers 12 to 14 and switching the shift clock for each destination unit. The identification of the other party is performed by dividing the address in advance and decoding the address when the P → S register 12 is written.

【0007】ここで、図2を用いシリアル通信の際の各
信号のタイミングについて述べる。本実施例では、CP
U11がP→Sレジスタ12にライトを行なうと、その
後、タイミングを合わせてシフトクロックを発生する。
一方、SODはシフトクロック(SCK1、SCKN)
に同期して出されるが、これは相手先に関わらず出力さ
れる。また、P→Sレジスタ12にライトするときのア
ドレスによってシフトクロックの出力先が変わり、例え
ば、アドレス「1」にライトした場合はユニット(1)が
選択され、SCK1のみが出力される。また、SID
1、SIDNは、ユニット16,17からシフトクロッ
クに同期して出力される信号であり、S→Pレジスタ1
3,14に格納される。S→Pレジスタ13,14の内
容は、次に同じユニットへデータ出力する前に読み込め
ば、消えることはない。
The timing of each signal in serial communication will be described with reference to FIG. In this embodiment, CP
When U11 writes to the P → S register 12, after that, a shift clock is generated at the same timing.
On the other hand, SOD is a shift clock (SCK1, SCKN)
Is output in synchronization with, but this is output regardless of the other party. Also, the output destination of the shift clock changes depending on the address when writing to the P → S register 12, and for example, when writing to the address “1”, the unit (1) is selected and only SCK1 is output. Also, SID
1, SIDN are signals output from the units 16 and 17 in synchronization with the shift clock, and the S → P register 1
3 and 14 are stored. The contents of the S → P registers 13 and 14 will not be erased if they are read before the data is output to the same unit next time.

【0008】(第2の実施例)図3は、本発明の第2の
実施例におけるシリアル通信装置の構成図である。図3
において、31は、複数のユニット18,19で構成さ
れたグループ1に対応するスイッチ、32は、複数のユ
ニット20,21で構成されたグループNに対応するス
イッチである。また、18,19はそれぞれグループ1
に属するユニット(1a)およびユニット(1b)、2
0,21はグループNに属するユニット(Na)および
ユニット(Nb)である。また、33,34はそれぞれ
グループ1およびグループGに属する各ユニットに対応
するS→Pレジスタ(G1)、(GN)である。また、
SID1aおよびSID1bはグループ1にからの入力
データ、SIDNaおよびSIDNbはグループNから
の入力データ、SCK1aおよびSCK1bはグループ
1に対するシフトクロック、SCKNaおよびSCKN
bはグループに対するシフトクロックをそれぞれ示す。
本実施例では、一つのS→Pレジスタ(S→Pレジスタ
33あるいはS→Pレジスタ34)に対し、グループ分
けされた複数のユニット(グループ1に属するユニット
18,19、あるいはグループNに属するユニット2
0,21)がスイッチ31,32によって選択されて接
続される。これは、CPU11の処理によっては、同じ
割り込みで制御する場合等、S→Pレジスタを分ける必
要はなく、幾つかの相手先ユニットを一つのグループと
し、一つのレジスタでデータ取り込みを行なうことが可
能なためである。
(Second Embodiment) FIG. 3 is a block diagram of a serial communication device according to a second embodiment of the present invention. Figure 3
In the figure, 31 is a switch corresponding to the group 1 including a plurality of units 18 and 19, and 32 is a switch corresponding to a group N including a plurality of units 20 and 21. 18 and 19 are group 1 respectively
(1a) and unit (1b), which belong to
0 and 21 are units (Na) and units (Nb) belonging to the group N. Further, 33 and 34 are S → P registers (G1) and (GN) corresponding to the units belonging to the group 1 and the group G, respectively. Also,
SID1a and SID1b are input data from group 1, SIDNa and SIDNb are input data from group N, SCK1a and SCK1b are shift clocks for group 1, SCKNa and SCKN.
b shows the shift clocks for the respective groups.
In this embodiment, one S → P register (S → P register 33 or S → P register 34) is divided into a plurality of grouped units (units 18 and 19 belonging to group 1 or units belonging to group N). Two
0, 21) are selected and connected by the switches 31, 32. This is because, depending on the processing of the CPU 11, it is not necessary to separate the S → P registers when controlling with the same interrupt, and several destination units can be grouped into one group and data can be fetched with one register. This is because.

【0009】[0009]

【発明の効果】本発明によれば、シリアル出力用レジス
タが1個であるため、レジスタを節約できる。また、シ
リアル入力用レジスタを相手先数だけ持たせることによ
り、他の相手先からの入力によって保持データが消滅す
ることはなく、制御が容易である。さらに、CPUの処
理に応じてシリアル入出力部をグループ化し、シリアル
入力用レジスタをこれに対応させた数だけ持たせること
により、相手先数だけ持つ場合よりもレジスタを節約で
きる。
According to the present invention, since there is only one serial output register, the number of registers can be saved. Further, by providing the serial input registers only for the number of destinations, the held data is not erased by the input from other destinations, and the control is easy. Further, by grouping the serial input / output units according to the processing of the CPU and providing the corresponding number of serial input registers, it is possible to save registers as compared with the case of having only the number of destinations.

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

【図1】本発明の第1の実施例におけるシリアル通信装
置の構成図である。
FIG. 1 is a configuration diagram of a serial communication device according to a first embodiment of the present invention.

【図2】本発明の第1の実施例におけるシリアル通信方
法を示すタイミングチャートである。
FIG. 2 is a timing chart showing a serial communication method according to the first embodiment of the present invention.

【図3】本発明の第2の実施例におけるシリアル通信装
置の構成図である。
FIG. 3 is a configuration diagram of a serial communication device according to a second embodiment of the present invention.

【符号の説明】[Explanation of symbols]

11 CPU 12 パラレル/シリアルレジスタ 13 シリアル/パラレルレジスタ(1) 14 シリアル/パラレルレジスタ(N) 15 タイミング&切換制御部 16 ユニット(1) 17 ユニット(N) 18 ユニット(1a) 19 ユニット(1b) 20 ユニット(Na) 21 ユニット(Nb) 31 スイッチ 32 スイッチ 33 シリアル/パラレルレジスタ(G1) 34 シリアル/パラレルレジスタ(GN) 11 CPU 12 Parallel / Serial Register 13 Serial / Parallel Register (1) 14 Serial / Parallel Register (N) 15 Timing & Switching Control Unit 16 Unit (1) 17 Unit (N) 18 Unit (1a) 19 Unit (1b) 20 Unit (Na) 21 Unit (Nb) 31 Switch 32 Switch 33 Serial / Parallel Register (G1) 34 Serial / Parallel Register (GN)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数のシリアル入出力部に対し、CPU
がシリアル通信を行なう装置において、該入出力部で共
通に使用する1個のシリアル出力用レジスタと、該入出
力部と1対1に対応するシリアル入力用レジスタとを備
えたことを特徴とするシリアル通信装置。
1. A CPU for a plurality of serial input / output units
In a device for performing serial communication is provided with one serial output register commonly used by the input / output unit and a serial input register corresponding to the input / output unit in a one-to-one correspondence. Serial communication device.
【請求項2】 複数のシリアル入出力部に対し、CPU
がシリアル通信を行なう装置において、該入出力部で共
通に使用する1個のシリアル出力用レジスタと、CPU
の処理に応じて複数のグループに分けられた該入出力部
とは該グループごとに対応するシリアル入力用レジスタ
とを備えたことを特徴とするシリアル通信装置。
2. A CPU for a plurality of serial input / output units
In a device for performing serial communication, one serial output register commonly used in the input / output unit and a CPU
The serial communication device, wherein the input / output unit divided into a plurality of groups according to the processing of 1. and a serial input register corresponding to each group.
JP1170093A 1993-01-27 1993-01-27 Serial communication device Pending JPH06223036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1170093A JPH06223036A (en) 1993-01-27 1993-01-27 Serial communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1170093A JPH06223036A (en) 1993-01-27 1993-01-27 Serial communication device

Publications (1)

Publication Number Publication Date
JPH06223036A true JPH06223036A (en) 1994-08-12

Family

ID=11785319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1170093A Pending JPH06223036A (en) 1993-01-27 1993-01-27 Serial communication device

Country Status (1)

Country Link
JP (1) JPH06223036A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007222690A (en) * 2007-06-15 2007-09-06 Fujishoji Co Ltd Game machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007222690A (en) * 2007-06-15 2007-09-06 Fujishoji Co Ltd Game machine

Similar Documents

Publication Publication Date Title
JPH03286332A (en) Digital data processor
US6487617B1 (en) Source-destination re-timed cooperative communication bus
US6831654B2 (en) Data processing system
JP2973941B2 (en) Asynchronous FIFO buffer device
US5887196A (en) System for receiving a control signal from a device for selecting its associated clock signal for controlling the transferring of information via a buffer
JPS62182857A (en) Input and output controller
JPH01273132A (en) Microprocessor
JPS59178667A (en) Memory device
JPH09319863A (en) Setting data changing device in image processing device
JPH03260728A (en) Register data writing system
JPH0267665A (en) Interface circuit
JPH06274405A (en) Memory write control circuit
JP2748404B2 (en) Binary data memory
JPH09179803A (en) Serial data transfer device
JPS6279519A (en) General-use register reading method
JPH0736806A (en) Dma system
JPS6316329A (en) Data sending circuit for arithmetic unit
JPH04152426A (en) Elastic store memory control circuit
JPH01164141A (en) Parallel data shnchronization circuit
JPH0668055A (en) Digital signal processor
JP2000067008A (en) Multiprocessor system
JPS5932813B2 (en) Data transfer method
JPS62131356A (en) Peripheral control circuit of microprocessor system
JPH1040168A (en) Data processing device
JPH06110855A (en) Multi-processor