CN103473206B - A kind of data transmission method and I2C Interface Extender - Google Patents
A kind of data transmission method and I2C Interface Extender Download PDFInfo
- Publication number
- CN103473206B CN103473206B CN201310425374.3A CN201310425374A CN103473206B CN 103473206 B CN103473206 B CN 103473206B CN 201310425374 A CN201310425374 A CN 201310425374A CN 103473206 B CN103473206 B CN 103473206B
- Authority
- CN
- China
- Prior art keywords
- switch
- control signal
- interface
- controller
- control
- 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.)
- Expired - Fee Related
Links
Abstract
The embodiment of the invention discloses a kind of data transmission method and I2C Interface Extender, in the embodiment of the present invention, data transmission method includes: controller sends the first control signal to the switch being connected with controller, first control signal switches on-off for control, when the switch is closed, controller sends the second control signal by switch to the I2C interface being connected with switch, second control signal is for controlling the I2C device being connected with I2C interface, described second control signal is transmitted to I2C device by I2C interface, achieve when switch conduction, controller can send the second control signal with the I2C interface that switch is connected to I2C device, avoid at the mutually simultaneous communication contention aware of I2C address of devices.
Description
Technical field
The present invention relates to the communications field, particularly relate to a kind of data transmission method and I2C Interface Extender.
Background technology
In order to improve compatibility and the extensibility ability of system, with I2C(Inter-Integrated
Circuit) embedded system of bus goes out I2C bus extension, passes through between control module and I2C device
External cable is attached, it is possible to realize various different function by connecting different I2C devices.
But in the prior art, control module accesses I2C device by I2C address of devices,
If the situation that multiple I2C address of devices is identical occurs in a system, the I2C of system can be caused to lead to
Letter conflict.
Summary of the invention
The present invention provides a kind of data transmission method and I2C Interface Extender, it is possible to avoid at I2C device
The mutually simultaneous communication contention aware in address.
The data transmission method that the embodiment of the present invention provides, including: controller is to leaving of being connected with controller
Closing and send the first control signal, the first control signal switches on-off for control, when the switch is closed,
Controller sends the second control signal, the second control signal by switch to the I2C interface being connected with switch
The I2C device being connected with I2C interface for control, I2C interface is by described second control signal transmission to I2C
Device.
The I2C Interface Extender that the embodiment of the present invention provides, including: the control of multiple input/output I/O mouths
Device processed, switch and I2C interface, controller is used for sending the first control signal and the second control signal,
First control signal switches on-off for control, and the second control signal is used for controlling I2C device, switch
The first end be connected with an I/O mouth in multiple I/O mouths of controller, the second end of switch connects with I2C
Mouthful be connected, switch for being turned on or off according to the first control signal, the of one end of I2C interface and switch
Two ends are connected, and the other end of I2C interface is connected with I2C device by cable, and I2C interface is used for transmission the
Two control signal to I2C device.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
In the embodiment of the present invention, controller sends the first control signal to the switch being connected with controller, the
One control signal switches on-off for control, when the switch is closed, controller by switch to switch
The I2C interface being connected sends the second control signal, and the second control signal is connected with I2C interface for control
I2C device, I2C interface by second control signal transmit to I2C device, it is achieved that when switch conduction,
Controller can send the second control signal by the I2C interface being connected with switch to I2C device, it is to avoid
At the mutually simultaneous communication contention aware of I2C address of devices.
Accompanying drawing explanation
Fig. 1 is one 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;
Fig. 3 is an embodiment schematic diagram of I2C Interface Extender in the embodiment of the present invention;
Fig. 4 is another embodiment schematic diagram of I2C Interface Extender in the embodiment of the present invention.
Detailed description of the invention
The embodiment of the present invention provides a kind of data transmission method and I2C Interface Extender, it is possible to avoid at I2C
The mutually simultaneous communication contention aware of address of devices.
Refer to Fig. 1, in the embodiment of the present invention, one embodiment of data transmission method includes:
101, controller sends the first control signal to the switch being connected with controller;
In the present embodiment, this first control signal switches on-off for control.
102, when the switch is closed, controller sends second by switch to the I2C interface being connected with switch
Control signal;
In the present embodiment, when switch conduction, controller can be sent out to I2C interface by the switch of conducting
Sending the second control signal, wherein this second control signal is for controlling the I2C device being connected with I2C interface,
The concrete function of this I2C device does not limits, and can select according to the I2C system at I2C device place
The I2C device of difference in functionality, such as, I2C device can be temperature collect module, and the second control signal can
For controlling temperature collect module collecting temperature value.
103, described second control signal is transmitted to I2C device by I2C interface.
In the present embodiment, I2C interface can be by the second control signal transmission to coupled I2C device.
In the present embodiment, controller sends the first control signal, the first control to the switch being connected with controller
Signal processed switches on-off for control, and when the switch is closed, controller is connected to switch by switch
I2C interface send the second control signal, the second control signal is for controlling the I2C that is connected with I2C interface
Device, described second control signal is transmitted to I2C device by I2C interface, it is achieved that when switch conduction,
Controller can send the second control signal by the I2C interface being connected with switch to I2C device, it is to avoid
At the mutually simultaneous communication contention aware of I2C address of devices.
In order to make it easy to understand, the following data transmission method with an instantiation to the embodiment of the present invention enters
Line description, refers to Fig. 2, and in the embodiment of the present invention, another embodiment of data transmission method includes:
201, controller receives control instruction from the I2C device control module being connected with controller;
202, controller sends the first control signal according to control instruction to the switch being connected with controller;
In the present embodiment, first controller receives control instruction from coupled I2C device control module,
Then the first control signal, the first control signal are sent according to control instruction to the switch being connected with controller
Switching on-off for controlling, wherein, when the first control signal is high level, switch conduction, when the
When one control signal is low level, switching off, in actual applications, controller can connect multiple opening
Closing, control instruction may be used for informing which switch controller selects and send which kind of electricity to selected switch
The first flat control signal, in actual applications, this controller can be PCF8574 device, and switch can
Think SN74CBT3257 device.
It should be noted that this switch includes at least two input and two outputs.
203, controller receives the second control signal from I2C device control module;
204, when the switch is closed, controller sends second by switch to the I2C interface being connected with switch
Control signal;
In the present embodiment, after controller receives control instruction, controller can control from I2C device
Module receives the second control signal, and the most in step 202., switch receives the first control signal for height
During level, switch conduction, now controller switching to the I2C interface being connected with switch by this conducting
Sending the second control signal, wherein the second control signal is for controlling the I2C device being connected with I2C interface,
In actual applications, different according to the kind selecting switch, switch can be connected with multiple I2C interfaces,
The most each I2C interface and an I2C device are connected, and now controller reception control instruction includes from this
Which output transmission of switch, this controller sends the first control letter according to this control instruction received
Number to this switch, wherein the first control signal includes which output turning on this switch, such as, one
Switch includes that output terminals A and output B, output terminals A are connected with I2C interface A, output B and I2C
Interface B is connected, and now controller reception control instruction includes transmitting from the output terminals A of this switch, then open
Close the first control signal of receiving and include turning on the output terminals A of this switch, then receive the when switch
During two control signals, this second control signal is transmitted to I2C interface A by this switch by output terminals A.
205, the second control signal is transmitted to I2C device by I2C interface.
In the present embodiment, when, after I2C interface to the second control signal, I2C interface controls letter by second
Number transmission is to the most coupled I2C device so that I2C device can be according to the second control letter received
Number perform corresponding operation.
In the present embodiment, controller receives control instruction from the I2C device control module being connected with controller,
Controller sends the first control signal according to control instruction to the switch being connected with controller, and controller is from I2C
Device control module receives the second control signal, when the switch is closed, controller by switch to switch
The I2C interface being connected sends the second control signal, and the second control signal is transmitted to I2C device by I2C interface,
Achieving when switch conduction, I2C device can be sent out by controller by the I2C interface being connected with switch
Send the second control signal, it is to avoid at the mutually simultaneous communication contention aware of I2C address of devices, simultaneously can root
Select the I2C interface of varying number according to the scale of the system at controller place, and then go for not
System with scale.
Below the I2C Interface Extender of the embodiment of the present invention for performing above-mentioned data transmission method is entered
Row explanation, its basic logical structure is with reference to Fig. 3, I2C Interface Extender one enforcement in the embodiment of the present invention
Example includes: the controller 301 of multiple input/output (I/O, Input/Output) mouth, switch 302 and
I2C interface 303;
Controller 301 is for sending the first control signal and the second control signal, and the first control signal is used for
Controlling the break-make of switch 302, the second control signal is used for controlling I2C device;
First end of switch 302 is connected with an I/O mouth in multiple I/O mouths of controller, switchs 302
The second end be connected with I2C interface 303, switch 302 is for being turned on or off according to the first control signal;
One end of I2C interface 303 is connected with the second end of switch, and the other end of I2C interface 303 passes through line
Cable is connected with I2C device, and I2C interface 303 controls signal to I2C device for transmission second.
In the present embodiment, controller 301 for sending the first control signal and the second control signal, first
Control signal is for controlling to switch the break-make of 302, and the second control signal is used for controlling I2C device, switch
First end of 302 is connected with an I/O mouth in multiple I/O mouths of controller, the second end of switch 302
Being connected with I2C interface 303, switch 302 is used for being turned on or off according to the first control signal, I2C interface
One end of 303 is connected with the second end of switch, and the other end of I2C interface 303 is by cable and I2C device
Being connected, I2C interface 303 controls signal to I2C device for transmission second, it is achieved that when switch conduction,
Controller 301 can send second by the I2C interface 303 being connected with switch 302 to I2C device and control
Signal processed, it is to avoid at the mutually simultaneous communication contention aware of I2C address of devices.
In order to be better understood from the above embodiments, below with controller as PCF8574, switch and be
Specific embodiment as a example by SN74CBT3257 is mutual to each element that I2C Interface Extender includes
Data interactive mode in I2C Interface Extender is illustrated, refers to Fig. 4, including:
PCF8574 device 401, multiple SN74CBT3257 device 402 and multiple I2C interface 403.
For convenience of explanation, the present embodiment only passes through one with a PCF8574 device 401
SN74CBT3257 device 402 is connected with an I2C interface 403 and illustrates.
The I2C EBI of PCF8574 device 401 is by I2C bus I2C device control module (figure
Not shown in) be connected, in actual applications, I2C bus includes serial clock (SCL, serial clock)
Line and serial data (SDA, serial data) line, PCF8574 device 401 is received by I2C bus
The control instruction that I2C device control module sends, in 8 I/O mouths of PCF8574 device 401
The pin being used for switching switching signal of I/O mouth and a SN74CBT3257 device 402 is connected,
PCF8574 device 401 can be according to the control instruction received to the use of SN74CBT3257 device 402
Pin in switching switching signal sends the first control signal, and wherein, this first control signal is used for controlling
The break-make of SN74CBT3257 device 402, such as PCF8574 device 401 successively output the first control letter
Number 0x00 and the first control signal 0x80, represent and drawn by the level of the highest order of PCF8574 device 401
Low setting high, now low 7 states of PCF8574 device 401 keep constant, SN74CBT3257 device again
Part 402 is switched to conducting according to the first control signal 0x00 and the first control signal 0x80 from disconnection,
In actual application, PCF8574 device 401 can connect 8 SN74CBT3257 devices 402, controls
Instruction may be used for informing PCF8574 device 401 select which SN74CBT3257 device 402 and to
Selected SN74CBT3257 device 402 sends the first control signal of which kind of level.
PCF8574 device 401 receives, by I2C bus, the second control that I2C device control module sends
Signal, the input of SN74CBT3257 device 402 is connected with I2C bus, when PCF8574 device
401 to SN74CBT3257 device 402 send the first control signal be high level time, PCF8574 device
Part 401 can send the second control signal to SN74CBT3257 device 402, wherein by I2C bus
Second control signal is for controlling the I2C device (not shown) being connected with I2C interface 403.
The output of SN74CBT3257 device 402 is connected with one end of I2C interface 403,
SN74CBT3257 device 402 by the output that is connected with I2C interface 403 to 403, I2C interface
Sending the second control signal, in actual applications, SN74CBT3257 device 402 can connect 4 I2C
Interface 403, now PCF8574 device 401 receives control instruction and includes from this SN74CBT3257 device
Which output transmission of 402, this PCF8574 device 401 sends according to this control instruction received
First controls signal to SN74CBT3257 device 402, and wherein the first control signal includes conducting
Which output of SN74CBT3257 device 402, in actual applications, SN74CBT3257 device
402 include four outputs (such as, output terminals A, output B, output C and output D),
The output terminals A presetting SN74CBT3257 device 402 is connected with I2C interface A, output B and I2C
Interface B is connected, and now PCF8574 device 401 receives control instruction and includes from SN74CBT3257 device
The output terminals A transmission of part 402, then the first control signal that SN74CBT3257 device 402 receives
Including the output terminals A of conducting SN74CBT3257 device 402, when SN74CBT3257 device 402 connects
When receiving the second control signal, this second control signal is passed through output by SN74CBT3257 device 402
A transmits to I2C interface A.
If it should be noted that select the switch of other model, the first end of this switch is many with controller
An I/O mouth in individual I/O mouth is connected, and the second end of this switch is connected with I2C interface, the of this switch
Three ends are connected with I2C bus.
After I2C interface 403 receives the second control signal, by the second control signal transmission to coupled
I2C device so that I2C device can perform corresponding operation according to the second control signal received.
It should be noted that owing to a piece of PCF8574 device 401 has eight I/O mouths, 8 i.e. can be exported
Individual control signal, so 8 SN74CBT3257 devices 402 at most can be controlled, and a piece of
SN74CBT3257 device 402 can connect 4 I2C interfaces 403, so a piece of PCF8574 device
401 at most can connect 32 I2C interfaces 403, in the case of the address of I2C device is the same from,
8 identical I2C devices in I2C address can be connected at least.PCF8574 device 401 has 3 not
With the pin of address, and select address by drop-down on non-essential resistance, according to syntagmatic, at one
9 PCF8574 devices 401, the I2C Interface Extender of the present embodiment at most can be connected in I2C bus
At most can connect the I2C device of 288 different addresses, 72 identical address can be connected at least
I2C device, certain those skilled in the art can also select the controller of other models and include at least two
Input and the switch of two outputs.
In the present embodiment, PCF8574 device 401 sends the first control signal and the second control signal, the
One control signal is for controlling the break-make of SN74CBT3257 device 402, and the second control signal is used for controlling
I2C device, pin and the PCF8574 device for switching switching signal of SN74CBT3257 device 402
An I/O mouth in multiple I/O mouths of part 401 is connected, the output of SN74CBT3257 device 402
Be connected with I2C interface 403, SN74CBT3257 device 402 for according to the first control signal conducting or
Disconnecting, one end of I2C interface 403 is connected with the second end of switch, and the other end of I2C interface 403 passes through
Cable is connected with I2C device, and I2C interface 403 controls signal to I2C device for transmission second, it is achieved
When SN74CBT3257 device 402 turns on, PCF8574 device 401 can by with
The I2C interface 403 that SN74CBT3257 device 402 is connected sends the second control signal to I2C device,
Avoid at the mutually simultaneous communication contention aware of I2C address of devices.
Those skilled in the art is it can be understood that arrive, and for convenience and simplicity of description, above-mentioned retouches
The specific works process of the system stated, device and unit, is referred to the correspondence in preceding method embodiment
Process, does not repeats them here.
The above, above example only in order to technical scheme to be described, is not intended to limit;
Although being described in detail the present invention with reference to previous embodiment, those of ordinary skill in the art should
Work as understanding: the technical scheme described in foregoing embodiments still can be modified by it, or to it
Middle part technical characteristic carries out equivalent;And these amendments or replacement, do not make appropriate technical solution
Essence depart from various embodiments of the present invention technical scheme spirit and scope.
Claims (5)
1. a data transmission method, it is characterised in that including:
Controller sends the first control signal to the switch being connected with described controller, and described first controls letter
Switch on-off described in number being used for controlling;
When described switch conduction, described controller passes through described switch to the I2C being connected with described switch
Interface sends the second control signal, and described second control signal is connected with described I2C interface for control
I2C device;
Described I2C interface is by described second control signal transmission extremely described I2C device;
Described controller sends the concrete steps bag of the first control signal to the switch being connected with described controller
Include:
Described controller receives control instruction from the described I2C device control module being connected with described controller;
Described controller sends the first control according to described control instruction to the switch being connected with described controller
Signal;
Described controller sends the second control letter by described switch to the I2C interface being connected with described switch
Step before number includes:
Described controller receives described second control signal from described I2C device control module.
Method the most according to claim 1, it is characterised in that
When described first control signal is high level, described switch conduction;
When described first control signal is low level, described in switch off.
3. an I2C Interface Extender, it is characterised in that including:
The controller of multiple input/output I/O mouths, switch and I2C interface;
Described controller is for sending the first control signal and the second control signal, described first control signal
Switching on-off for control, described second control signal is used for controlling I2C device;
First end of described switch is connected with an I/O mouth in multiple I/O mouths of described controller, described
Second end of switch is connected with described I2C interface, and described switch is for leading according to described first control signal
On-off is opened;
One end of described I2C interface is connected with the second end of described switch, the other end of described I2C interface
Being connected with described I2C device by cable, described I2C interface is used for transmitting described second and controls signal to
Described I2C device;
The I2C interface of described controller is connected with I2C device control module by I2C bus, described control
Device processed is additionally operable to receive the control instruction that described I2C device control module sends, and refers to according to described control
Make and send described first control signal to described switch;
Described controller, is additionally operable to receive described second control signal from described I2C device control module,
And described second control signal is forwarded to described I2C by described switch and the described I2C interface of conducting
Device.
I2C Interface Extender the most according to claim 3, it is characterised in that when described first
When control signal is high level, described switch conduction;
When described first control signal is low level, described in switch off.
5. according to the I2C Interface Extender according to any one of claim 3 to 4, it is characterised in that
Described controller is PCF8574 device, and described switch is SN74CBT3257 device;
Described in an I/O mouth in multiple I/O mouths of described PCF8574 device and one
The pin being used for switching switching signal of SN74CBT3257 device is connected;
The input of described SN74CBT3257 device is connected with described I2C bus, described
The output of 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 CN103473206A (en) | 2013-12-25 |
CN103473206B true 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) |
Families Citing this family (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 |
CN112463691B (en) * | 2020-12-04 | 2024-04-02 | 威创集团股份有限公司 | 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 |
Also Published As
Publication number | Publication date |
---|---|
CN103473206A (en) | 2013-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8762587B2 (en) | Data acquisition card, expansion control system for data acquisition card and method thereof | |
US10998737B2 (en) | Intelligent switch system | |
CN103248526A (en) | Communication equipment and method for achieving out-of-band monitoring and management, and master-slave switching method | |
CN103473206B (en) | A kind of data transmission method and I2C Interface Extender | |
CN108292990A (en) | Communication system and communication means | |
CN105159860A (en) | Inter-integrated circuit (IIC) extended system and method | |
TW201810860A (en) | Battery charging apparatus and charging system | |
CN201207647Y (en) | Two-wire system non-polarity master-slave type communication transceiver | |
CN105425669A (en) | Communication interface circuit and control method thereof, and household electrical appliance using same | |
US20060253744A1 (en) | Fibre selective control switch system | |
CN103916105A (en) | Apparatus for converting terminal polarity for rs communication | |
CN104464617A (en) | Parallel display system and display devices thereof | |
CN214225912U (en) | Serial port level internal selection switching equipment and system | |
CN102075398A (en) | Air conditioner and communication method thereof | |
CN106502911B (en) | Multi-terminal access device | |
CN109379278B (en) | Adapter and adaptation regulation and control system | |
CN103229158A (en) | Control circuit and control method for inter-integrated circuit bus | |
CN102609388B (en) | Slave node circuit, communication method and communication device | |
CN105607542A (en) | Output interface equipment | |
CN102545953B (en) | UART (Universal Asynchronous Receiver/Transmitter) function extension circuit and control method thereof | |
CN108701104B (en) | Data transmission system, projector, and data transmission method | |
CN104052456B (en) | Circuit for two-way communication | |
US20100250804A1 (en) | Method for ic communication system | |
US10983938B2 (en) | Field bus system for driving power outputs | |
CN102447601B (en) | S-bus monobus communicating circuit |
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 | ||
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. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160817 Termination date: 20210917 |