JPH0333962A - Serial interface circuit - Google Patents
Serial interface circuitInfo
- Publication number
- JPH0333962A JPH0333962A JP2122132A JP12213290A JPH0333962A JP H0333962 A JPH0333962 A JP H0333962A JP 2122132 A JP2122132 A JP 2122132A JP 12213290 A JP12213290 A JP 12213290A JP H0333962 A JPH0333962 A JP H0333962A
- Authority
- JP
- Japan
- Prior art keywords
- signal
- circuit
- serial data
- shift
- shift 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.)
- Pending
Links
- 238000003708 edge detection Methods 0.000 claims abstract description 12
- 238000001514 detection method Methods 0.000 claims abstract description 7
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 238000000034 method Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Microcomputers (AREA)
- Information Transfer Systems (AREA)
- Dc Digital Transmission (AREA)
- Communication Control (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はシリアルデータ転送回路に関し、特にマイクロ
コンピュータLSIに内蔵されるシリアルインターフェ
イス回路に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a serial data transfer circuit, and particularly to a serial interface circuit built into a microcomputer LSI.
第3図はこの種のシリアルインターフェイス回路の従来
例のブロック図、第4図はそのタイムチャートである。FIG. 3 is a block diagram of a conventional example of this type of serial interface circuit, and FIG. 4 is a time chart thereof.
この回路は、外部よりシリアルデータな入力するための
シリアルデータ入力端子lと、シリアルデータを出力す
るシリアルデータ出力端子2と、8段構成のシフトレジ
スタ3と、外部クロ、ツク4または内部クロック5をシ
フト動作のシフトクロック6として選択するシリアルク
ロック選択回路7と、シフトクロック6をカウントし8
個カウントスると、シフトが完了したことを示す転送完
了信号11を出力するシフトクロックカウンタ10と、
シフトクロック6をシフトレジスタ3を転送し転送完了
信号11によって閉じるシフトクロック転送ゲート8と
、転送完了信号11により受信データのソフトウェア処
理を行なうための割込信号12を発生する割込信号発生
回路13により構成されていた。なお、ソフトレジスタ
3は内部データバス18にも接続されている。This circuit consists of a serial data input terminal 1 for inputting serial data from the outside, a serial data output terminal 2 for outputting serial data, an 8-stage shift register 3, and an external clock 4 or an internal clock 5. A serial clock selection circuit 7 selects the shift clock 6 as the shift clock 6 for the shift operation, and a serial clock selection circuit 7 that counts the shift clock 6 and selects the shift clock 8 as the shift clock 6 for the shift operation.
a shift clock counter 10 that outputs a transfer completion signal 11 indicating that the shift is completed when the shift clock counter 10 is counted;
A shift clock transfer gate 8 that transfers the shift clock 6 to the shift register 3 and closes in response to a transfer completion signal 11; and an interrupt signal generation circuit 13 that generates an interrupt signal 12 for performing software processing of received data in accordance with the transfer completion signal 11. It was composed of Note that the soft register 3 is also connected to the internal data bus 18.
上述した従来のシリアルインターフェイス回路は、割込
信号12の発生タイミングがシリアルデータ転送完了後
にのみなっていた。In the conventional serial interface circuit described above, the interrupt signal 12 is generated only after the serial data transfer is completed.
ここで、例えば調歩同期転送を従来の汎用シリアルイン
ターフェイス回路にて実現するためにソフトウェア処理
を併用して実施する場合を考えてみる。調歩同期転送で
は、1本の信号線にてテタの転送を行なうため、転送ス
タートnf7にデータラインをハイレベルにしておき、
スタート時にスタートビットとして、本来のデータの前
にローレベルを転送してくる。また、これらデータの転
送レートとしてはあらかじめ定められたレートを使用す
るため、シフトクロック6としては、データの転送レー
トに対応したマイクロコンピュータ内部で発生する周波
数のシフトクロックを選択する。Here, let us consider, for example, a case where software processing is used in combination to implement asynchronous transfer using a conventional general-purpose serial interface circuit. In asynchronous transfer, data is transferred using one signal line, so the data line is set to high level at transfer start nf7.
At the start, a low level is transferred as a start bit before the original data. Furthermore, since a predetermined rate is used as the data transfer rate, a shift clock having a frequency generated within the microcomputer corresponding to the data transfer rate is selected as the shift clock 6.
この場合、従来のシリアルインターフェイス回路では、
前記スタートビットを検出する手段がなく、第5図に示
すように転送データラインをシフトデータ入力端子SI
以外に汎用割込み入力端子INTにも接続して、スター
トヒツトにより発生する割込みでシリアルデータを送信
してくることを検知し、シリアルインターフェイス回路
をソフトウェアにより起動しスタートビットに続くシリ
アルデータをシフトレジスタ3にとりこむことにより調
歩同期転送データDの受信を可能としていたが、汎用割
込み入力機能を余分に必要とし、結果的にマイクロコン
ピュータのトータル的な性能を下げざるを得ないという
欠点がある。In this case, traditional serial interface circuits
Since there is no means for detecting the start bit, the transfer data line is shifted to the data input terminal SI as shown in FIG.
In addition, it is also connected to the general-purpose interrupt input terminal INT, and when it detects that serial data is being transmitted by an interrupt generated by a start bit, the serial interface circuit is activated by software and the serial data following the start bit is transferred to shift register 3. Although it has been possible to receive the start-stop synchronized transfer data D, it has the disadvantage that it requires an extra general-purpose interrupt input function, and as a result, the overall performance of the microcomputer must be reduced.
本発明のシリアルインターフェイス回路は、シリアルデ
ータを入力するためのシリアルデータ入力端子と、
前記シリアルデータな格納するシフトレジスタと、
シフトレジスタから出力されたシリアルデータな出力す
るためのシリアルデータ出力端子と、シフトレジスタの
シフトクロックをカウントし、ソフトレジスタの段数針
、シフトクロックをカウントすると、転送完了信号を出
力するシフトクロックカウンタと、
シフトクロックをシフトレジスタへ出力し、転送完了信
号が入力されると閉じるシフトクロック転送ゲートと、
シリアルデータ入力端子に接続されシリアルデータのレ
ベル変化を検出するエツジ検出回路と、最初、エツジ検
出回路の検出信号を選択し、その後外部からのソフトウ
ェア制御信号によりシフトクロックカウンタの転送完了
信号を選択する選択回路と、
選択回路の選択信号を入力して、割込信号を発生する割
込発生回路とを有する。The serial interface circuit of the present invention includes: a serial data input terminal for inputting serial data; a shift register for storing the serial data; a serial data output terminal for outputting the serial data output from the shift register; A shift clock counter that counts the shift clock of the shift register, counts the number of stages of the soft register, and outputs a transfer completion signal when the shift clock is counted, and a shift clock counter that outputs the shift clock to the shift register and closes when the transfer completion signal is input. A shift clock transfer gate, an edge detection circuit that is connected to the serial data input terminal and detects level changes in the serial data, and a detection signal of the edge detection circuit is first selected, and then the shift clock counter is controlled by an external software control signal. It has a selection circuit that selects a transfer completion signal, and an interrupt generation circuit that receives the selection signal of the selection circuit and generates an interrupt signal.
すなわち、本発明は、シリアルインターフェイス機能に
本来、データ受信完了判断のために具備されていた割込
発生回路をスタートヒツト検出と共用することにより、
調歩同期転送信号受信時に5、他の汎用割込端子を使用
する必要をなくしたものである。That is, the present invention shares the interrupt generation circuit originally provided in the serial interface function for determining the completion of data reception with the start hit detection.
5. This eliminates the need to use other general-purpose interrupt terminals when receiving an asynchronous transfer signal.
次に、本発明の実施例について図面を参照して説明する
。Next, embodiments of the present invention will be described with reference to the drawings.
第1図は本発明のシリアルインターフェイス回路の一実
施例のブロック図、第2図はそのタイムチャートである
。FIG. 1 is a block diagram of an embodiment of the serial interface circuit of the present invention, and FIG. 2 is a time chart thereof.
本実施例は、第3図の従来例の回路において、シリアル
データのレベル変化を検出するエツジ検出回路16と、
最初はエツジ検出回路16の出力を選択し、割込信号1
2の発生後は外部からのソフトウェア制御信号14によ
りシフトクロックカウンタ10を選択する選択回路17
を備えたものである。In this embodiment, in the conventional circuit shown in FIG. 3, an edge detection circuit 16 for detecting a level change of serial data,
Initially, the output of the edge detection circuit 16 is selected, and the interrupt signal 1
2, a selection circuit 17 selects the shift clock counter 10 by an external software control signal 14.
It is equipped with the following.
次に、本実施例の動作を第2図のタイムチャートを用い
て説明する。Next, the operation of this embodiment will be explained using the time chart of FIG.
今、従来と同様にソフトウェア処理にて調歩同期転送信
号の受信をする場合を考える。本実施例ではシリアルデ
ータはシフトデータ入力端子lのみに入力されており、
また最初割込信号発生回路13の入力は選択回路17に
より、エツジ検出回路16側の信号15を選択している
とする。ここでシリアルデータ信号がハイレベルからロ
ーレベルに変化し、スタートビットを転送してきた場合
、この変化がエツジ検出回路16により検出される。Now, let us consider the case where a start-stop synchronization transfer signal is received by software processing as in the conventional case. In this embodiment, serial data is input only to the shift data input terminal l,
It is also assumed that the signal 15 on the edge detection circuit 16 side is initially selected by the selection circuit 17 as the input to the interrupt signal generation circuit 13. Here, when the serial data signal changes from high level to low level and a start bit is transferred, this change is detected by the edge detection circuit 16.
この検出信号15は選択回路17を通ってそのまま割込
信号発生回路13の入力信号となり、割込信号12を発
生する。この割込信号12によりソフトウェアでシフト
動作を開始すべく内部クロック5およびソフトウェア制
御信号14を発生する。This detection signal 15 passes through the selection circuit 17 and directly becomes an input signal to the interrupt signal generation circuit 13, which generates the interrupt signal 12. This interrupt signal 12 generates an internal clock 5 and a software control signal 14 to start a shift operation by software.
ソフトウェア制御信号14により割込信号発生回路13
のリセットおよび選択回路17の切り換えが行なわれ、
割込信号発生回路13の入力信号をシフトクロックカウ
ンタ10の側の出力信号11にする。この状態で、シフ
トクロック6により順次リアルデータ入力端子lよりシ
リアルデータの受信を行ない、8ビツト入力した時点で
シフトクロックカウンタ10の出力信号11がアクティ
ブとなり、シフトクロック転送ゲート8によるシフト動
作の停止および割込信号12の発生が行なわれる。割込
信号12によりソフトウェアでシフトレジスタ3の内容
の処理を行ない、同時にソフトウェア制御信号9により
割込信号発生回路13゜エツジ検出回路16のイニシャ
ライズが行なわれる。Interrupt signal generation circuit 13 by software control signal 14
is reset and the selection circuit 17 is switched,
The input signal of the interrupt signal generation circuit 13 is made into the output signal 11 of the shift clock counter 10 side. In this state, the shift clock 6 sequentially receives serial data from the real data input terminal l, and when 8 bits are input, the output signal 11 of the shift clock counter 10 becomes active, and the shift operation by the shift clock transfer gate 8 is stopped. Then, an interrupt signal 12 is generated. The interrupt signal 12 causes software to process the contents of the shift register 3, and at the same time, the software control signal 9 initializes the interrupt signal generation circuit 13 and the edge detection circuit 16.
以上、一連の動作により、調歩同期転送信号の受信が完
了する。Through the above series of operations, reception of the asynchronous transfer signal is completed.
以上説明したように本発明は、シリアルインターフェイ
ス機能に本来、データ受信完了判断のために具備されて
いた割込発生回路をスタートビット検出と共用すること
により、調歩同期転送信号受信時に、他の汎用割込端子
を使用する必要がなく、非常に少ない付加回路でマイク
ロコンピュータの機能の使用効率を向上できる効果があ
る。As explained above, the present invention shares the interrupt generation circuit, which was originally provided in the serial interface function for determining the completion of data reception, with the start bit detection, so that when receiving an asynchronous transfer signal, other general-purpose There is no need to use interrupt terminals, and the efficiency of using microcomputer functions can be improved with a very small number of additional circuits.
第1図は本発明のシリアルインターフェイス回路の一実
施例のブロック図、第2図は第1図の各部信号のタイム
チャート、第3図はシリアルインターフェイス回路の従
来例のブロック図、第4図は第3図の各部信号のタイム
チャート、第5図は従来のシリアルインターフェイス回
路を使用して調歩同期転送信号を受信する時の結線図で
ある。
1・・・・・・シリアルデータ入力端子、2・・・・・
・シリアルデータ出力端子、3・・・・・・シフトレジ
スタ、4・・・・・・外部クロック、5・・・・・・内
部クロック、6・・・・・・シフトクロック、7・・・
・・・シフトクロック選択回路、8・・・・・・シフト
クロック転送ゲート、9.14・・・・・・ソフトウェ
ア制御信号、10・・・・・・シフトクロックカウンタ
、11・・・・・・転送完了信号、12・・・・・・割
込信号、13・・・・・・割込信号発生回路、15・・
・・・・エツジ検出回路出力信号、16・・・・・・エ
ツジ検出回路、17・・・・・・選択回路。Fig. 1 is a block diagram of an embodiment of the serial interface circuit of the present invention, Fig. 2 is a time chart of signals of each part in Fig. 1, Fig. 3 is a block diagram of a conventional example of the serial interface circuit, and Fig. 4 is FIG. 3 is a time chart of various signals, and FIG. 5 is a connection diagram when receiving an asynchronous transfer signal using a conventional serial interface circuit. 1... Serial data input terminal, 2...
・Serial data output terminal, 3...Shift register, 4...External clock, 5...Internal clock, 6...Shift clock, 7...
...Shift clock selection circuit, 8...Shift clock transfer gate, 9.14...Software control signal, 10...Shift clock counter, 11...・Transfer completion signal, 12...Interrupt signal, 13...Interrupt signal generation circuit, 15...
... Edge detection circuit output signal, 16 ... Edge detection circuit, 17 ... Selection circuit.
Claims (1)
子と、 前記シリアルデータを格納するシフトレジスタと、 シフトレジスタから出力されたシリアルデータを出力す
るためのシリアルデータ出力端子と、シフトレジスタの
シフトクロックをカウントし、シフトレジスタの段数分
、シフトクロックをカウントすると、転送完了信号を出
力するシフトクロックカウンタと、 シフトクロックをシフトレジスタへ出力し、転送完了信
号が入力すると閉じるシフトクロック転送ゲートと、 シリアルデータ入力端子に接続されシリアルデータのレ
ベル変化を検出するエッジ検出回路と、最初、エッジ検
出回路の検出信号を選択し、その後外部からのソフトウ
ェア制御信号によりシフトクロックカウンタの転送完了
信号を選択する選択回路と、 選択回路の選択信号を入力して、割込信号を発生する割
込発生回路とを有するシリアルインターフェイス回路。[Claims] A serial data input terminal for inputting serial data, a shift register for storing the serial data, a serial data output terminal for outputting the serial data output from the shift register, and a shift register. A shift clock counter that outputs a transfer completion signal after counting the shift clocks for the number of stages of the shift register, and a shift clock transfer gate that outputs the shift clock to the shift register and closes when the transfer completion signal is input. and an edge detection circuit that is connected to the serial data input terminal and detects level changes in the serial data.First, the detection signal of the edge detection circuit is selected, and then the transfer completion signal of the shift clock counter is selected by an external software control signal. A serial interface circuit comprising: a selection circuit that selects a selection; and an interrupt generation circuit that receives a selection signal of the selection circuit and generates an interrupt signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2122132A JPH0333962A (en) | 1990-05-11 | 1990-05-11 | Serial interface circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2122132A JPH0333962A (en) | 1990-05-11 | 1990-05-11 | Serial interface circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0333962A true JPH0333962A (en) | 1991-02-14 |
Family
ID=14828412
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2122132A Pending JPH0333962A (en) | 1990-05-11 | 1990-05-11 | Serial interface circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0333962A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002215569A (en) * | 2001-01-19 | 2002-08-02 | Mitsubishi Electric Corp | Input/output device |
-
1990
- 1990-05-11 JP JP2122132A patent/JPH0333962A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002215569A (en) * | 2001-01-19 | 2002-08-02 | Mitsubishi Electric Corp | Input/output device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7051194B2 (en) | Self-synchronous transfer control circuit and data driven information processing device using the same | |
US5901321A (en) | Apparatus and method for interrupt processing in a code division multiple access switching apparatus | |
JPH0333962A (en) | Serial interface circuit | |
JPH11194152A (en) | Semiconductor integrated circuit | |
JPH07182863A (en) | Internal address generation circuit | |
JPH0546535A (en) | Data transfer interface device | |
JP2564812B2 (en) | Counting circuit | |
JP3412927B2 (en) | Frame synchronization circuit | |
JP3310482B2 (en) | Microcomputer | |
JP2870242B2 (en) | Competitive synchronization protection circuit | |
JP2508291B2 (en) | Serial input / output circuit | |
JPH02202738A (en) | Serial data receiving circuit | |
JP2973613B2 (en) | Programmable counter | |
JPH06124257A (en) | Serial input and output control circuit | |
JPS6111803Y2 (en) | ||
JPS59211317A (en) | Flip-flop | |
JPH0683583A (en) | Pipeline arithmetic operation circuit | |
JPH02146842A (en) | Serial interface circuit | |
JPH02130020A (en) | Delay circuit | |
JPS6350133A (en) | Start-stop synchronizing circuit | |
JPH10124455A (en) | Serial communication circuit | |
JPH11186997A (en) | Slip control processing circuit | |
JPH0650856B2 (en) | Digital signal latch circuit | |
JPH09171060A (en) | Semiconductor integrated circuit | |
JP2001043066A (en) | Adder circuit reset system |