JPH0720142B2 - Serial interface circuit - Google Patents

Serial interface circuit

Info

Publication number
JPH0720142B2
JPH0720142B2 JP1110206A JP11020689A JPH0720142B2 JP H0720142 B2 JPH0720142 B2 JP H0720142B2 JP 1110206 A JP1110206 A JP 1110206A JP 11020689 A JP11020689 A JP 11020689A JP H0720142 B2 JPH0720142 B2 JP H0720142B2
Authority
JP
Japan
Prior art keywords
serial
counter
register
serial data
clock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1110206A
Other languages
Japanese (ja)
Other versions
JPH02146842A (en
Inventor
由美子 宮崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Publication of JPH02146842A publication Critical patent/JPH02146842A/en
Publication of JPH0720142B2 publication Critical patent/JPH0720142B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はシリアルインタフェース回路、特にマイクロコ
ンピュータに内臓するクロック同期式のシリアルインタ
フェース回路に関する。
The present invention relates to a serial interface circuit, and more particularly to a clock synchronous serial interface circuit incorporated in a microcomputer.

〔従来の技術〕[Conventional technology]

従来のこの種のシリアルインタフェース回路の代表的な
ブロック図を第3図に、また、動作時のタイミングチャ
ートを第4図に示す。
A typical block diagram of a conventional serial interface circuit of this type is shown in FIG. 3, and a timing chart during operation is shown in FIG.

第3図に示すように、従来のクロック同期式のシリアル
インタフェース回路は、外部からシリアルデータを入力
するシリアルデータ入力端子11、例えば8ビットからな
る送信データ及び受信データのそれぞれの書込み及び読
出しが行なわれるシフトレジスタ12、シリアル送信デー
タを1ビットずつラッチするシリアルデータ出力ラッチ
回路13、外部へシリアルデータを出力するシリアルデー
タ出力端子14、送信および受信クロックの入出力端子で
あるシリアルクロック入出力端子15、受信シリアルクロ
ックをカウントする3ビットのシリアルクロックカウン
タ16、シリアルクロックカウンタ16がシリアルクロック
を8発カウントし、オーバフローしたことを検知して割
込み信号1aを発生する割込み信号発生回路17、内部クロ
ック1bまたは外部クロック1cのシリアルクロックの選択
を行うクロック選択回路18、8発のシリアルクロック出
力を行うシリアルクロック制御回路19、および内部バス
20により構成される。
As shown in FIG. 3, the conventional clock-synchronized serial interface circuit performs writing and reading of serial data input terminal 11 for inputting serial data from the outside, for example, transmission data and reception data of 8 bits, respectively. Shift register 12, serial data output latch circuit 13 that latches serial transmission data bit by bit, serial data output terminal 14 that outputs serial data to the outside, serial clock input / output terminal 15 that is an input / output terminal for transmission and reception clocks. , 3-bit serial clock counter 16 that counts the received serial clock, serial clock counter 16 counts 8 serial clocks, generates an interrupt signal 1a when it detects that it has overflowed, internal clock 1b Or external clock Serial clock control circuit 19 performs serial clock output of the clock selection circuit 18,8 shots for selecting a serial clock 1c and the internal bus,
Composed of 20.

第4図を参照してシリアルデータ受信および送信時の動
作を説明する。受信時は、シリアルクロック入出力端子
15から入力されるシリアルクロック(第4図1c)に同期
して、シリアルデータ入力端子11からのシリアルデータ
DI0(第4図1f)を1ビットずつシフトしてシフト
レジスタ12に取込む。また同時に、シリアルクロックカ
ウンタ16がシリアルクロックを8発までカウントすると
オーバフロー信号1dを発生する。これを検知して割込み
信号発生回路17が割込み信号1aを発生する。送信時は、
シフタレジスタ12に書込まれたシリアルデータDO0
(第4図1g)が、シリアルクロック制御回路19から出力
されるシリアルクロック1cに同期して1ビットずつシフ
トしてシリアルデータ出力端子14から出力される。受信
時と同様にシリアルクロックカウンタ16がシリアルクロ
ック1cを8発までカウントするとオーバフロー信号1dを
発生する。これを検知して割込み信号発生回路17が割込
み信号1aを発生する。
The operation during serial data reception and transmission will be described with reference to FIG. Serial clock input / output pin during reception
Serial data from the serial data input terminal 11 in synchronization with the serial clock input from 15 (Fig. 4c)
DI 0 to 7 (1f in FIG. 4) are shifted bit by bit and loaded into the shift register 12. At the same time, when the serial clock counter 16 counts up to eight serial clocks, an overflow signal 1d is generated. Upon detecting this, the interrupt signal generation circuit 17 generates the interrupt signal 1a. When sending,
Serial data DO 0 to 7 written in the shifter register 12
(1g in FIG. 4) is output from the serial data output terminal 14 by shifting bit by bit in synchronization with the serial clock 1c output from the serial clock control circuit 19. When the serial clock counter 16 counts up to eight serial clocks 1c as in the reception, an overflow signal 1d is generated. Upon detecting this, the interrupt signal generation circuit 17 generates the interrupt signal 1a.

割込み信号1aによって中央処理装置(以下CPUという)
が割込み処理ルーチンに入り、CPUは内部バス20を経由
してシフトレジスタ12の値をリードするか、またはシフ
トレジスタ12にデータを書込む等のソフトウェア処理を
行い、元の命令ルーチンに戻る。
Central processing unit (hereinafter referred to as CPU) by interrupt signal 1a
Enters an interrupt processing routine, the CPU performs software processing such as reading the value of the shift register 12 via the internal bus 20 or writing data to the shift register 12, and then returns to the original instruction routine.

以上が従来のクロック同期式のシリアルインタフェース
を内蔵したマイクロコンピュータにおける1フレームの
シリアルデータ受信および送信時の一連の動作である。
The above is a series of operations at the time of receiving and transmitting one frame of serial data in the microcomputer incorporating the conventional clock-synchronous serial interface.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上述した従来のクロック同期式のシリアルインタフェー
ス回路は、シリアルデータを格納するレジスタとしてシ
フトルジスタを1つ有しているのみであるので、シリア
ルデータ受信時には、次のシリアルデータの受信が行わ
れる前にシフトレジスタのデータを他のレジスタやメモ
リに書込まなければならない。またシリアルデータ送信
時には1フレームのシリアルデータの送信ごとにシフト
レジスタにデータを書込まなければならない。従って、
1つのフレームのシリアルデータの受信または送信の終
了ごとに割込み信号を発生し、CPUが書込み処理に入っ
て所定のソフトウェア処理を行い、元の命令ルーチンに
戻るという動作を繰り返している。このため、頻繁にシ
リアルデータの転送が行われると、CPUにかかる負担が
大きくなるという問題を有している。
Since the conventional clock-synchronous serial interface circuit described above has only one shift register as a register for storing serial data, when receiving serial data, it shifts before receiving the next serial data. The data in the register must be written to another register or memory. Further, when transmitting serial data, the data must be written in the shift register every time one frame of serial data is transmitted. Therefore,
An interrupt signal is generated each time reception or transmission of one frame of serial data is completed, and the CPU repeats the operation of entering write processing, performing predetermined software processing, and returning to the original instruction routine. Therefore, if the serial data is frequently transferred, there is a problem that the load on the CPU becomes large.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明のシリアルインタフェース回路は、クロックに同
期してシリアルデータを転送するクロック同期式のシリ
アルインタフェース回路において、前期クロックに同期
してシリアルデータを格納または転送するシフトレジス
タと、前期クロックを1フレーム分計数してオーバフロ
ー信号を発生する第1のカウンタと、この第1のカウン
タのオーバフローを計数する第2のカウンタと、シルア
ルデータの受信と送信とのモードを切換えるモードレジ
スタと、前記第2のカウンタの計数値をアドレスとし
て、受信時には前記第1のカウンタのオーバフローごと
に前記シフトレジスタの内容を記憶し、送信時には、前
記第1のカウンタのオーバフローごとに前記シフトレジ
スタから転送すべきシリアル送信データを記憶するシリ
アルデータ格納レジスタ群と、シリアルデータの送信ま
たは受信のフレーム数を設定するレジスタと、このレジ
スタの内容と前記第2のカウンタの計数値とを比較して
両方の数値が一致したとき一致信号を出力する比較回路
と、前記一致信号により設定したフレーム数のシリアル
データ送信または受信の完了を中央処理装置に知らせる
割込信号を出力する割込み信号発生回路とを有すること
により構成される。
The serial interface circuit of the present invention is a clock-synchronous serial interface circuit that transfers serial data in synchronization with a clock. In the serial interface circuit, a shift register that stores or transfers serial data in synchronization with the previous period clock and one period of the previous period clock are used. A first counter for counting and generating an overflow signal, a second counter for counting overflow of the first counter, a mode register for switching modes of receiving and transmitting serial data, and the second counter. Is used as an address to store the contents of the shift register at each overflow of the first counter at the time of reception, and at the time of transmission, the serial transmission data to be transferred from the shift register at each overflow of the first counter. Serial data storage cash register Data group, a register for setting the number of frames for transmitting or receiving serial data, the contents of this register and the count value of the second counter are compared, and a match signal is output when both numbers match. It comprises a circuit and an interrupt signal generating circuit which outputs an interrupt signal for notifying the central processing unit of completion of serial data transmission or reception of the number of frames set by the coincidence signal.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be described with reference to the drawings.

第1図は本発明の一実施例のブロック図である。第1図
のクロック同期式のシリアルインタフェース回路はシリ
アルデータ入力端子11、シフトレジスタ12、シリアルデ
ータ出力ラッチ13、シリアルデータ出力端子14、シリア
ルクロック入出力端子15、シリアルクロックカウンタ1
6、割込み信号発生回路17、クロック選択回路18、およ
びシリアルクロック制御回路19の従来のクロック同期式
のシリアルインタフェース回路の構成要素と同様の機能
を有するブロック構成の他に、シリアルクロックカウン
タ16が8発カウント終了ごとに発生するオーバフロー信
号をカウントするオーバフローカウンタ21、ANDゲート2
2、指定された受信または送信フレーム数を記憶する転
送フレーム数レジスタス24、オーバフローカウンタ21と
転送フレーム数レジスタ24との内容を比較するコンパレ
ータ25、およびシリアルデータ格納レジスタ群23を有し
ている。このシリアルデータ格納レジスタ群23は通常の
メモリと同様に内部バス20を介してCPUからのリード・
ライトも可能である。また、受信・送信のモードを切換
える受信/送信モードレジスタ26、受信時にはシリアル
クロックカウンタ16のオーバフローごとにシフトレジス
タ12の内容をシリアルデータ格納レジスタ群23に転送
し、送信時にはシリアルクロックカウンタ16のオーバフ
ローごとにシリアルデータ格納レジスタ群23のシリアル
データをシフトレジスタ12に転送する制御を行う受信/
送信制御回路27を有している。
FIG. 1 is a block diagram of an embodiment of the present invention. The clock synchronous serial interface circuit shown in FIG. 1 has a serial data input terminal 11, a shift register 12, a serial data output latch 13, a serial data output terminal 14, a serial clock input / output terminal 15, and a serial clock counter 1.
6, the interrupt signal generation circuit 17, the clock selection circuit 18, and the serial clock control circuit 19, in addition to the block configuration having the same functions as the components of the conventional clock synchronous serial interface circuit, Overflow counter 21, which counts the overflow signal generated each time the counting is completed, AND gate 2
2. It has a transfer frame number register 24 for storing the specified number of received or transmitted frames, a comparator 25 for comparing the contents of the overflow counter 21 and the transfer frame number register 24, and a serial data storage register group 23. This serial data storage register group 23 is read from the CPU via the internal bus 20 like a normal memory.
Light is also possible. In addition, the receive / transmit mode register 26 that switches between receive and transmit modes, transfers the contents of the shift register 12 to the serial data storage register group 23 at each overflow of the serial clock counter 16 at the time of reception, and overflows the serial clock counter 16 at the time of transmission. Control for transferring the serial data of the serial data storage register group 23 to the shift register 12 for each
It has a transmission control circuit 27.

次に以上の構成におけるシリアルデータ受信時の動作を
説明する。受信/送信モードレジスタ26を受信モードに
セットし、転送フレーム数レジスタ24には例として“1"
を書込んだとする。シリアルクロックカウンタ16が8発
のシリアルクロックをカウントし、シフトレジスタ12に
1フレーム分のシリアルデータが受信されるとオーバフ
ロー信号1dを発生する。この信号を受けて、オーバフロ
ーカウンタ21がカウントアップし、カウント値1を出力
する。またシフトレジスタ12に取込まれたデータは、オ
ーバフローカウンタ21のカウント値をアドレス信号とし
てシリアルデータ格納レジスタ群23のアドレス指定され
たレジスタに転送される。また、コンパレータ25は受信
フレーム数レジスタ24の内容とオーバフロー21のカウン
ト値とを比較し、両数値が一致すると一致信号2cを出力
する。一致信号2cはANDゲート22に入力される。シリア
ルクロックカウンタ16からの前記オーバフロー信号1dは
ハイレベルであるので、ANDゲート22はハイレベルを出
力し、割込み信号発生回路17はこれを検出して書込み信
号1aaを出力する。従って転送フレーム数リジスタ24に
“1"を書込んだときは、この動作を繰返すことによりシ
リアルデータを1フレーム受信するごとに割込み信号1a
aを発生する。すなわち、この場合には、従来のクロッ
ク同期式のシリアルインタフェース回路と同様の動作を
行なってシリアルデータの受信を行う。なお、オーバフ
ローカンウンタ21は割込み信号発生後に、クリアしてお
く。
Next, the operation at the time of receiving serial data in the above configuration will be described. Set the receive / transmit mode register 26 to receive mode and set the transfer frame number register 24 to "1" as an example.
Is written. The serial clock counter 16 counts eight serial clocks, and when the shift register 12 receives one frame of serial data, an overflow signal 1d is generated. Upon receiving this signal, the overflow counter 21 counts up and outputs the count value 1. The data taken into the shift register 12 is transferred to the addressed register of the serial data storage register group 23 using the count value of the overflow counter 21 as an address signal. Further, the comparator 25 compares the content of the received frame number register 24 with the count value of the overflow 21, and outputs a coincidence signal 2c when both numerical values match. The match signal 2c is input to the AND gate 22. Since the overflow signal 1d from the serial clock counter 16 is at high level, the AND gate 22 outputs high level, and the interrupt signal generating circuit 17 detects this and outputs the write signal 1aa. Therefore, when "1" is written in the transfer frame number register 24, this operation is repeated to generate an interrupt signal 1a each time one frame of serial data is received.
generate a. That is, in this case, the same operation as that of the conventional clock-synchronous serial interface circuit is performed to receive the serial data. The overflow counter 21 is cleared after the interrupt signal is generated.

次に、転送フレーム数レジスタ24に2〜nの数値を書込
むと、コンパレータ25は転送フレーム数レジスタ24の内
容とオーバフローカウンタ21のカウント値とをオーバフ
ローカウンタ21がカウントするごとに比較し、オーバフ
ローカウンタ21のカウント値が転送フレーム数レジスタ
24の数値に一致すると、一致信号2cを発生する。これに
よって割込み信号1aaは、転送フレーム数レジスタ24の
内容に相等するフレーム数のシリアルデータの受信が終
了すると出力される。また、シフトレジスタ12に入力さ
れたシリアル受信データは、シリアルクロックカウンタ
21のカウント値をアドレス信号としてシリアルデータ格
納レジスタ群23のアドレス指定されたレジスタに、シリ
アルクロックカウンタ16のオーバフローごとに順次書込
まれる。
Next, when a numerical value of 2 to n is written in the transfer frame number register 24, the comparator 25 compares the contents of the transfer frame number register 24 with the count value of the overflow counter 21 every time the overflow counter 21 counts, and overflows. The count value of the counter 21 is the transfer frame number register
When the numerical value of 24 is matched, a matching signal 2c is generated. Accordingly, the interrupt signal 1aa is output when the reception of the serial data of the number of frames equal to the content of the transfer frame number register 24 is completed. In addition, the serial reception data input to the shift register 12 is the serial clock counter.
The count value of 21 is used as an address signal and sequentially written into the addressed register of the serial data storage register group 23 at each overflow of the serial clock counter 16.

次に同じく、第1図におけるシリアルデータ送信時の動
作を説明する。シリアルデータ格納レジスタ群23には、
予め指定されたフレーム数の送信データをCPUからのラ
イト動作により内部バス20を経由して書込んでおく。受
信/送信モードレジスタ26を送信モードにセットする
と、受信/送信制御レジスタ27の制御によって、シリア
ルデータ格納レジスタ群23に書込まれた送信データは、
オーバフローカウンタ21の内容でアドレス指定がされて
シリアルデータ格納群23からシフトレジスタ12へ転送さ
れる。シフトレジスタ12に書込まれたシリアルデータ
は、シリアルクロックに同期して1ビットずつシフトし
てシリアルデータ出力ラッチ回路13にラッチされ、シリ
アルデータ出力端子14から送信データとして出力され
る。シリアルクロックカウンタ16は受信時と同様に8発
のシリアルクロックをカウントし、1フレーム分のシリ
アルデータ送信終了とともにオーバフロー信号1dを発生
すると、オーバフローカウンタ21がカウントアップしカ
ウント値“1"を出力する。コンパレータ25は転送フレー
ム数レジスタ24の内容とオーバフローカウンタ21のカウ
ント値とを比較し、転送フレーム数レジスタ24に“1"が
書込まれている場合には両数値が一致し、一致信号2cを
出力する。一致信号2cはシリアルクロックカウンタ16の
前記オーバフロー信号1dのハイレベルとともにANDゲー
ト22に入力される。これによって割込み信号発生回路17
は割込み信号1aaを出力する。従って転送フレーム数レ
ジスタ24に“1"を書込んだときは、前述の動作を繰返す
ことにより、シリアルデータを1フレーム受信するごと
に割込み信号1aaを発生する。すなわち、従来のクロッ
ク同期式のシリアルインタフェース回路と同様の動作を
行なってシリアルデータの送信を行う。一方、転送フレ
ーム数レジスタ24に2〜nの数値を書込むと、オーバフ
ローカウンタ21のカウンタ値と転送フレーム数レジスタ
24に書込まれた数値とが一致した所で、コンパレータ25
から一致信号2cが出力されるので、割込み信号1aaは転
送フレーム数レジスタ24の内容に相等するフレーム数の
シリアルデータの送信データが終了すると出力される。
Similarly, the operation during serial data transmission in FIG. 1 will be described. In the serial data storage register group 23,
The transmission data of the number of frames designated in advance is written via the internal bus 20 by the write operation from the CPU. When the reception / transmission mode register 26 is set to the transmission mode, the transmission data written in the serial data storage register group 23 is controlled by the reception / transmission control register 27.
Addresses are specified by the contents of the overflow counter 21 and transferred from the serial data storage group 23 to the shift register 12. The serial data written in the shift register 12 is shifted bit by bit in synchronization with the serial clock, latched in the serial data output latch circuit 13, and output from the serial data output terminal 14 as transmission data. The serial clock counter 16 counts eight serial clocks as at the time of reception, and when the overflow signal 1d is generated upon completion of serial data transmission for one frame, the overflow counter 21 counts up and outputs the count value "1". . The comparator 25 compares the contents of the transfer frame number register 24 with the count value of the overflow counter 21, and when "1" is written in the transfer frame number register 24, both numbers match and the match signal 2c is output. Output. The coincidence signal 2c is input to the AND gate 22 together with the high level of the overflow signal 1d of the serial clock counter 16. This allows the interrupt signal generation circuit 17
Outputs interrupt signal 1aa. Therefore, when "1" is written in the transfer frame number register 24, the above operation is repeated to generate the interrupt signal 1aa each time one frame of serial data is received. That is, the same operation as the conventional clock-synchronized serial interface circuit is performed to transmit the serial data. On the other hand, when a numerical value of 2 to n is written in the transfer frame number register 24, the counter value of the overflow counter 21 and the transfer frame number register
When the value written in 24 matches, the comparator 25
Since the match signal 2c is output from the interrupt signal 1a, the interrupt signal 1aa is output when the transmission data of the serial data of the number of frames equal to the content of the transfer frame number register 24 is completed.

第2図は従来のクロック同期式のシリアルインタフェー
スの動作と、第1図の実施例の動作との比較を行ったタ
イミングチャートである。第2図(a)はシリアルクロ
ック、第2図(b)はシリアル受信または送信データ、
第2図(c)および(d)はそれぞれ従来の割込み信号
1aおよびCPUの動作、第2図(e)および(f)はそれ
ぞれ第1図の実施例の割込み信号1aaおよびCPUの動作の
タイミングを示していて、第2図(d)では1フレーム
の受信または送信ごとにCPUでの動作が行なわれ、第2
図(f)ではnフレームの受信または送信に1度CPUで
の動作が行なわれている。
FIG. 2 is a timing chart in which the operation of the conventional clock-synchronous serial interface and the operation of the embodiment of FIG. 1 are compared. 2 (a) is a serial clock, FIG. 2 (b) is serial reception or transmission data,
2 (c) and 2 (d) are conventional interrupt signals, respectively.
1a and the operation of the CPU, FIGS. 2 (e) and (f) show the timing of the interrupt signal 1aa and the operation of the CPU of the embodiment of FIG. 1, respectively, and FIG. 2 (d) shows the reception of one frame. Alternatively, the CPU operates for each transmission, and the second
In the figure (f), the CPU operates once for receiving or transmitting n frames.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明のクロック同期式のシリア
ルインタフェース回路は、転送フレーム数のレジスタの
設定値に相等するフレーム数のシリアルデータを、受信
時には順次シリアルデータ格納レジスタに格納し、送信
時にはシリアルデータ格納レジスタに書込んだシリアル
データを順次シフトレジスタに転送できる回路を有して
いるので、設定したフレーム数の受信データの格納また
は送信データの送信が終った所でCPUに割込み処理を行
い、各シリアルデータ格納レジスタの値をリードする
か、またはシリアルデータ格納レジスタにデータを書込
む動作を行うことができる。従って、1度の割込み処理
において、予め設定したフレーム数のシリアルデータの
処理ができるので、割込み処理のための前処理や後処理
が少なくなり、CPUの負担を軽減することができると云
う効果がある。
As described above, the clock-synchronous serial interface circuit of the present invention sequentially stores the serial data of the number of frames equal to the set value of the register of the number of transfer frames in the serial data storage register at the time of reception and the serial data at the time of transmission. Since it has a circuit that can sequentially transfer the serial data written in the data storage register to the shift register, interrupt processing is performed on the CPU when the storage of the set number of received data or the transmission of the transmitted data is completed, The operation of reading the value of each serial data storage register or writing the data to the serial data storage register can be performed. Therefore, since it is possible to process a preset number of frames of serial data in one interrupt process, pre-processing and post-processing for interrupt processing are reduced, and it is possible to reduce the load on the CPU. is there.

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

第1図は本発明の一実施例のブロック図、第2図は従来
のシリアルインタフェース回路と本発明の実施例との比
較を行なったタイミングチャート、第3図は従来のシリ
アルインタフェース回路の代表的なブロック図、第4図
は第3図のブロック図の動作のタイミングチャートであ
る。 11……シリアルデータ入力端子、12……シフトレジス
タ、13……シリアルデータ出力ラッチ回路、14……シリ
アルデータ出力端子、15……シリアルクロック入出力端
子、16……シリアルクロックカウンタ、17……割込み信
号発生回路、18……クロック選択回路、19……シリアル
クロック制御回路、20…内部バス、21……オーバフロー
カウンタ、22……ANDゲート、23……シリアルデータ格
納レジスタ群、24……転送フレーム数レジスタ、25……
コンパレータ、26……受信/送信モードレジスタ、27…
…受信/送信制御回路。
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a timing chart comparing a conventional serial interface circuit with an embodiment of the present invention, and FIG. 3 is a typical conventional serial interface circuit. FIG. 4 is a timing chart of the operation of the block diagram of FIG. 11 …… Serial data input terminal, 12 …… Shift register, 13 …… Serial data output latch circuit, 14 …… Serial data output terminal, 15 …… Serial clock input / output terminal, 16 …… Serial clock counter, 17 …… Interrupt signal generation circuit, 18 ... Clock selection circuit, 19 ... Serial clock control circuit, 20 ... Internal bus, 21 ... Overflow counter, 22 ... AND gate, 23 ... Serial data storage register group, 24 ... Transfer Frame number register, 25 ……
Comparator, 26 ...... Reception / transmission mode register, 27 ...
... Reception / transmission control circuit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】クロックに同期してシリアルデータを転送
するクロック同期式のシリアルインタフェース回路にお
いて、前期クロックに同期してシリアルデータを格納ま
たは転送するシフトレジスタと、前期クロックを1フレ
ーム分計数してオーバフロー信号を発生する第1のカウ
ンタと、この第1のカウンタのオーバフローを計数する
第2のカウンタと、シリアルデータの受信と送信とのモ
ードを切換えるモードレジスタと、前記第2のカウンタ
の計数値をアドレスとして、受信時には前記第1のカウ
ンタのオーバフローごとに前記シフトレジスタの内容を
記憶し、送信時には、前記第1のカウンタのオーバフロ
ーごとに前記シフトレジスタから転送すべきシリアル送
信データを記憶するシリアルデータ格納レジスタ群と、
シリアルデータの送信または受信のフレーム数を設定す
るレジスタと、このレジスタの内容と前記第2のカウン
タの計数値とを比較して両方の数値が一致したとき一致
信号を出力する比較回路と、前記一致信号により設定し
たフレーム数のシリアルデータ送信または受信の完了を
中央処理装置に知らせる割込信号を出力する割込み信号
発生回路とを有することを特徴とするシリアルインタフ
ェース回路。
1. A clock-synchronous serial interface circuit for transferring serial data in synchronization with a clock, wherein a shift register for storing or transferring serial data in synchronization with the previous clock and a previous clock for one frame are counted. A first counter that generates an overflow signal, a second counter that counts the overflow of the first counter, a mode register that switches the mode of serial data reception and transmission, and a count value of the second counter. Is used as an address, the content of the shift register is stored at each overflow of the first counter at the time of reception, and the serial transmission data to be transferred from the shift register at the time of overflow of the first counter is stored at the time of transmission. Data storage register group,
A register for setting the number of frames for transmitting or receiving serial data, a comparator circuit for comparing the contents of this register with the count value of the second counter and outputting a match signal when both numbers match, A serial interface circuit, comprising: an interrupt signal generation circuit that outputs an interrupt signal that notifies the central processing unit of completion of serial data transmission or reception of the number of frames set by the coincidence signal.
JP1110206A 1988-08-23 1989-04-27 Serial interface circuit Expired - Lifetime JPH0720142B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP63-209914 1988-08-23
JP20991488 1988-08-23

Publications (2)

Publication Number Publication Date
JPH02146842A JPH02146842A (en) 1990-06-06
JPH0720142B2 true JPH0720142B2 (en) 1995-03-06

Family

ID=16580748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1110206A Expired - Lifetime JPH0720142B2 (en) 1988-08-23 1989-04-27 Serial interface circuit

Country Status (1)

Country Link
JP (1) JPH0720142B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0528106A (en) * 1991-07-19 1993-02-05 Nec Eng Ltd Data transfer system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01255922A (en) * 1988-04-05 1989-10-12 Mitsubishi Electric Corp Semiconductor integrated circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01255922A (en) * 1988-04-05 1989-10-12 Mitsubishi Electric Corp Semiconductor integrated circuit

Also Published As

Publication number Publication date
JPH02146842A (en) 1990-06-06

Similar Documents

Publication Publication Date Title
JP3156813B2 (en) Buffer control circuit
US5295252A (en) Data storage device
US5555548A (en) Method and apparatus for transferring data between a master unit and a plurality of slave units
JP2572292B2 (en) Asynchronous data transmission device
US5392442A (en) Data-driven processor having an output unit for providing only operand data in a predetermined order
US4095283A (en) First in-first out memory array containing special bits for replacement addressing
US5117489A (en) Data-driven processor having an internal tag-generating system for generating a distinct tagged information and assembling with un-tagged information of an input/output data packet
JPS6235949A (en) Memory device
JPS607538A (en) Data transfer control method
US6463000B2 (en) First-in first-out memory device and method of generating flag signal in the same
US4999807A (en) Data input circuit having latch circuit
EP0068678A2 (en) Comparator circuit and method
US4755817A (en) Data transmission system having transmission intervals which are adjustable for data words of various lengths
US4641278A (en) Memory device with a register interchange function
US4090256A (en) First-in-first-out register implemented with single rank storage elements
JPH0720142B2 (en) Serial interface circuit
JPH0721103A (en) Data transfer device
JPS60241150A (en) Data transfer device
US5710904A (en) Microprocessor having address pre-outputting function and data processor using the same
US5590371A (en) Serial communication circuit on an LSI chip and communicating with another microcomputer on the chip
US6088400A (en) Receiving device for synchronous serial transmission data
JPH06197009A (en) Counter with output latch function
US6175518B1 (en) Remote register hierarchy accessible using a serial data line
US4747106A (en) Parity checker circuit
JPH0795269B2 (en) Instruction code decoding device