JPH01298816A - Serial interface circuit - Google Patents

Serial interface circuit

Info

Publication number
JPH01298816A
JPH01298816A JP63129753A JP12975388A JPH01298816A JP H01298816 A JPH01298816 A JP H01298816A JP 63129753 A JP63129753 A JP 63129753A JP 12975388 A JP12975388 A JP 12975388A JP H01298816 A JPH01298816 A JP H01298816A
Authority
JP
Japan
Prior art keywords
data
shift register
bit
serial
latch circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP63129753A
Other languages
Japanese (ja)
Inventor
Mikio Saito
齋藤 幹雄
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
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP63129753A priority Critical patent/JPH01298816A/en
Publication of JPH01298816A publication Critical patent/JPH01298816A/en
Pending legal-status Critical Current

Links

Landscapes

  • Shift Register Type Memory (AREA)

Abstract

PURPOSE:To halve bit number of a shift register by detecting the transmission of bit number being a half the bit number of a serial data and transferring a data fetched in a latch circuit at the point of time to the shift register so as to send the serial data. CONSTITUTION:Only a data in n-bit being a half of 2n-bit among the data in 2n-bit to be transferred is stored in a shift register 1, the remaining data in n-bit is stored once in latch circuits 3a-3d and transferred to the shift register 1 after the transfer operation of n-bit in the shift register 1 is finished. That is, since the shift register 1 processes the data to be transferred by a half each, the number of stages by a half bit number has only to be prepared to a data length of the serial data. Thus, the shift register 1 is constituted by a fewer number of stages than a conventional stage number, the hardware is reduced and the chip area is decreased.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明はパラレルデータをシリアルデータに変換するシ
リアルインターフェイス回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a serial interface circuit that converts parallel data to serial data.

[従来の技術] 近時、マイクロコンピュータ等のデジタルデータを取扱
うLSIを備えた装置では、装置内部でのLSI相互間
の内部配線数を低減させるため、LSI相互のデータ転
送をシリアル転送により行うようにしている。また、装
置外部とのデータ転送にも同様の理由でシリアル転送方
式の利用が増加している。このため、最近のLSIの多
くのものには、シリアルインターフェイス回路が搭載さ
れている。
[Prior Art] Recently, in devices equipped with LSIs that handle digital data, such as microcomputers, in order to reduce the number of internal wiring between the LSIs within the device, data transfer between the LSIs is performed by serial transfer. I have to. Further, for the same reason, the use of serial transfer methods is increasing for data transfer with the outside of the device. For this reason, many recent LSIs are equipped with a serial interface circuit.

第3図は、このような従来のシリアルインターフェイス
回路の構成を示す図である。
FIG. 3 is a diagram showing the configuration of such a conventional serial interface circuit.

なお、ここで°は8ビットのデータを取り扱うシリアル
インターフェイス回路を例示している。この回路は基本
的には、8ビットのシフトレジスタ31と、このシフト
レジスタ31の出力段に設けられな1ビットのラッチ回
路32と、シリアルクロッ2信号CKをカウントするカ
ウンタ33とを備えて構成されている。シフトレジスタ
31は、1ビットのフリップフロップ回路34を8段接
続して構成されている。このシフトレジスタ31は、デ
ータ書込み信号WDがハイレベルのとき、データバスD
B上のデータを各フリップフロップ回路34に並列に取
込み、その後、シリアルクロック信号CKに同期して各
フリップフロップ回路34の保持データを1ビットづつ
シフトし、ラッチ回路32に出力する。ラッチ回路32
に与えられたシリアルデータはシリアルデータ出力端子
SOから出力される。シリアルクロック信号CKは、カ
ウンタ33によりカウントされる。シリアルクロック信
号CKが7個カウントされると、ANDゲート35の出
力がハイレベルとなるので、この信号を用いてシリアル
データ送信完了の割込み要求信号等が発生される。
Note that here, ° indicates a serial interface circuit that handles 8-bit data. This circuit basically includes an 8-bit shift register 31, a 1-bit latch circuit 32 that is not provided at the output stage of the shift register 31, and a counter 33 that counts the serial clock 2 signal CK. has been done. The shift register 31 is constructed by connecting eight stages of 1-bit flip-flop circuits 34. This shift register 31 operates on the data bus D when the data write signal WD is at high level.
The data on B is taken into each flip-flop circuit 34 in parallel, and then the data held in each flip-flop circuit 34 is shifted one bit at a time in synchronization with the serial clock signal CK, and is output to the latch circuit 32. Latch circuit 32
The serial data given to is output from the serial data output terminal SO. The serial clock signal CK is counted by the counter 33. When seven serial clock signals CK are counted, the output of the AND gate 35 becomes high level, and this signal is used to generate an interrupt request signal indicating the completion of serial data transmission.

シフトレジスタ31を構成する1段目の1ビットのフリ
ップフロップ回路34は、例えば、第4図に示すように
マスタラッチ回路4oとスレーブラッチ回路41とで構
成されている。
The first stage 1-bit flip-flop circuit 34 constituting the shift register 31 includes, for example, a master latch circuit 4o and a slave latch circuit 41, as shown in FIG.

データ書込みの際には、シリアルクロック信号CKがハ
イレベル、つまり、インバータ36の出力信号(G1)
がローレベルのときにデータ書込み信号WD (G2)
をハイレベルにする。これにより、トランスファゲート
42がオン状態、トランスファゲート43がオフ状態と
なり、更に、トランスファゲート44がオン状態となる
ので、データバスDB上の書込みデータPDi (D2
 )がインバータ45,46.47.48を介して取込
まれる。シリアルクロック信号CKがローレベルになる
と、トランスファゲート44がオフ状態、トランスファ
ゲート49がオン状態となるので、インバータ47.4
8によりデータが保持される。
When writing data, the serial clock signal CK is at high level, that is, the output signal (G1) of the inverter 36
When data write signal WD (G2) is at low level
to a high level. As a result, the transfer gate 42 is turned on, the transfer gate 43 is turned off, and the transfer gate 44 is turned on, so write data PDi (D2
) are taken in via inverters 45, 46, 47, 48. When the serial clock signal CK becomes low level, the transfer gate 44 is turned off and the transfer gate 49 is turned on, so that the inverter 47.4
8 holds the data.

データのシリアル転送時においては、データ書込み信号
WDをローレベルにする。これにより、トランスファゲ
ート42がオフ状態となり、シリアルクロック信号CK
に同期にしたトランスファゲート43を介しての前段フ
リップフロップ回路のデータS D +−tの取込みと
、インバータ45゜46、トランスファゲート59.6
0のループによるデータの保持とを繰返し、マスタラッ
チ回路40とスレーブラッチ回路41とに順次データが
シフトされてシフト動作が行われる。
During serial data transfer, data write signal WD is set to low level. As a result, the transfer gate 42 is turned off, and the serial clock signal CK
Taking in the data S D +-t of the previous stage flip-flop circuit via the transfer gate 43 synchronized with the inverter 45°46 and transfer gate 59.6
The data is held in a 0 loop repeatedly, and the data is sequentially shifted to the master latch circuit 40 and the slave latch circuit 41, and a shift operation is performed.

[発明が解決しようとする課題] しかしながら、上述した従来のシリアルインターフェイ
ス回路は、第4図に示したようにシフトレジスタの各フ
リップフロップ回路を構成する素子数が比較的多く、シ
リアルデータのデータ長が長くなるとシフトレジスタの
ビット数も増加し、LSI化する場合のハードウェア量
が増加してチップ面積が増大するという欠点がある。
[Problems to be Solved by the Invention] However, the conventional serial interface circuit described above has a relatively large number of elements constituting each flip-flop circuit of the shift register, as shown in FIG. As the number of bits increases, the number of bits of the shift register also increases, which results in an increase in the amount of hardware required when integrated into an LSI, resulting in an increase in chip area.

本発明はかかる問題点に鑑みてなされたものであって、
シリアルデータのデータ長が長い場合でもシフトレジス
タを少ない段数で構成でき、ハードウェア量の低減、延
いてはチップ面積の縮小を図ることができるシリアルイ
ンターフェイス回路を提供することを目的とする。
The present invention has been made in view of such problems, and includes:
It is an object of the present invention to provide a serial interface circuit that can configure a shift register with a small number of stages even when the data length of serial data is long, and can reduce the amount of hardware and, by extension, the chip area.

[課題を解決するための手段] 本発明に係るシリアルインターフェイス回路は、シリア
ル転送すべき2n(nは自然数)ビットのデータのうち
、上位又は下位のnビットのデータを記憶するラッチ回
路と、前記シリアル転送すべき2nビットのデータのう
ち、前記ラッチ回路に記憶されない残りのnビットのデ
ータを記憶し、シリアルクロック信号に同期してシフト
動作を行うと共に、n回のシフト動作が終了した後前記
ラッチ回路に記憶されたnビットのデータを並列的に入
力し、前記シリアルクロック信号に同期してシフト動作
を行うシフトレジスタと、前記シリアルクロック信号を
計数するカウンタと、このカウンタがn個の前記シリア
ルクロック信号を計数したことを検出し、前記ラッチ回
路から前記シフトレジスタへのデータの供給タイミング
を与える論理回路とを備えたことを特徴とする。
[Means for Solving the Problem] A serial interface circuit according to the present invention includes a latch circuit that stores upper or lower n bits of data of 2n (n is a natural number) bits to be serially transferred; Of the 2n bits of data to be serially transferred, the remaining n bits of data that are not stored in the latch circuit are stored, and a shift operation is performed in synchronization with the serial clock signal, and after the n shift operations are completed, the remaining n bits of data that are not stored in the latch circuit are stored. a shift register that inputs n-bit data stored in a latch circuit in parallel and performs a shift operation in synchronization with the serial clock signal; a counter that counts the serial clock signal; The present invention is characterized by comprising a logic circuit that detects counting of serial clock signals and provides timing for supplying data from the latch circuit to the shift register.

[作用] 本発明によれば、転送すべき2nビットのデータのうち
、その半分のnビットのデータのみシフトレジスタに格
納し、残りのnビットのデータは−旦ラッチ回路に格納
し、シフトレジスタのnビットの転送動作が完了した後
シフトレジスタへ転送するようにしている。つまり、シ
フトレジスタは転送すべきデータを半分づつ処理するの
で、シリアルデータのデータ長に対し、半分のビット数
分だけの段数を備えていればよい。このため、シフトレ
ジスタを従来よりも少ない段数で構成でき、ハードウェ
ア量の低減、チップ面積の縮小を図ることができる。
[Operation] According to the present invention, of the 2n-bit data to be transferred, only half of the n-bit data is stored in the shift register, and the remaining n-bit data is stored in the latch circuit and then transferred to the shift register. After the n-bit transfer operation is completed, the data is transferred to the shift register. In other words, since the shift register processes the data to be transferred one half at a time, it is sufficient to provide the number of stages equal to half the number of bits for the data length of the serial data. Therefore, the shift register can be configured with a smaller number of stages than conventional ones, and the amount of hardware and chip area can be reduced.

[実施例] 次に、本発明の実施例について添付の図面を参照して具
体的に説明する。
[Example] Next, an example of the present invention will be specifically described with reference to the accompanying drawings.

第1図は本発明の実施例に係るシリアルインターフェイ
ス回路のブロック図である。なお、ここでは8ビットの
シリアルデータを扱う場合について説明しているが、本
発明は偶数ビットであれば何ビットのデータでも扱える
ことはいうまでもない。
FIG. 1 is a block diagram of a serial interface circuit according to an embodiment of the present invention. Although the case where 8-bit serial data is handled is explained here, it goes without saying that the present invention can handle data of any number of bits as long as it is an even number of bits.

このシリアルインターフェイス回路は、4ビットのシフ
トレジスタ1と、このシフトレジスタ1の出力段に設け
られた1ビットのラッチ回路2と、4ビットのデータを
保持するために配設された4つのラッチ回路3a、3b
、3c、3dと、シリアルクロック信号CKをカウント
するカウンタ4とを主体に構成されている。シフトレジ
スタ1は、第4図に示したような構成のマスタラッチ回
路6i (i=a、b、c、又はd、以下同じ)とスレ
ーブラッチ回路71とを縦続接続してなる1ビットフリ
ツプフロツプを4段接続して構成されている。マスタラ
ッチ回路61とスレーブラッチ回路71との間には、通
常のシフト動作時にマスタラッチ回路61の出力をスレ
ーブラッチ回路71に導くトランスファゲート81が介
挿されている。
This serial interface circuit consists of a 4-bit shift register 1, a 1-bit latch circuit 2 provided at the output stage of this shift register 1, and 4 latch circuits arranged to hold 4-bit data. 3a, 3b
, 3c, 3d, and a counter 4 for counting the serial clock signal CK. The shift register 1 is a 1-bit flip-flop formed by cascading a master latch circuit 6i (i=a, b, c, or d, the same applies hereinafter) configured as shown in FIG. 4 and a slave latch circuit 71. It consists of four stages connected. A transfer gate 81 is inserted between master latch circuit 61 and slave latch circuit 71 to guide the output of master latch circuit 61 to slave latch circuit 71 during normal shift operation.

また、ラッチ回路31とスレーブラッチ回路71との間
には、ラッチ回路3a乃至3dの保持データのシフトレ
ジスタ1への転送時にラッチ回路31の出力をスレーブ
ラッチ回路71に導くトランスファゲート91が介挿さ
れている。シリアルクロック信号CKはスレーブラッチ
回路7a乃至7dのクロック信号として与えられると共
に、インバータ10を介してマスタラッチ回路6a乃至
6dのクロック信号として与えられている。また、この
シリアルクロック信号CKはカウンタ4に与えられてい
る。NORゲート11とANDゲート12は、カウンタ
4の出力が“100”、即ち“4”になったことを検出
する論理回路である。この論理回路の出力は、トランス
フアゲ−)9a乃至9dの制御信号として与えられると
共に、インバータ13を介してトランスファゲート8a
乃至8dの制御信号として与えられている。また、AN
Dゲート14はカウンタ4の出力が“111”、即ち“
7″となったことを検出した信号を出力する。
Further, a transfer gate 91 is inserted between the latch circuit 31 and the slave latch circuit 71 to guide the output of the latch circuit 31 to the slave latch circuit 71 when the data held in the latch circuits 3a to 3d is transferred to the shift register 1. has been done. Serial clock signal CK is provided as a clock signal to slave latch circuits 7a to 7d, and is also provided via inverter 10 as a clock signal to master latch circuits 6a to 6d. Further, this serial clock signal CK is given to the counter 4. The NOR gate 11 and the AND gate 12 are logic circuits that detect when the output of the counter 4 becomes "100", that is, "4". The output of this logic circuit is given as a control signal to transfer gates 9a to 9d, and is also provided as a control signal to transfer gates 8a to 9d via an inverter 13.
It is given as a control signal of 8d to 8d. Also, AN
The D gate 14 detects that the output of the counter 4 is "111", that is, "
7'' is detected and outputs a signal.

以上のように構成された本実施例に係るシリアルインタ
ーフェイス回路のタイムチャートを第2図に示す。デー
タ書込み信号WDがハイレベルになると、データバスD
B上の8ビットのデータのうち、上位(又は下位)4ビ
ットのデータがシフトレジスタ1へ格納され、残りの下
位(又は上位)4ビットのデータがラッチ回路3a乃至
3dへ取込まれる。その後、シリアルクロック信号CK
が入力されると、これに同期してシフトレジスタ1の内
容は、1ビットづつシフトされ、ラッチ回路2を介して
シリアルデータ出力端子SOから出力される。同時にカ
ウンタ4はこのシリアルクロック信号CKをカウントす
る。シリアルクロック信号CKが4回発生したときには
カウンタ4の出力が“100”となり、ANDゲート1
2の出力がハイレベル、従って、インバータ13の出力
がローレベルとなり、トランスファゲート8a乃至8d
がオフ状態、トランスファゲート9a乃至9dがオン状
態となるので、シフトレジスタ1のマスク側のデータを
スレーブ側へ転送することを禁止し、ラッチ回路3a乃
至3dの内容をシフトレジスタ1のスレーブ側へ転送し
、シリアルデータの下位(又は上位)4ビットの送信を
続行する。シリアルクロッグ信号CKが7回発生したと
きにはカウンタ4の出力値は“111”となり、AND
ゲート14の出力がハイレベルとなる。この信号を用い
てシリアルデータ送信完了の割込み要求の信号等が発生
される。
FIG. 2 shows a time chart of the serial interface circuit according to this embodiment configured as described above. When the data write signal WD becomes high level, the data bus D
Of the 8-bit data on B, the upper (or lower) 4 bits of data are stored in the shift register 1, and the remaining lower (or upper) 4 bits of data are taken into the latch circuits 3a to 3d. After that, the serial clock signal CK
When is input, the contents of the shift register 1 are shifted one bit at a time in synchronization with this, and are outputted from the serial data output terminal SO via the latch circuit 2. At the same time, counter 4 counts this serial clock signal CK. When the serial clock signal CK is generated four times, the output of the counter 4 becomes "100", and the AND gate 1
The output of inverter 2 becomes high level, therefore the output of inverter 13 becomes low level, and transfer gates 8a to 8d
is off and transfer gates 9a to 9d are on, prohibiting data on the mask side of shift register 1 from being transferred to the slave side and transferring the contents of latch circuits 3a to 3d to the slave side of shift register 1. and continue transmitting the lower (or upper) 4 bits of serial data. When the serial clock signal CK is generated seven times, the output value of the counter 4 becomes "111", and the AND
The output of gate 14 becomes high level. This signal is used to generate an interrupt request signal for completion of serial data transmission.

[発明の効果] 以上説明したように本発明は、送信するシリアルデータ
の上位又は下位半分がシフトレジスタへ格納され、残り
の半分が別のラッチ回路に取込まれる。そして、送信を
開始し、シリアルデータのビット数の半分のビット数が
送信されたことを検知して、その時点で前述のラッチ回
路に一取込まれているデータをシフトレジスタへ転送し
、シリアルデータを送信するようにしている。このため
、シフトレジスタのビット数を半分にすることができ、
ハードウェア量の低減、延いてはチップ面積の縮小化を
図ることができるという効果がある。
[Effects of the Invention] As described above, in the present invention, the upper or lower half of the serial data to be transmitted is stored in the shift register, and the remaining half is taken into another latch circuit. Then, it starts transmission, detects that half the number of bits of the serial data has been transmitted, and at that point transfers the data that has been captured in the aforementioned latch circuit to the shift register, and I am trying to send data. Therefore, the number of bits in the shift register can be halved,
This has the effect of reducing the amount of hardware and, by extension, reducing the chip area.

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

第1図は本発明の実施例に係るシリアルインターフェイ
ス回路のブロック図、第2図は同回路の動作時のタイミ
ング図、第3図は従来例のシリアルインターフェイス回
路のブロック図、第4図は同回路におけるシフトレジス
タの詳細回路図である。 1.31:シフトレジスタ、2,3a乃至3d。 32;ラッチ回路、4.33;カウンタ、6a乃至6d
、40;マスタラッチ回路、7a乃至7d。 41;スレーブラッチ回路、8a乃至8d、9a乃至9
d、42乃至44,49,59,60;)ランスファゲ
ート
FIG. 1 is a block diagram of a serial interface circuit according to an embodiment of the present invention, FIG. 2 is a timing diagram during operation of the same circuit, FIG. 3 is a block diagram of a conventional serial interface circuit, and FIG. 4 is the same. FIG. 3 is a detailed circuit diagram of a shift register in the circuit. 1.31: Shift register, 2, 3a to 3d. 32; Latch circuit, 4.33; Counter, 6a to 6d
, 40; master latch circuits, 7a to 7d. 41; Slave latch circuit, 8a to 8d, 9a to 9
d, 42 to 44, 49, 59, 60;) transferate

Claims (1)

【特許請求の範囲】[Claims] (1)シリアル転送すべき2n(nは自然数)ビットの
データのうち、上位又は下位のnビットのデータを記憶
するラッチ回路と、前記シリアル転送すべき2nビット
のデータのうち、前記ラッチ回路に記憶されない残りの
nビットのデータを記憶し、シリアルクロック信号に同
期してシフト動作を行うと共に、n回のシフト動作が終
了した後前記ラッチ回路に記憶されたnビットのデータ
を並列的に入力し、前記シリアルクロック信号に同期し
てシフト動作を行うシフトレジスタと、前記シリアルク
ロック信号を計数するカウンタと、このカウンタがn個
の前記シリアルクロック信号を計数したことを検出し、
前記ラッチ回路から前記シフトレジスタへのデータの供
給タイミングを与える論理回路とを備えたことを特徴と
するシリアルインターフェイス回路。
(1) A latch circuit that stores the upper or lower n bits of data of 2n bits (n is a natural number) to be serially transferred; The remaining n bits of data that are not stored are stored, a shift operation is performed in synchronization with the serial clock signal, and after the n shift operations are completed, the n bits of data stored in the latch circuit are input in parallel. a shift register that performs a shift operation in synchronization with the serial clock signal, a counter that counts the serial clock signal, and detects that the counter has counted n serial clock signals;
A serial interface circuit comprising: a logic circuit that provides timing for supplying data from the latch circuit to the shift register.
JP63129753A 1988-05-27 1988-05-27 Serial interface circuit Pending JPH01298816A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63129753A JPH01298816A (en) 1988-05-27 1988-05-27 Serial interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63129753A JPH01298816A (en) 1988-05-27 1988-05-27 Serial interface circuit

Publications (1)

Publication Number Publication Date
JPH01298816A true JPH01298816A (en) 1989-12-01

Family

ID=15017346

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63129753A Pending JPH01298816A (en) 1988-05-27 1988-05-27 Serial interface circuit

Country Status (1)

Country Link
JP (1) JPH01298816A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0435225A (en) * 1990-05-25 1992-02-06 Totoku Electric Co Ltd Parallel / serial conversion circuit in high resolution crt display device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0435225A (en) * 1990-05-25 1992-02-06 Totoku Electric Co Ltd Parallel / serial conversion circuit in high resolution crt display device

Similar Documents

Publication Publication Date Title
JPS6329276A (en) Logic lsi
JPH01298816A (en) Serial interface circuit
JPH0797308B2 (en) Comparison circuit
US6205192B1 (en) Clock input control circuit
JPH0636054A (en) One-chip microcomputer
JP3504316B2 (en) Multi-bit counter
JPH02105653A (en) Serial interface circuit
JP2692469B2 (en) Data controller
JPH0748664B2 (en) Serial-parallel converter
JP2000353939A (en) Clock signal synchronous flip flop circuit
JPH04132976A (en) Test mode generating circuit
JP2658327B2 (en) Logic circuit
JPH02153451A (en) Bus control system
JPH02181950A (en) System of setting operation mode of semiconductor integrated circuit
JPS62229594A (en) Data idle area detection circuit for fifo circuit
JPH073019U (en) Operation mode setting circuit
JPH01166238A (en) Output control circuit
JPS6339938B2 (en)
JPH0327463A (en) Data transfer circuit
JPH0326976A (en) Test apparatus of semiconductor integrated circuit
JPH05100778A (en) Semiconductor output circuit
JPH0628151A (en) Parallel latch circuit for serial data
JPH03292698A (en) Shift register circuit
JPS6356741A (en) Test circuit
JPH01112182A (en) Mode setting circuit