JP2011109515A - Two-wire type serial data transfer control method, program, and two-wire type serial data transfer controller - Google Patents

Two-wire type serial data transfer control method, program, and two-wire type serial data transfer controller Download PDF

Info

Publication number
JP2011109515A
JP2011109515A JP2009263931A JP2009263931A JP2011109515A JP 2011109515 A JP2011109515 A JP 2011109515A JP 2009263931 A JP2009263931 A JP 2009263931A JP 2009263931 A JP2009263931 A JP 2009263931A JP 2011109515 A JP2011109515 A JP 2011109515A
Authority
JP
Japan
Prior art keywords
address
serial data
data transfer
slave
wire serial
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.)
Withdrawn
Application number
JP2009263931A
Other languages
Japanese (ja)
Inventor
Keiji Nakamura
圭治 中村
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2009263931A priority Critical patent/JP2011109515A/en
Publication of JP2011109515A publication Critical patent/JP2011109515A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a two-wire type serial data transfer method that suppresses an increase of processor processing time and an increase of storage device for preparation of software, and provide a program and a two-wire type serial data transfer controller. <P>SOLUTION: The two-wire type serial data transfer control system includes one or more slave devices that are connected with a master device through a two-wire type serial data transfer means, and address spaces comprised of one or more slave devices as one address. In the two-wire type serial data transfer control method for this system, a slave address as a transfer partner is created from the address for starting access. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、2線式シリアルデータ転送制御方法、プログラム及び2線式シリアルデータ転送制御装置に関する。   The present invention relates to a two-wire serial data transfer control method, a program, and a two-wire serial data transfer control device.

近年、データ転送手段に関する技術が種々開発されている。
例えば、特許文献1に記載の発明は、複数のスレーブ装置と接続されるマスタ装置が、各スレーブ装置(RAM:Random Access Memory)と個別に接続する制御線(チップセレクト信号:CS:Chip Selector)の出力先を切り換えて各スレーブ装置と通信を行うように構成され、複数のスレーブ装置とマスタ装置との共通のデータ線については差動信号を用いている高速な通信システムにおいて、CSの切り替え手段を送/受信データ数とあらかじめ送/受信に関して記憶されたデータ数との比較によって行っている。また転送はDMA(Direct Memory Access)転送で行う。特許文献1に記載の発明これらのことによりマスタ装置の負荷を低減している。
In recent years, various techniques relating to data transfer means have been developed.
For example, in the invention described in Patent Document 1, a master device connected to a plurality of slave devices has a control line (chip select signal: CS: Chip Selector) individually connected to each slave device (RAM: Random Access Memory). CS switching means in a high-speed communication system that uses differential signals for a common data line between a plurality of slave devices and a master device. Is performed by comparing the number of transmission / reception data with the number of data stored in advance for transmission / reception. The transfer is performed by DMA (Direct Memory Access) transfer. Invention of patent document 1 These things reduce the load of a master apparatus.

特許文献2に記載の発明は、マイコン制御システムに関するものであり、制御データ通信用バスを介してマイコンと外部回路とを接続するとともに、この制御データ通信用バス上では相互にIDデータで認証するマイコン制御システムであって、上記マイコンは、リセット時に上記制御データ通信用バスを介して上記外部回路のIDデータを送出してACK信号が返答された場合に当該外部回路が装着されているものとして初期設定するものである。すなわち、スレーブアドレス(ID)の送出をマイコン制御によって行っている。特許文献2に記載の発明は、このことから、ポートを消費することなく、且つ、配線作業の手間を軽減することが可能としている。   The invention described in Patent Document 2 relates to a microcomputer control system, which connects a microcomputer and an external circuit via a control data communication bus, and authenticates with ID data on the control data communication bus. In the microcomputer control system, when the microcomputer sends out the ID data of the external circuit via the control data communication bus at the time of reset and the ACK signal is returned, the external circuit is attached. This is the initial setting. That is, the slave address (ID) is transmitted by microcomputer control. Accordingly, the invention described in Patent Document 2 can reduce the labor of wiring work without consuming the port.

2線式シリアルデータ転送(フィリップス社が提唱するI2C(Inter-Integrated Circuit)仕様)でデータ転送を行なうシステム(図10の001)では、マスタ装置M001と1つ以上のスレーブ装置S001〜S00nとが1つのクロックライン002(SCL)と1つのデータライン003(SDA)とに接続されている。   In a system (001 in FIG. 10) that transfers data using 2-wire serial data transfer (I2C (Inter-Integrated Circuit) specification proposed by Philips), the master device M001 and one or more slave devices S001 to S00n It is connected to one clock line 002 (SCL) and one data line 003 (SDA).

図10は、一般に用いられている2線式シリアルデータ転送装置である。
図10に示すM001はマスタ装置、S001、S002、S003、…、S00nはスレーブ装置、002、003はクロックライン及びシリアルデータライン、004はプルアップ素子をそれぞれ示す。
FIG. 10 shows a commonly used two-wire serial data transfer device.
10, M001 is a master device, S001, S002, S003,..., S00n are slave devices, 002 and 003 are clock lines and serial data lines, and 004 is a pull-up element.

マスタ装置M001は、転送を行ないたいスレーブ装置S001〜S00nに対して、クロック及び、スレーブアドレスをシリアルデータラインに送出し、スレーブ装置S001〜S00nは自己のスレーブアドレスとマスタ装置M001が送出したスレーブアドレスとの比較を行ない、一致すればマスタ装置M001にアクノリッジ信号を返すことで通信が確立され、その後に続く通信プロトコルによりシリアルデータ転送が行われる。   The master device M001 sends the clock and slave address to the serial data line to the slave devices S001 to S00n to be transferred. The slave devices S001 to S00n send their own slave address and the slave address sent by the master device M001. If they match, communication is established by returning an acknowledge signal to the master device M001, and serial data transfer is performed by the subsequent communication protocol.

また通信プロトコル上ではスレーブ装置S001〜S00nが持つ記憶装置(図示せず)に対して何番地のアドレスからデータ転送を行なうかを明示する仕様となっている。   In addition, on the communication protocol, the specification clearly indicates from which address the data is transferred to the storage device (not shown) of the slave devices S001 to S00n.

一般的にマスタ装置は、マイコン装置やI2Cコントローラを含むLSI装置内蔵のプロセッサを介してのソフトウェア処理により、任意にスレーブアドレスを設定し送出することが可能となっている。例えば、特許文献2記載の発明ではマイコン制御を介してスレーブアドレス(ID) を送出する装置となっている。   Generally, a master device can arbitrarily set and send a slave address by software processing via a processor built in an LSI device including a microcomputer device and an I2C controller. For example, the invention described in Patent Document 2 is a device for sending a slave address (ID) through microcomputer control.

また、スレーブ装置が持つ記憶装置に対してのアドレスも同様なマイコン制御により送出可能となっているものも一般的な技術である。   In addition, it is a common technique that an address for a storage device of a slave device can be transmitted by the same microcomputer control.

図1に示す様な2線式シリアルデータ転送システムにおいて、スレーブ装置1(S001)、スレーブ装置2(S002)、…、スレーブ装置n(S00n)の切り換えはマスタ装置M001からのスレーブアドレス発行により行われるが、この発行がマイコン装置やプロセッサ制御すなわちソフトウェア処理で行われ、スレーブ装置S001〜S00nが持つ記憶装置に対してのアドレスの発行においてもマイコン装置やプロセッサ制御すなわちソフトウェア処理で行われることは周知な技術であると言える。   In the two-wire serial data transfer system as shown in FIG. 1, the slave device 1 (S001), slave device 2 (S002),..., Slave device n (S00n) are switched by issuing a slave address from the master device M001. However, it is well known that this issuance is performed by microcomputer device or processor control, that is, software processing, and issuance of addresses to the storage devices of the slave devices S001 to S00n is also performed by microcomputer device or processor control, that is, software processing. Technology.

例えば、マスタ装置M001からスレーブ装置1(S001)へのシリアル転送では、スレーブ装置1(S001)のスレーブアドレスをソフトウェア上に準備し、続いてスレーブ装置2(S002)とのシリアル転送を行う際にもスレーブ装置2(S002)のスレーブアドレスをソフトウェア上に準備し、続いてスレーブ装置3(S003)とのシリアル転送を行う際にもスレーブ装置3(S003)のスレーブアドレスをソフトウェア上に準備することとなる。
この様に転送相手となるスレーブ装置S001〜S00nに対してのスレーブアドレスをソフトウェア上に準備する必要がある。
For example, in the serial transfer from the master device M001 to the slave device 1 (S001), the slave address of the slave device 1 (S001) is prepared on the software, and then the serial transfer with the slave device 2 (S002) is performed. Also, the slave address of slave device 2 (S002) is prepared in software, and the slave address of slave device 3 (S003) is also prepared in software when serial transfer is performed with slave device 3 (S003). It becomes.
In this way, it is necessary to prepare on the software the slave addresses for the slave devices S001 to S00n that are transfer partners.

さらなる例として、スレーブ装置1〜3(S001〜S003)の記憶エリアが連続したアドレス空間として扱うことが可能なシステム構成であった場合も同様に、スレーブ装置1〜3(S001〜S003)ごとに対応したソフトウェアを準備する必要がある。   As a further example, in the case of a system configuration in which the storage areas of the slave devices 1 to 3 (S001 to S003) can be handled as a continuous address space, similarly, for each slave device 1 to 3 (S001 to S003) It is necessary to prepare corresponding software.

この様にシリアル転送制御をマイコン装置やプロセッサ制御で行なうことは、プロセッサ処理時間の増加及びソフトウェア準備のための記憶装置の増加が懸念される。   As described above, performing serial transfer control by microcomputer device or processor control is concerned about an increase in processor processing time and an increase in storage devices for software preparation.

そこで本発明の目的は、プロセッサ処理時間の増加及びソフトウェア準備のための記憶装置の増加を抑えた2線式シリアルデータ転送制御方法、プログラム及び2線式シリアルデータ転送制御装置を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a two-wire serial data transfer control method, a program, and a two-wire serial data transfer control device that suppress an increase in processor processing time and an increase in storage devices for software preparation. .

上記課題を解決するため、本発明の請求項1に係る発明は、マスタ装置に2線式シリアルデータ転送手段で接続される1つ以上のスレーブ装置を含み、前記1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とする2線式シリアルデータ転送制御システム装置の線式シリアルデータ転送制御方法であって、アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成することを特徴とする。   In order to solve the above-mentioned problem, the invention according to claim 1 of the present invention includes one or more slave devices connected to a master device by a two-wire serial data transfer means, and is composed of the one or more slave devices. A linear serial data transfer control method for a two-wire serial data transfer control system apparatus using an address space as one address space, wherein a slave address serving as a transfer partner is generated from an access start address. .

請求項2記載の発明は、請求項1記載の発明において、前記マスタ装置と前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させることを特徴とする。   According to a second aspect of the present invention, in the first aspect of the present invention, when the upper limit of the memory address space of the slave device is exceeded during serial data transfer between the master device and the slave device, two-wire serial data transfer is performed. Is completed, a slave address as the next transfer partner is generated from the memory address, and serial data transfer from the continuous address space is resumed.

請求項3記載の発明は、請求項1に記載の発明において、前記マスタ装置と前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合もしくは下限に満たない場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるシーケンス装置を有することを特徴とする。   According to a third aspect of the present invention, in the first aspect of the present invention, when the upper limit of the memory address space of the slave device is exceeded or less than the lower limit during serial data transfer between the master device and the slave device. It has a sequence device that terminates the two-wire serial data transfer, generates a slave address as the next transfer partner from the memory address, and resumes the serial data transfer from the continuous address space.

請求項4記載の発明は、マスタ装置に2線式シリアルデータ転送手段で接続される1つ以上のスレーブ装置を含み、前記1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とする2線式シリアルデータ転送制御システム装置の2線式シリアルデータ転送制御用のプログラムであって、アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成するため、コンピュータに、前記マスタ装置が、前記マスタ装置と前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えたか否かを判断する手順、前記マスタ装置が、前記上限を超えた場合に2線式シリアルデータ転送を終了させる手順、前記マスタ装置が、前記メモリアドレスから、次の転送相手となるスレーブアドレスを生成させる手順、前記マスタ装置が、連続したアドレス空間からのシリアルデータ転送を再開させる手順、を実行させることを特徴とする。   The invention according to claim 4 includes one or more slave devices connected to the master device by a two-wire serial data transfer means, and an address space composed of the one or more slave devices is defined as 2 address spaces. A program for controlling the two-wire serial data transfer of the linear serial data transfer control system device, wherein the master device is connected to the master in order to generate a slave address as a transfer partner from the address at which access is started. A procedure for determining whether or not the upper limit of the memory address space of the slave device has been exceeded during serial data transfer between the device and the slave device, and when the master device exceeds the upper limit, the two-wire serial data transfer is performed. A procedure for ending, the master device from the memory address, the slave address to be the next transfer partner Procedure to generate the master device, characterized in that to perform the procedure, to restart the serial data transfer from the continuous address space.

請求項5記載の発明は、マスタ装置と、該マスタ装置に2線式シリアルデータ転送手段で接続される1つ以上のスレーブ装置とを含み、前記1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とする2線式シリアルデータ転送制御システム装置に用いられる2線式シリアルデータ転送制御装置であって、前記マスタ装置は、前記2線式シリアルデータ転送制御装置を含み、該2線式シリアルデータ転送制御装置は、アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成する生成装置を有することを特徴とする。   The invention described in claim 5 includes a master device and one or more slave devices connected to the master device by a two-wire serial data transfer means, and an address space composed of the one or more slave devices is defined as one. A two-wire serial data transfer control device used in a two-wire serial data transfer control system device having one address space, wherein the master device includes the two-wire serial data transfer control device, The serial data transfer control device includes a generation device that generates a slave address as a transfer partner from an address at which access is started.

請求項6記載の発明は、請求項4記載の発明において、前記マスタ装置は、前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるシーケンス装置を有することを特徴とする。   According to a sixth aspect of the present invention, in the fourth aspect of the present invention, when the master device exceeds the upper limit of the memory address space of the slave device during serial data transfer with the slave device, the two-wire serial data It has a sequence device that terminates transfer, generates a slave address as a next transfer partner from the memory address, and resumes serial data transfer from a continuous address space.

請求項7記載の発明は、請求項4記載の発明において、前記マスタ装置は、前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合もしくは下限に満たない場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるシーケンス装置を有することを特徴とする。   The invention according to claim 7 is the invention according to claim 4, wherein the master device exceeds or exceeds the lower limit of the memory address space of the slave device during serial data transfer with the slave device. It has a sequence device that terminates the two-wire serial data transfer, generates a slave address as the next transfer partner from the memory address, and resumes the serial data transfer from the continuous address space.

請求項8記載の発明は、請求項6または7記載の発明において、前記マスタ装置は、メモリアドレスを設定するメモリアドレス設定装置と、連続したアドレス空間上のメモリアドレスから任意のアドレスを設定することによりデータ転送の対象となるスレーブ装置を決定するスレーブアドレス選択装置とを有することを特徴とする。   The invention according to claim 8 is the invention according to claim 6 or 7, wherein the master device sets an arbitrary address from a memory address setting device for setting a memory address and a memory address in a continuous address space. And a slave address selection device that determines a slave device to which data is to be transferred.

請求項9記載の発明は、請求項8記載の発明において、前記スレーブアドレス選択装置は、アドレス上限及びアドレス下限を設定する設定装置と、前記設定装置からのアドレス設定値と上限アドレス設定値、アドレス設定値と下限アドレス設定値についてそれぞれ範囲内か範囲外かを検知する演算装置と、両演算装置の検知結果からアドレス設定値が上限アドレス設定値から下限アドレス設定値の範囲内にあるか否かを検出し、スレーブアドレス選択信号を発する論理回路と、を有することを特徴とする。   According to a ninth aspect of the present invention, in the eighth aspect of the invention, the slave address selecting device includes a setting device for setting an upper address limit and an lower address limit, an address setting value from the setting device, an upper limit address setting value, and an address. An arithmetic unit that detects whether the set value and the lower limit address set value are within or out of the range, and whether the address set value is within the range of the upper limit address set value to the lower limit address set value from the detection results of both arithmetic units. And a logic circuit for generating a slave address selection signal.

本発明によれば、スレーブ装置の記憶エリアが連続したアドレス空間である場合、転送を開始するアドレスを準備することで、スレーブ装置をまたぐ場合でもスレーブアドレスおよびそのスレーブ装置とのデータ転送を開始する記憶エリアのアドレスをソフトウェア上に準備する必要が無くなるので、ソフトウェア準備のための記憶装置の増加が抑えられる。またソフトウェア上に他のソフトウェアを準備することが無いので、プロセッサ処理時間が減少し、処理時間を短縮したり、他の処理を行ったりすることが可能となり効率化が図れる。   According to the present invention, when the storage area of the slave device is a continuous address space, the slave address and data transfer with the slave device are started even when the slave device is crossed by preparing an address to start the transfer. Since it is not necessary to prepare the address of the storage area on software, an increase in the number of storage devices for software preparation can be suppressed. In addition, since no other software is prepared on the software, the processor processing time is reduced, the processing time can be shortened, and other processing can be performed, thereby improving efficiency.

本発明に係る2線式シリアルデータ転送制御装置に用いられるマスタ装置の構成例である。It is a structural example of the master apparatus used for the 2-wire type serial data transfer control apparatus which concerns on this invention. (a)、(b)は、2線式シリアルデータ転送(フィリップス社が提唱するI2C仕様)でデータ転送を行なうシステムの構成例である。(A), (b) is a configuration example of a system that performs data transfer by two-wire serial data transfer (I2C specification proposed by Philips). 本発明に係る2線式シリアルデータ転送制御装置に用いられるスレーブアドレス生成装置の構成例である。It is an example of a structure of the slave address generation apparatus used for the 2-wire type serial data transfer control apparatus concerning this invention. 図3に示したスレーブアドレス生成装置608の動作を説明するための説明図である。FIG. 4 is an explanatory diagram for explaining an operation of a slave address generation device 608 shown in FIG. 3. 本発明に係る2線式シリアルデータ転送制御装置に用いられるスレーブアドレス生成装置712の動作を説明する説明図である。It is explanatory drawing explaining operation | movement of the slave address generation apparatus 712 used for the 2-wire type serial data transfer control apparatus based on this invention. 本発明に係る2線式シリアルデータ転送制御装置に用いられるマスタ装置の他の構成例である。It is another example of a structure of the master apparatus used for the 2-wire type serial data transfer control apparatus which concerns on this invention. 本発明に係る2線式シリアルデータ転送制御装置に用いられるマスタ装置の他の構成例である。It is another example of a structure of the master apparatus used for the 2-wire type serial data transfer control apparatus which concerns on this invention. 本発明に係る2線式シリアルデータ転送制御装置の動作例を示す図である。It is a figure which shows the operation example of the 2-wire type serial data transfer control apparatus which concerns on this invention. 本発明に係る2線式シリアルデータ転送制御方法を説明するためのフローチャートの一例である。It is an example of the flowchart for demonstrating the 2-wire type serial data transfer control method which concerns on this invention. 一般に用いられている2線式シリアルデータ転送装置である。This is a two-wire serial data transfer device generally used. 2線式シリアルデータ転送(フィリップス社が提唱するI2C仕様)でデータ転送を行なうシステムの構成例である。This is a configuration example of a system for transferring data by two-wire serial data transfer (I2C specification proposed by Philips). マスタ装置の一般的な構成例である。It is a general structural example of a master apparatus.

本発明の実施の形態について図面を参照して説明する。
図11に2線式シリアルデータ転送(フィリップス社が提唱するI2C仕様)でデータ転送を行なうシステムの構成例を示し、図12にマスタ装置の一般的な構成例を示し、図1に本発明に係る2線式シリアルデータ転送制御装置に用いられるマスタ装置の一実施の形態を示す。
Embodiments of the present invention will be described with reference to the drawings.
FIG. 11 shows a configuration example of a system that performs data transfer by two-wire serial data transfer (I2C specification proposed by Philips), FIG. 12 shows a general configuration example of a master device, and FIG. An embodiment of a master device used in such a two-wire serial data transfer control device is shown.

<構 成>
図11では、M201はマスタ装置を示し、S201〜S203はスレーブ装置1〜3を示しており、各装置M201、S201〜S203は、201(SCL)、202(SDA)で示すクロックライン、及びシリアルデータラインで接続されている。
<Configuration>
In FIG. 11, M201 indicates a master device, S201 to S203 indicate slave devices 1 to 3, and each of the devices M201 and S201 to S203 includes a clock line indicated by 201 (SCL) and 202 (SDA), and a serial number. Connected by data line.

本構成例では、スレーブ装置1〜3(S201〜S203)の記憶装置部は0000h〜7FFFhのアドレス空間(32kワード)を持ち、スレーブ装置1〜3(S201〜S203)の記憶装置部(図示せず)を連続アドレスの空間(00000h〜07FFFh、08000h〜0FFFFh、10000h〜17FFFh)で取り扱えるシステム構成とする。   In this configuration example, the storage devices of the slave devices 1 to 3 (S201 to S203) have an address space (32k words) of 0000h to 7FFFh, and the storage devices (not shown) of the slave devices 1 to 3 (S201 to S203). System configuration that can be handled in a continuous address space (00000h to 07FFFh, 08000h to 0FFFFh, 10000h to 17FFFh).

なお、各スレーブ装置1〜3(S201〜S203)の記憶装置部のアドレス空間、スレーブ装置の総数は限定されるものでは無い。   Note that the address space of the storage device unit of each of the slave devices 1 to 3 (S201 to S203) and the total number of slave devices are not limited.

図12は、マスタ装置の一般に用いられている構成例を示し、その主要構成として301のプロセッサ、302のプログラムメモリ、303の2線式シリアルデータ転送制御装置を含む。
また303の2線式シリアルデータ転送制御装置は、304の送受信設定装置、305のメモリアドレス設定装置、306のスレーブアドレス設定装置を含んでいる。
307は2線式シリアルデータ転送シーケンス装置であり、プロセッサ301からの処理を介さない自走によるシリアルデータ転送プロトコルの開始(リセット解除後など)、プロセッサ301を介してのシリアルデータ転送プロトコルの開始、終了が可能な装置である。プロセッサ301からの命令308(SCL)、309(SDA)は2線式シリアルデータ転送でのクロックライン、及びシリアルデータラインを示す。
FIG. 12 shows an example of a commonly used configuration of the master device, which includes a 301 processor, a 302 program memory, and a 303 2-wire serial data transfer control device as main components.
The two-wire serial data transfer control device 303 includes a transmission / reception setting device 304, a memory address setting device 305, and a slave address setting device 306.
Reference numeral 307 denotes a two-wire serial data transfer sequence device, which starts a serial data transfer protocol by self-running without processing from the processor 301 (after reset release, etc.), starts a serial data transfer protocol via the processor 301, It is a device that can be terminated. Instructions 308 (SCL) and 309 (SDA) from the processor 301 indicate a clock line and a serial data line in 2-wire serial data transfer.

<比較例>
以下、一般の技術による説明を行なう。
図12に示したマスタ装置は、2線式シリアルデータ転送シーケンス装置307に対して転送開始時の情報を与えるために、プログラムメモリ302に格納されたプログラムを介して、送受信設定、メモリアドレス設定、スレーブアドレス設定を行なう。この設定を元にシリアルデータ転送が開始されることになる。
<Comparative example>
In the following, description will be made using a general technique.
The master device shown in FIG. 12 uses a program stored in the program memory 302 to send / receive settings, memory address settings, and information to the 2-wire serial data transfer sequence device 307 at the start of transfer. Set the slave address. Based on this setting, serial data transfer is started.

例えば次の様なデータ転送を行なう場合、
(1)スレーブ装置1(スレーブアドレスを「0000001b」とする)のメモリアドレス0010hからデータ受信
(2)スレーブ装置2(スレーブアドレスを「0000010b」とする)のメモリアドレス0020hからデータ受信
(3)スレーブ装置3(スレーブアドレスを「0000011b」とする)のメモリアドレス0030hからデータ受信
(4)スレーブ装置1(スレーブアドレスを「0000001b)とする)のメモリアドレス0110hからデータ受信
(5)スレーブ装置2(スレーブアドレスを「0000010b」とする)のメモリアドレス0120hからデータ受信
For example, when performing the following data transfer:
(1) Receive data from memory address 0010h of slave device 1 (slave address “0000001b”)
(2) Receive data from memory address 0020h of slave device 2 (slave address is “0000010b”)
(3) Data reception from memory address 0030h of slave device 3 (slave address is “0000011b”)
(4) Receive data from memory address 0110h of slave device 1 (slave address is “0000001b”)
(5) Receive data from memory address 0120h of slave device 2 (slave address is “0000010b”)

(6)スレーブ装置3(スレーブアドレスを「0000011b」とする)のメモリアドレス0130hからデータ受信
(7)スレーブ装置1(スレーブアドレスを「0000001b」とする)のメモリアドレス0210hからデータ受信
(8)スレーブ装置2(スレーブアドレスを「0000010b」とする)のメモリアドレス0220hからデータ受信
(9)スレーブ装置3(スレーブアドレスを「0000011b」とする)のメモリアドレス0230hからデータ受信
(10)スレーブ装置1(スレーブアドレスを「0000001b」とする)のメモリアドレス0310hからデータ受信
(6) Receive data from memory address 0130h of slave device 3 (slave address is “0000011b”)
(7) Receive data from memory address 0210h of slave device 1 (slave address is “0000001b”)
(8) Receive data from memory address 0220h of slave device 2 (slave address “0000010b”)
(9) Receive data from memory address 0230h of slave device 3 (slave address “0000011b”)
(10) Receive data from memory address 0310h of slave device 1 (slave address “0000001b”)

(11)スレーブ装置2(スレーブアドレスを「0000010b」とする)のメモリアドレス0320hからデータ受信
(12)スレーブ装置3(スレーブアドレスを「0000011b」とする)のメモリアドレス0330hからデータ受信
(13)スレーブ装置1(スレーブアドレスを「0000001b」とする)のメモリアドレス0410hからデータ受信
(14)スレーブ装置2(スレーブアドレスを「0000010b」とする)のメモリアドレス0420hからデータ受信
(15)スレーブ装置3(スレーブアドレスを「0000011b」とする)のメモリアドレス0430hからデータ受信
(11) Receive data from memory address 0320h of slave device 2 (slave address is “0000010b”)
(12) Receive data from memory address 0330h of slave device 3 (slave address “0000011b”)
(13) Receive data from memory address 0410h of slave device 1 (slave address “0000001b”)
(14) Receive data from memory address 0420h of slave device 2 (slave address “0000010b”)
(15) Receive data from memory address 0430h of slave device 3 (slave address “0000011b”)

(16)スレーブ装置1(スレーブアドレスを「0000001b」とする)のメモリアドレス0510hからデータ受信
(17)スレーブ装置2(スレーブアドレスを「0000010b」とする)のメモリアドレス0520hからデータ受信
(18)スレーブ装置3(スレーブアドレスを「0000011b」とする)のメモリアドレス0530hからデータ受信
(16) Receive data from memory address 0510h of slave device 1 (slave address “0000001b”)
(17) Receive data from memory address 0520h of slave device 2 (slave address “0000010b”)
(18) Data reception from memory address 0530h of slave device 3 (slave address is “0000011b”)

プロセッサの処理としては、以下の54個の命令をプログラムメモリに格納する必要がある。
(1-1):プロセッサを介して送受信設定装置に受信設定を行なう
(1-2):プロセッサを介してメモリアドレス設定装置に「0010h」の設定を行なう
(1-3):プロセッサを介してスレーブアドレス設定装置に「0000001b」の設定を行なう
As processing of the processor, it is necessary to store the following 54 instructions in the program memory.
(1-1): Performs reception settings on the transmission / reception setting device via the processor.
(1-2): Set “0010h” to the memory address setting device via the processor
(1-3): Set "0000001b" to the slave address setting device via the processor

(2-1):プロセッサを介して送受信設定装置に受信設定を行なう
(2-2):プロセッサを介してメモリアドレス設定装置に「0020h」の設定を行なう
(2-3):プロセッサを介してスレーブアドレス設定装置に「0000010b」の設定を行なう
(2-1): Perform reception settings on the transmission / reception setting device via the processor
(2-2): “0020h” is set in the memory address setting device via the processor.
(2-3): Set “0000010b” to the slave address setting device via the processor

(3-1):プロセッサを介して送受信設定装置に受信設定を行なう
(3-2):プロセッサを介してメモリアドレス設定装置に「0030h」の設定を行なう
(3-3):プロセッサを介してスレーブアドレス設定装置に「0000011b」の設定を行なう
(3-1): Perform reception settings on the transmission / reception setting device via the processor
(3-2): Set “0030h” to the memory address setting device via the processor
(3-3): Set “0000011b” to the slave address setting device via the processor

(4-1):プロセッサを介して送受信設定装置に受信設定を行なう
(4-2):プロセッサを介してメモリアドレス設定装置に「0110h」の設定を行なう
(4-3):プロセッサを介してスレーブアドレス設定装置に「0000001b」の設定を行なう
(4-1): Perform reception settings on the transmission / reception setting device via the processor
(4-2): Set “0110h” to the memory address setting device via the processor.
(4-3): Set "0000001b" to the slave address setting device via the processor

(5-1):プロセッサを介して送受信設定装置に受信設定を行なう
(5-2):プロセッサを介してメモリアドレス設定装置に「0120h」の設定を行なう
(5-3):プロセッサを介してスレーブアドレス設定装置に「0000010b」の設定を行なう
(5-1): Perform reception settings on the transmission / reception setting device via the processor
(5-2): Set “0120h” to the memory address setting device via the processor.
(5-3): Set “0000010b” to the slave address setting device via the processor.

(6-1):プロセッサを介して送受信設定装置に受信設定を行なう
(6-2):プロセッサを介してメモリアドレス設定装置に「0130h」の設定を行なう
(6-3):プロセッサを介してスレーブアドレス設定装置に「0000011b」の設定を行なう
(6-1): Perform reception setting to the transmission / reception setting device via the processor
(6-2): Set “0130h” to the memory address setting device via the processor.
(6-3): Set “0000011b” to the slave address setting device via the processor.

(7-1):プロセッサを介して送受信設定装置に受信設定を行なう
(7-2):プロセッサを介してメモリアドレス設定装置に「0210h」の設定を行なう
(7-3):プロセッサを介してスレーブアドレス設定装置に「0000001b」の設定を行なう
(7-1): Set the reception to the transmission / reception setting device via the processor.
(7-2): Set “0210h” to the memory address setting device via the processor.
(7-3): Set "0000001b" to the slave address setting device via the processor

(8-1):プロセッサを介して送受信設定装置に受信設定を行なう
(8-2):プロセッサを介してメモリアドレス設定装置に「0220h」の設定を行なう
(8-3):プロセッサを介してスレーブアドレス設定装置に「0000010b」の設定を行なう
(8-1): Perform reception setting to the transmission / reception setting device via the processor
(8-2): Set “0220h” to the memory address setting device via the processor.
(8-3): Set “0000010b” to the slave address setting device via the processor

(9-1):プロセッサを介して送受信設定装置に受信設定を行なう
(9-2):プロセッサを介してメモリアドレス設定装置に「0230h」の設定を行なう
(9-3):プロセッサを介してスレーブアドレス設定装置に「0000011b」の設定を行なう
(9-1): Perform reception settings on the transmission / reception setting device via the processor
(9-2): Set “0230h” to the memory address setting device via the processor.
(9-3): Set “0000011b” to the slave address setting device via the processor

(10-1):プロセッサを介して送受信設定装置に受信設定を行なう
(10-2):プロセッサを介してメモリアドレス設定装置に「0310h」の設定を行なう
(10-3):プロセッサを介してスレーブアドレス設定装置に「0000001b」の設定を行なう
(10-1): Performs reception settings on the transmission / reception setting device via the processor
(10-2): “0310h” is set in the memory address setting device via the processor.
(10-3): Set "0000001b" to the slave address setting device via the processor

(11-1):プロセッサを介して送受信設定装置に受信設定を行なう
(11-2):プロセッサを介してメモリアドレス設定装置に「0320h」の設定を行なう
(11-3):プロセッサを介してスレーブアドレス設定装置に「0000010b」の設定を行なう
(11-1): Sets reception to the transmission / reception setting device via the processor
(11-2): Set “0320h” to the memory address setting device via the processor.
(11-3): Set “0000010b” to the slave address setting device via the processor

(12-1):プロセッサを介して送受信設定装置に受信設定を行なう
(12-2):プロセッサを介してメモリアドレス設定装置に「0330h」の設定を行なう
(12-3):プロセッサを介してスレーブアドレス設定装置に「0000011b」の設定を行なう
(12-1): Sets reception to the transmission / reception setting device via the processor
(12-2): Set “0330h” to the memory address setting device via the processor.
(12-3): Sets “0000011b” to the slave address setting device via the processor

(13-1):プロセッサを介して送受信設定装置に受信設定を行なう
(13-2):プロセッサを介してメモリアドレス設定装置に「0410h」の設定を行なう
(13-3):プロセッサを介してスレーブアドレス設定装置に「0000001b」の設定を行なう
(13-1): Sets the reception setting to the transmission / reception setting device via the processor.
(13-2): “0410h” is set in the memory address setting device via the processor.
(13-3): Set "0000001b" to the slave address setting device via the processor

(14-1):プロセッサを介して送受信設定装置に受信設定を行なう
(14-2):プロセッサを介してメモリアドレス設定装置に「0420h」の設定を行なう
(14-3):プロセッサを介してスレーブアドレス設定装置に「0000010b」の設定を行なう
(14-1): Sets the reception setting to the transmission / reception setting device via the processor.
(14-2): “0420h” is set in the memory address setting device via the processor.
(14-3): Set “0000010b” to the slave address setting device via the processor

(15-1):プロセッサを介して送受信設定装置に受信設定を行なう
(15-2):プロセッサを介してメモリアドレス設定装置に「0430h」の設定を行なう
(15-3):プロセッサを介してスレーブアドレス設定装置に「0000011b」の設定を行なう
(15-1): Sets the reception setting to the transmission / reception setting device via the processor.
(15-2): Sets “0430h” to the memory address setting device via the processor.
(15-3): Set "0000011b" to the slave address setting device via the processor

(16-1):プロセッサを介して送受信設定装置に受信設定を行なう
(16-2):プロセッサを介してメモリアドレス設定装置に「0510h」の設定を行なう
(16-3):プロセッサを介してスレーブアドレス設定装置に「0000001b」の設定を行なう
(16-1): Sets reception to the transmission / reception setting device via the processor
(16-2): “0510h” is set in the memory address setting device via the processor.
(16-3): Set "0000001b" to the slave address setting device via the processor

(17-1):プロセッサを介して送受信設定装置に受信設定を行なう
(17-2):プロセッサを介してメモリアドレス設定装置に「0520h」の設定を行なう
(17-3):プロセッサを介してスレーブアドレス設定装置に「0000010b」の設定を行なう
(17-1): Sets reception to the transmission / reception setting device via the processor
(17-2): “0520h” is set in the memory address setting device via the processor.
(17-3): Set “0000010b” to the slave address setting device via the processor

(18-1):プロセッサを介して送受信設定装置に受信設定を行なう
(18-2):プロセッサを介してメモリアドレス設定装置に「0530h」の設定を行なう
(18-3):プロセッサを介してスレーブアドレス設定装置に「0000011b」の設定を行なう
(18-1): Sets reception to the transmission / reception setting device via the processor
(18-2): Sets “0530h” to the memory address setting device via the processor.
(18-3): Set "0000011b" to the slave address setting device via the processor

<構 成>
次に、本発明に係る実施の形態について説明を行なう。
図1は、本発明に係る2線式シリアルデータ転送制御装置に用いられるマスタ装置の構成例を示し、その主要構成としてプロセッサ401、プログラムメモリ402、及び2線式シリアルデータ転送制御装置403を含む。また2線式シリアルデータ転送制御装置403は、送受信設定装置404、メモリアドレス設定装置405、及びスレーブアドレス選択装置406を含む。408(SCL)、409(SDA)は2線式シリアルデータ転送でのクロックライン、シリアルデータラインを示す。
<Configuration>
Next, an embodiment according to the present invention will be described.
FIG. 1 shows a configuration example of a master device used in a two-wire serial data transfer control device according to the present invention, and includes a processor 401, a program memory 402, and a two-wire serial data transfer control device 403 as main components. . The two-wire serial data transfer control device 403 includes a transmission / reception setting device 404, a memory address setting device 405, and a slave address selection device 406. Reference numerals 408 (SCL) and 409 (SDA) denote a clock line and a serial data line in two-wire serial data transfer.

図1に示したマスタ装置は、2線式シリアルデータ転送シーケンス装置に対して転送開始時の情報を与えるために、プログラムメモリ402に格納されたプログラムを介して、送受信設定、メモリアドレス設定を行なう。スレーブアドレス設定についてはスレーブアドレス選択装置406からの情報が2線式シリアルデータ転送シーケンス装置に対して与えられることとなる。   The master device shown in FIG. 1 performs transmission / reception settings and memory address settings via a program stored in the program memory 402 in order to give information at the start of transfer to the 2-wire serial data transfer sequence device. . As for the slave address setting, information from the slave address selection device 406 is given to the two-wire serial data transfer sequence device.

<スレーブアドレス選択装置>
ここで、スレーブアドレス選択装置406について説明を行なう。
図11のシステム構成において説明した通り、複数からなるスレーブ装置S201〜S203の記憶装置部のアドレス空間が連続した空間としているシステム構成であることから、スレーブアドレス選択装置406は、連続したアドレス空間上のメモリアドレスから任意のアドレスを設定することによりデータ転送の対象となるスレーブ装置が決定できる装置である。
つまり、
メモリアドレスが「00000h〜07FFFh」であればスレーブ装置1であるスレーブアドレス「0000001b」、
メモリアドレスが「08000h〜0FFFFh」であればスレーブ装置2であるスレーブアドレス「0000010b」、
メモリアドレスが「10000h〜17FFFh」であればスレーブ装置3であるスレーブアドレス「0000011b」
を選択的に2線式シリアルデータ転送シーケンス装置に与えることが可能な装置である。
<Slave address selection device>
Here, the slave address selection device 406 will be described.
As described in the system configuration of FIG. 11, the slave address selection device 406 has a continuous address space because the address space of the storage device units of the plurality of slave devices S201 to S203 is a continuous space. This is a device that can determine a slave device as a data transfer target by setting an arbitrary address from the memory addresses.
That means
If the memory address is “00000h to 07FFFh”, the slave address “0000001b”, which is the slave device 1,
If the memory address is “08000h to 0FFFFh”, the slave address “0000010b”, which is the slave device 2,
If the memory address is “10000h to 17FFFh”, the slave address “0000011b” that is the slave device 3
Can be selectively supplied to the two-wire serial data transfer sequence device.

例えば次の様なデータ転送を行なう場合での本発明での具体的な技術例を図2(a)、(b)、図3を参照して挙げて説明する。   For example, a specific technical example of the present invention in the case of performing the following data transfer will be described with reference to FIGS. 2 (a), 2 (b), and 3. FIG.

(1)'メモリアドレス「00010h」からデータ受信
(2)'メモリアドレス「08020h」からデータ受信
(3)'メモリアドレス「10030h」からデータ受信
(4)'メモリアドレス「00110h」からデータ受信
(5)'メモリアドレス「08120h」からデータ受信
(1) 'Receive data from memory address'00010h'
(2) 'Receive data from memory address "08020h"
(3) 'Data received from memory address "10030h"
(4) 'Receive data from memory address "00110h"
(5) 'Data received from memory address "08120h"

(6)'メモリアドレス「10130h」からデータ受信
(7)'メモリアドレス「00210h」からデータ受信
(8)'メモリアドレス「08220h」からデータ受信
(9)'メモリアドレス「10230h」からデータ受信
(10)'メモリアドレス「00310h」からデータ受信
(6) 'Data received from memory address "10130h"
(7) 'Data received from memory address "00210h"
(8) 'Receive data from memory address "08220h"
(9) 'Data received from memory address "10230h"
(10) 'Receive data from memory address "00310h"

(11)'メモリアドレス「08320h」からデータ受信
(12)'メモリアドレス「10330h」からデータ受信
(13)'メモリアドレス「00410h」からデータ受信
(14)'メモリアドレス「08420h」からデータ受信
(15)'メモリアドレス「10430h」からデータ受信
(11) 'Data received from memory address "08320h"
(12) 'Receive data from memory address "10330h"
(13) 'Data received from memory address "00410h"
(14) 'Receive data from memory address "08420h"
(15) 'Data received from memory address "10430h"

(16)'メモリアドレス「00510h」からデータ受信
(17)'メモリアドレス「08520h」からデータ受信
(18)'メモリアドレス「10530h」からデータ受信
(16) 'Data received from memory address "00510h"
(17) 'Data received from memory address "08520h"
(18) 'Data received from memory address "10530h"

<スレーブアドレス選択信号生成装置>
図2(a)、(b)にスレーブアドレス選択信号生成装置(507)を示した。
501は、図1のメモリアドレス設定装置405と同じメモリアドレス設定装置である。502、503は1つのスレーブ装置の記憶装置部の連続なるアドレス空間上の下限アドレスと上限アドレスとを設定する装置である。504、505は演算器であり、アドレス設定値と上限アドレス設定値、及びアドレス設定値と下限アドレス設定値についてそれぞれ範囲内か範囲外かを検知する。さらに論理回路506において両者の検知結果からアドレス設定値が上限アドレス設定値から下限アドレス設定値の範囲内にあるか否かを検出し、その結果をスレーブアドレス選択信号として出力する。
<Slave address selection signal generator>
The slave address selection signal generator (507) is shown in FIGS.
A memory address setting device 501 is the same as the memory address setting device 405 in FIG. Reference numerals 502 and 503 are devices for setting a lower limit address and an upper limit address in a continuous address space of the storage unit of one slave device. Reference numerals 504 and 505 denote arithmetic units that detect whether the address setting value and the upper limit address setting value, and the address setting value and the lower limit address setting value are within or outside the range, respectively. Further, the logic circuit 506 detects whether the address setting value is within the range of the upper limit address setting value to the lower limit address setting value from the detection results of both, and outputs the result as a slave address selection signal.

例えば、上限アドレス設定値を「07FFFh」とし、下限アドレス設定値を「00000h」とした場合、アドレス設定値が「00010h」の場合は範囲内にあることから、スレーブアドレス選択信号の出力は“1”となり、アドレス設定値が「08020h」の場合は上限アドレス設定値を超えることからスレーブアドレス選択信号の出力は“0”となる。なお演算器はアドレスの全ビットを用いる必要は無いことは明らかで、必要なビットのみでの演算すなわちこの例では有効ビット上位2ビットを対象とすることでスレーブアドレス選択信号の決定が可能となる。   For example, if the upper limit address setting value is “07FFFh” and the lower limit address setting value is “00000h”, the address setting value is “00010h”, so the slave address selection signal output is “1”. When the address set value is “08020h”, the upper limit address set value is exceeded and the output of the slave address selection signal is “0”. It is obvious that the arithmetic unit does not need to use all bits of the address, and it is possible to determine the slave address selection signal by calculating only the necessary bits, that is, in this example, by targeting the upper 2 effective bits. .

図2(b)にこの場合での実施の形態を示す。
構成は図2(a)と同じとするが、図2(a)における上限アドレス設定装置(502)及び下限アドレス設定装置(503)の機能をアドレス上/下限装置(502b)が有する。
FIG. 2B shows an embodiment in this case.
Although the configuration is the same as in FIG. 2A, the address upper / lower limit device (502b) has the functions of the upper limit address setting device (502) and the lower limit address setting device (503) in FIG. 2 (a).

<スレーブアドレス生成装置>
図3に本発明に係る2線式シリアルデータ転送制御装置に用いられるスレーブアドレス生成装置(608)の一構成例を示した。
601は、図1に示したメモリアドレス設定装置405と同様のメモリアドレス設定装置である。602、603、604は図2(a)に示したスレーブアドレス選択信号生成装置507と同様の装置である。605、606、607は各スレーブ装置のスレーブアドレス設定装置である。607はスレーブアドレス選択信号からスレーブアドレスを選択出力する選択器である。さらに具体的な例として図4を参照して説明する。
<Slave address generator>
FIG. 3 shows a configuration example of the slave address generation device (608) used in the two-wire serial data transfer control device according to the present invention.
Reference numeral 601 denotes a memory address setting device similar to the memory address setting device 405 shown in FIG. 602, 603, and 604 are the same devices as the slave address selection signal generation device 507 shown in FIG. Reference numerals 605, 606, and 607 are slave address setting devices of the respective slave devices. A selector 607 selectively outputs a slave address from a slave address selection signal. A more specific example will be described with reference to FIG.

<動 作 1>
図4は、図3に示したスレーブアドレス生成装置608の動作を説明するための説明図である。
図4において、712は図3に示したスレーブアドレス生成装置608と同様のスレーブアドレス生成装置である。
701はアドレス設定装置であり、その上位2bitがスレーブアドレス選択信号生成装置604で使用される。
702、703、704はアドレス上/下限設定値であり、705、706、707は図2(a)のアドレス設定装置501と同様の機能を有するスレーブアドレス選択信号生成装置である。708、709、710はスレーブ装置1〜3(S201〜S203)に対応するスレーブアドレス設定値、711、712、713は705、706、707からのスレーブアドレス選択信号出力、714は図3に示した選択器607と同様の機能を有する選択器であり、スレーブアドレスが選択出力(715)される。
<Operation 1>
FIG. 4 is an explanatory diagram for explaining the operation of the slave address generation device 608 shown in FIG.
4, reference numeral 712 denotes a slave address generation device similar to the slave address generation device 608 shown in FIG.
Reference numeral 701 denotes an address setting device, and the upper 2 bits thereof are used by the slave address selection signal generation device 604.
Reference numerals 702, 703, and 704 denote address upper / lower limit setting values, and reference numerals 705, 706, and 707 denote slave address selection signal generation devices having the same functions as the address setting device 501 in FIG. 708, 709, and 710 are slave address setting values corresponding to slave devices 1 to 3 (S201 to S203), 711, 712, and 713 are slave address selection signal outputs from 705, 706, and 707, and 714 is shown in FIG. The selector has the same function as the selector 607, and the slave address is selected and output (715).

<動 作 2>
図5に本発明に係る2線式シリアルデータ転送制御装置に用いられるスレーブアドレス生成装置712の動作を説明する説明図を示した。
アドレス設定値の上位2ビットがいずれのアドレス上/下限設定値内に入るかを示し、その時に選択出力されるスレーブアドレスがスレーブ装置1〜3(S201〜S203)のいずれのスレーブアドレスを出力するかを記載した。例えばアドレス設定値(全13bit)=00010hならばその上位2ビットは「00b」であることから、上限、下限ともに「00b」に当てはまることからスレーブ装置1のアドレス範囲内にあることとなり、選択器714からのスレーブアドレス出力はスレーブ装置1のスレーブアドレスである「0000001b」となる。
<Operation 2>
FIG. 5 is an explanatory diagram for explaining the operation of the slave address generation device 712 used in the two-wire serial data transfer control device according to the present invention.
The upper 2 bits of the address set value indicate in which address upper / lower limit set value, and the slave address selected and output at that time outputs any slave address of the slave devices 1 to 3 (S201 to S203) It was described. For example, if the address setting value (all 13 bits) = 00010h, the upper 2 bits are “00b”, so both the upper and lower limits apply to “00b”. The slave address output from 714 is “0000001b” which is the slave address of the slave device 1.

この技術により先の(1)〜(18)に対するプロセッサ処理は、

(A-1):プロセッサを介してスレーブアドレス設定装置(708)に「0000001b」の設定を行なう
(A-2):プロセッサを介してスレーブアドレス設定装置(709)に「0000010b」の設定を行なう
(A-3):プロセッサを介してスレーブアドレス設定装置(710)に「0000011b」の設定を行なう
With this technology, the processor processing for (1) to (18) above is

(A-1): Set "0000001b" to the slave address setting device (708) via the processor
(A-2): Set "0000010b" to the slave address setting device (709) via the processor
(A-3): Set "0000011b" to the slave address setting device (710) via the processor

(B-1):プロセッサを介してアドレス上/下限設定装置(702)に「00b」の設定を行なう
(B-2):プロセッサを介してアドレス上/下限設定装置(703)に「01b」の設定を行なう
(B-3):プロセッサを介してアドレス上/下限設定装置(704)に「10b」の設定を行なう
(B-1): “00b” is set to the address upper / lower limit setting device (702) via the processor.
(B-2): “01b” is set to the address upper / lower limit setting device (703) via the processor.
(B-3): “10b” is set in the address upper / lower limit setting device (704) via the processor.

(1-1):プロセッサを介して送受信設定装置に受信設定を行なう
(1-2):プロセッサを介してメモリアドレス設定装置に「00010h」の設定を行なう
(1-1): Performs reception settings on the transmission / reception setting device via the processor.
(1-2): Set “00010h” to the memory address setting device via the processor

(2-1):プロセッサを介して送受信設定装置に受信設定を行なう
(2-2):プロセッサを介してメモリアドレス設定装置に「08020h」の設定を行なう
(2-1): Perform reception settings on the transmission / reception setting device via the processor
(2-2): Set “08020h” to the memory address setting device via the processor.

(3-1):プロセッサを介して送受信設定装置に受信設定を行なう
(3-2):プロセッサを介してメモリアドレス設定装置に「10030h」の設定を行なう
(3-1): Perform reception settings on the transmission / reception setting device via the processor
(3-2): Set “10030h” to the memory address setting device via the processor

(4-1):プロセッサを介して送受信設定装置に受信設定を行なう
(4-2):プロセッサを介してメモリアドレス設定装置に「00110h」の設定を行なう
(4-1): Perform reception settings on the transmission / reception setting device via the processor
(4-2): Set “00110h” to the memory address setting device via the processor.

(5-1):プロセッサを介して送受信設定装置に受信設定を行なう
(5-2):プロセッサを介してメモリアドレス設定装置に「08120h」の設定を行なう
(5-1): Perform reception settings on the transmission / reception setting device via the processor
(5-2): “08120h” is set in the memory address setting device via the processor.

(6-1):プロセッサを介して送受信設定装置に受信設定を行なう
(6-2):プロセッサを介してメモリアドレス設定装置に「10130h」の設定を行なう
(6-1): Perform reception setting to the transmission / reception setting device via the processor
(6-2): Set “10130h” to the memory address setting device via the processor

(7-1):プロセッサを介して送受信設定装置に受信設定を行なう
(7-2):プロセッサを介してメモリアドレス設定装置に「00210h」の設定を行なう
(7-1): Set the reception to the transmission / reception setting device via the processor.
(7-2): Set “00210h” to the memory address setting device via the processor.

(8-1):プロセッサを介して送受信設定装置に受信設定を行なう
(8-2):プロセッサを介してメモリアドレス設定装置に「08220h」の設定を行なう
(8-1): Perform reception setting to the transmission / reception setting device via the processor
(8-2): Set “08220h” to the memory address setting device via the processor.

(9-1):プロセッサを介して送受信設定装置に受信設定を行なう
(9-2):プロセッサを介してメモリアドレス設定装置に「10230h」の設定を行なう
(9-1): Perform reception settings on the transmission / reception setting device via the processor
(9-2): Set “10230h” to the memory address setting device via the processor

(10-1):プロセッサを介して送受信設定装置に受信設定を行なう
(10-2):プロセッサを介してメモリアドレス設定装置に「00310h」の設定を行なう
(10-1): Performs reception settings on the transmission / reception setting device via the processor
(10-2): Set “00310h” to the memory address setting device via the processor

(11-1):プロセッサを介して送受信設定装置に受信設定を行なう
(11-2):プロセッサを介してメモリアドレス設定装置に「08320h」の設定を行なう
(11-1): Sets reception to the transmission / reception setting device via the processor
(11-2): “08320h” is set in the memory address setting device via the processor.

(12-1):プロセッサを介して送受信設定装置に受信設定を行なう
(12-2):プロセッサを介してメモリアドレス設定装置に「10330h」の設定を行なう
(12-1): Sets reception to the transmission / reception setting device via the processor
(12-2): Set “10330h” to the memory address setting device via the processor

(13-1):プロセッサを介して送受信設定装置に受信設定を行なう
(13-2):プロセッサを介してメモリアドレス設定装置に「00410h」の設定を行なう
(13-1): Sets the reception setting to the transmission / reception setting device via the processor.
(13-2): Set “00410h” to the memory address setting device via the processor.

(14-1):プロセッサを介して送受信設定装置に受信設定を行なう
(14-2):プロセッサを介してメモリアドレス設定装置に「08420h」の設定を行なう
(14-1): Sets the reception setting to the transmission / reception setting device via the processor.
(14-2): “08420h” is set in the memory address setting device via the processor.

(15-1):プロセッサを介して送受信設定装置に受信設定を行なう
(15-2):プロセッサを介してメモリアドレス設定装置に「10430h」の設定を行なう
(15-1): Sets the reception setting to the transmission / reception setting device via the processor.
(15-2): “10430h” is set to the memory address setting device via the processor.

(16-1):プロセッサを介して送受信設定装置に受信設定を行なう
(16-2):プロセッサを介してメモリアドレス設定装置に「00510h」の設定を行なう
(16-1): Sets reception to the transmission / reception setting device via the processor
(16-2): Set “00510h” to the memory address setting device via the processor

(17-1):プロセッサを介して送受信設定装置に受信設定を行なう
(17-2):プロセッサを介してメモリアドレス設定装置に「08520h」の設定を行なう
(17-1): Sets reception to the transmission / reception setting device via the processor
(17-2): “08520h” is set in the memory address setting device via the processor.

(18-1):プロセッサを介して送受信設定装置に受信設定を行なう
(18-2):プロセッサを介してメモリアドレス設定装置に「10530h」の設定を行なう
(18-1): Sets reception to the transmission / reception setting device via the processor
(18-2): Set “10530h” to the memory address setting device via the processor

以上より、プロセッサの処理としては42個の命令をプログラムメモリに格納する必要がある。
この結果より一般の技術例よりもプログラムメモリに格納すべきプログラムが減っていることがわかる。この技術により一般の技術で必要とされてきた2線式シリアルデータ転送が開始されるごとに必要であったスレーブアドレス設定のためのプログラム準備が不要となり、プログラム準備のために必要な記憶装置は減り、さらにプロセッサ処理にかかる時間も減ることとなる。
From the above, it is necessary to store 42 instructions in the program memory as the processing of the processor.
As a result, it can be seen that the number of programs to be stored in the program memory is smaller than that in the general technical example. This technology eliminates the need for a program preparation for slave address setting that is required every time 2-wire serial data transfer, which has been required in general techniques, is started. The time required for processor processing is also reduced.

続いて、スレーブ装置とのシリアルデータ転送中にスレーブ装置のメモリアドレス空間の上限を超えた場合、2線式シリアルデータ転送を終了させる手段(シーケンス装置908)、そのメモリアドレスから次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるための手段(シーケンス装置908)についての実施の形態を図6、7に示した。   Subsequently, when the upper limit of the memory address space of the slave device is exceeded during serial data transfer with the slave device, means for terminating the two-wire serial data transfer (sequence device 908), and from the memory address to the next transfer partner FIGS. 6 and 7 show an embodiment of means (sequence device 908) for generating a slave address and resuming serial data transfer from a continuous address space.

図6は、本発明に係る2線式シリアルデータ転送制御装置に用いられるマスタ装置の他の構成例である。
図6において、903は2線式シリアルデータ転送制御装置であり、901はプロセッサである。902はプログラムメモリであり、904はメモリアドレス設定装置である。905は転送数カウンタであり、906は上限アドレス設定値である。907は比較器であり、908は2線式シリアルデータ転送シーケンス装置である。909、910は2線式シリアル転送用のクロックライン(SCL)及びシリアルデータライン(SDA)である。
FIG. 6 shows another configuration example of the master device used in the two-wire serial data transfer control device according to the present invention.
In FIG. 6, 903 is a two-wire serial data transfer control device, and 901 is a processor. Reference numeral 902 denotes a program memory, and reference numeral 904 denotes a memory address setting device. 905 is a transfer number counter, and 906 is an upper limit address setting value. Reference numeral 907 denotes a comparator, and reference numeral 908 denotes a two-wire serial data transfer sequence device. Reference numerals 909 and 910 denote a clock line (SCL) and a serial data line (SDA) for two-wire serial transfer.

上限アドレス設定装置への設定はプロセッサを介して行なわれ、例えばスレーブ装置1(S201)のアドレス空間は「00000-07FFFh」であることから設定値は「07FFFh」となる。なおこの設定はシステム構成が変わらないことから、1度の設定で良いこととなる。   Setting to the upper limit address setting device is performed via a processor. For example, since the address space of the slave device 1 (S201) is “00000-07FFFh”, the set value is “07FFFh”. Since this setting does not change the system configuration, it can be set once.

メモリアドレス設定装置への設定もプロセッサを介して行なわれるが、この設定は転送プロトコル開始ごとに設定が必要である。
例としてメモリアドレス設定値が「00010h」として説明する。
Setting to the memory address setting device is also performed via the processor, but this setting is required every time the transfer protocol is started.
As an example, it is assumed that the memory address setting value is “00010h”.

2線式シリアルデータ転送が開始される前に、メモリアドレス設定値は転送数カウンタ905へロードされる。このロード値またはカウンタ値がメモリアドレス912としてシーケンス装置908で使用される。   Before the two-wire serial data transfer is started, the memory address setting value is loaded into the transfer number counter 905. This load value or counter value is used by the sequence device 908 as the memory address 912.

一般的には2線式シリアルデータ転送が開始されるとシーケンス装置908はシリアルデータ送信や受信動作に対して、転送データの単位である1バイト中のあるビット目のデータが送信されたことや1バイトデータが送信されたこと、1バイト中のあるビット目を受信したことや1バイトデータの受信が終わったことなどをプロセッサに知らせる手段を有する。   In general, when the two-wire serial data transfer is started, the sequence device 908 transmits the data of a certain bit in one byte, which is a unit of transfer data, for serial data transmission and reception operations. Means for notifying the processor that one-byte data has been transmitted, that a certain bit in one byte has been received, and that one-byte data has been received.

この通知を元にプロセッサを介して送信データの準備や受信データの退避が行われる。この手段を利用して1バイトが転送されるごとに転送数カウンタをカウントアップするための信号を転送データ検出クロック911として示した。このカウント値と上限アドレス設定値906を比較器907で比較し、一致すれば上限アドレスまでの転送が完了したこととなり、転送プロトコル終了信号913としてシーケンス装置908に通知する。シーケンス装置908はこの信号から現在の転送プロトコルを終了させるための動作を行なうように回路化されているものとなる。   Based on this notification, preparation of transmission data and saving of received data are performed via the processor. A signal for counting up the transfer number counter every time one byte is transferred using this means is shown as a transfer data detection clock 911. The count value and the upper limit address set value 906 are compared by the comparator 907. If they match, the transfer up to the upper limit address is completed, and the sequence device 908 is notified as a transfer protocol end signal 913. The sequence device 908 is circuitized so as to perform an operation for ending the current transfer protocol from this signal.

なお、上限アドレスとのデータ転送終了後にシーケンス装置に転送プロトコル終了信号を通知しても、シーケンス装置908が次のデータ転送を開始する制御に移っている場合などは、カウンタ値またはアドレス設定値の変更を行なっておく手段を持つことで、シーケンス装置908の制御に合わせて転送プロトコル終了信号を発生することも可能である。   Note that even if the transfer protocol end signal is sent to the sequence device after the data transfer with the upper limit address is completed, if the sequence device 908 shifts to the control to start the next data transfer, the counter value or the address setting value By having means for making a change, it is possible to generate a transfer protocol end signal in accordance with the control of the sequence device 908.

シーケンス装置は、転送プロトコル終了信号を受け取った後、現在のプロトコルを終了させる様に回路化され、このシーケンスに含まれる動作として転送プロトコルを開始する様に回路化されている。   After receiving the transfer protocol end signal, the sequence device is circuitized to end the current protocol, and is configured to start the transfer protocol as an operation included in this sequence.

アドレス設定値904である「00010h」が転送数カウンタ905にロードされたことで、「00010h」はシーケンス装置908に入力される。スレーブアドレスの生成は先述の図4での動作で行われるものとする。   When “00010h” as the address setting value 904 is loaded into the transfer number counter 905, “00010h” is input to the sequence device 908. It is assumed that the slave address is generated by the operation shown in FIG.

シリアルデータ転送開始に当たってのスレーブアドレスとメモリアドレスはこの手段によるものとなる。転送が開始されると、ある決まったタイミングで転送データ検出クロック911が発行され、転送カウンタ905がカウントアップされる。カウントアップ値は転送中または転送したアドレスを指し、このカウンタ値(アドレス値)と上限アドレス値とが比較器907により比較される。カウンタ値が上限アドレス値「07FFFh」となれば比較器907は転送プロトコル終了信号をシーケンス装置908に通知し、シーケンサ装置908はこの信号を元に転送プロトコルを終了する動作に移ることとなる。   The slave address and memory address at the start of serial data transfer are based on this means. When the transfer is started, a transfer data detection clock 911 is issued at a certain timing, and the transfer counter 905 is counted up. The count-up value indicates the address being transferred or transferred, and the counter value (address value) and the upper limit address value are compared by the comparator 907. If the counter value reaches the upper limit address value “07FFFh”, the comparator 907 notifies the sequence device 908 of a transfer protocol end signal, and the sequencer device 908 moves to an operation of ending the transfer protocol based on this signal.

図7は、本発明に係る2線式シリアルデータ転送制御装置に用いられるマスタ装置の他の構成例である。
図7において、1003は2線式シリアルデータ転送制御装置であり、1001はプロセッサである。1002はプログラムメモリであり、1004はメモリアドレス設定装置である。1005は転送数カウンタであり、1006は転送データ検出クロック信号である。1007はメモリアドレスであり、1008は2線式シリアルデータ転送シーケンス装置である。1009、1010は2線式シリアル転送用のクロックライン(SCL)及びシリアルデータライン(SDA)である。
FIG. 7 shows another configuration example of the master device used in the two-wire serial data transfer control device according to the present invention.
In FIG. 7, reference numeral 1003 denotes a two-wire serial data transfer control device, and reference numeral 1001 denotes a processor. Reference numeral 1002 denotes a program memory, and reference numeral 1004 denotes a memory address setting device. Reference numeral 1005 denotes a transfer number counter, and reference numeral 1006 denotes a transfer data detection clock signal. Reference numeral 1007 denotes a memory address, and reference numeral 1008 denotes a two-wire serial data transfer sequence device. Reference numerals 1009 and 1010 denote a two-line serial transfer clock line (SCL) and serial data line (SDA).

1020、1021、1022は図4に示した705、708、711と同様の構成を有し、1030、1031、1032は図4に示した706、709、711と同様の構成を示す。1040、1041、1042は図4に示した707、710、713と同様の構成を示し、1023、1024、1025、(1033、1034、1035)、(1043、1044、1045)は図6に示した906、907、913と同様の構成を示す。   1020, 1021, and 1022 have the same configuration as 705, 708, and 711 shown in FIG. 4, and 1030, 1031, and 1032 show the same configuration as 706, 709, and 711 shown in FIG. 1040, 1041, and 1042 have the same configuration as 707, 710, and 713 shown in FIG. 4, and 1023, 1024, 1025, (1033, 1034, and 1035) and (1043, 1044, and 1045) are shown in FIG. A configuration similar to 906, 907, and 913 is shown.

<動 作 3>
引き続き動作の説明を行う。
先述の図6の動作説明による転送プロトコル終了後にシーケンス装置は次のプロトコル開始動作に移行するようにシーケンス制御されているものとする。
このプロトコル開始前には、スレーブアドレス、メモリアドレス発行のための準備が必要であるが、本発明ではソフトウェアによる準備では無く、先のプロトコル終了判定に用いたカウンタからの値を使用して、メモリアドレス、スレーブアドレスの準備を行なうこととなる。
<Operation 3>
Next, the operation will be described.
Assume that the sequence device is sequence-controlled so as to shift to the next protocol start operation after the end of the transfer protocol according to the operation description of FIG.
Before starting this protocol, preparation for issuing slave addresses and memory addresses is necessary. However, in the present invention, not using software, but using the value from the counter used in the previous protocol termination determination, The address and slave address will be prepared.

図8は、本発明に係る2線式シリアルデータ転送制御装置の動作例を示す図である。
図8において、シリアルデータ転送が続きカウンタ値が「07FFFh」になったことで上限アドレス設定値と一致し、転送プロトコル終了信号がシーケンス装置に通知されシリアルデータ転送は終了する。
ここで次のスレーブ装置との開始に当たり、シーケンス装置はカウンタ値を1つカウントアップし「08000h」となる。この値は次のシリアルデータ転送を行うスレーブ装置の開始メモリアドレス(連続したアドレス空間としてのアドレスであり、転送プロトコル上でのメモリアドレスはこの場合「0000h」)になる。
FIG. 8 is a diagram showing an operation example of the two-wire serial data transfer control device according to the present invention.
In FIG. 8, the serial data transfer continues and the counter value reaches “07FFFh”, which matches the upper limit address setting value. A transfer protocol end signal is notified to the sequence device, and the serial data transfer ends.
Here, at the start of the next slave device, the sequence device counts up the counter value by one and becomes “08000h”. This value is the start memory address of the slave device that performs the next serial data transfer (the address as a continuous address space, and the memory address on the transfer protocol is “0000h” in this case).

また先述の図4の説明と同様にこのメモリアドレスを使ってスレーブアドレスが決定される手段を持つことから、スレーブアドレス、メモリアドレスの準備が整うこととなり、スレーブ装置2へのシリアルデータ転送が開始される。さらにシリアルデータ転送が続きカウンタ値が「0FFFFh」になったことで上限アドレス設定値と一致し、転送プロトコル終了信号がシーケンス装置に通知されシリアルデータ転送は終了する。   Similarly to the description of FIG. 4, the slave address is determined by using the memory address, so that the slave address and the memory address are prepared, and serial data transfer to the slave device 2 is started. Is done. Further, the serial data transfer continues and the counter value reaches “0FFFFh”, which coincides with the upper limit address setting value. A transfer protocol end signal is notified to the sequence device, and the serial data transfer ends.

ここで次のスレーブ装置との開始に当たり、シーケンス装置はカウンタ値を1つカウントアップし「10000h」となる。この値は次のシリアルデータ転送を行うスレーブ装置の開始メモリアドレス(連続したアドレス空間としてのアドレスであり、転送プロトコル上でのメモリアドレスはこの場合「0000h」)になる。同様にこのメモリアドレスを使ってスレーブアドレスが決定される手段を持つことから、スレーブアドレス、メモリアドレスの準備が整うこととなり、スレーブ装置3へのシリアルデータ転送が開始される。   Here, at the start of the next slave device, the sequence device increments the counter value by one to “10000h”. This value is the start memory address of the slave device that performs the next serial data transfer (the address as a continuous address space, and the memory address on the transfer protocol is “0000h” in this case). Similarly, since the memory address is used to determine the slave address, the slave address and the memory address are prepared, and serial data transfer to the slave device 3 is started.

また、アドレス設定値の初期値を0番地になるように設定し、上限メモリアドレス設定値の初期値をそのシステムで使用するスレーブ装置の上限アドレスとなるように回路化しておくことで、プロセッサの処理を介すことなく連続してスレーブ装置からの転送が可能となる。   In addition, by setting the initial value of the address setting value to be 0 address and making the circuit so that the initial value of the upper limit memory address setting value becomes the upper limit address of the slave device used in the system, Transfer from the slave device can be continuously performed without processing.

これは例えばスレーブ装置に一般的なI2C-EEPROMをブート用デバイスとして構成し、システムで用いるプロセッサの処理プログラムが1つのI2C-EEPROMの容量を越えるプログラムが必要である場合、すなわち複数のI2C-EEPROMが必要となる場合、ブート用のソフトウェアが必要となり本来のシステム用のソフトウェア以外に別途ブート用のソフトウェアが必要となり、この例ではブートデバイス(I2C-EEPROM)の容量が増加することとなる。
しかし本発明に係る2線式シリアルデータ転送制御装置ではプロセッサを介さずに複数のスレーブ装置からの連続してデータ転送が可能となることから、ブート専用のソフトウェアは不要となり、ブートデバイスの増加は発生しないこととなる。
This is the case when, for example, a general I2C-EEPROM is configured as a boot device for a slave device, and the processor processing program used in the system requires a program that exceeds the capacity of one I2C-EEPROM, that is, a plurality of I2C-EEPROMs Therefore, boot software is required, and boot software is required in addition to the original system software. In this example, the capacity of the boot device (I2C-EEPROM) increases.
However, since the two-wire serial data transfer control device according to the present invention can continuously transfer data from a plurality of slave devices without using a processor, no dedicated boot software is required, and the increase in boot devices It will not occur.

図9は、本発明に係る2線式シリアルデータ転送制御方法を説明するためのフローチャートの一例である。
動作の主体はマスタ装置(実質的にはシーケンス装置)である。
まず、マスタ装置は、シリアルデータ転送中か否かを判断し(ステップS1)、シリアルデータ転送中でないと判断した場合は待機し(ステップS1/No)、シリアルデータ転送中であると判断した場合はステップS2に進む(ステップS1/Yes)。
マスタ装置は、ステップS2にて、シリアルデータの転送中にスレーブ装置のメモリアドレス空間の上限を超えたか否かを判断する。マスタ装置は、シリアルデータの転送量がメモリアドレス空間の上限を超えていないと判断した場合にはそのまま転送し(ステップS2/No)、シリアルデータの転送量がメモリアドレス空間の上限を超えたと判断した場合(ステップS2/Yes)、2線式シリアルデータ転送を終了させる(ステップS3)。
マスタ装置は、スレーブ装置のメモリアドレスから、次の転送相手となるスレーブアドレスを生成する(ステップS4)。
マスタ装置は、連続したアドレス空間からのシリアルデータ転送を再開させる(ステップS4)。
FIG. 9 is an example of a flowchart for explaining the two-wire serial data transfer control method according to the present invention.
The subject of operation is a master device (substantially a sequence device).
First, the master device determines whether or not serial data is being transferred (step S1). If it is determined that serial data is not being transferred, it waits (step S1 / No), and if it is determined that serial data is being transferred. Advances to step S2 (step S1 / Yes).
In step S2, the master device determines whether the upper limit of the memory address space of the slave device has been exceeded during the transfer of serial data. If the master device determines that the transfer amount of the serial data does not exceed the upper limit of the memory address space, the master device transfers it as it is (step S2 / No), and determines that the transfer amount of the serial data exceeds the upper limit of the memory address space. If so (step S2 / Yes), the two-wire serial data transfer is terminated (step S3).
The master device generates a slave address as the next transfer partner from the memory address of the slave device (step S4).
The master device resumes serial data transfer from the continuous address space (step S4).

<プログラム>
以上で説明した本発明にかかる2線式シリアルデータ転送制御装置は、コンピュータで処理を実行させるプログラムによって実現されている。コンピュータとしては、例えばパーソナルコンピュータやワークステーションなどの汎用的なものが挙げられるが、本発明はこれに限定されるものではない。よって、一例として、プログラムにより本発明を実現する場合の説明を以下で行う。
<Program>
The two-wire serial data transfer control device according to the present invention described above is realized by a program that causes a computer to execute processing. Examples of the computer include general-purpose computers such as personal computers and workstations, but the present invention is not limited to this. Therefore, as an example, a case where the present invention is realized by a program will be described below.

例えば、図9、10に示すフローチャートにおいて、
マスタ装置に2線式シリアルデータ転送手段で接続される1つ以上のスレーブ装置を含み、1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とする2線式シリアルデータ転送制御システム装置の2線式シリアルデータ転送制御用のプログラムであって、
アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成するため、
コンピュータに、
(a)マスタ装置が、マスタ装置とスレーブ装置とのシリアルデータ転送中にスレーブ装置のメモリアドレス空間の上限を超えたか否かを判断する手順、
(b)マスタ装置が、上限を超えた場合に2線式シリアルデータ転送を終了させる手順、
(c)マスタ装置が、メモリアドレスから、次の転送相手となるスレーブアドレスを生成させる手順、
(d)マスタ装置が、連続したアドレス空間からのシリアルデータ転送を再開させる手順、
を実行させるプログラムが挙げられる。
これにより、プログラムが実行可能なコンピュータ環境さえあれば、どこにおいても本発明にかかる装置を実現することができる。
このようなプログラムは、コンピュータに読み取り可能な記憶媒体に記憶されていてもよい。
For example, in the flowcharts shown in FIGS.
A two-wire serial data transfer control system device including one or more slave devices connected to a master device by a two-wire serial data transfer means and having an address space composed of one or more slave devices as one address space 2-wire serial data transfer control program,
In order to generate a slave address as a transfer partner from the address where access starts,
On the computer,
(a) a procedure for determining whether or not the master device has exceeded the upper limit of the memory address space of the slave device during serial data transfer between the master device and the slave device;
(b) The procedure for the master device to end 2-wire serial data transfer when the upper limit is exceeded,
(c) a procedure for the master device to generate a slave address as the next transfer partner from the memory address;
(d) a procedure for the master device to resume serial data transfer from a continuous address space;
A program that executes
Thus, the apparatus according to the present invention can be realized anywhere as long as there is a computer environment capable of executing the program.
Such a program may be stored in a computer-readable storage medium.

<記憶媒体>
ここで、記憶媒体としては、例えば、CD-ROM(Compact Disc Read Only Memory)、フレキシブルディスク(FD)、CD-R(CD Recordable)などのコンピュータで読み取り可能な記憶媒体、フラッシュメモリ、RAM(Random Access Memory)、ROM(Read Only Memory)、FeRAM(強誘電体メモリ)等の半導体メモリやHDD(Hard Disc Drive)が挙げられる。
<Storage medium>
Here, examples of the storage medium include computer-readable storage media such as CD-ROM (Compact Disc Read Only Memory), flexible disk (FD), and CD-R (CD Recordable), flash memory, and RAM (Random Examples thereof include semiconductor memories such as Access Memory (ROM), ROM (Read Only Memory), and FeRAM (ferroelectric memory), and HDD (Hard Disc Drive).

<作用効果>
本実施形態によれば、2線式シリアルデータ転送手段で接続されるマスタ装置と1つ以上のスレーブ装置とで構成されるシリアルデータ転送システム装置であり、1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とするシステム装置において、マスタ装置は、アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成する手段を有するので、2線式シリアルデータ転送プロトコル上に必要なスレーブアドレス値を発行するためのソフトウェア準備が不要となり、ソフトウェア記憶装置を削減することが可能となる。またこのことからプロセッサ処理の負担が減ることとなりプロセッサ処理時間が短縮できる。
<Effect>
According to the present embodiment, a serial data transfer system device composed of a master device and one or more slave devices connected by a two-wire serial data transfer means, and an address space comprising one or more slave devices Since the master device has a means for generating a slave address as a transfer partner from the address at which access is started, the slave device has a necessary slave address value on the 2-wire serial data transfer protocol. Software preparation for issuing is unnecessary, and the software storage device can be reduced. This also reduces the processor processing load and shortens the processor processing time.

また、本実施形態によれば、スレーブ装置とのシリアルデータ転送中にスレーブ装置のメモリアドレス空間の上限を超えた場合、2線式シリアルデータ転送を終了させる手段(シーケンス装置)を有し、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるための手段(シーケンス装置)を有するので、スレーブ装置のアドレス境界を検知してプロトコルの終了が可能となり、さらに次のスレーブ装置への転送開始が自動化されることから、プロセッサにかかっていたこれら一連の処理を軽減することが可能となりプロセッサ処理時間が短縮できる。   Further, according to the present embodiment, when the upper limit of the memory address space of the slave device is exceeded during serial data transfer with the slave device, the two-wire serial data transfer is terminated (sequence device). From the memory address, it has a means (sequence device) for generating a slave address as the next transfer partner and resuming serial data transfer from the continuous address space. Since the process can be terminated and the start of transfer to the next slave device is automated, the series of processes applied to the processor can be reduced and the processor processing time can be shortened.

さらにこのプロセッサ処理のためのソフトウェアを準備することが不要となり、プロセッサのためのソフトウェア記憶装置を減少させることが可能となる。   Further, it becomes unnecessary to prepare software for the processor processing, and the software storage device for the processor can be reduced.

なお、上述した実施の形態は、本発明の好適な実施の形態の一例を示すものであり、本発明はそれに限定されることなく、その要旨を逸脱しない範囲内において、種々変形実施が可能である。   The above-described embodiment shows an example of a preferred embodiment of the present invention, and the present invention is not limited thereto, and various modifications can be made without departing from the scope of the invention. is there.

401 プロセッサ
402 プログラムメモリ
403 2線式シリアルデータ転送制御装置
404 送受信設定装置
406 スレーブアドレス選択装置
407 2線式シリアルデータ転送シーケンス装置
408 クロックライン
409 シリアルデータライン
401 processor 402 program memory 403 2-wire serial data transfer control device 404 transmission / reception setting device 406 slave address selection device 407 2-wire serial data transfer sequence device 408 clock line 409 serial data line

特開2008−135840号公報JP 2008-135840 A 特開平11−126178号公報Japanese Patent Laid-Open No. 11-126178

Claims (9)

マスタ装置に2線式シリアルデータ転送手段で接続される1つ以上のスレーブ装置を含み、前記1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とする2線式シリアルデータ転送制御システム装置の線式シリアルデータ転送制御方法であって、
アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成することを特徴とする2線式シリアルデータ転送制御方法。
A two-wire serial data transfer control system device including one or more slave devices connected to a master device by a two-wire serial data transfer means, and having an address space made up of the one or more slave devices as one address space The wire serial data transfer control method of
A two-wire serial data transfer control method, wherein a slave address as a transfer partner is generated from an address at which access is started.
前記マスタ装置と前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させることを特徴とする請求項1記載の2線式シリアルデータ転送制御方法。   If the upper limit of the memory address space of the slave device is exceeded during serial data transfer between the master device and the slave device, the two-wire serial data transfer is terminated, and the slave to be the next transfer partner from the memory address 2. The two-wire serial data transfer control method according to claim 1, wherein an address is generated and serial data transfer from a continuous address space is resumed. 前記マスタ装置と前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合もしくは下限に満たない場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるシーケンス装置を有することを特徴とする請求項1記載の2線式シリアルデータ転送制御方法。   When the upper limit of the memory address space of the slave device is exceeded or the lower limit is not reached during the serial data transfer between the master device and the slave device, the two-wire serial data transfer is terminated, 2. The two-wire serial data transfer control method according to claim 1, further comprising a sequence device for generating a slave address to be a transfer partner of the second address and resuming serial data transfer from a continuous address space. マスタ装置に2線式シリアルデータ転送手段で接続される1つ以上のスレーブ装置を含み、前記1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とする2線式シリアルデータ転送制御システム装置の2線式シリアルデータ転送制御用のプログラムであって、
アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成するため、
コンピュータに、
前記マスタ装置が、前記マスタ装置と前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えたか否かを判断する手順、
前記マスタ装置が、前記上限を超えた場合に2線式シリアルデータ転送を終了させる手順、
前記マスタ装置が、前記メモリアドレスから、次の転送相手となるスレーブアドレスを生成させる手順、
前記マスタ装置が、連続したアドレス空間からのシリアルデータ転送を再開させる手順、
を実行させることを特徴とするプログラム。
A two-wire serial data transfer control system device including one or more slave devices connected to a master device by a two-wire serial data transfer means, and having an address space made up of the one or more slave devices as one address space 2 wire serial data transfer control program,
In order to generate a slave address as a transfer partner from the address where access starts,
On the computer,
A procedure for determining whether the master device has exceeded the upper limit of the memory address space of the slave device during serial data transfer between the master device and the slave device;
A procedure for ending the two-wire serial data transfer when the master device exceeds the upper limit;
The master device generates a slave address as a next transfer partner from the memory address,
A procedure for the master device to resume serial data transfer from a continuous address space;
A program characterized by having executed.
マスタ装置と、該マスタ装置に2線式シリアルデータ転送手段で接続される1つ以上のスレーブ装置とを含み、前記1つ以上のスレーブ装置からなるアドレス空間を1つのアドレス空間とする2線式シリアルデータ転送制御システム装置に用いられる2線式シリアルデータ転送制御装置であって、
前記マスタ装置は、前記2線式シリアルデータ転送制御装置を含み、該2線式シリアルデータ転送制御装置は、アクセスを開始するアドレスから転送相手となるスレーブアドレスを生成する生成装置を有することを特徴とする2線式シリアルデータ転送制御装置。
A two-wire system including a master device and one or more slave devices connected to the master device by a two-wire serial data transfer unit, and an address space composed of the one or more slave devices as one address space A two-wire serial data transfer control device used in a serial data transfer control system device,
The master device includes the two-wire serial data transfer control device, and the two-wire serial data transfer control device includes a generation device that generates a slave address serving as a transfer partner from an address at which access is started. A two-wire serial data transfer control device.
前記マスタ装置は、
前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるシーケンス装置を有することを特徴とする請求項4記載の2線式シリアルデータ転送制御装置。
The master device is
If the upper limit of the memory address space of the slave device is exceeded during serial data transfer with the slave device, the 2-wire serial data transfer is terminated and a slave address to be the next transfer partner is generated from the memory address. 5. The two-wire serial data transfer control device according to claim 4, further comprising a sequence device for resuming serial data transfer from a continuous address space.
前記マスタ装置は、
前記スレーブ装置とのシリアルデータ転送中に前記スレーブ装置のメモリアドレス空間の上限を超えた場合もしくは下限に満たない場合、2線式シリアルデータ転送を終了させ、そのメモリアドレスから、次の転送相手となるスレーブアドレスを生成し、連続したアドレス空間からのシリアルデータ転送を再開させるシーケンス装置を有することを特徴とする請求項4記載の2線式シリアルデータ転送制御装置。
The master device is
When the upper limit of the memory address space of the slave device is exceeded or less than the lower limit during serial data transfer with the slave device, the two-wire serial data transfer is terminated, and the next transfer partner is transferred from the memory address. 5. The two-wire serial data transfer control device according to claim 4, further comprising a sequence device for generating a slave address and restarting serial data transfer from a continuous address space.
前記マスタ装置は、メモリアドレスを設定するメモリアドレス設定装置と、連続したアドレス空間上のメモリアドレスから任意のアドレスを設定することによりデータ転送の対象となるスレーブ装置を決定するスレーブアドレス選択装置とを有することを特徴とする請求項6または7記載の2線式シリアルデータ転送制御装置。   The master device includes a memory address setting device that sets a memory address, and a slave address selection device that determines a slave device that is a target of data transfer by setting an arbitrary address from memory addresses in a continuous address space. 8. The two-wire serial data transfer control device according to claim 6, further comprising: 前記スレーブアドレス選択装置は、アドレス上限及びアドレス下限を設定する設定装置と、前記設定装置からのアドレス設定値と上限アドレス設定値、アドレス設定値と下限アドレス設定値についてそれぞれ範囲内か範囲外かを検知する演算装置と、両演算装置の検知結果からアドレス設定値が上限アドレス設定値から下限アドレス設定値の範囲内にあるか否かを検出し、スレーブアドレス選択信号を発する論理回路と、を有することを特徴とする請求項8記載の2線式シリアルデータ転送制御装置。   The slave address selection device includes a setting device for setting an upper address limit and an address lower limit, an address setting value and an upper limit address setting value from the setting device, and an address setting value and a lower limit address setting value that are within or out of range, respectively. And a logic circuit that detects whether the address set value is within the range of the upper limit address set value to the lower limit address set value and generates a slave address selection signal from the detection results of both the arithmetic units. The two-wire serial data transfer control device according to claim 8.
JP2009263931A 2009-11-19 2009-11-19 Two-wire type serial data transfer control method, program, and two-wire type serial data transfer controller Withdrawn JP2011109515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009263931A JP2011109515A (en) 2009-11-19 2009-11-19 Two-wire type serial data transfer control method, program, and two-wire type serial data transfer controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009263931A JP2011109515A (en) 2009-11-19 2009-11-19 Two-wire type serial data transfer control method, program, and two-wire type serial data transfer controller

Publications (1)

Publication Number Publication Date
JP2011109515A true JP2011109515A (en) 2011-06-02

Family

ID=44232497

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009263931A Withdrawn JP2011109515A (en) 2009-11-19 2009-11-19 Two-wire type serial data transfer control method, program, and two-wire type serial data transfer controller

Country Status (1)

Country Link
JP (1) JP2011109515A (en)

Similar Documents

Publication Publication Date Title
TWI731200B (en) A slave device connnected to host by 12c bus and its communication method
JP2018527678A (en) Improved serial peripheral interface
US8635386B2 (en) Communication control device, data communication method and program
TWI764417B (en) Device and system complying with expanded serial peripheral interface standard
JP2005128747A (en) Integrated circuit device with transmission/reception macro for serial transfer bus
JP2009535677A (en) I2C clock generation method and system
JP2008009817A (en) Semiconductor device and data transfer method
TW202029000A (en) Interface adapter circuit
JP2010176442A (en) Descriptor transfer device, i/o controller and descriptor transfer method
JP5304815B2 (en) Microcomputer
JP6425492B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
JP5209535B2 (en) USB host controller and control method of USB host controller
US10339085B2 (en) Method of scheduling system-on-chip including real-time shared interface
WO2009098737A1 (en) External device access apparatus, its controlling method and system lsi
JP2011109515A (en) Two-wire type serial data transfer control method, program, and two-wire type serial data transfer controller
JP2005303718A (en) Matrix bus connection system
US8127108B2 (en) Apparatus, system and method for prefetching data in bus system
JP2014232414A (en) I2C communication slave device
JP6024752B2 (en) Information processing apparatus and control method thereof
JP2003208399A (en) Data processing apparatus
JP5385722B2 (en) Interface circuit
JP2007334600A (en) Semiconductor integrated circuit device
JP2006024134A (en) Dma transfer device and dma transfer method
JP2004213615A (en) Access method of nonvolatile random access memory and its architecture
JP6137944B2 (en) Semiconductor device, test circuit and test method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20130205