JPH0561783A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH0561783A
JPH0561783A JP3250285A JP25028591A JPH0561783A JP H0561783 A JPH0561783 A JP H0561783A JP 3250285 A JP3250285 A JP 3250285A JP 25028591 A JP25028591 A JP 25028591A JP H0561783 A JPH0561783 A JP H0561783A
Authority
JP
Japan
Prior art keywords
data
error
reception
serial
block
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
JP3250285A
Other languages
Japanese (ja)
Inventor
Yoshinori Hanesaka
佳典 羽坂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP3250285A priority Critical patent/JPH0561783A/en
Publication of JPH0561783A publication Critical patent/JPH0561783A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)
  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To make an error processing exact in serial communication between plural systems according to a simplified program by storing an error class in a memory in the same form as received data in the case of serial reception and judging whether the block stored in the memory is the received data or the error class. CONSTITUTION:This device is composed of a shift register 1 to convert serial data signals (d) into parallel data, error detector 3 to detect the generation of error in the serial reception, and error class register 4 to store the detected error class and further, the device is equipped with a reception buffer 2 to store the received data and data showing the error class, selecting circuit 5 to select whether the data to be stored in the reception buffer 2 are the received data or the error class, and storage circuit 6 to store whether the data in the reception buffer 2 are the received data or the error class until a CPU reads the data. Then, a software transfers the data while pairing the received data or the error class in the reception buffer with the data in the storage circuit 6.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、マイクロコンピュータ
に関し、特にマイクロコンピュータに内蔵されたシリア
ル受信回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer, and more particularly to a serial receiver circuit built in the microcomputer.

【0002】[0002]

【従来の技術】従来のシリアル受信回路を図について説
明する。図6は、従来のマイクロコンピュータのシリア
ル受信回路のブロック図である。図において、シリアル
データとして受信したデータ信号dをパラレルデータに
変換するシフト・レジスタ1.と、変換されたパラレル
データをマイクロコンピュータのCPUに読み出すまで
の間退避する受信バッファ2.と、シリアル受信にエラ
ーが生じたことを検出するエラー検出器3.と検出した
エラーの種別を記憶するエラー種別レジスタ4.を有し
ていた。
2. Description of the Related Art A conventional serial receiving circuit will be described with reference to the drawings. FIG. 6 is a block diagram of a serial reception circuit of a conventional microcomputer. In the figure, a shift register 1. converts the data signal d received as serial data into parallel data. And a reception buffer that saves the converted parallel data until it is read by the CPU of the microcomputer 2. And an error detector for detecting an error in serial reception. Error type register that stores the type of error detected Had.

【0003】上記エラー種別には受信バッファ2に退避
したデータをCPUに読み出す前に次のシリアルデータ
を受信したこと(オーバーラン・エラー)を表わすもの
や、シリアルデータの終了を示すストップビットが無か
ったこと(フレーミング・エラー)を表わすものや、受
信したデータのパリティが一致しなかったこと(パリテ
ィ・エラー)を表わすものがある。通常、この種のシリ
アル受信回路は受信したデータを受信バッファ2.に退
避したときに受信終了信号b.を、エラー種別をエラー
種別レジスタ4.に退避したときに受信エラー信号c.
を出力するようになっていた。
The above-mentioned error type does not indicate that the next serial data is received (overrun error) before the data saved in the receiving buffer 2 is read to the CPU, or that there is no stop bit indicating the end of the serial data. There is a message indicating that the received data has a different parity (a parity error). Normally, this type of serial receiving circuit receives received data from the receiving buffer 2. Reception end signal when retreating to b. And the error type is the error type register 4. Received error signal c.
It was supposed to output.

【0004】上記のようなシリアル受信回路を内蔵した
マイクロコンピュータを用いたシリアル受信処理の一つ
として、図7や図8に示すようなソフトウェア処理が用
いられていた。
As one of serial reception processes using a microcomputer having the above-described serial reception circuit built-in, software processes as shown in FIGS. 7 and 8 have been used.

【0005】図7では受信終了信号b.でソフトウェア
処理D.を起動している。ソフトウェア処理D.は、受
信バッファ2.の受信データをCPUに読み出し、1ブ
ロックごとにメモリ7.に転送するための処理で、この
場合ソフトウェア処理D.内で、受信エラー判定ブロッ
クにより受信エラー信号c.の検出を行い受信エラーが
発生していれば、送信元へエラー応答(正誤応答)を行
うソフトウェア処理E.(エラー処理)を起動してい
る。
In FIG. 7, the reception end signal b. Software processing by D. Is starting up. Software processing D. Receive buffer 2. 7. The received data of 7 is read to the CPU, and the memory for each block 7. Process for transferring to D. Within the reception error judgment block, the reception error signal c. If a reception error occurs, the software processing for performing an error response (correction response) to the sender is performed. (Error processing) is activated.

【0006】図8では受信終了信号b.でソフトウェア
処理F.を、受信エラー信号cでソフトウェア処理G.
(エラー処理)を起動している。ソフトウェア処理F.
は受信バッファ2.の受信データをCPUに読み出し、
1ブロックごとにメモリ7.に転送するための処理で、
この処理では割り込み信号c.の検出を行わない点がソ
フトウェア処理D.と異なっている。
In FIG. 8, the reception end signal b. Software processing in F. With the received error signal c.
(Error processing) is activated. Software processing F.
Is the receive buffer 2. Read the received data of to the CPU,
Memory for each block 7. Process to transfer to
In this process, the interrupt signal c. The point that does not detect D. Is different from

【0007】図9は、複数のマイクロコンピュータをシ
リアル通信により接続したシステムの例の図である。
FIG. 9 is a diagram of an example of a system in which a plurality of microcomputers are connected by serial communication.

【0008】図10はエラー信号線接続システムの例の
図である。
FIG. 10 is a diagram of an example of an error signal line connection system.

【0009】図11は、サークル接続をしたシステムの
例の図である。
FIG. 11 is a diagram of an example of a system in which a circle connection is made.

【0010】図9、図10、図11に示すように、最近
ではこのシリアル受信回路を内蔵したマイクロコンピュ
ータを用いて、複数のマイクロコンピュータを共通のシ
リアル信号線で接続し、この信号線を通じて各マイクロ
コンピュータ間でデータのやり取りを行うシステムを構
築する場合が増加している。この場合、送信しているマ
イクロコンピュータと受信しているマイクロコンピュー
タを規定するためにシリアル通信でのデータ送受信の手
順を定めて図12、図13の複数のマイクロコンピュー
タをシリアル通信により接続するとき複数ブロックのデ
ータをやりとりするフォーマット例の図のような複数の
ブロックのシリアルデータをフォーマット化してシリア
ル通信を行っている。このデータ送受信の手順は通信プ
ロトコル(通信手順)と呼ばれ、様々なものが考えられ
ている。
As shown in FIGS. 9, 10 and 11, recently, a microcomputer incorporating this serial receiving circuit is used to connect a plurality of microcomputers by a common serial signal line, and each signal line is connected through the signal line. The number of cases of constructing a system for exchanging data between microcomputers is increasing. In this case, in order to define the transmitting microcomputer and the receiving microcomputer, a procedure for data transmission / reception in serial communication is defined, and when connecting the plurality of microcomputers in FIGS. Serial communication is performed by formatting the serial data of a plurality of blocks as shown in the figure of the format example of exchanging block data. This data transmission / reception procedure is called a communication protocol (communication procedure), and various ones are considered.

【0011】[0011]

【発明が解決しようとする課題】この従来のシリアル受
信回路を内蔵したマイクロコンピュータでは、エラー種
別レジスタ4.のデータは次のシリアル受信が行われる
までしか保持されず、受信エラー信号c.も前記の期間
しか保持されない。そのため、図7や図8のソフトウェ
ア処理でシリアル受信終了後直ちにエラー判定を行い、
送信元にエラー応答(正誤応答)を送信している。とこ
ろが図9、図10、図11のようなシステムを構築した
場合では、図12、図13のような複数ブロックのフォ
ーマットの途中のブロックで受信エラーが発生しても直
ちに図8のソフトウェア処理G.で送信元へエラー応答
を送信してはいけない場合が多い。
In the microcomputer incorporating the conventional serial receiving circuit, the error type register 4. Data is held only until the next serial reception is performed, and the reception error signal c. Is only retained for the above period. Therefore, in the software processing of FIG. 7 and FIG.
An error response (correctness response) is sent to the sender. However, in the case of constructing the system as shown in FIGS. 9, 10, and 11, even if a reception error occurs in a block in the middle of the format of a plurality of blocks as shown in FIGS. 12 and 13, the software process G shown in FIG. . In many cases, you should not send an error response to the sender.

【0012】なぜなら、図9、図10、図11のような
システムでは共通のシリアル信号線で接続された全ての
マイクロコンピュータが定められた通信プロトコルに従
ってシリアル通信を行っており、図12、図13のフォ
ーマットのデータ通信完了時に受信先アドレスに該当す
るマイクロコンピュータのみが応答することになってい
る。
This is because, in the systems shown in FIGS. 9, 10 and 11, all the microcomputers connected by the common serial signal line perform serial communication according to the defined communication protocol. When the data communication of the format is completed, only the microcomputer corresponding to the receiving address is supposed to respond.

【0013】このためシリアル通信の途中でエラーが発
生した場合でも通信を続行し、図12、図13のような
フォーマットの全てのブロックを通信した後に、受信先
アドレスを確認し、該当するマイクロコンピュータのみ
エラー応答する必要があった。
Therefore, even if an error occurs during the serial communication, the communication is continued, and after all blocks having the formats as shown in FIGS. 12 and 13 are communicated, the receiver address is confirmed and the corresponding microcomputer is confirmed. Only had to respond with an error.

【0014】この様にしないと通信エラーが発生した場
合、送信元のマイクロコンピュータがまだ送信している
途中で他のマイクロコンピュータからエラー応答が行わ
れたり、複数のマイクロコンピュータから同時にエラー
応答が行われたりして、シリアルデータ同志がぶつか
り、シリアル通信が出来なかったり、マイクロコンピュ
ータが破壊されると言う課題があった。
Otherwise, if a communication error occurs, another microcomputer may make an error response while the transmission source microcomputer is still transmitting, or a plurality of microcomputers may make an error response at the same time. There was a problem that serial data would collide with each other, serial communication could not be performed, and the microcomputer would be destroyed.

【0015】ところが、従来のシリアル受信回路を内蔵
したマイクロコンピュータでは新しいシリアルデータを
シリアル受信するとエラーが発生したことを示す情報
(受信エラー信号c.)とエラーの種別を示す情報(エ
ラーデータ)が失われるため、図12、図13のような
フォーマットのブロックをすべて通信終了してから、エ
ラーの有無とエラー種別の判別をすることが出来なかっ
た。
However, in a conventional microcomputer having a built-in serial reception circuit, when new serial data is serially received, information indicating that an error has occurred (reception error signal c.) And information indicating the type of error (error data) are provided. Since it is lost, it is impossible to determine the presence or absence of an error and the error type after the communication of all the blocks having the formats shown in FIGS. 12 and 13 is completed.

【0016】このため、図9、図10、図11のような
システムで図12、図13のようなフォーマットのブロ
ックをすべて通信終了してからエラー応答することは困
難であると云う課題があった。
For this reason, it is difficult for the system as shown in FIGS. 9, 10 and 11 to make an error response after all blocks having the formats shown in FIGS. 12 and 13 have been communicated. It was

【0017】本発明は、上述の課題を解消すべくなされ
たものであり、複数のシステム間のシリアル通信におけ
るエラー処理を適確に実行する簡略化したプログラムに
よるマイクロコンピュータを提供することを目的とす
る。
The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a microcomputer with a simplified program for appropriately executing error processing in serial communication between a plurality of systems. To do.

【0018】[0018]

【課題を解決するための手段】本発明のマイクロコンピ
ュータは、複数ビットのデータを1ブロックとした複数
ブロックのデータをシリアル受信し、前記複数ブロック
のデータのブロック単位でのシリアル通信の正誤を判断
する手段と、前記判断の結果、正のブロックの場合は受
信データをそのまま保持し、誤のブロックの場合は受信
データをエラーの内容を示すデータに変換してから、複
数ブロックを一括してメモリに記憶する手段と、前記メ
モリに記憶した複数ブロックからエラーの内容を示すブ
ロックを判別する手段とを有している。
A microcomputer according to the present invention serially receives a plurality of blocks of data, each block having a plurality of bits of data, and judges whether the plurality of blocks of data are serially communicated in units of blocks. As a result of the above judgment, if the block is a positive block, the received data is retained as it is, and if it is an incorrect block, the received data is converted into data indicating the content of the error, and then a plurality of blocks are collectively stored in a memory. And a means for discriminating a block showing the content of the error from a plurality of blocks stored in the memory.

【0019】[0019]

【作用】上記構成によれば、本発明のマイクロコンピュ
ータは、複数ブロックのデータのブロック単位でのシリ
アル通信の正誤を判断して、正のブロックの場合はその
まま保持し、誤のブロックの場合はエラーの内容を示す
データに変換してから、複数ブロックを一括してメモリ
に記憶しておきエラーの内容を示すブロックを判別する
ので、フォーマットのブロックの通信が終了してからエ
ラー処理ができる。
According to the above structure, the microcomputer of the present invention judges whether the serial communication of a plurality of blocks of data in units of blocks is correct, holds the correct block as it is, and in the case of the incorrect block. After converting into data indicating the content of the error, a plurality of blocks are collectively stored in the memory and the block indicating the content of the error is discriminated. Therefore, the error processing can be performed after the communication of the block of the format is completed.

【0020】[0020]

【実施例】次に本発明について図面を参照して説明す
る。
The present invention will be described below with reference to the drawings.

【0021】図1は、本発明の一実施例のマイクロコン
ピュータのソフトウェア処理Aのフローである。図1の
ソフトウェア処理A.は従来例に示したシステムで実行
される場合のものである。シリアル受信した図6の受信
バッファ2.のデータを1ブロックごとにメモリ7.に
転送する処理で受信終了信号b.で起動される。ソフト
ウェア処理A.のブロックA1.にて受信エラー信号
c.の検出を行っている(ステップST10)。エラー
が発生していなければ受信データをそのままメモリ7.
に転送している(ステップST11)。エラーが発生し
ていればブロックA2.にてエラー種別を選択して(ス
テップST12)メモリ7.に転送している(ステップ
ST13,14,15)。また、ブロックA3.にてメ
モリ7.に転送したデータが受信データであるかエラー
種別であるかを示すブロックをメモリ7.に記憶してい
る(ステップST16),(ステップST17)。
FIG. 1 is a flow chart of software processing A of a microcomputer according to an embodiment of the present invention. Software processing of FIG. Is the case where it is executed by the system shown in the conventional example. Receive buffer serially received in FIG. Memory for each block 7. Reception end signal b. Is started with. Software processing A. Block A1. Receive error signal at c. Is being detected (step ST10). If no error occurs, the received data is stored in the memory as it is 7.
(ST11). If an error has occurred, block A2. The error type is selected in step (step ST12) and the memory 7. Are transferred to (STEP ST13, ST14, ST15). In addition, block A3. At memory 7. A block indicating whether the data transferred to the received data is the received data or the error type is stored in the memory 7. (Step ST16), (step ST17).

【0022】図2は、本発明の一実施例のマイクロコン
ピュータのソフトウェア処理Bのフローである。ソフト
ウェア処理B.はソフトウェア処理A.にて受信した図
12のようなフォーマットの解析を行う処理で、通常あ
る一定期間毎に起動される。ソフトウェア処理B.のブ
ロックB3.にてメモリ7.の1ブロックが受信データ
かエラー種別かを判断している(ステップST20)。
ブロックB4.にてメモリ7.に転送された複数ブロッ
クのデータがフォーマットと一致し、受信アドレスが一
致することを確認している(ステップST21)。フォ
ーマット、アドレスとも一致すれば(ステップST2
2)ブロックB5.にてエラー種別があればエラー種別
に応じたエラー応答(正誤応答)を送信元のマイクロコ
ンピュータへ送信する(ステップST23),(ステッ
プST24)。
FIG. 2 is a flow chart of software processing B of the microcomputer according to the embodiment of the present invention. Software processing B. Software processing A. In the process of analyzing the format as shown in FIG. Software processing B. Block B3. At memory 7. It is determined whether the 1 block is received data or an error type (step ST20).
Block B4. At memory 7. It is confirmed that the data of a plurality of blocks transferred to the above-mentioned data matches the format, and the received addresses match (step ST21). If the format and address match (step ST2)
2) Block B5. If there is an error type, an error response (correction response) according to the error type is transmitted to the transmission source microcomputer (step ST23), (step ST24).

【0023】このようにして図12のようなフォーマッ
トのブロックを一度、すべて通信してから、該当するア
ドレスのマイクロコンピュータだけがエラー応答するこ
とが出来る。
In this way, after all blocks having the format as shown in FIG. 12 are communicated once, only the microcomputer of the corresponding address can respond with an error.

【0024】本実施例によらず図9に示したシステム例
でエラー応答する場合、エラーの発生したブロックの次
のブロックが受信されて、エラーの情報が失われる前に
エラー応答する必要があるため、図10に示したシステ
ム例のようにエラーを知らせるための信号線15.を増
やし、このエラー信号により送信元マイクロコンピュー
タの次のブロックの送信を停止する必要がある。前記の
エラー信号を出力する処理と受け付ける処理は、図12
のフォーマットの1個のブロックからブロックまでに行
われる必要があり緊急度の高いものである。このため通
常割り込み処理が用いられ、非常に複雑でタイミングの
きびしい処理となる。本実施例によれば、シリアル通信
完了後にエラー応答が出来るので、エラーを知らせるた
めの信号線やエラー処理が不要になりマイクロコンピュ
ータのポートの節約とソフトウェア処理の簡略化が出来
るメリットがある。
When an error response is made in the system example shown in FIG. 9 regardless of the present embodiment, it is necessary to receive an error response before the block next to the block in which the error has occurred is received and the error information is lost. Therefore, as in the system example shown in FIG. 10, the signal line 15. It is necessary to stop the transmission of the next block of the transmission source microcomputer by this error signal. The process of outputting and receiving the error signal is shown in FIG.
It is necessary to carry out from one block to the block of the above format, which is highly urgent. For this reason, the interrupt process is usually used, and the process becomes very complicated and has severe timing. According to this embodiment, since an error response can be made after the completion of serial communication, there is an advantage that a signal line for notifying an error and error processing are not required, and the microcomputer port can be saved and software processing can be simplified.

【0025】さらに図11のサークル接続のシステムの
ようにフォーマット中に常に全てのマイクロコンピュー
タ用のブロックを規定しているものでは、図13のフォ
ーマットのブロックの位置で送信元、受信先のマイクロ
コンピュータが決定されるため、途中のブロックでエラ
ーがあってもエラー応答できない。このためエラーを見
込んで通常数回(最低でも3回)受信したデータが一致
して有効としている。従って、データの受信が完了する
のは、図13のフォーマットの周期の数倍を必要とし通
信時間がかかる。
Further, in the case where the blocks for all microcomputers are always defined in the format as in the circle connection system of FIG. 11, the microcomputers of the transmission source and the reception destination are located at the positions of the blocks of the format of FIG. However, even if there is an error in a block in the middle, an error response cannot be made. Therefore, in anticipation of an error, data received normally several times (at least three times) match and are valid. Therefore, completion of data reception requires several times the cycle of the format of FIG. 13 and takes communication time.

【0026】本実施例によれば、シリアル通信完了後、
次の周期のシリアル通信にてエラー応答が出来るため、
通信データの数回一致を確認する必要がなく通信時間が
短縮(約1/3)されるという目メリットがある。
According to this embodiment, after the serial communication is completed,
Since an error response can be made by serial communication in the next cycle,
There is an eye merit that the communication time can be shortened (about 1/3) without having to confirm the coincidence of the communication data several times.

【0027】次に本発明の他の実施例である第2の実施
例について説明する。
Next, a second embodiment which is another embodiment of the present invention will be described.

【0028】図3は本発明の第2の実施例を示すマイク
ロコンピュータのブロック図である。
FIG. 3 is a block diagram of a microcomputer showing a second embodiment of the present invention.

【0029】図3ではシリアルデータ信号d.をパラレ
ルデータに変換するシフトレジスタ1.と、シリアル受
信にエラーが発生したことを検出するエラー検出器3.
と、検出したエラー種別を記憶するエラー種別レジスタ
4.という従来構成に加えて、前記シフトレジスタ1.
で変換された受信データおよび前記エラー種別を示すデ
ータを記憶する受信バッファ2.と、受信バッファ2.
に記憶するデータを前記受信データか前記エラー種別か
のいずれかを選択する選択回路5.と、前記受信バッフ
ァ2.のデータが受信データであるかエラー種別である
かをマイクロコンピュータのCPU部に読み出すまでの
間記憶する記憶回路6.から構成される。
In FIG. 3, the serial data signal d. Shift register for converting data into parallel data And an error detector that detects that an error has occurred in serial reception.
And an error type register for storing the detected error type 4. In addition to the conventional configuration, the shift register 1.
1. A reception buffer that stores the reception data converted in step 1 and the data indicating the error type. And the receiving buffer 2.
4. A selection circuit for selecting either the received data or the error type as the data to be stored in 5. And the reception buffer 2. 5. A storage circuit for storing whether the data of (1) is received data or an error type until it is read by the CPU section of the microcomputer. Composed of.

【0030】図4は第2の実施例によるマイクロコンピ
ュータでのソフトウェア処理のフローである。シリアル
受信が行われエラーがあればエラー種別レジスタ4.の
内容が、エラーで無ければシフトレジスタ1.の内容が
選択回路5.で選択され受信バッファ2.に記憶され
る。受信バッファ2.にデータが記憶されると受信終了
信号a.が発生し、図4のソフトウェア処理C.が起動
される。ソフトウェア処理C.にて受信バッファ2.の
受信データあるいはエラー種別と記憶回路6.のデータ
を1ブロックとしてメモリ7.に転送する。
FIG. 4 is a flow chart of software processing in the microcomputer according to the second embodiment. If serial reception is performed and there is an error, the error type register 4. If there is no error in the contents of shift register 1. Contents of the selection circuit 5. Receive buffer 2. Memorized in. Receive buffer 2. When the data is stored in the reception end signal a. Occurs, and the software processing C. Is started. Software processing C. Receive buffer at 2. Received data or error type and storage circuit 6. Memory of data of 1 as one block 7. Transfer to.

【0031】この場合、ソフトウェア処理C.は第1の
実施例のソフトウェア処理A.よりも非常に簡略され、
受信バッファ2.のデータと記憶回路6.のデータをた
だ単純にメモリ7.に転送する処理となる(ステップS
T30)。このため、第1の実施例に比べより早いシリ
アル通信に対応できる。ソフトウェア処理Eにより1ブ
ロックごとに受信し、図1の実施例と同じソフトウェア
処理B.でフォーマットの解析を行う。
In this case, the software processing C. Is the software processing A. of the first embodiment. Much simpler than
Receive buffer 2. Data and memory circuit 6. Memory of the data of 7. Process to transfer to (step S
T30). Therefore, faster serial communication can be supported as compared with the first embodiment. The software processing E receives data block by block, and the same software processing B. Analyze the format with.

【0032】次に本発明の他の実施例である第3の実施
例について説明する。
Next, a third embodiment which is another embodiment of the present invention will be described.

【0033】図5は本発明の第3の実施例を示すマイク
ロコンピュータのブロック図で、本発明を応用したハー
ドウェアによる自動受信システムのブロック図である。
FIG. 5 is a block diagram of a microcomputer showing a third embodiment of the present invention, and is a block diagram of an automatic reception system by hardware to which the present invention is applied.

【0034】図5ではシリアルデータ信号d.をパラレ
ルデータに変換するシフトレジスタ1.と、シリアル受
信にエラーが発生したことを検出するエラー検出器3.
と、検出したエラー種別を記憶するエラー種別レジスタ
4.と前記シフトレジスタ1.で変換された受信データ
および前記エラー種別を記憶する受信バッファ2.と、
受信バッファ2.に記憶するデータを前記受信データか
前記エラー種別のいずれかを選択する選択回路5.と、
前記受信バッファ2.のデータが受信データであるかエ
ラー種別であるかをマイクロコンピュータのCPU部に
読み出すまでの間記憶する記憶回路6.に加えて、図1
2のフォーマットに示された通信開始データH.と受信
バッファ2.に記憶されたデータを比較する受信開始デ
ータ比較器9.と、図12のフォーマットに示された通
信終了データI.と受信バッファ2.に記憶されたデー
タを比較する受信終了データ比較器10.と、図12に
示されたフォーマットを送信中である時、受信中信号h
を出力する受信中信号作成器11.と、1ブロックごと
にメモリ7.に格納するアドレスを記憶する格納先指定
回路12.により構成される。
In FIG. 5, the serial data signal d. Shift register for converting data into parallel data And an error detector that detects that an error has occurred in serial reception.
And an error type register for storing the detected error type 4. And the shift register 1. 1. A reception buffer that stores the reception data converted in step 1 and the error type. When,
Receive buffer 2. 4. A selection circuit for selecting either the received data or the error type as the data to be stored in 5. When,
The reception buffer 2. 5. A storage circuit for storing whether the data of (1) is received data or an error type until it is read by the CPU section of the microcomputer. In addition to
The communication start data H.264 shown in the format of H.2. And receive buffer 2. Reception start data comparator for comparing the data stored in 9. And the communication end data I. And receive buffer 2. Reception end data comparator for comparing the data stored in 10. When the format shown in FIG. 12 is being transmitted, the receiving signal h
Receiving signal generator 11 for outputting And memory for each block 7. Storage destination designation circuit for storing the address to be stored in 12. It is composed of

【0035】図12のフォーマットを受信している間、
前記受信中信号hと前記受信終了信号a.により格納先
アドレスを更新し、図12のフォーマット分のブロック
を転送する。
While receiving the format of FIG.
The receiving signal h and the reception end signal a. The storage destination address is updated by and the block for the format of FIG. 12 is transferred.

【0036】この場合、第1、第2の実装例のようなソ
フトウェア処理はなく、第1、第2実施例に比べより早
いシリアル通信に対応できる。
In this case, there is no software processing as in the first and second implementation examples, and faster serial communication can be supported as compared with the first and second embodiments.

【0037】[0037]

【発明の効果】以上説明したように、本発明はシリアル
受信時のエラー種別を受信データと同じ形式でメモリに
記憶する手段とメモリに記憶したブロックが受信データ
かエラー種別かを判断する手段を提供しているので、マ
イクロコンピュータのシリアル通信システムを容易に構
築でき、複数ブロックのフォーマットの途中のブロック
でエラーが発生しても指定された受信先マイクロコンピ
ュータのみがエラー応答(正誤応答)することが出来
る。また、数ブロックのデータからなるシリアルデータ
をハードウェアにより自動的に受信し、メモリに転送す
るシステムが実現できる、という効果を有する。
As described above, the present invention has means for storing the error type at the time of serial reception in the memory in the same format as the received data and means for determining whether the block stored in the memory is the received data or the error type. Since it is provided, a serial communication system of a microcomputer can be easily constructed, and even if an error occurs in a block in the format of multiple blocks, only the specified destination microcomputer will give an error response (correctness response). Can be done. Further, there is an effect that a system for automatically receiving serial data composed of several blocks of data by hardware and transferring it to the memory can be realized.

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

【図1】本発明の一実施例であるマイクロコンピュータ
のソフトウェア処理Aのフローである。
FIG. 1 is a flowchart of software processing A of a microcomputer that is an embodiment of the present invention.

【図2】本発明の一実施例であるマイクロコンピュータ
のソフトウェア処理Bのフローである。
FIG. 2 is a flowchart of software processing B of the microcomputer that is an embodiment of the present invention.

【図3】本発明の第2の実施例であるマイクロコンピュ
ータのブロック図である。
FIG. 3 is a block diagram of a microcomputer that is a second embodiment of the present invention.

【図4】本発明の第2の実施例のマイクロコンピュータ
のソフトウェア処理Cのフローである。
FIG. 4 is a flow chart of software processing C of the microcomputer according to the second embodiment of the present invention.

【図5】本発明の第3の実施例のマイクロコンピュータ
のブロック図である。
FIG. 5 is a block diagram of a microcomputer according to a third embodiment of the present invention.

【図6】従来のマイクロコンピュータのブロック図であ
る。
FIG. 6 is a block diagram of a conventional microcomputer.

【図7】従来のマイクロコンピュータのソフトウェア処
理D,Eの処理のフローである。
FIG. 7 is a flow chart of software processing D and E of a conventional microcomputer.

【図8】従来のマイクロコンピュータのソフトウェア処
理F,Gの処理のフローである。
FIG. 8 is a flowchart of processing of software processing F and G of a conventional microcomputer.

【図9】従来の複数のマイクロコンピュータ、シリアル
通信の接続システムの例の図である。
FIG. 9 is a diagram of an example of a conventional connection system for a plurality of microcomputers and serial communication.

【図10】従来の複数のマイクロコンピュータ、シリア
ル通信のエラー信号線接続システムの例の図である。
FIG. 10 is a diagram of an example of a conventional plurality of microcomputers and an error signal line connection system for serial communication.

【図11】従来の複数のマイクロコンピュータ、シリア
ル通信のサークル接続のシステム例の図である。
FIG. 11 is a diagram of a system example of a plurality of conventional microcomputers and a circle connection for serial communication.

【図12】従来の複数のマイクロコンピュータ、シリア
ル通信のフォーマット例の図である。
FIG. 12 is a diagram of a format example of a plurality of conventional microcomputers and serial communication.

【図13】従来の複数のマイクロコンピュータ、シリア
ル通信のブロック別フォーマット例の図である。
FIG. 13 is a diagram showing a block-based format example of a plurality of conventional microcomputers and serial communication.

【符号の説明】[Explanation of symbols]

A. 受信終了処理の例1 B. フォーマット解析処理 C. 受信終了処理の例2 H. 通信開始データ I. 通信終了データ 1 シフト・レジスタ 2 受信バッファ 3 エラー検出器 4 エラー種別レジスタ 5 選択回路 6 記憶回路 7 メモリ 8 内部データバス 9 開始データ比較器 10 終了データ比較器 11 受信中信号作成器 12 格納先アドレス指定回路 13 内部アドレスバス 14 シリアルバス 15 エラー信号線 a 受信終了信号(受信エラーを含む) b 受信終了信号 c 受信エラー信号 d シリアルデータ e 内部基準クロック f 正常データまたはエラー種別識別信号 g エラー種別信号 h 受信中信号 i 開始データ検出信号 j 終了データ検出信号 A. Example of reception end process 1 B. Format analysis process C. Example of reception end processing 2 H. Communication start data I. Communication end data 1 Shift register 2 Reception buffer 3 Error detector 4 Error type register 5 Selection circuit 6 Storage circuit 7 Memory 8 Internal data bus 9 Start data comparator 10 End data comparator 11 Receiving signal generator 12 Storage destination address Designation circuit 13 Internal address bus 14 Serial bus 15 Error signal line a Reception end signal (including reception error) b Reception end signal c Reception error signal d Serial data e Internal reference clock f Normal data or error type identification signal g Error type signal h Signal being received i Start data detection signal j End data detection signal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数ビットのデータを1ブロックとした
複数ブロックのデータをシリアル受信するマイクロコン
ピュータにおいて、前記シリアル受信した複数ブロック
の受信データのブロック単位でのシリアル通信の正誤を
判断する手段と、前記正誤を判断する手段による判断の
結果、正のブロックの場合は受信データをそのまま保持
し、誤のブロックの場合は受信データをエラーの内容を
示すデータに変換してから、複数ブロックを一括してメ
モリに記憶する手段と、前記記憶する手段によってメモ
リに記憶した複数ブロックからエラーの内容を示すデー
タを含むブロックを判別する手段とを有することを特徴
とするマイクロコンピュータ。
1. A microcomputer for serially receiving a plurality of blocks of data, in which a plurality of bits of data is one block, and means for judging whether the serially received reception data of the plurality of blocks is correct or not in serial communication in block units. As a result of the judgment by the means for judging the correctness, in the case of a positive block, the received data is retained as it is, and in the case of an incorrect block, the received data is converted into data indicating the content of the error, and then a plurality of blocks are collectively processed. And a unit that stores the data in a memory, and a unit that determines a block including data indicating the content of the error from a plurality of blocks stored in the memory by the storage unit.
JP3250285A 1991-09-04 1991-09-04 Microcomputer Pending JPH0561783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3250285A JPH0561783A (en) 1991-09-04 1991-09-04 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3250285A JPH0561783A (en) 1991-09-04 1991-09-04 Microcomputer

Publications (1)

Publication Number Publication Date
JPH0561783A true JPH0561783A (en) 1993-03-12

Family

ID=17205632

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3250285A Pending JPH0561783A (en) 1991-09-04 1991-09-04 Microcomputer

Country Status (1)

Country Link
JP (1) JPH0561783A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5737522A (en) * 1996-06-17 1998-04-07 Mitsubishi Electric Semiconductor Software Co., Ltd. Serial input/output circuit with an automatic transfer function
JP2009211419A (en) * 2008-03-04 2009-09-17 Nec Access Technica Ltd Interface control circuit and information processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5737522A (en) * 1996-06-17 1998-04-07 Mitsubishi Electric Semiconductor Software Co., Ltd. Serial input/output circuit with an automatic transfer function
JP2009211419A (en) * 2008-03-04 2009-09-17 Nec Access Technica Ltd Interface control circuit and information processing apparatus

Similar Documents

Publication Publication Date Title
JPH05308364A (en) Method and device for detecting data collision in multi-processor communication system
AU2004201590A1 (en) Information Processing Apparatus
JPH0561783A (en) Microcomputer
US4531215A (en) Validity checking arrangement for extended memory mapping of external devices
JP2763394B2 (en) Communication control device
KR100249171B1 (en) Method for detecting error in non-syncronus type data transmit and receive device
JPS61103297A (en) Controller for electronic copying machine
US20040213246A1 (en) Asynchronous transfer mode layer side interface apparatus, physical layer side interface apparatus and cell processing method as well as asynchronous transfer mode communication apparatus
JPH0614649B2 (en) Terminal adapter having multiple HDLC communication channel receiver
JP3481529B2 (en) Data transmission processing method
JP3146863B2 (en) Unidirectional loop transmission circuit
JPH0218623B2 (en)
JP3512278B2 (en) Serial communication processor
JPH05114925A (en) Serial data transfer interface
US7707333B2 (en) Data transferring device for transferring data sent from one communication device to another communication device
JP2630675B2 (en) Message relay device
KR100211960B1 (en) Frame discriminating method by parity scheme
JP2576364B2 (en) Loop type transmission device
JPS59138141A (en) Transmission system
JPH04278742A (en) Method of detecting error in reception data
JP2655631B2 (en) CSI bit processing method and circuit
JPS62128636A (en) Detecting system for frame fault
JPS6256545B2 (en)
JPH0784897A (en) Information processing system suitable for data transfer between equipments
KR20030042571A (en) Apparatus and Method for Subscriber Board Traffic Control in ATM System