JPH09293047A - Data transfer device of microcomputer - Google Patents

Data transfer device of microcomputer

Info

Publication number
JPH09293047A
JPH09293047A JP8103057A JP10305796A JPH09293047A JP H09293047 A JPH09293047 A JP H09293047A JP 8103057 A JP8103057 A JP 8103057A JP 10305796 A JP10305796 A JP 10305796A JP H09293047 A JPH09293047 A JP H09293047A
Authority
JP
Japan
Prior art keywords
data
address
microcomputer
memory
communication
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
JP8103057A
Other languages
Japanese (ja)
Inventor
Bunro Kobayashi
文朗 小林
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP8103057A priority Critical patent/JPH09293047A/en
Publication of JPH09293047A publication Critical patent/JPH09293047A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To specify a memory address fast by an external device when memory data of the microcomputer are transferred to the external device by an SPI communication. SOLUTION: The microcomputer 11 has a clock synchronous serial communication (SPI communication) with a tool 12 for adaptation through a serial interface 13. A high-order address specification register 24 of the microcomputer 11 specifies the high-order address of data which desires to be read out of a RAM 27. An address generation circuit 25 combines serial data (low-order address) sent from the tool 12 for adaptation with the high-order address specified by the high-order address specification register 24 to generate the address of RAM data to be sent next. Then a transmit data transfer circuit 26 reads the RAM address in the address by direct memory access, and transfers them to a transmit data buffer register 20, so that the data are transmitted to the tool 12 for adaptation.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータのメモリデータをクロック同期方式のシリアル通信
で外部装置に転送するマイクロコンピュータのデータ転
送装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer data transfer device for transferring memory data of a microcomputer to an external device by clock synchronous serial communication.

【0002】[0002]

【従来の技術】従来より、マイクロコンピュータは種々
の機器の制御用コンピュータとして多用されており、開
発過程において、制御対象の特性に適合する適合定数を
設定するために、制御対象に搭載されたマイクロコンピ
ュータに適合用ツールを接続し、マイクロコンピュータ
で制御対象を制御しながら、該マイクロコンピュータの
メモリ(RAM)に一時的に記憶されるデータを適合用
ツールでモニターすることが行われている。
2. Description of the Related Art Conventionally, a microcomputer has been widely used as a computer for controlling various devices, and in the course of development, a microcomputer mounted on a controlled object in order to set a matching constant that matches the characteristics of the controlled object. BACKGROUND ART A matching tool is connected to a computer, and while the control target is controlled by a microcomputer, data that is temporarily stored in a memory (RAM) of the microcomputer is monitored by the matching tool.

【0003】従来、マイクロコンピュータと適合用ツー
ルとの接続は、マイクロコンピュータのバスを外部に導
出して適合用ツールと接続する方式が採用されていた
が、近年のマイクロコンピュータの動作周波数の高周波
数化に伴い、バスを外部に導出する接続方式では、高周
波ノイズの影響を受けやすく、データ転送の信頼性を確
保できなくなってきている。
Conventionally, a method of connecting a microcomputer and a matching tool to a matching tool by deriving a bus of the microcomputer to the outside has been adopted. However, in recent years, a high operating frequency of the microcomputer has been adopted. Along with this, the connection method in which the bus is led to the outside is susceptible to high-frequency noise, and the reliability of data transfer cannot be ensured.

【0004】そこで、最近では、高周波ノイズの影響を
受けにくくするために、マイクロコンピュータにシリア
ルインターフェースを設けて、マイクロコンピュータと
適合用ツールとの間を通信ケーブルで接続する方式が採
用されつつある。この方式では、マイクロコンピュータ
のCPUの負担を軽減して高速なデータ転送を可能にす
るために、マイクロコンピュータのメモリとシリアルイ
ンターフェースとの間のデータの転送をソフトウエアを
介さずにハードウエアで直接実行するダイレクトメモリ
アクセス(DMA)方式が採用されている。従来のDM
A方式では、予め指定したメモリ領域にモニターしたい
メモリのアドレスを設定しておき、そのアドレスに格納
されているデータをシリアルインターフェースへ転送す
るようになっている。
Therefore, recently, in order to reduce the influence of high frequency noise, a system in which a serial interface is provided in a microcomputer and a communication cable is connected between the microcomputer and a matching tool is being adopted. In this method, in order to reduce the load on the CPU of the microcomputer and enable high-speed data transfer, the data transfer between the memory of the microcomputer and the serial interface is performed directly by hardware without software. A direct memory access (DMA) method of executing is adopted. Conventional DM
In the A method, an address of a memory to be monitored is set in a designated memory area in advance, and the data stored at the address is transferred to the serial interface.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
DMA方式では、予め指定したメモリ領域にモニターし
たいメモリのアドレスを設定するため、マイクロコンピ
ュータ内のメモリの一部をDMAのために使用しなけれ
ばならず、その分、CPUで使用できるメモリ量が少な
くなってしまう。しかも、マイクロコンピュータと適合
用ツールとの間のシリアル通信方式は、シリアルデータ
の最初と最後のビットにスタートビットとストップビッ
トを付加して同期をとる調歩同期方式のシリアル通信
(SCI通信)を使用しているため、通信ボーレートが
最高でも500Kbps程度までしか確保できず、メモ
リデータの転送速度が遅いという欠点もある。
However, in the conventional DMA method, since the address of the memory to be monitored is set in a predetermined memory area, a part of the memory in the microcomputer must be used for DMA. As a result, the amount of memory that can be used by the CPU decreases accordingly. Moreover, as the serial communication method between the microcomputer and the adapting tool, the start-stop bit and the stop bit are added to the first and last bits of the serial data for synchronization, and the start-stop synchronization method serial communication (SCI communication) is used. Therefore, the communication baud rate can be secured only up to about 500 Kbps, and the transfer rate of memory data is slow.

【0006】この場合、通信方式をクロック同期方式の
シリアル通信(SPI通信)に変更すれば、通信ボーレ
ートを例えば4Mbps程度まで速くすることができ
る。更に、適合用ツールからモニターしたいメモリのア
ドレスをマイクロコンピュータへ送信すれば、マイクロ
コンピュータ内のメモリの一部をDMAのために使用す
る必要がなくなり、その分、CPUで使用可能なメモリ
量を多くできる。
In this case, if the communication system is changed to the serial communication (SPI communication) of the clock synchronous system, the communication baud rate can be increased to, for example, about 4 Mbps. Furthermore, by sending the address of the memory to be monitored from the matching tool to the microcomputer, it is not necessary to use part of the memory in the microcomputer for DMA, and the amount of memory available to the CPU is increased accordingly. it can.

【0007】しかしながら、膨大なメモリのアドレスを
指定するには多くのビット数を必要とするため、1回の
通信で送られるシリアルデータのビット数では、膨大な
メモリのアドレスを指定することができない。従って、
SPI通信だけでアドレスを指定する場合には、アドレ
スのデータを2回に分けて送信し、受信側で2回のシリ
アルデータを組み合わせて1つのアドレスのデータを作
る必要がある。このため、適合用ツールは、アドレスの
データを2回送信して、始めて1つのメモリデータを受
信することになり、その分、メモリデータの転送速度が
遅くなり、SPI通信の利点である高速通信機能を有効
に使用できないばかりか、適合用ツール側では、送信し
たアドレスと受信したメモリデータとの同期を取るため
の特別な処理が必要となり、面倒である。
However, since a large number of bits are required to specify an enormous memory address, the enormous memory address cannot be specified by the number of bits of serial data sent in one communication. . Therefore,
When the address is designated only by SPI communication, it is necessary to transmit the address data in two steps and combine the serial data twice in the receiving side to create one address data. Therefore, the adapting tool transmits the data of the address twice and receives one memory data for the first time, and the transfer speed of the memory data becomes slower accordingly, which is an advantage of the high speed communication which is the advantage of SPI communication. Not only can the functions be used effectively, but the matching tool requires special processing to synchronize the sent address with the received memory data, which is troublesome.

【0008】本発明はこのような事情を考慮してなされ
たものであり、従ってその目的は、クロック同期方式の
シリアル通信(SPI通信)を使用して、1回のシリア
ルデータの送信でメモリのアドレスを指定できて、メモ
リデータの転送速度を速くできると共に、外部装置側で
受信したメモリデータとアドレスとの同期が取りやすい
マイクロコンピュータのデータ転送装置を提供すること
にある。
The present invention has been made in view of the above circumstances, and therefore an object thereof is to use a serial communication (SPI communication) of a clock synchronization system to transmit a serial data in one time. An object of the present invention is to provide a data transfer device for a microcomputer, which can specify an address, can increase the transfer speed of memory data, and can easily synchronize the address with the memory data received by the external device.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、本発明の請求項1のマイクロコンピュータのデータ
転送装置は、外部装置から送信されてくるデータをクロ
ック同期方式のシリアルインターフェースの受信部で受
信し、この受信データを、マイクロコンピュータのメモ
リから読み出したいデータの下位アドレスとする。そし
て、マイクロコンピュータ内に設けられたアドレス生成
手段は、上記下位アドレスをマイクロコンピュータ内に
設けられた上位アドレス指定手段で指定された上位アド
レスと結合して、次に送信するメモリデータのアドレス
を生成する。その後、送信データ転送手段は、アドレス
生成手段で生成されたアドレスに格納されているメモリ
データをダイレクトメモリアクセス(DMA)方式で前
記シリアルインターフェースの送信部へ転送し、このメ
モリデータを外部装置へ送信する。
In order to achieve the above object, a data transfer device for a microcomputer according to claim 1 of the present invention is a receiving part of a serial interface of a clock synchronization system for transmitting data transmitted from an external device. And the received data is used as the lower address of the data to be read from the memory of the microcomputer. The address generating means provided in the microcomputer combines the lower address with the upper address designated by the upper address designating means provided in the microcomputer to generate an address of memory data to be transmitted next. To do. Thereafter, the transmission data transfer means transfers the memory data stored in the address generated by the address generation means to the transmission unit of the serial interface by the direct memory access (DMA) method, and transmits this memory data to the external device. To do.

【0010】この場合、上位アドレス指定手段とアドレ
ス生成手段を設けることで、1回のシリアルデータの送
信でアドレスを指定できる。このため、マイクロコンピ
ュータは、外部装置から送信されてくるシリアルデータ
(下位アドレス)を1回受信する毎に、その都度、直ち
にメモリデータをDMA方式でシリアルインターフェー
スの送信部へ転送し、これを外部装置へ転送することが
できて、メモリデータの転送速度を速くできる。しか
も、外部装置は、データ送信終了直後に受信したデータ
を、前回送信したアドレスのメモリデータとして処理す
れば良く、アドレスとメモリデータとの同期に特別な処
理を行う必要がない。
In this case, by providing the upper address designating means and the address generating means, the address can be designated by one transmission of serial data. Therefore, each time the microcomputer receives the serial data (lower address) transmitted from the external device once, the microcomputer immediately transfers the memory data to the transmission unit of the serial interface by the DMA method, and transfers the memory data to the external unit. It can be transferred to the device, and the transfer speed of the memory data can be increased. Moreover, the external device may process the data received immediately after the end of the data transmission as the memory data of the previously transmitted address, and does not need to perform a special process for synchronizing the address and the memory data.

【0011】更に、請求項2では、前記シリアルインタ
ーフェースの受信部で前記外部装置からのデータを受信
する際に、同期クロックの入力回数がシリアルデータの
ビット数に達する前に同期クロックが入力されなくなっ
た場合に、リセット手段により受信データをリセットす
る。従って、万一、ノイズ等によって同期クロックが乱
れた場合でも、1データ分だけ通信を止めるだけで、以
後の通信を正常状態に復帰させることができる。
Further, according to a second aspect, when the receiving unit of the serial interface receives data from the external device, the synchronous clock is not input before the number of input of the synchronous clock reaches the number of bits of the serial data. In this case, the reset means resets the received data. Therefore, even if the synchronous clock is disturbed due to noise or the like, it is possible to restore the subsequent communication to the normal state by stopping the communication for one data.

【0012】[0012]

【発明の実施の形態】以下、本発明の一実施形態を図面
に基づいて説明する。マイクロコンピュータ11には、
適合用ツール12(外部装置)とクロック同期方式のシ
リアル通信(SPI通信)を行うためのシリアルインタ
ーフェース13が設けられている。このシリアルインタ
ーフェース13には、適合用ツール12から同期クロッ
クCLKが入力されるクロック端子14、下位アドレス
データRXが入力される受信端子15、メモリデータT
Xを適合用ツール12へ送信する送信端子16が設けら
れている。このシリアルインターフェース13には、受
信部を構成する例えば16ビットの受信シフトレジスタ
17と受信データバッファレジスタ18と、送信部を構
成する例えば16ビットの送信シフトレジスタ19と送
信データバッファレジスタ20が設けられている。更
に、このシリアルインターフェース13には、送受信シ
フトレジスタリセット回路21(リセット手段)が設け
られ、通信途中でノイズ等によって同期クロックCLK
の入力が乱れたときに、この送受信シフトレジスタリセ
ット回路21から受信シフトレジスタ17と送信シフト
レジスタ19へリセット信号を出力して、これらをリセ
ットする。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. In the microcomputer 11,
A serial interface 13 for performing serial communication (SPI communication) of a clock synchronization method with the adaptation tool 12 (external device) is provided. The serial interface 13 has a clock terminal 14 to which the synchronization clock CLK is input from the matching tool 12, a reception terminal 15 to which the lower address data RX is input, and a memory data T.
A transmission terminal 16 for transmitting X to the matching tool 12 is provided. The serial interface 13 is provided with, for example, a 16-bit reception shift register 17 and a reception data buffer register 18 that form a reception unit, and a 16-bit transmission shift register 19 and a transmission data buffer register 20 that form a transmission unit. ing. Further, the serial interface 13 is provided with a transmission / reception shift register reset circuit 21 (reset means), and the synchronization clock CLK is generated due to noise or the like during communication.
When the input of is disturbed, the transmission / reception shift register reset circuit 21 outputs a reset signal to the reception shift register 17 and the transmission shift register 19 to reset them.

【0013】また、マイクロコンピュータ11内には、
図示はしないが、CPU、ROM、RAM27(メモ
リ)等が設けられ、これら各部がアドレスバス22やデ
ータバス23で接続されている。更に、このマイクロコ
ンピュータ11内には、上位アドレス指定レジスタ24
(上位アドレス指定手段)が設けられている。この上位
アドレス指定レジスタ24は、RAM27から読み出し
たいデータのアドレスの16ビットより上位のアドレス
(上位アドレス)を指定するためのものである。例え
ば、RAM27のアドレスのビット数が24ビットの場
合には、上位アドレスは8ビットデータであり、RAM
のアドレスのビット数が32ビットの場合には、上位ア
ドレスは16ビットデータである。
Further, in the microcomputer 11,
Although not shown, a CPU, ROM, RAM 27 (memory) and the like are provided, and these units are connected by an address bus 22 and a data bus 23. Further, in the microcomputer 11, the high-order address designation register 24
(Upper address designating means) is provided. The upper address designation register 24 is for designating an address (upper address) higher than 16 bits of the address of the data desired to be read from the RAM 27. For example, when the number of bits of the address of the RAM 27 is 24 bits, the upper address is 8-bit data, and the RAM
When the number of bits of the address is 32 bits, the upper address is 16-bit data.

【0014】更に、マイクロコンピュータ11内には、
アドレス生成回路25(アドレス生成手段)と送信デー
タ転送回路26(送信データ転送手段)とが設けられて
いる。アドレス生成回路25は、受信データバッファレ
ジスタ18から転送されてくる16ビットの下位アドレ
スデータと、上位アドレス指定レジスタ24から転送さ
れてくる8ビット又は16ビットの上位アドレスデータ
とを結合して、24ビット又は32ビットのアドレスを
生成する。このアドレスは次に送信するRAMデータの
アドレスとなる。
Further, in the microcomputer 11,
An address generation circuit 25 (address generation means) and a transmission data transfer circuit 26 (transmission data transfer means) are provided. The address generation circuit 25 combines the 16-bit lower address data transferred from the reception data buffer register 18 with the 8-bit or 16-bit upper address data transferred from the upper address designating register 24 to obtain 24 bits. Generate a 32-bit or 32-bit address. This address becomes the address of the RAM data to be transmitted next.

【0015】一方、送信データ転送回路26は、ダイレ
クトメモリアクセス(DMA)制御回路を主体にして構
成されている。この送信データ転送回路26は、アドレ
ス生成回路25でアドレスの生成が終了すると、そのア
ドレスに格納されているRAM27のデータをダイレク
トメモリアクセス方式で読み出してシリアルインターフ
ェース13の送信データバッファレジスタ20へ転送す
るものである。
On the other hand, the transmission data transfer circuit 26 is mainly composed of a direct memory access (DMA) control circuit. When the address generation circuit 25 finishes generating the address, the transmission data transfer circuit 26 reads the data in the RAM 27 stored at the address by the direct memory access method and transfers the data to the transmission data buffer register 20 of the serial interface 13. It is a thing.

【0016】図2に示すように、マイクロコンピュータ
11と適合用ツール12との間は、SPI通信ケーブル
31とSCI通信ケーブル32で接続されている。SP
I通信ケーブル31は、前述した同期クロックCLK、
下位アドレスデータRX及びメモリデータTXを伝送す
るケーブルであり、SCI通信ケーブル32は、調歩同
期方式のシリアル通信方式(SCI通信)でコマンド等
を伝送するケーブルである。例えば、上位アドレス指定
レジスタ24で指定する上位アドレスを変更する場合に
は、SCI通信ケーブル32によって適合用ツール12
からマイクロコンピュータ11へ上位アドレスのデータ
を送信する。図2の例では、SCI通信ケーブル32は
TX,RXの2本の信号線を使用し、同時に双方向の通
信が可能な全2重になっているが、1本の信号線で通信
方向を交互に変えることで双方向の通信を行う半2重を
採用しても良い。
As shown in FIG. 2, an SPI communication cable 31 and an SCI communication cable 32 are connected between the microcomputer 11 and the matching tool 12. SP
The I communication cable 31 uses the synchronous clock CLK,
The SCI communication cable 32 is a cable for transmitting the lower address data RX and the memory data TX, and the SCI communication cable 32 is a cable for transmitting commands and the like by the serial communication system (SCI communication) of the start / stop synchronization system. For example, when changing the upper address specified by the upper address specifying register 24, the SCI communication cable 32 is used to change the matching tool 12
Transmits the data of the higher address to the microcomputer 11. In the example of FIG. 2, the SCI communication cable 32 uses two signal lines of TX and RX, and is a full duplex capable of bidirectional communication at the same time, but the communication direction is one signal line. It is also possible to employ half-duplex, which performs bidirectional communication by alternately changing the two.

【0017】マイクロコンピュータ11は、適合用ツー
ル12との間でSPI通信ケーブル31を介してSPI
通信を次のようにして行う。適合用ツール12から入力
される同期クロックCLKに同期して、適合用ツール1
2から送信されてくる16ビットの下位アドレスデータ
を受信シフトレジスタ17に1ビットずつ取り込み、1
6ビット分のデータの受信を完了した時点で、該受信デ
ータを受信データバッファレジスタ18を経由してアド
レス生成回路25へ転送する。このアドレス生成回路2
5では、受信データバッファレジスタ18から転送され
てくる16ビットの下位アドレスデータと、上位アドレ
ス指定レジスタ24から転送されてくる8ビット又は1
6ビットの上位アドレスデータとを結合して、次に送信
するRAMデータの24ビット又は32ビットのアドレ
スを生成する。この後、送信データ転送回路26は、ア
ドレス生成回路25で生成したアドレスに格納されてい
る16ビットのRAMデータをダイレクトメモリアクセ
ス方式で読み出してシリアルインターフェース13の送
信データバッファレジスタ20へ転送し、これを送信シ
フトレジスタ19へ転送する。そして、この送信シフト
レジスタ19からRAMデータが同期クロックCLKに
同期して16ビットのシリアルデータで適合用ツール1
2へ送信される。
The microcomputer 11 communicates with the matching tool 12 via the SPI communication cable 31 to execute the SPI.
Communication is performed as follows. In conformity with the synchronization clock CLK input from the adaptation tool 12, the adaptation tool 1
16-bit lower address data transmitted from 2 is fetched into the reception shift register 17 bit by bit, 1
When the reception of the data of 6 bits is completed, the received data is transferred to the address generation circuit 25 via the reception data buffer register 18. This address generation circuit 2
5, the 16-bit lower address data transferred from the reception data buffer register 18 and the 8-bit or 1-bit transferred from the upper address specification register 24
The 6-bit upper address data is combined to generate the 24-bit or 32-bit address of the RAM data to be transmitted next. Thereafter, the transmission data transfer circuit 26 reads the 16-bit RAM data stored in the address generated by the address generation circuit 25 by the direct memory access method and transfers it to the transmission data buffer register 20 of the serial interface 13. To the transmission shift register 19. Then, the RAM data from the transmission shift register 19 is synchronized with the synchronous clock CLK and 16-bit serial data is used as the adaptation tool 1
2 is sent.

【0018】この場合、1回の通信で送られるシリアル
データのビット数がRAM27のアドレスデータのビッ
ト数よりも少ないという事情があっても、マイクロコン
ピュータ11内に上位アドレス指定レジスタ24とアド
レス生成回路25を設けているため、1回のシリアルデ
ータ(下位アドレス)の送信でRAM27のアドレスを
指定できる。このため、マイクロコンピュータ11は、
適合用ツール12から送信されてくるシリアルデータ
(下位アドレス)を1回受信する毎に、その都度、直ち
にRAMデータをDMA方式でシリアルインターフェー
ス13へ転送することができて、RAMデータの転送速
度を速くできる。しかも、適合用ツール12は、データ
送信終了直後に受信したRAMデータを、前回送信した
アドレスのRAMデータとして処理すれば良く、アドレ
スとRAMデータとの同期に特別な処理を行う必要がな
く、適合用ツール12の受信データ処理の高速化にも寄
与できる。
In this case, even if the number of bits of serial data sent in one communication is smaller than the number of bits of address data in the RAM 27, the upper address designation register 24 and the address generation circuit are provided in the microcomputer 11. Since 25 is provided, the address of the RAM 27 can be designated by one transmission of serial data (lower address). Therefore, the microcomputer 11
Every time the serial data (lower address) transmitted from the adapting tool 12 is received, the RAM data can be immediately transferred to the serial interface 13 by the DMA method each time the serial data is transferred. Can be fast Moreover, the adapting tool 12 only needs to process the RAM data received immediately after the data transmission as the RAM data of the address transmitted last time, and it is not necessary to perform special processing for synchronizing the address and the RAM data. It can also contribute to speeding up the processing of the received data of the tool 12 for use.

【0019】また、マイクロコンピュータ11は、シリ
アルデータ(下位アドレス)の受信からRAMデータの
転送までの一連の処理を高速に行うことができるので、
マイクロコンピュータ11側には通信データのデータ間
ギャップが不要である。従って、適合用ツール12の受
信データ処理部の処理速度がマイクロコンピュータ11
からのRAMデータの転送速度に追従できれば、適合用
ツール12によってRAMデータをデータ間ギャップ無
しでモニターすることができる。
Further, since the microcomputer 11 can perform a series of processing from reception of serial data (lower address) to transfer of RAM data at high speed,
No data gap between communication data is required on the side of the microcomputer 11. Therefore, the processing speed of the reception data processing unit of the adapting tool 12 is determined by the microcomputer 11
The RAM data can be monitored by the matching tool 12 without a gap between data if the transfer rate of the RAM data from the device can be followed.

【0020】一般に、SPI通信の通信ボーレートは4
Mbps程度まで可能である。本実施形態において、仮
に通信ボーレートを2Mbps、データ間ギャップ無
し、モニターするデータを10ワード(1ワード=16
ビット)とした場合、1データ当たりの応答性は10×
16÷2=80μsとなる。
Generally, the communication baud rate of SPI communication is 4
It is possible up to about Mbps. In this embodiment, it is assumed that the communication baud rate is 2 Mbps, there is no data gap, and the monitored data is 10 words (1 word = 16).
Bit), the response per data is 10 ×
16/2 = 80 μs.

【0021】また、本実施形態では、シリアルインター
フェース13に、送受信シフトレジスタリセット回路2
1が設けられている。この送受信シフトレジスタリセッ
ト回路21は、適合用ツール12からシリアルデータが
送信されているときに、同期クロックCLKの入力回数
をカウントし、同期クロックCLKの入力回数がシリア
ルデータのビット数に達する前に同期クロックCLKが
入力されなくなった場合に、受信シフトレジスタ17と
送信シフトレジスタ19とにリセット信号を出力し、両
シフトレジスタ17,19をリセットする。従って、万
一、ノイズ等によって同期クロックCLKが乱れた場合
でも、1データ分だけ通信を止めるだけで、以後の通信
を正常状態に復帰させることができ、通信の信頼性を高
めることができる。
Further, in this embodiment, the serial interface 13 is provided with a transmission / reception shift register reset circuit 2
1 is provided. The transmission / reception shift register reset circuit 21 counts the number of times the synchronization clock CLK is input while the serial data is being transmitted from the adaptation tool 12, and before the number of inputs of the synchronization clock CLK reaches the number of bits of the serial data. When the synchronous clock CLK is no longer input, a reset signal is output to the reception shift register 17 and the transmission shift register 19 to reset both shift registers 17 and 19. Therefore, even if the synchronous clock CLK is disturbed by noise or the like, the communication can be restored to the normal state by stopping the communication for one data, and the reliability of the communication can be improved.

【0022】尚、本実施形態では、シリアルデータのビ
ット数を16ビットとしたが、例えば8ビット、32ビ
ット等、他のビット数であっても良い。
In this embodiment, the number of bits of serial data is 16 bits, but other numbers of bits such as 8 bits and 32 bits may be used.

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

【図1】本発明の一実施形態におけるマイクロコンピュ
ータの主要部の構成を示すブロック図
FIG. 1 is a block diagram showing a configuration of a main part of a microcomputer according to an embodiment of the present invention.

【図2】マイクロコンピュータと適合用ツールとの間の
通信回線を示す図
FIG. 2 is a diagram showing a communication line between a microcomputer and a matching tool.

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

11…マイクロコンピュータ、12…適合用ツール(外
部装置)、13…シリアルインターフェース、17…受
信シフトレジスタ(受信部)、18…受信データバッフ
ァレジスタ(受信部)、19…送信シフトレジスタ(送
信部)、20…送信データバッファレジスタ(送信
部)、21…送受信シフトレジスタリセット回路(リセ
ット手段)、24…上位アドレス指定レジスタ(上位ア
ドレス指定手段)、25…アドレス生成回路(アドレス
生成手段)、26…送信データ転送回路(送信データ転
送手段)、27…RAM(メモリ)、31…SPI通信
ケーブル、32…SCI通信ケーブル。
11 ... Microcomputer, 12 ... Adaptation tool (external device), 13 ... Serial interface, 17 ... Reception shift register (reception unit), 18 ... Reception data buffer register (reception unit), 19 ... Transmission shift register (transmission unit) , 20 ... Transmission data buffer register (transmission unit), 21 ... Transmission / reception shift register reset circuit (reset means), 24 ... High-order address designation register (high-order address designation means), 25 ... Address generation circuit (address generation means), 26 ... Transmission data transfer circuit (transmission data transfer means), 27 ... RAM (memory), 31 ... SPI communication cable, 32 ... SCI communication cable.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータのメモリに格納さ
れているデータをクロック同期方式のシリアルインター
フェースを介して外部装置に転送するマイクロコンピュ
ータのデータ転送装置であって、 前記メモリから読み出したいデータの上位アドレスを指
定する上位アドレス指定手段と、 前記外部装置から送信されて前記シリアルインターフェ
ースの受信部で受信されるデータを、前記メモリから読
み出したいデータの下位アドレスとし、これを前記上位
アドレス指定手段で指定された上位アドレスと結合し
て、次に送信するメモリデータのアドレスを生成するア
ドレス生成手段と、 前記アドレス生成手段で生成されたアドレスに格納され
ているメモリデータをダイレクトメモリアクセス方式で
前記シリアルインターフェースの送信部へ転送する送信
データ転送手段とを備えたことを特徴とするマイクロコ
ンピュータのデータ転送装置。
1. A data transfer device of a microcomputer for transferring data stored in a memory of a microcomputer to an external device via a serial interface of a clock synchronization system, wherein an upper address of data to be read from the memory is set. The upper address designating unit for designating and the data transmitted from the external device and received by the receiving unit of the serial interface are set as the lower address of the data to be read from the memory, and this is designated by the upper address designating unit. Address generating means for generating an address of memory data to be transmitted next by combining with the upper address, and memory data stored at the address generated by the address generating means are transmitted to the serial interface by the direct memory access method. Transfer to department A data transfer device for a microcomputer, comprising: transmission data transfer means for sending.
【請求項2】 前記シリアルインターフェースの受信部
で前記外部装置からのデータを受信する際に、同期クロ
ックの入力回数がシリアルデータのビット数に達する前
に同期クロックが入力されなくなった場合に、受信デー
タをリセットするリセット手段を備えていることを特徴
とする請求項1に記載のマイクロコンピュータのデータ
転送装置。
2. When receiving the data from the external device in the receiving unit of the serial interface, if the synchronous clock is not input before the number of input of the synchronous clock reaches the number of bits of the serial data, reception is performed. 2. The data transfer device for a microcomputer according to claim 1, further comprising reset means for resetting data.
JP8103057A 1996-04-25 1996-04-25 Data transfer device of microcomputer Pending JPH09293047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8103057A JPH09293047A (en) 1996-04-25 1996-04-25 Data transfer device of microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8103057A JPH09293047A (en) 1996-04-25 1996-04-25 Data transfer device of microcomputer

Publications (1)

Publication Number Publication Date
JPH09293047A true JPH09293047A (en) 1997-11-11

Family

ID=14344055

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8103057A Pending JPH09293047A (en) 1996-04-25 1996-04-25 Data transfer device of microcomputer

Country Status (1)

Country Link
JP (1) JPH09293047A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7836233B2 (en) 2003-03-05 2010-11-16 Hitachi, Ltd. Multi-processor system
CN116049054A (en) * 2022-12-30 2023-05-02 成都电科星拓科技有限公司 Data read-write method and system of SPI slave device in cross-clock domain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7836233B2 (en) 2003-03-05 2010-11-16 Hitachi, Ltd. Multi-processor system
CN116049054A (en) * 2022-12-30 2023-05-02 成都电科星拓科技有限公司 Data read-write method and system of SPI slave device in cross-clock domain
CN116049054B (en) * 2022-12-30 2024-02-09 成都电科星拓科技有限公司 Data read-write method and system of SPI slave device in cross-clock domain

Similar Documents

Publication Publication Date Title
EP1237090A1 (en) Serial peripheral interface master device, a serial peripheral interface slave device and a serial peripheral interface
US5640602A (en) Transferring digital data in units of 2 bytes to increase utilization of a 2-byte-wide bus
US20020178310A1 (en) USB transmission control circuit
JPS6280755A (en) Data transmission control system
US5404137A (en) High speed transition signalling communication system
JPH09293047A (en) Data transfer device of microcomputer
US5303261A (en) High-throughput pipelined communication channel for interruptible data transmission
JP2578773B2 (en) Serial data transfer device
JP3451628B2 (en) 4-wire synchronous serial communication system
JP2001265716A (en) Device and method for transmitting information
JP3413894B2 (en) Serial transmission device
KR19990008189A (en) Method and apparatus for reducing the latency of an interface by overlapping transmitted packets
JP3194371B2 (en) Operation test method of serial bus interface macro circuit
JPH09237247A (en) Bus width converter and bus width conversion system device
MXPA05001183A (en) Packet processing architecture.
JP2001236303A (en) Universal serial bus control circuit
JP2001092804A (en) Microcomputer with built-in eeprom interface
JP2743780B2 (en) Distributed processing equipment
JPH0630506B2 (en) Serial communication device
JP2002198979A (en) Data transmission methods and devices on can(controller area network) data link
JPH0879225A (en) Data communication system and data communication method
JP3088341B2 (en) High-speed data transfer method on bus
CN116909954A (en) DMA control circuit
JPS6165351A (en) Control system
JPH09181750A (en) Data processing system