CN108880599B - Communication circuit, communication method thereof, controller and electric equipment - Google Patents

Communication circuit, communication method thereof, controller and electric equipment Download PDF

Info

Publication number
CN108880599B
CN108880599B CN201810863923.8A CN201810863923A CN108880599B CN 108880599 B CN108880599 B CN 108880599B CN 201810863923 A CN201810863923 A CN 201810863923A CN 108880599 B CN108880599 B CN 108880599B
Authority
CN
China
Prior art keywords
slave
circuit
data
switching device
host
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.)
Active
Application number
CN201810863923.8A
Other languages
Chinese (zh)
Other versions
CN108880599A (en
Inventor
黄银彬
贺小林
杨帆
刘梦坷
吴严
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201810863923.8A priority Critical patent/CN108880599B/en
Publication of CN108880599A publication Critical patent/CN108880599A/en
Application granted granted Critical
Publication of CN108880599B publication Critical patent/CN108880599B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/40Circuits
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/51Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used
    • H03K17/56Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices
    • H03K17/567Circuits characterised by the use of more than one type of semiconductor device, e.g. BIMOS, composite devices such as IGBT
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/51Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used
    • H03K17/56Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices
    • H03K17/60Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices the devices being bipolar transistors
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/51Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used
    • H03K17/56Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices
    • H03K17/687Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices the devices being field-effect transistors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/40Transceivers

Abstract

The disclosure provides a communication circuit, a communication method thereof, a controller and electric equipment, and relates to the field of communication. The communication circuit comprises a host circuit and a slave circuit, wherein the host circuit is configured to receive roll call data sent by a host, send the roll call data to the slave circuit, receive response data sent by the slave circuit and send the response data to the host; the slave circuit is configured to send roll call data to a corresponding plurality of slaves through a plurality of slave data receiving ports, and receive response data returned by the slaves responding to the roll call data through the corresponding slave data sending ports in the plurality of slaves, and send the response data to the host circuit; wherein, a slave data receiving port corresponds to a slave, and a slave corresponds to a slave data transmitting port. The slave communication system can realize that a plurality of slaves can communicate with one slave circuit, reduces the communication cost and reduces the size of the PCB.

Description

Communication circuit, communication method thereof, controller and electric equipment
Technical Field
The disclosure relates to the field of communication, and in particular relates to a communication circuit, a communication method thereof, a controller and electric equipment.
Background
At present, UART (Universal Asynchronous Receiver/Transmitter) communication circuits are usually used for air conditioner controllers, one host corresponds to one slave, and if one host is required to correspond to two or more slaves, a plurality of cluster circuits are generally required to be built, so that hardware cost is greatly increased and PCB layout area is increased.
Disclosure of Invention
The technical problem to be solved by the present disclosure is to provide a communication circuit, a communication method, a controller and electric equipment thereof, and reduce communication cost.
According to an aspect of the present disclosure, there is provided a communication circuit including: the host circuit is configured to receive roll call data sent by the host, send the roll call data to the slave circuit, receive response data sent by the slave circuit and send the response data to the host; the slave circuit is configured to send roll call data to a plurality of corresponding slaves through a plurality of slave data receiving ports, and receive response data returned by the slaves responding to the roll call data through the corresponding slave data sending ports in the plurality of slaves and send the response data to the host circuit; wherein, a slave data receiving port corresponds to a slave, and a slave corresponds to a slave data transmitting port.
Optionally, the communication circuit further includes: and a plurality of switching devices, wherein the slave circuit is connected with the corresponding slave data transmission port through each switching device.
Optionally, the slave circuit includes: the first end of the light emitter of the first photoelectric coupler is connected with a power supply, the second end of the light emitter of the first photoelectric coupler is connected with the output end of the host circuit, the first end of the light receiver of the first photoelectric coupler is connected with a plurality of slave data receiving ports and is connected with the power supply through a second resistor, and the second end of the light receiver of the first photoelectric coupler is grounded; the first end of the light emitter of the second photoelectric coupler is connected with a power supply and connected with a plurality of corresponding slave data transmission ports through a plurality of switching devices, wherein one switching device corresponds to one slave data transmission port, the second end of the light emitter of the second photoelectric coupler is grounded, the first end of the light receiver of the second photoelectric coupler is connected with a host data receiving port of a host circuit and connected with the power supply through a first resistor, and the second end of the light receiver of the second photoelectric coupler is grounded.
Optionally, the slave circuit includes: the first end of the light emitter of the first photoelectric coupler is connected with a power supply, the second end of the light emitter of the first photoelectric coupler is connected with the output end of the host circuit, the first end of the light receiver of the first photoelectric coupler is connected with a plurality of slave data receiving ports and is connected with the power supply through a second resistor, and the second end of the light receiver of the first photoelectric coupler is grounded; the first end of the light emitter of the second photoelectric coupler is connected with a power supply, the second end of the light emitter of the second photoelectric coupler is connected with a plurality of slave data transmission ports, the first end of the light receiver of the second photoelectric coupler is connected with a host data receiving port of a host circuit and is connected with the power supply through a first resistor, and the second end of the light receiver of the second photoelectric coupler is grounded.
Optionally, the control end of each switching device is connected to the corresponding slave data transmitting port, the first end of each switching device is connected to the first end of the light emitter of the second photoelectric coupler, and the second end of each switching device is grounded.
Optionally, the switching device is a first NPN transistor; the base electrode of the first NPN triode is a control end of the switching device, the collector electrode is a first end of the switching device, and the emitter electrode is a second end of the switching device.
Optionally, the switching device is an N-type metal-oxide-semiconductor NMOS transistor; the grid electrode of the NMOS transistor is a control end of the switching device, the drain electrode of the NMOS transistor is a first end of the switching device, and the source electrode of the NMOS transistor is a second end of the switching device.
Optionally, the switching device is an insulated gate bipolar transistor IGBT; the gate of the IGBT is the control end of the switching device, the collector is the first end of the switching device, and the emitter is the second end of the switching device.
Optionally, the switching device is a first NPN transistor; the base electrode of the first PNP triode is a control end of the switching device, the emitting electrode is a first end of the switching device, and the collecting electrode is a second end of the switching device.
Optionally, the switching device is a PMOS transistor; the grid electrode of the PMOS transistor is a control end of the switching device, the source electrode of the PMOS transistor is a first end of the switching device, and the drain electrode of the PMOS transistor is a second end of the switching device.
Optionally, the control terminal of each switching device is connected with the corresponding slave data transmitting port through a current limiting resistor.
Optionally, the first end of the light emitter of the first photoelectric coupler is connected with a power supply through a second resistor, and a first capacitor is connected between the first end of the light emitter of the first photoelectric coupler and the second end of the light emitter of the first photoelectric coupler; the first end of the light receiver of the first photoelectric coupler is connected with a power supply through a third resistor; the first end of the light emitter of the second photoelectric coupler is connected with a power supply through a fourth resistor.
Optionally, the host circuit includes: the base electrode of the second NPN triode is connected with the host data transmitting port through a fifth resistor and is connected with the power supply through a sixth resistor; the base electrode of the second NPN triode is connected with the collector electrode of the second NPN triode through a seventh resistor and is grounded through an eighth resistor, and the collector electrode of the second NPN triode is connected with a power supply through a ninth resistor, wherein the collector electrode of the second NPN triode is the output end of the host circuit; a tenth resistor, a first end of the tenth resistor being connected to the host data receiving port, a second end of the tenth resistor being connected to the first end of the light receiver of the second photocoupler and to the first end of the eleventh resistor; an eleventh resistor having a first end grounded through the second capacitor and a second end connected to the power supply.
Optionally, the host circuit further comprises a third capacitor, a fourth capacitor, and a transient diode; the third capacitor is connected with the eighth resistor in parallel; the first end of the fourth capacitor is connected with the collector electrode of the second NPN triode, and the second end of the fourth capacitor is grounded; the positive pole of transient state diode ground connection, negative pole is connected with the collecting electrode of second NPN triode.
According to another aspect of the disclosure, a controller is also provided, including the communication circuit described above.
According to another aspect of the disclosure, there is also provided an electrical device, including the controller described above.
According to another aspect of the present disclosure, there is also provided a communication method, including: the host circuit receives roll call data sent by the host and sends the roll call data to the slave circuit; the slave circuit transmits roll call data to a plurality of corresponding slaves through a plurality of slave data receiving ports; the slave circuit receives response data returned by the slaves responding to the roll call data through the corresponding slave data transmitting ports and transmits the response data to the host circuit; the host circuit receives the response data sent by the slave circuit and sends the response data to the host; wherein, a slave data receiving port corresponds to a slave, and a slave data transmitting port corresponds to a slave.
Optionally, the method further comprises: after each slave receives the roll call data, comparing whether the roll call data check bit is consistent with the self check bit, if so, returning response data through the corresponding slave data transmitting port after receiving the communication data.
Compared with the prior art, the slave circuit disclosed by the invention sends roll call data to a plurality of corresponding slaves through a plurality of slave data receiving ports, receives response data returned by the slaves responding to the roll call data through the corresponding slave data sending ports in the slaves, and sends the response data to the host circuit, so that the communication of the slaves can share one slave circuit, the communication cost is reduced, and the PCB size is reduced.
Other features of the present disclosure and its advantages will become apparent from the following detailed description of exemplary embodiments of the disclosure, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The disclosure may be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings in which:
fig. 1 is a schematic diagram of a communication circuit according to an embodiment of the disclosure.
Fig. 2 is a schematic diagram of another embodiment of a communication circuit of the present disclosure.
Fig. 3 is a schematic diagram of a communication circuit according to still another embodiment of the present disclosure.
Fig. 4 is a schematic diagram of a communication circuit according to another embodiment of the disclosure.
Fig. 5 is a schematic diagram of a communication circuit according to an embodiment of the disclosure.
Fig. 6 is a flow chart of an embodiment of the communication method of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but should be considered part of the specification where appropriate.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
For the purposes of promoting an understanding of the principles and advantages of the disclosure, reference will now be made to the embodiments illustrated in the drawings and specific language will be used to describe the same.
Fig. 1 is a schematic diagram of a communication circuit according to an embodiment of the disclosure. The communication circuit comprises a master circuit 1 and a slave circuit 2, wherein the master circuit 1 is connected with the slave circuit 2.
The host circuit 1 receives roll call data transmitted from the host through the host data transmission port TX, and transmits the roll call data to the slave circuit 2. The slave circuit 2 transmits roll call data to a corresponding plurality of slaves through a plurality of slave data receiving ports RXS, the plurality being two or more, wherein one slave data receiving port corresponds to one slave. After each slave receives the roll call data, comparing whether the roll call data check bit is consistent with the self check bit, and if so, returning response data after receiving the communication data. In this embodiment, only three slave data receiving ports RXS are shown, corresponding to three slaves. It will be appreciated by those skilled in the art that a plurality of slave data receiving ports RXS may be provided depending on the number of slaves, wherein each RXS may share a port. The host computer is a main control board, and the slave computer is a compressor, a display screen and the like.
The slave circuit 2 receives response data returned from a plurality of slaves responding to roll call data through the corresponding slave data transmission ports TXS, and transmits the response data to the master circuit 1. Wherein, a slave data transmission port corresponds to a slave. In this embodiment, three slave data transmission ports TXS1, TXS2, and TXS3 are shown, where the slave data transmission port corresponding to the slave 1 is TXS1, the slave data transmission port corresponding to the slave 2 is TXS2, and so on. If the slave 1 transmits response data, the response data is output by TXS 1. The slave circuit 2 transmits response data to the host circuit 1. The host circuit 1 receives the response data transmitted from the host circuit 2 and transmits the response data to the host through the host data reception port RX.
In this embodiment, one slave circuit transmits roll call data to a corresponding plurality of slaves through a plurality of slave data receiving ports, receives response data returned from a plurality of slaves responding to the roll call data through a corresponding slave data transmitting port, and transmits the response data to the master circuit, thereby enabling the plurality of slaves to communicate with one slave circuit in common, reducing communication cost, and reducing the size of the PCB.
Fig. 2 is a schematic diagram of another embodiment of a communication circuit of the present disclosure. The communication circuit comprises a host circuit 1, a slave circuit 2 and a plurality of switching devices 3, wherein one host circuit 1 is connected with one slave circuit 2, and the slave circuit 2 is connected with the plurality of switching devices 3, wherein a plurality refers to two or more than two. The slave circuit 2 is connected to the corresponding slave data transmission port TXS via a respective switching device 3.
In this embodiment, since a plurality of switching devices are provided in the communication circuit, each switching device is connected to a corresponding slave through a slave data transmission port, so that different slave signals can be isolated, mutual crosstalk between common ports is prevented, and at the same time, when one slave network fails, other slave circuits are not affected.
Fig. 3 is a schematic diagram of a communication circuit according to still another embodiment of the present disclosure. The slave circuit 2 of the communication circuit comprises a first photoelectric coupler U1 and a second photoelectric coupler U2. The first end of the light emitter of the first photoelectric coupler U1 is connected with a power supply, the second end of the light emitter is connected with the output end of the host circuit 1, the first end of the light receiver of the first photoelectric coupler is connected with a plurality of slave data receiving ports RXS, the first end of the light receiver of the first photoelectric coupler is connected with the power supply through a second resistor R2, and the second end of the light receiver is grounded.
The first end of the light emitter of the second photoelectric coupler U2 is connected with a power supply and connected with a plurality of corresponding slave data transmission ports TXS through a plurality of switching devices 3, wherein one switching device 3 corresponds to one slave data transmission port TXS, the second end of the light emitter is grounded, the first end of the light receiver of the second photoelectric coupler is connected with a host data receiving port of a host circuit and connected with the power supply through a first resistor R1, and the second end of the light receiver of the second photoelectric coupler is grounded. The light emitter may be a light emitting diode, and the light receiver may be a photo-sensitive semiconductor.
In one embodiment, the control end of each switching device 3 is connected to the corresponding slave data transmission port TXS, the first end is connected to the first end of the light emitter of the second photocoupler U2, and the second end is grounded; wherein each switching device 3 is turned on in response to a high level and turned off in response to a low level. In a specific implementation, the switching device 3 may be an NPN transistor, an NMOS (N-Metal-Oxide-Semiconductor) transistor, or an IGBT (Insulated Gate Bipolar Transistor ). If the switching device 3 is an NPN transistor, the base of the NPN transistor is the control terminal of the switching device, the collector is the first terminal of the switching device, and the emitter is the second terminal of the switching device. If the switching device 3 is an NMOS transistor, the gate of the NMOS transistor is the control terminal of the switching device, the drain is the first terminal of the switching device, and the source is the second terminal of the switching device. If the switching device 3 is an IGBT, the gate of the IGBT is the control terminal of the switching device, the collector is the first terminal of the switching device, and the emitter is the second terminal of the switching device.
In the above embodiment, when the slave circuit receives that the data sent by the host circuit is at the high level, the light emitter of the photo coupler U1 is turned off, the light receiver of the photo coupler U1 is not turned on, and RXS is at the high level; when the slave circuit receives that the data sent by the host circuit is at a low level, the light emitter of the photoelectric coupler U1 is conducted, the light receiver of the photoelectric coupler U1 is conducted, RXS is at a low level, and the signal level of the sending end and the signal level of the receiving end are consistent. When the slave transmits the response data, if the transmission data is at the high level, the switching device 3 is turned on, the light emitter of the photocoupler U2 is turned off, the light receiver of the photocoupler U2 is turned off, and the host data receiving port RX connected to the host circuit 1 receives the data at the high level. When the slave machine transmitting signal is at a low level, the switching device 3 is turned off, the light emitter of the photoelectric coupler U2 is turned on, the light receiver of the photoelectric coupler U2 is turned on, the data received by the host machine data receiving port RX connected with the host machine circuit 1 is at a low level, and the transmitting and receiving end signal levels are consistent.
Because the signal level of the transmitting end is consistent with that of the receiving end, the switching device plays a role in signal isolation, mutual crosstalk of the shared ports is prevented, and meanwhile, other slave circuits cannot be influenced when one slave network fails, so that the plurality of slaves can communicate to share one slave circuit.
In another embodiment, the control end of each switching device 3 is connected to the corresponding slave data transmission port TXS, the first end is connected to the first end of the light emitter of the second photocoupler U2, and the second end is grounded; wherein each switching device 3 is turned on in response to a low level and turned off in response to a high level. In a specific implementation, the switching device 3 may be a PNP transistor, a PMOS transistor. If the switching device 3 is a PNP transistor, the base electrode of the PNP transistor is the control terminal of the switching device, the emitter electrode is the first terminal of the switching device, and the collector electrode is the second terminal of the switching device. If the switching device 3 is a PMOS transistor, the gate of the PMOS transistor is the control terminal of the switching device, the source is the first terminal of the switching device, and the drain is the second terminal of the switching device.
In the above embodiment, when the slave circuit receives that the data sent by the host circuit is at the high level, the light emitter of the photo coupler U1 is turned off, the light receiver of the photo coupler U1 is not turned on, and RXS is at the high level; when the slave circuit receives that the data sent by the host circuit is at a low level, the light emitter of the photoelectric coupler U1 is conducted, the light receiver of the photoelectric coupler U1 is conducted, RXS is at a low level, and the signal level of the sending end and the signal level of the receiving end are consistent. When the slave transmits the response data, if the transmission data is at a low level, the switching device 3 is turned on, the light emitter of the photocoupler U2 is turned off, the light receiver of the photocoupler U2 is turned off, and the host data receiving port RX connected to the host circuit 1 receives the data at a high level. When the slave transmission signal is at a high level, the switching device 3 is turned off, the light emitter of the photoelectric coupler U2 is turned on, the light receiver of the photoelectric coupler U2 is turned on, and the host data receiving port RX connected to the host circuit 1 receives data at a low level.
Although the signal level of the transmitting end is inconsistent with that of the receiving end, the signal inversion identification can be carried out after the level signal is received by the host, or the information of the slave computer signal opposite to the host level signal is stored at the host end, so that the host can identify which slave computer returns a response signal, and a plurality of slave computers can share one slave computer. And the switching device plays a role in signal isolation, prevents mutual crosstalk of the shared ports, and simultaneously, other slave circuits are not affected when one slave network fails.
Fig. 4 is a schematic diagram of a communication circuit according to another embodiment of the disclosure. The communication circuit comprises a master circuit 1 and a slave circuit 2, wherein the master circuit 1 is connected to the slave circuit 2, wherein the slave circuit 2 comprises a first optocoupler U1 and a second optocoupler U2.
The first end of the light emitter of the first photoelectric coupler U1 is connected with a power supply, the second end of the light emitter is connected with the output end of the host circuit, the first end of the light receiver of the first photoelectric coupler U1 is connected with a plurality of slave data receiving ports RXS, the first end of the light receiver is connected with the power supply through a second resistor R2, and the second end of the light receiver is grounded.
The first end of the light emitter of the second photoelectric coupler U2 is connected with a power supply, the second end is connected with a plurality of slave data transmission ports TXS, the first end of the light receiver of the second photoelectric coupler U2 is connected with a host data receiving port of the host circuit 1, and is connected with the power supply through a first resistor R1, and the second end of the light receiver is grounded.
The light emitter may be a light emitting diode, and the light receiver may be a photo-sensitive semiconductor.
When the slave circuit receives that the data sent by the host circuit is at a high level, the light emitter of the photoelectric coupler U1 is cut off, the light receiver of the photoelectric coupler U1 is not conducted, and RXS is at a high level; when the slave circuit receives that the data sent by the host circuit is at a low level, the light emitter of the photoelectric coupler U1 is conducted, the light receiver of the photoelectric coupler U1 is conducted, RXS is at a low level, and the signal level of the sending end and the signal level of the receiving end are consistent. When the slave transmits the response data, if the transmission data is at the high level, the light emitter of the photocoupler U2 is turned off, the light receiver of the photocoupler U2 is turned off, and the host data receiving port RX connected to the host circuit 1 receives the data at the high level. When the slave machine transmitting signal is at a low level, the light emitter of the photoelectric coupler U2 is conducted, the light receiver of the photoelectric coupler U2 is conducted, the receiving data of the host machine data receiving port RX connected with the host machine circuit 1 is at a low level, and the transmitting and receiving end signal levels are consistent.
In the above embodiment, the slave circuit transmits roll call data to the corresponding plurality of slaves through the plurality of slave data receiving ports, and the signal levels of the transmitting end and the receiving end are consistent, so that when the host transmits roll call data to the slaves, the slaves can compare whether the check bit of the roll call data is consistent with the check bit of the slave, thereby determining whether to return response data; the slave circuit receives response data returned by the slaves responding to roll call data through the corresponding slave data sending ports and sends the response data to the host circuit, so that the slaves can communicate with one slave circuit, the communication cost is reduced, and the PCB size is reduced.
Fig. 5 is a schematic diagram of a communication circuit according to an embodiment of the disclosure. The following switching device will be described by taking an NPN transistor as an example. As shown in fig. 5, a plurality of first NPN transistors, such as Q8, Q9, Q10 in the figure, are provided. The master circuit 1 interfaces with the slave circuit 2.
The second NPN transistor Q1 has an emitter connected to the power supply, a base connected to the host data transmission port TX through the fifth resistor R5, and connected to the power supply through the sixth resistor R6.
The emitter of the second NPN triode Q2 is grounded, the base is connected with the collector of the second NPN triode Q1 through a seventh resistor R7, the collector is grounded through an eighth resistor R8, and the collector is connected with a power supply through a ninth resistor R9.
The first end of the light emitter of the first photoelectric coupler U1 is connected with a power supply through a third resistor R3, the second end of the light emitter is connected to the collector of a second NPN triode Q2, the first end of the light receiver is connected with a plurality of slave data receiving ports RXS and is connected with the power supply through a second resistor R2, the second end of the light receiver is grounded, and a first capacitor C1 is connected between the first end of the light emitter and the second end of the light emitter.
The tenth resistor R10 is connected to the host data receiving port RX, and is connected to a power supply through an eleventh resistor R11, and the other end of the eleventh resistor R11 is grounded through a capacitor C2.
The first end of the light emitter of the second photoelectric coupler U2 is connected with a power supply through a fourth resistor R4 and connected with the collectors of the first NPN triodes Q8, Q9 and Q10, the second end of the light emitter is grounded, the first end of the light receiver is connected with a host data receiving port RX through a tenth resistor R10, and the second end of the light receiver is grounded.
The base of the first NPN transistor Q8 is connected to the slave data transmission port TXS1, the base of Q9 is connected to the slave data transmission port TXS2, the base of Q10 is connected to the emitters of the slave data transmission ports TXS3, Q8, Q9, Q10.
In the above embodiment, the master transmits roll call data to only one slave at the same time, and each slave has a respective check bit. When the host roll call is made, when the TX transmission signal is at a high level, the second NPN triode Q1 is cut off; the base level of the second NPN triode Q2 is low level, and the second NPN triode Q2 is cut off; the collector electrode of the second NPN triode Q2 is high level, and the light emitter of the photoelectric coupler U1 is cut off; the photo coupler U1 is not conductive to the photo receiver, RXS is high. When the TX transmission signal is at a low level, the second NPN transistor Q1 is turned on; the base level of the second NPN triode Q2 is high level, and the second NPN triode Q2 is conducted; the collector electrode of the second NPN triode Q2 is low level, and the light emitter of the photoelectric coupler U1 is conducted; the photo coupler U1 is conducted by the triode of the photo receiver, and RXS is low level. The signal level of the transmitting end is consistent with that of the receiving end.
The slave receives the roll call data through the RXS, compares whether the roll call data check bit is consistent with the self check bit, and can receive the data and return a response if the roll call data check bit is consistent with the self check bit. The ports can be shared by the RXS, and the slaves can directly share the ports without abnormal data acceptance because the slaves compare the roll call data check bit with the self check bit.
After receiving the data, the slave sends response data through the TXS port to respond correspondingly. The corresponding transmitting port of the slave 1 is TXS1, the corresponding transmitting port of the slave 2 is TXS2, and so on. Taking the slave 1 as an example, when the signal sent by the slave 1 is at a high level, the first NPN triode Q8 is turned on, the anode of the light emitter of the photoelectric coupler U2 is at a low level, and the diode is turned off; the photo coupler U2 is cut off by the triode of the photo receiver, and RX received data is high level. When the signal sent by the slave machine 1 is at a low level, the first NPN triode Q8 is cut off, the anode of the light emitter of the photoelectric coupler U2 is at a high level, and the diode is turned on; the photo coupler U2 is conducted by the triode of the photo receiver, and the data received by the host RX is low level. The signal level of the transmitting end is consistent with that of the receiving end.
In the above embodiment, since the signal levels of the transmitting end and the receiving end are consistent, and the first NPN transistor plays a role in signal isolation, mutual crosstalk between common ports is prevented, and meanwhile, when one slave network fails, other slave circuits are not affected, so that a plurality of slaves can communicate to share one slave circuit, and multiplexing of communication ports is realized.
In another embodiment of the present disclosure, a base of the first NPN transistor is connected to a corresponding slave data transmission port through a current limiting resistor. As shown in fig. 5, the base of Q9 is connected to the slave data transmission port TXS1 through the current limiting resistor R101, the base of Q10 is connected to the slave data transmission port TXS2 through the current limiting resistor R102, and the base of Q11 is connected to the slave data transmission port TXS3 through the current limiting resistor R103. The resistance value of the current-limiting resistor is adjusted according to the output capability of the slave chip, so that the communication circuit is prevented from being burnt when the current is overlarge.
In another embodiment of the present disclosure, the host circuit further includes a third capacitor C3, a fourth capacitor C4, and a transient diode TVS1. The third capacitor C3 is connected in parallel with the eighth resistor R8, so that the reliability of the on/off of the second NPN transistor Q2 can be ensured. The first end of the fourth capacitor C4 is connected to the collector of the second NPN transistor Q2, and the second end is grounded, so that filtering can be performed. The positive pole of transient state diode TVS1 is grounded, and the negative pole is connected with the collecting electrode of second NPN triode Q2, can prevent the big voltage in the twinkling of an eye, plays the steady voltage effect, protects communication circuit's reliability.
In another embodiment of the present disclosure, a controller is also protected, where the controller includes the communication circuit in the above embodiment, and the controller is, for example, an air conditioner controller.
In another embodiment of the present disclosure, a powered device is also protected, wherein the powered device includes the controller described above. The method and the device can reduce communication cost and further reduce hardware cost of the whole electric equipment, wherein the electric equipment is an air conditioner, a refrigerator, a television and the like.
Fig. 6 is a flow chart of an embodiment of the communication method of the present disclosure. The circuit structure of the communication method is as shown in the above embodiment.
In step 610, the host circuit receives roll call data sent by the host and sends the roll call data to the slave circuit.
In step 620, the slave machine transmits roll call data to the corresponding plurality of slaves through the plurality of slave data receiving ports. Wherein one slave data receiving port corresponds to one slave.
After each slave receives the roll call data, comparing whether the roll call data check bit is consistent with the self check bit, if so, returning response data through the corresponding slave data transmitting port after receiving the communication data.
In step 630, the slave machine receives response data returned from the plurality of slave machines in response to the roll call data through the corresponding slave machine data transmission ports, and transmits the response data to the master machine circuit, wherein one slave machine data transmission port corresponds to one slave machine.
In step 640, the host circuit receives the reply data sent from the slave circuit and sends the reply data to the host.
In this embodiment, one slave circuit transmits roll call data to a corresponding plurality of slaves through a plurality of slave data receiving ports, receives response data returned from a plurality of slaves responding to the roll call data through a corresponding slave data transmitting port, and transmits the response data to the master circuit, thereby enabling the slaves to communicate with one slave circuit in common.
Thus far, the present disclosure has been described in detail. In order to avoid obscuring the concepts of the present disclosure, some details known in the art are not described. How to implement the solutions disclosed herein will be fully apparent to those skilled in the art from the above description.
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above-described sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the disclosure. The scope of the present disclosure is defined by the appended claims.

Claims (17)

1. A communication circuit, comprising:
the host circuit is configured to receive roll call data sent by the host, send the roll call data to the slave circuit, receive response data sent by the slave circuit and send the response data to the host;
the slave circuit is configured to send roll call data to a plurality of corresponding slaves through a plurality of slave data receiving ports, receive response data returned by the slaves responding to the roll call data through the corresponding slave data sending ports, and send the response data to the host circuit; and after receiving the communication data, triggering an enabling signal end to send an enabling signal so as to enable a corresponding switching device to be conducted, and returning response data through the corresponding slave data sending port.
2. The communication circuit of claim 1, further comprising:
and the slave circuit is connected with the corresponding slave data transmission port through each switching device.
3. The communication circuit of claim 2, wherein the slave circuit comprises:
the first end of the light emitter of the first photoelectric coupler is connected with a power supply, the second end of the light emitter of the first photoelectric coupler is connected with the output end of the host circuit, the first end of the light receiver of the first photoelectric coupler is connected with a plurality of slave data receiving ports and is connected with the power supply through a second resistor, and the second end of the light receiver of the first photoelectric coupler is grounded;
the first end of the light emitter of the second photoelectric coupler is connected with a power supply and connected with a plurality of corresponding slave data transmission ports through a plurality of switching devices, one switching device corresponds to one slave data transmission port, the second end of the light emitter of the second photoelectric coupler is grounded, the first end of the light receiver of the second photoelectric coupler is connected with a host data receiving port of the host circuit and connected with the power supply through a first resistor, and the second end of the light receiver of the second photoelectric coupler is grounded.
4. The communication circuit of claim 1, wherein the slave circuit comprises:
the first end of the light emitter of the first photoelectric coupler is connected with a power supply, the second end of the light emitter of the first photoelectric coupler is connected with the output end of the host circuit, the first end of the light receiver of the first photoelectric coupler is connected with a plurality of slave data receiving ports and is connected with the power supply through a second resistor, and the second end of the light receiver of the first photoelectric coupler is grounded;
the first end of the light emitter of the second photoelectric coupler is connected with a power supply, the second end of the light emitter of the second photoelectric coupler is connected with a plurality of slave data transmission ports, the first end of the light receiver of the second photoelectric coupler is connected with a host data receiving port of the host circuit and is connected with the power supply through a first resistor, and the second end of the light receiver of the second photoelectric coupler is grounded.
5. A communication circuit according to claim 3, wherein the control terminal of each of the switching devices is connected to a corresponding slave data transmission port, the first terminal of each of the switching devices is connected to the first terminal of the light emitter of the second optocoupler, and the second terminal of each of the switching devices is grounded.
6. The communication circuit of claim 5, wherein the switching device is a first NPN transistor;
the base of the first NPN triode is the control end of the switching device, the collector is the first end of the switching device, and the emitter is the second end of the switching device.
7. The communication circuit of claim 5, wherein the switching device is an N-type metal-oxide-semiconductor NMOS transistor;
the grid of the NMOS transistor is the control end of the switching device, the drain electrode is the first end of the switching device, and the source electrode is the second end of the switching device.
8. The communication circuit of claim 5, wherein the switching device is an insulated gate bipolar transistor IGBT;
the gate of the IGBT is the control end of the switching device, the collector is the first end of the switching device, and the emitter is the second end of the switching device.
9. The communication circuit of claim 5, wherein the switching device is a first PNP transistor;
the base of the first PNP triode is the control end of the switching device, the emitter is the first end of the switching device, and the collector is the second end of the switching device.
10. The communication circuit of claim 5, wherein the switching device is a P-type metal-oxide-semiconductor PMOS transistor;
the grid of the PMOS transistor is the control end of the switching device, the source electrode is the first end of the switching device, and the drain electrode is the second end of the switching device.
11. The communication circuit of claim 5, wherein,
and the control end of each switching device is connected with the corresponding slave data transmission port through a current limiting resistor.
12. The communication circuit according to any one of claims 3-11, wherein,
the first end of the light emitter of the first photoelectric coupler is connected with a power supply through a third resistor, and a first capacitor is connected between the first end of the light emitter of the first photoelectric coupler and the second end of the light emitter of the first photoelectric coupler;
the first end of the light emitter of the second photoelectric coupler is connected with a power supply through a fourth resistor.
13. The communication circuit of claim 12, wherein the host circuit comprises:
the emitter of the second PNP type triode is connected with a power supply, and the base of the second PNP type triode is connected with the host data transmission port through a fifth resistor and is connected with the power supply through a sixth resistor;
the emitter of the second NPN triode is grounded, the base electrode of the second NPN triode is connected with the collector of the second PNP triode through a seventh resistor and is grounded through an eighth resistor, and the collector of the second NPN triode is connected with a power supply through a ninth resistor, wherein the collector of the second NPN triode is the output end of the host circuit;
a tenth resistor, a first end of which is connected to the host data receiving port, and a second end of which is connected to the first end of the light receiver of the second photocoupler and to the first end of the eleventh resistor;
an eleventh resistor having a first end grounded through a second capacitor and a second end connected to a power supply.
14. The communication circuit of claim 13, wherein the host circuit further comprises a third capacitor, a fourth capacitor, and a transient diode;
the third capacitor is connected in parallel with the eighth resistor;
the first end of the fourth capacitor is connected with the collector electrode of the second NPN triode, and the second end of the fourth capacitor is grounded;
and the positive electrode of the transient diode is grounded, and the negative electrode of the transient diode is connected with the collector electrode of the second NPN triode.
15. A controller comprising the communication circuit of any one of claims 1-14.
16. A powered device comprising the controller of claim 15.
17. A method of communicating in a communication circuit as claimed in any one of claims 1 to 14, comprising:
the host circuit receives roll call data sent by the host and sends the roll call data to the slave circuit;
the slave circuit transmits roll call data to a plurality of corresponding slaves through a plurality of slave data receiving ports;
after each slave receives the roll call data, comparing whether the roll call data check bit is consistent with the self check bit, if so, triggering an enabling signal end to send an enabling signal to enable a corresponding switch device to be conducted after receiving communication data, and returning response data through a corresponding slave data sending port;
the slave circuit receives response data returned by the slave machine responding to the roll call data through the corresponding slave machine data transmitting port and transmits the response data to the host circuit;
the host circuit receives the response data sent by the slave circuit and sends the response data to the host;
one of the slave data receiving ports corresponds to one slave, and one of the slave data transmitting ports corresponds to one slave.
CN201810863923.8A 2018-08-01 2018-08-01 Communication circuit, communication method thereof, controller and electric equipment Active CN108880599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810863923.8A CN108880599B (en) 2018-08-01 2018-08-01 Communication circuit, communication method thereof, controller and electric equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810863923.8A CN108880599B (en) 2018-08-01 2018-08-01 Communication circuit, communication method thereof, controller and electric equipment

Publications (2)

Publication Number Publication Date
CN108880599A CN108880599A (en) 2018-11-23
CN108880599B true CN108880599B (en) 2023-10-27

Family

ID=64307091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810863923.8A Active CN108880599B (en) 2018-08-01 2018-08-01 Communication circuit, communication method thereof, controller and electric equipment

Country Status (1)

Country Link
CN (1) CN108880599B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936491B (en) * 2019-03-06 2020-05-22 珠海格力电器股份有限公司 Communication method for improving communication efficiency
CN115378759A (en) * 2022-08-18 2022-11-22 珠海格力电器股份有限公司 Novel energy cabinet and master-slave communication device and method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203119870U (en) * 2013-03-18 2013-08-07 珠海格力电器股份有限公司 Communication circuit, electric equipment and air conditioner
CN204203348U (en) * 2014-10-09 2015-03-11 珠海兴业绿色建筑科技有限公司 A kind of photovoltaic combiner box transformation current sensing means
CN105159860A (en) * 2015-10-10 2015-12-16 上海斐讯数据通信技术有限公司 Inter-integrated circuit (IIC) extended system and method
CN105871672A (en) * 2016-03-22 2016-08-17 佛山市顺德区美的洗涤电器制造有限公司 One-host multi-slave communication system and data transmission method thereof
CN107786403A (en) * 2016-08-31 2018-03-09 常州太平通讯科技有限公司 For burst between more slave devices and the Communication processing method of concurrent transmission
CN208548904U (en) * 2018-08-01 2019-02-26 珠海格力电器股份有限公司 Communicating circuit, controller and electrical equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI407316B (en) * 2008-03-12 2013-09-01 Inventec Corp Apparatus for resolving two i2c slave devices with the same addressed address to happen conflict

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203119870U (en) * 2013-03-18 2013-08-07 珠海格力电器股份有限公司 Communication circuit, electric equipment and air conditioner
CN204203348U (en) * 2014-10-09 2015-03-11 珠海兴业绿色建筑科技有限公司 A kind of photovoltaic combiner box transformation current sensing means
CN105159860A (en) * 2015-10-10 2015-12-16 上海斐讯数据通信技术有限公司 Inter-integrated circuit (IIC) extended system and method
CN105871672A (en) * 2016-03-22 2016-08-17 佛山市顺德区美的洗涤电器制造有限公司 One-host multi-slave communication system and data transmission method thereof
CN107786403A (en) * 2016-08-31 2018-03-09 常州太平通讯科技有限公司 For burst between more slave devices and the Communication processing method of concurrent transmission
CN208548904U (en) * 2018-08-01 2019-02-26 珠海格力电器股份有限公司 Communicating circuit, controller and electrical equipment

Also Published As

Publication number Publication date
CN108880599A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108616292B (en) Communication circuit, communication method thereof, controller and electric equipment
CN111800697B (en) Charging box, earphone system, charging control method and storage medium
CN108880599B (en) Communication circuit, communication method thereof, controller and electric equipment
MXPA02002773A (en) I2C OPTOminus;ISOLATOR CIRCUIT.
CN113606761A (en) Current loop communication circuit and air conditioner
CN109343396A (en) A kind of and machine CAN build-out resistor automatic identification circuit
CN113741257A (en) Current loop communication circuit and air conditioning unit
US11031934B2 (en) Connection circuit and connection method thereof
CN216248808U (en) Expansion circuit and system
CN208548904U (en) Communicating circuit, controller and electrical equipment
CN208548903U (en) Communicating circuit, controller and electrical equipment
US6407402B1 (en) I2C opto-isolator circuit
CN213304962U (en) DALI signal power supply protection circuit
CN103118143B (en) Multiplex circuit of serial interface and Ethernet interface
CN107659301B (en) Level conversion circuit and interface communication system
CN209930284U (en) Router and automatic switching system for external antenna of router
US6489757B2 (en) Optical interface with low-voltage relay unit and high-voltage regulation unit
CN106372025A (en) Bus-type communication circuit
CN208766506U (en) A kind of and machine CAN build-out resistor automatic identification circuit and CAN and machine equipment
CN113848788B (en) Expansion circuit and system
CN220711484U (en) Anti-interference single-wire bidirectional communication circuit
CN218124699U (en) Single-wire serial transceiving circuit
US20240077522A1 (en) Voltage monitoring devices and methods
CN215809187U (en) Current loop communication circuit and air conditioner
CN210839528U (en) Serial port communication signal abnormity correction circuit and massage chair

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant