JPS63260242A - Serial/parallel converter - Google Patents

Serial/parallel converter

Info

Publication number
JPS63260242A
JPS63260242A JP62093970A JP9397087A JPS63260242A JP S63260242 A JPS63260242 A JP S63260242A JP 62093970 A JP62093970 A JP 62093970A JP 9397087 A JP9397087 A JP 9397087A JP S63260242 A JPS63260242 A JP S63260242A
Authority
JP
Japan
Prior art keywords
bit
data
gate
shift register
start bit
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
JP62093970A
Other languages
Japanese (ja)
Inventor
Kenichi Kinoshita
健一 木下
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP62093970A priority Critical patent/JPS63260242A/en
Publication of JPS63260242A publication Critical patent/JPS63260242A/en
Pending legal-status Critical Current

Links

Landscapes

  • Dc Digital Transmission (AREA)
  • Communication Control (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

PURPOSE:To eliminate the need for a reset signal from a microcomputer by sending a data from the microcomputer with bit constitution more than a data bit number by one bit. CONSTITUTION:Inverted 8-bit data 0-7 are consecutive in a data from the head of a start bit. In detecting the change point of the start bit, a gate G1 resets a FF 3 and clears a shift register 1. As a result, an output (inverted signal of data) of an inverted gate G3 is fetched sequentially from an input terminal Si of a shift register 1. Then the start bit reaching the final bit Q9 is inverted by an inversion gate G4 to set the FF 3 at the trailing and to close a clock input gate G2 and latches data outputs Q1-Q8 to a D latch 2. Since the register 1 and the FF3 are reset by the start bit in this way, no reset signal is required.

Description

【発明の詳細な説明】 〔概 要〕 スタートビットの後にNビット続くシリアルデータをシ
フトレジスタに取込んでパラレル出力に変換する回路を
、シリアルデータのビット数計数用カウンタを要するこ
となく構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] A circuit that takes in serial data of N bits following a start bit into a shift register and converts it into parallel output is configured without requiring a counter for counting the number of bits of serial data.

〔産業上の利用分野〕[Industrial application field]

本発明は、シリアルデータをパラレルデータに変換する
シリアル/パラレル変換器に関する。
The present invention relates to a serial/parallel converter that converts serial data to parallel data.

〔従来の技術〕[Conventional technology]

マイクロコンピュータ(以下、マイコンと略す)を用い
た機器では、限られたポート(ポート数を増やすとピン
数が多くなり、コストアップになる)を有効に使うため
、シリアル通信でデータのやり取りを行うことがある。
Devices using microcomputers (hereinafter referred to as microcomputers) exchange data using serial communication in order to make effective use of the limited number of ports (increasing the number of ports increases the number of pins, which increases costs). Sometimes.

このようなマイコンのシリアル通信機能はインテリジェ
ント化されているため、マイコン同志、またはそのマイ
コンのファミリーで通信機能を持つiCには都合がよい
が、一般のkcs例えばTTLやC−MOS LOGi
Cではかえって扱いに(い。これは、本来のデータとは
別に、データの始まりを示すスタートビット(第3図の
5TA)やデータの終りを示すストップビット(同5T
P)があるためである。
Since the serial communication function of such microcontrollers is intelligent, it is convenient for microcontrollers or ICs that have communication functions in the microcontroller family, but general KCS such as TTL and C-MOS LOGi
In C, this is treated as a start bit (5TA in Figure 3) indicating the beginning of data and a stop bit (5T in Figure 3) indicating the end of data, in addition to the original data.
This is because P).

上述した一般のiCでマイコンからのシリアルデータを
受信するためには、第2図のようなシリアル/パラレル
(S/Pと略す)変換器を必要とする。このS/P変換
器は、マイコンからクロックCLOCKに同期して送ら
れてくるシリアルデータDATAをパラレルに変換する
シフトレジスタ11と、このシフトレジスタ11に取り
込むデータDATAのビット数N(この例ではN=8)
をカウントしてスイッチSWを開閉制御するカウンタ1
2からなる。このカウンタ12はマイコンからのリセッ
ト信号RESETでクリアされ、その後のクロックCL
OCKをカウントする。マイコンはRESETの次にD
ATAを出すので、カウンタ12が9カウントするとシ
フトレジスタ11内に8ビットのデータが取り込まれる
(先頭のスタートビットSTAはシフトアウトされる)
。このとき、カウンタ12はスイッチSWを開いてシフ
トレジスタ11へのクロックを禁止し、内部のデータを
保持する。
In order to receive serial data from a microcomputer with the above-mentioned general iC, a serial/parallel (abbreviated as S/P) converter as shown in FIG. 2 is required. This S/P converter includes a shift register 11 that converts serial data DATA sent from a microcomputer in synchronization with a clock CLOCK into parallel data, and the number of bits N (in this example, N =8)
Counter 1 that counts and controls the opening and closing of the switch SW
Consists of 2. This counter 12 is cleared by the reset signal RESET from the microcomputer, and the subsequent clock CL
Count OCK. The microcomputer presses D after RESET.
Since ATA is output, when the counter 12 counts 9, 8 bits of data are taken into the shift register 11 (the first start bit STA is shifted out).
. At this time, the counter 12 opens the switch SW to prohibit clocking to the shift register 11, and holds the internal data.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

第2図のS/P変換器ではカウンタ12が必要であるた
め部品点数が多く、またそのためにマイコンがリセット
信号RESETを出さなくてはならないので、ポートを
余分に使用したりソフトが複雑になる欠点がある。
The S/P converter shown in Figure 2 requires a counter 12, which requires a large number of parts.Also, the microcontroller must issue a reset signal RESET, which requires the use of additional ports and complicates the software. There are drawbacks.

本発明は、マイコンからのリセット信号がなくても動作
でき、またカウンタも必要としないS/P変換器を提供
しようとするものである。
The present invention aims to provide an S/P converter that can operate without a reset signal from a microcomputer and does not require a counter.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、クロックに同期して入力するNビットのシリ
アルデータを取込む(N+1)ビットのシフトレジスタ
をクリアするゲート (G1)と、該シフトレジスタに
クロックを入力するゲート(G2)と、該ゲート(G1
)のスタートビット検出出力でリセットされ、該シフト
レジスタからの該スタートビットのシフトアウト出力で
セットされるフリップフロップ(3)とを備え、該フリ
ップフロップがリセットされている間だけ該ゲート(G
2)を有効にするようにしてなることを特徴とするもの
である。
The present invention includes a gate (G1) that clears an (N+1)-bit shift register that receives N-bit serial data that is input in synchronization with a clock, a gate (G2) that inputs a clock to the shift register, and a gate (G2) that inputs a clock to the shift register. Gate (G1
), the gate (G
2) is enabled.

〔作用〕[Effect]

本発明ではシフトレジスタをデータビット数Nより1ビ
ット多い(N+1)ビット構成として従来のカウンタを
省略し、またスタートビットからデータの始まりを検出
することでマイコンからのリセット信号を不要にする。
In the present invention, the shift register is configured with one bit more than the number of data bits (N+1), thereby omitting the conventional counter, and detecting the beginning of data from the start bit, thereby eliminating the need for a reset signal from the microcomputer.

〔実施例〕〔Example〕

第1図は本発明の一実施例を示す構成図で、1は(N+
1)ビット(本例ではN=8)のシフトレジスタ、2は
NビットのDラッチ、3はR−3型のフリップフロップ
、G1はスタートビット検出用のオアゲート、G2はク
ロック入力用のアンドゲート、G3はシフトレジスタl
へのデータ入力反転ゲート、G4はシフトレジスタ1の
シフトアウト出力反転ゲートである。
FIG. 1 is a block diagram showing one embodiment of the present invention, where 1 is (N+
1) Bit (N=8 in this example) shift register, 2 is N-bit D latch, 3 is R-3 type flip-flop, G1 is OR gate for start bit detection, G2 is AND gate for clock input , G3 is shift register l
G4 is the shift-out output inverting gate of shift register 1.

データDATAの構成はスタートビットSTAを先頭に
反転した8ビットのデータO〜7が続き、最後にストッ
プビットSTPを付したものである。
The structure of the data DATA is such that a start bit STA is started, followed by inverted 8-bit data O to 7, and a stop bit STP is added at the end.

スタートビットSTAは1ビットで、H(ハイ)レベル
からしくロー)レベルへ変化する点■に特徴がある。こ
れに対しストップビットSTPは1ビットとは限らず、
次のスタートビットSTAが現われるまでHレベルを持
続する。
The start bit STA is 1 bit, and is characterized by the fact that it changes from H (high) level to low (low) level. On the other hand, stop bit STP is not limited to 1 bit,
It remains at H level until the next start bit STA appears.

ゲートG1はスタートビットSTAの変化点■を検出す
るとフリップフロップ3をリセットすると共に、シフト
レジスタ1をクリアする(クリア端子5CLRがLにな
る=■)。このときシフトレジスタ1の出力Q1〜Q9
は全てLになり、同時にフリップフロップ3ではFF2
出力がHとなり(■)、またFFI出力がLになる(■
′)。FF2出力がHになるとゲートGlの出力はHに
なるので、クリア端子5CLRはHに戻る(■)。この
結果、シフトレジスタ1のシリアル入力端子Siから反
転ゲートG3の出力(データDATAの反転信号)が順
次取り込まれる。SCKはクロック入力端子で、ここに
はフリップフロップ3のFF2出力がHになってからク
ロックが供給される。このクロック入力端子SCKへの
クロック入力数が増加するにつれ、出力端子Ql、Q2
.・・・・・・にTh11mデータがシフトされる。そ
の先頭はスタートビットの反転STAであり、これが最
終ピッ)Q9に到達したとき(■)、ビットQ8〜Q!
には8ビットのデータO〜7が出揃う。
When the gate G1 detects the change point (■) of the start bit STA, it resets the flip-flop 3 and clears the shift register 1 (clear terminal 5CLR becomes L=■). At this time, the outputs Q1 to Q9 of shift register 1
all become L, and at the same time, flip-flop 3 becomes FF2
The output becomes H (■), and the FFI output becomes L (■
'). When the FF2 output becomes H, the output of the gate Gl becomes H, so the clear terminal 5CLR returns to H (■). As a result, the output of the inverting gate G3 (inverted signal of data DATA) is sequentially taken in from the serial input terminal Si of the shift register 1. SCK is a clock input terminal, to which a clock is supplied after the FF2 output of the flip-flop 3 becomes H. As the number of clock inputs to this clock input terminal SCK increases, the output terminals Ql, Q2
.. Th11m data is shifted to . The beginning is the inversion STA of the start bit, and when this reaches the final bit Q9 (■), bits Q8 to Q!
8-bit data O to 7 are present.

最終ビットQ9に到達したスタートビットの反転STA
は反転ゲートG4で再度反転され、その立下り (ST
Aの立上り■に対応する)でフリップフロップ3をセッ
トする。この結果FF1.FF2出力は反転する(■■
′)。FF2出力はクロック入力用ゲートG2を閉じる
のに使用される(■)。また、FFI出力はシフトレジ
スタ1のデータ出力Q1〜QBをパラレルにランチする
Dラッチ2のクロックRCKとして使用される。
Inversion STA of start bit reaching final bit Q9
is inverted again by the inversion gate G4, and its falling edge (ST
Flip-flop 3 is set at (corresponding to the rising edge of A). As a result, FF1. FF2 output is inverted (■■
'). The FF2 output is used to close the clock input gate G2 (■). Further, the FFI output is used as the clock RCK of the D latch 2 that launches the data outputs Q1 to QB of the shift register 1 in parallel.

以上の動作説明から明らかなように、スタートビットS
TAでシフトレジスタ1のクリアやフリップフロップ3
のリセットを行うため、従来のようなりセント信号を必
要としない。また、クロック数を制限するフリップフロ
ップ3は、シフトレジスタ1に入力する前のスタートビ
ットでリセットされ、且つ該シフトレジスタ1をシフト
アウトしたスタートビットでセントされるので、従来の
ようなカウンタを必要としない。実際に構成する場合、
シフトレジスタlのQ I”QθとDラッチ2が1チツ
プ化されたiCがある。従って、部品点数も少なくて済
む。
As is clear from the above operation explanation, start bit S
TA clears shift register 1 and flip-flop 3
Since the reset is performed, there is no need for a cent signal like in the past. In addition, the flip-flop 3 that limits the number of clocks is reset by the start bit before inputting to the shift register 1, and is clocked by the start bit after shifting out the shift register 1, so a conventional counter is not required. I don't. When actually configuring
There is an iC in which QI''Qθ of shift register l and D latch 2 are integrated into one chip.Therefore, the number of parts can be reduced.

尚、データDATAの各ビットはクロックCLOCにの
立上りで有効になる。またQ+、D+〜Qe、Deの点
線と実線は、シフトレジスタ1の出力Q1〜Qeとラッ
チ2の出力D1〜DBを各々示している(D+〜D8は
FFI出力の立上りまで変化しない)。Dラッチ2に入
力するゲート信号GATEは、LレベルでD1〜D8を
有効にし、HレベルでD1〜Daを高インピーダンスに
する。シリアルデータはパラレル出力D1〜D11で反
転出力になるため、マイコン側で送出前に反転しておく
が、これは1命令で済む。
Note that each bit of the data DATA becomes valid at the rising edge of the clock CLOC. Further, the dotted lines and solid lines Q+, D+ to Qe, and De indicate the outputs Q1 to Qe of the shift register 1 and the outputs D1 to DB of the latch 2, respectively (D+ to D8 do not change until the rise of the FFI output). The gate signal GATE input to the D latch 2 enables D1 to D8 at L level and makes D1 to Da high impedance at H level. Since the serial data is inverted at the parallel outputs D1 to D11, it is inverted on the microcomputer side before being sent out, but this only requires one instruction.

〔発明の効果〕〔Effect of the invention〕

以上述べたように本発明によれば、スタートビットに続
くNビットのシリアルデータをカウンタを必要とせずに
シフトレジスタに取込むことができる。このためマイコ
ン側からリセット信号を出す必要がなく、ポートが少な
くて済む。また、データ送信に先立ち違うポートからリ
セット信号を出すタイミング管理に比ベソフトが簡単に
なる。
As described above, according to the present invention, N bits of serial data following the start bit can be taken into the shift register without requiring a counter. Therefore, there is no need to issue a reset signal from the microcontroller side, and the number of ports can be reduced. Additionally, the software becomes easier in managing the timing of issuing reset signals from different ports prior to data transmission.

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

第1図は本発明の一実施例を示す構成図、第2図は従来
のS/P変換器の構成図、第3図は本発明の動作を示す
タイムチャートである。 出 願 人  富士通テン株式会社 代理人弁理士  青  柳   稔 12−カウ゛/り
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram of a conventional S/P converter, and FIG. 3 is a time chart showing the operation of the present invention. Applicant: Fujitsu Ten Ltd. Representative Patent Attorney Minoru Aoyagi 12-Court

Claims (1)

【特許請求の範囲】[Claims] クロックに同期して入力するNビットのシリアルデータ
を取込む(N+1)ビットのシフトレジスタ(1)と、
該シリアルデータより1ビット先に入力するスタートビ
ットを検出して該シフトレジスタをクリアするゲート(
G1)と、該シフトレジスタにクロックを入力するゲー
ト(G2)と、該ゲート(G1)のスタートビット検出
出力でリセットされ、該シフトレジスタからの該スター
トビットのシフトアウト出力でセットされるフリップフ
ロップ(3)とを備え、該フリップフロップがリセット
されている間だけ該ゲート(G2)を有効にするように
してなることを特徴とするシリアル/パラレル変換器。
an (N+1)-bit shift register (1) that receives N-bit serial data input in synchronization with a clock;
A gate that detects a start bit input one bit ahead of the serial data and clears the shift register
G1), a gate (G2) that inputs a clock to the shift register, and a flip-flop that is reset by the start bit detection output of the gate (G1) and set by the shift-out output of the start bit from the shift register. (3) A serial/parallel converter characterized in that the gate (G2) is enabled only while the flip-flop is being reset.
JP62093970A 1987-04-16 1987-04-16 Serial/parallel converter Pending JPS63260242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62093970A JPS63260242A (en) 1987-04-16 1987-04-16 Serial/parallel converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62093970A JPS63260242A (en) 1987-04-16 1987-04-16 Serial/parallel converter

Publications (1)

Publication Number Publication Date
JPS63260242A true JPS63260242A (en) 1988-10-27

Family

ID=14097261

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62093970A Pending JPS63260242A (en) 1987-04-16 1987-04-16 Serial/parallel converter

Country Status (1)

Country Link
JP (1) JPS63260242A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03245612A (en) * 1990-02-23 1991-11-01 Sanyo Electric Co Ltd D/a converter
US6798707B2 (en) 2001-09-06 2004-09-28 Denso Corporation Memory control apparatus for serial memory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03245612A (en) * 1990-02-23 1991-11-01 Sanyo Electric Co Ltd D/a converter
US6798707B2 (en) 2001-09-06 2004-09-28 Denso Corporation Memory control apparatus for serial memory

Similar Documents

Publication Publication Date Title
US5422914A (en) System and method for synchronizing data communications between two devices operating at different clock frequencies
US4618849A (en) Gray code counter
JPH04301679A (en) Lcd driving circuit
JPS63260242A (en) Serial/parallel converter
KR100227954B1 (en) Cascadable peripheral with an efficient data interface and method therefor
US6718429B1 (en) Configurable register file with multi-range shift register support
KR19990029006A (en) Extended chip select reset device and method
TWI817581B (en) Clock switching device
KR950013806B1 (en) Serial/parallel conversion method and device of data
JP3611049B2 (en) Internal register circuit
KR900002058Y1 (en) Video pattern control circuit for crt terminal
KR100236331B1 (en) Counter
JP2508322B2 (en) Serial I / O circuit built-in micro computer
SU976438A1 (en) Device for determination of character line length
US5223832A (en) Serial data transmission circuit
JP2508291B2 (en) Serial input / output circuit
JP3513399B2 (en) Variable timing device using serial data
SU961151A1 (en) Non-binary synchronous counter
JPS61289448A (en) Buffer memory device
JPS62149223A (en) Digital signal processor
JPH02124635A (en) Counter control circuit
JPH0628151A (en) Parallel latch circuit for serial data
JPH01228017A (en) Method for processing digital signal
JPH01188132A (en) Synchronizing signal detector
JPH01160111A (en) Counter device