This application claims the priority benefit of Taiwan application serial no. 101114200, filed on Apr. 20, 2012. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
1. Field of the Invention
The invention relates to a data transferring method for an inter-integrated circuit interface. More particularly, the invention relates to an expansion method for a sub-address of an inter-integrated circuit interface.
2. Description of Related Art
With the advance of the semiconductor fabricating techniques, contemporary electronic devices can be steadily operated in coordination with clock signals in high frequency. Relatively, a so-called serial data transferring interface gradually becomes a trend to be used for effectively minimizing layout areas of data transferring wires among electronic devices in data transferring operations among electronic devices.
An example is taken as a data transferring method for an inter-integrated circuit (I2C) interface. Referring to
In the illustration of
Furthermore, in the illustration of
The invention provides a data transferring method for an inter-integrated circuit interface that can expand numbers of bits of sub-address (SAD) based on the needs.
The invention provides a data transferring interface apparatus for an inter-integrated circuit that can expand numbers of bits of sub-address (SAD) based on the needs.
The invention provides a data transferring method for an inter-integrated circuit interface, wherein the steps include: dividing a sub-address into a plurality of part sub-address byte sets; setting a plurality of sub-address addressing identification codes corresponding to the part sub-address byte sets; and sequentially transferring each of the sub-address addressing identification codes and each of the corresponding part sub-address byte sets within each of a plurality of time periods for performing a sub-address addressing operation of the sub-address.
An embodiment of the invention further includes transferring a write-in data or receiving a read data by the inter-integrated circuit interface after the addressing operation of the sub-address is completed.
In one embodiment of the invention, each of the part sub-address byte sets has 8 bits.
In an embodiment of the invention, during each of the time periods, the step of transferring a read/write identification bit is further included between transferring each of the sub-address addressing identification codes and each of the corresponding part sub-address byte sets.
In an embodiment of the invention, during each of the time periods, the step of receiving an acknowledgement bit is further included between transferring each of the sub-address addressing identification codes and each of the corresponding part sub-address byte sets, and after transferring a read/write identification bit.
An embodiment of the invention further includes transferring a start bit when each of the time periods starts.
An embodiment of the invention further includes transferring a stop bit after each of the time periods stops.
The invention provides a data transferring interface apparatus for an inter-integrated circuit, which is configured to transfer data between a master device and a slave device. The data transferring interface apparatus includes a data transferring line set, a master terminal transceiving controller and a slave terminal transceiving controller. The master terminal transceiving controller is coupled to the master device and also coupled to the slave device through the data transferring line set. The master terminal transceiving controller divides a sub-address into a plurality of part sub-address byte sets, sets a plurality of sub-address addressing identification codes corresponding to the part sub-address byte sets, and sequentially transferring each of the sub-address addressing identification codes and each of the corresponding part sub-address byte sets respectively within each of a plurality of time periods for an addressing operation of a sub-address in the slave device. The slave terminal transceiving controller is coupled to the slave device and also coupled to the master terminal transceiving controller through the data transferring line set for receiving a data transferred by the master terminal transceiving controller.
In light of the above, in the invention, various part sub-address byte sets in sub-addresses are transferred in a way of transferring sub-address addressing identification codes. Accordingly, in a state of a module address occupying minimum fields, bit numbers of sub-addresses can be effectively expanded and the data transferring efficiency of the inter-integrated circuit interface can be effectively enhanced.
In order to make the aforementioned features and advantages of the invention more comprehensible, embodiments accompanied with figures are described in details below.
Referring to
It should also be mentioned that the data transferring line set 260 is consisted of a data line SDA and a clock line SCL. The data transferring line set 260 performs a transferring operation of a data through a signal transferred through the data line SDA in collocation with a transition point of a clock signal transferred by the clock line SCL.
Referring to
Additionally, in Step S320, the master terminal transceiving controller 230 sets a plurality of sub-address addressing identification codes corresponding to the part sub-address byte sets. Continuing the example of the 16-bit sub-address, the master terminal transceiving controller 230 may set a sub-address addressing identification code based on a part sub-address byte set acquired by dividing a sub-address comprising the highest 8 bits. The master terminal transceiving controller 230 may set another sub-address addressing identification code based on a part sub-address byte set acquired by dividing a sub-address comprising the lowest 8 bits. Herein, a sub-address addressing identification code is used to inform the slave device 220 whether a received part sub-address byte set is a sub-address comprising high sets or low sets.
Next, in Step S330, the master terminal transceiving controller 230 sequentially transfers each of the sub-address addressing identification codes and each of the corresponding part sub-address byte sets within each of a plurality of time periods for an addressing operation of the sub-address to the slave device 220. Referring to
In
Next, in
In light of the above description, after the second time period T2, the slave terminal transceiving controller 240 may acquired a complete sub-address by the received sub-address addressing identification code MADmsb and the corresponding part sub-address byte set SADmsb as well as the sub-address addressing identification code MADlsb and the corresponding part sub-address byte set SADlsb. In other words, an address operation of a sub-address performed to the slave device 220 may be easily accomplished.
It should also be mentioned that, when the first time period T1 starts, the master terminal transceiving controller 230 transfers a start bit 411 through the data line SDA and transfers a read/write identification bit 413 after transferring the sub-address addressing identification code MADmsb, and transfers a stop bit 417 before the first time period T1 stops. The slave terminal transceiving controller 240 then transfers two acknowledge bits 414 and 416 to the master terminal transceiving controller 230 through the data line SDA after receiving the sub-address addressing identification code MADmsb and the part sub-address byte set SADmsb to notify the master terminal transceiving controller 230 that the sub-address addressing identification code MADmsb and the part sub-address byte set SADmsb are successfully transferred to the slave terminal transceiving controller 240.
Relatively, when the second time period T2 starts, the master terminal transceiving controller 230 transfers a start bit 421 through the data line SDA and transfers a read/write identification bit 423 after transferring the sub-address addressing identification code MADlsb, and transfers a stop bit 427 before the second time period T2 stops. The slave terminal transceiving controller 240 then transfers acknowledge bits 424 and 426 to the master terminal transceiving controller 230 through the data line SDA after receiving the sub-address addressing identification code MADlsb and the part sub-address byte set SADlsb to notify the master terminal transceiving controller 230 that the sub-address addressing identification code MADlsb and the part sub-address byte set SADlsb are successfully transferred to the slave terminal transceiving controller 240.
In light of the above description, when a bit Nb of a sub-address needs to be expanded, what is needed is to set enough sub-address addressing identification codes and to set corresponding part sub-address byte sets SADmsb and making them as a N pair, that is, from a part sub-address byte set SADmsb1 to a part sub-address byte set SADmsbn, more addressing operations of the sub-addresses to the slave device 220 can be performed effectively.
It should be noted that, when the master terminal transceiving controller 230 performs an addressing operation of a module address to the slave device 220, the master terminal transceiving controller 230 only needs to transfer a address data that is not a sub-address addressing identification code after a start bit, in a state that the slave terminal transceiving controller 240 receives and determines that a received address data is not a sub-address addressing identification code, the master terminal transceiving controller 230 recognizes the received address data as a module address, and the slave device 220 performs an addressing operation of the module address.
A plurality of practical examples are stated below to further describe in details the method of data transferring of the inter-integrated circuit interface according to embodiments of the invention for better comprehension and implementations by people of ordinary skill in the art.
Referring to
In addition, the slave device corresponds and responds to an acknowledgement bit 513 after receiving a part sub-address byte set, and the master device then corresponds and transfers a stop bit 514 after the acknowledgement bit 513 is responded.
Next, during the time period T2, after a start bit 521, the master terminal transceiving controller 230 transfers the sub-address addressing identification code MADlsb in binary code “1010000” and the read/write bit RW2 equivalent to “0” for performing a write-in operation of a sub-address having low sets. Next, after the slave device responds to an acknowledgement bit 522, the master device transfers a part sub-address byte set SADL in binary code “00110100” (0x34 in hexadecimal code), which is also a sub-address having low sets (equivalent to 0x1234). In the meantime, since the sub-address having high and low sets are written in the slave device without a hitch, the master terminal transceiving controller 230 transfers and writes a data DATA (equivalent to 0x56 in hexadecimal code) to the slave device after responding to an acknowledgement bit 523 through the data line SDA.
Lastly, the slave device responds to an acknowledgement 524 and confirms that a data write-in operation is completed, and the master terminal transceiving controller 230 responds and transfers a stop bit 525.
In addition, referring to
Referring to
In addition, the slave device corresponds and responds to an acknowledgement bit 533 after receiving the part sub-address byte set, and the master device then corresponds and transfers a stop bit 534 after the stop bit 533 is responded.
Next, during the time period T2, after a start bit 541, the master terminal transceiving controller 230 transfers the sub-address addressing identification code MADlsb in binary code “1010000” and the read/write bit RW2 equivalent to “0” through the data line SDA for performing a write-in operation to a sub-address having low sets. Next, after the slave device responds to an acknowledgement bit 542, the master device transfers the part sub-address byte set SADL in binary code “00110100” (0x34 in hexadecimal code), which is also a sub-address having low sets (equivalent to 0x1234).
After a write-in operation of a sub-address in the slave device is completed and after the slave device responds and transfers an acknowledgement bit 543, the master terminal transceiving controller 230 sequentially transfers a repeat start bit 544, a binary code “1010000” (equivalent to the sub-address addressing identification code MADlsb) and a read/write bit RW3 equivalent to “1” for performing a read operation to the sub-address 0x1234 of the slave device. The slave device responds to an acknowledgement bit 545 first and then transfers a read data DOUT, and after a field 546 of an unacknowledgement signal, the master terminal transceiving controller 230 transfers a stop bit 547.
It should be noted that, from the aforementioned implementation, when the master device performs multiple operations of data write-ins or data reads to the slave device, in a state that high (or low) sets of sub-addresses are not changed, operations of repeated write-ins are not required in corresponding to a part sub-address byte set of high (or low) sets of a sub-address. In this way, the efficiency of data transfer can be effectively increased.
Relatively, in terms of performing changes especially to high (or low) sets of the slave device, please referring to
Referring to
In summary, a sub-address addressing identification code is used in the invention to independently perform addressing operations of module addresses and sub-addresses. In other words, limitations to the module address are greatly reduced when sub-addresses expand, and expansion levels of sub-addresses can be even bigger and more flexible. Additionally, since each of part sub-address byte sets of a sub-address can be addressed respectively and independently, data transferring efficiency can be increased when performing multiple operations of data write-ins or data readings.
Although the invention has been disclosed by the above embodiments, they are not intended to limit the invention. It will be apparent to people of ordinary skill in the art that modifications and variations to the invention may be made without departing from the spirit and the scope of the invention. Accordingly, the protection scope of the invention falls in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
101114200 | Apr 2012 | TW | national |