CN210324188U - Integrated circuit bus IIC master-slave competition automatic switching equipment and system thereof - Google Patents
- ️Tue Apr 14 2020
Info
-
Publication number
- CN210324188U CN210324188U CN201921408492.2U CN201921408492U CN210324188U CN 210324188 U CN210324188 U CN 210324188U CN 201921408492 U CN201921408492 U CN 201921408492U CN 210324188 U CN210324188 U CN 210324188U Authority
- CN
- China Prior art keywords
- iic
- manager
- slave
- equipment
- automatic switching Prior art date
- 2019-08-27 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.)
- Active
Links
- 206010033799 Paralysis Diseases 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
Images
Landscapes
- Bus Control (AREA)
Abstract
The utility model discloses an integrated circuit bus IIC principal and subordinate compete automatic switch-over equipment and system thereof contains a manager and with a plurality of slave machine equipment that the manager is connected, manager and slave machine equipment and from the communication bus between machine equipment and slave machine equipment all adopt integrated circuit bus IIC. The utility model discloses the during operation, the second IIC module of manager all is the host computer, but the second IIC module of two parallelly connected back managers of equipment complete machine can only be by one as the host computer to go the information of inquiring subordinate's equipment to can only go the order of responding the host computer by the first IIC module of same manager, the second IIC module of another equipment must withdraw from original host computer mode, otherwise will cause the bus conflict to make whole bus paralysed. The manager losing the control right of the host closes the first IIC module, and the corresponding port is set to be in a high-impedance state, so that the upper computer is ensured to obtain the information of all the slave devices only by accessing one fixed address.
Description
Technical Field
The utility model relates to an automatic control field specifically is an integrated circuit bus IIC principal and subordinate competition automatic switch-over equipment and system thereof.
Background
The existing IIC bus may have the situation that two hosts conflict, and an upper-level controller is often used for controlling and switching a master-slave mode. The master and the slave of the IIC are switched through the superior controller, once the superior controller is separated from the controller, the two hosts always compete for the control right of the bus, and therefore the whole bus cannot be normally used.
The above prior art has the following disadvantages: (1) additional controller intervention is required to realize master-slave switching; (2) when the superior controller is not in use, once two hosts always compete for the bus control right, the whole bus is paralyzed and cannot be recovered.
SUMMERY OF THE UTILITY MODEL
An object of the utility model is to provide an integrated circuit bus IIC principal and subordinate competition automatic switch-over equipment and system to solve the problem that proposes among the above-mentioned background art.
In order to achieve the above object, the utility model provides a following technical scheme:
an integrated circuit bus IIC master-slave competition automatic switching device comprises a manager and a plurality of slave devices connected with the manager, wherein communication buses between the manager and the slave devices and communication buses between the slave devices and the slave devices adopt integrated circuit bus IIC; the second IIC module is connected with the slave equipment, works in a master mode and is responsible for collecting information of the slave equipment, the manager collects and temporarily stores the information of the slave equipment through the second IIC module and is also responsible for state management of the complete machine of the automatic switching equipment, and the upper computer obtains the state of the complete machine of the automatic switching equipment and the information of the slave equipment through accessing the manager. The number of the plurality of slave devices is at least 2.
As a further aspect of the present invention: a system adopting the integrated circuit bus IIC master-slave competition automatic switching equipment comprises a plurality of automatic switching equipment which are connected in parallel on the same upper computer, first IIC modules in the automatic switching equipment are connected together through an IIC bus, and second IIC modules of managers in the automatic switching equipment are connected together through the IIC bus.
As a further aspect of the present invention: the second IIC module of the manager after the devices are connected in parallel is used as a host to inquire the information of the slave devices, the first IIC module of the same manager responds to the command of the upper computer, the second IIC modules of other automatic switching devices exit the original host mode, the manager losing the control right of the host closes the first IIC module, and the corresponding ports are set to be in a high-resistance state, so that the upper computer only accesses one fixed address to obtain the information of all the slave devices.
Compared with the prior art, the beneficial effects of the utility model are that: the utility model discloses automatic switching equipment complete machine during independent work, the second IIC module of manager all is the host computer, but the second IIC module of two parallelly connected back managers of equipment complete machine can only be by one as the host computer to go the information of inquiring subordinate's equipment to can only go the command of responding the host computer by the first IIC module of same manager, the second IIC module of another equipment must withdraw from original host computer mode, otherwise will cause the bus conflict to make whole bus paralysed. The manager losing the control right of the host closes the first IIC module, and the corresponding port is set to be in a high-impedance state, so that the upper computer is ensured to obtain the information of all the slave devices only by accessing one fixed address.
Drawings
FIG. 1 is a schematic block diagram of an integrated circuit bus IIC master-slave contention automatic switching apparatus;
FIG. 2 is a functional block diagram of one embodiment of an integrated circuit bus IIC master-slave contention automatic switching system;
FIG. 3 is a flowchart illustrating the operation of the master/slave contention automatic switching system of the integrated circuit bus IIC.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by a person skilled in the art without creative work belong to the protection scope of the present invention.
As an embodiment of the present invention, as shown in fig. 1, the integrated circuit bus IIC master-slave competition automatic switching device includes a manager and a plurality of slave devices connected to the manager, the manager and the slave devices and communication buses between the slave devices and the slave devices all adopt the integrated circuit bus IIC, the manager includes two groups of IIC modules, which are a first IIC module and a second IIC module respectively, the first IIC module is connected to an upper computer, and operates in a slave mode and is responsible for sending device information to the upper computer; the second IIC module is connected with the slave equipment, works in a master mode and is responsible for collecting information of the slave equipment, the manager collects and temporarily stores the information of the slave equipment through the second IIC module and is also responsible for state management of the complete machine of the automatic switching equipment, and the upper computer obtains the state of the complete machine of the automatic switching equipment and the information of the slave equipment through accessing the manager. The number of the plurality of slave devices is at least 2.
Preferably, fig. 2 is an exemplary embodiment of the system of the present invention, because of system requirements, two automatic switching devices need to be connected in parallel for use, but the upper computer only has one IIC interface connected to the set of system, and therefore two sets of IIC modules of the manager need to be connected together respectively, specifically: the first IIC modules of the automatic switching devices are connected together through IIC buses, and the second IIC modules of the managers of the automatic switching devices are also connected together through IIC buses.
When the automatic switching equipment complete machine works independently, the second IIC module of the manager is the host, but after the two automatic switching equipment complete machines are connected in parallel, the second IIC module of the manager can only use one as the host to inquire the information of the lower-level equipment, and can only use the first IIC module of the same manager to respond to the command of the upper computer, and the second IIC module of the other automatic switching equipment must exit the original host mode, otherwise, bus conflict can be caused to enable the whole bus to be paralyzed. The manager losing the control right of the host computer closes the first IIC module, and the corresponding port is set to be in a high-impedance state. Therefore, the upper computer can obtain the information of all the slave devices only by accessing one fixed address.
Two automatic switching devices are connected in parallel, and the electrifying sequence has two possibilities:
(1) the first IIC module and the second IIC module of the two devices are connected together and then powered up:
after the manager is powered on, the first IIC module and the second IIC module are initialized to be slaves, corresponding timeout waiting time is set according to the IIC address of the manager, the timeout waiting time with the low address is short, for example 10ms, and the timeout waiting time with the high address is longer, for example 50 ms. During the timeout waiting period, if the second IIC module detects START and STOP signals on the IIC bus 2, the slave state of the second IIC module is maintained and the IO port corresponding to the first IIC module is set to a high-impedance state, and if no START or STOP signal is detected on the IIC bus 2 during the entire timeout waiting time, it is verified that there is no host device on the IIC bus 2, and the second IIC module can be switched from the slave mode to the host mode. In the parallel operation state, the master manager needs to inquire the information of the lower-level device, and also needs to inquire the manager in the slave state through the IIC bus 2 to acquire the state of the whole device of another device.
(2) After the two devices are respectively powered on, the first IIC module and the second IIC module are connected together:
the two automatic switching devices are respectively powered on, and the IIC bus 1 and the IIC bus 2 are disconnected, so that after the timeout waiting time is exceeded, the two managers are switched from the slave mode to the host mode to respectively control the IIC buses 2. When the IIC buses of the two complete automatic switching equipment are connected together, two hosts exist on the IIC bus 2, and the two hosts always send commands, and at this time, a high probability of bus collision occurs. When the manager detects that the IIC bus 2 has bus collision, the host mode is immediately exited, the slave mode is switched to, and a delay waiting mechanism is executed when power is on. The two devices exit the main mode together and enter the overtime waiting state, the waiting time of the device with low address is short, and the device is inevitably switched to the host mode first. Therefore, the low address device will first preempt the bus control right, and the high address device will detect the START and STOP signals from the low address device in the timeout period, and will keep the slave mode.
Therefore, whether the bus is connected first and then powered on or first and then connected, the device with the low address can be ensured to be the master, and the device with the high address can be ensured to be the slave. The process flow after the two cases are combined is shown in fig. 3.
The number of the automatic switching devices connected in parallel is two, but the system provided by the invention is not limited to the parallel connection of two automatic switching devices, and the system is also applicable to the situation that the number is more than two.
It is obvious to a person skilled in the art that the invention is not restricted to details of the above-described exemplary embodiments, but that it can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.
Claims (4)
1. The master-slave competition automatic switching equipment of the integrated circuit bus IIC is characterized by comprising a manager and a plurality of slave equipment connected with the manager, wherein the manager and the slave equipment as well as communication buses between the slave equipment and the slave equipment adopt the integrated circuit bus IIC; the second IIC module is connected with the slave equipment, works in a master mode and is responsible for collecting information of the slave equipment, the manager collects and temporarily stores the information of the slave equipment through the second IIC module and is also responsible for state management of the complete machine of the automatic switching equipment, and the upper computer obtains the state of the complete machine of the automatic switching equipment and the information of the slave equipment through accessing the manager.
2. The integrated circuit bus IIC master-slave contention automatic switching apparatus of claim 1, wherein the number of slave apparatuses is at least 2.
3. A system using an integrated circuit bus IIC master-slave competition automatic switching device according to claim 1 or 2, comprising a plurality of automatic switching devices connected in parallel to the same upper computer, wherein first IIC modules in the plurality of automatic switching devices are connected together through an IIC bus, and second IIC modules in managers in the plurality of automatic switching devices are also connected together through an IIC bus.
4. The system as claimed in claim 3, wherein the second IIC module of the manager after the multiple devices are connected in parallel is used as a host to inquire the information of the slave devices, and the first IIC module of the same manager responds to the command of the host computer, the second IIC modules of other automatic switching devices exit the original host mode, the manager losing the control right of the host computer closes the first IIC module, and the corresponding port is set to be in a high impedance state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201921408492.2U CN210324188U (en) | 2019-08-27 | 2019-08-27 | Integrated circuit bus IIC master-slave competition automatic switching equipment and system thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201921408492.2U CN210324188U (en) | 2019-08-27 | 2019-08-27 | Integrated circuit bus IIC master-slave competition automatic switching equipment and system thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN210324188U true CN210324188U (en) | 2020-04-14 |
Family
ID=70131590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201921408492.2U Active CN210324188U (en) | 2019-08-27 | 2019-08-27 | Integrated circuit bus IIC master-slave competition automatic switching equipment and system thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN210324188U (en) |
Cited By (4)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111698139A (en) * | 2020-07-15 | 2020-09-22 | 深圳市天磁科技有限公司 | RS485 bus multi-host competition switching method |
CN112187474A (en) * | 2020-09-27 | 2021-01-05 | 北京三未信安科技发展有限公司 | Password authentication auto-negotiation switching system and method based on IIC multi-master-slave communication |
CN118467436A (en) * | 2024-07-12 | 2024-08-09 | 浙江正泰电器股份有限公司 | Communication system of multiple electronic devices |
CN118778530A (en) * | 2024-09-09 | 2024-10-15 | 深圳市志奋领科技有限公司 | Master-slave device switching method, system, device, equipment and storage medium |
-
2019
- 2019-08-27 CN CN201921408492.2U patent/CN210324188U/en active Active
Cited By (5)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111698139A (en) * | 2020-07-15 | 2020-09-22 | 深圳市天磁科技有限公司 | RS485 bus multi-host competition switching method |
CN112187474A (en) * | 2020-09-27 | 2021-01-05 | 北京三未信安科技发展有限公司 | Password authentication auto-negotiation switching system and method based on IIC multi-master-slave communication |
CN112187474B (en) * | 2020-09-27 | 2024-04-09 | 三未信安科技股份有限公司 | IIC multi-master-slave communication-based password authentication auto-negotiation switching system and method |
CN118467436A (en) * | 2024-07-12 | 2024-08-09 | 浙江正泰电器股份有限公司 | Communication system of multiple electronic devices |
CN118778530A (en) * | 2024-09-09 | 2024-10-15 | 深圳市志奋领科技有限公司 | Master-slave device switching method, system, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN210324188U (en) | 2020-04-14 | Integrated circuit bus IIC master-slave competition automatic switching equipment and system thereof |
CN102724093B (en) | 2015-08-19 | A kind of ATCA machine frame and IPMB method of attachment thereof |
US7266625B2 (en) | 2007-09-04 | Data communication system |
CN102130669B (en) | 2013-03-13 | Method, system, device and network equipment for detecting state of hot-plug module |
CN101610192B (en) | 2012-06-27 | Communication slave, bus cascading method and system |
CN103248526A (en) | 2013-08-14 | Communication equipment and method for achieving out-of-band monitoring and management, and master-slave switching method |
CN103645975B (en) | 2016-06-15 | A kind of method of abnormal restoring and serial bus transmission device |
CN101557379B (en) | 2011-11-09 | Link reconfiguration method for PCIE interface and device thereof |
CN110419035A (en) | 2019-11-05 | Usb host automatically switches to host |
CN111698139A (en) | 2020-09-22 | RS485 bus multi-host competition switching method |
CN102870374B (en) | 2015-04-29 | Load-sharing method and apparatus, and veneer, |
CN110456705B (en) | 2020-12-11 | Network control device capable of dynamically expanding interface and building automatic control system |
US20150156117A1 (en) | 2015-06-04 | High density server system |
CN109586956B (en) | 2022-09-02 | FCoE switch capable of flexibly configuring ports and method |
EP1701271A1 (en) | 2006-09-13 | Electronic apparatus system with master node and slave node |
CN102103471A (en) | 2011-06-22 | Data transmission method and system |
CN110531686B (en) | 2024-07-12 | Device and method for realizing multiple hosts based on single-master multi-slave protocol |
CN103885910B (en) | 2017-08-25 | The method that many equipment carry out IIC communications under holotype |
CN106874228A (en) | 2017-06-20 | Based on I2Communication means between the controller and communication means, multi-controller of C buses |
CN103095739A (en) | 2013-05-08 | Cabinet server system and node communication method thereof |
CN101281510B (en) | 2010-06-02 | Double-I2C bus setting method and double I2C bus system |
CN212324117U (en) | 2021-01-08 | RS485 bus multi-host competition switching system |
CN214954608U (en) | 2021-11-30 | Communication control device of unit and unit |
CN107070547A (en) | 2017-08-18 | A kind of CPCI type gigabit Ethernet devices with failure monitoring ability |
CN113407480A (en) | 2021-09-17 | Centralized management's frame switch |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2020-04-14 | GR01 | Patent grant | |
2020-04-14 | GR01 | Patent grant |