CN116470613A - Port control circuit, serial bus port control method and device - Google Patents

Port control circuit, serial bus port control method and device Download PDF

Info

Publication number
CN116470613A
CN116470613A CN202310431980.XA CN202310431980A CN116470613A CN 116470613 A CN116470613 A CN 116470613A CN 202310431980 A CN202310431980 A CN 202310431980A CN 116470613 A CN116470613 A CN 116470613A
Authority
CN
China
Prior art keywords
port
serial bus
sampling
voltage
bus port
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.)
Pending
Application number
CN202310431980.XA
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202310431980.XA priority Critical patent/CN116470613A/en
Publication of CN116470613A publication Critical patent/CN116470613A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0042Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by the mechanical construction
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a port control circuit, a serial bus port control method and a serial bus port control device, and belongs to the technical field of electronics. The port control circuit is applied to first electronic equipment, and first electronic equipment includes serial bus port, and the port control circuit includes: the voltage dividing circuit is connected with the serial bus port and the first power supply; the logic control module is connected with the voltage dividing circuit, and is provided with a sampling port which is used for sampling the voltage of the voltage dividing circuit; the logic control module is used for determining the equipment type of the second electronic equipment according to the voltage sampling amplitude of the sampling port under the condition that the serial bus port is connected with the second electronic equipment, and controlling the serial bus port to work according to the equipment type.

Description

Port control circuit, serial bus port control method and device
Technical Field
The application belongs to the technical field of electronics, and particularly relates to a port control circuit, a serial bus port control method and a serial bus port control device.
Background
Currently, with the development of mobile terminal technology, mobile terminals adopting a fast charging technology are increasing. However, the implementation of the fast-charging scheme, especially the implementation of the third-party fast-charging scheme, often needs to complete the functions of positive and negative plug identification, peripheral type identification and the like by means of an external CC Logic IC (Configuration Channel Logic Integrated Circuit ), thus increasing the production cost of the mobile electronic device, and the design difficulty of layout wiring is increased by arranging a corresponding peripheral matching circuit.
Disclosure of Invention
An object of the embodiments of the present application is to provide a port control circuit, a control method and an apparatus for a serial bus port, which can solve the problem of reducing the production cost of a mobile electronic device and reducing the design difficulty of an internal circuit layout wiring.
In a first aspect, an embodiment of the present application provides a port control circuit applied to a first electronic device, where the first electronic device includes a serial bus port, and the port control circuit includes: the voltage dividing circuit is connected with the serial bus port and the first power supply; the logic control module is connected with the voltage dividing circuit, and is provided with a sampling port which is used for sampling the voltage of the voltage dividing circuit; the logic control module is used for determining the equipment type of the second electronic equipment according to the voltage sampling amplitude of the sampling port under the condition that the serial bus port is connected with the second electronic equipment, and controlling the serial bus port to work according to the equipment type.
In a second aspect, an embodiment of the present application provides a control method of a serial bus port, where the method is executed by a logic control module in the port control circuit of the first aspect, and the control method includes: acquiring a voltage sampling amplitude of a sampling port; under the condition that the serial bus port is connected with the second electronic equipment, determining the equipment type of the second electronic equipment according to the voltage sampling amplitude; and controlling the serial bus port to work according to the type of the device.
In a third aspect, an embodiment of the present application provides a control device for a serial bus port, where the device is applied to a first electronic device including the port control circuit of the first aspect, and the control device includes: the acquisition unit is used for acquiring the voltage sampling amplitude of the sampling port; the processing unit is used for determining the equipment type of the second electronic equipment according to the voltage sampling amplitude under the condition that the serial bus port is connected with the second electronic equipment; and the control unit is used for controlling the serial bus port to work according to the equipment type.
In a fourth aspect, embodiments of the present application provide an electronic device including a processor and a memory storing a program or instructions executable on the processor, the program or instructions implementing the steps of the method of controlling a serial bus port as in the second aspect when executed by the processor.
In a fifth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the method for controlling a serial bus port as in the second aspect.
In a sixth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement the steps of the method for controlling a serial bus port as in the second aspect.
In a seventh aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executed by at least one processor to implement the steps of the method of controlling a serial bus port as in the second aspect.
The port control circuit provided in the embodiment of the application is applied to a first electronic device comprising a serial bus port and a first power supply. Specifically, the port control circuit comprises a voltage division circuit and a logic control module. The voltage dividing circuit is connected with the serial bus port and the first power supply; the logic control module is connected with the voltage dividing circuit, and is provided with a sampling port for sampling the voltage of the voltage dividing circuit. Further, the logic control module is used for determining the equipment type of the second electronic equipment according to the voltage sampling amplitude of the sampling port under the condition that the serial bus port is connected with the second electronic equipment, and controlling the serial bus port to work according to the equipment type.
By means of the port control circuit, the external equipment of the serial bus port, namely the equipment type of the second electronic equipment, is identified by combining hardware voltage sampling and software control logic, and the serial bus port is controlled to work correspondingly. Therefore, the port control circuit can replace an externally added CC Logic IC to work, and a peripheral matching circuit is not required to be additionally arranged, so that the production cost of the electronic equipment is reduced, the number of wires of an internal circuit can be reduced, the layout area of the wires is reduced, and the layout difficulty of the wires is greatly reduced.
Drawings
FIG. 1 is one of the block diagrams of the port control circuit provided in the embodiment of the present application;
FIG. 2 is a second block diagram of a port control circuit according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a port control circuit according to an embodiment of the present disclosure;
FIG. 4 is a second schematic diagram of a port control circuit according to an embodiment of the present disclosure;
FIG. 5 is a third schematic diagram of a port control circuit according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a port control circuit according to an embodiment of the present disclosure;
FIG. 7 is a fifth schematic diagram of a port control circuit according to an embodiment of the present disclosure;
fig. 8 is a flow chart of a control method of a serial bus port according to an embodiment of the present application;
FIG. 9 is a block diagram of a control device for a serial bus port according to an embodiment of the present disclosure;
fig. 10 is a block diagram of an electronic device according to an embodiment of the present application;
fig. 11 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
The corresponding relationship between each hardware structure and the reference number in fig. 3 to fig. 7 is as follows:
rs1 first protection resistor, rs2 second protection resistor, ru1 first pull-up resistor, ru2 second pull-up resistor, rd1 first pull-down resistor, rd2 second pull-down resistor, D1 first anti-reverse-filling diode, D2 second anti-reverse-filling diode, R1 first resistor and R2 second resistor.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or otherwise described herein, and that the objects identified by "first," "second," etc. are generally of a type and do not limit the number of objects, for example, the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The port control circuit provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings by means of specific embodiments and application scenarios thereof.
As shown in fig. 1, the embodiment of the present application provides a port control circuit 100, wherein the port control circuit 100 is applied to a first electronic device including a serial bus port 200 and a first power supply 300.
The serial bus port 200 may be a universal serial bus C-Type port, i.e. Type-C port, and in practical application, the serial bus port 200 may be another Type of port, which is not limited herein.
Specifically, as shown in fig. 1, the port control circuit 100 includes a voltage divider 102 and a logic control module 104.
As shown in fig. 1, the voltage dividing circuit 102 is connected to the first power supply 300, and the first power supply 300 can be specifically used as a pull-up power supply of the voltage dividing circuit 102.
Further, as shown in fig. 1, the logic control module 104 is connected to the voltage divider 102. The logic control module 104 is provided with a sampling port 106, and the sampling port 106 is used for sampling the voltage of the voltage division circuit 102.
In practical applications, the logic control module 104 may be an SOC (System on Chip) or a PMU (Power Management Unit ). The sampling port 106 may be an ADC (Analog-to-Digital Converter) sampling port.
Further, as shown in fig. 1, the voltage dividing circuit 102 is connected to the serial bus port 200. Specifically, the voltage divider circuit 102 is connected to the CC1 pin or the CC2 pin of the serial bus port 200.
On the basis, in the working process of the first electronic device, in the case that the serial bus port 200 is connected with a second electronic device which is external, the logic control module 104 can determine the device type of the second electronic device according to the voltage sampling amplitude of the voltage dividing circuit 102 by the sampling port 106, and control the serial bus port 200 to work according to the device type.
The device type of the second electronic device is used for indicating a master-slave relationship between the first electronic device and the second electronic device. That is, the logic control module 104 determines whether the second electronic device connected to the serial bus port 200 is functioning as a master device or a slave device compared to the first electronic device by sampling the voltage of the sampling port 106.
Specifically, in the case that the serial bus port 200 of the first electronic device is not connected to any external device, the logic control module 104 may determine a target value according to the sampling amplitude of the voltage division circuit 102 by the sampling port 106. On the basis, when the serial bus port 200 of the first electronic device is connected to the external device, i.e. the second electronic device, the logic control module 104 can compare the current voltage sampling amplitude of the sampling port 106 with the target value, determine the master-slave relationship between the first electronic device and the second electronic device according to the comparison result, and further control the serial bus port 200 to perform the tasks of charging, power supply, data receiving, data sending, and the like based on the determined master-slave relationship.
Under the condition that the voltage sampling amplitude of the sampling port 106 is greater than the target value, the logic control module 104 determines that the second electronic device is a master device and determines that the first electronic device is a slave device; in the case that the voltage sampling amplitude of the sampling port 106 is smaller than the target value, the logic control module 104 determines that the first electronic device is a master device and determines that the second electronic device is a slave device.
In summary, by the port control circuit 100 provided in the embodiment of the present application, the hardware voltage sampling and the software control logic are combined to identify the device type of the external device, i.e. the second electronic device, of the serial bus port 200, so as to control the serial bus port 200 to perform corresponding operations. Thus, the port control circuit 100 can replace an externally added CC Logic IC to work without adding a peripheral matching circuit, so that the production cost of the electronic equipment is reduced, the number of wires of an internal circuit can be reduced, the layout area of the wires is reduced, and the layout difficulty of the wires is greatly reduced.
In this embodiment, further, as shown in fig. 2, the voltage dividing circuit 102 may include a protection branch 110 and a voltage dividing branch 112.
As shown in fig. 2, the protection branch 110 is connected to the serial bus port 200, the voltage dividing branch 112, and the sampling port 106. Specifically, a first end of the protection branch 110 is connected to the serial bus port 200, and a second end of the protection branch 110 is connected to a first end of the voltage dividing branch 112 and the sampling port 106. During operation of the port control circuit 100, the protection branch 110 is used to protect the sampling port 106 from static electricity and surges.
Further, as shown in fig. 2, the voltage dividing branch 112 is connected to the first power supply 300 and the sampling port 106. Specifically, a first end of the voltage dividing branch 112 is connected to the sampling port 106, and a second end of the voltage dividing branch 112 is connected to the first power supply 300.
Based on the voltage division effect of the voltage division branch 112, when the serial bus port 200 is connected to an external device, namely a second electronic device, the voltage sampling amplitude of the voltage division circuit 102 can be changed by the sampling port 106, and then the logic control module 104 can judge the device type of the connected second electronic device based on the voltage sampling amplitude of the sampling port 106. Thus, the port control circuit 100 can replace an externally added CC Logic IC to work, so that the production cost of the electronic equipment is reduced, and meanwhile, the difficulty of circuit routing layout is greatly reduced.
In this embodiment, further, as shown in fig. 2, the protection circuit 110 may specifically include a protection resistor 114.
As shown in fig. 2, the protection resistor 114 is connected to the serial bus port 200, the voltage dividing branch 112, and the sampling port 106. During operation of the port control circuit 100, static electricity and surge of the sampling port 106 are protected by the protection resistor 114, so that protection of the sampling port 106 and the serial bus port 200 is realized.
In an actual application process, the protection resistor 114 may be a resistor in a kiloohm (kΩ) level, and a specific resistance value of the protection resistor 114 may be selected by a person skilled in the art according to the actual situation, which is not limited herein.
In this embodiment, further, as shown in fig. 2, the voltage dividing branch 112 may specifically include a pull-up resistor 116 and a pull-down resistor 118.
As shown in fig. 2, a first end of the pull-up resistor 116 is connected to the first power supply 300, and a second end of the pull-up resistor 116 is connected to the protection resistor 114 and the sampling port 106.
Further, as shown in fig. 2, a first terminal of the pull-down resistor 118 is connected to a second terminal of the pull-up resistor 116, and a second terminal of the pull-down resistor 118 is grounded.
In the operation of the port control circuit 100, the pull-up resistor 116 and the pull-down resistor 118 are respectively used as external pull-up resistors of the sampling port 106, and can determine a default state when the serial bus port 200 is not inserted into other devices, such as a charger, a usb, and the like.
Further, based on the voltage division effect of the pull-up resistor 116 and the pull-down resistor 118, when the serial bus port 200 is connected to an external device, i.e. a second electronic device, the voltage value at the sampling point of the sampling port 106 can be pulled up or pulled down, so that the voltage sampling amplitude of the sampling port 106 to the voltage dividing circuit 102 can be changed, and the logic control module 104 can determine the device type of the connected second electronic device based on the voltage sampling amplitude of the sampling port 106. Thus, the port control circuit 100 can replace an externally added CC Logic IC to work, so that the production cost of the electronic equipment is reduced, and meanwhile, the difficulty of circuit routing layout is greatly reduced.
In an actual application process, the pull-up resistor 116 and the pull-down resistor 118 may be specific resistors of the 100kΩ level, and specific resistance values of the pull-up resistor 116 and the pull-down resistor 118 may be selected by those skilled in the art according to actual situations, which is not limited herein.
In this embodiment, further, as shown in fig. 2, the voltage dividing branch 112 may specifically further include the first diode 108.
As shown in fig. 2, the anode of the first diode 108 is connected to the first power supply 300, and the cathode of the first diode 108 is connected to the first end of the pull-up resistor 116.
During operation of the port control circuit 100, the first diode 108 acts as an anti-reverse current sink to prevent the current sink from damaging the voltage divider 102, thereby ensuring the reliability of operation of the voltage divider 102 and the port control circuit 100.
In summary, the port control circuit 100 provided in the embodiment of the present application realizes low-cost substitution of the CC Logic IC by means of the voltage division circuit+the platform adc+the charging software Logic adjustment combination. Therefore, when the platform sleeve is not provided with the CC protocol or a third party quick-charging scheme is used, low-cost compatibility can be realized, the production cost of the electronic equipment is reduced, and meanwhile, the difficulty of circuit wiring layout is greatly reduced.
In addition, it should be noted that, in the actual application process, in the case where the serial bus port 200 is a universal serial bus C-Type port, that is, a Type-C port, the Type-C port includes two CC pins, that is, a CC1 pin and a CC2 pin, and the two CC pins respectively correspond to the functional implementation of the Type-C port when the Type-C port is inserted in the forward and reverse directions. Therefore, the number of the voltage dividing circuits 102 and the sampling ports 106 can be two, and the two voltage dividing circuits 102 and the two sampling ports 106 are connected in a one-to-one correspondence manner, so that the effect can be achieved when the Type-C port is inserted in the forward and reverse directions, and the forward and reverse insertion function of the Type-C port is ensured.
Each voltage dividing circuit 102 includes a voltage dividing branch 112 and a protection branch 110, each protection branch 110 includes a protection resistor 114, and each voltage dividing branch 112 includes a pull-up resistor 116, a pull-down resistor 118, and a reverse-current preventing diode, i.e., the first diode 108.
Illustratively, as shown in fig. 3, the port control circuit may specifically include an ADC module and a voltage divider circuit. The voltage dividing circuit is connected to a CC1 pin and a CC2 pin of the Type-C port. Further, the ADC module may be specifically implemented by an SOC module or a PMU module provided with a plurality of sampling ports (i.e., ADC1, ADC2, ADC3, ADC4, ADC5, ADC 6).
Further, as shown in fig. 3, the voltage dividing circuit includes a first protection resistor Rs1, a second protection resistor Rs2, a first pull-up resistor Ru1, a second pull-up resistor Ru2, a first pull-down resistor Rd1, a second pull-down resistor Rd2, a first anti-reverse-filling diode D1, and a second anti-reverse-filling diode D2.
The first pull-up resistor Ru1 is connected with the first anti-reverse-filling diode D1, the first pull-down resistor Rd1, the first protection resistor Rs1 and the ADC3 sampling port, and the first protection resistor Rs1 is connected to the CC1 pin of the Type-C port. The second pull-up resistor Ru2 is connected with the second anti-reverse-filling diode D2, the second pull-down resistor Rd2, the second protection resistor Rs2 and the sampling port of the ADC4, and the second protection resistor Rs2 is connected to the CC2 pin of the Type-C port.
During the operation of the port control circuit, the first protection resistor Rs1 and the second protection resistor Rs2 are used for protecting static electricity and surge of the ADC module.
Further, the first pull-up resistor Ru1 and the second pull-up resistor Ru2 are used as pull-up resistors of the ADC module, the first pull-down resistor Rd1 and the second pull-down resistor Rd2 are used as pull-down resistors of the ADC module, and the default state when the Type-C port is not inserted into other devices is determined by the pull-up resistors.
Further, the first pull-up resistor Ru1, the first anti-reverse-filling diode D1, the first pull-down resistor Rd1 and the first protection resistor Rs1 form a first voltage dividing circuit, and the ADC3 sampling port is used for sampling the voltage of the first voltage dividing circuit. The second pull-up resistor Ru2, the second anti-reverse-filling diode D2, the second pull-down resistor Rd2 and the second protection resistor Rs2 form a second voltage dividing circuit, and the ADC4 sampling port is used for sampling voltage of the second voltage dividing circuit.
On the basis, under the condition that the Type-C port is connected with external equipment, the ADC module can judge the equipment Type of the connected external equipment based on the voltage sampling amplitude of the ADC3 sampling port or the ADC4 sampling port, and then control the Type-C port to work based on the judging result.
Specifically, the ADC module judges the device Type of the connected external device based on a comparison result of a voltage sampling amplitude value of the ADC sampling port when the Type-C port is connected to the external device and a sampling voltage value of the ADC sampling port when the Type-C port is not connected to any external device.
For example, as shown in fig. 4, when the Type-C port is connected to a first external device such as a charger, a USB hub, etc. through a CC1 pin, a voltage division circuit composed of a first pull-up resistor Ru1, a first anti-reverse-filling diode D1, a first pull-down resistor Rd1, and a first protection resistor Rs1 performs voltage division operation. At this time, as shown in fig. 4, the power VCC of the first external device, the first resistor R1 of the first external device, and the CC1 pin of the Type-C port are sequentially connected, and the first voltage dividing circuit is sampled through the ADC3 port.
Or, as shown in fig. 5, when the Type-C port is connected to a first external device such as a charger, a USB hub, etc. through a CC2 pin, the voltage division operation is performed by a second voltage division circuit formed by a second pull-up resistor Ru2, a second anti-reverse-filling diode D2, a second pull-down resistor Rd2, and a second protection resistor Rs 2. At this time, as shown in fig. 5, the power VCC of the first external device, the first resistor R1 of the first external device, and the CC2 pin of the Type-C port are sequentially connected, and the second voltage dividing circuit is sampled through the ADC4 port.
The resistance value of the first resistor R1 is generally 56kΩ, rs1 also belongs to kΩ -level resistors, and Rd1 is 100kΩ -level resistor. Under the condition that the Type-C port is connected with a first external device such as a charger, a USB hub and the like, based on the voltage division effect of each resistor in a voltage division circuit, the voltage sampling amplitude of the ADC3 port or the ADC4 port is: v1≡vcc×rd1/(R1) +Rs1+Rd1) ≡VCC.
At this time, compared with the sampling voltage value of the ADC sampling port when the Type-C port is not connected to any external device, the current voltage sampling amplitude of the ADC3 port or the ADC4 port is pulled up, so that the ADC module determines that the first external device connected to the Type-C port is the main device. On the basis, the ADC module controls the Type-C port to communicate with the first external device so as to acquire the charging specification parameters supported by the first external device, and configures the charging parameters of the ADC module based on the charging specification parameters so as to acquire the optimal charging specification.
For example, as shown in fig. 6, when the Type-C port is connected to a second external device such as a usb disk, a mobile hard disk, etc. through a CC1 pin, a voltage division circuit composed of a first pull-up resistor Ru1, a first anti-reverse-filling diode D1, a first pull-down resistor Rd1, and a first protection resistor Rs1 performs voltage division operation. At this time, as shown in fig. 6, the CC1 pin of the Type-C port is connected to the second resistor R2 of the second external device, and the second resistor R2 is grounded, and the first voltage dividing circuit is sampled through the ADC3 port.
Or, as shown in fig. 7, when the Type-C port is connected to a second external device such as a usb disk, a mobile hard disk, etc. through a CC2 pin, the voltage division operation is performed by a second voltage division circuit formed by a second pull-up resistor Ru2, a second anti-reverse-filling diode D2, a second pull-down resistor Rd2, and a second protection resistor Rs 2. At this time, as shown in fig. 7, the CC2 pin of the Type-C port is connected to the second resistor R2 of the second external device, and the second resistor R2 is grounded, and the second voltage division circuit is sampled through the ADC4 port.
The resistance value of the second resistor R2 is generally 5.1kΩ, rs1 also belongs to kΩ -level resistors, and Ru1 is 100kΩ -level resistor. Under the condition that the Type-C port is connected into a second external device such as a USB flash disk and a mobile hard disk, the voltage sampling amplitude values of the ADC3 port or the ADC4 port are all as follows based on the voltage division effect of each resistor in the voltage division circuit: v2≡pull-up power× (r2+r1)/(r2+r1+ru1) ≡0.
At this time, compared with the sampling voltage value of the ADC sampling port when the Type-C port is not connected to any external device, the current voltage sampling amplitude of the ADC3 port or the ADC4 port is pulled down, so that the ADC module determines that the second external device connected to the Type-C port is a slave device, and controls the Type-C port to output the power supply voltage.
An embodiment of the second aspect of the present application provides a method for controlling a serial bus port, where an execution body of a technical scheme of the method for controlling a serial bus port provided in the embodiment of the present application may be a control device of a serial bus port, and may specifically be determined according to an actual use requirement, and the embodiment of the present application is not limited. In order to more clearly describe the control method of the serial bus port provided in the embodiments of the present application, in the following method embodiments, an execution body of the control method of the serial bus port is exemplified as a control device of the serial bus port.
The control method of the serial bus port provided by the embodiment of the application is described in detail below by means of specific embodiments and application scenarios thereof with reference to the accompanying drawings.
As shown in fig. 8, the embodiment of the present application further provides a control method of a serial bus port, which may include the following S602 to S606:
s602: and acquiring the voltage sampling amplitude of the sampling port.
The control method of the serial bus port provided in the embodiment of the present application is executed by the logic control module in the port control circuit of the embodiment of the first aspect. The port control circuit is applied to the first electronic device.
The voltage sampling amplitude is obtained by sampling the voltage of a voltage dividing circuit in the port control circuit by a sampling port.
Further, the magnitude of the voltage sampling amplitude is related to whether the serial bus port is connected to the external device or not, and is also related to the resistance parameter of the connected external device.
S604: and under the condition that the serial bus port is connected with the second electronic device, determining the device type of the second electronic device according to the voltage sampling amplitude.
The magnitude of the voltage sampling amplitude is related to the resistance parameter of the external device connected to the serial bus port.
Therefore, in the control method for a serial bus port provided in the embodiment of the present application, when the serial bus port is connected with a second electronic device, the logic control module may determine, based on the magnitude of the voltage sampling amplitude of the sampling port, the configuration condition of the resistance parameter of the second electronic device, which is an external device connected to the serial bus port, and further determine the device type of the second electronic device.
The device type of the second electronic device is used for indicating a master-slave relationship between the first electronic device and the second electronic device. That is, the logic control module determines, through the voltage sampling amplitude of the sampling port, whether the second electronic device connected to the serial bus port is functioning as a master device or a slave device as compared with the first electronic device.
S606: and controlling the serial bus port to work according to the type of the device.
Specifically, after the logic control module determines the device type of the second electronic device based on the magnitude of the voltage sampling amplitude of the sampling port, the logic control module continues to control the serial bus port to perform the tasks of charging, power supply, data receiving, data sending and the like according to the master-slave relationship between the first electronic device and the second electronic device.
According to the control method of the serial bus port, in the working process of the first electronic device comprising the port control circuit, under the condition that the serial bus port of the first electronic device is connected with the second electronic device which is externally arranged, the logic control module can determine the device type of the second electronic device according to the voltage sampling amplitude of the sampling port, and then the serial bus port is controlled to work according to the device type. In this way, the voltage sampling and the software control Logic are combined to identify the type of the external equipment of the serial bus port, namely the equipment of the second electronic equipment, so that the serial bus port is controlled to work correspondingly, the external CC Logic IC is replaced, the production cost of the electronic equipment is reduced, the number of wires of an internal circuit is reduced, the layout area of the wires is reduced, and the layout difficulty of the wires is greatly reduced.
In the embodiment of the present application, the above S604 may specifically include the following S604a and S604b:
s604a: and under the condition that the voltage sampling amplitude is larger than the target value, determining the second electronic equipment as the main equipment.
The target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment.
Specifically, under the condition that the serial bus port of the first electronic device is not connected to any external device, the logic control module can determine a target value according to the voltage sampling amplitude of the sampling port. On the basis, under the condition that the serial bus port of the first electronic device is connected with the external device, namely the second electronic device, the logic control module can compare the current voltage sampling amplitude of the sampling port with the target value, and determine the master-slave relation between the first electronic device and the second electronic device according to the comparison result.
Wherein, in the case that the voltage sampling amplitude is greater than the target value, it is indicated that the voltage sampling amplitude is pulled up. At this time, the logic control module determines that the second electronic device is a master device, and determines that the first electronic device is a slave device.
S604b: and under the condition that the voltage sampling amplitude is smaller than the target value, determining that the second electronic equipment is the slave equipment.
Specifically, in the case where the voltage sampling amplitude of the sampling port is smaller than the above-described target value, it is explained that the voltage sampling amplitude is pulled down. At this time, the logic control module determines that the first electronic device is a slave device, and determines that the second electronic device is a master device.
According to the embodiment, under the condition that the serial bus port is connected with the second electronic device, the second electronic device is determined to be the main device under the condition that the voltage sampling amplitude of the sampling port is larger than the target value; under the condition that the voltage sampling amplitude is smaller than the target value, determining that the second electronic equipment is slave equipment; the target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment. Therefore, the equipment type of the second electronic equipment which is accessed to the serial bus port is determined based on the voltage sampling amplitude of the sampling port, the work substitution of the externally added CC Logic IC is realized, the production cost of the electronic equipment is reduced, the wiring quantity of an internal circuit is reduced, the wiring layout area is reduced, and the wiring layout difficulty is greatly reduced.
In the embodiment of the present application, the above S606 may specifically include the following S606a and S606b:
S606a: and under the condition that the second electronic equipment is the main equipment, controlling the serial bus port to acquire the first charging parameter of the second electronic equipment, and configuring the second charging parameter according to the first charging parameter.
Specifically, when the logic control module determines that the second electronic device is a master device and the first electronic device is a slave device based on the voltage sampling amplitude of the sampling port, the logic control module controls the serial bus port to communicate with the second electronic device so as to acquire a charging specification parameter supported by the second electronic device, namely, a first charging parameter through the serial bus port. On the basis, the logic control module configures the self charging parameters based on the acquired first charging parameters to obtain second charging parameters, so that the optimal charging specification is realized.
S606b: and controlling the serial bus port to output the power supply voltage to the second electronic device when the second electronic device is a slave device.
Specifically, when the logic control module determines that the first electronic device is a master device and determines that the second electronic device is a slave device based on the voltage sampling amplitude of the sampling port, the logic control module controls the serial bus port to output a power supply voltage to the second electronic device so as to realize power supply of the master device to the slave device.
According to the embodiment, under the condition that the second electronic device is the main device, the serial bus port is controlled to acquire the first charging parameter of the second electronic device, and the second charging parameter is configured according to the first charging parameter; and controlling the serial bus port to output the power supply voltage to the second electronic device when the second electronic device is a slave device. Thus, based on the master-slave relation of the first electronic device and the second electronic device, the serial bus port is controlled to execute corresponding functions, and reliable interaction between the master device and the slave device can be realized without setting an external CC Logic IC.
In addition, in the actual application process, when the first electronic device and the second electronic device are devices of the same class, for example, when two mobile phones are connected, a user can manually configure a master-slave relationship between the first electronic device and the second electronic device, and the logic control module further realizes that the master device supplies power to the slave device based on configuration parameters of the user.
In the method for controlling a serial bus port according to the embodiment of the second aspect of the present application, the execution body may be a control device for a serial bus port. In the embodiment of the present application, the control device for a serial bus port provided in the third aspect of the present application is described by taking the control device for a serial bus port as an example to execute the control method for a serial bus port.
As shown in fig. 9, an embodiment of the present application provides a control apparatus 700 for a serial bus port, which is applied to a first electronic device including the port control circuit of the embodiment of the first aspect. The control device 700 of the serial bus port may specifically include an acquisition unit 702, a processing unit 704, and a control unit 706 as follows:
an obtaining unit 702, configured to obtain a voltage sampling amplitude of a sampling port;
a processing unit 704, configured to determine a device type of the second electronic device according to the voltage sampling amplitude when the serial bus port is connected to the second electronic device;
a control unit 706, configured to control the operation of the serial bus port according to the device type.
According to the control device for the serial bus port, in the working process of the first electronic device comprising the port control circuit, under the condition that the serial bus port of the control device is connected with the second electronic device, the logic control module can determine the device type of the second electronic device according to the voltage sampling amplitude of the sampling port, and then the serial bus port is controlled to work according to the device type. In this way, the voltage sampling and the software control Logic are combined to identify the type of the external equipment of the serial bus port, namely the equipment of the second electronic equipment, so that the serial bus port is controlled to work correspondingly, the external CC Logic IC is replaced, the production cost of the electronic equipment is reduced, the number of wires of an internal circuit is reduced, the layout area of the wires is reduced, and the layout difficulty of the wires is greatly reduced.
In the embodiment of the present application, the processing unit 704 is specifically configured to: under the condition that the voltage sampling amplitude is larger than the target value, determining that the second electronic equipment is the main equipment; under the condition that the voltage sampling amplitude is smaller than the target value, determining that the second electronic equipment is slave equipment; the target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment.
According to the embodiment, under the condition that the serial bus port is connected with the second electronic device, the second electronic device is determined to be the main device under the condition that the voltage sampling amplitude of the sampling port is larger than the target value; under the condition that the voltage sampling amplitude is smaller than the target value, determining that the second electronic equipment is slave equipment; the target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment. Therefore, the equipment type of the second electronic equipment which is accessed to the serial bus port is determined based on the voltage sampling amplitude of the sampling port, the work substitution of the externally added CC Logic IC is realized, the production cost of the electronic equipment is reduced, the wiring quantity of an internal circuit is reduced, the wiring layout area is reduced, and the wiring layout difficulty is greatly reduced.
In the embodiment of the present application, the control unit 706 is specifically configured to: under the condition that the second electronic equipment is the main equipment, controlling the serial bus port to acquire a first charging parameter of the second electronic equipment, and configuring a second charging parameter according to the first charging parameter; and controlling the serial bus port to output the power supply voltage to the second electronic device when the second electronic device is a slave device.
According to the embodiment, under the condition that the second electronic device is the main device, the serial bus port is controlled to acquire the first charging parameter of the second electronic device, and the second charging parameter is configured according to the first charging parameter; and controlling the serial bus port to output the power supply voltage to the second electronic device when the second electronic device is a slave device. Thus, based on the master-slave relation of the first electronic device and the second electronic device, the serial bus port is controlled to execute corresponding functions, and reliable interaction between the master device and the slave device can be realized without setting an external CC Logic IC.
The control device 700 of the serial bus port in the embodiment of the present application may be an electronic device, or may be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The control device 700 of the serial bus port in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The control device 700 for a serial bus port provided in the embodiment of the third aspect of the present application can implement each process implemented by the method embodiment of fig. 8, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 10, the embodiment of the present application further provides an electronic device 800, including a processor 802 and a memory 804, where the memory 804 stores a program or an instruction that can be executed on the processor 802, where the program or the instruction implements each step of the embodiment of the control method of the serial bus port of the second aspect when executed by the processor 802, and the steps achieve the same technical effects, and are not repeated herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 11 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 900 includes, but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.
Those skilled in the art will appreciate that the electronic device 900 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 910 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 11 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than illustrated, or may combine some components, or may be arranged in different components, which are not described in detail herein.
The electronic device 900 of the embodiment of the present application may be used to implement the steps of the control method embodiment of the serial bus port of the second aspect described above.
Wherein the processor 910 is configured to obtain a voltage sampling amplitude of the sampling port.
The processor 910 is further configured to determine a device type of the second electronic device according to the voltage sampling amplitude in a case where the serial bus port is connected to the second electronic device.
Processor 910 is also configured to control the operation of the serial bus port based on the device type.
In this embodiment of the present application, the electronic device 900 includes the above-mentioned port control circuit, where, in a case where the serial bus port of the electronic device 900 is connected to a peripheral second electronic device, the logic control module therein may determine, according to the voltage sampling amplitude of the sampling port, the device type of the second electronic device, and further control the serial bus port to work according to the device type. In this way, the voltage sampling and the software control Logic are combined to identify the type of the external equipment of the serial bus port, namely the equipment of the second electronic equipment, so that the serial bus port is controlled to work correspondingly, the external CC Logic IC is replaced, the production cost of the electronic equipment is reduced, the number of wires of an internal circuit is reduced, the layout area of the wires is reduced, and the layout difficulty of the wires is greatly reduced.
Optionally, the processor 910 is specifically configured to: under the condition that the voltage sampling amplitude is larger than the target value, determining that the second electronic equipment is the main equipment; under the condition that the voltage sampling amplitude is smaller than the target value, determining that the second electronic equipment is slave equipment; the target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment.
According to the embodiment, under the condition that the serial bus port is connected with the second electronic device, the second electronic device is determined to be the main device under the condition that the voltage sampling amplitude of the sampling port is larger than the target value; under the condition that the voltage sampling amplitude is smaller than the target value, determining that the second electronic equipment is slave equipment; the target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment. Therefore, the equipment type of the second electronic equipment which is accessed to the serial bus port is determined based on the voltage sampling amplitude of the sampling port, the work substitution of the externally added CC Logic IC is realized, the production cost of the electronic equipment is reduced, the wiring quantity of an internal circuit is reduced, the wiring layout area is reduced, and the wiring layout difficulty is greatly reduced.
Optionally, the processor 910 is specifically configured to: under the condition that the second electronic equipment is the main equipment, controlling the serial bus port to acquire a first charging parameter of the second electronic equipment, and configuring a second charging parameter according to the first charging parameter; and controlling the serial bus port to output the power supply voltage to the second electronic device when the second electronic device is a slave device.
According to the embodiment, under the condition that the second electronic device is the main device, the serial bus port is controlled to acquire the first charging parameter of the second electronic device, and the second charging parameter is configured according to the first charging parameter; and controlling the serial bus port to output the power supply voltage to the second electronic device when the second electronic device is a slave device. Thus, based on the equipment type of the second electronic equipment, the serial bus port is controlled to execute corresponding functions, and reliable interaction between the master equipment and the slave equipment can be realized without setting an additional CC Logic IC.
It should be appreciated that in embodiments of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, with the graphics processor 9041 processing image data of still pictures or video obtained by an image capture device (e.g., a camera) in a video capture mode or an image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. Touch panel 9071, also referred to as a touch screen. The touch panel 9071 may include two parts, a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 909 may include a volatile memory or a nonvolatile memory, or the memory 909 may include both volatile and nonvolatile memories. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 909 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
Processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 910.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, where the program or the instruction implements each process of the embodiment of the control method of the serial bus port of the second aspect when executed by a processor, and the same technical effects can be achieved, so that repetition is avoided, and no redundant description is provided herein.
The processor is a processor in the electronic device in the above embodiment. Readable storage media include computer readable storage media such as computer readable memory ROM, random access memory RAM, magnetic or optical disks, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running a program or instructions, each process of the embodiment of the control method of the serial bus port in the second aspect is implemented, and the same technical effects can be achieved, so that repetition is avoided, and no redundant description is provided here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
The embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement each process of the embodiments of the control method of the serial bus port according to the second aspect, and achieve the same technical effects, and are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods of the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (13)

1. A port control circuit for use with a first electronic device, the first electronic device including a serial bus port, the port control circuit comprising:
the voltage dividing circuit is connected with the serial bus port and the first power supply;
the logic control module is connected with the voltage dividing circuit, and is provided with a sampling port for sampling the voltage of the voltage dividing circuit;
the logic control module is used for determining the equipment type of the second electronic equipment according to the voltage sampling amplitude of the sampling port under the condition that the serial bus port is connected with the second electronic equipment, and controlling the serial bus port to work according to the equipment type.
2. The port control circuit of claim 1, wherein the voltage divider circuit comprises:
the first end of the protection branch is connected with the serial bus port, and the second end of the protection branch is connected with the first end of the voltage division branch and the sampling port;
and the first end of the voltage dividing branch is connected with the sampling port, and the second end of the voltage dividing branch is connected with the first power supply.
3. The port control circuit of claim 2, wherein the protection branch comprises:
and the protection resistor is connected with the serial bus port and the voltage dividing branch circuit.
4. A port control circuit according to claim 3, wherein the voltage dividing branch comprises:
the first end of the pull-up resistor is connected with the first power supply, and the second end of the pull-up resistor is connected with the protection resistor and the sampling port;
and the first end of the pull-down resistor is connected with the second end of the pull-up resistor, and the second end of the pull-down resistor is grounded.
5. The port control circuit of claim 4, wherein the voltage dividing branch further comprises:
the positive electrode of the first diode is connected with the first power supply, and the negative electrode of the first diode is connected with the first end of the pull-up resistor.
6. A control method of a serial bus port, characterized by being executed by a logic control module in the port control circuit according to any one of claims 1 to 5, the control method comprising:
acquiring a voltage sampling amplitude of the sampling port;
Under the condition that the serial bus port is connected with second electronic equipment, determining the equipment type of the second electronic equipment according to the voltage sampling amplitude;
and controlling the serial bus port to work according to the equipment type.
7. The method of claim 6, wherein the determining the device type of the second electronic device according to the voltage sampling magnitude comprises:
under the condition that the voltage sampling amplitude is larger than a target value, determining that the second electronic equipment is main equipment;
determining that the second electronic device is a slave device when the voltage sampling amplitude is smaller than the target value;
the target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment.
8. The control method of a serial bus port according to claim 6 or 7, wherein the controlling the operation of the serial bus port according to the device type includes:
under the condition that the second electronic equipment is a main equipment, controlling the serial bus port to acquire a first charging parameter of the second electronic equipment, and configuring a second charging parameter according to the first charging parameter;
And controlling the serial bus port to output a power supply voltage to the second electronic device under the condition that the second electronic device is a slave device.
9. A control apparatus of a serial bus port, characterized by being applied to a first electronic device including the port control circuit of any one of claims 1 to 5, the control apparatus comprising:
the acquisition unit is used for acquiring the voltage sampling amplitude of the sampling port;
the processing unit is used for determining the equipment type of the second electronic equipment according to the voltage sampling amplitude value under the condition that the serial bus port is connected with the second electronic equipment;
and the control unit is used for controlling the serial bus port to work according to the equipment type.
10. The control device of a serial bus port according to claim 9, wherein the processing unit is specifically configured to:
under the condition that the voltage sampling amplitude is larger than a target value, determining that the second electronic equipment is main equipment;
determining that the second electronic device is a slave device when the voltage sampling amplitude is smaller than the target value;
the target value is a sampling voltage value of the sampling port under the condition that the serial bus port is not connected with equipment.
11. The control device of a serial bus port according to claim 9 or 10, wherein the control unit is specifically configured to:
under the condition that the second electronic equipment is a main equipment, controlling the serial bus port to acquire a first charging parameter of the second electronic equipment, and configuring a second charging parameter according to the first charging parameter;
and controlling the serial bus port to output a power supply voltage to the second electronic device under the condition that the second electronic device is a slave device.
12. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method of controlling a serial bus port as claimed in any one of claims 6 to 8.
13. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the control method of a serial bus port according to any of claims 6 to 8.
CN202310431980.XA 2023-04-21 2023-04-21 Port control circuit, serial bus port control method and device Pending CN116470613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310431980.XA CN116470613A (en) 2023-04-21 2023-04-21 Port control circuit, serial bus port control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310431980.XA CN116470613A (en) 2023-04-21 2023-04-21 Port control circuit, serial bus port control method and device

Publications (1)

Publication Number Publication Date
CN116470613A true CN116470613A (en) 2023-07-21

Family

ID=87174882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310431980.XA Pending CN116470613A (en) 2023-04-21 2023-04-21 Port control circuit, serial bus port control method and device

Country Status (1)

Country Link
CN (1) CN116470613A (en)

Similar Documents

Publication Publication Date Title
CN108604218B (en) Method for establishing connection between devices with universal serial bus USB Type-C interface and terminal device
US10439406B2 (en) Terminal and method for charging the same
US10042801B2 (en) System for detecting universal serial bus (USB) device and method thereof
CN105518967B (en) Apparatus and method for changing current limit
US9723408B2 (en) Electronic device and method of preventing erroneous recognizing inserting connector into earphone jack
US8578198B2 (en) Controlling power received through multiple bus interfaces in a portable computing device
CN103376871A (en) System, apparatus, and method of performing charging operation in host mode
CN111868535A (en) Method and circuit for detecting water immersion and electronic equipment
CN108681514A (en) Equipment detection method, device, storage medium and electronic equipment
CN109413532A (en) A kind of charging bluetooth earphone circuit and bluetooth headset
CN108873759B (en) Circuit, circuit protection method and electronic equipment
CN210006035U (en) USB and OTG function switching control circuit, device and mobile terminal
CN116470613A (en) Port control circuit, serial bus port control method and device
US9627901B2 (en) Charging circuit
CN111404242A (en) Charging method, charging device, storage medium and mobile terminal
CN108268402A (en) Protection circuit, guard method and the mobile terminal of Type-C interfaces
CN106776400B (en) Electronic equipment and circuit thereof, switching equipment and circuit thereof and signal control system
CN113625854B (en) Mainboard power-on control system, method and device and readable storage medium
CN105743538B (en) Binary channels mobile terminal and RF calibration system
CN113991804A (en) Charging protocol handshaking circuit and electronic equipment
CN106972568A (en) Charging detecting circuit, method and electronic equipment
JP2012203463A (en) Electronic device system and memory
JP2015207155A (en) Electronic apparatus
TWI587150B (en) Electronic device with multiple interfaces
CN112306213A (en) Display card mode switching method and device based on terminal, storage medium and terminal

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