Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.
Fig. 1 is the applied environment figure of serial ports provided by the embodiments of the present application charging communication multiplexing method.
As shown in Figure 1, the system includes:
First equipment 100 and the second equipment 200.
Serial ports charging communication multiplexing method provided by the invention can be used for TWS Bluetooth earphone system, wherein the first equipment
100 are realized in the form of charging box, charging bracelet or cradle etc.;Second equipment 200 is with in-ear typed Bluetooth headset, supra-aural bluetooth
The forms such as earphone or wear-type bluetooth headset realize that the form realized is not particularly limited, and are subject to actual design.
In one implementation, for including first equipment 100 and two the second equipment 200, the first equipment
100 and each second equipment 200 be electrically connected by contact, pass through Bluetooth wireless communication connection between two the second equipment 200.Example
Such as, the first equipment 100 is charging box, and the second equipment 200 is in-ear typed Bluetooth headset, and two the second equipment 200 are accommodated in first
It in equipment 100, while being connect respectively by contact with the first equipment 100, the first equipment 100 is simultaneously to two the second equipment 200
Charging communicates, and is carried out wireless communication between two the second equipment 200 by bluetooth.
In another implementation, including first equipment 100 and second equipment 200,100 He of the first equipment
A second equipment 200 is electrically connected by contact, such as the first equipment 100 is charging bracelet, and the second equipment 200 is In-Ear bluetooth
Earphone, the second equipment 200 are detachably connected by buckle with the first equipment 100, and when clamping, the first equipment 100 and second is set
Standby 200 are connected by contact, are charged or are communicated.
First embodiment
Fig. 2 is the structural schematic diagram for the first equipment that the application first embodiment provides.
As shown in Fig. 2, the first equipment 100 includes: first processor 103, first switch 102, second switch 104, first
Control terminal, the control terminal of second switch 104 of switch 102 are communicated to connect with the control interface of first processor 103.First opens
First connectivity port of pass 102 is connect with charging module 101, the second connection end mouth of first switch 102 and first loads
Port 105 connects, and the first connectivity port of second switch 104 is connect with the first communication interface of first processor 103, second opens
The second connection end mouth of pass 104 is connect with the first load port 105, and the first load port 105 is used to connect the second equipment 200,
First load port 105 is connect by bus with the second equipment 200.
Wherein, in the present embodiment, the charging module 101 of the first equipment 100 is DC/DC (Direct Current/
Direct Current, DC-DC power supply) module, the 3.3V voltage in circuit rises to 5V and exported by DC/DC module,
For charging to the second equipment 200.
In a kind of embodiment, first switch 102 and second switch 104 are realized using switch chip, first switch 102
With second switch 104 respectively with two GPIO of first processor 103 (General Purpose Input Output, it is general
Input/output) it connects, first processor 103 realizes first switch 102 and second switch by controlling the level of two GPIO
104 on-off.
Optionally, the first communication interface includes TX (Transport, send) interface and RX (Receive is received) interface,
TX interface is in parallel with RX interface, while connecting with second switch 104, is additionally provided between the first communication interface and second switch 104
Pull-up resistor is in series with diode on TX interface, and the anode of diode is connect with pull-up resistor, and cathode is connect with TX interface, with
Reach interference when reducing communication between equipment, enhances the purpose of stability.
Optionally, in the present embodiment, the first load port 105 uses POGO PIN (spring needle) as port interface,
First load port 105 is connect by VBUS (voltage bus) with the second equipment 200, and is completed and the second equipment by VBUS
200 communication and to the second equipment 200 charge.
Fig. 3 is that the serial ports charging communication multiplexing method that the application first embodiment provides shows applied to the process of the first equipment
It is intended to.
As shown in figure 3, this method comprises:
After S201, first processor obtain communication start instruction, control first switch is disconnected, second switch is connected, wherein
The default conducting of above-mentioned first switch, charging module are connected to the first load port under the first equipment non-communicating state.
Wherein, under non-communicating state, the default conducting of first switch, the first equipment is negative by charging module and first at this time
Load port conducting, the first equipment export 5V voltage by the first load port, for the second equipment charge.
In the present embodiment, enabled instruction is sent by the other assemblies in the first equipment, for example, setting on the first device
Set a button, sent by pressing the button, the concrete mode of transmission with no restrictions, with the actual design feelings of the first equipment
Subject to condition.
In the present embodiment, first switch disconnects, after second switch conducting, and the first communication interface of first processor passes through
Second switch and the first load port access VBUS, and preparation is communicated with the second equipment.
S202, first processor transmit the first communication information to the first load port by the first communication interface and pass through
First load port sends the first communication information to the second equipment.
Wherein, in a kind of implementation, the communication mode between the first equipment and the second equipment is half-duplex, same time
Interior, wherein an equipment transmission information realizes half-duplex using time-sharing multiplex in the present embodiment for permission, takes first to set
It is standby actively to communicate, the mode of the passive response of the second equipment.For example, the first equipment and the second equipment of at least one are carried out address
The address of first equipment is compiled as address 1 by coding, and the address volume of the second equipment is address 2, and the address of multiple second equipment is successively
Sequence;The first equipment can send message to the address of multiple second equipment simultaneously when communication, when the second equipment returns to message,
Message is successively given to the address of the first equipment according to different address.
In the present embodiment, charging and communication pattern using two switch switching circuits utilize time-sharing multiplex to realize half pair
Work communication keeps serial ports charging telecommunication circuit more stable, and interference is small, and corresponding speed is fast, and reliability and real-time are improved.
The step of after first processor obtains communication start instruction, control first switch disconnected, second switch conducting can be with
It include: after first processor obtains communication start instruction, control first switch disconnects;If first processor detects that bus powers on
The low preset range of pressure drop then controls second switch conducting.
Optionally, in the present embodiment, the voltage on first processor controlling bus VBUS, to obtain on current VBUS
State.Such as: then it is the state of charging when voltage is 5V on VBUS, if voltage is 3.3V on VBUS, enters and prepare to lead to
The state of news, if voltage is 2.6V on VBUS, for the state of data communication.
Optionally, in the present embodiment, when first processor monitors that the voltage on VBUS drops to 3.3V by 5V, then will
Second switch conducting.
First processor is to the first load port the first communication information of transmission and negative by first by the first communication interface
Load port sends the first communication information to the second equipment, comprising: first processor is first pre- after control second switch conducting
If after the time, by the first communication interface to the first load port send the first communication information and by the first load port to
Second equipment sends the first communication information;First processor receives the second equipment and passes through the first load after the second preset time
The second communication information that port, the first communication interface return.
Optionally, in the present embodiment, the first communication information is used to indicate the corresponding data of the second equipment feedback, the data
For the second communication information.Such as: the first communication information can be earphone matched order, the instruction of earphone electricity quantity inquiring or engineering debugging
Instruction etc., the second communication information are the second equipment according to the corresponding information of the specific instruction of the first communication information feedback;If first
Equipment sends the instruction of earphone electricity quantity inquiring and is used as the first communication information, then the content of the second communication information is that the electricity of earphone is believed
Breath.
Optionally, in the present embodiment, the first preset time T 1 is for waiting the second equipment to switch to communication pattern;First
Processor waits T1 after control second switch conducting, then sends the first communication information, the time that the first communication information is sent
For T2;After the first communication information is sent completely, the second equipment is waited to return to the second communication information, wherein the time waited is
T3, the sending time of the second communication information are T4.
First processor control second switch conducting after, can also include:
When first processor determines that call duration time is less than third preset time, after the arrival of third preset time, terminate logical
Letter, wherein the starting point of call duration time is the time point that second switch is connected, the terminal of call duration time is to receive the second communication to disappear
The time point of breath.
Alternatively, first processor sends communication and keeps when first processor determines that call duration time is greater than third preset time
Instruction, second third preset time of superposition terminate communication after second third preset time for reaching superposition.
Wherein, in the present embodiment, third preset time T 5 is the duration of a preset communication time.For example, setting T5
Time a length of 500ms, as T1+T2+T3+T4 < 500ms, first processor after 500ms timing, terminate communication;If
When T1+T2+T3+T4 > 500ms, first processor sends communication and keeps instruction, superposition after determining T1+T2+T3+T4 > 500ms
The communication duration of one 500ms terminates communication after second 500ms timing, wherein the duration of T5 by the first equipment and
Specific data decision when second equipment designs, it is not limited here.
After terminating communication, after first processor may also pass through the 4th preset time, the disconnection of control second switch,
First switch conducting.
Optionally, after terminating communication, the first equipment disconnects second switch, conducting first switch, switches back into charging mould
Formula, the 4th preset time first switch back into charge mode for waiting the second equipment.Wherein, in the present embodiment, the 4th it is default when
Between can be 100ms, the specific duration of the 4th preset time without limitation, is subject to actual conditions.Increase a time,
It can guarantee the passive charging module that 5V voltage is directly sent to the second equipment after the first equipment switches back into charge mode, prevent
5V voltage is sent in the second processor of the second equipment.
Fig. 4 is the structural schematic diagram of the second equipment in the application first embodiment.
As shown in figure 4, the second equipment 200 includes: second processor 203, third switch 202, the 4th switch 204, third
The control terminal of switch 202, the control terminal of the 4th switch 204 are communicated to connect with the control interface of second processor 203, and third is opened
First connectivity port of pass 202 is connect with passive charging module 201, the second connection end mouth of third switch 202 and second loads
Port 205 connects, and the first connectivity port of the 4th switch 204 is connect with the second communication interface of second processor 203, the 4th opens
The second connection end mouth of pass 204 is connect with the second load port 205, and the second load port 205 is used to connect the first equipment 100,
Second load port 205 is connect by bus with the first equipment 100.
Wherein, in the present embodiment, the passive charging module 201 of the second equipment 200 includes charging chip and battery, charging
After chip handles the first equipment 100 by the 5V that VBUS is inputted, charge the battery.
In a kind of embodiment, third switch 202 and the 4th switch 204 are realized using switch chip, third switch 202
It is connect respectively with two GPIO of second processor 203 with the 4th switch 204, second processor 203 passes through two GPIO of control
Level realize the on-off of third switch 202 and the 4th switch 204.
Optionally, the second communication interface includes TX interface and RX interface, and TX interface is in parallel with RX interface, while being opened with the 4th
204 series connection are closed, pull-up resistor is additionally provided between the second communication interface and third switch 204, is in series with diode on TX interface, two
The anode of pole pipe is connect with pull-up resistor, and cathode is connect with TX interface, interference when reducing communication to reach between equipment, enhancing
The purpose of stability.
Optionally, in the present embodiment, the second load port 205 uses POGO PIN as port interface, the second load
Port 205 is connect by VBUS with the first equipment 100, and by VBUS completion with the communication of the first equipment 100 and to second
Equipment 200 charges.
Fig. 5 is that the serial ports charging communication multiplexing method that the application first embodiment provides shows applied to the process of the second equipment
It is intended to.
As shown in figure 5, this method comprises:
After S301, second processor obtain communication start instruction, the disconnection of control third switch, the 4th switch conduction, wherein
The default conducting of third switch under second equipment non-communicating state.
Wherein, under non-communicating state, the default conducting of first switch, the first equipment is negative by charging module and first at this time
Load port conducting, the first equipment export 5V voltage by the first load port, for the second equipment charge.
In the present embodiment, third switch disconnects, after the 4th switch conduction, and the second communication interface of second processor passes through
4th switch accesses VBUS with the second load port, and preparation is communicated with the first equipment.
S302, second processor receive that the first equipment for receiving of the second load port sends by the second communication interface the
One communication information.
Optionally, after second processor obtains communication start instruction, the disconnection of control third switch, the 4th switch conduction, packet
It includes: if second processor detects the low preset range of voltage drop in bus, controlling the disconnection of third switch, the 4th switch of control is led
It is logical.
Wherein, the voltage on second processor controlling bus VBUS, to obtain the state on current VBUS.Such as: when
Then it is the state of charging when the upper voltage of VBUS is 5V, if voltage is 3.3V on VBUS, enters the state for preparing communication, if
It is then the state of data communication when the upper voltage of VBUS is 2.6V.
In the present embodiment, the communication start instruction that second processor obtains is that second processor detects voltage in bus
3.3V is reduced to by 5V, the third switch of second processor control at this time disconnects, controls the 4th switch conduction, switches to communication mould
Formula.
Second processor is led to by first that the second communication interface receives the first equipment transmission that the second load port receives
After letter message, further includes: second processor passes through the second communication after receiving the second preset time of the first communication information
Interface sends the second communication information and send the second communication to the first equipment by the second load port to the second load port to disappear
Breath.
Optionally, in the present embodiment, the second communication information includes feedback data, and the feedback data is logical for feeding back first
Believe the corresponding data that message indicates that the second equipment obtains.Such as: the first communication information can be earphone matched order, earphone electricity
Inquiry instruction or engineering debugging instruction etc. are measured, the second communication information is that the second equipment is anti-according to the specific instruction of the first communication information
Present corresponding information;If the first equipment sends earphone electricity quantity inquiring, instruction is used as the first communication information, the second communication information
Content is the information about power of earphone.
Second processor is to the second load port the second communication information of transmission and negative by second by the second communication interface
Load port to the first equipment send the second communication information after may include: second processor obtain the first equipment communication shape
State;After the first device end communication, second processor terminates to communicate.
Optionally, in a kind of implementation, second processor obtains the logical of the first equipment by the voltage on detection VBUS
Letter state.After first equipment has received the second communication information, the voltage on VBUS is restored to 3.3V by 2.6V, works as second processor
After detecting voltage change, terminate communication.
Control the second device end communication after, further includes: second processor control the 4th switch disconnect, third switch lead
It is logical.
Optionally, after second processor terminates communication, the second equipment disconnects the 4th switch, conducting third switch, cuts
Gain charge mode.
Fig. 6 is the serial ports of the first equipment and the second equipment charging telecommunication circuit schematic diagram in the application first embodiment.
As shown in fig. 6, serial ports charging telecommunication circuit includes: processor 601, diode 606, pull-up resistor 607, switch
One 603, switch 2 604, charging module 602, loading interfaces 605.
Wherein, processor 601 includes: GPIO16011, GPIO26012, TX interface 6014, RX interface 6013.
Charging module 602 is connected with switch 1, loading interfaces 605, control terminal and the processor 601 of switch 1
GPIO16011 connection.
TX interface 6014 on processor 601 is in parallel with RX interface 6013, at the same TX interface 6014 and RX interface 6013 with
Switch 2 604, loading interfaces 605 are connected, and between TX interface 6014, RX interface 6013 and switch 2 604, are parallel with pull-up electricity
Resistance 607,607 one end of pull-up resistor is connect with TX interface 6013, RX interface 6014 and switch 2 604, the other end and VCC (Volt
Current Condenser, supply voltage) 3.3V connection.
Diode 606 is connected with TX interface 6013, and the cathode of diode 606 is connect with TX interface, the anode of diode 606
It is connect with pull-up resistor 607.
Fig. 7 is the serial ports of the first equipment and the second equipment charging telecommunication circuit schematic diagram in the application first embodiment.
It is as shown in Figure 7:
In a kind of possible embodiment, the serial ports charging telecommunication circuit principle of the first equipment and the second equipment and first real
The difference place for applying example is that TX interface 6013 and pull-up resistor 607 are direct-connected.
Fig. 8 is the serial ports of the first equipment and the second equipment charging telecommunication circuit schematic diagram in the application first embodiment.
It is as shown in Figure 8:
In a kind of possible embodiment, the serial ports charging telecommunication circuit principle of the first equipment and the second equipment and first real
The difference place for applying example is that pull-up resistor 607 is connect with GPIO3 6015, and Integrated Service Digital Network is used to believe mode, 6015 mould of GPIO3
Quasi- serial communication, when sending data, GPIO3 6015 is in output mode, and when receiving data, GPIO3 6015 is in input mould
Formula.
In the present embodiment, the first equipment is identical with the circuit theory of the second equipment, wherein the charging module of the first equipment
602 be charging module, and the charging module 602 of the second equipment is passive charging module.
The signaling diagram of the first equipment, the charging communication of the second equipment of serial that Fig. 9 the application first embodiment provides.
As shown in figure 9, the process of serial ports charging communication includes:
S401, the first equipment obtain communication start instruction, disconnect first switch.
Whether S402, the first equipment detection bus voltage reduce, if detecting reduction, execute S403.
Second switch is connected in S403, the first equipment.
Whether S404, the second equipment detection bus voltage reduce, if detecting reduction, execute S405.
S405, the second equipment disconnect third switch, the 4th switch of conducting.
S406, the first equipment send the first communication information to the second equipment.
S407, the second equipment send the second communication information to the first equipment.
S408, the first device end communication.
S409, the first equipment disconnect second switch, and first switch is connected.
S410, the second device end communication.
S411, the second equipment disconnect the 4th switch, conducting third switch.
Figure 10 is the serial ports charging communication system schematic diagram that the application first embodiment provides.
As shown in Figure 10, in a kind of possible embodiment, which includes:
One the first equipment 100 and second equipment 200.
Wherein, the first equipment 100 is connected with the second equipment 200 by bus, when in the charging mode, the first equipment
100 the first load port exports 5V voltage, and voltage is 5V in bus at this time, and the second load port of the second equipment 200 inputs
5V voltage, and by 5V voltage input to the passive charging module of the second equipment 200.
In the present embodiment, when being in communication pattern, the first communication information is sent to by the first equipment 100 by bus
Second communication information after the second equipment 200 receives the first communication information, is sent to first by bus and set by the second equipment 200
Standby 100.
Figure 11 is the serial ports charging communication system schematic diagram that the application first embodiment provides.
As shown in figure 11, in a kind of possible embodiment, which includes:
One the first equipment 100 and two the second equipment 200.
Wherein, the first equipment 100 is connected with two the second equipment 200 by bus, when in the charging mode, first
First load port of equipment 100 exports 5V voltage, and voltage is 5V, the second load of two the second equipment 200 in bus at this time
Port inputs 5V voltage, and by 5V voltage input to the passive charging module of two the second equipment 200.
Optionally, it can be communicated wirelessly by bluetooth between two the second equipment 200.
In the present embodiment, when being in communication pattern, the first communication information is sent to by the first equipment 100 by bus
Two the second equipment 200, after two the second equipment 200 receive the first communication information, according to sequence of addresses, successively by the second communication
Message is sent to the first equipment 100 by bus.
Second embodiment
As shown in Fig. 2, in the present embodiment, the structure of the first equipment 100 is identical with the first embodiment, it is no longer superfluous herein
It states.
Figure 12 is the process that the serial ports charging communication multiplexing method that the application second embodiment provides is applied to the first equipment
Schematic diagram.
As shown in figure 12, this method comprises:
After S701, first processor obtain communication start instruction, when control first switch disconnects, second switch is connected, always
Voltage on line is the second predeterminated voltage, wherein the default conducting of first switch, charging mould under the first equipment non-communicating state
When block is connected to the first load port, the voltage in bus is the first predeterminated voltage.
Wherein, under non-communicating state, the default conducting of first switch, the first equipment is negative by charging module and first at this time
Load port conducting, the first equipment export the first predeterminated voltage by the first load port and are used for the second equipment charge.
Optionally, the first predeterminated voltage can be 5V voltage, the second predeterminated voltage can be 2.6V voltage or 3.3V voltage,
But not limited to this.
S702, first processor transmit the first communication information to the first load port by the first communication interface and pass through
First load port sends the first communication information to the second equipment.
In the present embodiment, the specific embodiment and first equipment of the first equipment of serial charging communication multiplexing method
Circuit theory is identical as in first embodiment, and details are not described herein.
As shown in figure 4, in the present embodiment, the second equipment includes second processor 201, the switch of third switch the 202, the 4th
204, the input terminal of third switch 202, the 4th switch 204 input terminal connect with voltage input interface, third switch 202
First connectivity port connect with passive charging module 201, the second connection end mouth of third switch 202 and the second load port 205
Connection, the first connectivity port of the 4th switch 204 connect with the second communication interface of second processor 203, the 4th switch 204
Second connection end mouth is connect with the second load port 205, and the second load port 205 is for connecting the first equipment, the second load end
Mouth 205 is connect by bus with the first equipment.
Wherein, in the present embodiment, the passive charging module 201 of the second equipment 200 includes charging chip and battery, charging
After chip handles the first equipment 100 by the 5V that VBUS is inputted, charge the battery.
Optionally, in the present embodiment, the second load port 205 uses POGO PIN as port interface, but not with this
It is limited.Second load port 205 connect by VBUS with the first equipment 100, and leading to by VBUS completion and the first equipment 100
Believe and charges to the second equipment 200.
Figure 13 is the process that the serial ports charging communication multiplexing method that the application second embodiment provides is applied to the second equipment
Schematic diagram.
As shown in figure 13, this method comprises:
S801, when the voltage in the first equipment control bus be the first predeterminated voltage when, third switch conduction.It sets when first
When voltage in standby control bus is the second predeterminated voltage, third switch is disconnected.
Wherein, the second predeterminated voltage is consistent with the voltage of voltage input interface, and the first predeterminated voltage is greater than the second default electricity
Pressure.
In a kind of embodiment, under non-communicating state, the default conducting of the first switch of the first equipment, the first equipment will at this time
Charging module is connected with the first load port, the first equipment by the first load port export the first predeterminated voltage, second
After second load port of equipment inputs the first predeterminated voltage, third switch conduction, at this point, the first predeterminated voltage on VBUS is used
In to the second equipment charge.
Under communications status, second switch is connected, and the port RX, the port TX of first processor and VBUS connect in the first equipment
Logical, the voltage on VBUS is the second predeterminated voltage at this time, after the second load port of the second equipment inputs the second predeterminated voltage, the
Three switches disconnect, at this point, the second predeterminated voltage on VBUS is used for the first equipment and the second communication between devices.
S802, second processor receive that the first equipment for receiving of the second load port sends by the second communication interface the
One communication information.
Optionally, after third switch disconnects, the second equipment switches to communication mode, at this time second processor in the second equipment
TX interface, RX interface by the 4th switch to the second loading interfaces send data.
Figure 14 is the serial ports charging telecommunication circuit schematic diagram of the second equipment in the application second embodiment.
As shown in figure 14, in a kind of possible embodiment, the serial ports charging telecommunication circuit of second equipment includes: second
Processor 901, the second diode 903, third diode 904, loading interfaces 905, field-effect tube 906, the second pull-up resistor
908, input terminal 909, first resistor 910, second resistance 911.
Wherein, second processor 901 includes: the second communication interface 907, the second communication interface 907 include TX interface 9071,
RX interface 9072.
In a kind of embodiment, third switch 202 includes: the second diode 903, third diode 904.Second diode
903 anode is connect with the second load port 905, the cathode of the cathode of the second diode 903 and third diode 904 with quilt
Dynamic charging module 902 connects, and the anode of third diode 904 is connect with voltage input interface 909.Wherein, third switch 202
Input terminal is the anode of third diode 904, the first connectivity port of third switch 202 be the second diode 903 cathode with
The cathode of third diode 904, the second connection end mouth of third switch 202 are the anode of the second diode 903.
Wherein, when the voltage on VBUS is the first predeterminated voltage, the default electricity of just extremely the first of the second diode 903
Pressure, the cathode of the second diode 903 are the second predeterminated voltage, since the first predeterminated voltage is greater than the second predeterminated voltage, the two or two
Pole pipe 903 is connected, and the second load port 905 is connect with passive charging module 902, at this point, third switch 202 is connected, second is set
It is standby to be in charge mode.
When the voltage on VBUS is the second predeterminated voltage, just extremely the second predeterminated voltage of the second diode 903, second
The cathode of diode 903 is the second predeterminated voltage, and the second diode 903 is not turned at this time, when the voltage on VBUS is 0V, the
The just extremely 0V of two diodes 903 is less than the cathode voltage of the second diode 903, and the second diode 903 is not turned on, at this point,
Three switches 202 disconnect, and the second equipment is in communication pattern.
In a kind of embodiment, the 4th switch 204 includes: field-effect tube 906, the second pull-up resistor 908.Field-effect tube
906 drain electrode is connect with the second load port 905, the first end of the source electrode of field-effect tube 906 and the second pull-up resistor 908 with
Second communication interface 907 of second processor 901 connects, the second end of the grid of field-effect tube 906 and the second pull-up resistor 908
Connection with voltage input interface 909.Wherein, the input terminal of the 4th switch 204 is the grid and the second pull-up of field-effect tube 906
The second end of resistance 908, the first connectivity port of the 4th switch 204 are the source electrode and the second pull-up resistor 908 of field-effect tube 906
First end, the second connection end mouth of the 4th switch 204 is the drain electrode of field-effect tube 906.
When second processor 901 carries out reception data by the 4th switch 204, when for high level, (second is default on VBUS
Voltage) when, the source electrode of field-effect tube 906 and the voltage of grid are consistent, and field-effect tube 906 is not turned on, and RX interface 9071, which receives, to be come
From 908 high level of the second pull-up resistor;When on VBUS being low level (0V), the source electrode of field-effect tube 906 and drain electrode pass through field
RX interface 9071 is set to low level by the diode current flow given in effect pipe 906.
When second processor 901 carries out transmission data by the 4th switch 204, when TX interface 9072 sends high level,
The source electrode of field-effect tube 906 is consistent with grid voltage, and field-effect tube 906 is not turned on, and keeps high level on VBUS at this time, when TX is tied
When mouth 9072 sends low level, the source voltage of field-effect tube 906 is lower than drain voltage, and field-effect tube 906 is connected, by VBUS's
Voltage is pulled to low level, completes to send.
Optionally, between TX interface 9072 and the 4th switch 204, second resistance 911, second resistance can also be set
911 for protecting circuit in voltage when the error occurs.
Optionally, between the 4th switch 204 and the second load port 905, first resistor 910 can also be set, first
Resistance 910 is used to protect circuit when the error occurs in voltage.
It should be noted that in this application, the number such as the first predeterminated voltage, the second predeterminated voltage, 0V, 2.6V, 3.3V, 5V
According to, refer to voltage value close to the numerical value, and not necessarily accurately be the numerical value, for example, 5V can be 5.1V, 5.3V, 4.9V,
4.6V etc., 0V can be 0.1V, 0.2V, 0.4V etc., herein with no restrictions.
In a kind of embodiment, receive that the second load port receives by the second communication interface in second processor first
After the first communication information that equipment is sent, further includes: second processor is when receive the first communication information second is default
Between after, the second communication information is sent and by the second load port to first to the second load port by the second communication interface
Equipment sends the second communication information.
Optionally, the second communication information includes feedback data, and the feedback data is for feeding back the first communication information instruction the
The corresponding data that two equipment obtain.Such as: the first communication information can be earphone matched order, earphone electricity quantity inquiring instruction or
Engineering debugging instruction etc., the second communication information are the second equipment according to the corresponding letter of the specific instruction of the first communication information feedback
Breath;If the first equipment sends the instruction of earphone electricity quantity inquiring and is used as the first communication information, the content of the second communication information is earphone
Information about power.
In second processor after receiving the second preset time of the first communication information, pass through the by second processor
Two communication interfaces send the second communication information to the second load port and send second to the first equipment by the second load port
After communication information, further includes: second processor obtains the communications status of the first equipment.After the first device end communication, the
Two processors terminate to communicate.
Optionally, in a kind of implementation, second processor obtains the logical of the first equipment by the voltage on detection VBUS
Letter state.For example, the voltage on VBUS is restored to 3.3V by 2.6V, when second after the first equipment has received the second communication information
After processor detects voltage change, terminate communication.
The signaling diagram of the first equipment, the charging communication of the second equipment of serial that Figure 15 the application second embodiment provides.
As shown in figure 15, the process of serial ports charging communication includes:
S1001, the first equipment obtain communication start instruction, disconnect first switch.
Wherein, before the first equipment obtains communication start instruction, the voltage on VBUS is the first predeterminated voltage.
Whether S1002, the first equipment detection bus voltage reduce, if detecting reduction, execute S1003.
Second switch is connected in S1003, the first equipment.
Wherein, after the first equipment conducting second switch, the voltage on VBUS is the second predeterminated voltage or 0V
S1004, the second equipment receive VBUS transmission the second predeterminated voltage or 0V, third switch disconnect.
S1005, the first equipment send the first communication information to the second equipment.
S1006, the second equipment send the second communication information to the first equipment.
S1007, the first device end communication.
S1008, the first equipment disconnect second switch, and first switch is connected.
Wherein, after first switch being connected, the voltage on VBUS is the first predeterminated voltage.
S1009, the second equipment receive the first predeterminated voltage of VBUS transmission, third switch conduction.
S1010, the second device end communication.
Serial communication system provided in this embodiment is consistent with the serial ports of first embodiment charging communication system, herein no longer
It repeats.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of unit, only
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit
It connects, can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.