CN1599343A - System and method for expanding I2C bus - Google Patents
System and method for expanding I2C bus Download PDFInfo
- Publication number
- CN1599343A CN1599343A CN 03157137 CN03157137A CN1599343A CN 1599343 A CN1599343 A CN 1599343A CN 03157137 CN03157137 CN 03157137 CN 03157137 A CN03157137 A CN 03157137A CN 1599343 A CN1599343 A CN 1599343A
- Authority
- CN
- China
- Prior art keywords
- bus
- clock switch
- clock
- output
- expansion
- 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
Landscapes
- Information Transfer Systems (AREA)
- Bus Control (AREA)
Abstract
The invention discloses a system and method for expanding I2C bus includes such steps as determining the device connected with I2C bus, connecting a clock line with determined and operated device, I2C bus read and write for the device. The system includes I2C controller for controlling read-write speration, multiple devices for connecting with the I2C controller through data line, clock switch and CPU.
Description
Technical field
The present invention relates to a kind of I
2C bus design technology specifically, the present invention relates to a kind of expansion I
2The system of C bus and expansion I
2The method of C bus is to realize a plurality of similar devices with identical address are carried out the function of read-write operation.
Background technology
I
2The C serial interface bus is the synchronous serial data transfer bus of Philips company definition, is used to read optical module, canned data in the devices such as EEPROM and real-time clock.Use in the circuit design of the network equipments such as router and Ethernet switch widely at present.
I
2The C serial interface bus is a kind of 2 line serial interface bus, and bus is divided into SDA (serial data line) and SCL (serial time clock line).Can articulate a plurality of devices on same bus, each device is distinguished by the address of devices of correspondence, and in bus, the address of similar device can not be identical, otherwise will cause bus collision, and read-write is unusual, can't finish corresponding function.
Yet in practical design, but usually run into such situation: have the identical similar device in a plurality of addresses in the veneer, the address of these similar devices can't change, as optical module, so just can't extract corresponding information, because plural similar device can be made simultaneously and replying, may damage device when serious.
The problems referred to above for occurring in the design can solve by complicated program, can realize distinguishing identical I by FPGA (Field Programmable Gate Array)
2The function of C bus address device.But its programming complexity needs software to come Simulation with I
2The C bus timing; And single board design cost height needs particular device to finish function corresponding.Therefore be necessary to provide a kind of to I
2The similar device of identical address carries out the new method of read-write operation on the C bus.
Summary of the invention
The present invention makes for the problems referred to above that solve the prior art existence.The purpose of this invention is to provide a kind of expansion I
2The method of C bus is to I
2The similar device of identical address carries out read-write operation on the C bus.
For achieving the above object, the invention provides a kind of expansion I
2The method of C bus may further comprise the steps:
1) definite and I
2Need the device operated in the device that the C bus links to each other;
2) connect the clock line that is connected with the fixed device that need operate;
3) device to the on clock line carries out I
2The read-write operation of C bus.
Described step 2) finishes by clock switch.The output of described clock switch is all closed when access failure corresponding clock line.Described clock switch is to realize by the triple gate that programmable logic device constitutes, when described clock switch is connected, and this clock switch clock signal, when described clock switch was closed, this clock switch was output as the high resistant signal.
This method also comprises the steps:
4) at described I
2After the read-write operation of C bus is finished, close the corresponding clock switch.
The present invention also provides a kind of I of expansion
2The C bus system comprises:
I
2The C controller, to I
2The read-write operation of the device that the C bus connects is controlled;
A plurality of by data wire and described I
2The I that the C controller connects
2The C device;
The clock switch group is connected respectively with described a plurality of devices by the corresponding clock line; And
CPU is used for definite described a plurality of devices of needs and wants operated device, and controls described clock switch and only connect the pairing clock switch of clock line that links to each other with the device of determining to operate.
Method and system of the present invention is realized simple, and technical difficulty is little, and cost is low, can simplify the design of veneer, and saves manufacturing cost.
Description of drawings
Fig. 1 is a principle schematic of the present invention;
Fig. 2 is the read-write operation flow chart of one embodiment of the present of invention.
Embodiment
As shown in Figure 1, expansion I of the present invention
2The C bus system comprises: I
2C controller, clock switch group, CPU and a plurality of I
2The C device.
In embodiments of the invention, I
2The C controller is meant I
2Control appliance in the C bus protocol, be used for to I
2The read-write operation of the device that the C bus connects is controlled.I
2The C controller provides SDA data wire and clock line.The clock switch group is by SCL clock line and I
2The C controller connects, and under the control of CPU to I
2The C bus clock is controlled.In addition, I
2The SDA data wire of C controller is directly linked n I
2On the C device, realize the reading and writing data function.
The clock switch group is according to I
2N SCL1 of clock line branch of SCL clock line output of C controller, SCL2...SCLn is respectively with corresponding I
2The C device connects.CPU determines the device that will operate in a plurality of devices, and to clock switch group output control signal, and the clock switch group is connected the switch of respective devices according to control signal, then by I
2The C controller carries out read-write operation to the device of correspondence.
The clock switch group can realize in several ways.Preferably realize by programmable logic device.The principle of its realization is to simulate triple gate by programming device, and clock signal when door is opened, door are output as the high resistant signal when closing.Corresponding triple gate is controlled by the register that CPU writes programmable logic device.Described programmable logic device can be known programmable logic device, for example EPM7256.
Clock switch group with one four port is an example below, and the program circuit of programmable logic device design is described.The first step, determine the corresponding relation of programming device general purpose I/O pin and input and output, the input that a pin is set is SCL, the output clock SCL1 that four pins are clock switch is to SCL4, utilize the data wire of other pins and cpu bus simultaneously, address wire is connected with control line.In second step, at one four bit register of programmable logic device indoor design, the register initial value is " 0000 ", and each bit is corresponding and a clock output.Corresponding bit is opened switch for ' 1 ' time, and off switch for ' 0 ' time is judged the device of operating according to the value of register, and exported accordingly.Like this, in the time of operating device 1, just the value with register is written as " 0001 ", SCL1 output this moment SCL clock, other pins SCL2, SCL3 and SCL4 output high-impedance state, after operation is finished, the value of register is write back to " 0000 ", this moment, all output SCL1 exported high-impedance state to SCL4.If operated device 2 is written as register " 0010 " so, also the rest may be inferred to the operation of other device.
Below in conjunction with Fig. 2 method of the present invention is described in detail.As shown in Figure 2, if to I
2C device 1 carries out read-write operation, and at first by the definite device that need operate of CPU, for integrated system, described CPU can be the CPU of the network equipment.And for distributed system, described CPU is the CPU of veneer.CPU control clock switch is connected clock line SCL1 then, and other clock lines are closed.The clock switch of promptly controlling clock line SCL1 is output as bus clock, and the clock switch of controlling other clock line is output as high-impedance state.Has only I so this moment
2The request of 1 pair of controller of C device gives a response, other device output high-impedance state, to the operation of device 1 without any influence.After read-write operation was finished, clock switch was closed the corresponding clock switch, and the clock switch that control clock line SCL1 this moment is output as high-impedance state.When any clock switch of access failure, all clock outputs all are (promptly being high-impedance state) of closing.At this moment can not carry out read-write operation.
More than the present invention is described in detail, but those of ordinary skill in the art is to be appreciated that, under situation about not departing from the scope of the present invention with spirit, various improvement, interpolation and replacement all are possible, and all in claim of the present invention institute restricted portion.
Claims (10)
1. expand I for one kind
2The method of C bus may further comprise the steps:
1) definite and I
2Need the device operated in the device that the C bus links to each other;
2) connect the clock line that is connected with the fixed device that need operate;
3) device to the on clock line carries out I
2The read-write operation of C bus.
2. expansion I according to claim 1
2The method of C bus is characterized in that the connection of described clock line is controlled by clock switch.
3. expansion I according to claim 2
2The method of C bus is characterized in that the output of described clock switch is all closed when access failure corresponding clock line.
4. method according to claim 2 is characterized in that, further comprises:
4) at described I
2After the read-write operation of C bus is finished, close the corresponding clock switch.
5. method according to claim 2 is characterized in that, when described clock switch is connected, and this clock switch clock signal, when described clock switch was closed, this clock switch was output as the high resistant signal.
6. according to each described method of claim 1-5, it is characterized in that when described clock switch was closed, the output of corresponding device was high-impedance state, and when described clock switch was connected, corresponding device carried out read-write operation.
7. the I of an expansion
2The C bus system is characterized in that comprising:
I
2The C controller, to I
2The read-write operation of the device that the C bus connects is controlled;
A plurality of by data wire and described I
2The device that the C controller connects;
The clock switch group comprises one group of clock switch, and each clock switch is connected respectively with described a plurality of devices by the corresponding clock line; And
CPU is used for definite described a plurality of devices of needs and wants operated device, and controls described clock switch and only connect the pairing clock switch of clock line that links to each other with the device of determining to operate.
8. expansion I according to claim 7
2The system of C bus is characterized in that, described clock switch group realizes by programmable logic device.
9. expansion I according to claim 8
2The system of C bus is characterized in that, described programmable logic device is simulated one group of triple gate, and when a certain clock switch was connected in the described clock switch group, its output signal equaled input signal; When it was closed, it was output as the high resistant signal.
10. according to claim 7,8 or 9 described expansion I
2The system of C bus is characterized in that, the output of the device that links to each other with the clock switch of closing in the described clock switch group is high-impedance state, and the device that links to each other with the clock switch of connecting in the described clock switch group can respond I
2The request of C bus control unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB031571379A CN100353718C (en) | 2003-09-16 | 2003-09-16 | System and method for expanding I2C bus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB031571379A CN100353718C (en) | 2003-09-16 | 2003-09-16 | System and method for expanding I2C bus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1599343A true CN1599343A (en) | 2005-03-23 |
CN100353718C CN100353718C (en) | 2007-12-05 |
Family
ID=34660211
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB031571379A Expired - Fee Related CN100353718C (en) | 2003-09-16 | 2003-09-16 | System and method for expanding I2C bus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100353718C (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101398801B (en) * | 2008-10-17 | 2010-06-02 | 北京星网锐捷网络技术有限公司 | Method and device for expanding internal integrate circuit bus |
CN101324875B (en) * | 2007-06-11 | 2011-06-01 | 大唐移动通信设备有限公司 | Method and apparatus for expanding I<2>C bus |
CN105279130A (en) * | 2015-10-22 | 2016-01-27 | 北方工业大学 | Method for operating multiple I2C devices with same address |
US9921835B2 (en) | 2014-03-24 | 2018-03-20 | Inesc Tec—Instituto De Engenharia De Sistemas E Computadores, Tecnologia E Ciã?Ncia | Control module for multiple mixed-signal resources management |
CN108255760A (en) * | 2017-12-25 | 2018-07-06 | 北京摩高科技有限公司 | A kind of multipath I 2 C system and data read-write method |
US10185563B2 (en) | 2014-03-24 | 2019-01-22 | Inesc Tec—Instituto De Engenharia De Sistemas E | Control module for multiple mixed-signal resources management |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4554657A (en) * | 1982-06-07 | 1985-11-19 | Ltv Aerospace And Defense Company | Multiplexed multiplex bus |
US6061756A (en) * | 1995-11-20 | 2000-05-09 | Advanced Micro Devices, Inc. | Computer system which performs intelligent byte slicing/data packing on a multi-byte wide bus |
CN2424494Y (en) * | 2000-03-31 | 2001-03-21 | 上海华申智能卡应用系统有限公司 | Bus-driving intelligence card reading/writing device |
-
2003
- 2003-09-16 CN CNB031571379A patent/CN100353718C/en not_active Expired - Fee Related
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101324875B (en) * | 2007-06-11 | 2011-06-01 | 大唐移动通信设备有限公司 | Method and apparatus for expanding I<2>C bus |
CN101398801B (en) * | 2008-10-17 | 2010-06-02 | 北京星网锐捷网络技术有限公司 | Method and device for expanding internal integrate circuit bus |
US9921835B2 (en) | 2014-03-24 | 2018-03-20 | Inesc Tec—Instituto De Engenharia De Sistemas E Computadores, Tecnologia E Ciã?Ncia | Control module for multiple mixed-signal resources management |
US10185563B2 (en) | 2014-03-24 | 2019-01-22 | Inesc Tec—Instituto De Engenharia De Sistemas E | Control module for multiple mixed-signal resources management |
CN105279130A (en) * | 2015-10-22 | 2016-01-27 | 北方工业大学 | Method for operating multiple I2C devices with same address |
CN108255760A (en) * | 2017-12-25 | 2018-07-06 | 北京摩高科技有限公司 | A kind of multipath I 2 C system and data read-write method |
Also Published As
Publication number | Publication date |
---|---|
CN100353718C (en) | 2007-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6769078B2 (en) | Method for isolating an I2C bus fault using self bus switching device | |
US7085863B2 (en) | I2C device including bus switches and programmable address | |
EP1358564B1 (en) | System having i2c self bus switching devices | |
US6745270B1 (en) | Dynamically allocating I2C addresses using self bus switching device | |
JP2000231534A (en) | Plural memory storage devices and data bus structure to be used together with driver/receiver technique and method for operating the same structure | |
US6636904B2 (en) | Dynamic PCI device identification redirection on a configuration space access conflict | |
CN100559312C (en) | Programmable logic controller device | |
CN1599343A (en) | System and method for expanding I2C bus | |
CN1957342A (en) | Digital interface supporting internal and external USB transceivers | |
JPWO2005001689A1 (en) | Electronic computer, semiconductor integrated circuit, control method, program generation method, and program | |
US20100005284A1 (en) | Device having shared memory and method for transferring code data | |
CN2368081Y (en) | Protection card for hard-disc of computer | |
CN1357833A (en) | One-step debugging card unit with PCJ interface and its operation process | |
CN1619517A (en) | Multichannel internal integrated circuit | |
CN1290016C (en) | Device used in internal circuit simulator system and its internal storage access method | |
EP0382342B1 (en) | Computer system DMA transfer | |
US20010039608A1 (en) | Architecture and configuring method for a computer expansion board | |
CN1206879A (en) | Interconnection bridge for external parts | |
CN1564141A (en) | Attribute setup method for computer hard disk zoning, and its appliance | |
CN2556789Y (en) | Wiring bumper circuit | |
CN101520762B (en) | Method, system and device for controlling multipath serial bus | |
CN101067778A (en) | High access efficiency interface circuit and method | |
CN1460931A (en) | Control circuit for testing high internal memory address and its control method | |
JP2000284859A (en) | Connecting device utilizing pci bus and information display device utilizing the same | |
JPH0290354A (en) | Bus extension system for programmable controller |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20071205 Termination date: 20150916 |
|
EXPY | Termination of patent right or utility model |