JP2575049B2 - Serial data receiving device - Google Patents

Serial data receiving device

Info

Publication number
JP2575049B2
JP2575049B2 JP20324888A JP20324888A JP2575049B2 JP 2575049 B2 JP2575049 B2 JP 2575049B2 JP 20324888 A JP20324888 A JP 20324888A JP 20324888 A JP20324888 A JP 20324888A JP 2575049 B2 JP2575049 B2 JP 2575049B2
Authority
JP
Japan
Prior art keywords
data
frame
signal
address
supplied
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.)
Expired - Lifetime
Application number
JP20324888A
Other languages
Japanese (ja)
Other versions
JPH0252543A (en
Inventor
博 水口
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 JP20324888A priority Critical patent/JP2575049B2/en
Publication of JPH0252543A publication Critical patent/JPH0252543A/en
Application granted granted Critical
Publication of JP2575049B2 publication Critical patent/JP2575049B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、マイクロプロセッサに内蔵されるシリアル
データの受信装置に関するものである。
Description: TECHNICAL FIELD The present invention relates to a serial data receiving device built in a microprocessor.

(従来の技術) 従来からワンチップのマイクロプロセッサ等において
多用されているシリアルデータの通信装置は、シフトレ
ジスタとシフトカウンタとバッファレジスタとによって
構成され、その典型的な例が特公昭60−58482号公報に
示されている。
(Prior Art) Conventionally, a serial data communication device often used in a one-chip microprocessor or the like is composed of a shift register, a shift counter, and a buffer register. A typical example thereof is Japanese Patent Publication No. 60-58482. It is indicated in the gazette.

近年、マイクロプロセッサの普及はめざましく、多く
の家庭用電気機器に使用されるようになり、VTR等にお
いては1台当り数個のマイクロプロセッサが使用されて
いることも珍しくない。数多くのマイクロプロセッサが
組み込まれた機器では、プロセッサ間の情報交換の手段
としてシリアル通信が多用される。情報の送信方法とし
ては、4ビット又は8ビット単位のフレームを数ブロッ
ク連続して送信するが、その先頭フレームには送信相手
となるプロセッサの識別データが割り当てられる。
2. Description of the Related Art In recent years, microprocessors have been remarkably popularized and have been used in many household electric appliances. It is not uncommon for VTRs and the like to use several microprocessors per unit. In a device incorporating many microprocessors, serial communication is frequently used as a means for exchanging information between processors. As a method of transmitting information, a frame in units of 4 bits or 8 bits is transmitted continuously for several blocks, and identification data of a processor to be transmitted is assigned to the first frame.

(発明が解決しようとする問題点) ところが、プロセッサ間の相互通信量が増加して、共
通のシリアル通信線に間断なく情報が行き来するように
なると、各プロセッサは、その情報を正確に受け取るた
めに、データの受信に多大の労力を払わなければならな
くなる。
(Problems to be Solved by the Invention) However, when the amount of mutual communication between the processors increases and information comes and goes without interruption to a common serial communication line, each processor receives the information accurately. In addition, a great deal of effort must be paid to data reception.

即ち、各プロセッサは、シリアルバッファにシリアル
データの1フレーム分の読み込みが完了する毎にシリア
ル割り込み処理を開始して、シリアルバッファの内容を
解読し、それがそのプロセッサに対して送られた情報で
あるか否かを、それぞれのシリアル割り込み処理ルーチ
ンの中で判断しなげればならない。又、その情報が他の
プロセッサに対して送られたものであっても、少なくと
も識別データを解読するまでの処理は行わなければなら
ず、負担が大きかった。
That is, each processor starts a serial interrupt process each time reading of one frame of serial data into the serial buffer is completed, and decodes the contents of the serial buffer. Whether or not it exists must be determined in each serial interrupt processing routine. Further, even if the information is sent to another processor, at least processing until decoding of the identification data has to be performed, which is a heavy burden.

このため、シリアルデータの受信をソフトウェア主導
にせずに、識別のデータの識別をハードウェアで行う方
法が提案されているが、その場合には、各プロセッサ毎
に識別番号が異なるので、各プロセッサはハードウェア
回路にそれぞれの識別番号を持たなければならず、識別
番号の変更や共有識別番号の設定等に対しては柔軟性が
失われてしまうという問題があった。
For this reason, a method has been proposed in which identification data is identified by hardware without receiving serial data reception by software.In such a case, the identification number differs for each processor. The hardware circuits must have their own identification numbers, and there is a problem in that the flexibility is lost when changing the identification numbers or setting the shared identification numbers.

更に、最近では、通信すべき情報量に応じた可変長デ
ータが用いられるが、それに伴い、1回当りの通信にお
けるフレーム数がまちまちになって、ソフトウェア或い
はハードウェアの負担が重くなるという問題があった。
Furthermore, recently, variable-length data according to the amount of information to be communicated is used, but with this, the number of frames in one communication varies, and the burden on software or hardware increases. there were.

本発明は、このような問題に鑑みてなされたもので、
本発明の第1の目的は、アドレス付きの可変長データの
処理が容易に行える受信装置を実現することにあり、本
発明の第2の目的は、マイクロプロセッサの割り込み処
理を用いることによって、1フレーム分の受信が終了す
る毎に受信データの処理を行える受信装置を実現するこ
とにあり、本発明の第3の目的は、アドレス付きの可変
長データの受信装置において、アドレス部とデータ部の
区分けが明確に行える受信装置を実現することにあり、
本発明の第4の目的は、連続したフレームのデータをマ
イクロプロセッサの処理に負担を掛けることなく処理で
きる受信装置を実現することにある。
The present invention has been made in view of such a problem,
A first object of the present invention is to realize a receiving apparatus capable of easily processing variable-length data with an address. A second object of the present invention is to provide a receiving apparatus using an interrupt process of a microprocessor. A third object of the present invention is to realize a receiving apparatus capable of processing received data every time reception of a frame is completed. In order to realize a receiving device that can clearly distinguish,
A fourth object of the present invention is to realize a receiving apparatus capable of processing continuous frame data without imposing a load on the processing of a microprocessor.

(課題を解決するための手段) 本発明は、シリアルデータ入力端子から供給される連
続したNフレームのデータ列を並列変換して格納するM
フレーム(但し、1<M<N)分の受信バッファメモリ
と、受信バッファメモリに格納されたアドレス情報が自
己アドレスに一致するかどうかを判別するアドレス判別
手段と、1フレーム分のデータの受信が完了する毎にフ
レーム更新クロックを出力する更新クロック発生手段
と、アドレス判別手段からの一致信号に応答して、受信
データのデータ長情報に基づいたフレーム期間だけ更新
クロックに同期した割り込み要求信号をマイクロプロセ
ッサに送出する受信フレーム数設定手段と、割り込み要
求信号に基づくマイクロプロセッサからの命令によって
データバスに受信バッファメモリの格納データを送出す
る接続手段とを備えている。
(Means for Solving the Problems) According to the present invention, there is provided an M which stores a data string of consecutive N frames supplied from a serial data input terminal after converting the data string into parallel.
The reception buffer memory for 1 (M <N) frames, address discrimination means for discriminating whether the address information stored in the reception buffer memory matches the self address, and the reception of data for 1 frame In response to the coincidence signal from the address discriminating means, an update clock generating means for outputting a frame updating clock each time the processing is completed, and an interrupt request signal synchronized with the update clock for a frame period based on the data length information of the received data. A receiving frame number setting means for sending to the processor and a connecting means for sending data stored in the receiving buffer memory to the data bus in accordance with an instruction from the microprocessor based on the interrupt request signal are provided.

(作 用) 本発明によれば、受信バッファメモリにより、アドレ
ス判別手段からの一致信号に応答して、受信フレーム数
設定手段がメモリ手段に格納されたデータ長情報に基づ
いたフレーム数だけ順次受信データをデータバスに送出
せしめ、アドレス判別手段により、アドレス判別手段が
一致信号を出力した後は、マイクロプロセッサに対する
割り込み要求信号が、メモリ手段に格納されたデータ長
情報に基づいたフレーム数の受信が完了するまで、各フ
レームの受信が完了する毎に出力され、更新クロック発
生手段により、判別許可フラグが許可信号を出力する先
頭フレームにおいてのみ有効なアドレス判別が行われ、
受信フレーム数設定手段により、2フレーム分のデータ
を格納するメモリ手段には、常に先行フレームのデータ
が保存されるので、マイクロプロセッサにおけるデータ
処理時間に余裕が生れる。
(Operation) According to the present invention, the receiving buffer memory responds to the coincidence signal from the address discriminating means, and the receiving frame number setting means sequentially receives the number of frames based on the data length information stored in the memory means. After the data is transmitted to the data bus and the address discriminating means outputs the coincidence signal by the address discriminating means, the interrupt request signal to the microprocessor receives the number of frames based on the data length information stored in the memory means. Until the completion, the output is performed every time the reception of each frame is completed, and the update clock generation means performs a valid address determination only in the first frame in which the determination permission flag outputs the permission signal,
Since the data of the preceding frame is always stored in the memory for storing the data of two frames by the number-of-received-frames setting unit, the data processing time in the microprocessor has a margin.

(実施例) 以下、本発明の一実施例について図面を参照しながら
説明する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

第1図は、本発明の一実施例におけるシリアルデータ
の受信装置の構成図を示すもので、シリアルクロック端
子1を介して受信クロックが供給される4ビットの定レ
ベル循環型のシフトレジスタAと、このシフトレジスタ
Aの循環回数をカウントする2ビットのカウンタBと、
並列データがマイクロプロセッサのデータバス2に送出
されると、シフトレジスタAとカウンタBとの出力によ
ってデコードされたビット位置のデータがシリアルデー
タ入力端子3から供給される16ビットの受信バッファメ
モリC(以下「メモリC」という)と、データバス2か
ら供給される比較データとメモリCに格納されたデータ
とを比較するディジタルコンパレータDと、1フレーム
分のデータの受信が完了する毎にフレーム更新クロック
を出力するフレーム更新フリップフロップ4と、メモリ
Cに格納されたデータ長情報に基づいたフレーム数だけ
更新クロックをカウントすることにより、可変長データ
をデータバスに送出せしめる受信フレーム数設定ブロッ
クEとによって主要部が構成されている。
FIG. 1 is a block diagram of a serial data receiving apparatus according to an embodiment of the present invention, in which a 4-bit constant-level cyclic shift register A to which a receiving clock is supplied via a serial clock terminal 1 is provided. A 2-bit counter B for counting the number of circulations of the shift register A,
When the parallel data is sent to the data bus 2 of the microprocessor, the data at the bit position decoded by the outputs of the shift register A and the counter B is supplied from the serial data input terminal 3 to the 16-bit reception buffer memory C ( Hereinafter, referred to as “memory C”), a digital comparator D for comparing comparison data supplied from the data bus 2 with data stored in the memory C, and a frame update clock every time reception of one frame of data is completed. And a reception frame number setting block E for sending variable length data to the data bus by counting update clocks by the number of frames based on the data length information stored in the memory C. The main part is configured.

又、シフトレジスタAの第1ビットの出力信号とカウ
ンタBの第1ビットの出力信号とは、ANDゲートA1を介
して、フレーム更新フリップフロップ4のD端子に供給
される。
The first bit of the output signal of the first bit of the output signal and the counter B of the shift register A and, via the AND gates A 1, is supplied to the D terminal of the frame update flip-flop 4.

受信フレーム数設定ブロックEは、2ビットのフレー
ムカウンタE1と、フレームカウンタE1の各ビットの出力
信号が入力端子に供給されるORゲートE2と、フレームカ
ウンタE1にプリセット信号を供給するANDゲートE3と、O
RゲートE2の出力がD端子に供給される割り込み要求フ
リップフロップE4と、リセット側の入力がエッジ動作型
となっている判別許可フラグE5と、インバータE6と、AN
DゲートE7とによって構成されている。
Number of received frame setting block E supplies a second frame counter E 1 bit, an OR gate E 2 the output signal of each bit of the frame counter E 1 is supplied to the input terminal, a preset signal to the frame counter E 1 AND gate E 3 and O
The interrupt request flip-flop E 4 the output of the R gate E 2 is supplied to the D terminal, a determination permission flag E 5 the input of the reset side is an edge-operation, the inverter E 6, AN
It is constituted by a D gate E 7.

フレーム更新フリップフロップ4の出力信号は、クロ
ック信号として、フレームカウンタE1のクロック端子
と、割り込み要求フリップフロップE4のクロック端子
と、ANDゲートE3の入力端子と、インバータE6の入力端
子とに供給され、インバータE6の出力信号は、判別許可
フラグE5のリセット端子に供給される。判別許可フラグ
E5の出力信号は、ANDゲートE3の入力端子と、ディジタ
ルコンパレータDの出力許可端子OEとに供給され、ディ
ジタルコンパレータDの出力信号は、ORゲート5を介し
て、ANDゲートE3の第3の入力端子に供給される。割り
込み要求フリップフロップE4の出力信号は、シリアル割
り込み信号出力端子6に供給される。
The output signal of the frame update flip-flop 4, as a clock signal, a clock terminal of the frame counter E 1, a clock terminal of the interrupt request flip-flop E 4, an input terminal of the AND gate E 3, an input terminal of the inverter E 6 is supplied to the output signal of the inverter E 6 is supplied to the reset terminal of the determination permission flag E 5. Discrimination permission flag
The output signal of the E 5 is an input terminal of the AND gate E 3, are supplied to the output enable terminal OE of the digital comparator D, the output signal of the digital comparator D via the OR gate 5, the AND gate E 3 3 input terminal. The output signal of the interrupt request flip-flop E 4 is supplied to the serial interrupt signal output terminal 6.

リセット端子7には初期化信号が供給され、クリア端
子8にはソフトウェアによるリセット信号が供給され
る。
The reset terminal 7 is supplied with an initialization signal, and the clear terminal 8 is supplied with a software reset signal.

シリアルデータ入力端子3からの信号は、シュミット
形式のインバータ9とインバータ10とを介して、メモリ
Cのシリアルデータ入力端子C10に供給される。
Signal from the serial data input terminal 3 through the inverter 9 and the inverter 10 of the Schmitt format, is supplied to the serial data input terminal C 10 of the memory C.

シリアルクロック端子1からのクロック信号とシステ
ムクロック入力端子11からのクロック信号とによってタ
イミング信号発生回路Fで作り出したタイミング信号
は、メモリCのシリアルデータ読み取りクロック入力端
子C30に供給される。
The timing signal generated by the timing signal generation circuit F based on the clock signal from the serial clock terminal 1 and the clock signal from the system clock input terminal 11 is supplied to a serial data read clock input terminal C30 of the memory C.

メモリCの出力信号は、16ビットのバススイッチャG
を介して、データバス2に供給され、メモリCの並列出
力をデータバス2に読み込むためのセレクト信号がブロ
ックセレクト端子12からバススイッチャGに供給され
る。
The output signal of the memory C is a 16-bit bus switcher G
And a select signal for reading the parallel output of the memory C to the data bus 2 from the block select terminal 12 to the bus switcher G.

メモリCの最上位ビットD15のデータはORゲート5の
入力端子に供給され、メモリCのD14からD10までの5ビ
ットのデータはアドレス情報としてディジタルコンパレ
ータDに供給され、メモリCのD1及びD0の2ビットのデ
ータはプリセットデータとしてフレームカウンタE1に供
給される。
The data of the most significant bit D15 of the memory C is supplied to the input terminal of the OR gate 5, the 5-bit data of D14 to D10 of the memory C is supplied to the digital comparator D as address information, and the data of D1 and D0 of the memory C are 2-bit data is supplied to the frame counter E 1 as preset data.

このように構成されたシリアルデータの受信装置の動
作について、第2図のシリアルデータのフレームの説明
図及び第3図の主要部のタイミングチャートをもとに説
明する。
The operation of the serial data receiving apparatus thus configured will be described with reference to the explanatory diagram of the serial data frame in FIG. 2 and the timing chart of the main part in FIG.

先ず、第2図はシリアルデータ入力端子3に供給され
るデータ列のフォーマットを示したもので、第1〜4フ
レームはそれぞれ8ビットのデータ列からなる。
First, FIG. 2 shows a format of a data string supplied to the serial data input terminal 3. The first to fourth frames are each composed of an 8-bit data string.

先頭フレームである第1フレームの下位2ビットのB0
及びB1は後続フレーム数を表わし、B2からB6までの5ビ
ットは指定アドレスを表わし、最上位ビットのB7は、シ
リアルデータを受信する各ブロックに対する供通情報で
あるか、或いは、B2からB6までの5ビットで表わされる
特定ブロック向けの情報であるかを区別する識別ビット
として使われるもので、最上位ビットのB7が“1"のとき
には、後続するデータが共通情報であることを表わす。
B0 of lower 2 bits of the first frame which is the first frame
And B1 represent the number of succeeding frames, 5 bits from B2 to B6 represent a designated address, and B7 of the most significant bit is serving information for each block receiving serial data, or B2 to B6 These bits are used as identification bits for distinguishing whether or not the information is for a specific block represented by the five bits. When B7 of the most significant bit is "1", it indicates that the following data is common information.

又、第2〜4フレームにはそれぞれ受け取るべき情報
が含まれている。
The second to fourth frames each include information to be received.

次に、第3図において、Aはシリアルクロック端子1
から供給されるクロック信号波形を、Bはリセット端子
7から供給されるリセット信号波形を、C,D,E及びFは
何れもシフトレジスタAの各ビットの出力信号波形を、
G及びHは何れもカウンタBの各ビットの出力信号波形
を、Iはフレーム更新フリップフロップ4の出力信号波
形を、Jは判別許可フラグE5の出力信号波形を、Kはフ
レームカウンタE1の第1ビットの出力信号波形を、Lは
フレームカウンタE1の第2ビットの出力信号波形を、M
はANDゲートE3の出力信号波形を、Nは割り込み要求フ
リップフロップE4の出力信号波形を、Oはシリアルデー
タ入力端子3から供給されるデータがメモリCに読み込
まれるタイミングを、それぞれ示す。
Next, in FIG. 3, A is the serial clock terminal 1
B, the reset signal waveform supplied from the reset terminal 7, C, D, E, and F each represent the output signal waveform of each bit of the shift register A,
The output signal waveforms of each bit of G and H are both counters B, I is the output signal waveform of frame update flip-flop 4, J is an output signal waveform of the determination permission flag E 5, K is the frame counter E 1 the first bit of the output signal waveform, L is the second bit of the output signal waveform of the frame counter E 1, M
Is an output signal waveform of the AND gates E 3, N is the output signal waveform of the interrupt request flip-flop E 4, O is the timing data supplied from the serial data input terminal 3 is loaded into memory C, respectively.

本実施例によってシリアルデータの受信を開始すると
きには、リセット端子7のレベルを“1"に移行させて、
シフトレジスタAの状態を予め[0001]にリセットする
と共に、カウンタB及びフレーム更新フリップフロップ
4をリセットする。この場合、リセット端子7には、一
般に、ソフトウェアによるリセット信号或いはシリアル
データの送信開始位置を表わす信号が供給される。
When serial data reception is started according to the present embodiment, the level of the reset terminal 7 is shifted to “1”,
The state of the shift register A is reset to [0001], and the counter B and the frame update flip-flop 4 are reset. In this case, the reset terminal 7 is generally supplied with a reset signal by software or a signal indicating a transmission start position of serial data.

そして、シリアルクロック端子1に受信用のクロック
信号を供給すれば、そのクロック信号のリーディングエ
ッジ(前縁)が到来する毎に、シフトレジスタAの並列
出力値が第3図のC〜Fに示すように、[1000],[01
00],・・・・[0000]と変化していき、その出力値の
循環回数をカウントする。
Then, if a receiving clock signal is supplied to the serial clock terminal 1, the parallel output value of the shift register A is shown by C to F in FIG. 3 every time the leading edge (leading edge) of the clock signal arrives. So, [1000], [01
[0000], and the number of circulations of the output value is counted.

すると、カウンタBの出力状態も、第3図のG及びH
に示すように変化して、シリアルデータ入力端子3から
メモリCに書き込まれるデータのビット位置も最上位ビ
ットから最下位ビットに向かって順次切り換えられてい
く。
Then, the output state of the counter B also changes to G and H in FIG.
, The bit position of the data written from the serial data input terminal 3 to the memory C is also sequentially switched from the most significant bit to the least significant bit.

このように、タイミング信号発生回路FからメモリC
に供給されるタイミング信号がアクティブ状態になった
ときに、選択されたビット位置に受信データが書き込ま
れていく。即ち、シフトレジスタAが並列出力値[000
1]になって、カウンタBの第1ビットの出力が“0"に
なると、フレーム更新フリップフロップ4のD端子のレ
ベルは“1"に移行するので、シリアルブロック端子1か
ら供給されるクロック信号のトレイリングエッジ(後
縁)が時刻t1に到来すると、フレーム更新フリップフロ
ップ4の出力レベルは第3図のIに示すように“1"に移
行する。
As described above, the timing signal generation circuit F transfers the memory C
When the timing signal supplied to the input terminal becomes active, the received data is written to the selected bit position. That is, the shift register A outputs the parallel output value [000
1], when the output of the first bit of the counter B becomes “0”, the level of the D terminal of the frame update flip-flop 4 shifts to “1”, so that the clock signal supplied from the serial block terminal 1 When the trailing edge of ( 1 ) arrives at time t1, the output level of the frame update flip-flop 4 shifts to "1" as shown by I in FIG.

ところで、フレーム更新フリップフロップ4の出力信
号は、フレームカウンタE1と割り込み要求フリッププロ
ップE4のクロック信号となるが、フレームカウンタE1
出力が[00]のときは、ORゲートE2の出力レベルも“0"
となるので、フレームカウンタE1と割り込み要求フリッ
ププロップE4との出力レベルは変化しない。
Meanwhile, the output signal of the frame update flip-flop 4 is a clock signal of the frame counter E 1 and interrupt request flip-flop E 4, when the output of the frame counter E 1 is [00], the OR gate E 2 output Level is also "0"
Since the output level of the frame counter E 1 and interrupt request flip-flop E 4 is not changed.

一方、判別許可フラグE5の出力レベルは“1"になって
いるので、ディジタルコンパレータDは、それまでにデ
ータバス2を介して一方の入力端子群CHAに供給されて
いる自己アドレスデータとメモリCから他方の入力端子
群CHBに供給されるアドレス情報とを比較する。そし
て、両者が一致したときには、ディジタルコンパレータ
Dの比較出力端子CMPからの出力レベルを“1"に移行さ
せるので、ANDゲートE3の出力レベルは“1"に移行し
て、フレームカウンタE1はメモリCから供給される値に
プリセットされる。
On the other hand, the output level of the determination permission flag E 5 is is "1", the digital comparator D is a self-address data via the data bus 2 so far has been supplied to one input terminal group CH A comparing the address information supplied from the memory C to the other input terminal group CH B. When they match, the output level from the comparison output terminal CMP of the digital comparator D shifts to “1”, so that the output level of the AND gate E 3 shifts to “1” and the frame counter E 1 It is preset to a value supplied from the memory C.

例えば、時刻t1において、メモリCから[10]のプリ
セットデータが供給されていれば、フレームカウンタE1
のカウント値は、第3図のK及びLに示すように、[1
0]にプリセットされる。
For example, at time t 1, if preset data supply [10] from the memory C, the frame counter E 1
The count value of [1] as shown by K and L in FIG.
0].

又、時刻t2において、シリアルクロック端子1から供
給されるクロック信号のトレイリングエッジが到来する
と、フレーム更新フリップフロップ4の出力レベルが
“0"に移行して、フレームカウンタE1のプリセット期間
が終了する。
Further, at time t 2, the the trailing edge of the clock signal supplied from the serial clock terminal 1 arrives, the processing proceeds to the output level of the frame update flip-flop 4 is "0", the preset period of the frame counter E 1 finish.

ところで、時刻t1からの第2フレームの8ビットデー
タはメモリCの下位バイト側に格納されていくが、時刻
t3において、シリアルクロック端子1から供給されるク
ロック信号のトレイリングエッジが到来すると、時刻t1
のときと同様に、フレーム更新フリップフロップ4の出
力レベルが“1"に移行する。ところが、ORゲートE2の出
力レベルはこのとき“1"になっているので、フレームカ
ウンタE1はダウンカウントを行って、フレームカウンタ
E1の出力が[01]になると共に、割り込み要求フリップ
フロップE4の出力レベルが“1"に移行して、割り込み要
求信号がマイクロプロセッサに送出され、マイクロプロ
セッサは割り込み処理ルーチンを開始する。すると、ク
リア端子8の出力レベルはこの割り込み処理ルーチンに
よって一時的に“1"に移行して、割り込み要求フリップ
フロップE4がリセットされると共に、ブロックセレクト
端子12の出力レベルが“1"に移行するので、バススイッ
チャGはメモリCからデータバスを介して受信データを
読み取る。
Meanwhile, 8-bit data of the second frame from the time t 1 is gradually stored in the lower byte of the memory C, but time
In t 3, when the trailing edge of the clock signal supplied from the serial clock terminal 1 arrives, the time t 1
As in the case of (1), the output level of the frame update flip-flop 4 shifts to "1". However, since the output level of the OR gate E 2 is made at this time "1", the frame counter E 1 went down count, frame counter
The output of the E 1 together with becomes [01], the interrupt request output level of the flip-flop E 4 is shifted to "1", an interrupt request signal is sent to the microprocessor, the microprocessor starts the interrupt processing routine. Then, the output level of the clear terminal 8 is shifted temporarily to "1" by the interrupt processing routine, the interrupt request with the flip-flop E 4 is reset, goes to the output level of the block select terminal 12 is "1" Therefore, the bus switcher G reads the received data from the memory C via the data bus.

更に、時刻t4において、シリアルクロック端子1から
供給されるクロック信号のトレイリングエッジが到来す
ると、時刻t3のときと同様に、割り込み要求フリップフ
ロップE4の出力レベルが“1"に移行して、マイクロプロ
セッサは割り込み処理ルーチンを開始する。同時に、フ
レームカウンタE1のカウント値は[00]になるので、そ
れ以後は、リセット端子7から初期化信号が供給されな
い限り、割り込み処理要求信号は出力されない。
Further, at time t 4, the trailing edge of the clock signal supplied from the serial clock terminal 1 arrives, as in the case of time t 3, the output level of the interrupt request flip-flop E 4 is shifted to "1" Then, the microprocessor starts an interrupt processing routine. At the same time, since the count value of the frame counter E 1 becomes [00], thereafter as long as the initialization signal is not supplied from the reset terminal 7, the interrupt processing request signal is not output.

即ち、フレームカウンタE1は、メモリCに読み込んだ
データ長情報に基づいたフレーム数だけフレーム更新フ
リップフロップ4からの更新クロックをカウントするの
で、任意のフレーム数の可変長データを容易に処理する
ことができる。
That is, since the frame counter E 1 counts the number of update clocks from the frame update flip-flop 4 by the number of frames based on the data length information read into the memory C, it is possible to easily process variable-length data of an arbitrary number of frames. Can be.

一方、時刻t1におけるディジタルコンパレータDでの
アドレスの比較の結果、アドレスが一致していなけれ
ば、ANDゲートE3の出力レベルは“0"のまま変化しない
ので、割り込み要求フリップフロップE4は割り込み要求
信号を出力しない。
On the other hand, the result of the comparison of the address of the digital comparator D at time t 1, if no address match, does not change from the AND output level of the gate E 3 is "0", the interrupt request flip-flop E 4 interrupts Does not output request signal.

これに対して、シリアルデータの先頭の第1フレーム
において、メモリCの最上位ビットD15に格納されたデ
ータが“1"であれば、ANDゲートE3の出力レベルはディ
ジタルコンパレータDでの比較結果に拘らず“1"にな
り、アドレスが一致したときと同じ処理が行われる。
In contrast, in the first frame of the head of the serial data, if the data stored in the most significant bit D15 of the memory C is "1", the comparison result of the output level of the AND gate E 3 is a digital comparator D Regardless of this, it becomes "1" and the same processing as when the addresses match is performed.

このように、本実施例によれば、アドレス付きの可変
長データの処理を容易に行える上、割り込み要求フリッ
プフロップE4がマイクロプロセッサに対する割り込み要
求信号を発生するので、割り込み処理よって、1フレー
ム分の受信が終了する毎に受信データの処理を行わせる
ことができる。勿論、メモリCの容量が大きければ、数
フレーム分の受信が終了した後に受信データの処理を一
挙に行わせることもできる。
Thus, according to this embodiment, on enable easy processing of the variable length data with addresses, the interrupt request flip-flop E 4 generates an interrupt request signal to the microprocessor, interrupt processing thus one frame Every time the reception of the received data is completed. Of course, if the capacity of the memory C is large, the processing of the received data can be performed all at once after the reception of several frames is completed.

又、本実施例によれば、判別許可フラグE5によってシ
リアルデータの先頭フレームと後続フレームとの区別、
即ち、アドレス部とデータ部との区分けが明確に行える
ので、アドレス情報と一般情報とが交錯して、誤動作を
引き起こす恐れもない。
Moreover, distinction according to the present embodiment, the determination permission flag E 5 and the top frame of the serial data and the succeeding frame,
That is, since the address portion and the data portion can be clearly distinguished from each other, there is no possibility that the address information and the general information intersect and cause a malfunction.

更に、本実施例によれば、メモリCに2フレーム分の
データを格納できる容量があれば、マイクロプロセッサ
は連続したフレームのデータ処理を負担なく行える。
Further, according to the present embodiment, if the memory C has a capacity capable of storing data for two frames, the microprocessor can perform data processing of consecutive frames without burden.

例えば、第3図において、時刻t1から時刻t3までの間
に受信した第2フレームのデータの読み取りは、時刻t4
までの間に行えばよいので、マイクロプロセッサの負担
が軽くなる。このため、割り込み要求フリップフロップ
E4を通常のイベントフラグに置き換えることにより、割
り込みを用いないプログラムで受信データを処理するこ
ともできる。
For example, in Figure 3, the reading of the data of the second frame received during the period from the time t 1 to time t 3, the time t 4
It is only necessary to do so until the load on the microprocessor is reduced. Therefore, the interrupt request flip-flop
By replacing E 4 to the normal event flag, it is also possible to process the received data interrupt a program that does not use.

更に、本実施例によれば、シリアルデータの奇数番目
のフレームデータと偶数番目のフレームデータとは、カ
ウンタBによってメモリCのD15からD8までの第1の格
納エリアとD7からD0までの第2の格納エリアとに分配し
て格納される。
Further, according to the present embodiment, the odd-numbered frame data and the even-numbered frame data of the serial data are used by the counter B to store the first storage area from D15 to D8 of the memory C and the second storage area from D7 to D0. And is stored separately.

第4図は、メモリCの具体的な構成を示す回路図で、
単位メモリセルは、インバータC1と、3ステートインバ
ータC2とによって構成されている。
FIG. 4 is a circuit diagram showing a specific configuration of the memory C.
Unit memory cell includes an inverter C 1, is constituted by a 3-state inverter C 2.

例えば、第1図のシリアルデータ読み取りクロック入
力端子C30のレベルが“1"で、シフトレジスタAの並列
出力信号とカウンタBの出力信号とが供給されるANDゲ
ートC3のレベルも“1"であれば、3ステートインバータ
C4がアクティブ状態となって、シリアルデータ入力端子
3からのデータSDAが第4図のSI端子を介してメモリセ
ルに書き込まれる。
For example, at the level of the serial data read clock input terminal C 30 of FIG. 1 is "1", the level of the AND gate C 3 in which the output signal of the parallel output signals and the counter B is supplied from the shift register A "1" Then, a three-state inverter
C 4 becomes the active state, data SDA from the serial data input terminal 3 is written into the memory cell via the SI terminal of Figure 4.

ところで、タイミング信号発生回路Fは、シリアルデ
ータ入力端子3からのデータをメモリCに読み込ませる
タイミングを設定するために用いられているが、その具
体的な構成は本発明の要旨ではないので、第5図にタイ
ミング信号発生回路の具体的な構成を示し、第6図に第
5図のタイミング信号発生回路のタイミングチャートを
示すのに留める。
Incidentally, the timing signal generation circuit F is used to set the timing at which data from the serial data input terminal 3 is read into the memory C. However, since the specific configuration is not the gist of the present invention, FIG. 5 shows a specific configuration of the timing signal generation circuit, and FIG. 6 shows only a timing chart of the timing signal generation circuit of FIG.

又、本実施例において、判別許可フラグE5はリセット
側の入力がエッジ動作型になっており、これも容易に実
現することができるが、その具体的な構成は本発明の要
旨ではないので、第7図に判別許可フラグの具体的な回
路構成を示すのに留める。
In the present embodiment, determination permission flag E 5 is and the input of the reset side becomes an edge-operated, but which can also be easily realized, because the specific configuration is not the gist of the present invention 7 shows only a specific circuit configuration of the discrimination permission flag.

(発明の効果) 以上説明したように、 シリアルデータ入力端子3から供給される連続したN
フレーム(本実施例では4フレーム)のデータ列を並列
変換して格納するMフレーム(本実施例では2フレー
ム)分の受信バッファメモリCと、受信バッファメモリ
Cに格納されたアドレス情報が自己アドレスに一致する
かどうかを判別するアドレス判別手段(本実施例ではデ
ィジタルコンパレータD)と、1フレーム分のデータの
受信が完了する毎にフレーム更新クロックを出力する更
新クロック発生手段(本実施例ではフレーム更新フリッ
プフロップ4)と、アドレス判別手段からの一致信号に
応答して、受信データのデータ長情報に基づいたフレー
ム期間だけ更新クロックに同期した割り込み要求信号を
マイクロプロセッサに送出する受信フレーム数設定手段
(本実施例では受信フレーム数設定ブロックE)と、割
り込み要求信号に基づくマイクロプロセッサからの命令
によってデータバスに受信バッファメモリの格納データ
を送出する接続手段(本実施例ではバススイッチャG)
とを備えた本発明によれば、アドレス部とデータ部との
区分けを明確に行うことができるので、アドレス付きの
可変長データの処理が容易に行えるようになると共に、
マイクロプロセッサの割り込み処理が1フレーム分の受
信を終了する毎に繰り返されるので、マイクロプロセッ
サは連続したフレームのデータ処理を負担なく行えると
いう格別の効果を奏する。
(Effect of the Invention) As described above, continuous N supplied from the serial data input terminal 3
A reception buffer memory C for M frames (two frames in the present embodiment) in which a data string of a frame (four frames in the present embodiment) is converted in parallel and stored, and the address information stored in the reception buffer memory C is a self-address. Address discriminating means (digital comparator D in this embodiment) for judging whether or not the data coincides with an update clock generating means (in this embodiment, outputting a frame updating clock every time reception of one frame of data is completed). An update flip-flop 4) and, in response to a coincidence signal from the address determination means, a reception frame number setting means for sending an interrupt request signal synchronized with the update clock to the microprocessor for a frame period based on the data length information of the reception data to the microprocessor (In the present embodiment, the reception frame number setting block E) and the interrupt request signal. Ku connection means for transmitting the data stored in the receiving buffer memory to the data bus by the instruction from the microprocessor (bus switcher G in this embodiment)
According to the present invention, since it is possible to clearly distinguish between the address portion and the data portion, processing of variable-length data with an address can be easily performed, and
Since the interrupt processing of the microprocessor is repeated every time reception of one frame is completed, the microprocessor has a special effect that data processing of continuous frames can be performed without burden.

【図面の簡単な説明】[Brief description of the drawings]

第1図は本発明の一実施例におけるシリアルデータの受
信装置の構成図、第2図はシリアルデータのフレームの
説明図、第3図は本発明の一実施例の主要部のタイミン
グチャート、第4図はメモリの構成を示す回路図、第5
図はタイミング信号発生回路の構成を示す回路図、第6
図は第5図のタイミング信号発生回路のタイミングチャ
ート、第7図は判別許可フラグの構成を示す回路図であ
る。 3……シリアルデータ入力端子、4……フレーム更新フ
リップフロップ、B……カウンタ、C……メモリ、D…
…ディジタルコンパレータ、E……受信フレーム数設定
ブロック、E4……割り込み要求フリップフロップ、E5
…判別許可フラグ。
FIG. 1 is a block diagram of a serial data receiving apparatus according to an embodiment of the present invention, FIG. 2 is an explanatory diagram of a frame of serial data, FIG. 3 is a timing chart of main parts of an embodiment of the present invention, FIG. 4 is a circuit diagram showing the configuration of the memory, and FIG.
FIG. 13 is a circuit diagram showing a configuration of a timing signal generation circuit, and FIG.
FIG. 7 is a timing chart of the timing signal generation circuit of FIG. 5, and FIG. 7 is a circuit diagram showing a configuration of the discrimination permission flag. 3 ... serial data input terminal, 4 ... frame update flip-flop, B ... counter, C ... memory, D ...
… Digital comparator, E… Reception frame number setting block, E 4 … Interrupt request flip-flop, E 5
... A determination permission flag.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】シリアルデータ入力端子から供給される連
続したNフレームのデータ列を並列変換して格納するM
フレーム(但し、1<M<N)分の受信バッファメモリ
と、 前記受信バッファメモリに格納されたアドレス情報が自
己アドレスに一致するかどうかを判別するアドレス判別
手段と、 1フレーム分のデータの受信が完了する毎にフレーム更
新クロックを出力する更新クロック発生手段と、 前記アドレス判別手段からの一致信号に応答して、受信
データのデータ長情報に基づいたフレーム期間だけ前記
更新クロックに同期した割り込み要求信号をマイクロプ
ロセッサに送出する受信フレーム数設定手段と、 前記割り込み要求信号に基づくマイクロプロセッサから
の命令によってデータバスに前記受信バッファメモリの
格納データを送出する接続手段と を具備してなるシリアルデータの受信装置。
1. An M converter for parallel-converting and storing a data sequence of N consecutive frames supplied from a serial data input terminal.
A reception buffer memory for a frame (where 1 <M <N); an address discrimination means for discriminating whether or not the address information stored in the reception buffer memory coincides with a self-address; Update clock generating means for outputting a frame update clock every time the processing is completed; and an interrupt request synchronized with the update clock for a frame period based on data length information of received data in response to a coincidence signal from the address determination means. Means for setting the number of received frames for transmitting a signal to a microprocessor; and connecting means for transmitting data stored in the reception buffer memory to a data bus in accordance with an instruction from the microprocessor based on the interrupt request signal. Receiver.
JP20324888A 1988-08-17 1988-08-17 Serial data receiving device Expired - Lifetime JP2575049B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20324888A JP2575049B2 (en) 1988-08-17 1988-08-17 Serial data receiving device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20324888A JP2575049B2 (en) 1988-08-17 1988-08-17 Serial data receiving device

Publications (2)

Publication Number Publication Date
JPH0252543A JPH0252543A (en) 1990-02-22
JP2575049B2 true JP2575049B2 (en) 1997-01-22

Family

ID=16470884

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20324888A Expired - Lifetime JP2575049B2 (en) 1988-08-17 1988-08-17 Serial data receiving device

Country Status (1)

Country Link
JP (1) JP2575049B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2728155B2 (en) * 1991-12-19 1998-03-18 三菱電機株式会社 Communication control device
JP2006040149A (en) 2004-07-29 2006-02-09 Toshiba Corp Semiconductor integrated circuit device
JP5224216B2 (en) * 2009-02-26 2013-07-03 株式会社ユニバーサルエンターテインメント Game machine

Also Published As

Publication number Publication date
JPH0252543A (en) 1990-02-22

Similar Documents

Publication Publication Date Title
US4733390A (en) Data transmission system
US6658493B1 (en) Microcomputer exchanging data with host computer
EP0054243A2 (en) Memory controlling apparatus
US6058251A (en) Data transmission system
JPS5987569A (en) Automatic continuous processing circuit of data
JP2575049B2 (en) Serial data receiving device
EP0564118B1 (en) Serial data transfer apparatus
JP4012907B2 (en) Asynchronous transmission method and circuit thereof
GB2060961A (en) Data processing system having memory modules with distributed address information
US5402430A (en) Parity inversion test system
US4012719A (en) Communication multiplexer module
US4012718A (en) Communication multiplexer module
JPH0771116B2 (en) Serial data receiver
EP0629954A1 (en) Adapter for transferring blocks of data having a variable length on a system bus
JP3359987B2 (en) Data processing device
US5175846A (en) Clock device for serial bus derived from an address bit
JP2595707B2 (en) Memory device
KR970007156Y1 (en) Access time control circuit of data i/o apparatus
JP2630077B2 (en) Clock synchronous serial interface
JP2845768B2 (en) Time information synchronization device
JPH04255042A (en) Memory ic device
SU1451707A1 (en) Device for interfacing computer with peripherals
JPH02302851A (en) Cache memory device
JPS6367665A (en) Data processor
JPS63187943A (en) Communication control equipment

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 12

Free format text: PAYMENT UNTIL: 20081024

EXPY Cancellation because of completion of term