JPH02181535A - Microprocessor - Google Patents
MicroprocessorInfo
- Publication number
- JPH02181535A JPH02181535A JP1001509A JP150989A JPH02181535A JP H02181535 A JPH02181535 A JP H02181535A JP 1001509 A JP1001509 A JP 1001509A JP 150989 A JP150989 A JP 150989A JP H02181535 A JPH02181535 A JP H02181535A
- Authority
- JP
- Japan
- Prior art keywords
- byte
- microprocessor
- resending
- flag
- data
- 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
Links
Landscapes
- Retry When Errors Occur (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
- Small-Scale Networks (AREA)
- Maintenance And Management Of Digital Transmission (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明はマイクロプロセッサの入出力ポートと他のマ
イクロプロセッサまたは相当する端末とのデータ送受信
にエラー検出とデータの再送要求機能の有/無に関する
ものである。[Detailed Description of the Invention] [Field of Industrial Application] This invention relates to the presence/absence of error detection and data retransmission request functions in data transmission and reception between an input/output port of a microprocessor and another microprocessor or an equivalent terminal. It is something.
第4図は例えば特開昭57−111632号公報に示さ
れた従来の受信データの検証フローチャートを示す。FIG. 4 shows a conventional received data verification flowchart disclosed in, for example, Japanese Patent Laid-Open No. 57-111632.
受信データの読み取りフローチャートはフロックもしく
は受信される8ビツトの読み取りに必要とされる時間に
対応する時間値がロードされる(CT4)。1ビツトの
持続時間が1mSである場合には、CT、は8msがロ
ードされる。1ビツトの受信毎にレジスタR7にはボー
トFA、からビットIUが記憶され、既に受信されてい
るビットと丁度受信したビットのパリティ計算が行なわ
れ、パリティ計算結果はレジスタRgにロードされる。The received data reading flowchart is loaded with a time value corresponding to the time required to read the flock or received 8 bits (CT4). If the duration of one bit is 1 mS, then CT is loaded with 8 ms. Each time one bit is received, bit IU from boat FA is stored in register R7, parity calculation is performed between the bit already received and the bit just received, and the parity calculation result is loaded into register Rg.
8ビツトの受信データがR2に転送され終った時にはC
T、は状態°0゛となる。受信したビットと予め計算(
取り決めた)されているビットとの間の比較が行われて
レジスタRgに格納される。これら2つのパリティビッ
トが異なる場合は伝送エラーとなりl、を”0”にする
。そして、ポートPA、の再送要求が行なわれる。When the 8-bit received data has been transferred to R2, C
T is in the state °0゛. The received bits and pre-calculation (
A comparison is made with the bits that have been negotiated (negotiated) and stored in register Rg. If these two parity bits are different, a transmission error occurs and l is set to "0". Then, a retransmission request for port PA is made.
従来のマイクロプロセッサは以上のように構成されてい
たので、信頼度の高い伝送路を使う場合送受信データ長
が1バイト以上のブロックで構成(通常数10′−数1
00バイト単位)されている場合は、バイト単位で送受
信チエツクを行なうと送受信の時間が相当長くなり、伝
送効率が悪(なるという問題点があった。Conventional microprocessors are configured as described above, so when using a highly reliable transmission path, they are configured with blocks with a length of 1 byte or more for sending and receiving data (usually several tens' to several 1 bytes).
00 bytes), if the transmission/reception check is performed in byte units, the transmission/reception time becomes considerably long, resulting in poor transmission efficiency.
この発明は上記のような問題点を解決するためになされ
たもので、通常ブロック伝送方式をとる通信系ではブロ
ックデータ内に1〜数バイトのブロックチエツクコード
を付加して送受信するために、あえてバイトチエツクお
よびバイト再送機能を付加する必要がない。かかる伝送
方式の場合はバイト再送を削除できる機能を付加するこ
とを目的としている。This invention was made in order to solve the above-mentioned problems. In communication systems that normally use block transmission, a one to several byte block check code is added to block data for transmission and reception. There is no need to add byte check and byte retransmission functions. In the case of such a transmission method, the purpose is to add a function that can eliminate byte retransmission.
この発明に係るマイクロプロセッサはマイクロプロセッ
サの内部にデータバスに直結されたモードレジスタを設
け、バイト再送の要/否によりこのレジスタにビット又
はフラグを設定し、バイト再送機能が必要な場合はフラ
グを°l゛にし、また不必要の場合はフラグを”0°に
設定する。The microprocessor according to the present invention has a mode register directly connected to the data bus inside the microprocessor, sets a bit or a flag in this register depending on whether byte retransmission is necessary, and sets the flag when the byte retransmission function is required. If it is unnecessary, set the flag to 0°.
〔作用〕
この発明におけるマイクロプロセッサはデータを受信し
た直後にモードレジスタを読みとり(モニタ)バイト再
送要求フラグがアクティブかどうかを判断し、バイト再
送機能を働かせる。[Operation] Immediately after receiving data, the microprocessor of the present invention reads (monitors) the mode register, determines whether the byte retransmission request flag is active, and activates the byte retransmission function.
以下、この発明の一実施例を図について説明する。 An embodiment of the present invention will be described below with reference to the drawings.
第1図において、(1)はマイクロプロセッサ内部のデ
ータバス、(2]はバイト再送要求の有/無のフラグを
記憶するモードレジスタ、(3)はマイクロプロセッサ
の外部端子のI10ボート、(4)はI10ポート(3
)に内部接続されたシフトレジスタで、I10ポート(
3Jを介して直列データの送受信を実行し、また−時的
に記憶する。(5)はマイクロプロセッサがデータを送
出する時に1バイト単位(並列データ)で記憶する出力
バッファで、1ビツトづつシフトレジスタ(4)に送ら
れ並直列のデータ変換が行なわれる。(6)はシフトレ
ジスタ(4)で受信した直列データを並列データに変換
し内部に送出する入力バッファである。In FIG. 1, (1) is a data bus inside the microprocessor, (2) is a mode register that stores a flag indicating whether or not a byte retransmission request is required, (3) is an I10 port of an external terminal of the microprocessor, and (4) is a mode register that stores a flag indicating whether a byte retransmission request is required. ) is the I10 port (3
) is a shift register internally connected to the I10 port (
3J performs serial data transmission and reception, and also - temporally stores data. (5) is an output buffer that stores data in units of bytes (parallel data) when the microprocessor sends it out, and the data is sent bit by bit to the shift register (4) for parallel-serial data conversion. (6) is an input buffer that converts the serial data received by the shift register (4) into parallel data and sends it internally.
第2図はI10ポートに1バイトデータ(直列)に送受
信されるデータフォーマットを示す。H/Lは信号レベ
ルの°1゛°0°を示し、D0〜D、は1バイト(8ビ
ツト)構成データ、Pはパリティピットを示す。バイト
再送要求時には図の再送要求1ビット期間°L にして
相手側に再送要求を知らせる。不用の場合は“Hレベル
のままである。FIG. 2 shows the data format that is transmitted and received in 1-byte data (serially) to the I10 port. H/L indicates a signal level of °1°0°, D0 to D represent 1 byte (8 bits) configuration data, and P represents a parity pit. When requesting a byte retransmission, the retransmission request is set to 1 bit period °L as shown in the figure, and the retransmission request is notified to the other party. If it is not needed, it remains at "H level."
マイクロプロセッサは動作開始時において、データを送
受信する相手側とバイト再送機能を必要とするか否かを
データ送受信で確認し、必要なればモードレジスタにバ
イト再送型のフラグ°1°を立てる。不必要の場合は°
0′を立てる。第3図はこの発明のマイクロプロセッサ
のプログラムフローチャートで、図に示すように、初期
にモードレジスタCζフラグを立てる。動作フローはス
テップ(4)まで初期動作で実行し、ステップ(G)以
後はデータ送受信毎に実行される動作、フローに分けら
れる。その実行毎にモードレジスタフラグに°l°良/
否を検証しバイト再送要求フラグがなければ、バイト再
送要求動作せずにジャンプして次のフローへ進む。At the start of operation, the microprocessor checks whether a byte retransmission function is required with the other party to which it is transmitting and receiving data, and if necessary, sets a byte retransmission type flag °1° in the mode register. ° if unnecessary
Set 0'. FIG. 3 is a program flowchart of the microprocessor of the present invention. As shown in the figure, the mode register Cζ flag is initially set. The operation flow is executed as an initial operation up to step (4), and after step (G), it is divided into operations and flows that are executed each time data is transmitted and received. At each execution, the mode register flag is set to °l°good/
If there is no byte retransmission request flag, the process jumps to the next flow without requesting a byte retransmission.
マイクロプロセッサ内部のデータの流れは工10ボート
(3)より入力された直列データはシフトレジスタ(4
)から入力バッファ(6)へ並列データに変換されて送
られ、この並列データはモードレジスタ(2]のフラグ
が°l”の場合、内部に送出されてパリティチエツクを
検証され、パリティエラーとあれば直ちに1ビツト送受
信期間°L レベル出力を110ボート(3)経由で送
出する。The data flow inside the microprocessor is such that serial data input from the 10th port (3) is transferred to the shift register (4).
) is converted into parallel data and sent to the input buffer (6), and if the mode register (2] flag is °l", this parallel data is sent internally and is verified by a parity check to check for parity errors. Immediately, a 1-bit transmission/reception period °L level output is sent via the 110 port (3).
なお、上記実施例ではマイクロプロセッサ内部にモード
レジスタ(2)を設けてバイト再送要求有/無をプログ
ラム実行で検証する場合を示したが、マイクロプロセッ
サの他の入力外部端子を回路的(H/W )にVcc
(H入力)またはGND(L入力)にすることで、マイ
クロプロセッサが1バイト毎に受信後、この入力端子の
入力レベルを検証し、例えば°H°なればバイト再送要
求必要な伝送路と判断し、受信データにエラーが有れば
プログラムでバイト再送要求を相手側に送出するように
してもよい。In the above embodiment, a mode register (2) is provided inside the microprocessor to verify the presence/absence of a byte retransmission request by executing a program. W ) to Vcc
(H input) or GND (L input), after the microprocessor receives each byte, it verifies the input level of this input terminal, and if it reaches, for example, °H°, it determines that the transmission line requires a byte retransmission request. However, if there is an error in the received data, the program may send a byte retransmission request to the other party.
また、モードレジスタ(21はバイト再送要求専用に設
ける必要になく、内部バスに直結された他のレジスタに
空フラグが有ればそれで兼用するようにしてもよい。Furthermore, the mode register (21) does not need to be provided exclusively for byte retransmission requests; if another register directly connected to the internal bus has an empty flag, it may be used also.
以上のようにこの発明によれば、マイクロプロセッサ内
にフラグ用レジスタを設はプログラム上で条件フラグと
して実行フローを組み立てるようにしたので、バイト再
送が不要/必要を初期K 1回のみ送受信相手と交信す
るtごけでよい。As described above, according to the present invention, a flag register is provided in the microprocessor, and the execution flow is assembled as a condition flag on the program, thereby eliminating the need for byte retransmission. It is enough to communicate.
第1図はこの発明の一実施例であるマイクロプロセッサ
の機能ブロック図、第2図は第1因におけるデータ送受
信の1バイトのフォーマットを示す図、第3図はこの発
明を実行するプログラムのフローチャート、第4図は従
来のマイクロプロセッサの受信データ検証のフローチャ
ートである。
図において、(1)はデータバス、(2)lよモードレ
ジスタ、(3)はI10ボート、(4月よシフトレジス
タ。
(5]は出力バッファ、(6)は入力バッファを示す。
なお、図中、同一符号は同一 または相当部分を示す。FIG. 1 is a functional block diagram of a microprocessor that is an embodiment of the present invention, FIG. 2 is a diagram showing a 1-byte format for data transmission and reception in the first factor, and FIG. 3 is a flowchart of a program that executes the present invention. , FIG. 4 is a flow chart of received data verification of a conventional microprocessor. In the figure, (1) is the data bus, (2) is the mode register, (3) is the I10 port, and is the shift register (April). (5) is the output buffer, and (6) is the input buffer. In the figures, the same symbols indicate the same or equivalent parts.
Claims (1)
信したデータの誤りを検出時に送信側にデータ再送要求
機能を必要に応じて付加するかまたは付加しない機能を
備えたことを特徴とするマイクロプロセッサ。A microprocessor having a data communication function, characterized in that the microprocessor is equipped with a function to add or not add a data retransmission request function to a transmitting side as necessary when an error in received data is detected.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1001509A JPH02181535A (en) | 1989-01-06 | 1989-01-06 | Microprocessor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1001509A JPH02181535A (en) | 1989-01-06 | 1989-01-06 | Microprocessor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02181535A true JPH02181535A (en) | 1990-07-16 |
Family
ID=11503453
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1001509A Pending JPH02181535A (en) | 1989-01-06 | 1989-01-06 | Microprocessor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02181535A (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS57188156A (en) * | 1981-05-15 | 1982-11-19 | Ricoh Co Ltd | Data transmission system |
-
1989
- 1989-01-06 JP JP1001509A patent/JPH02181535A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS57188156A (en) * | 1981-05-15 | 1982-11-19 | Ricoh Co Ltd | Data transmission system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4439859A (en) | Method and system for retransmitting incorrectly received numbered frames in a data transmission system | |
| US4622550A (en) | Data communication system | |
| JPH0795767B2 (en) | Optimized method of data communication and system using the method | |
| JPH02181535A (en) | Microprocessor | |
| JP2874983B2 (en) | Communication device | |
| JP3016311B2 (en) | EDC LSI check device | |
| JP3164996B2 (en) | Serial data receiving device | |
| JP2829550B2 (en) | Communication control LSI | |
| JPH05316125A (en) | Serial multiplex communication system | |
| JPH0191543A (en) | Serial data transfer system | |
| JP2590831B2 (en) | Error correction code decoding method | |
| JPH0561988A (en) | Identification system | |
| CN119902925A (en) | A full-duplex UART data self-test device and method | |
| JPS61235966A (en) | Data transfer system | |
| JPH08251145A (en) | Transfer data check method between processors | |
| JPH0562492B2 (en) | ||
| JPS62137946A (en) | Data transmission system | |
| JPH04278742A (en) | How to detect errors in received data | |
| JPH0219946A (en) | Semiconductor file memory device | |
| JPS6292544A (en) | data transmission equipment | |
| JPH0324601A (en) | Control method | |
| JPH02131066A (en) | Mis-distribution preventing system for facsimile answering equipment | |
| JPS63260235A (en) | Transmission control method | |
| JPS63136851A (en) | Data communication equipment | |
| JPH04344736A (en) | Line test system |