JPH03295332A - Serial interface system - Google Patents

Serial interface system

Info

Publication number
JPH03295332A
JPH03295332A JP2096556A JP9655690A JPH03295332A JP H03295332 A JPH03295332 A JP H03295332A JP 2096556 A JP2096556 A JP 2096556A JP 9655690 A JP9655690 A JP 9655690A JP H03295332 A JPH03295332 A JP H03295332A
Authority
JP
Japan
Prior art keywords
serial
data
parallel
converter
transfer 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
JP2096556A
Other languages
Japanese (ja)
Inventor
Koshu Suzuki
弘修 鈴木
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2096556A priority Critical patent/JPH03295332A/en
Publication of JPH03295332A publication Critical patent/JPH03295332A/en
Pending legal-status Critical Current

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

PURPOSE:To realize a bi-directional serial interface through simple device configuration, and to lighten the burden of processing by providing the devices of both sides respectively with a parallel/serial converter, a serial/parallel converter, and a control means. CONSTITUTION:Data transfer clock generating means 11, 14a, the parallel/serial converters 14b, 24e, the serial/parallel converters 14c, 24d, and the control means 11, 21 are provided. Then, serial data outputted from the first parallel/serial converter 14b is inputted to the second serial/parallel converter 24d, and the serial data outputted from the second parallel/serial converter 24e is inputted to the first serial/parallel converter 14c. Thus, the bi-directional serial interface can be realized through the simple device configuration, and by executing the input/output of the data at a fixed interval of time, the burden of the processing can be lightened.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、2つのデジタル処理装置間の双方向のデータ
伝送に用いられるシリアルインターフェース方式に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a serial interface method used for bidirectional data transmission between two digital processing devices.

[従来の技術] 例えば、マイクロコンピュータを応用した制御機器など
のコンピュータシステムにおいて、2つのデジタル処理
装置で、相互にデータを伝送する方式としては、同期伝
送方式と、調歩同期伝送方式の2種類がある。
[Prior Art] For example, in a computer system such as a control device using a microcomputer, there are two types of methods for mutually transmitting data between two digital processing devices: a synchronous transmission method and an asynchronous transmission method. be.

同期伝送方式は、2つのデジタル処理装置間で共通の転
送クロックを使用するとともに、ハンドシェーク制御線
を用いて、いずれの装置がデータを送出するのかを確認
する方式である。
The synchronous transmission method is a method in which a common transfer clock is used between two digital processing devices, and a handshake control line is used to confirm which device will send data.

また、調歩同期伝送方式では、伝送するデータの前後に
スタートビットとストップビットを付加して、1キヤラ
クタデ一タ単位でデータをやりとりする方式であり、基
本的には、一方向へのデータ伝送に用いられ、双方向に
データ伝送する場合には、そのための装置構成を2組必
要とする。
In addition, in the asynchronous transmission method, a start bit and a stop bit are added before and after the data to be transmitted, and data is exchanged in units of one character data.Basically, data is transmitted in one direction. When data is transmitted bidirectionally, two sets of device configurations are required.

[発明が解決しようとする課題] しかしながら、これらの従来方式では、データ伝送専用
の半導体集積装置などを必要とするため、コストがかか
り、また、そのデータ伝送専用の半導体装置をプログラ
ムするための処理の負担がかかるという不都合を生じる
[Problems to be Solved by the Invention] However, these conventional methods require a semiconductor integrated device dedicated to data transmission, which is costly, and requires processing to program the semiconductor device dedicated to data transmission. This results in the inconvenience of being burdened by

そこで、そのようなデータ伝送専用の半導体装置を用い
ないで、装置コストを低減しようとすると、データを送
信する側では、受信側の動作タイミングを詳細に監視す
る必要があり、また、データを受信する側では、受信デ
ータのとりこぼしのないようにデータ入力タイミングを
監視する必要があるために、そのための処理の負担が非
常に大きくなるという不都合を生じる。
Therefore, if we try to reduce device costs without using such semiconductor devices dedicated to data transmission, the data transmitting side must closely monitor the operation timing of the receiving side. On the receiving side, it is necessary to monitor the data input timing so that the received data is not missed, resulting in the inconvenience that the processing load for this becomes extremely large.

本発明は、かかる実情に鑑みてなされたものであり、双
方向のデータ伝送を簡単な装置構成で実現できるととも
に、処理負担を大幅に軽減できるシリアルインターフェ
ース方式を提供することを目的としている。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a serial interface method that can realize bidirectional data transmission with a simple device configuration and can significantly reduce the processing load.

[課題を解決するための手段] 本発明は、データ転送クロックを発生するデータ転送ク
ロック発生手段と、データ転送クロックに同期して記憶
しているパラレルデータをシリアルデータに変換して出
力する第1のパラレル/シリアル変換器と、データ転送
クロックに同期して一次側装置から出力されるシリアル
データを入力する第1のシリアル/パラレル変換器と、
所定周期で第1のパラレル/シリアル変換器に出力デー
タをセントするとともに第1のシリアル/パラレル変換
器から入力データを読み込む第1の制御手段を一次側装
置+J設ける一方、上記データ転送クロックに同期して
第1のパラレル/シリアル変換器から出力されるシリア
ルデータを入力する第2のシリアル/パラレル変換器と
、転送クロックに同期して記憶しているパラレルデータ
をシリアルデータに変換して出力する第2のパラレル/
シリアル変換器と、所定周期で第2のパラレル/シリア
ル変換器に出力データをセットするとともに第2のシリ
アル/パラレル変換器から入力データを読み込む第2の
制御手段を二次側装置に設け、第2のパラレル/シリア
ル変換器から出力されるシリアルデータは第1のシリア
ル/パラレル変換器に入力されるようにしたものである
。また、前記第1および第2のパラレル/シリアル変換
器の出力データの先頭に、所定ビットパターンからなる
同期信号が付加される一方、一次側装置および二次側装
置では、第1および第2のシリアル/パラレル変換器の
入力デ〜りの先頭部に付加された同期信号を検出すると
、その第1および第2のシリアル/パラレル変換器への
データ入力を開始するようにしている。
[Means for Solving the Problems] The present invention includes a data transfer clock generating means that generates a data transfer clock, and a first converter that converts stored parallel data into serial data in synchronization with the data transfer clock and outputs the serial data. a first serial/parallel converter that receives serial data output from the primary device in synchronization with a data transfer clock;
A primary side device +J is provided with a first control means that sends output data to the first parallel/serial converter at a predetermined period and reads input data from the first serial/parallel converter, and is synchronized with the data transfer clock. A second serial/parallel converter inputs the serial data output from the first parallel/serial converter, and converts the stored parallel data into serial data in synchronization with the transfer clock and outputs the serial data. 2nd parallel/
A secondary device is provided with a serial converter and a second control means for setting output data to a second parallel/serial converter at a predetermined period and reading input data from the second serial/parallel converter. The serial data output from the second parallel/serial converter is input to the first serial/parallel converter. Further, while a synchronization signal consisting of a predetermined bit pattern is added to the beginning of the output data of the first and second parallel/serial converters, the primary side device and the secondary side device When the synchronizing signal added to the beginning of the input data of the serial/parallel converter is detected, data input to the first and second serial/parallel converters is started.

[作用コ L7たがって、双方向シリアルインターフェースを簡単
な装置構成で実現できるとともに、−・定時間間隔でデ
ータの入出力を行っているので、処理の負担が軽減され
る。また、伝送データの先頭部に同期信号を付加して、
その同期信号をデータ入力のトリガとして用いているの
で、データ伝送のための同期を容易にとることができる
[Operation L7] Therefore, a bidirectional serial interface can be realized with a simple device configuration, and since data is input and output at regular time intervals, the processing load is reduced. Also, by adding a synchronization signal to the beginning of the transmitted data,
Since the synchronization signal is used as a trigger for data input, synchronization for data transmission can be easily achieved.

[実施例コ 以下、添付図面を参照しながら1本発明の実施例を詳細
に説明する。
[Example 1] Hereinafter, an example of the present invention will be described in detail with reference to the accompanying drawings.

第1図は、本発明の一実施例にかかるデジタル処理シス
テムを示している。
FIG. 1 shows a digital processing system according to an embodiment of the invention.

このデジタル処理システムは、メイン的な動作を行うデ
ジタル処理装置lと、スレーブ的な動作を行うデジタル
処理装置2から構成されている。
This digital processing system is composed of a digital processing device 1 that performs a main operation and a digital processing device 2 that performs a slave operation.

デジタル処理装置!1において、CPU(中央処理装置
)11は、このデジタル処理装置1の動作制御を行うも
のであり、ROM(リード・オンリ・メモリ)12は、
CPUIIが実行する処理プログラムおよびその処理プ
ログラムを実行するときに必要な各種データを記憶する
ものであり、RAM(ランダム・アクセス・メモリ)1
3は、CPUIIのワークエリアを構成するものである
Digital processing device! 1, a CPU (central processing unit) 11 controls the operation of the digital processing device 1, and a ROM (read only memory) 12 includes:
RAM (Random Access Memory)1
3 constitutes the work area of the CPU II.

インターフェース装置14は、このデジタル処理装M1
とデジタル処理装置2の間で相互にデータをやりとりす
るためのものであり、その他の要素15は、このデジタ
ル処理装置1を構成する他の要素をあられしている。な
お、このその他の要素15は。
The interface device 14 is connected to this digital processing device M1.
The other elements 15 are used to exchange data between the digital processing apparatus 1 and the digital processing apparatus 1. Note that this other element 15 is as follows.

本発明と直接関係しないので、その詳細な説明を省略す
る。
Since it is not directly related to the present invention, detailed explanation thereof will be omitted.

これらのCPUII、ROM12、RAM13、インタ
ーフェース装置14、および、その他の装w15は、内
部バス16により相互に接続されており、これらの要素
間のデータのやりとりは、この内部バス16を介して行
われている。
These CPU II, ROM 12, RAM 13, interface device 14, and other devices w15 are interconnected by an internal bus 16, and data exchange between these elements is performed via this internal bus 16. ing.

デジタル処理装置2において、CPU21は、このデジ
タル処理装置2の動作制御を行うものであり、ROM2
2は、CPU21が実行する処理プログラムおよびその
処理プログラムを実行するときに必要な各種データを記
憶するものであり、RAM23は、CPU21のワーク
エリアを構成するものである。
In the digital processing device 2, the CPU 21 controls the operation of the digital processing device 2, and the ROM 2
2 stores a processing program executed by the CPU 21 and various data necessary for executing the processing program, and a RAM 23 constitutes a work area of the CPU 21.

インターフェース装置24は、このデジタル処理装置2
とデジタル処理装置lの間で相互にデータをやりとりす
るためのものであり、その他の要素25は、このデジタ
ル処理装置2を構成する他の要素をあられしている。な
お、このその他の要素25は、本発明と直接関係しない
ので、その詳細な説明を省略する。
The interface device 24 is connected to this digital processing device 2.
The other elements 25 are used to exchange data between the digital processing apparatus 2 and the digital processing apparatus 2. Note that this other element 25 is not directly related to the present invention, so a detailed explanation thereof will be omitted.

これらのCPU21、ROM22、RAM23.インタ
ーフェース装置24.および、その他の装M25は、内
部バス26により相互に接続されており、これらの要素
間のデータのやりとりは、この内部バス26を介して行
われている。
These CPU21, ROM22, RAM23. Interface device 24. The other devices M25 are interconnected by an internal bus 26, and data exchange between these elements is performed via this internal bus 26.

インターフェース装置14において、分周回路I4aは
、CPUl1から出力される転送クロック信号SPを分
周するものであり、その出力信号は、タイマ割込信号T
IとしてCPUIIの割込信号入力端に加えられている
。なお、分周回路14aの分周比は5例えば、転送クロ
ック信号SPの周期が1マイクロ秒程度である場合に、
タイマ割込信号TIの周期が5°ミリ秒程度になるよう
に設定されている。
In the interface device 14, the frequency dividing circuit I4a divides the frequency of the transfer clock signal SP output from the CPU11, and its output signal is the timer interrupt signal T.
I is added to the interrupt signal input terminal of CPU II. Note that the frequency dividing ratio of the frequency dividing circuit 14a is 5. For example, when the period of the transfer clock signal SP is about 1 microsecond,
The period of the timer interrupt signal TI is set to be approximately 5° milliseconds.

また、転送クロック信号SPは、インターフェース装置
i[14のパラレル/シリアル変換器14b、シリアル
/パラレル変換器14c、同期信号検出部14d、およ
び、アンド回路14eの一方の入力端に加えられるとと
もに、デジタル処理装置2のインターフェース族!24
に加えられている。
Further, the transfer clock signal SP is applied to one input terminal of the parallel/serial converter 14b, serial/parallel converter 14c, synchronization signal detection section 14d, and AND circuit 14e of the interface device i[14, and Processing device 2 interface group! 24
has been added to.

パラレル/シリアル変換器14bは、内部バス16を介
して、CPU1iからデジタル処理装置2に出力するデ
ータがセットされるものであり、シフトクロック信号S
Pに同期して、その記憶データを先頭ビットから順次1
ビツトづつ出力する。このパラレル/シリアル変換器1
4bから出力されるデータは、送信データ50として、
デジタル処理装置2のインターフェース装置24に加え
られている。
The parallel/serial converter 14b is set with data to be output from the CPU 1i to the digital processing device 2 via the internal bus 16, and is configured to receive a shift clock signal S.
In synchronization with P, the stored data is sequentially 1 from the first bit.
Output bit by bit. This parallel/serial converter 1
The data output from 4b is transmitted data 50,
It is added to the interface device 24 of the digital processing device 2.

ここで、デジタル処理装置1のインターフェース装置1
4からデジタル処理装置2のインターフェース装置24
に出力される送信データSD、および、インターフェー
ス装置24からインターフェース装置14に出力される
受信データRDは、第2図に示すように、1バイト(8
ビツト)のデータの先頭に、】ビットのデータ「0」か
らなる同期信号5yncを付加7たフォーマットをもつ
。また、無信号時には、送信データSDおよび受信デー
タRDは、データ「1」にクランプされている。
Here, the interface device 1 of the digital processing device 1
4 to the interface device 24 of the digital processing device 2
As shown in FIG. 2, the transmission data SD output to the
It has a format in which a synchronization signal 5ync consisting of data ``0'' of the ``] bit is added to the beginning of the data of the bit ``0''. Further, when there is no signal, the transmission data SD and the reception data RD are clamped to data "1".

同期信号検出部14dは、受信データRDの先頭に付加
されている同期信号5yncを検出するものであり、同
期信号5yncを検出すると、転送クロック信号SPの
8周期に相当する期間、イネーブル信号EAを論理Hレ
ベルに立上げる。このイネーブル信号EAは、アンド回
路14eの他方の入力端に加えられでいる。
The synchronization signal detection unit 14d detects the synchronization signal 5ync added to the beginning of the received data RD. When the synchronization signal 5ync is detected, the synchronization signal detection unit 14d outputs the enable signal EA for a period corresponding to eight cycles of the transfer clock signal SP. Raise to logic H level. This enable signal EA is applied to the other input terminal of the AND circuit 14e.

アンド回路14eは、イネーブル信号EAが論理Hレベ
ルに立上げられている期間動作可能な状態となり、その
ときに加えられている転送クロック信号SPを転送クロ
ック信号SPaとしてシリアル/パラレル変換器14c
に出力する。
The AND circuit 14e is operable while the enable signal EA is raised to the logic H level, and uses the transfer clock signal SP applied at that time as the transfer clock signal SPa to the serial/parallel converter 14c.
Output to.

シリアル/パラレル変換器14cは、転送クロック信号
SPaに同期して、受信データRDを入力するものであ
り、その出力ポートは、内部バス16に接続されている
The serial/parallel converter 14c inputs the received data RD in synchronization with the transfer clock signal SPa, and its output port is connected to the internal bus 16.

インターフェース装置24において、転送クロック信号
SPは、同期信号検出部24a、アンド回路24bの一
方の入力端、および、アンド回路24cの一方の入力端
に加えられている。
In the interface device 24, the transfer clock signal SP is applied to the synchronization signal detection section 24a, one input terminal of the AND circuit 24b, and one input terminal of the AND circuit 24c.

同期信号検出部24aは、送信データSDの先頭に付加
されている同期信号5yncを検出するものであり、同
期信号5yncを検出すると、転送クロック信号SPの
8周期に相当する期間、イネーブル信号EBを論理Hレ
ベルに立」−げ、その後、所定時間TAを経過し2てか
ら、転送クロック信号SPの9周期に相当する期間、イ
ネーブル信号ECを論理Hレベルに立上げる。このイネ
ーブル信号EBは、アンド回路24bの他方の入力端お
よびCPU21の割込信号入力端INTに加えられ、ま
た、イネーブル信号ECは、アンド回路24cの他方の
入力端に加えられている。
The synchronization signal detection unit 24a detects the synchronization signal 5ync added to the beginning of the transmission data SD. When the synchronization signal 5ync is detected, the synchronization signal detection unit 24a outputs the enable signal EB for a period corresponding to 8 cycles of the transfer clock signal SP. Then, after a predetermined time TA has elapsed, the enable signal EC is raised to a logic H level for a period corresponding to nine cycles of the transfer clock signal SP. This enable signal EB is applied to the other input terminal of the AND circuit 24b and the interrupt signal input terminal INT of the CPU 21, and the enable signal EC is applied to the other input terminal of the AND circuit 24c.

アンド回路24bは、イネーブル信号EBが論理Hレベ
ルに立上げられている期間動作可能な状態となり、その
ときに加えられている転送クロック信号SPを転送クロ
ック信号SPbとしてシリアル/パラレル変換器24d
に出力する。
The AND circuit 24b is operable while the enable signal EB is raised to the logic H level, and the serial/parallel converter 24d uses the transfer clock signal SP applied at that time as the transfer clock signal SPb.
Output to.

また、アンド回路24cは、イネーブル信号ECが論理
Hレベルに立上げられている期間動作可能な状態となり
、そのときに加えられている転送クロック信号SPを転
送クロック信号SPcとしてパラレル/シリアル変換器
24eに出力する。
Further, the AND circuit 24c is in an operable state while the enable signal EC is raised to the logic H level, and uses the transfer clock signal SP applied at that time as the transfer clock signal SPc to the parallel/serial converter 24e. Output to.

シリアル/パラレル変換器24dは、転送クロック信号
SPbに同期して、送信データSDを入力するものであ
り、その出力ポートは、内部バス26に接続されている
The serial/parallel converter 24d receives the transmission data SD in synchronization with the transfer clock signal SPb, and its output port is connected to the internal bus 26.

パラレル/シリアル変換器24eは、内部バス26を介
して、CPU21からデジタル処理装置1に出力するデ
ータがセントされるものであり、シフトクロック信号S
Pcに同期して、その記憶データを先頭ビットから順次
1ビツトづつ出力する。このパラレル/シリアル変換器
24eから出力されるデータは、受信データRDとして
、デジタル処理装置1のインターフェース装置14に加
えられている。
The parallel/serial converter 24e receives data output from the CPU 21 to the digital processing device 1 via the internal bus 26, and receives the shift clock signal S.
In synchronization with Pc, the stored data is sequentially output one bit at a time starting from the first bit. The data output from the parallel/serial converter 24e is applied to the interface device 14 of the digital processing device 1 as received data RD.

さて、CPUIIは、割込信号入力端INTに加えられ
ているタイマ割込信号T丁の立」二がリタイミングでタ
イマ割込み実行状態となり、そのときにCP T、、’
 I 1が実行する処理例を第3図に示す。
Now, the CPU II enters the timer interrupt execution state due to the retiming of the timer interrupt signal T applied to the interrupt signal input terminal INT, and at that time, CP T,,'
FIG. 3 shows an example of the processing executed by I1.

CPUIIは、タイマ割込み実行状態では、まず、シリ
アル/パラレル変換器14cの記憶データを読み込んで
、RAM13の所定の記憶領域にコピーする(処理10
1)。
In the timer interrupt execution state, the CPU II first reads the data stored in the serial/parallel converter 14c and copies it to a predetermined storage area of the RAM 13 (processing 10).
1).

次いで、R、A M 13の所定の記憶領域に記憶され
ているデジタル処理装置2に出力する1バイトのデータ
を読み出し、その1バイトデータの先頭に1ビツトのデ
ータ「0」からなる同期信号5yncを付加した状態で
、パラレル/シリアル変換器+4bに書込む(処理10
2)。
Next, 1 byte of data to be output to the digital processing device 2 stored in a predetermined storage area of the R, A M 13 is read out, and a synchronization signal 5 sync consisting of 1 bit of data "0" is placed at the beginning of the 1 byte data. is added to the parallel/serial converter +4b (processing 10
2).

ここで、CPUIIは、タイマ割込信号TIの周期に同
期して、一連の処理を実行しており、デジタル処理装置
2に出力するぞ一夕は、その一連の処理により形成され
て、RA〜113の所定の記憶領域に記憶される。
Here, the CPU II executes a series of processes in synchronization with the cycle of the timer interrupt signal TI, and outputs the output to the digital processing device 2. 113 in a predetermined storage area.

また、RAM13の所定領域に記憶された受信データR
Dの内容は、上述の一連の処理を実行するときに参照さ
れて、デジタル処理装置1の内部処理に取り込まれる。
In addition, received data R stored in a predetermined area of the RAM 13
The contents of D are referenced when executing the series of processes described above and are incorporated into the internal processing of the digital processing device 1.

第4図は、イネーブル信号ECの立ち下がりタイミング
で、CPU21が実行する割込み処理例を示している。
FIG. 4 shows an example of interrupt processing executed by the CPU 21 at the falling timing of the enable signal EC.

CPU2]は、割込信号入力端INTに加えられている
イネーブル信号ECが立ち下がると、シリアル/パラレ
ル変換器24dの記憶データを読み込んで、RAM23
の所定領域にコピーする(処理201)。
When the enable signal EC applied to the interrupt signal input terminal INT falls, the CPU 2 reads the data stored in the serial/parallel converter 24d and stores it in the RAM 23.
(processing 201).

ここで、CPU21は、CPU11と同様に、タイマ割
込信号TIの周期で一連の処理を実行しており、RAM
23の所定領域に記憶された送信データSDの内容は、
この一連の処理を実行するときに参照される。
Here, like the CPU 11, the CPU 21 executes a series of processes at the cycle of the timer interrupt signal TI, and
The contents of the transmission data SD stored in the predetermined area of 23 are as follows:
It is referenced when executing this series of processes.

また、デジタル処理装置1に出力するデータはその一連
の処理により形成され、先頭に同期信号5yncが付加
された状態で、パラレル/シリアル変換器24eに記憶
される。
Further, the data to be output to the digital processing device 1 is formed by the series of processing, and is stored in the parallel/serial converter 24e with the synchronization signal 5ync added to the beginning.

以上の構成で、タイマ割込信号TIが立上がると、上述
したように、CPUIIは、シリアル/パラレル変換器
14cの記憶データを読み込んだのちに、パラレル/シ
リアル変換器14bに送信データSDをセットする。
With the above configuration, when the timer interrupt signal TI rises, as described above, the CPU II reads the data stored in the serial/parallel converter 14c, and then sets the transmission data SD in the parallel/serial converter 14b. do.

これにより、第5図(a)〜(k)に示すように、パラ
レル/シリアル変換器14bからは、転送クロック信号
SPに同期して送信データSDが送出されて、インター
フェース装置24の同期信号検出部24aとシリアル/
パラレル変換器24dに加えられる。
As a result, as shown in FIGS. 5(a) to 5(k), the parallel/serial converter 14b sends out the transmission data SD in synchronization with the transfer clock signal SP, and the interface device 24 detects the synchronization signal. Part 24a and serial/
It is added to parallel converter 24d.

この送信データSDの先頭の同期信号5yncが同期信
号検出部24aで検出されると、同期信号検出部24a
は、イネーブル信号EBを立上げる。
When the synchronization signal 5sync at the beginning of this transmission data SD is detected by the synchronization signal detection section 24a, the synchronization signal detection section 24a
raises the enable signal EB.

これにより、転送クロック信号SPbがシリアル/パラ
レル変換器24dに加えられて、送信データSDがシリ
アル/パラレル変換器24dに記憶される。
As a result, the transfer clock signal SPb is applied to the serial/parallel converter 24d, and the transmission data SD is stored in the serial/parallel converter 24d.

また、同期信号検出部24aは、イネーブル信号EBを
立ち下げてから、所定時間TAを経過した時点で、イネ
ーブル信号ECを立上げる。
Further, the synchronization signal detection unit 24a raises the enable signal EC after a predetermined time TA has elapsed since the enable signal EB has been brought down.

これにより、転送クロック信号SPcがパラレル/シリ
アル変換器24eに加えられて、パラレル/シリアル変
換器24eに記憶されている受信データRDが、転送ク
ロック信号SPcに同期して出力され、インターフェー
ス装置14のシリアル/パラレル変換器14cおよび同
期信号検出部14dに加えられる。
As a result, the transfer clock signal SPc is applied to the parallel/serial converter 24e, and the received data RD stored in the parallel/serial converter 24e is outputted in synchronization with the transfer clock signal SPc. It is added to the serial/parallel converter 14c and the synchronization signal detection section 14d.

この受信データRDの先頭の同期信号5yncが同期信
号検出部14dで検出されると、同期信号検出部14d
は、イネーブル信号EAを立上げる。
When the synchronization signal 5ync at the beginning of this received data RD is detected by the synchronization signal detection section 14d, the synchronization signal detection section 14d
raises the enable signal EA.

これにより、転送クロック信号SPaがシリアル/パラ
レル変換器14cに加えられて、受信データRDがシリ
アル/パラレル変換器14cに記憶される。
As a result, the transfer clock signal SPa is applied to the serial/parallel converter 14c, and the received data RD is stored in the serial/parallel converter 14c.

このようにして、分周回路14.aからタイマ割込信号
TIが出力されると、インターフェース装置14のパラ
レル/シリアル変換器14bに記憶されてし)る送信デ
ータSDが、同期信号5yncを除去された状態でイン
ターフェース装置24のシリアル/パラレル変換器24
dに記憶されるとともに、インターフェース装置24の
パラレル/シリアル変換器24eに記憶されている受信
データRDが、同期信号5yncを除去された状態でイ
ンターフェース装置14のシリアル/パラレル変換器1
4cに記憶される。
In this way, the frequency divider circuit 14. When the timer interrupt signal TI is output from the interface device 14, the transmission data SD stored in the parallel/serial converter 14b of the interface device 14 is transmitted to the serial/serial converter 14b of the interface device 24 with the synchronization signal 5ync removed. parallel converter 24
The received data RD stored in the parallel/serial converter 24e of the interface device 24 is transferred to the serial/parallel converter 1 of the interface device 14 with the synchronization signal 5ync removed.
4c.

また、上述したように、デジタル処理装置lのCPUI
I、および、デジタル処理装置2のCPU21は、それ
ぞれタイマ割込信号TIの1周期単位にその内部処理を
実行しており、CP Ullがノ<ラレル/シリアル変
換器14bに対するデータセット、および、シリアル/
パラレル変換器14cからのデータ読み込みを実行する
とともに、CPU21がシリアル/パラレル変換器24
dからのデータ読み込み、および、パラレル/シリアル
変換器24eへのデータセットを行っているので、デジ
タル処理装置1のCPollとデジタル処理装置2のC
PU21は、それぞれ適切にデータのやりとりを行うこ
とができる。
In addition, as described above, the CPU of the digital processing device l
I and the CPU 21 of the digital processing device 2 each execute their internal processing in units of one period of the timer interrupt signal TI, and the CPU Ull is configured to perform the data set for the parallel/serial converter 14b and the serial /
While reading data from the parallel converter 14c, the CPU 21 reads the data from the serial/parallel converter 24c.
Since data is read from d and set to the parallel/serial converter 24e, CPoll of digital processing device 1 and CPoll of digital processing device 2
The PUs 21 can appropriately exchange data.

このようにして、インターフェース装置14およびイン
ターフェース装置24を用いて、双方向のデータ伝送を
実行することができる。
In this way, bidirectional data transmission can be carried out using interface device 14 and interface device 24.

以上のように1本実施例では、2つのパラレル/シリア
ル変換器14b、24e、および、2つのシリアル/パ
ラレル変換器14c、24dを用いてインターフェース
装@14.24の主要部を構成しているので、インタフ
ェース装置14.24のコストを大幅に低減することが
できる。
As described above, in this embodiment, two parallel/serial converters 14b, 24e and two serial/parallel converters 14c, 24d constitute the main part of the interface device @14.24. Therefore, the cost of the interface device 14.24 can be significantly reduced.

また、それぞれのデジタル処理袋W1,2のCPL’l
l、21は、分周回路14aから出力されるタイマ割込
信号TIの周期で、相手装置とやりとりするブタのセン
ト、および、取り込みを行えばよいので、時間的な制限
が緩やかであり、他の処理を圧迫することがなく、CP
 Ull、21の処理の自由度も広がる。
In addition, the CPL'l of each digital processing bag W1, 2
1, 21 is the period of the timer interrupt signal TI output from the frequency dividing circuit 14a, and since it is sufficient to exchange and receive data from the other device, the time limit is gentle, and other CP
The degree of freedom in processing Ull and 21 is also expanded.

ところで、上述した実施例では、無信号時の伝送データ
をデータ「1」にクランプするとともに、伝送データの
先頭に付加する同期信号として、1ビツトのデータ「0
」を用いているが、この無信号時のクランプ態様、およ
び、同期信号のビットパターンは、これに限ることはな
い。また、この同期信号の付加は、特定のビットパター
ンを発生するデータ発生回路により発生して付加するこ
ともできる。
By the way, in the embodiment described above, the transmission data when there is no signal is clamped to the data "1", and the 1-bit data "0" is added as a synchronization signal to the beginning of the transmission data.
", but the clamping mode when there is no signal and the bit pattern of the synchronization signal are not limited to this. Further, the synchronization signal can also be generated and added by a data generation circuit that generates a specific bit pattern.

[発明の効果] 以上説明したように、本発明によれば、双方向シリアル
インターフェースを簡単な装置構成で実現できるととも
に、一定時間間隔でデータの入出力を行っているので、
処理の負担が大幅に軽減される。また、伝送データの先
頭部に同期信号を付加して、その同期信号をデータ入力
動作のトリガとして用いているので、データ伝送のため
の同期を容易にとることができるという効果を得る。
[Effects of the Invention] As explained above, according to the present invention, a bidirectional serial interface can be realized with a simple device configuration, and data is input and output at fixed time intervals.
The processing burden is significantly reduced. Further, since a synchronization signal is added to the beginning of the transmission data and the synchronization signal is used as a trigger for data input operation, it is possible to easily synchronize data transmission.

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

第1図は本発明の一実施例にかかるデジタル処理システ
ムを示すブロック図、第2図は伝送データのフォーマッ
トを例示した概略図、第3図は一次側装置のCPUの処
理例を示すフローチャート、第4図は二次側装置のCP
Uの処理例を示すフローチャート、第5図は第1図の装
置の動作を説明するための動作波形図である。 14.24・・・インターフェース装置、14a・・・
分局回路、14b、24e・・・パラレル/シリアル変
換器、14c、24d・・・シリアル/パラレル変換器
、14d 、 24a・・・同期信号検出部、14e、
 24b、24c・・・アンド回路。
FIG. 1 is a block diagram showing a digital processing system according to an embodiment of the present invention, FIG. 2 is a schematic diagram illustrating the format of transmission data, and FIG. 3 is a flowchart showing an example of processing by the CPU of the primary side device. Figure 4 shows the CP of the secondary side device.
FIG. 5 is a flowchart showing an example of the processing of U. FIG. 5 is an operation waveform diagram for explaining the operation of the apparatus shown in FIG. 14.24...Interface device, 14a...
Branch circuit, 14b, 24e...Parallel/serial converter, 14c, 24d...Serial/parallel converter, 14d, 24a...Synchronization signal detection section, 14e,
24b, 24c...AND circuit.

Claims (2)

【特許請求の範囲】[Claims] (1)データ転送クロックを発生するデータ転送クロッ
ク発生手段と、上記データ転送クロックに同期して記憶
しているパラレルデータをシリアルデータに変換して出
力する第1のパラレル/シリアル変換器と、上記データ
転送クロックに同期して二次側装置から出力されるシリ
アルデータを入力する第1のシリアル/パラレル変換器
と、所定周期で上記第1のパラレル/シリアル変換器に
出力データをセットするとともに上記第1のシリアル/
パラレル変換器から入力データを読み込む第1の制御手
段を一次側装置に設ける一方、上記データ転送クロック
に同期して上記第1のパラレル/シリアル変換器から出
力されるシリアルデータを入力する第2のシリアル/パ
ラレル変換器と、上記転送クロックに同期して記憶して
いるパラレルデータをシリアルデータに変換して出力す
る第2のパラレル/シリアル変換器と、所定周期で上記
第2のパラレル/シリアル変換器に出力データをセット
するとともに上記第2のシリアル/パラレル変換器から
入力データを読み込む第2の制御手段を二次側装置に設
け、上記第2のパラレル/シリアル変換器から出力され
るシリアルデータは上記第1のシリアル/パラレル変換
器に入力されることを特徴とするシリアルインターフェ
ース方式。
(1) a data transfer clock generating means for generating a data transfer clock; a first parallel/serial converter for converting stored parallel data into serial data and outputting the serial data in synchronization with the data transfer clock; a first serial/parallel converter that inputs serial data output from a secondary device in synchronization with a data transfer clock; 1st serial/
A first control means for reading input data from the parallel converter is provided in the primary side device, and a second control means for inputting serial data output from the first parallel/serial converter in synchronization with the data transfer clock. a serial/parallel converter; a second parallel/serial converter that converts the stored parallel data into serial data in synchronization with the transfer clock and outputs the serial data; A second control means is provided in the secondary side device for setting output data in the converter and reading input data from the second serial/parallel converter, and the second control means sets the output data to the serial converter and reads the input data from the second serial/parallel converter. is input to the first serial/parallel converter.
(2)前記第1および第2のパラレル/シリアル変換器
から出力されるデータの先頭には、所定ビットパターン
からなる同期信号が付加される一方、前記一次側装置お
よび二次側装置は、前記第1および第2のシリアル/パ
ラレル変換器の入力データの先頭部に付加される上記同
期信号を検出すると、その第1および第2のシリアル/
パラレル変換器へのデータ入力を開始することを特徴と
する請求項1記載のシリアルインターフェース方式。
(2) A synchronization signal consisting of a predetermined bit pattern is added to the beginning of the data output from the first and second parallel/serial converters, while the primary side device and the secondary side device When the synchronization signal added to the beginning of the input data of the first and second serial/parallel converters is detected, the first and second serial/parallel converters
2. The serial interface system according to claim 1, further comprising the step of starting data input to a parallel converter.
JP2096556A 1990-04-13 1990-04-13 Serial interface system Pending JPH03295332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2096556A JPH03295332A (en) 1990-04-13 1990-04-13 Serial interface system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2096556A JPH03295332A (en) 1990-04-13 1990-04-13 Serial interface system

Publications (1)

Publication Number Publication Date
JPH03295332A true JPH03295332A (en) 1991-12-26

Family

ID=14168333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2096556A Pending JPH03295332A (en) 1990-04-13 1990-04-13 Serial interface system

Country Status (1)

Country Link
JP (1) JPH03295332A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07219631A (en) * 1994-02-04 1995-08-18 Miura Co Ltd Control unit for equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07219631A (en) * 1994-02-04 1995-08-18 Miura Co Ltd Control unit for equipment

Similar Documents

Publication Publication Date Title
JP2863653B2 (en) Microcomputer with built-in communication device
JPH03295332A (en) Serial interface system
US5734684A (en) Demodulation device and communication processing apparatus provided with same
JP2003202907A (en) Method for synchronizing plc module with option module
JP2006048284A (en) Programmable controller device and method for synchronizing with option module
JPS62160564A (en) Pipeline control system
KR0184402B1 (en) Interrupt generating apparatus for i bus
JP4547821B2 (en) Exclusive control circuit for different period sequencer
JP3697039B2 (en) Image forming apparatus and image processing setting method
JP2502030B2 (en) Synchronizer for a synchronous data processing system.
JPH08228157A (en) Data transfer circuit
JPH01170142A (en) Data transmission system
JP2806568B2 (en) Common bus control method
JP4164990B2 (en) Data communication system
JPS60225269A (en) Data transfer system
JP2002366945A (en) Device and method for processing image
JPS63150703A (en) Transmission equipment for programmable controller
JP2006079480A (en) Method for synchronizing module type programmable controller and programmable controller
JPH0773139A (en) Buffer data transfer device
JPH0240754A (en) Dma unit
JPH01245732A (en) Timing generator in serial communication
JPH049350B2 (en)
JPH05108564A (en) Data transfer bus system
JPH0433183B2 (en)
JPH04131957A (en) Data transfer system