CN103473206A - Data transmission method and I2C (Inter-Integrated Circuit) interface extender - Google Patents
Data transmission method and I2C (Inter-Integrated Circuit) interface extender Download PDFInfo
- Publication number
- CN103473206A CN103473206A CN2013104253743A CN201310425374A CN103473206A CN 103473206 A CN103473206 A CN 103473206A CN 2013104253743 A CN2013104253743 A CN 2013104253743A CN 201310425374 A CN201310425374 A CN 201310425374A CN 103473206 A CN103473206 A CN 103473206A
- Authority
- CN
- China
- Prior art keywords
- control signal
- switch
- interface
- controller
- pcf8574
- 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.)
- Granted
Links
Images
Landscapes
- Small-Scale Networks (AREA)
- Information Transfer Systems (AREA)
Abstract
The embodiment of the invention discloses a data transmission method and an I2C (Inter-Integrated Circuit) interface extender. The data transmission method provided by the embodiment of the invention comprises the steps that (1) a controller sends a first control signal to a switch connected with the controller, wherein the first control signal is used for controlling the connection/disconnection of the switch; (2) when the switch is connected, the controller sends a second control signal to I2C interfaces connected with the switch through the switch, wherein the second control signal is used for controlling I2C components connected with the I2C interfaces; (3) the I2C interfaces enable the second control signal to be transmitted to the I2C components, thereby realizing that the controller can send the second control signal to the I2C components together with the I2C interfaces connected with the switch when the switch is connected; therefore, communication conflict occurring in the situation of the same I2C component addresses is prevented.
Description
Technical field
The present invention relates to the communications field, relate in particular to a kind of data transmission method and I2C Interface Expanding device.
Background technology
For compatibility and the extensibility ability that improves system, with I2C(Inter-Integrated Circuit) embedded system of bus expands away the I2C bus, be connected by External cable between control module and I2C device, and can be realized various function by connecting different I2C devices.
But in the prior art, control module visits the I2C device by the I2C address of devices, if the identical situation of a plurality of I2C address of devices occurs in a system, can cause the I2C communication contention aware of system.
Summary of the invention
The invention provides a kind of data transmission method and I2C Interface Expanding device, can avoid at the mutually simultaneous communication contention aware of I2C address of devices.
The data transmission method that the embodiment of the present invention provides, comprise: controller sends the first control signal to the switch be connected with controller, the first control signal is for the break-make of gauge tap, when switch conduction, controller sends the second control signal by switch to the I2C interface be connected with switch, the second control signal is for controlling the I2C device be connected with the I2C interface, and the I2C interface transfers to the I2C device by described the second control signal.
The I2C Interface Expanding device that the embodiment of the present invention provides, comprise: the controller of a plurality of I/O I/O mouths, switch and I2C interface, controller is for sending the first control signal and the second control signal, the first control signal is for the break-make of gauge tap, the second control signal is for controlling the I2C device, an I/O mouth in a plurality of I/O mouths of the first end of switch and controller is connected, the second end of switch is connected with the I2C interface, switch is used for according to the first control signal conducting or disconnection, one end of I2C interface is connected with the second end of switch, the other end of I2C interface is connected with the I2C device by cable, the I2C interface controls signal to the I2C device for transmitting second.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, controller sends the first control signal to the switch be connected with controller, the first control signal is for the break-make of gauge tap, when switch conduction, controller sends the second control signal by switch to the I2C interface be connected with switch, the second control signal is for controlling the I2C device be connected with the I2C interface, the I2C interface transfers to the I2C device by the second control signal, realized when switch conduction, controller can send the second control signal to the I2C device by the I2C interface be connected with switch, avoid at the mutually simultaneous communication contention aware of I2C address of devices.
The accompanying drawing explanation
Fig. 1 is embodiment schematic diagram of data transmission method in the embodiment of the present invention;
Fig. 2 is another embodiment schematic diagram of data transmission method in the embodiment of the present invention;
The embodiment schematic diagram that Fig. 3 is I2C Interface Expanding device in the embodiment of the present invention;
Another embodiment schematic diagram that Fig. 4 is I2C Interface Expanding device in the embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of data transmission method and I2C Interface Expanding device, can avoid at the mutually simultaneous communication contention aware of I2C address of devices.
Please refer to Fig. 1, in the embodiment of the present invention, embodiment of data transmission method comprises:
101, controller sends the first control signal to the switch be connected with controller;
In the present embodiment, this first control signal is for the break-make of gauge tap.
102,, when switch conduction, controller sends the second control signal by switch to the I2C interface be connected with switch;
In the present embodiment, when switch conduction, controller can send the second control signal to the I2C interface by the switch of conducting, wherein this second control signal is for controlling the I2C device be connected with the I2C interface, the concrete function of this I2C device is not done restriction, can select the I2C device of difference in functionality according to the I2C system at I2C device place, for example, the I2C device can be temperature collect module, and the second control signal can be for controlling temperature collect module collecting temperature value.
103, the I2C interface transfers to the I2C device by described the second control signal.
In the present embodiment, the I2C interface can transfer to the second control signal coupled I2C device.
In the present embodiment, controller sends the first control signal to the switch be connected with controller, the first control signal is for the break-make of gauge tap, when switch conduction, controller sends the second control signal by switch to the I2C interface be connected with switch, the second control signal is for controlling the I2C device be connected with the I2C interface, the I2C interface transfers to the I2C device by described the second control signal, realized when switch conduction, controller can send the second control signal to the I2C device by the I2C interface be connected with switch, avoid at the mutually simultaneous communication contention aware of I2C address of devices.
For the ease of understanding, below with an instantiation, in the data transmission method to the embodiment of the present invention, be described, refer to Fig. 2, in the embodiment of the present invention, another embodiment of data transmission method comprises:
201, controller receives steering order from the I2C device control module be connected with controller;
202, controller sends the first control signal according to steering order to the switch be connected with controller;
In the present embodiment, at first controller receives steering order from coupled I2C device control module, then send the first control signal according to steering order to the switch be connected with controller, the first control signal is for the break-make of gauge tap, wherein, when the first control signal is high level, switch conduction, when the first control signal is low level, switch disconnects, in actual applications, controller can connect a plurality of switches, which switch is steering order can select and send the first control signal of which kind of level to selected switch for informing controller, in actual applications, this controller can be the PCF8574 device, switch can be the SN74CBT3257 device.
It should be noted that, this switch comprises at least two input ends and two output terminals.
203, controller receives the second control signal from I2C device control module;
204,, when switch conduction, controller sends the second control signal by switch to the I2C interface be connected with switch;
In the present embodiment, after controller receives steering order, controller can receive the second control signal from I2C device control module, then in step 202, when switch receives the first control signal and is high level, switch conduction, this Time Controller sends the second control signal by the switch of this conducting to the I2C interface be connected with switch, wherein the second control signal is for controlling the I2C device be connected with the I2C interface, in actual applications, kind difference according to selector switch, switch can be connected with a plurality of I2C interfaces, now each I2C interface is connected with an I2C device, this Time Controller receives steering order and comprises which the output terminal transmission from this switch, this controller sends first according to this steering order received and controls signal to this switch, wherein the first control signal comprises which output terminal of this switch of conducting, for example, a switch comprises output terminals A and output terminal B, output terminals A is connected with I2C interface A, output terminal B is connected with I2C interface B, this Time Controller receives steering order and comprises the output terminals A transmission from this switch, the first control signal that switch receives comprises the output terminals A of this switch of conducting, then when switch receives the second control signal, this switch transfers to I2C interface A by this second control signal by output terminals A.
205, the I2C interface transfers to the I2C device by the second control signal.
In the present embodiment, after the I2C interface receives the second control signal, the I2C interface transfers to coupled I2C device by the second control signal, makes the I2C device to carry out corresponding operation according to the second control signal received.
In the present embodiment, controller receives steering order from the I2C device control module be connected with controller, controller sends the first control signal according to steering order to the switch be connected with controller, controller receives the second control signal from I2C device control module, when switch conduction, controller sends the second control signal by switch to the I2C interface be connected with switch, the I2C interface transfers to the I2C device by the second control signal, realized when switch conduction, controller can send the second control signal to the I2C device by the I2C interface be connected with switch, avoid at the mutually simultaneous communication contention aware of I2C address of devices, simultaneously can select according to the scale of the system at controller place the I2C interface of varying number, and then go for the system of different scales.
Below the I2C Interface Expanding device of the embodiment of the present invention for carrying out above-mentioned data transmission method described, its basic logical structure is with reference to figure 3, in the embodiment of the present invention, embodiment of I2C Interface Expanding device comprises: a plurality of I/O (I/O, Input/Output) controller 301 of mouth, switch 302 and I2C interface 303;
An I/O mouth in a plurality of I/O mouths of the first end of switch 302 and controller is connected, and the second end of switch 302 is connected with I2C interface 303, and switch 302 is for according to the first control signal conducting or disconnection;
One end of I2C interface 303 is connected with the second end of switch, and the other end of I2C interface 303 is connected with the I2C device by cable, and I2C interface 303 controls signal to the I2C device for transmitting second.
In the present embodiment, controller 301 is for sending the first control signal and the second control signal, the first control signal is for the break-make of gauge tap 302, the second control signal is for controlling the I2C device, an I/O mouth in a plurality of I/O mouths of the first end of switch 302 and controller is connected, the second end of switch 302 is connected with I2C interface 303, switch 302 is for according to the first control signal conducting or disconnection, one end of I2C interface 303 is connected with the second end of switch, the other end of I2C interface 303 is connected with the I2C device by cable, I2C interface 303 controls signal to the I2C device for transmitting second, realized when switch conduction, controller 301 can send the second control signal by the 303 pairs of I2C devices of I2C interface that are connected with switch 302, avoid at the mutually simultaneous communication contention aware of I2C address of devices.
In order better to understand the above embodiments, below take controller as PCF8574, switch is that the mutual of each element that specific embodiment that SN74CBT3257 is example comprises I2C Interface Expanding device describes the data interactive mode in I2C Interface Expanding device, refers to Fig. 4, comprising:
For convenience of description, the present embodiment only is connected and describes with an I2C interface 403 by a SN74CBT3257 device 402 with a PCF8574 device 401.
The I2C bus interface of PCF8574 device 401 is connected by I2C bus I2C device control module (not shown), in actual applications, the I2C bus comprises serial clock (SCL, serial clock) line and serial data (SDA, serial data) line, PCF8574 device 401 receives by the I2C bus steering order that I2C device control module sends, an I/O mouth in 8 I/O mouths of PCF8574 device 401 is connected with the pin for the change-over switch signal of a SN74CBT3257 device 402, PCF8574 device 401 can send the first control signal to the pin for the change-over switch signal of SN74CBT3257 device 402 according to the steering order received, wherein, this first control signal is for controlling the break-make of SN74CBT3257 device 402, for example PCF8574 device 401 is successively exported the first control signal 0x00 and the first control signal 0x80, expression drags down the level of the most significant digit of PCF8574 device 401 again and sets high, now low 7 states of PCF8574 device 401 remain unchanged, SN74CBT3257 device 402 is switched to conducting according to the first control signal 0x00 and the first control signal 0x80 from disconnection, in actual applications, PCF8574 device 401 can connect 8 SN74CBT3257 devices 402, which SN74CBT3257 device 402 is steering order can select and send the first control signal of which kind of level to selected SN74CBT3257 device 402 for informing PCF8574 device 401.
The output terminal of SN74CBT3257 device 402 is connected with an end of I2C interface 403, SN74CBT3257 device 402 sends the second control signal by the output terminal be connected with I2C interface 403 to I2C interface 403, in actual applications, SN74CBT3257 device 402 can connect 4 I2C interfaces 403, now PCF8574 device 401 reception steering orders comprise which the output terminal transmission from this SN74CBT3257 device 402, this PCF8574 device 401 sends first according to this steering order received and controls signal to SN74CBT3257 device 402, wherein the first control signal comprises which output terminal of conducting SN74CBT3257 device 402, in actual applications, SN74CBT3257 device 402 (for example comprises four output terminals, output terminals A, output terminal B, output terminal C and output terminal D), the output terminals A of default SN74CBT3257 device 402 is connected with I2C interface A, output terminal B is connected with I2C interface B, now PCF8574 device 401 reception steering orders comprise the output terminals A transmission from SN74CBT3257 device 402, the first control signal that SN74CBT3257 device 402 receives comprises the output terminals A of conducting SN74CBT3257 device 402, when SN74CBT3257 device 402 receives the second control signal, SN74CBT3257 device 402 transfers to I2C interface A by this second control signal by output terminals A.
It should be noted that, if select the switch of other model, an I/O mouth in a plurality of I/O mouths of the first end of this switch and controller is connected, and the second end of this switch is connected with the I2C interface, and the 3rd end of this switch is connected with the I2C bus.
After I2C interface 403 receives the second control signal, the second control signal is transferred to coupled I2C device, make the I2C device to carry out corresponding operation according to the second control signal received.
It should be noted that, because a slice PCF8574 device 401 has eight I/O mouths, can export 8 control signals, so can control at most 8 SN74CBT3257 devices 402, and a slice SN74CBT3257 device 402 can connect 4 I2C interfaces 403, so a slice PCF8574 device 401 can connect at most 32 I2C interfaces 403, in the situation that the address of I2C device is all identical, can connect at least 8 I2C devices that the I2C address is identical.PCF8574 device 401 has the pin of 3 different addresses, and by the drop-down address of selecting on non-essential resistance, according to syntagmatic, can connect at most 9 PCF8574 devices 401 on an I2C bus, the I2C Interface Expanding device of the present embodiment can connect at most the I2C device of 288 different addresses, the I2C device that can connect at least 72 identical address, those skilled in the art can also select the controller and the switch that comprises at least two input ends and two output terminals of other models certainly.
In the present embodiment, PCF8574 device 401 sends the first control signal and the second control signal, the first control signal is for controlling the break-make of SN74CBT3257 device 402, the second control signal is for controlling the I2C device, the pin for the change-over switch signal of SN74CBT3257 device 402 is connected with an I/O mouth of a plurality of I/O mouths of PCF8574 device 401, the output terminal of SN74CBT3257 device 402 is connected with I2C interface 403, SN74CBT3257 device 402 is for according to the first control signal conducting or disconnection, one end of I2C interface 403 is connected with the second end of switch, the other end of I2C interface 403 is connected with the I2C device by cable, I2C interface 403 controls signal to the I2C device for transmitting second, realized when 402 conducting of SN74CBT3257 device, PCF8574 device 401 can send the second control signal by the 403 pairs of I2C devices of I2C interface that are connected with SN74CBT3257 device 402, avoid at the mutually simultaneous communication contention aware of I2C address of devices.
The those skilled in the art can be well understood to, for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
The above, above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: its technical scheme that still can put down in writing aforementioned each embodiment is modified, or part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (9)
1. a data transmission method, is characterized in that, comprising:
Controller sends the first control signal to the switch be connected with described controller, and described the first control signal is for controlling the break-make of described switch;
When described switch conduction, described controller sends the second control signal by described switch to the I2C interface be connected with described switch, and described the second control signal is for controlling the I2C device be connected with described I2C interface;
Described I2C interface transfers to described I2C device by described the second control signal.
2. method according to claim 1, is characterized in that, the concrete steps that described controller sends the first control signal to the switch be connected with described controller comprise:
Described controller receives steering order from the described I2C device control module be connected with described controller;
Described controller sends the first control signal according to described steering order to the switch be connected with described controller.
3. method according to claim 1, is characterized in that, described controller sends the second control signal step before by described switch to the I2C interface be connected with described switch and comprises:
Described controller receives described the second control signal from described I2C device control module.
4. method according to claim 1, is characterized in that,
When described the first control signal is high level, described switch conduction;
When described the first control signal is low level, described switch disconnects.
5. an I2C Interface Expanding device, is characterized in that, comprising:
The controller of a plurality of I/O I/O mouths, switch and I2C interface;
Described controller is for sending the first control signal and the second control signal, and described the first control signal is for the break-make of gauge tap, and described the second control signal is for controlling the I2C device;
An I/O mouth in a plurality of I/O mouths of the first end of described switch and described controller is connected, and the second end of described switch is connected with described I2C interface, and described switch is for according to described the first control signal conducting or disconnection;
One end of described I2C interface is connected with the second end of described switch, and the other end of described I2C interface is connected with described I2C device by cable, and described I2C interface controls signal to described I2C device for transmitting described second.
6. I2C Interface Expanding device according to claim 5, is characterized in that,
The I2C interface of described controller is connected with I2C device control module by the I2C bus, the steering order that described controller also sends for receiving described I2C device control module, and send described the first control signal according to described steering order to described switch.
7. I2C Interface Expanding device according to claim 6, is characterized in that,
Described controller, also for from described I2C device control module, receiving described the second control signal, and described switch and the described I2C interface by conducting is forwarded to described I2C device by described the second control signal.
8. I2C Interface Expanding device according to claim 5, is characterized in that, when described the first control signal is high level, and described switch conduction;
When described the first control signal is low level, described switch disconnects.
9. according to the described I2C Interface Expanding of any one in claim 5 to 8 device, it is characterized in that, described controller is the PCF8574 device, and described switch is the SN74CBT3257 device;
An I/O mouth in a plurality of I/O mouths of described PCF8574 device is connected with the pin for the change-over switch signal of a described SN74CBT3257 device;
The input end of described SN74CBT3257 device is connected with described I2C bus, and the output terminal of described SN74CBT3257 device is connected with described I2C interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310425374.3A CN103473206B (en) | 2013-09-17 | 2013-09-17 | A kind of data transmission method and I2C Interface Extender |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310425374.3A CN103473206B (en) | 2013-09-17 | 2013-09-17 | A kind of data transmission method and I2C Interface Extender |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103473206A true CN103473206A (en) | 2013-12-25 |
CN103473206B CN103473206B (en) | 2016-08-17 |
Family
ID=49798065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310425374.3A Expired - Fee Related CN103473206B (en) | 2013-09-17 | 2013-09-17 | A kind of data transmission method and I2C Interface Extender |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103473206B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105278622A (en) * | 2014-11-25 | 2016-01-27 | 天津市英贝特航天科技有限公司 | Adapter card for 3U CPCI-E x8 bus interface |
CN107317737A (en) * | 2017-06-30 | 2017-11-03 | 深圳市亿威尔信息技术股份有限公司 | One kind is based on SMBus/I2The communication system of C buses |
WO2022116349A1 (en) * | 2020-12-04 | 2022-06-09 | 威创集团股份有限公司 | I2c-based line switching circuit and communication system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1851799A (en) * | 2005-04-22 | 2006-10-25 | 三星电子株式会社 | Display apparatus, control method thereof and communication system |
CN201508549U (en) * | 2009-09-02 | 2010-06-16 | 中兴通讯股份有限公司 | Device and system for controlling on-off of USB (universal serial bus) interface |
CN102281482A (en) * | 2011-07-11 | 2011-12-14 | 浙江大学 | Function extension method and device thereof for earphone jack of smart phone |
-
2013
- 2013-09-17 CN CN201310425374.3A patent/CN103473206B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1851799A (en) * | 2005-04-22 | 2006-10-25 | 三星电子株式会社 | Display apparatus, control method thereof and communication system |
CN201508549U (en) * | 2009-09-02 | 2010-06-16 | 中兴通讯股份有限公司 | Device and system for controlling on-off of USB (universal serial bus) interface |
CN102281482A (en) * | 2011-07-11 | 2011-12-14 | 浙江大学 | Function extension method and device thereof for earphone jack of smart phone |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105278622A (en) * | 2014-11-25 | 2016-01-27 | 天津市英贝特航天科技有限公司 | Adapter card for 3U CPCI-E x8 bus interface |
CN107317737A (en) * | 2017-06-30 | 2017-11-03 | 深圳市亿威尔信息技术股份有限公司 | One kind is based on SMBus/I2The communication system of C buses |
WO2022116349A1 (en) * | 2020-12-04 | 2022-06-09 | 威创集团股份有限公司 | I2c-based line switching circuit and communication system |
Also Published As
Publication number | Publication date |
---|---|
CN103473206B (en) | 2016-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3234788B1 (en) | DATA TRANSMISSION USING PCIe PROTOCOL VIA USB PORT | |
JP3939327B2 (en) | Data transmission and reception method, data transmission and reception device | |
CN108459982B (en) | Communication equipment and switching method of USB and serial port | |
CN103095855B (en) | I2C communication interface unit | |
US10468896B2 (en) | Intelligent switch system and control method | |
CN105159860A (en) | Inter-integrated circuit (IIC) extended system and method | |
CN107391419B (en) | Support general sequence busbar concentrator of many host computers and automobile-used host computer | |
US9753886B2 (en) | Communication on an I2C bus | |
US20090271557A1 (en) | Non-volatile memory storage device with high transmission rate | |
CN100383544C (en) | Method and apparatus for real-time monitoring level signal | |
CN105446930A (en) | Single selection end SPI (Serial Peripheral Interface) master-slave multi-machine bidirectional communication method | |
CN105094037B (en) | Expansion module for the programmable logic controller (PLC) using universal serial bus communications | |
CN103473206A (en) | Data transmission method and I2C (Inter-Integrated Circuit) interface extender | |
CN102629241B (en) | Isolation circuit of inter-integrated circuit (I2C) bus and I2C bus system | |
US9684619B2 (en) | I2C router system | |
CN102081586A (en) | Multiple I2C (Inter-IC) slot circuit system and method for transmitting I2C signal | |
WO2016078357A1 (en) | Master device, and method and system for managing slave devices by master device | |
CN102314404A (en) | I2C equipment communication circuit | |
CN102609388B (en) | Slave node circuit, communication method and communication device | |
CN103885910A (en) | Method and system for multiple devices for IIC communication in main mode | |
CN104683130A (en) | Method for configuring stacking port and equipment | |
CN103229158A (en) | Control circuit and control method for inter-integrated circuit bus | |
CN102545953B (en) | UART (Universal Asynchronous Receiver/Transmitter) function extension circuit and control method thereof | |
CN202189359U (en) | Multiplexing equipment | |
JP2006174352A (en) | Remote i/o module communication equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Kezhu road high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 233 510670 Patentee after: VTRON GROUP Co.,Ltd. Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No. Patentee before: VTRON TECHNOLOGIES Ltd. |
|
CP03 | Change of name, title or address | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160817 Termination date: 20210917 |
|
CF01 | Termination of patent right due to non-payment of annual fee |