JPH11149446A - Method and device for transferring serial data - Google Patents

Method and device for transferring serial data

Info

Publication number
JPH11149446A
JPH11149446A JP31530097A JP31530097A JPH11149446A JP H11149446 A JPH11149446 A JP H11149446A JP 31530097 A JP31530097 A JP 31530097A JP 31530097 A JP31530097 A JP 31530097A JP H11149446 A JPH11149446 A JP H11149446A
Authority
JP
Japan
Prior art keywords
control circuit
serial
data transfer
wait
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
Application number
JP31530097A
Other languages
Japanese (ja)
Other versions
JP3231683B2 (en
Inventor
Tomoki Ayabe
友喜 綾部
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.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP31530097A priority Critical patent/JP3231683B2/en
Publication of JPH11149446A publication Critical patent/JPH11149446A/en
Application granted granted Critical
Publication of JP3231683B2 publication Critical patent/JP3231683B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce system costs by reducing the capacitance of a program in data transfer between a microcomputer and an external LSI, shortening a period for development, accelerating processing, effectively utilizing the function of the microcomputer and reducing external hardwares. SOLUTION: This device has a serial control circuit 12 provided on a microcomputer 10A for serially transferring data between the microcomputer 10A and an external LSI 14 and a wait control circuit 13 for performing the wait control of an instruction execution cycle for a CPU 11 consisting of the microcomputer 10A, and the serial control circuit 12 performs the transfer of serial data by executing a data transfer instruction or data input/output instruction. In this case, the serial control circuit 12 reports the end of data transfer to the wait control circuit 13 so that a wait state can be canceled.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、外部とのシリアル
・データ転送手段を有するマイクロコンピュータに係
り、特にデータ転送が終了するまでデータ転送命令また
はデータ入出力命令の実行中にウェイト・サイクルを挿
入することで、データ転送処理を簡略化及び高速化する
シリアル・データ転送方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer having a means for serial data transfer with an external device, and more particularly to a wait cycle inserted during execution of a data transfer instruction or a data input / output instruction until data transfer is completed. The present invention relates to a serial data transfer method and apparatus for simplifying and speeding up data transfer processing.

【0002】[0002]

【従来の技術】従来例について図面を参照しながら詳細
に説明を行う。
2. Description of the Related Art A conventional example will be described in detail with reference to the drawings.

【0003】図8はバス・インタフェースを用いた従来
におけるデータ転送装置の構成を示したブロック図であ
る。
FIG. 8 is a block diagram showing a configuration of a conventional data transfer device using a bus interface.

【0004】図8におけるデータ転送装置は、マイクロ
コンピュータ10aと、外部LSI82と、これらを接
続するためのバス・インタフェースにより概略構成され
る。マイクロコンピュータ10aはその内部にCPU1
1と、バス制御回路80と、ウェイト制御回路13とを
備え、外部制御回路81を含んだバス・インタフェース
を介して外部LSI82と接続される。
[0004] The data transfer device shown in FIG. 8 is schematically constituted by a microcomputer 10a, an external LSI 82, and a bus interface for connecting these. The microcomputer 10a has a CPU 1 inside.
1, a bus control circuit 80, and a wait control circuit 13, and are connected to an external LSI 82 via a bus interface including an external control circuit 81.

【0005】次に、図8に示す従来のバス・インタフェ
ースによるデータ転送(リード時)動作について、図面
を参照しながら詳細に説明する。
Next, a data transfer (at the time of reading) operation by the conventional bus interface shown in FIG. 8 will be described in detail with reference to the drawings.

【0006】図9は従来のデータ転送装置のデータ・リ
ード時におけるタイミング・チャートである。図10は
従来のバス・インタフェースを用いたデータ転送装置に
おけるデータ・リード時のプログラムである。図11は
従来のバス・インタフェースを用いたデータ転送装置に
おけるデータ・リード時の処理手順を示すフローチャー
トである。
FIG. 9 is a timing chart at the time of data reading of a conventional data transfer device. FIG. 10 shows a program at the time of data reading in a conventional data transfer device using a bus interface. FIG. 11 is a flowchart showing a processing procedure at the time of data reading in a conventional data transfer device using a bus interface.

【0007】バス・インタフェースによるデータ転送で
は、ウェイト制御が一般的に広く採用されている。ウェ
イト制御では、データ転送命令またはデータ入出力命令
を実行した時に、対象となる外部LSIのアクセス時間
に応じたウェイト・サイクルを挿入することにより、デ
ータの転送を行っている。これは、マイクロコンピュー
タ内部のアクセスに比べて、外部LSIへのアクセスに
時間がかかるためである。
In data transfer by a bus interface, wait control is generally widely used. In the wait control, when a data transfer instruction or a data input / output instruction is executed, data transfer is performed by inserting a wait cycle corresponding to an access time of a target external LSI. This is because it takes more time to access the external LSI than to access inside the microcomputer.

【0008】マイクロコンピュータ10aが外部LSI
82からデータをリードする場合、プログラムにより、
図10に示すようなリード命令(ステップS100)が
実行されることにより、リード動作が行われる。具体的
には、CPU11がリード命令を実行すると(図11の
ステップS1100、以下同じ)、バス制御回路80か
らバスコントロール信号(アドレス信号やコントロール
信号)が出力され(ステップS1101)、外部制御回
路81や外部LSI82に供給される。
[0008] The microcomputer 10a is an external LSI.
When reading data from 82,
The read operation is performed by executing the read command (step S100) as shown in FIG. Specifically, when the CPU 11 executes the read command (step S1100 in FIG. 11, the same applies hereinafter), a bus control signal (address signal or control signal) is output from the bus control circuit 80 (step S1101), and the external control circuit 81 And the external LSI 82.

【0009】CPU11は前記リード命令を実行する
と、データ・リード開始信号1bをアクティブにして、
リード動作の開始をウェイト制御回路13に通知して、
WAIT信号の監視を開始する。
When the CPU 11 executes the read instruction, it activates a data read start signal 1b,
Notifying the wait control circuit 13 of the start of the read operation,
The monitoring of the WAIT signal is started.

【0010】外部制御回路81は、前記アドレスやコン
トロール信号から外部LSI82をアクセスするために
必要なRD,CS信号を生成し(ステップS110
2)、外部LSI82及びウェイト制御回路13に供給
する。外部LSI82は、RD,CS信号が入力される
と、データの出力を開始し(ステップS1103)、バ
ス制御回路80は、データ・バスからデータのリードを
開始する(ステップS1104)。
The external control circuit 81 generates RD and CS signals required for accessing the external LSI 82 from the address and control signals (step S110).
2), supply to the external LSI 82 and the weight control circuit 13. When the RD and CS signals are input, the external LSI 82 starts outputting data (step S1103), and the bus control circuit 80 starts reading data from the data bus (step S1104).

【0011】外部制御回路81は、データ転送に必要な
時間が経過すると、WAIT信号をアクティブにして、
ウェイト制御回路13に通知する(T30)。これによ
り、WAIT信号がアクティブになるまで監視(ステッ
プS1105)を続けていたウェイト制御回路13は、
WAIT信号がアクティブになったタイミング(図9の
タイミングT90)にて、ウェイト状態を解除し(ステ
ップS1106)、データ・リード終了信号1aをアク
ティブにして、バス制御回路80及びCPU11に通知
する。
When the time required for data transfer has elapsed, the external control circuit 81 activates the WAIT signal,
It notifies the wait control circuit 13 (T30). As a result, the wait control circuit 13, which has continued monitoring (step S1105) until the WAIT signal becomes active,
At the timing when the WAIT signal becomes active (timing T90 in FIG. 9), the wait state is released (step S1106), and the data read end signal 1a is activated to notify the bus control circuit 80 and the CPU 11.

【0012】バス制御回路80は、前記データ・リード
終了信号1aが入力されると、バスコントロール信号
(アドレス信号やコントロール信号)の出力を停止し
て、リード動作を終了する(ステップS1107)。ま
た、CPU11は、データ・リード終了信号1aが入力
されると、実際のリード動作後、リード命令の実行を終
了し(ステップS1108)、データ・リード開始信号
1bをインアクティブにする。
When the data read end signal 1a is input, the bus control circuit 80 stops outputting a bus control signal (address signal or control signal) and ends the read operation (step S1107). When the data read end signal 1a is input, the CPU 11 terminates the execution of the read command after the actual read operation (step S1108), and makes the data read start signal 1b inactive.

【0013】ウェイト制御回路13は、データ・リード
開始信号1bがインアクティブになると、データ・リー
ド終了信号1aをインアクティブにする。そして、CP
U11は、これらウェイト制御の一連の動作が終了する
と、次の命令の実行を開始する(ステップS110
9)。
When the data read start signal 1b becomes inactive, the wait control circuit 13 makes the data read end signal 1a inactive. And CP
When a series of operations of the wait control ends, U11 starts executing the next instruction (step S110).
9).

【0014】次に、他の従来例について図面を参照して
説明を行う。
Next, another conventional example will be described with reference to the drawings.

【0015】図12はシリアル・インタフェースを用い
た従来におけるデータ転送装置の構成を示したブロック
図である。
FIG. 12 is a block diagram showing a configuration of a conventional data transfer device using a serial interface.

【0016】図12におけるデータ転送装置は、マイク
ロコンピュータ10bと、外部LSI14と、これらを
接続するためのシリアル・インタフェースにより概略構
成される。マイクロコンピュータ10bはその内部にC
PU11と、シリアル制御回路120と、割り込み制御
回路121とを備え、シリアル・インタフェースを介し
て外部LSI14と接続される。
The data transfer device shown in FIG. 12 is schematically constituted by a microcomputer 10b, an external LSI 14, and a serial interface for connecting these. The microcomputer 10b has C inside
It includes a PU 11, a serial control circuit 120, and an interrupt control circuit 121, and is connected to the external LSI 14 via a serial interface.

【0017】次に、図12に示す従来のシリアル・イン
タフェースによるデータ転送(リード時)動作につい
て、図面を参照しながら詳細に説明する。
Next, the data transfer (at the time of reading) operation by the conventional serial interface shown in FIG. 12 will be described in detail with reference to the drawings.

【0018】図13は図12で示されるシリアル制御回
路120の構成を示したブロック図である。図14は従
来のシリアル・インタフェースを用いたデータ転送装置
のデータ・リード時におけるタイミング・チャートであ
る。図15は従来のシリアル・インタフェースを用いた
データ転送装置におけるデータ・リード時のプログラム
である。図16は従来のシリアル・インタフェースを用
いたデータ転送装置におけるデータ・リード時の処理手
順を示すフローチャートである。
FIG. 13 is a block diagram showing a configuration of serial control circuit 120 shown in FIG. FIG. 14 is a timing chart of a conventional data transfer device using a serial interface at the time of data reading. FIG. 15 shows a program at the time of data reading in a conventional data transfer device using a serial interface. FIG. 16 is a flowchart showing a processing procedure at the time of data reading in a conventional data transfer device using a serial interface.

【0019】図13に示すようにシリアル制御回路12
0は、シフト・レジスタ20と、制御レジスタ130
と、ラッチ回路22と、クロック制御回路23と、クロ
ック選択回路24と、カウンタ25と、割り込み発生回
路131により構成される。なお、シリアル制御回路1
20の動作やモード等の制御は、制御レジスタ180を
設定すること(コマンドの入力等)により行われるが、
ここでは、リード動作(8ビット)及びCLK信号有効
に設定されているものとして説明を行う。
As shown in FIG.
0 is the shift register 20 and the control register 130
, A latch circuit 22, a clock control circuit 23, a clock selection circuit 24, a counter 25, and an interrupt generation circuit 131. The serial control circuit 1
The control of the operation, mode, etc. of 20 is performed by setting the control register 180 (command input, etc.).
Here, the description will be made assuming that the read operation (8 bits) and the CLK signal are set to be valid.

【0020】シリアル・インタフェースによるデータ転
送では、クロック同期式3線シリアルが一般的に広く採
用されている。
In data transfer by the serial interface, a clock synchronous three-wire serial is generally widely used.

【0021】マイクロコンピュータ10bが外部LSI
14からデータをリードする場合、図15に示すような
リード命令(ステップS150)を実行後、割り込み処
理により実際のリード動作が行われる。具体的には、C
PU11がリード命令を実行すると(ステップS160
0)、シリアル制御回路120からSCK信号が出力さ
れ(ステップS1601)、外部LSI14に供給され
る。外部LSI14はSCK信号が入力されるとデータ
の出力を開始する(ステップS1602)。
The microcomputer 10b is an external LSI
In the case of reading data from 14, the read command (step S150) as shown in FIG. 15 is executed, and then the actual read operation is performed by interrupt processing. Specifically, C
When the PU 11 executes the read instruction (step S160)
0), the SCK signal is output from the serial control circuit 120 (step S1601), and supplied to the external LSI 14. The external LSI 14 starts outputting data when the SCK signal is input (step S1602).

【0022】シリアル制御回路120は、前記SCK信
号に同期して、SI信号からデータのリードを行う(ス
テップS1603)。シリアル制御回路120は、リー
ド動作が終了すると(ステップS1604,ステップS
1605)、INT信号を生成し(ステップS160
6,タイミングT140)、割り込み制御回路121に
通知する。
The serial control circuit 120 reads data from the SI signal in synchronization with the SCK signal (step S1603). When the read operation ends (step S1604, step S1604),
1605), and generate an INT signal (step S160)
6, timing T140), and notifies the interrupt control circuit 121.

【0023】割り込み制御回路121は、前記INT信
号が入力されると、割り込み要求信号12aをアクティ
ブにして、CPU11に割り込み処理を要求する(ステ
ップS1607)。CPU11は割り込みを受け付ける
と(ステップS1608)、割り込み許可状態になるま
で処理を保留し(ステップS1609)、割り込み処理
が可能になると、割り込み前処理を行った後(ステップ
S1610)、ベクタ・テーブルを参照して(ステップ
S1611)、割り込み処理ルーチンへのジャンプ命令
を実行する(ステップS1612)。
When the INT signal is input, the interrupt control circuit 121 activates the interrupt request signal 12a and requests the CPU 11 to perform an interrupt process (step S1607). Upon receiving the interrupt (step S1608), the CPU 11 suspends the processing until the interrupt is enabled (step S1609). When the interrupt processing becomes possible, the CPU 11 performs pre-interrupt processing (step S1610), and refers to the vector table. Then, a jump instruction to the interrupt processing routine is executed (step S1612).

【0024】CPU11は、以上説明した処理を経て、
割り込み処理を開始し(ステップS1613)、実際の
リード動作後(ステップS1614,ステップS15
1)、割り込み後処理を行って(ステップS161
5)、割り込み処理を終了する。CPU11は、これら
割り込み処理の一連の動作が終了すると、次の命令の実
行を開始する(ステップS1616)。
The CPU 11 performs the processing described above,
The interrupt process is started (step S1613), and after the actual read operation (step S1614, step S15)
1) Perform post-interrupt processing (step S161)
5), end the interrupt processing. Upon completion of the series of operations of the interrupt processing, the CPU 11 starts executing the next instruction (step S1616).

【0025】次に、シリアル制御回路120の動作を、
図13を参照しながら詳細に説明する。
Next, the operation of the serial control circuit 120 will be described.
This will be described in detail with reference to FIG.

【0026】クロック選択回路24は、CPU11から
出力されるCLK信号と外部から入力されるSCK信号
の選択を行う。尚、本説明においては、制御レジスタ1
30の設定でCLK信号が選択されていることを前提と
する。
The clock selection circuit 24 selects the CLK signal output from the CPU 11 and the SCK signal input from the outside. In this description, the control register 1
It is assumed that the CLK signal is selected by setting 30.

【0027】CPU11がリード命令(ステップS15
0:シフト・レジスタ20のダミー・リード)を実行す
ると、クロック制御回路23は、クロック選択回路24
で選択されたクロック信号2aをSCK信号として出力
するとともに、リード開始信号2bをアクティブにし
て、カウンタ25に出力する。外部LSI14からのデ
ータはSI信号から入力され、前記クロック制御回路2
3からのクロック信号2cに同期して、シフト・レジス
タ20に格納される。
The CPU 11 issues a read command (step S15).
0: dummy read of the shift register 20), the clock control circuit 23
And outputs the clock signal 2a selected in step (1) as the SCK signal, and activates the read start signal 2b to the counter 25. Data from the external LSI 14 is input from the SI signal, and the clock control circuit 2
3 is stored in the shift register 20 in synchronization with the clock signal 2c from the third register.

【0028】カウンタ25は、前記リード開始信号2b
が入力されると、前記クロック信号2a(SCK信号)
のカウントを開始し、データ転送に要する時間分のウェ
イト数として、例えば8つ目のクロック信号2aが入力
されるとリード終了信号2dをアクティブにして、クロ
ック制御回路23及び割り込み発生回路131へ通知す
る。クロック制御回路23は、前記リード終了信号2d
が入力されると、前記SCK信号の出力を停止する。割
り込み発生回路131は、前記リード終了信号2dが入
力されると、INT信号をアクティブにして前記SI信
号からのデータ入力が終了したことを、CPU11に通
知する。
The counter 25 reads the read start signal 2b
Is input, the clock signal 2a (SCK signal)
When the eighth clock signal 2a, for example, is input as the number of waits for the time required for data transfer, the read end signal 2d is activated and notified to the clock control circuit 23 and the interrupt generation circuit 131. I do. The clock control circuit 23 outputs the read end signal 2d
Is input, the output of the SCK signal is stopped. When the read end signal 2d is input, the interrupt generation circuit 131 activates the INT signal and notifies the CPU 11 that the data input from the SI signal has ended.

【0029】しかしながら、上記従来のデータ転送装置
において、マイクロコンピュータと外部LSIとをバス
・インタフェースで接続した場合には、マイクロコンピ
ュータ、特にメモリや周辺I/O機能を1チップ化した
製品では、信号線のほとんどがマルチプレクスされてい
るため、バス・インタフェース用の信号としてこれらを
使用してしまうと、周辺I/O用の信号が使用できなく
なるという問題があった。また、バス・インタフェース
用の信号は、汎用性を重視して仕様化されているため、
外部LSIを接続する場合は、外部にハードウェアを付
加しなければならないという問題があった。
However, in the above-mentioned conventional data transfer apparatus, when the microcomputer and the external LSI are connected by a bus interface, the microcomputer, especially a product in which the memory and the peripheral I / O functions are integrated into one chip, requires a signal. Since most of the lines are multiplexed, if these are used as signals for the bus interface, there is a problem that signals for peripheral I / O cannot be used. Also, the signals for the bus interface are specified with emphasis on versatility,
When connecting an external LSI, there is a problem that hardware must be added to the outside.

【0030】一方、マイクロコンピュータと外部LSI
とをシリアル・インタフェースで接続した従来のデータ
転送装置の場合には、マイクロコンピュータに内蔵され
ている従来のシリアル・インタフェースは、データ転送
における実際のデータ入出力処理を割り込みで行ってい
るため、プログラム容量の増大、開発効率の低下、処理
時間の増大を招くという問題があった。
On the other hand, a microcomputer and an external LSI
In the case of a conventional data transfer device in which a microcomputer is connected with a serial interface, the conventional serial interface built into the microcomputer performs actual data input / output processing in the data transfer using an interrupt. There has been a problem that the capacity is increased, the development efficiency is reduced, and the processing time is increased.

【0031】[0031]

【発明が解決しようとする課題】以上説明したように、
上記従来の技術において、マイクロコンピュータと外部
LSIとをバス・インタフェースで接続して構成された
データ転送装置の場合、接続に必要な信号線が多く、ま
た、外部に制御回路が必要となり、マイクロコンピュー
タの機能低下、ハードウェア規模の増大を招くという問
題があった。
As described above,
In the above-mentioned conventional technology, in the case of a data transfer device configured by connecting a microcomputer and an external LSI via a bus interface, many signal lines are required for connection and an external control circuit is required. However, there is a problem that the function of the device is deteriorated and the hardware scale is increased.

【0032】一方、マイクロコンピュータと外部LSI
とをシリアル・インタフェースで接続して構成されたデ
ータ転送装置の場合、接続する信号線は少なくなるが、
データ転送のためのプログラムが割り込みなどの復雑な
処理を伴うため、プログラム容量の増大、開発効率の低
下、処理時間の増大を招くという問題(欠点)があっ
た。
On the other hand, a microcomputer and an external LSI
Is connected by a serial interface, the number of connected signal lines is reduced,
Since a program for data transfer involves complicated processing such as interruption, there is a problem (defect) that the program capacity is increased, development efficiency is reduced, and processing time is increased.

【0033】そこで、本発明の目的は、マイクロコンピ
ュータと外部LSI間のデータ転送におけるプログラム
容量の低減と開発期間の短縮およぴ処理の高速化、並び
にマイクロコンピュータ機能の有効活用、外部ハードウ
ェア削減によるシステム・コストの低減を可能としたシ
リアル・データ転送方法及び装置を提供することにあ
る。
Accordingly, an object of the present invention is to reduce the program capacity, shorten the development period and speed up the processing in the data transfer between the microcomputer and the external LSI, to effectively use the microcomputer function, and to reduce the external hardware. It is an object of the present invention to provide a serial data transfer method and apparatus capable of reducing the system cost by the method.

【0034】[0034]

【課題を解決するための手段】上記目的を達成するた
め、本発明は、データ転送開始後にデータ転送命令また
は、データ入出力命令にウェイト・サイクルを挿入し、
データ転送終了後に自動的にウェイトを解除することを
特徴とするものである。具体的には、データ転送命令若
しくはデータ人出力命令の実行により、2本ないしは3
本のシリアル・データ転送用信号によって外部LSIと
シリアル・データ転送を行う。命令の実行開始後、バス
・サイクルはウェイト状態となる。シリアル・データ転
送終了後、ウェイト制御回路はウェイト解除を要求し、
ウェイト状態が解除される。
In order to achieve the above object, according to the present invention, a wait cycle is inserted into a data transfer instruction or a data input / output instruction after the start of data transfer.
The wait is automatically released after the data transfer is completed. Specifically, execution of a data transfer command or a data output command results in two or three commands.
The serial data transfer with the external LSI is performed by the serial data transfer signal. After the execution of the instruction is started, the bus cycle enters a wait state. After the end of serial data transfer, the wait control circuit requests release of wait,
The wait state is released.

【0035】また、本発明は、予め制御レジスタに、デ
ータ転送終了後にウェイト制御回路への通知を行うよう
設定しておき、データ転送命令若しくはデータ入出力命
令の実行により、2本ないしは3本のシリアル・データ
転送用信号によって、外部LSIとシリアル・データ転
送を行う。命令の実行開始後、バス・サイクルはウェイ
ト状態となる。シリアル・データ転送終了後、ウェイト
制御回路はウェイト解除を要求し、ウェイト状憶が解除
される。
Further, according to the present invention, the control register is set in advance so as to notify the wait control circuit after the data transfer is completed, and the execution of the data transfer instruction or the data input / output instruction causes the execution of two or three lines. Serial data transfer with an external LSI is performed by a serial data transfer signal. After the execution of the instruction is started, the bus cycle enters a wait state. After the end of the serial data transfer, the wait control circuit requests the release of the wait, and the wait state is released.

【0036】また、本発明は、予めウェイト・レジスタ
に、データ転送に要する時間分のウェイト数を設定して
おき、データ転送命令若しくはデータ入出力命令の実行
により、2本ないしは3本のシリアルーデータ転送用信
号を介して、外部LSIとシリアル・データ転送を行
う。命令の実行開始後、バス・サイクルはウェイト状態
となる。ウェイト制御回路は、ウェイト・レジスタに設
定したウェイト数だけウェイト・サイクルを挿入してか
ら、ウェイト状態を解除する。
Further, according to the present invention, the number of waits corresponding to the time required for data transfer is set in advance in the wait register, and two or three serial registers are executed by executing a data transfer instruction or a data input / output instruction. Serial data transfer with an external LSI is performed via a data transfer signal. After the execution of the instruction is started, the bus cycle enters a wait state. The wait control circuit inserts wait cycles for the number of waits set in the wait register, and then releases the wait state.

【0037】また、本発明は、予め制御レジスタに、デ
ータ転送終了後にウェイト制御回路への通知を行うよう
に設定しておき、データ転送命令若しくはデータ人出力
命令の実行により、2本ないしは3本のシリアル・デー
タ転送用信号を介して、外部LSIとシリアル・データ
転送を行う。命令の実行開始後、バス・サイクルはウェ
イト状態となる。ウェイト制御回路は、ウェイト・レジ
スタに設定したウェイト数だけウェイト・サイクルを挿
入してから、ウェイト状態を解除する。
Further, according to the present invention, the control register is set in advance so as to notify the wait control circuit after the data transfer is completed. And serial data transfer with an external LSI via the serial data transfer signal. After the execution of the instruction is started, the bus cycle enters a wait state. The wait control circuit inserts wait cycles for the number of waits set in the wait register, and then releases the wait state.

【0038】上記本発明によれば、データ転送開始後に
データ転送命令または、データ入出力命令にウェイト・
サイクルを挿入し、データ転送終了後に自動的にウェイ
トを解除することを可能としたことにより、データ転送
命令または、データ人出力命令の実行のみで外部LSI
とのデータ転送が可能となり、これにより、プログラム
容量の低減と開発期間の短縮およぴ処理の高速化を計る
ことができる。また、シリアル・インタフェースのみで
外部LSIを接続することができるため、従来のよう
に、バス・インタフェースを使用してマイクロコンピュ
ータと外部LSIとを接続することにより、周辺I/O
機能の一部が使用できなくなったり、マイクロコンピュ
ータと外部LSIの間に外部ハードウェアを付加する必
要がなくなり、これにより、マイクロコンピュータ機能
の有効活用が可能となり、外部ハードウェア削減による
システム・コストの低減が可能となる。
According to the present invention, after the data transfer is started, the data transfer instruction or the data input / output instruction is waited for.
By inserting a cycle and automatically releasing the wait after the data transfer is completed, the external LSI can be executed only by executing a data transfer instruction or a data output instruction.
This makes it possible to reduce the program capacity, shorten the development period, and speed up the processing. In addition, since an external LSI can be connected only by a serial interface, connecting a microcomputer to the external LSI using a bus interface as in the prior art allows peripheral I / O to be connected.
There is no need to use some of the functions or to add external hardware between the microcomputer and the external LSI. This makes it possible to make effective use of the microcomputer functions and to reduce the system cost by reducing the external hardware. Reduction is possible.

【0039】[0039]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して詳細に説明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0040】図1は本発明のシリアル・データ転送装置
における第1の実施の形態を示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of the serial data transfer device of the present invention.

【0041】図1に示す本発明のシリアル・データ転送
装置は、マイクロコンピュータ10Aと、CPU11
と、シリアル制御回路12と、ウェイト制御回路13
と、外部LSI14とから構成される。
The serial data transfer device of the present invention shown in FIG.
, A serial control circuit 12 and a weight control circuit 13
And an external LSI 14.

【0042】図2は図1で示されるシリアル制御回路1
2の内部構成を示したブロック図である。
FIG. 2 shows the serial control circuit 1 shown in FIG.
FIG. 2 is a block diagram showing an internal configuration of the second embodiment.

【0043】図2におけるシリアル制御回路12は、シ
リアル・レジスタ20と、制御レジスタ21と、ラッチ
回路22と、クロック制御回路23と、クロック選択回
路24と、カウンタ25と、割り込み発生回路26と、
アクセス制御回路27により構成される。尚、シリアル
制御回路12の動作モードは、制御レジスタ21を設定
することにより行われるが、以下の説明では、リード動
作(8ビット),CLK信号有効,割り込み発生回路2
6無効,アクセス制御回路27有効に設定されているも
のとして説明を行う。
The serial control circuit 12 shown in FIG. 2 comprises a serial register 20, a control register 21, a latch circuit 22, a clock control circuit 23, a clock selection circuit 24, a counter 25, an interrupt generation circuit 26,
The access control circuit 27 is provided. The operation mode of the serial control circuit 12 is set by setting the control register 21. In the following description, the read operation (8 bits), the CLK signal valid, the interrupt generation circuit 2
The description will be made assuming that 6 is set invalid and the access control circuit 27 is set valid.

【0044】以下に、図1に示す本発明の第1の実施の
形態におけるデータ転送(リード時)動作について、図
面を参照しながら詳細に説明する。
Hereinafter, the data transfer (at the time of reading) operation in the first embodiment of the present invention shown in FIG. 1 will be described in detail with reference to the drawings.

【0045】図3は本発明の実施の形態におけるデータ
・リード時のタイミング・チャートである。図4は本発
明の実施の形態におけるシリアル・データ転送装置のデ
ータ・リード時のプログラムである。図5は本発明の実
施の形態におけるシリアル・データ転送装置のデータ・
リード時の処理手順を示すフローチャートである。
FIG. 3 is a timing chart at the time of data reading in the embodiment of the present invention. FIG. 4 is a program at the time of data reading of the serial data transfer device according to the embodiment of the present invention. FIG. 5 is a diagram showing the data transfer of the serial data transfer device according to the embodiment of the present invention.
It is a flowchart which shows the processing procedure at the time of a read.

【0046】マイクロコンピュータ10Aが外部LSI
14からデータをリードする場合、図4に示すようなリ
ード命令(ステップS40)の実行により、リード動作
を行う。具体的には、CPU11がリード命令を実行す
ると(図5のステップS500)、シリアル制御回路1
2からSCK信号が出力され(ステップS501)、外
部LSI14に供給される。CPU11は、リード命令
を実行すると、データ・リード開姶信号1bをアクティ
ブにして、リード動作の開始をウェイト制御回路13に
通知して、SWAIT信号の監視を開始する。外部LS
I14は、SCK信号が入力されると、データの出力を
開始する(ステップS502)。
The microcomputer 10A is an external LSI
When data is read from 14, a read operation is performed by executing a read command (step S40) as shown in FIG. Specifically, when the CPU 11 executes the read command (Step S500 in FIG. 5), the serial control circuit 1
2 outputs an SCK signal (step S501) and supplies it to the external LSI 14. When executing the read command, the CPU 11 activates the data read start signal 1b, notifies the wait control circuit 13 of the start of the read operation, and starts monitoring the SWAIT signal. External LS
Upon receiving the SCK signal, the I14 starts outputting data (step S502).

【0047】シリアル制御回路12は、SCK信号に同
期して、SI信号からデータのリードを行う(ステップ
S503)。シリアル制御回路12は、リード動作が終
了すると(ステップS504,ステップS505)、S
WAIT信号を生成し(ステップS506、タイミング
T30)し、ウェイト制御回路13に通知する。
The serial control circuit 12 reads data from the SI signal in synchronization with the SCK signal (step S503). When the read operation ends (steps S504 and S505), the serial control circuit 12
It generates a WAIT signal (step S506, timing T30) and notifies the wait control circuit 13.

【0048】ウェイト制御回路13は、SWAIT信号
がアクティブになるまで監視を続けており(ステップS
507)、SWAIT信号がアクティブになると(タイ
ミングT30)、ウェイト状態を解除し、データ・リー
ド終了信号1aをアクティブにして、CPU11に通知
する(ステップS508)。CPU11は、前記データ
・リード終了信号1aが入力されると、実際のリード動
作後、リード命令の実行を終了し(ステップS50
9)、データ・リード開始信号1bをインアクティブに
する。
The wait control circuit 13 continues monitoring until the SWAIT signal becomes active (step S).
507), when the SWAIT signal becomes active (timing T30), the wait state is released, the data read end signal 1a is made active, and the CPU 11 is notified (step S508). When the data read end signal 1a is input, the CPU 11 ends the execution of the read command after the actual read operation (step S50).
9) Make the data read start signal 1b inactive.

【0049】ウェイト制御回路13は、データ・リード
開始信号1bがインアクティブになると、データ・リー
ド終了信号1aをインアクティブにする。CPU11
は、これらウェイト制御の一連の動作が終了すると、次
の命令の実行を開始する(ステップS510)。
When the data read start signal 1b becomes inactive, the wait control circuit 13 makes the data read end signal 1a inactive. CPU11
After the series of operations of the wait control is completed, the execution of the next instruction is started (step S510).

【0050】次に、シリアル制御回路12の動作を、図
2を参照しながら詳細に説明する。既述した通り、クロ
ック選択回路24は、CPU11から出力されるCLK
信号と外部から入力されるSCK信号の選択を行うが、
本説明においては、制御レジスタ21の設定でCLK信
号が選択されているとして説明を行う。
Next, the operation of the serial control circuit 12 will be described in detail with reference to FIG. As described above, the clock selection circuit 24 outputs the CLK output from the CPU 11.
Select the signal and the SCK signal input from the outside,
In this description, it is assumed that the CLK signal is selected by the setting of the control register 21.

【0051】CPU11がリード命令を実行すると(ス
テップS40:シフト・レジスタ20のダミー・リー
ド)、クロック制御回路23は、クロック選択回路24
で選択されたクロック信号2aをSCK信号として出力
するとともに、リード開始信号2bをアクティブにし
て、カウンタ25に通知する。外部LSI14からのデ
ータはSI信号により供給され、クロック制御回路23
からのクロック信号2cに同期して、シフト・レジスタ
20に順次に格納される。
When the CPU 11 executes the read command (step S40: dummy read of the shift register 20), the clock control circuit 23
Then, the clock signal 2a selected in step (1) is output as the SCK signal, and the read start signal 2b is activated to notify the counter 25. Data from the external LSI 14 is supplied by an SI signal, and the clock control circuit 23
, And are sequentially stored in the shift register 20 in synchronization with the clock signal 2c.

【0052】カウンタ25は、リード開始信号2bが供
給されると、クロック信号2a(SCK信号)のカウン
トを開始し、例えば、データ転送に要する時間分のカウ
ント数である8つ目のクロック信号2aが入力される
と、リード終了信号2dをアクティブとして、割り込み
発生回路26及びアクセス制御回路27に通知する。ク
ロック制御回路23は、リード終了信号2dが供給され
ると、SCK信号の出力を停止する。
When the read start signal 2b is supplied, the counter 25 starts counting the clock signal 2a (SCK signal), for example, the eighth clock signal 2a which is the count number for the time required for data transfer. Is input, the read end signal 2d is made active and the interrupt generation circuit 26 and the access control circuit 27 are notified. The clock control circuit 23 stops outputting the SCK signal when the read end signal 2d is supplied.

【0053】割り込み発生回路26及びアクセス制御回
路27は、制御レジスタ21より供給されるコントロー
ル信号2e及びコントロール信号2fにより、それぞれ
インアクティブ、アクティブに設定されているため、ア
クセス制御回路27は、リード終了信号2dが供給され
ると、SWAIT信号をアクティブにして、SI信号か
らのデータ入力が終了したことを、CPU11に通知す
る。
Since the interrupt generation circuit 26 and the access control circuit 27 are set to inactive and active, respectively, by the control signal 2e and the control signal 2f supplied from the control register 21, the access control circuit 27 terminates the read. When the signal 2d is supplied, the SWAIT signal is activated to notify the CPU 11 that the data input from the SI signal has been completed.

【0054】次に、本発明の第2の実施の形態について
図面を参照して詳細に説明する。
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.

【0055】図6は本発明のシリアル・データ転送装置
における第2の実施の形態を示すブロック図である。
FIG. 6 is a block diagram showing a second embodiment of the serial data transfer device of the present invention.

【0056】図6に示す本発明のシリアル・データ転送
装置は、マイクロコンピュータ10Bと、CPU11
と、シリアル制御回路12と、ウェイト・レジスタ60
と、ウェイト制御回路13と、外部LSI14により構
成される。
The serial data transfer device of the present invention shown in FIG.
, Serial control circuit 12 and wait register 60
, A weight control circuit 13 and an external LSI 14.

【0057】ウェイト・レジスタ60は、CPU11の
命令実行サイクルにおけるウェイト数を設定するための
レジスタで、説明の都合上、任意の値が改定されている
ことを前提とする。また、シリアル制御回路12は本発
明の第1の実施の形態における説明で使用した図2と同
様の構成とする。
The wait register 60 is a register for setting the number of waits in the instruction execution cycle of the CPU 11, and it is assumed that an arbitrary value is revised for convenience of explanation. The serial control circuit 12 has the same configuration as that of FIG. 2 used in the description of the first embodiment of the present invention.

【0058】さらに、シリアル制御回路12の動作モー
ドは制御レジスタ21を設定することにより行われる
が、以下の説明では、リード動作(8ビット),CLK
信号有効,割り込み発生回路26無効,アクセス制御回
路27無効にそれぞれ設定されているものとして説明を
行う。
Further, the operation mode of the serial control circuit 12 is performed by setting the control register 21, but in the following description, the read operation (8 bits), CLK
The description will be made on the assumption that the signal is valid, the interrupt generation circuit 26 is invalid, and the access control circuit 27 is invalid.

【0059】以下に、図6に示す本発明の第2の実施の
形態におけるデータ転送(リード時)動作について、図
面を参照しながら詳細に説明する。尚、データ・リード
時のタイミング・チャート及びデータ・リード時のプロ
グラムは、本発明の第1の実施の形態における説明で使
用した図3及び図4と同様の構成とし、本発明の実施の
形態におけるシリアル・データ転送装置のデータ・リー
ド時の処理手順を示すフローチャートを図7に示す。
Hereinafter, a data transfer (at the time of reading) operation in the second embodiment of the present invention shown in FIG. 6 will be described in detail with reference to the drawings. The timing chart at the time of data reading and the program at the time of data reading have the same configuration as that shown in FIGS. 3 and 4 used in the description of the first embodiment of the present invention. FIG. 7 is a flowchart showing a processing procedure at the time of data reading of the serial data transfer device in FIG.

【0060】マイクロコンピュータ10Bが外部LSI
14よりデータをリードする場合、CPU11により、
図4に示すようなリード命令(ステップS40)が実行
されることにより、リード動作が行われる。具体的に
は、CPU11がリード命令を実行すると(ステップS
700)、シリアル制御回路12からSCK信号が出力
され(ステップS701)、外部LSI14に供給され
る。CPU11は、リード命令を実行すると、データ・
リード開始信号1bをアクティブにして、リード動作の
開始をウェイト・レジスタ60及びウェイト制御回路1
3に通知する。
The microcomputer 10B is an external LSI
When reading data from 14, the CPU 11
The read operation is performed by executing the read command (step S40) as shown in FIG. Specifically, when the CPU 11 executes the read command (step S
700), the SCK signal is output from the serial control circuit 12 (step S701), and supplied to the external LSI 14. When the CPU 11 executes the read instruction, the data
Activate the read start signal 1b and start the read operation by the wait register 60 and the wait control circuit 1
Notify 3.

【0061】ウェイト・レジスタ60は、データ・リー
ド開始信号1bが供給されることにより、ウェイト数の
監視を開始し(ステップS702)、ウェイト制御回路
13は、前記データ・リード開始信号1bが供給される
と、SWAIT信号の監視を開始する(ステップS70
8)。
Upon receiving the data read start signal 1b, the wait register 60 starts monitoring the number of waits (step S702), and the wait control circuit 13 receives the data read start signal 1b. Then, monitoring of the SWAIT signal is started (step S70).
8).

【0062】外部LSI14は、SCK信号が供給され
るとデータの出力を開始する(ステップS703)。シ
リアル制御回路12は、SCK信号に同期して、SI信
号からのデータ・リードをリード終了まで継続する(ス
テップS704,ステップS705,ステップS70
6)。ウェイト・レジスタ60は、設定されたウェイト
数になると、SWAIT信号をアクティブにして(ステ
ップS707)、ウェイト制御回路13に通知する。
The external LSI 14 starts outputting data when the SCK signal is supplied (step S703). The serial control circuit 12 synchronizes with the SCK signal and continues reading data from the SI signal until the read is completed (steps S704, S705, and S70).
6). When the set wait number is reached, the wait register 60 activates the SWAIT signal (step S707) and notifies the wait control circuit 13.

【0063】ウェイト制御回路13は、SWAIT信号
がアクティブになるまで監視(ステップS708)を続
けており、アクティブ(タイミングT30)になると、
ウェイト状態を解除し(ステップS709)、データ・
リード終了信号1aをアクティブにして、CPU11に
通知する。
The wait control circuit 13 continues monitoring (step S708) until the SWAIT signal becomes active, and when it becomes active (timing T30),
The wait state is released (step S709), and the data
The read end signal 1a is activated to notify the CPU 11.

【0064】CPU11は、データ・リ一ド終了信号1
aが供給されると、実際のリード動作後、リード命令の
実行を終了し(ステップS710)、データ・リード開
始信号1bをインアクティブにする。ウェイト制御回路
13は、前記データ・リード開始信号1bがインアクテ
ィブになると、データ・リ一ド終了信号1aをインアク
ティブにする。CPU11は、前記ウェイト制御の一連
の動作が終了すると、次の命令の実行を開始する(ステ
ップS711)。
The CPU 11 outputs a data read end signal 1
When a is supplied, after the actual read operation, the execution of the read instruction is terminated (step S710), and the data read start signal 1b is made inactive. When the data read start signal 1b becomes inactive, the wait control circuit 13 makes the data read end signal 1a inactive. When the series of operations of the wait control is completed, the CPU 11 starts executing the next instruction (step S711).

【0065】次に、シリアル制御回路12の動作につい
て、図2を参照しながら詳細に説明を行う。
Next, the operation of the serial control circuit 12 will be described in detail with reference to FIG.

【0066】クロック選択回路24は、CPU11から
出力されるCLK信号と外部から入力されるSCK信号
の選択を行う。本発明においては、制御レジスタ21の
設定でCLK信号が選択されているものとして説明を行
う。
The clock selection circuit 24 selects the CLK signal output from the CPU 11 and the SCK signal input from the outside. In the present invention, description will be made assuming that the CLK signal is selected by the setting of the control register 21.

【0067】CPU11がリード命令(ステップS4
0:シフト・レジスタ20のダミー・リード)を実行す
ると、クロック制御回路23は、クロック選択回路24
で選択されたクロック信号2aをSCK信号として出力
するとともに、リード開始信号2bをアクティブにし
て、カウンタ25に通知する。
The CPU 11 issues a read instruction (step S4).
0: dummy read of the shift register 20), the clock control circuit 23
Then, the clock signal 2a selected in step (1) is output as the SCK signal, and the read start signal 2b is activated to notify the counter 25.

【0068】外部LSI14からのデータはSI信号に
より供給され、クロック制御回路23からのクロック信
号2cに同期して、シフト・レジスタ20に順次に格納
される。カウンタ25はリード開始信号2bが供給され
ると、クロック信号2a(SCK信号)のカウントを開
始し、例えば、データ転送に要する時間分のカウント数
である8つ目のクロック信号2aが入力されるとリード
終了信号2dをアクティブにして、割り込み発生回路2
6及びアクセス制御回路27に通知する。
Data from the external LSI 14 is supplied by an SI signal, and is sequentially stored in the shift register 20 in synchronization with the clock signal 2c from the clock control circuit 23. When the counter 25 is supplied with the read start signal 2b, the counter 25 starts counting the clock signal 2a (SCK signal), and receives, for example, an eighth clock signal 2a which is a count for the time required for data transfer. And the read end signal 2d are activated, and the interrupt generation circuit 2
6 and the access control circuit 27.

【0069】クロック制御回路23は、リード終了信号
2dが入力されるとSCK信号の出力を停止する。この
とき、割り込み発生回路26及びアクセス制御回路27
は、制御レジスタ21より供給されるコントロール信号
2e及びコントロール信号2fによって、それぞれイン
アクティブに設定されている。このため、割り込み発生
回路26及びアクセス制御回路27は、リード動作が終
了しても、INT信号及びSWAIT信号を生成しな
い。
The clock control circuit 23 stops outputting the SCK signal when the read end signal 2d is input. At this time, the interrupt generation circuit 26 and the access control circuit 27
Are set inactive by the control signal 2e and the control signal 2f supplied from the control register 21, respectively. Therefore, the interrupt generation circuit 26 and the access control circuit 27 do not generate the INT signal and the SWAIT signal even when the read operation ends.

【0070】以上の説明において、データ転送動作につ
いて、リード命令実行によるデータの読み出し(入力)
を例に説明したが、ライト命令実行によるデータの書き
込み(出力)においても同様の効果が得られることは勿
論である。
In the above description, in the data transfer operation, data read (input) by execution of a read instruction
Has been described as an example, but it goes without saying that a similar effect can be obtained also in writing (outputting) data by executing a write instruction.

【0071】また、本発明において、制御レジスタ21
の設定として、割り込み発生回路26有効,アクセス制
御回路27無効にそれぞれ設定することで、従来方式に
よるデータ転送も可能となる。
In the present invention, the control register 21
By setting the interrupt generation circuit 26 to be valid and the access control circuit 27 to be invalid, the data transfer according to the conventional method is also possible.

【0072】[0072]

【発明の効果】以上述べたように、上記本発明によれ
ば、プログラム容量の低減と開発期間の短縮およぴ処理
の高速化を図ることができ、さらに、マイクロコンピュ
ータ機能の有効活用が可能となり、外部ハードウェア削
減によるシステム・コストの低減が可能となる。
As described above, according to the present invention, the program capacity can be reduced, the development period can be shortened, the processing can be speeded up, and the microcomputer function can be effectively used. Thus, system cost can be reduced by reducing external hardware.

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

【図1】本発明のシリアル・データ転送装置における第
1の実施の形態を示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of a serial data transfer device according to the present invention.

【図2】図1におけるシリアル制御回路12の内部構成
を示したブロック図である。
FIG. 2 is a block diagram showing an internal configuration of a serial control circuit 12 in FIG.

【図3】本発明の実施の形態にのデータ・リード時のタ
イミング・チャートである。
FIG. 3 is a timing chart at the time of data reading according to the embodiment of the present invention.

【図4】本発明の実施の形態におけるシリアル・データ
転送装置のデータ・リード時のプログラムである。
FIG. 4 is a program at the time of data reading of the serial data transfer device according to the embodiment of the present invention.

【図5】本発明の実施の形態におけるシリアル・データ
転送装置のデータ・リード時の処理手順を示すフローチ
ャートである。
FIG. 5 is a flowchart showing a processing procedure at the time of data reading of the serial data transfer device according to the embodiment of the present invention.

【図6】本発明のシリアル・データ転送装置における第
2の実施の形態を示すブロック図である。
FIG. 6 is a block diagram showing a second embodiment of the serial data transfer device of the present invention.

【図7】本発明の実施の形態におけるシリアル・データ
転送装置のデータ・リード時の処理手順を示すフローチ
ャートである。
FIG. 7 is a flowchart showing a processing procedure at the time of data reading of the serial data transfer device according to the embodiment of the present invention.

【図8】バス・インタフェースを用いた従来におけるデ
ータ転送装置の構成を示したブロック図である。
FIG. 8 is a block diagram showing a configuration of a conventional data transfer device using a bus interface.

【図9】従来のデータ転送装置のデータ・リード時のタ
イミング・チャートである。
FIG. 9 is a timing chart at the time of data reading of a conventional data transfer device.

【図10】従来のバス・インタフェースを用いたデータ
転送装置におけるデータ・リード時のプログラムであ
る。
FIG. 10 shows a program at the time of data reading in a data transfer device using a conventional bus interface.

【図11】従来のバス・インタフェースを用いたデータ
転送装置におけるデータ・リード時の処理手順を示すフ
ローチャートである。
FIG. 11 is a flowchart showing a processing procedure at the time of data reading in a conventional data transfer device using a bus interface.

【図12】シリアル・インタフェースを用いた従来にお
けるデータ転送装置の構成を示したブロック図である。
FIG. 12 is a block diagram showing a configuration of a conventional data transfer device using a serial interface.

【図13】図12におけるシリアル制御回路120の構
成を示したブロック図である。
FIG. 13 is a block diagram showing a configuration of a serial control circuit 120 in FIG.

【図14】従来のシリアル・インタフェースを用いたデ
ータ転送装置のデータ・リード時におけるタイミング・
チャートである。
FIG. 14 is a timing chart of a conventional data transfer device using a serial interface when data is read.
It is a chart.

【図15】従来のシリアル・インタフェースを用いたデ
ータ転送装置におけるデータ・リード時のプログラムで
ある。
FIG. 15 is a program at the time of data reading in a conventional data transfer device using a serial interface.

【図16】従来のシリアル・インタフェースを用いたデ
ータ転送装置におけるデータ・リード時の処理手順を示
したフローチャートである。
FIG. 16 is a flowchart showing a processing procedure at the time of data reading in a conventional data transfer device using a serial interface.

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

10 マイクロコンピュータ 11 CPU 12 シリアル制御回路 13 ウェイト制御回路 14 外部LSI 1a データ・リード終了信号 1b データ・リード開始信号 20 シフト・レジスタ 21 制御レジスタ 22 ラッチ回路 23 クロック制御回路 24 クロック選択回路 25 カウンタ 26 割り込み発生回路 27 アクセス制御回路 2a クロック信号 2b リード開始信号 2c クロック信号 2d リード終了信号 2e コントロール信号 2f コントロール信号 T30 SWAIT信号のタイミング S40 リード命令 60 ウェイト・レジスタ 80 バス制御回路 81 外部制御回路 82 外部LSI T90 WAIT信号のタイミング S100 リード命令 120 シリアル制御回路 121 割り込み制御回路 12a 割り込み要求信号 130 制御レジスタ 131 割り込み発生回路 T140 INT信号のタイミング S150 リード命令 S151 リード命令 Reference Signs List 10 microcomputer 11 CPU 12 serial control circuit 13 wait control circuit 14 external LSI 1a data read end signal 1b data read start signal 20 shift register 21 control register 22 latch circuit 23 clock control circuit 24 clock selection circuit 25 counter 26 interrupt Generation circuit 27 Access control circuit 2a Clock signal 2b Read start signal 2c Clock signal 2d Read end signal 2e Control signal 2f Control signal T30 Timing of SWAIT signal S40 Read command 60 Wait register 80 Bus control circuit 81 External control circuit 82 External LSI T90 WAIT signal timing S100 Read command 120 Serial control circuit 121 Interrupt control circuit 12a Interrupt request signal 13 0 Control register 131 Interrupt generation circuit T140 Timing of INT signal S150 Read command S151 Read command

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】CPUと外部LSI間にて、シリアルでデ
ータの転送を行うためのCPU側に設けられたシリアル
制御回路と、CPUの命令実行サイクルのウェイト制御
を行うウェイト制御回路とを有し、前記シリアル制御回
路がデータ転送命令またはデータ入出力命令の実行によ
りシリアル・データの転送を行うシリアル・データ転送
装置において、 前記データ転送の終了を前記シリアル制御回路が前記ウ
ェイト制御回路に通知することでウェイト状態の解除を
行うことを特徴とするシリアル・データ転送装置。
A serial control circuit provided on the CPU side for serially transferring data between the CPU and an external LSI; and a wait control circuit for performing weight control of an instruction execution cycle of the CPU. A serial data transfer device in which the serial control circuit transfers serial data by executing a data transfer instruction or a data input / output instruction, wherein the serial control circuit notifies the wait control circuit of the end of the data transfer. A serial data transfer device for canceling a wait state by using the serial data transfer device.
【請求項2】前記シリアル制御回路は、 データ転送終了時に割り込み要求信号を生成する割り込
み発生回路と、 前記割り込み要求信号を外部へ出力する手段と、 前記データ転送終了時に、前記ウェイト制御回路への通
知を行うか、または前記割り込み要求信号を出力するか
を設定するための制御レジスタと、 を備えたことを特徴とする請求項1に記載のシリアル・
データ転送装置。
2. The serial control circuit includes: an interrupt generation circuit that generates an interrupt request signal at the end of data transfer; a unit that outputs the interrupt request signal to the outside; 2. A serial register according to claim 1, further comprising: a control register for setting whether to notify or output the interrupt request signal.
Data transfer device.
【請求項3】CPUと外部LSI間にて、シリアルでデ
ータの転送を行うためのCPU側に設けられたシリアル
制御回路と、CPUの命令実行サイクルのウェイト制御
を行うウェイト制御回路とを有し、前記シリアル制御回
路がデータ転送命令またはデータ入出力命令の実行によ
りシリアル・データの転送を行うシリアル・データ転送
装置において、 前記シリアル制御回路は、 前記データ転送に要する所定のウェイト・サイクル数を
設定する手段と、 前記ウェイト・サイクル数を監視する手段と、 前記ウェイト・サイクル数が所定のウェイト・サイクル
数を経過するとウェイト・サイクル数経過信号を生成す
る手段と、 を備え、 前記ウェイト制御回路は、前記ウェイト・サイクル数経
過信号を検出すると、ウェイト状態の解除を行うことを
特徴とするシリアル・データ転送装置。
A serial control circuit provided on the CPU side for serially transferring data between the CPU and the external LSI; and a wait control circuit for performing weight control of an instruction execution cycle of the CPU. A serial data transfer device in which the serial control circuit transfers serial data by executing a data transfer instruction or a data input / output instruction, wherein the serial control circuit sets a predetermined number of wait cycles required for the data transfer Means for monitoring the number of wait cycles, and means for generating a wait cycle number progress signal when the number of wait cycles exceeds a predetermined number of wait cycles, the weight control circuit comprising: Releasing the wait state upon detection of the wait cycle number elapsed signal. Serial data transfer apparatus according to claim.
【請求項4】前記シリアル制御回路は、 データ転送終了時に割り込み要求信号を生成する割り込
み発生回路と、 前記割り込み要求信号を外部へ出力する手段と、 前記ウェイト・サイクル経過後に、前記ウェイト制御回
路への通知を行うか、または前記割り込み要求信号を出
力するかを設定するための制御レジスタと、 を備えたことを特徴とする請求項3に記載のシリアル・
データ転送装置。
4. The serial control circuit includes: an interrupt generation circuit for generating an interrupt request signal at the end of data transfer; a means for outputting the interrupt request signal to an external device; And a control register for setting whether the notification is made or outputting the interrupt request signal.
Data transfer device.
【請求項5】CPUと外部LSI間にて行われるシリア
ル・インタフェースによるデータ転送は、クロック同期
式3線シリアルであることを特徴とする請求項1〜4の
いずれかに記載のシリアル・データ転送装置。
5. The serial data transfer according to claim 1, wherein the data transfer between the CPU and the external LSI through the serial interface is a clock synchronous three-wire serial. apparatus.
【請求項6】CPUと外6部LSI間にて、シリアルで
データの転送を行うためのCPU側に設けられたシリア
ル制御回路と、CPUの命令実行サイクルのウェイト制
御を行うウェイト制御回路とを有し、前記シリアル制御
回路がデータ転送命令またはデータ入出力命令の実行に
よりシリアル・データの転送を行うシリアル・データ転
送方法において、 前記シリアル制御回路は、前記データの転送終了を監視
し、 前記データの転送終了を検出すると検出信号を前記ウェ
イト制御回路に通知することを特徴とするシリアル・デ
ータ転送方法。
6. A serial control circuit provided on the CPU side for transferring data serially between the CPU and the six external LSIs, and a wait control circuit for performing weight control of an instruction execution cycle of the CPU. A serial data transfer method in which the serial control circuit transfers serial data by executing a data transfer instruction or a data input / output instruction, wherein the serial control circuit monitors completion of the data transfer, Detecting the end of the transfer of the data, and sending a detection signal to the wait control circuit.
【請求項7】前記シリアル制御回路は、 データ転送終了時に割り込み要求信号を生成し、 前記割り込み要求信号を外部へ出力し、 前記データ転送終了時に、前記ウェイト制御回路への通
知、または前記割り込み要求信号の出力を行う、 ことを特徴とする請求項6に記載のシリアル・データ転
送方法。
7. The serial control circuit generates an interrupt request signal at the end of data transfer, outputs the interrupt request signal to the outside, and notifies the wait control circuit at the end of the data transfer, or the interrupt request signal. 7. The serial data transfer method according to claim 6, wherein a signal is output.
【請求項8】CPUと外部LSI間にて、シリアルでデ
ータの転送を行うためのCPU側に設けられたシリアル
制御回路と、CPUの命令実行サイクルのウェイト制御
を行うウェイト制御回路とを有し、前記シリアル制御回
路がデータ転送命令またはデータ入出力命令の実行によ
りシリアル・データの転送を行うシリアル・データ転送
方法において、 前記シリアル制御回路は、 前記データ転送に要する所定のウェイト・サイクル数を
設定し、 前記ウェイト・サイクル数を監視し、 前記ウェイト・サイクル数が所定のウェイト・サイクル
数を経過するとウェイト・サイクル数経過信号を生成
し、 前記ウェイト制御回路は、 前記ウェイト・サイクル数経過信号を検出すると、ウェ
イト状態の解除を行うことを特徴とするシリアル・デー
タ転送方法。
8. A serial control circuit provided on the CPU side for serially transferring data between the CPU and an external LSI, and a wait control circuit for performing weight control of an instruction execution cycle of the CPU. A serial data transfer method in which the serial control circuit transfers serial data by executing a data transfer instruction or a data input / output instruction, wherein the serial control circuit sets a predetermined number of wait cycles required for the data transfer Monitoring the number of wait cycles, and when the number of wait cycles elapses a predetermined number of wait cycles, generates a wait cycle number elapse signal; and the wait control circuit outputs the wait cycle number elapse signal. Serial data transfer characterized by releasing wait state when detected Law.
【請求項9】前記シリアル制御回路は、 データ転送終了時に割り込み要求信号を生成し、 前記割り込み要求信号を外部へ出力し、 前記ウェイト・サイクル経過後に、前記ウェイト制御回
路への通知、または前記割り込み要求信号を出力する、 ことを特徴とする請求項8に記載のシリアル・データ転
送方法。
9. The serial control circuit generates an interrupt request signal at the end of data transfer, outputs the interrupt request signal to the outside, notifies the wait control circuit after the wait cycle has elapsed, or outputs the interrupt request signal. 9. The serial data transfer method according to claim 8, wherein a request signal is output.
【請求項10】CPUと外部LSI間にて行われるシリ
アル・インタフェースによるデータ転送は、クロック同
期式3線シリアルであることを特徴とする請求項6〜9
のいずれかに記載のシリアル・データ転送装置。
10. A data transfer between a CPU and an external LSI through a serial interface by a clock synchronous three-wire serial.
The serial data transfer device according to any one of the above.
JP31530097A 1997-11-17 1997-11-17 Serial data transfer method and device Expired - Fee Related JP3231683B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31530097A JP3231683B2 (en) 1997-11-17 1997-11-17 Serial data transfer method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31530097A JP3231683B2 (en) 1997-11-17 1997-11-17 Serial data transfer method and device

Publications (2)

Publication Number Publication Date
JPH11149446A true JPH11149446A (en) 1999-06-02
JP3231683B2 JP3231683B2 (en) 2001-11-26

Family

ID=18063742

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31530097A Expired - Fee Related JP3231683B2 (en) 1997-11-17 1997-11-17 Serial data transfer method and device

Country Status (1)

Country Link
JP (1) JP3231683B2 (en)

Also Published As

Publication number Publication date
JP3231683B2 (en) 2001-11-26

Similar Documents

Publication Publication Date Title
US4615017A (en) Memory controller with synchronous or asynchronous interface
TWI338835B (en) Method and apparatus for controlling a data processing system during debug
US5525971A (en) Integrated circuit
US4949241A (en) Microcomputer system including a master processor and a slave processor synchronized by three control lines
JPH06139189A (en) Common bus arbitrating mechanism
JPS5832416B2 (en) computer interface
JP2778222B2 (en) Semiconductor integrated circuit device
US20130073765A1 (en) Semiconductor device and data processor
JPH10293744A (en) Pci bus system
US20070038795A1 (en) Asynchronous bus interface and processing method thereof
JPS6134182B2 (en)
JP3231683B2 (en) Serial data transfer method and device
TWI299136B (en) A method of implementing wait-states in an integratep circuit
JP2007052685A (en) Microcontroller
JPS6146552A (en) Information processor
JP2004227484A (en) Information processor and memory access arbitration method
JP2003058272A (en) Semiconductor device and semiconductor chip used in the same
JPH1185673A (en) Method and device for controlling shared bus
JPH11316736A (en) Processor and data processor using the same
KR100681427B1 (en) Apparatus for resetting multiple processor system
JPS6054065A (en) Synchronous controller
JPH11273380A (en) Lsi operation mode setting signal fetching method and lsi with mode signal fetching function
JP2567833B2 (en) Interrupt detection method
JPH07191954A (en) Microcomputer system
JPS58205235A (en) Preventing circuit against data source contention

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080914

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080914

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090914

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090914

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20100914

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20100914

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20100914

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20110914

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120914

Year of fee payment: 11

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20120914

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130914

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees