JPH04149759A - Serial transmission circuit - Google Patents

Serial transmission circuit

Info

Publication number
JPH04149759A
JPH04149759A JP2276972A JP27697290A JPH04149759A JP H04149759 A JPH04149759 A JP H04149759A JP 2276972 A JP2276972 A JP 2276972A JP 27697290 A JP27697290 A JP 27697290A JP H04149759 A JPH04149759 A JP H04149759A
Authority
JP
Japan
Prior art keywords
serial transmission
data
output
state
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
Application number
JP2276972A
Other languages
Japanese (ja)
Inventor
Seiji Watanabe
誠司 渡辺
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2276972A priority Critical patent/JPH04149759A/en
Publication of JPH04149759A publication Critical patent/JPH04149759A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)
  • Dc Digital Transmission (AREA)

Abstract

PURPOSE:To prevent a holding time from being shortened by automatically adjusting the holding time to a time almost equal to a time required from the n-th trailing edge of a serial transmission clock up to the n-th leading edge. CONSTITUTION:The 'L' state time width of a serial transmission clock is converted into the count data of an UP/DOWN counter 5 and the counter 5 counts down its contents by the succeeding 'H' state. The '0' state of the count data is detected by a data '0' detecting circuit 6, only when and the final leading edge of the serial transmission clock is detected by a serial transmission clock counter 3, the data '0' detection timing of the counter 5 is utilized. Consequently, the holding time can be automatically adjusted to the time width almost equal to an 'L' state time immediately before the final leading edge of the serial transmission clock and the receiving side of serial data can surely receive the data independently of a clock period.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、シリア)L送信クロックが“1.”状態のと
き専用のアップダウンカウンタにより一定周期のりし】
ツクを初期値Oでカウントアツプして前記シリアノ1送
信り[]ツタの“L゛状態時間を前記アップダウンカウ
ンタのカウントデータに変換し5、前記シリアノ1送信
りUツクが“F(”状態のとき、前記アップダウンカウ
ンタを前記カウントデータを初期値として)1ウント・
ダウンさせカウントデータが“0”になる状態を検出す
ることにより前記シ’、、l 7 )L送信り1]ツク
が“H”状態の時間が、直前のシリアル送信クロックの
“L”状態の時間と等し、1くなるタイミングを検出し
2、最終ビットのシリI′ル送信データの、シリアル送
信クロックの最終の立上、りのタイミングからの、出力
保持時間(以後ホールドタイムと称する)を、前記アッ
プダウンカウンタの動作を適用することにより、前記ホ
ールドタイムを、直前のシリアル送信クロックの“L”
状態の時間と同程度に自動調整できるシリアル送信回路
に関するものである。
[Detailed Description of the Invention] Industrial Field of Application The present invention is applicable to serial) when the L transmission clock is in the "1." state, a fixed period is increased by a dedicated up/down counter]
5, count up the Syriano 1 transmission U to the initial value O, convert the "L" state time of the Syriano 1 transmission [] to the count data of the up-down counter 5, and make the Syriano 1 transmission U When , the up/down counter is set to 1 count (with the count data as the initial value).
By detecting the state in which the count data becomes "0", the time when the clock is in the "H" state becomes equal to the "L" state of the previous serial transmission clock. 2. The output holding time (hereinafter referred to as hold time) from the last rising edge of the serial transmission clock of the last bit of serial I' transmission data is detected. By applying the operation of the up/down counter, the hold time is set to "L" of the immediately preceding serial transmission clock.
This invention relates to a serial transmission circuit that can automatically adjust to the same extent as the state time.

従来の技術 従来からマイク「】コンピュータと別のマイクロコンピ
ュータ間のデータ通信、またはマイクロコンピュータと
他のデイシタ几LSI間の送信等で、シリアルデータ転
送か利用されてきている。
2. Description of the Related Art Hitherto, microphones have been used for serial data transfer in data communication between a computer and another microcomputer, or between a microcomputer and another digital LSI.

以下に従来のシリアノl送信回路について説明する。A conventional serial transmission circuit will be described below.

第3図は従来のシリアル送信回路の構成を示すものであ
る。図においてシフトバッファ1は、シリアル送信開始
のためのパルス状信号(以後シリアル送信開始信号と称
する)を、ラッチまたはシフト切換入力部10で受けと
り、前記シリアル開始信号が“IJ”状態でシリアル送
信すべきデータをパラレルにシリアル送信データ入力部
9で受けとってラッチ動作を行ない、前記シリ”rル送
信開始イ、1号が“■゛状態、シリアノ「送信りL」ツ
クをシフトクロッ;2人力部11で受けとり、シフト動
作を行なう、、シフトバッファ力部12からは前記シリ
−1′ル送信り[−]ツツクの立1−りごとに1ビット
ずつシリン′ノ1送信デークが出力される。遅延保持手
段であるDフリップフ「1ツブ2はシフトバッファ出力
部12のシリr几送信データをT−タ入力部13て受け
とり、前記シリアル送信クロックをクロック人力部14
で反転した信号を受けとることにより、前記シリアル送
信クロックの立下りTツクに同期し、て出力部15から
シリアノ1送信デタが出力される。シリアル送信りL]
ツクカウンタz3は前記シリアル送信クロックをり「I
ツク入力部16で受:IJとりぞの立上りJ、ツクをノ
ノウントする。リセット入力部17は前記シリアル送信
開始信号が入力され“H”状態でリセットされる。シリ
ア)l送信クロックカウンタ3の出力部18は。
FIG. 3 shows the configuration of a conventional serial transmitter circuit. In the figure, a shift buffer 1 receives a pulse-like signal for starting serial transmission (hereinafter referred to as a serial transmission start signal) through a latch or shift switching input section 10, and performs serial transmission when the serial start signal is in the "IJ" state. The data to be transmitted is received in parallel by the serial transmission data input section 9, and a latch operation is performed, and the serial number 1 is in the "■" state. The shift buffer output unit 12 outputs the serial '1' transmission data bit by bit at each rising edge of the serial '1' transmission [-] clock. The D flip flop 2, which is a delay holding means, receives the serial transmission data from the shift buffer output section 12 through the T-data input section 13, and outputs the serial transmission clock to the clock input section 14.
By receiving the inverted signal at , the output section 15 outputs serial number 1 transmission data in synchronization with the falling edge of the serial transmission clock. Serial transmission L]
The clock counter z3 receives the serial transmission clock "I".
The tsuku input section 16 outputs the rising edge of the IJ line and the tsuku. The reset input section 17 receives the serial transmission start signal and is reset to the "H" state. Serial) The output section 18 of the transmission clock counter 3 is:

カウンタ3が所定のカウント値に達すると“H”を出力
する。、−ジフトレジスタ38は前記シリアル送信開始
信号をリセット入力部41で受けとり、前記信号が°l
(”状態でリセット・されるが出力部]8の出力をf−
タ入力部39で受けとり、外部から入力されるシリアル
送信クロックより高い周波数のシフ[・クロッ2をシフ
[・クロック入力部40で受けとることにより所定の回
数シフト動作を行ない、シフトデータ人力部39で受け
とった信号に所定の遅延時間を付加し、シフトデータ出
力部42から出力する。ORゲート8はシフトデータ出
力部42およびDフリップフロップの出力部15の出力
信号をそれぞれORゲート入力部28および29へ入力
する。二とによりシリアル送信データ出力としてのOR
ゲート出力部30の論理和出力を得る。
When the counter 3 reaches a predetermined count value, it outputs "H". , - The shift register 38 receives the serial transmission start signal at the reset input 41, and the shift register 38 receives the serial transmission start signal at the reset input section 41, and
(The output part is reset in the “state”)
The shift data input unit 39 receives the shift clock 2, which has a higher frequency than the externally input serial transmission clock, and the shift data input unit 40 performs a shift operation a predetermined number of times. A predetermined delay time is added to the received signal, and the resultant signal is output from the shift data output section 42. The OR gate 8 inputs the output signals of the shift data output section 42 and the output section 15 of the D flip-flop to the OR gate input sections 28 and 29, respectively. OR as serial transmission data output by
The OR output of the gate output section 30 is obtained.

以上のように構成されたシリアル送信回路について、以
下その動作について第4図のタイムチャートを参照しな
がら説明する。
The operation of the serial transmitting circuit configured as described above will be described below with reference to the time chart of FIG. 4.

まず外部からシリアル送信開始信号を入力する。前記信
号が“H”状態でシフトバッファ1にシリアル送信され
るデータのラッチと、シリアル送信クロックカウンタ3
のリセットと、シフトレデスタ38のリセットとが実行
される。シフトバッファ1にシリアル送信されるデータ
がラッチされることによりその出力部12がらはシリア
ル送信の第1ビットめのデータ1が出力される。つぎに
前記シリアル送信開始信号を“L”状態にし、外部から
シリアル送信クロックを入力すると、前記シリアル送信
クロックの立下りエツジのタイミングで、前記シフトバ
ッファ1の出力部12から出力されるデータ1がDフリ
ップフロップ2を通過し、次の立下りエツジのタイミン
グまで保持される。つぎに前記シリアル送信クロックの
立上りエツジのタイミングで前記シフトバッファ1の出
力部12からはシリアル送信データの第2ビット目のデ
ータ2が出力される。シリアル送信クロックの両エツジ
で以後同様の動作が琥り返され、第n−1回目の立上り
エツジで、前記シフトバッファlの出力部12からはシ
リアル送信データの第nビット目のデータnが出力され
る。次の第n回目のシリアル送信クロックの立下りエツ
ジで、前記Dフリップフロップ2の出力部15がら前記
データnが出力され一保持される。
First, input a serial transmission start signal from the outside. A latch for data that is serially transmitted to the shift buffer 1 when the signal is in the “H” state, and a serial transmission clock counter 3.
and the reset of the shift register 38 are executed. By latching the data serially transmitted to the shift buffer 1, the output section 12 outputs data 1, which is the first bit of the serially transmitted data. Next, when the serial transmission start signal is set to the "L" state and a serial transmission clock is input from the outside, data 1 is outputted from the output section 12 of the shift buffer 1 at the timing of the falling edge of the serial transmission clock. It passes through the D flip-flop 2 and is held until the timing of the next falling edge. Next, the second bit data 2 of the serial transmission data is output from the output section 12 of the shift buffer 1 at the timing of the rising edge of the serial transmission clock. The same operation is repeated at both edges of the serial transmission clock, and at the (n-1)th rising edge, the n-th bit data n of the serial transmission data is output from the output section 12 of the shift buffer l. be done. At the next falling edge of the n-th serial transmission clock, the data n is output from the output section 15 of the D flip-flop 2 and held.

一方シリアル送信クロックカウンタ3は、前記シリアル
送信クロックの立上りエツジをカウントし第n回目の立
上りエツジでカウント値はnになる。シリアル送信のビ
ット数をnとすると、シリアル送信カウンタ3の出力部
18は前記シリアル送信開始信号の“H”状態で“L”
状態になった後、前記シリアル送信カウンタ3かカウン
ト値nになるタイミングで“H”状態となる。つぎにシ
フトレジスタ38は前記シリアル送信クロックカウンタ
3の出力部18の出力を外部から入力するシフトクロッ
クにより遅延させる働きをするが、前記シリアル送信開
始信号の“H”状態でリセットをかけるため前記シリア
ル送信クロックカウンタ3の出力部18の出力の立上り
エツジのみ遅延させる働きをする。前記遅延時間を以後
、ホールドタイムと呼ぶ。シフトレジスタ38の出力部
42の出力は、前記シリアル送信クロックカウンタ3の
出力部18の出力の立上り後、前記ホールドタイムの後
立上る。
On the other hand, the serial transmission clock counter 3 counts the rising edge of the serial transmission clock, and the count value becomes n at the nth rising edge. When the number of serial transmission bits is n, the output section 18 of the serial transmission counter 3 becomes "L" when the serial transmission start signal is in the "H" state.
After entering the "H" state, the serial transmission counter 3 becomes "H" at the timing when the count value reaches n. Next, the shift register 38 has the function of delaying the output of the output section 18 of the serial transmission clock counter 3 by a shift clock input from the outside. It functions to delay only the rising edge of the output of the output section 18 of the transmission clock counter 3. The delay time will hereinafter be referred to as hold time. The output of the output section 42 of the shift register 38 rises after the hold time has elapsed after the output of the output section 18 of the serial transmission clock counter 3 rises.

最後に前記Dフリップフロップ2の出力部15の出力と
、前記シフトレジスタ38の出力部42の出力との論理
和をとることによりシリアル送信データ出力30が出力
される。
Finally, the output of the output section 15 of the D flip-flop 2 and the output of the output section 42 of the shift register 38 are logically summed to output the serial transmission data output 30.

発明が解決しようとする課題 しかしながら上記の従来の構成では、ホールドタイムが
固定量であり、外部から断続的にシリアル送信クロック
を受けとり、しかもシリアル送信クロックの周期が短い
場合を考慮すると、前記ホールドタイムを短くせざるを
得ない。ところが、シリアル送信クロックの周期が長く
シリアル送信クロックを遅延させて受信側のクロックお
して使用して当シリアル送信データを受信する側は、前
記最終ビットのデータを受信できなくなる恐れが生じる
という欠点を有していた。
Problems to be Solved by the Invention However, in the conventional configuration described above, the hold time is a fixed amount, and considering the case where the serial transmission clock is intermittently received from the outside and the period of the serial transmission clock is short, the hold time is I have no choice but to shorten it. However, the side that receives the serial transmission data by delaying the serial transmission clock and using it as the receiving side's clock has the disadvantage that the serial transmission clock has a long period and may not be able to receive the last bit of data. Was.

本発明は上記従来の課題を解決するもので、前記ホール
ドタイムを可変量とし、シリアル送信クロックの最終の
立上りの直前のシリアル送信クロックの”L“状態の時
間と同程度の時間になる様に自動調整させることによっ
て、シリアル送信クロックの周期が短い場合も長い場合
もシリアルデータの受信側が確実にデータを受信するこ
とのできるシリアル送信回路を提供することを目的とす
る。
The present invention solves the above-mentioned conventional problems by making the hold time a variable amount so that the hold time is approximately the same as the time in which the serial transmit clock is in the "L" state immediately before the final rise of the serial transmit clock. It is an object of the present invention to provide a serial transmitting circuit which allows a serial data receiving side to reliably receive data by automatic adjustment, regardless of whether the period of a serial transmitting clock is short or long.

課題を解決するための手段 この目的を達成するために本発明のシリアル送信回路は
、シリアル送信開始信号を外部から入力したとき、前記
シリアル送信開始信号が“H”状態で、シリアル送信す
べきデータをパラレルにラッチし、前記シリアル送信開
始信号が“L”状態で、外部から入力されるシリアル送
信クロックの立上りエツジごとに、前記ラッチデータを
1ビットずつシフトさせるためのシフトバッファと、前
記シリアル送信クロックの立下りエツジごとに、前記シ
フトバッファの最終段の出力を遅延させ保持するための
遅延保持手段と、前記シリアル送信開始信号が“H”状
態でリセットされ、前記シリアル送信開始信号が“L”
状態で、前記シリアル送信クロックの立上りエツジでカ
ウントアツプして所定のカウントを行なったとき“H”
を出力するだめのシリアル送信クロックカウンタと、前
記シリアル送信クロックが“L”状態のとき、前記シリ
アル送信クロックの周期よりも充分短い周期の外部から
連続的に入力されるクロックをカウントアツプし、前記
シリアル送信クロックが“H”状態のとき、前記クロッ
クをカウントダウンし、さらにリセット入力部を有する
アップダ1クンカウンタと、前記シリアル送信クロック
の立十−リエツジを検出し前記アップダウンカウンタの
リセット入力部にパルス状のリセット信号を供給するた
めの立下りLツシ検出回路と、前記アップダウンカウン
タのカランI・データを受けとり前記カウントデータが
“O”の状態を検出したとき“)−(”を出力し、それ
以外の状態で“L”を出力するためのデータ“O”の検
出回路と、前記シリアル送信り「〕ツクが“H”状態で
、かつ前記データ“O”の検出回路の出力が“H”状態
で、かつ前記シリアル送信クロックカウンタの出力が“
H”状態のとき、本回路の出力であるシリアル送信デー
タ出力を“1(”状態とし、前記条件以外のとき前記シ
リアル送信データ出力として前記遅延保持手段の出力を
通過させる手段とを備えた構成となっている。
Means for Solving the Problems In order to achieve this object, the serial transmission circuit of the present invention is configured such that when a serial transmission start signal is input from the outside, the serial transmission start signal is in the "H" state, and data to be serially transmitted is transmitted. a shift buffer for latching the latched data in parallel and shifting the latched data bit by bit at each rising edge of the serial transmission clock input from the outside when the serial transmission start signal is in the "L"state; At every falling edge of the clock, the delay holding means for delaying and holding the output of the final stage of the shift buffer and the serial transmission start signal are reset to the "H" state, and the serial transmission start signal is reset to the "L" state. ”
In this state, when a predetermined count is performed by counting up at the rising edge of the serial transmission clock, the signal becomes “H”.
When the serial transmission clock is in the "L" state, a serial transmission clock counter is used to output the serial transmission clock. When the serial transmission clock is in the "H" state, the clock is counted down, and an up/down counter having a reset input section, and a rising edge of the serial transmission clock is detected and applied to the reset input section of the up/down counter. A falling L-edge detection circuit for supplying a pulse-like reset signal, and receiving the run I data of the up/down counter and outputting ")-(" when the count data detects the "O" state. , a data “O” detection circuit for outputting “L” in other states, and an output of the data “O” detection circuit when the serial transmitter “] is in the “H” state and the output of the data “O” detection circuit is “ "H" state, and the output of the serial transmission clock counter is "H" state, and the output of the serial transmission clock counter is "
When the serial transmission data output, which is the output of the circuit, is in the "H" state, the serial transmission data output is set to the "1 (" state), and when the conditions are other than the above, the output of the delay holding means is passed through as the serial transmission data output. It becomes.

作用 この構成によって、前記シリアル送信クロックの“L”
状態の時間幅を、前記アップダウンカウンタのカウント
データに変換し、前記シリアル送信クロックの前記“L
”状態のつぎに来る“H”状態で、前記アップダウン・
カウンタをカウントダウンさせ、さらにそのカウントデ
ータが“O”となる状態を前記データ“0”の検出回路
によって検出し、前記シリアル送信クロックカウンタに
より前記シリアル送信クロックの最終の立上り工、ソジ
を検出したときのみ、前記データ“0”の検出回路によ
る前記アップダウンカウンタのデータ“0”の検出タイ
ミングを利用することにより、前記ホールドタイムを、
前記シリアル送信クロックの最終の立上り直前の“L”
状態の時間幅と同程度の時間幅に自動調整させることが
できる。
Effect: With this configuration, the “L” level of the serial transmission clock
The time width of the state is converted into count data of the up/down counter, and the “L” of the serial transmission clock is
In the “H” state that follows the “H” state, the up-down and
The counter is counted down, and the state in which the count data becomes "O" is detected by the data "0" detection circuit, and the last rising edge of the serial transmission clock is detected by the serial transmission clock counter. By using the detection timing of the data "0" of the up/down counter by the data "0" detection circuit, the hold time is
“L” immediately before the final rise of the serial transmission clock
The time width can be automatically adjusted to be approximately the same as the time width of the state.

実施例 ニス下本発明の実施例について、図面を参照しながら説
明4−る。第1図は本発明の一実施例のシリアJ[送信
回路の構成図である3従来例と同一機能のものIこは同
一符号を付して説明を省略する。図においてアップダウ
ンカウンタ5は、クロック人力部22に外部から入力さ
れるシリアル送信り「〕ツクよりも充分短い一定周期の
り11ツクをカウントする。また−rツブダウン切り換
え人力部23にはシリアル送信クロックを入力し、シリ
アル送信り[〕ツクが“■7”状態のときはアップカウ
ントし、“I−H”状、!!iのときはダウンカウント
する。またリセット入力部21は“■(”状態を入力す
るとリセットされる5、ひ下り丁、ツシ検出回路4は、
立下りエツジ検出回路入力部19にシリアル送信クロッ
クを入力すると立上りエツジ検出回路出力部20からは
シリアル送信クロックの立下りエツジのタイミングて′
パルス状の信号が出力され前記アップダ1クンカウンタ
のリセット入力部21に入力される。データ“O”の検
出回路6には前記アップダウンカウンタのカウントデー
タ24が入力され、前5己データ24が“O”のとき、
データ“O”の検出回路の出力部25からは“H”が出
力される。また前記データ24が“0”以外のデータの
ときは“L″′が出力される。NANDゲート32は、
入力部26で前記データ“0”の検出回路の出力部25
の出力を受けとり、また入力部27でシリアル送信クロ
ックを受けとる。N A N Dゲートの出力部28は
、同ゲートの入力部26および入力部27が共に“H“
状態のときにのみ′L”を出力する。ANDゲート33
は、その入力部29で前記NANDゲートの出力部28
の出力を受けとり、同じく入力部30で外部から供給さ
れるシリアル送信クロックよりも充分周期の短い一定周
期のクロックを受けとる。その出力部31は、入力部2
9が“H”状態のときは入力部30で受けとったクロッ
クが通過するが、入力部29が“L”状態のときは、前
記出力部31は“L”状態が出力される。前記出力部3
1の出力は前記アップダウンカウンタ5のクロック入力
部22に入力される。ANDゲート7は、その入力部3
4で前記データ“0”の検出回路6の出力部25の出力
を受けとり、またその入力部35でシリアル送信クロッ
クを受けとり、またその入力部36でシリアル送信クロ
ックカウンタ3の出力部18の出力を受けとる。AND
ゲート7の出力部37は、前記入力部34と、入力部3
5、および入力部36が全て“H”状態のときのみ“H
”を出力する。ORゲート8は、前記ANDゲート7の
出力部37の出力をその入力部28で受けとり、同じく
入力部29でDフリップフロップ2の出力部15の出力
を受けとる。ORゲート8の出力部30は、前記入力部
28が“L”状態のとき、前記Dフリップフロップ2の
出力部15の出力が通過しシリアル送信データ出力とな
り、前記入力部28が“H”状態のときは前記出力部3
0は“H”が出力される。
EXAMPLE 4 An example of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a transmission circuit according to an embodiment of the present invention.Those having the same functions as those of the conventional example are given the same reference numerals and their explanation will be omitted. In the figure, the up/down counter 5 counts 11 clocks with a constant period sufficiently shorter than the serial transmission clock input from the outside to the clock manual section 22. is input, and when the serial transmission [] is in the "■7" state, it counts up, and when it is in the "I-H" state, !!i, it counts down. Also, the reset input section 21 inputs "■(" 5, Hidari-cho, Tsushi detection circuit 4, which is reset when the status is input,
When the serial transmission clock is input to the falling edge detection circuit input section 19, the timing of the falling edge of the serial transmission clock is output from the rising edge detection circuit output section 20.
A pulse-like signal is output and inputted to the reset input section 21 of the up-down counter. The count data 24 of the up/down counter is input to the data "O" detection circuit 6, and when the previous five self data 24 is "O",
"H" is output from the output section 25 of the data "O" detection circuit. Furthermore, when the data 24 is data other than "0", "L"' is output. The NAND gate 32 is
The input section 26 connects the output section 25 of the data "0" detection circuit.
It also receives the serial transmission clock at the input section 27. The output section 28 of the N A N D gate is such that both the input section 26 and the input section 27 of the same gate are "H".
Outputs 'L' only in the state.AND gate 33
is connected at its input 29 to the output 28 of the NAND gate.
Similarly, the input section 30 receives a clock having a constant cycle that is sufficiently shorter than the serial transmission clock supplied from the outside. The output section 31 is the input section 2
9 is in the "H" state, the clock received by the input section 30 passes through, but when the input section 29 is in the "L" state, the output section 31 outputs the "L" state. The output section 3
The output of 1 is input to the clock input section 22 of the up/down counter 5. AND gate 7 has its input 3
4 receives the output of the output section 25 of the data "0" detection circuit 6, its input section 35 receives the serial transmission clock, and its input section 36 receives the output of the output section 18 of the serial transmission clock counter 3. Receive. AND
The output section 37 of the gate 7 is connected to the input section 34 and the input section 3.
5, and the input section 36 are all in the “H” state.
The OR gate 8 receives the output of the output section 37 of the AND gate 7 at its input section 28 and also receives the output of the output section 15 of the D flip-flop 2 at its input section 29. When the input section 28 is in the "L" state, the output section 15 of the D flip-flop 2 passes through the output section 30 to output serial transmission data, and when the input section 28 is in the "H" state, the output section 30 outputs the serial transmission data. Output section 3
0, "H" is output.

なお、シフトバッファ1.Dフリップフロップ2、シリ
アル送信カウンタ3は従来の構成と同じ機能のものであ
る。
Note that shift buffer 1. The D flip-flop 2 and serial transmission counter 3 have the same functions as those in the conventional configuration.

以上のように構成されたシリアル送信回路について、以
下その動作について第2図のタイムチャートを参照しな
がら説明する。
The operation of the serial transmitting circuit configured as described above will be described below with reference to the time chart of FIG. 2.

まず外部からパルス状のシリアル送信開始信号を入力す
る。前記信号が“H”状態のとき、シフトバッファ1の
シリアル送信されるデータがラッチされ、シリアル送信
クロックカウンタ3がリセットされる。シフトバッファ
1にシリアル送信されるデータがラッチされることによ
りシフトバッファ1の出力部12よりシリアル送信の第
1ビット目のデータ1が出力される。つぎに前記シリア
ル送信開始信号を“L”状態にして外部からシリアル送
信クロックを入力すると、シリアル送信クロックのタイ
ミングで前記シフトバッファの出力部12より出力され
るデータlがDフリップフロップ2を通過し、シリアル
送信クロックのつぎの立下りエツジまで保持される。つ
ぎにシリアル送信クロックの立上りエツジのタイミング
でシフトバッファ1の出力部12からはシリアル送信デ
ータの第2ビット目のデータ2が出力される。
First, a pulsed serial transmission start signal is input from the outside. When the signal is in the "H" state, serially transmitted data in the shift buffer 1 is latched, and the serial transmission clock counter 3 is reset. By latching the data to be serially transmitted to the shift buffer 1, the output section 12 of the shift buffer 1 outputs the first bit data 1 of the serial transmission. Next, when the serial transmission start signal is set to the "L" state and a serial transmission clock is input from the outside, the data l output from the output section 12 of the shift buffer passes through the D flip-flop 2 at the timing of the serial transmission clock. , is held until the next falling edge of the serial transmit clock. Next, the second bit data 2 of the serial transmission data is output from the output section 12 of the shift buffer 1 at the timing of the rising edge of the serial transmission clock.

シリアル送信クロックの両エツジで以後同様の動作が繰
り返され、前記シリアル送信開始信号から第n−1回目
のシリアル送信クロックの立上りエツジでシフトバッフ
ァ1の出力部12からはシリアル送信データの第nビッ
ト目のデータnが出力される。次の第n回目のシリアル
送信クロックの立下りエツジでDフリップフロップ2の
出力部15からは前記データnが出力され保持される。
The same operation is repeated on both edges of the serial transmission clock, and at the (n-1)th rising edge of the serial transmission clock from the serial transmission start signal, the n-th bit of the serial transmission data is output from the output section 12 of the shift buffer 1. Eye data n is output. At the next falling edge of the n-th serial transmission clock, the data n is output from the output section 15 of the D flip-flop 2 and held.

一方シリアル送信クロックカウンタ3は、シリアル送信
クロックの立上りエツジをカウントし、その第n回目の
立上りエツジでカウント値はnとなる。シリアル送信の
ビット数をnとすると、シリアル送信クロックカウンタ
の出力部18の出力は、そのカウント値がnのときのみ
“H”となり、再びシリアル送信開始信号が入力されて
、前記シリアル送信クロックカウンタがリセットされる
まで“H”を出力する。一方アツブダウンカウンタ5は
、シリアル送信クロックが“L”状態のとき、外部から
入力されるシリアル送信クロックの周期よりも充分短い
一定周期のクロックをカウントアツプし、シリアル送信
クロックが“H”状態に切換わったとき、切換わり直前
のカウント値を初期値としてカウントダウンをする。ま
た−方、シリアル送信クロックの立下りのタイミングで
立下りエツジ検出回路4はパルス状の信号を発生し、前
記アップダウンカウンタ5をリセ・ン卜する。このため
、シリアル送信クロックが“L”状態のときは必ず前記
アップダウンカウンタ5はカウント値“O”からカウン
トアツプする。またアップダウンカウンタ5のカウント
データ24は、データ“0”の検出回路6に入力され、
前記カウントデータが“O”のとき、前記データ“0”
の検出回路6の出力部25からは”H”が出力される。
On the other hand, the serial transmission clock counter 3 counts the rising edges of the serial transmission clock, and the count value becomes n at the nth rising edge. When the number of bits of serial transmission is n, the output of the output section 18 of the serial transmission clock counter becomes "H" only when the count value is n, and when the serial transmission start signal is input again, the output of the serial transmission clock counter 18 becomes "H". Outputs "H" until reset. On the other hand, when the serial transmission clock is in the "L" state, the up-down counter 5 counts up a clock with a constant period that is sufficiently shorter than the period of the serial transmission clock input from the outside, and the serial transmission clock is in the "H" state. When the switch is made, the count value immediately before the switch is counted down as the initial value. On the other hand, the falling edge detection circuit 4 generates a pulse-like signal at the falling timing of the serial transmission clock, and resets the up/down counter 5. Therefore, when the serial transmission clock is in the "L" state, the up/down counter 5 always counts up from the count value "O". Further, the count data 24 of the up/down counter 5 is input to the data “0” detection circuit 6,
When the count data is “O”, the data “0”
"H" is output from the output section 25 of the detection circuit 6.

図に示す様にシリアル送信クロックの“H”状態の時間
が、直前の“L”状態の時間よりも長いときは、前記ア
ップダウンカウンタ5のカウントデータは、やがて“0
”になる。このタイミングでデータ“O”の検出回路6
の出力部25からは“H”が出力され、NANDゲート
32の入力部26に入力される。一方、同NANDゲー
ト32の入力部27にはシリアル送信クロツクが人t3
されているたy)、前記データ“0”の検出回路6の出
力部f、25が“H”状態で、かつシリアル送信クロッ
クが“11”状態ならば、前記N A N Dゲート2
6の出力部28は“L”になる。、前記出力部28は、
・〜NDノア’−h 33の入力部29に入力され、も
う−ブjの入力部30へは前記アップダウンカウンタの
′70ツー7が入力されており、前記N 、A N D
ゲート:32の出力部28か″■、”のときは、そのl
NN Dゲートの出力部31は“I、”古ななる。これ
r)データ“0”の検出回路6と、N 、A N IT
:ゲート32、およびANDゲート33により、シリア
ノ[送信クロックの“I(”状態の時間が、(の直前の
゛■、”状態の時間よりも長いとき、シリ−ど][送信
クロックの“H”状、態で前記アップダウンカウン5が
カウントダウンしてやがてカウントデータが“0”にな
った時、アップダウンカウンタに供給されるり【1ツク
が禁止され、前記アップダウンカウンタ5はカラン[・
データ“0”の状態で停」トシ7、シリアル送信クロッ
クがそのつぎに“F、”状態になるまでのこの状態を保
持した後再びカウント・ア・yブ動作を行なう、、−)
ぎにシリアル送信開始信号、よ4つ第n回目のシリアノ
[送信クロックの立下りて前記アップダウンカウンタ5
はカウントデータ“O”からカウントアツプ動作を行な
い、第n回目のシリアル送信クロックの立」−1すJ、
ツジてダウンカウントを行ない)1ウントデータが“0
”になったとき停止する。前記第n回目のシリアル送信
クロックの立寸り2エツジから、前記アップダウンカウ
ンタ5力くカウントデータ“0”の状態で停止するまで
の時間か本発明により得られるホールドタイムてありシ
リT JL送信クロックの第11回目の立下りエツジか
ら第11四目の立上りエツジまでに要する時間にほぼ等
しい。つぎにデータ“O”の検出回路4の出力部20の
出力と、シリアル送信クロックと、前記シリアル送信ク
ロックカウンタ3の出力部18の出力とがA I’J 
Dゲート7に入力され、前記3つの入力信号が全て“H
”状態のとさその出力部37は“)−(”状態になる。
As shown in the figure, when the time in the "H" state of the serial transmission clock is longer than the time in the "L" state immediately before, the count data of the up/down counter 5 eventually becomes "0".
”.At this timing, the data “O” detection circuit 6
An “H” level is output from the output section 25 of and input to the input section 26 of the NAND gate 32. On the other hand, the input section 27 of the NAND gate 32 receives the serial transmission clock t3.
y), if the output part f, 25 of the data "0" detection circuit 6 is in the "H" state and the serial transmission clock is in the "11" state, the N A N D gate 2
The output section 28 of No. 6 becomes "L". , the output section 28 is
・~ND Noah'-h 33's input section 29 is input, and the up-down counter '70 to 7 is input to the input section 30 of -buj, and the above-mentioned N, A N D
Gate: When the output part 28 of 32 is "■,", its l
The output 31 of the NND gate becomes "I," old. This r) Data “0” detection circuit 6, N, A NIT
: Gate 32 and AND gate 33 cause Siriano [When the time in the "I(" state of the transmitting clock is longer than the time in the "■," state immediately before (), the serial]["H" of the transmitting clock When the up-down counter 5 counts down in the "state," and the count data eventually reaches "0," the up-down counter is prohibited from being supplied to the up-down counter.
7. Hold this state until the serial transmission clock changes to the "F" state, and then perform the count-a-yb operation again...-)
4th serial transmission start signal, 4th serial signal [When the transmission clock falls, the up/down counter 5
performs a count-up operation from count data "O", and the nth serial transmission clock rises.
count down) 1 count data is “0”
The present invention can obtain the time from the second rising edge of the nth serial transmission clock until the up/down counter 5 stops when the count data is "0". The hold time is approximately equal to the time required from the 11th falling edge to the 11th rising edge of the JL transmission clock. Next, the output of the output section 20 of the data "O" detection circuit 4 and , the serial transmission clock and the output of the output section 18 of the serial transmission clock counter 3 are A I'J
is input to the D gate 7, and all three input signals are “H”.
When the output unit 37 is in the "state", the output section 37 becomes the ")-(" state.

前記ANDゲート7の出力部37と、前記■)フ1ツブ
フ(ト、 22の出力部15は、共にORゲート8の友
t1てあi)、その出力部30の出力がシリT)L送信
−F  3y出力である、シリアル送信開始信すが入J
」されろ七、シリア)L送信り1−1ツクカウン73か
リセ・ソトされるためその出力部18が“L、”L′−
、なルタめ、Er 記A N Dグー1□ 7 ノu3
力部37は“丁、”となる、前こ己“r、”状態のとき
、Dフリッ−ブフ■1ッゴ2の出力部15の出力はOR
ゲート8を通過1ζ)、−7)ぎにシリアル送信クロッ
クの第11番Ell QU立[1)Jツジで前記シリア
ル送信りL1ツクカウンタ3 +5出力部18が“)−
(”状、朝にな一〕、かつホー几ドヤイl−1を形成す
るだめの前記アップダ「゛ノ〕・力「′ノンタ5がノノ
ウ〕・I・デー々“0”になり前記デー 17“0”の
検出回路6の出力部25が“■1”、)sなると、前記
ノ〜N r)ノア’ −ドアの出力部37は“H”、に
なり、前記シリアル送信データ出力は“■(”状態に固
定され、つぎに再びシリアル送信開始信号が入力される
までこの状態を保持する。
The output unit 37 of the AND gate 7 and the output unit 15 of -F 3y output, serial transmission start signal input J
"7, Syria) Since the L transmission 1-1 count 73 is reset and reset, its output section 18 is "L,"L'-
, Naluta Me, Er Chronicle A N D Goo 1□ 7 No u3
When the output section 37 is in the state of "R,", the output of the output section 15 of the D-Fli-Bouf ■1 is OR.
Passing through the gate 8 (1ζ), -7), the serial transmitting clock No. 11 Ell QU rises [1) At the J turn, the serial transmitting L1 counter 3 +5 output section 18 outputs ")-"
17 When the output section 25 of the "0" detection circuit 6 becomes "■1",)s, the output section 37 of the door becomes "H", and the serial transmission data output becomes " ■(Fixed to "state" and held in this state until the next serial transmission start signal is input again.

以上のように本実施例によれば、シリ°7)を送信り[
]ツクの状態の切換えによりアップまたはダウンf1ウ
ント動作をするアップクウンノノウレタと、前記アップ
ダウン、ノフウンタをシリアル送信り「1ツクの立下り
一1ツシでリセットをかけるための立上りj−7ツシ検
出回路七、前記アップダウンカウンタのカウントデータ
の中からカウントデータ゛O”を検出するためのデータ
“O”の検出回路1k、シリアル送信クロックが“トI
”て、かつ前記データ“0”の検出回路がII”を出力
し、た、七き、前記アップダウンカウンタのクロック入
力を禁11する手段と、シリアル送信り[−]ツクが゛
用1”で、かつ前記シリア/l送信り「7ツクカ1クン
タの出力が“11”で、かつ前記データ“0”の検出回
路の出力が“1(”のとき、シリアノ【送信データ出力
を“H”に固定する手段を設けることにより、シリアノ
【送信クロックの第r’1番目の立下りから第11番[
」の立上りまでに要する時間と同程度の時間に自動調整
することができる。なお図で使用するDフリップフロッ
プは、ここではシリアノ1送信クロツクの立上りから立
下りの間だけデータを遅研させ保持する遅延保持手段で
あるため、この機能を果たせるJ Kフリップフロップ
、その他の同等機能の回路で代用しても差支えない。
As described above, according to this embodiment, the serial number 7) is transmitted [
] An up count counter that performs up or down f1 count operation by switching the state of the clock, and a rise j-7 for resetting at the falling edge of one clock and the rising edge of the first clock by serially transmitting the up/down and counting counters. A data detection circuit 7, a data "O" detection circuit 1k for detecting count data "O" from the count data of the up/down counter, a data "O" detection circuit 1k, a serial transmission clock
``and the detection circuit for the data ``0'' outputs ``II'', and the means for prohibiting the clock input of the up-down counter and the serial transmission [-] ``1''. , and when the output of the serial/1 transmitter is "11" and the output of the data "0" detection circuit is "1", the serial number [transmission data output is "H"] By providing a means for fixing the signal to
It is possible to automatically adjust the time to the same level as the time required to rise. Note that the D flip-flop used in the figure is a delay holding means that slows down and holds data only between the rising edge and falling edge of the Siriano 1 transmission clock, so it can be replaced with a JK flip-flop or other equivalent device that can perform this function. There is no problem in substituting a functional circuit.

発明の効果 以上のように本発明は、特にシリアル送信クロックの状
態の切換えによりアップまたはダウンカウント動作をす
るアップダウンカウンタと、前記アップダウンカウンタ
をシリアル送信クロックの立下りエツジでリセットをか
けるための立下りエツジ検出回路と、前記アップダウン
カウンタのカウントデータの中からカウントデータ“0
”を検出するためのデータ“0”の検出回路を設けるこ
とにより、シリアル送信クロックの第n番目の立下りか
ら第n番目の立上りまでに要する時間と同程度の時間に
自動調整することができ、ホールドタイムが短(なるこ
とのない優れたシリアル送信回路を実現できるものであ
る。
Effects of the Invention As described above, the present invention particularly provides an up-down counter that counts up or down by switching the state of a serial transmission clock, and a system for resetting the up-down counter at the falling edge of the serial transmission clock. The falling edge detection circuit detects count data “0” from the count data of the up/down counter.
By providing a detection circuit for data "0" to detect "0", it is possible to automatically adjust the time to be approximately the same as the time required from the nth falling edge to the nth rising edge of the serial transmission clock. This makes it possible to realize an excellent serial transmission circuit with short hold times.

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

第1図は本発明の実施例のシリアル送信回路のブロック
図、第2図は同じくシリアル送信回路のタイムチャート
、第3図は従来のシリアル送信回路のブロック図、第4
図は同じくシリアル送信回路のタイムチャートである。 1・・・・・・シフトバッファ、2・・・・・・Dフリ
ッププロップ、3・・・・・・シリアル送信クロックカ
ウンタ、4・・・・・・立下りエツジ検出回路、5・・
・・・・アップダウンカウンタ、6・・・・・・データ
“○”の検出回路、7・・・・・・ANDゲート、8・
・・・・・ORゲート、9・・・・・・シリアル送信デ
ータ入力部、10・・・・・・シリアル送信データラッ
チクロック入力部、11・・・・・・シリアル送信クロ
ック入力部、12,15.18.20゜25.28,3
1.37・・・・・・出力部、13・・・・・・データ
入力部、14,16.22・・・・・・クロック入力部
、17・・・・・・リセット入力部、19,26,27
゜29.30.34〜36・・・・・・入力部、23・
・・・・・アップダウン切換入力部、24・・・・・・
カウントデータ出力部、32・・・・・・NANDゲー
ト、33・・・・・・ANDゲート、38・・・・・・
シフトレジスタ、39・・・・・・シフトデータ入力部
、40・・・・・・シフトクロック入力部、42・・・
・・・シフトレジスタ出力部。 代理人の氏名 弁理士小蝦治明 ばか26第 図 第 図
FIG. 1 is a block diagram of a serial transmitting circuit according to an embodiment of the present invention, FIG. 2 is a time chart of the same serial transmitting circuit, FIG. 3 is a block diagram of a conventional serial transmitting circuit, and FIG.
The figure is also a time chart of the serial transmission circuit. 1...Shift buffer, 2...D flip-flop, 3...Serial transmission clock counter, 4...Falling edge detection circuit, 5...
...up/down counter, 6...data "○" detection circuit, 7...AND gate, 8.
...OR gate, 9... Serial transmission data input section, 10... Serial transmission data latch clock input section, 11... Serial transmission clock input section, 12 ,15.18.20°25.28,3
1.37...Output section, 13...Data input section, 14, 16.22...Clock input section, 17...Reset input section, 19 ,26,27
゜29.30.34-36... Input section, 23.
...Up/down switching input section, 24...
Count data output section, 32...NAND gate, 33...AND gate, 38...
Shift register, 39...shift data input section, 40...shift clock input section, 42...
...Shift register output section. Name of agent: Patent attorney Haruaki Koebi Baka 26 Figure Figure

Claims (1)

【特許請求の範囲】[Claims] シリアル送信開始信号を外部から入力したとき、前記シ
リアル送信開始信号が“H”状態で、シリアル送信すべ
きデータをパラレルにラッチし、前記シリアル送信開始
信号が“L”状態で、外部から入力されるシリアル送信
クロックの立上りエッジごとに、前記ラッチデータを1
ビットずつシフトさせるためのシフトバッファと、前記
シリアル送信クロックの立下りエッジごとに、前記シフ
トバッファの最終段の出力を遅延させ保持するための遅
延保持手段と、前記シリアル送信開始信号が“H”状態
でリセットされ、前記シリアル送信開始信号が“L”状
態で前記シリアル送信クロックの立上りエッジでカウン
トアップして所定回数のカウント動作を行なったとき“
H”を出力するためのシリアル送信クロックカウンタと
、前記シリアル送信クロックが“L”状態のとき前記シ
リアル送信クロックの周期よりも充分短い周期の外部か
ら連続的に入力されるクロックをカウントアップし、前
記シリアル送信クロックが“H”状態のとき前記クロッ
クをカウントダウンし、さらにリセット入力部を有する
アップダウンカウンタと、前記シリアル送信クロックの
立下りエッジを検出し前記アップダウンカウンタのリセ
ット入力部にパルス状のリセット信号を供給するための
立下りエッジ検出回路と、前記アップダウンカウンタの
カウントデータを受けとり前記カウントデータが“0”
の状態を検出したとき“H”を出力し、それ以外の状態
で“L”を出力するためのデータ“0”の検出回路と、
前記シリアル送信クロックが“H”状態で、かつ前記デ
ータ“0”の検出回路の出力が“H”状態のとき、前記
アップダウンカウンタへのクロックの入力を禁止する手
段と、前記シリアル送信クロックが“H”状態で、かつ
前記データ“0”の検出回路の出力が“H”状態で、か
つ前記シリアル送信クロックカウンタの出力が“H”状
態のとき、本回路の出力であるシリアル送信データ出力
を“H”状態とし、前記条件以外のとき前記シリアル送
信データ出力として前記遅延保持手段の出力を通過させ
る手段とを備えたシリアル送信回路。
When the serial transmission start signal is input from the outside, the data to be serially transmitted is latched in parallel when the serial transmission start signal is in the "H" state, and when the serial transmission start signal is in the "L" state, the data to be serially transmitted is input from the outside. The latch data is set to 1 on every rising edge of the serial transmit clock.
a shift buffer for shifting bits bit by bit; a delay holding means for delaying and holding the output of the final stage of the shift buffer every falling edge of the serial transmission clock; state, and when the serial transmission start signal is in the "L" state and a predetermined number of counting operations are performed by counting up at the rising edge of the serial transmission clock.
a serial transmission clock counter for outputting "H"; and a serial transmission clock counter that counts up a clock continuously inputted from the outside with a cycle sufficiently shorter than the cycle of the serial transmission clock when the serial transmission clock is in the "L"state; An up/down counter that counts down the clock when the serial transmission clock is in the "H" state and further has a reset input section, and detects a falling edge of the serial transmission clock and sends a pulse to the reset input section of the up/down counter. a falling edge detection circuit for supplying a reset signal of the up/down counter; and a falling edge detection circuit for receiving count data of the up/down counter so that the count data is "0".
a data “0” detection circuit for outputting “H” when detecting the state and outputting “L” in other states;
means for inhibiting clock input to the up/down counter when the serial transmission clock is in the "H" state and the output of the data "0" detection circuit is in the "H"state; When the output of the data “0” detection circuit is “H” and the output of the serial transmission clock counter is “H”, the serial transmission data output is the output of this circuit. and a means for setting the output signal to an "H" state and passing the output of the delay holding means as the serial transmission data output when the conditions are other than the above conditions.
JP2276972A 1990-10-15 1990-10-15 Serial transmission circuit Pending JPH04149759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2276972A JPH04149759A (en) 1990-10-15 1990-10-15 Serial transmission circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2276972A JPH04149759A (en) 1990-10-15 1990-10-15 Serial transmission circuit

Publications (1)

Publication Number Publication Date
JPH04149759A true JPH04149759A (en) 1992-05-22

Family

ID=17576980

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2276972A Pending JPH04149759A (en) 1990-10-15 1990-10-15 Serial transmission circuit

Country Status (1)

Country Link
JP (1) JPH04149759A (en)

Similar Documents

Publication Publication Date Title
US5233617A (en) Asynchronous latch circuit and register
CA2365288C (en) Dynamic wave-pipelined interface apparatus and methods therefor
US4583008A (en) Retriggerable edge detector for edge-actuated internally clocked parts
US5359630A (en) Method and apparatus for realignment of synchronous data
KR950004747A (en) A method for controlling a signal path between an edge logical search cell and an internal logic block of an electronic device and the electronic device
US5142556A (en) Data transfer system and method of transferring data
JPH04222130A (en) Interference detection circuit
KR100521418B1 (en) Short locking time and high noise immunity delay controller in delay locked loop
JP3522126B2 (en) Synchronization detection method and apparatus, and phase synchronization method and apparatus
JPH04149759A (en) Serial transmission circuit
US6486721B2 (en) Latch control circuit for crossing clock domains
US4741005A (en) Counter circuit having flip-flops for synchronizing carry signals between stages
US6901528B2 (en) Minimum latency propagation of variable pulse width signals across clock domains with variable frequencies
SU1363217A1 (en) Device for majority sampling of asynchronous signals
US6060908A (en) Databus
JPS61289741A (en) Consecutive protection circuit
JPS61209370A (en) Skew correction method
JP2567110B2 (en) D-type flip-flop circuit
JPS63312754A (en) Error generation circuit
KR950006826Y1 (en) Serial data transmission circuit
KR960012470B1 (en) Programmable Timeout Timer
EP0480860A1 (en) Variable self-correcting digital delay circuit
SU1732485A1 (en) Device for transmission and reception of data in half-duplex mode
SU1109741A1 (en) Device for determining difference of two numbers
JP3389679B2 (en) Designated pattern data block counting circuit