JPH0225955A - Single chip microcomputer - Google Patents

Single chip microcomputer

Info

Publication number
JPH0225955A
JPH0225955A JP63176615A JP17661588A JPH0225955A JP H0225955 A JPH0225955 A JP H0225955A JP 63176615 A JP63176615 A JP 63176615A JP 17661588 A JP17661588 A JP 17661588A JP H0225955 A JPH0225955 A JP H0225955A
Authority
JP
Japan
Prior art keywords
transmission
data
output
gate
transmission error
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
JP63176615A
Other languages
Japanese (ja)
Inventor
Wataru Okamoto
渉 岡本
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 Corp
Original Assignee
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP63176615A priority Critical patent/JPH0225955A/en
Publication of JPH0225955A publication Critical patent/JPH0225955A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the data transmission efficiency with a single chip microcomputer by setting a transmission error detecting circuit into a serial interface to detect the errors at transmission of data. CONSTITUTION:A transmission error detecting circuit 15 consisting of an exclusive OR gate (EOR gate) 92 and an AND gate 93 is added to a serial interface 9. At transmission of the serial data, a control circuit 91 sets a transmission mode signal 124 at 1 and therefore the output of the gate 92 is set at 1 only when no coincidence is obtained between a level set on a transmission line and the output of a shift register 122, i.e., at a transmission error. Therefore the output of the gate 93 is set at 1 at a transmission error only for a period when an output pulse 129 of a Baud rate generator BRG123 is kept at 1. Thus a transmission error signal 94 is set at 1 and sent to a CPU. As a result, a transmission error is detected in real time and the CPU performs the error processing at an early stage. Then the data transmission efficiency is improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、単一半導体基盤上にコンピュータ機能及びシ
リアルインタフェイスを集積したシングルチップマイク
ロコンピュータに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a single-chip microcomputer that integrates computer functions and a serial interface on a single semiconductor substrate.

〔従来の技術〕[Conventional technology]

近年はLSI製造技術の進歩により、シングルチップマ
イクロコンピュータ(以下シングルチップマイコンと呼
ぶ)の分野においても高集積化が進み、単位機能当たシ
のコストの低下も著しくなってきている。それに伴い、
シングルチップマイコ/の利用分野も拡大し、種々の制
御分野に利用されている。この際、他のLSIとのデー
タ送受信のためにシリアルインタフェイスを備えるシン
グルチップマイコンが多数存在しておシ、各分野におい
て用いられている。例えば、ICカードに用いられてい
るシングルチップマイコンにおいては数十バイトのデー
タの一括送受信を調歩同期式シリアルインタフェイスを
用いて行っている。
In recent years, advances in LSI manufacturing technology have led to higher integration in the field of single-chip microcomputers (hereinafter referred to as single-chip microcomputers), and the cost per unit function has also decreased significantly. with this,
The fields of use of single-chip microcontrollers are expanding, and they are used in various control fields. At this time, there are many single-chip microcomputers equipped with serial interfaces for transmitting and receiving data with other LSIs, and they are used in various fields. For example, a single-chip microcomputer used in an IC card uses an asynchronous serial interface to collectively transmit and receive several tens of bytes of data.

第4図は従来のシングルチップマイコンのプロ、り図で
ある。まず構成要素の説明を行なう。
Figure 4 is a diagram of a conventional single-chip microcomputer. First, the constituent elements will be explained.

第4図においてプログラムカウンタ1は命令の格納アド
レスを指す、インクリメント機能付きポインタである。
In FIG. 4, program counter 1 is a pointer with an increment function that points to an instruction storage address.

読み出し専用メモリ2(以下ROMと呼ぶ)はユーザプ
ログラム格納に用いる。アドレス/データバス3はアド
レス及びデータを時分割に転送するバスである。命令レ
ジスタ4は、ROMzからリードした命令をアドレス/
データバス3を介して格納するレジスタである。制御部
5は、命令レジスタ4に格納した内容に従って制御信号
を出力し、各部を動作させることによシ命令機能を実行
する。演算部6はアドレス/データバス3を介した入力
データに対し演算を行ない、結果をアドレス/データバ
ス3へ出力する。読み出し及び書込の可能なメモリ7(
以下RAMと呼ぶ)は、データ処理において、データ格
納に用いる。汎用レジスタ71は様々な処理データ格納
用として用いる読み出し、書込みが可能なレジスタでR
AM7にマッグされている。
A read-only memory 2 (hereinafter referred to as ROM) is used to store user programs. The address/data bus 3 is a bus that transfers addresses and data in a time-division manner. Instruction register 4 stores the instruction read from ROMz at address/
This is a register that stores data via the data bus 3. The control section 5 outputs a control signal according to the contents stored in the instruction register 4, and executes an instruction function by operating each section. The arithmetic unit 6 performs arithmetic operations on input data via the address/data bus 3 and outputs the results to the address/data bus 3. Readable and writable memory 7 (
RAM (hereinafter referred to as RAM) is used for data storage in data processing. The general-purpose register 71 is a readable and writable register used for storing various processing data.
It is mapped to AM7.

制御部5は制御信号を出力し、指定した汎用レジスタ7
1の格納データをアドレス/データバス3へ出力するか
、またはアドレス/データバス3を介した転送データを
指定した汎用レジスタ71に格納する。割込み制御部8
は割込み要求信号15に従って、CPUに割込み処理を
実行させる。
The control unit 5 outputs a control signal and controls the designated general-purpose register 7.
The stored data of 1 is output to the address/data bus 3, or the data transferred via the address/data bus 3 is stored in the designated general-purpose register 71. Interrupt control unit 8
causes the CPU to execute interrupt processing in accordance with the interrupt request signal 15.

プログラムカウンタ1.命令レジスタ4.制御部5.汎
用レジスタ71.演算部6からなるブロックは中央処理
装置(以下CPUと呼ぶ)を構成している。
Program counter 1. Instruction register 4. Control unit 5. General purpose register 71. A block including the calculation unit 6 constitutes a central processing unit (hereinafter referred to as CPU).

シリアルインタフェイス12は、アドレス/データバス
3を介して入力したパラレルデータを7リアルに外部端
子10を介して出力するか、または外部端子10を介し
て入力したシリアルデータt−受信後、パラレルデータ
に変換後アドレス/データバス3に出力する。
The serial interface 12 outputs the parallel data input via the address/data bus 3 via an external terminal 10, or after receiving the serial data t input via the external terminal 10, outputs the parallel data input via the address/data bus 3. After conversion, it is output to the address/data bus 3.

上記構成要素を用いて動作を説明する。The operation will be explained using the above components.

プログラムカウンタ1で指定するアドレスの命令をRO
M2からリードし、アドレス/データバス3を介して命
令レジスタ4に格納する。制御部5は、命令レジスタ4
に格納した命令をデコード後制御信号を発生し、各部を
動作させることにより命令機能を実行する。命令実行が
終了すると、プログラムカウンタ1の内容に1を加算す
るとともに、命令レジスタ4に新たな命令を格納後実行
する。上記動作を繰り返し行うことによシ、几OM2に
格納したプログラムを逐次実行する。
RO the instruction at the address specified by program counter 1.
Read from M2 and store in instruction register 4 via address/data bus 3. The control unit 5 includes an instruction register 4
After decoding the instructions stored in the controller, it generates control signals and operates each part to execute the instruction function. When the instruction execution is completed, 1 is added to the contents of the program counter 1, and a new instruction is stored in the instruction register 4 and then executed. By repeating the above operations, the programs stored in the OM2 are executed one after another.

次に1第5図に基づきシリアルインタフェイス12の構
成を説明する。
Next, the configuration of the serial interface 12 will be explained based on FIG.

シリアルインタフェイス12は、調歩同期式データ通信
を行う所謂UART (Universal As−y
nchronous Receiver Transm
itter )であり、動作モードを指定するモードレ
ジスタ126.アドレス/データバス3を介して入力し
た送信データかシフトレジスタ122に格納した受信デ
ータを保持するバッファ121.送受信データを格納す
るシフトレジスタ122.送受信ボーレートを指定する
ボーレート・ジェネレータ123(以下BRGと呼ぶ)
、上記各ハードウェアの制御を行う制御回路125及び
送信モード信号124が1の時ONする3ステートバツ
フyL27、送信モード信号124がOの時ONする3
ステートバツフア128から成る。
The serial interface 12 is a so-called UART (Universal As-y
chronous Receiver Transm
itter ) and a mode register 126 .itter that specifies the operating mode. A buffer 121 that holds transmission data input via the address/data bus 3 or reception data stored in the shift register 122. Shift register 122 for storing transmitted and received data. Baud rate generator 123 (hereinafter referred to as BRG) that specifies the sending and receiving baud rate
, a control circuit 125 that controls each of the above hardware, a 3-state buffer yL27 that is turned on when the transmission mode signal 124 is 1, and a 3-state buffer yL27 that is turned on when the transmission mode signal 124 is 0.
It consists of a state buffer 128.

シリアルデータ送信時の動作を説明する。CPUがモー
ドレジスタ126にデータをライトして。
The operation when transmitting serial data will be explained. The CPU writes data to the mode register 126.

送信モード設定後バッファ121に送信データをライト
すると、制御回路125は送信モード信号124を1と
し、3ステードパ、ファ127をONしてシフトレジス
タ122の出力を外部端子10に出力する。またバッフ
7121の格納データをシフトレジスタ1220−ド後
、BRIG123の出力するBRG出力バルス129の
立ち下がり工、ジに同期してシフトアウトすることによ
り、データをシリアルに外部端子1oを介しチ、ブ外部
に出力する。この時、制御回路125はスタートビット
、パリティビット、ストップビットの付加を行なう。
When transmission data is written to the buffer 121 after setting the transmission mode, the control circuit 125 sets the transmission mode signal 124 to 1, turns on the 3-stage amplifier 127, and outputs the output of the shift register 122 to the external terminal 10. In addition, after the data stored in the buffer 7121 is loaded into the shift register 1220-, the data is shifted out in synchronization with the falling edge of the BRG output pulse 129 output from the BRIG 123, so that the data can be serially transferred to the shift register 1220- through the external terminal 1o. Output to outside. At this time, the control circuit 125 adds a start bit, parity bit, and stop bit.

シリアルデータ受信時の動作を説明する。CPUがモー
ドレジスタ126にデータをライトして受信モードに設
定すると、制御回路125は送信モード信号124をO
とし、3ステートバツフア128をONする。外部端子
lOにスタートビットを検出すると、制御回路125は
BRG 123の出力するBRG出力バルス129の立
上がシェ、ジに同期して、シフトレジスタ122に外部
端子10を介して入力データをシフトインすることによ
り受信後、バッファ121に転送し次のデー夕受信に備
える。CPUは、バッファ121に格納したデータをリ
ードすることにより受信データを引き取る。この時、受
信データのパリティビット、ストップビットのチエツク
を制御回路125にて行う。
The operation when receiving serial data will be explained. When the CPU writes data to the mode register 126 to set the reception mode, the control circuit 125 sets the transmission mode signal 124 to O.
Then, the 3-state buffer 128 is turned on. When a start bit is detected at the external terminal IO, the control circuit 125 shifts the input data into the shift register 122 via the external terminal 10 in synchronization with the rise of the BRG output pulse 129 output from the BRG 123. After receiving the data, the data is transferred to the buffer 121 in preparation for receiving the next data. The CPU receives the received data by reading the data stored in the buffer 121. At this time, the control circuit 125 checks the parity bit and stop bit of the received data.

第6図はシリアルデータ送信時のタイばングを示す。デ
ータ長は8ビツトとする。第6図に示すように、スター
トビットS+8ビツトデータd+バリテイビ、トP+ス
トップビットeの順にシリアルにデータを送信する。送
信モード信号124はデータ送信中のみlとなる。また
、B几G123はBRG出力バルス129を出力する。
FIG. 6 shows timing during serial data transmission. The data length is 8 bits. As shown in FIG. 6, data is transmitted serially in the order of start bit S+8-bit data d+validity bit, bit P+stop bit e. The transmission mode signal 124 becomes 1 only during data transmission. Further, the B-box G123 outputs a BRG output pulse 129.

ここで、数十〜数百バイトの大量データを一括して送信
することを考える。例えば、ICカードにおいては、シ
リアルインタフェイスを用いて数十バイトのデータ転送
を行っている。この時、伝送エラーが生じたとする。伝
送エラーは、受信側においてスタートビット、パリティ
ビット、ストップビットのチエ、り及び通常大量送信デ
ータの末尾に付加するエラーチエツクコードによって検
出する。ここで上記エラーチエツクは、受信側にてのみ
行っており、送信側は、全データの送信終了後受信側か
らの送信によシ伝送エラーを検知していた。
Now, let's consider sending a large amount of data, several tens to hundreds of bytes, all at once. For example, in an IC card, a serial interface is used to transfer data of several tens of bytes. Suppose that a transmission error occurs at this time. Transmission errors are detected on the receiving side by checking the start bit, parity bit, and stop bit, and by checking an error check code that is usually added to the end of a large amount of transmitted data. Here, the above error check is performed only on the receiving side, and the transmitting side detects a transmission error in the transmission from the receiving side after all data has been transmitted.

従って、大量データの送信終了時までは伝送工2−を検
知できないため、オーバーへ、ドが大きい。例えば、1
00バイトのデータを9600BP8 (BIT  P
ER5ECOND)のボーレートで一括送信時に伝送エ
ラーが発生したとする。ここで第一バイトの送信時にエ
ラーが発生したとすると、伝送エラー発生からデータ送
信側での伝送エラー検出までにはl÷9600 X 1
1 X 100 = 110m5もの時間を要する。か
と言って、転送データを分割後複数回データ送信を行う
と、伝送効率が低下してしまう。
Therefore, since the transmission process 2- cannot be detected until the end of the transmission of a large amount of data, the overflow is large. For example, 1
00 bytes of data to 9600BP8 (BIT P
Suppose that a transmission error occurs during batch transmission at a baud rate of ER5ECOND). If an error occurs when transmitting the first byte, the time from the occurrence of a transmission error to the detection of a transmission error on the data sending side is l÷9600 x 1
It takes 1 x 100 = 110m5. On the other hand, if data is transmitted multiple times after dividing the transfer data, the transmission efficiency will decrease.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述したように、従来のシングルチップマイクロコンピ
ュータにおいては、シリアルインタフェイスによる大量
データの一括送信時に送信側で伝送エラーの検出ができ
ないため、大量データ送信中途で伝送エラーが発生した
場合、全データを送信終了後エラー処理を行う。
As mentioned above, in conventional single-chip microcomputers, it is not possible to detect transmission errors on the sending side when transmitting large amounts of data all at once using a serial interface, so if a transmission error occurs during large data transmission, all the data is Perform error handling after sending.

従って伝送効率が著しく低下する欠点があった。Therefore, there was a drawback that the transmission efficiency was significantly reduced.

上述した従来のシングルチップマイクロコンピュータに
おいては、シリアルインタフェイスにてデータ送信中途
に発生した伝送エラーを送信側で検出できず、全データ
送信後に伝送エラー処理を行うため伝送効率が低下する
欠点が存在するが、本発明に係わるシングルチップマイ
コンにおいては、伝送エラー検出回路を内蔵することに
より、データ送信側において、送信の中途に発生した伝
送エラーを検出可能であり、伝送エラー処理を直ちに開
始可能なため伝送効率が著しく良いという相違点を有す
る。
The above-mentioned conventional single-chip microcomputers have the drawback that transmission errors that occur during data transmission through the serial interface cannot be detected on the transmitting side, and transmission error processing is performed after all data has been transmitted, resulting in a decrease in transmission efficiency. However, the single-chip microcontroller according to the present invention has a built-in transmission error detection circuit, so that it is possible to detect transmission errors that occur during transmission on the data sending side, and to immediately start transmission error processing. Therefore, the difference is that the transmission efficiency is extremely high.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は、単一半導体基盤上に中央処理装置およびシリ
アルインタフェイスを集積したシングルチップマイクロ
コンピュータにおいて、前記シリアルインタフェイスに
伝送エラー検出回路を内蔵し、前記伝送エラー検出回路
によってデータ送信時の伝送エラーを検出することを特
徴とする。
The present invention provides a single-chip microcomputer in which a central processing unit and a serial interface are integrated on a single semiconductor substrate. It is characterized by detecting errors.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

本発明に係わるシングルチップマイコンの第1の実施例
の構成を第1図に示す。シリアルインタフェイス9によ
るデータ送信時に伝送エラーが発生した時、シリアルイ
ンタフェイス9から伝送エラー検出信号94を出力し、
割込み制御部6を介してCPUに伝送エラー処理を行わ
せる点で第4図に示す従来のシングルチップマイコンと
は異なる。
FIG. 1 shows the configuration of a first embodiment of a single-chip microcomputer according to the present invention. When a transmission error occurs during data transmission by the serial interface 9, a transmission error detection signal 94 is output from the serial interface 9,
This differs from the conventional single-chip microcomputer shown in FIG. 4 in that the CPU performs transmission error processing via the interrupt control section 6.

以下、シリアルインタフェイス9の構成を第2図に示し
動作を説明する。シリアルインタフェイス9は、第5図
に示す従来のシングルチップマイコンにおけるシリアル
インタフェイス12に対し、排他論理和ゲート92(以
下EORゲートと呼ぶ)及び論理積ゲート93(以下A
NDゲートと呼ぶ)から成る伝送工2−検出回路15を
付加した構成である。
The configuration of the serial interface 9 is shown in FIG. 2 and its operation will be explained below. The serial interface 9 has an exclusive OR gate 92 (hereinafter referred to as an EOR gate) and an AND gate 93 (hereinafter referred to as an A
This is a configuration in which a transmission circuit 2 and a detection circuit 15, each consisting of a transmission circuit (referred to as an ND gate), are added.

以下、伝送エラー検出回路15の構成及び動作を説明す
る。
The configuration and operation of the transmission error detection circuit 15 will be explained below.

伝送エラー検出回路15は、EORゲート92とAND
ゲート93から成る。EORゲート920入力は、3ス
テート出力バツフア127の出力及びシフトレジスタ1
22の出力であり、両者が一致する時のみ(正常送信時
のみ)EORゲート92の出力が0となる。ANDゲー
ト93は、送信モード信号124が1.EORゲート9
2の出力がl、BRG出力パルス126が1の時のみ出
力を1とする。
The transmission error detection circuit 15 is connected to the EOR gate 92 and the AND
It consists of a gate 93. EOR gate 920 inputs are the output of 3-state output buffer 127 and shift register 1.
22, and the output of the EOR gate 92 becomes 0 only when the two match (only during normal transmission). AND gate 93 determines whether transmission mode signal 124 is 1. EOR gate 9
The output is set to 1 only when the output of 2 is 1 and the BRG output pulse 126 is 1.

シリアルデータ送信時、制御回路91は送信モード信号
124を1とするためEORゲート92の出力は、伝送
線上のレベルとシフトレジスタ122の出力が一致しな
い時のみ(伝送エラー時のみ)、1となる。従って、伝
送エラー時にはBRG出力出力バルク129の期間AN
Dゲート93の出力が1となり伝送エラー信号94を1
とする。
When transmitting serial data, the control circuit 91 sets the transmission mode signal 124 to 1, so the output of the EOR gate 92 becomes 1 only when the level on the transmission line and the output of the shift register 122 do not match (only in the case of a transmission error). . Therefore, in the case of a transmission error, the period AN of the BRG output output bulk 129
The output of the D gate 93 becomes 1, and the transmission error signal 94 becomes 1.
shall be.

伝送エラーが生じない場合、EORゲート92の出力は
0となfiANDゲート93の出力は0゜従って、伝送
エラー信号94は0である。
If no transmission error occurs, the output of the EOR gate 92 is 0, and the output of the fiAND gate 93 is 0°.Therefore, the transmission error signal 94 is 0.

シリアルデータ受信時、制御回路91は送信モード信号
124を0とするため、ANDゲート93の出力は0と
なり伝送エラー信号124はOである。従って、データ
送信中に伝送エラー発生時のみに、BRG出力出力バル
ク129の期間伝送エラー信号94は1となる。従って
、大量データの一括送信時に発生した伝送エラーをリア
ルタイムに検出し伝送エラー信号94を出力する仁とで
、CPUにエラー処理を早く行わせることができるため
、伝送効率の向上が可能である。
When receiving serial data, the control circuit 91 sets the transmission mode signal 124 to 0, so the output of the AND gate 93 becomes 0 and the transmission error signal 124 becomes O. Therefore, the period transmission error signal 94 of the BRG output output bulk 129 becomes 1 only when a transmission error occurs during data transmission. Therefore, by detecting transmission errors that occur during bulk transmission of large amounts of data in real time and outputting the transmission error signal 94, the CPU can quickly perform error processing, thereby improving transmission efficiency.

例えば、100バイトのデータを96008 P 5(
BIT  PE几 5ECOND)のボーレートで一括
送信時に伝送エラーが発生したとする。ζこで第一バイ
トの送信時にエラーが発生したとすると、第一バイト送
信中に伝送エラーを検出し直ちに伝送エラー処理を行う
。従って、従来伝送エラー発生からデータ送信側での伝
送エラー検出までに110msもの時間を要していたが
、本実施例に係わるシングルチップマイコンにおいては
 1÷9600÷2=52μsの所用時間で伝送エラー
〇検出が可能である。
For example, 100 bytes of data is 96008 P 5 (
Suppose that a transmission error occurs during batch transmission at a baud rate of BIT PE 5 ECOND). ζ If an error occurs during transmission of the first byte, the transmission error is detected during transmission of the first byte and transmission error processing is immediately performed. Therefore, conventionally it took 110ms from the occurrence of a transmission error until the transmission error was detected on the data sending side, but with the single-chip microcontroller according to this embodiment, a transmission error can be detected in the required time of 1÷9600÷2=52μs. 〇Detection is possible.

次に、本発明に係わるシングルチップマイコンの第2の
実施例について説明する。
Next, a second embodiment of the single-chip microcomputer according to the present invention will be described.

本発明に係わる第2の実施例のシングルチップマイコン
においては、シリアルインタフェイスに内蔵する伝送エ
ラー検出回路に1と、トのラッチ回路を備え、伝送エラ
ー検出時にラッチ回路をセットし、CPUがラッチ回路
の内容をチエツクすることで伝送エラーの発生を検知す
る点で第一の実施例に係わるシングルチップマイコンと
異なる。
In the single-chip microcomputer of the second embodiment of the present invention, the transmission error detection circuit built into the serial interface is equipped with latch circuits 1 and 2, and the latch circuit is set when a transmission error is detected, and the CPU latches. This differs from the single-chip microcomputer according to the first embodiment in that the occurrence of a transmission error is detected by checking the contents of the circuit.

以下、本発明の第2の実施例のシリアルインタフェイス
に関して第3図を用いて説明する。本発明に係わる第2
の実施例のシングルチップマイコンにおいては、シリア
ルインタフェイス13の内蔵する伝送エラー検出回路1
4を、EORゲート131、ANDケート132.ラッ
チ回路133から構成する。リセット信号135は、C
PUによる特定アドレスへのライト時に出力される信号
であり、ラッチ回路133をリセットする。
The serial interface of the second embodiment of the present invention will be described below with reference to FIG. Second related to the present invention
In the single-chip microcontroller of the embodiment, the transmission error detection circuit 1 built in the serial interface 13
4, EOR gate 131, AND gate 132. It consists of a latch circuit 133. The reset signal 135 is C
This is a signal output when the PU writes to a specific address, and resets the latch circuit 133.

ラッチ回路133は、BRG126の出力するBRG出
力出力バルク129ち上がシエ、ジに同期してANDゲ
ート132の出力をう、チし、制御回路134に出力す
る。ラッチ回路133はメモリマツプされており、CP
Uはマツプアドレスに対しリードすることによシ格納デ
ータをリードする。EORゲート131はシフトレジス
タ122の出力と3ステートバツフア127の出力値が
一致する時のみ0を出力する。ANDケート132はE
ORゲート131の出力及び送信モード信号135が共
に1の時のみ出力を1とする。
The latch circuit 133 latches the output of the AND gate 132 in synchronization with the BRG output bulk 129 output from the BRG 126 and outputs it to the control circuit 134 . The latch circuit 133 is memory mapped, and the CP
U reads the stored data by reading from the map address. EOR gate 131 outputs 0 only when the output value of shift register 122 and the output value of 3-state buffer 127 match. AND Kate 132 is E
The output is set to 1 only when the output of the OR gate 131 and the transmission mode signal 135 are both 1.

以下、ラッチ回路133を予めCPUによりセ、トシて
おくものとする。
Hereinafter, it is assumed that the latch circuit 133 is set and set in advance by the CPU.

シリアルデータ送信時を考える。シリアルデータ送信中
に制御回路134は送信モード信号124を1とし、3
ステートバツフ7127をONする。
Consider when transmitting serial data. During serial data transmission, the control circuit 134 sets the transmission mode signal 124 to 1 and 3.
Turn on state buffer 7127.

シフトレジスタ131は、BRIG123の発生するB
RG出力出力バルク129下が9エツジに同期して格納
データをシフトアウトする。この時、シフトレジスタ1
22の出力と3ステードパ、ファ127の出力が異なる
と、EORゲート131の出力が1となる。従ってAN
Dゲー)132の出力が1となシラッチ回路133はB
RG123の出力するBRG出力出力バルク129上が
シエッジに同期してANDゲート132の出力である1
を格納する。つま夛、データ送信時に伝送エラーが発生
するとラッチ回路133は1を格納する。
The shift register 131 receives the B generated by the BRIG123.
The lower RG output output bulk 129 shifts out the stored data in synchronization with the 9th edge. At this time, shift register 1
When the output of the EOR gate 131 is different from the output of the 3-stage amplifier 127, the output of the EOR gate 131 becomes 1. Therefore, AN
D game) 132 output is 1, and the silatch circuit 133 is B
1 which is the output of the AND gate 132 in synchronization with the edge of the BRG output output bulk 129 outputted by the RG123.
Store. Finally, if a transmission error occurs during data transmission, the latch circuit 133 stores 1.

シリアルデータ受信時を考える。この時、制御回路13
4は送信モード信号124を0とするためANDゲート
132の出力はOとなり、ラッチ回路133の出力はO
のままである。
Consider when receiving serial data. At this time, the control circuit 13
4 sets the transmission mode signal 124 to 0, so the output of the AND gate 132 becomes O, and the output of the latch circuit 133 becomes O.
It remains as it is.

従って、CPUはデータ送信前にラッチ回路133をリ
セットしておいて、大量データの一括送信中にラッチ回
路の内容を調べるだけでその時迄の伝送エラー発生の有
無を知ることができる。
Therefore, by resetting the latch circuit 133 before transmitting data and checking the contents of the latch circuit during bulk data transmission, the CPU can know whether a transmission error has occurred up to that time.

伝送エラー検出時には、直ちにCPUによシ伝送エラー
処理を行う。従って、大量データの一括送信時に、CP
Uが一定時間間隔でラッチ回路133の内容をチエツク
することによシ、データ送信中に発生した伝送エラーを
早期に検出し、エラー処理を早く行うことができるため
伝送効率の向上が可能である。
When a transmission error is detected, the CPU immediately performs transmission error processing. Therefore, when sending bulk data, the CP
By checking the contents of the latch circuit 133 at regular time intervals, U can detect transmission errors that occur during data transmission at an early stage, and can quickly handle errors, thereby improving transmission efficiency. .

上述したように、単純なハードウェア回路を付加するこ
とKよりデータ送信中に伝送エラーを検出し、伝送エラ
ー処理を早期に行うことが可能であり、シリアルデータ
の伝送効率の向上を可能とする。
As mentioned above, by adding a simple hardware circuit, it is possible to detect transmission errors during data transmission and perform transmission error processing at an early stage, making it possible to improve serial data transmission efficiency. .

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

以上説明したように、本発明においてはシリアルインタ
フェイスに簡単な伝送エラー検出回路を付加することに
より、データ伝送中に送信側による伝送エラーの検出が
可能であ夛、大量データの一括送信の際、早期にエラー
処理を行うことができるため伝送効率を向上させる効果
がある。
As explained above, in the present invention, by adding a simple transmission error detection circuit to the serial interface, it is possible for the transmitting side to detect transmission errors during data transmission. , it is possible to perform error processing at an early stage, which has the effect of improving transmission efficiency.

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

第1図は本発明の第1の実施例のブロック図、第2図は
第1図に示すシリアルインタフェイス9のプロ、り図、
第3図は本発明の第2の実施例におけるシリアルインタ
フェイス13のプロ、り図、第4図は従来のシングルチ
ップマイコンのブロック図、第5図は第4図に示すシリ
アルインタフェイス12のブロック図、第6図は第4図
に示す従来のシングルチップマイコンのシリアルインタ
フェイス12によるデータ転送のタイぐングである。 1・・・・・・プログラムカウンタ、2・・・・・・R
OM、3・・・・・・アドレス/データバス、4・・・
・・・命令レジスタ、5・・・・・・制御部、6・・・
・・・演算部、7・・・・・・RAM、71・・・・・
・汎用レジスタ、8・・・・・・割込み制御部、9・・
・・・・シリアルインタフェイス、91・・・・・・制
御回路、92・・・・・・EORゲート、93・・・・
・・ANDゲート、94・・・・・・伝送エラー信号、
10・・・・・・外部端子、12・・・・・・シリアル
インタフェイス、121・・・・・・バッファ、122
・・・・・・シフトレジスタ、123・・・・・・BR
G。 124・・・・・°送信モード信号、125パ・・・・
制御回路、126・・・・・・モードレジスタ、127
°゛゛°°3ステートバツフア、128・・・・・・3
ステートバツフア、129・・・・・・BRG出力パル
ス、13・・・・・・シリアルインタフェース、131
・旧・・EO凡ゲート、132・・・・・・ORゲート
、134・・・・・・制御回路、133・・・・・・ラ
ッチ回路、135・・・・・・リセット信号。 代理人 弁理士  内 原   音 rJ3旧 ガ5回 BKlq出刈ハ0ルス 第1回
FIG. 1 is a block diagram of the first embodiment of the present invention, and FIG. 2 is a professional diagram of the serial interface 9 shown in FIG.
FIG. 3 is a schematic diagram of the serial interface 13 in the second embodiment of the present invention, FIG. 4 is a block diagram of a conventional single-chip microcomputer, and FIG. 5 is a diagram of the serial interface 12 shown in FIG. The block diagram in FIG. 6 shows the timing of data transfer by the serial interface 12 of the conventional single-chip microcomputer shown in FIG. 1...Program counter, 2...R
OM, 3...Address/data bus, 4...
...Instruction register, 5...Control unit, 6...
...Arithmetic unit, 7...RAM, 71...
・General-purpose register, 8...Interrupt control unit, 9...
... Serial interface, 91 ... Control circuit, 92 ... EOR gate, 93 ...
...AND gate, 94...Transmission error signal,
10... External terminal, 12... Serial interface, 121... Buffer, 122
...Shift register, 123...BR
G. 124...° transmission mode signal, 125 pa...
Control circuit, 126...Mode register, 127
°゛゛°°3 state buffer, 128...3
State buffer, 129...BRG output pulse, 13...Serial interface, 131
- Old: EO gate, 132: OR gate, 134: control circuit, 133: latch circuit, 135: reset signal. Agent Patent Attorney Uchihara Oto rJ3 Old Ga 5th BKlq Degari Harus 1st

Claims (1)

【特許請求の範囲】[Claims] 単一半導体基盤上に中央処理装置およびシリアルインタ
フェイスを集積したシングルチップマイクロコンピュー
タにおいて、前記シリアルインタフェイスに伝送エラー
検出回路を内蔵し、前記伝送エラー検出回路によってデ
ータ送信時の伝送エラーを検出することを特徴とするシ
ングルチップマイクロコンピュータ。
In a single-chip microcomputer in which a central processing unit and a serial interface are integrated on a single semiconductor substrate, the serial interface has a built-in transmission error detection circuit, and the transmission error detection circuit detects transmission errors during data transmission. A single-chip microcomputer characterized by:
JP63176615A 1988-07-14 1988-07-14 Single chip microcomputer Pending JPH0225955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63176615A JPH0225955A (en) 1988-07-14 1988-07-14 Single chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63176615A JPH0225955A (en) 1988-07-14 1988-07-14 Single chip microcomputer

Publications (1)

Publication Number Publication Date
JPH0225955A true JPH0225955A (en) 1990-01-29

Family

ID=16016666

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63176615A Pending JPH0225955A (en) 1988-07-14 1988-07-14 Single chip microcomputer

Country Status (1)

Country Link
JP (1) JPH0225955A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5962938A (en) * 1978-09-05 1984-04-10 モトロ−ラ・インコ−ポレ−テツド Microcomputer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5962938A (en) * 1978-09-05 1984-04-10 モトロ−ラ・インコ−ポレ−テツド Microcomputer

Similar Documents

Publication Publication Date Title
TW561399B (en) Math coprocessor
WO2019136595A1 (en) Method for handling i2c bus deadlock, electronic device, and communication system
AU617446B2 (en) Improved parity checking apparatus
US4378589A (en) Undirectional looped bus microcomputer architecture
CA1297198C (en) Program mode access control system
US7991982B2 (en) Microcomputer and encoding system for executing peripheral function instructions
KR19980076203A (en) Asynchronous Serial Data Transmission / Reception Method of Digital Signal Processor
EP0564118A1 (en) Serial data transfer apparatus and method
JPH0225955A (en) Single chip microcomputer
US5617433A (en) Serial data transfer apparatus
EP2351304A1 (en) Bit inversion for communication interface
CN114360632A (en) Solid state disk chip detection method and device comprising solid state disk main control chip
US20080288692A1 (en) Semiconductor integrated circuit device and microcomputer
JPS60178561A (en) Standard digital interface device
US20230011127A1 (en) Introduction and Detection of Parity Error in a UART
JPS63228856A (en) Communication controller
US6920577B2 (en) Clock selection circuit for selecting between an external clock and a clock generated by comparing a count value with a setting value
CN107748805B (en) Single-wire interface method for on-chip debugging
JPS63164554A (en) Automatic recognizing system for data speed
Ke et al. A secure data transmission scheme for 1149.1 backplane test bus
JP2864611B2 (en) Semiconductor memory
JPS6158041A (en) Microinstruction execution control system
JP2630077B2 (en) Clock synchronous serial interface
JPS63228855A (en) Communication controller
KR100251937B1 (en) A receiving data processing system of general asynchronous transmitter/receiver