CN108268402A - Protection circuit, guard method and the mobile terminal of Type-C interfaces - Google Patents
Protection circuit, guard method and the mobile terminal of Type-C interfaces Download PDFInfo
- Publication number
- CN108268402A CN108268402A CN201611263871.8A CN201611263871A CN108268402A CN 108268402 A CN108268402 A CN 108268402A CN 201611263871 A CN201611263871 A CN 201611263871A CN 108268402 A CN108268402 A CN 108268402A
- Authority
- CN
- China
- Prior art keywords
- pins
- voltage value
- resistance
- instruction
- connect
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
- G06F13/4072—Drivers or receivers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Abstract
An embodiment of the present invention provides a kind of protection circuit, guard method and the mobile terminal of Type C interface, the Type C interface has CC1 pins and CC2 pins, and the circuit includes:The GPIO detections port being connect with CC1 pins, for detecting the first voltage value on the CC1 pins;The ADC detections port being connect with CC2 pins, for detecting the second voltage value on the CC2 pins;The controller of port and ADC detections port is detected including the GPIO, for according to the first voltage value or second voltage value, generation to power on instruction;The CC logic processors being connect with the CC1 pins, CC2 pins and controller; for powering on instruction according to; power on operation is performed to the CC1 pins or CC2 pins; so that only when meeting specified conditions; the CC pins of mobile terminal Type C interface just power on; electriferous state need not be always maintained at, reduces the time of CC pins electrification, enhances the protection to Type C interface.
Description
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of protection circuit of Type-C interfaces, protection sides
Method and mobile terminal.
Background technology
USB (Universal Serial Bus, universal serial bus) is an external bus standard, for specification electricity
Being connected and communicate with for the terminal devices such as brain, mobile phone and external equipment, is a kind of interfacing applied in the communications field, includes
The interface type of a variety of different models such as USB Type-C or specification.USB Type-C are one kind popular in current industry
The development side of I/O (Input/Output, the input/output) interface of terminal devices such as USB interface and follow-up computer, mobile phone
To USB Type-C can support tow sides to plug, and the signal for transmitting data is stronger.
In USB Type-C interface specifications, CC pins can be used for having detected whether equipment (including CC1/CC2 pins)
It is inserted into.On the mobile terminal using Type-C interfaces, it is also to be drawn by CC that mobile terminal, which has detected whether that external equipment is inserted into,
The current source of foot/voltage source pull-up is realized.Therefore, the CC pins on the Type-C interfaces of mobile terminal usually require to protect always
Hold electriferous state.
But in the actual use process, Type-C interfaces are particularly easy to dirty, for example, fiber, environment on clothes
In impurity and the sweat such as dust, steam etc. can accelerate the corrosion of the CC pins of electrification, on CC pins and ground into incoming interface
Between form low impedance path, so as to influence detection of the CC pins to the equipment of insertion, be susceptible to the situation of erroneous judgement.
Invention content
The embodiment of the present invention provides a kind of protection circuit, guard method and the mobile terminal of Type-C interfaces, to solve
The CC pins of Type-C interfaces charge and are susceptible to corrosion always, the problem of influencing the detection to the equipment of insertion.
In a first aspect, an embodiment of the present invention provides a kind of protection circuit of Type-C interfaces, the Type-C interfaces tool
There are CC1 pins and CC2 pins, the circuit includes:
The GPIO detections port being connect with CC1 pins, for detecting the first voltage value on the CC1 pins;
The ADC detections port being connect with CC2 pins, for detecting the second voltage value on the CC2 pins;
The controller of port and ADC detections port is detected including the GPIO, for according to the first voltage value
Or second voltage value, generation power on instruction;
The CC logic processors being connect with the CC1 pins and CC2 pins, for powering on instruction according to, to described
CC1 pins or CC2 pins perform power on operation.
Second aspect, the embodiment of the present invention additionally provide a kind of guard method of Type-C interfaces, the Type-C interfaces
With CC1 pins and CC2 pins, the method includes:
When the CC1 pins for detecting external equipment and mobile terminal connect, the GPIO being connect with the CC1 pins is obtained
Detect the first voltage value on port;
When the CC2 pins for detecting external equipment and mobile terminal connect, the ADC being connect with the CC2 pins is obtained
Detect the second voltage value on port;
According to the first voltage value or second voltage value, generation powers on instruction;
Instruction is powered on according to described, power on operation is performed to the CC1 pins or CC2 pins.
The third aspect, the embodiment of the present invention additionally provide a kind of mobile terminal, and the mobile terminal has at least one
Type-C interfaces, the Type-C interfaces have CC1 pins and CC2 pins, and the mobile terminal includes controller and CC logics
Processor, the controller include GPIO detection ports and ADC detections port;
The GPIO detections port is connect with CC1 pins, for detecting the first voltage value on the CC1 pins;
The ADC detections port is connect with CC2 pins, for detecting the second voltage value on the CC2 pins;
The controller, for according to the first voltage value or second voltage value, generation to power on instruction;
The CC logic processors for powering on instruction according to, power on the CC1 pins or the execution of CC2 pins
Operation.
In this way, in embodiments of the present invention, by setting the protection circuit of a Type-C interfaces in the terminal, and will
Voltage value on the CC pins of detection is compared with the predeterminated voltage threshold value of corresponding port, so as to be less than in the voltage value
During equal to preset voltage threshold, the CC pins is controlled to power on so that only when meeting specified conditions, mobile terminal
The CC pins of Type-C interfaces just power on, and without being always maintained at electriferous state, reduce the time of CC pins electrification, avoid by
In CC pins charge always and caused by interface corrode, so as to the situation of testing result inaccuracy occur, enhance to Type-C
The protection of interface.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention
Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Figure 1A -1B are the structure diagrams of the protection circuit of the Type-C interfaces of first embodiment of the invention;
Fig. 2 is the flow chart of the guard method of the Type-C interfaces of second embodiment of the invention;
Fig. 3 is the block diagram of the mobile terminal of third embodiment of the invention;
Fig. 4 is the block diagram of the mobile terminal of fourth embodiment of the invention;
Fig. 5 is the structure diagram of the mobile terminal of fifth embodiment of the invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
First embodiment
With reference to Figure 1A, one of structure diagram of protection circuit of Type-C interfaces of first embodiment of the invention is shown,
The Type-C interfaces 110 have CC1 pins 111 and CC2 pins 112, and the circuit can specifically include such as lower part:
The GPIO detections port 121 being connect with CC1 pins 111, for detecting the first voltage on the CC1 pins 111
Value;
The ADC detections port 122 being connect with CC2 pins 112, for detecting the second voltage on the CC2 pins 112
Value;
The controller 120 of port 121 and ADC detections port 122 is detected including the GPIO, for according to described the
One voltage value or second voltage value, generation power on instruction;
The CC logic processors 130 being connect with the CC1 pins 111, CC2 pins 112 and controller 120, for basis
It is described to power on instruction, power on operation is performed to the CC1 pins 111 or CC2 pins 112.
In embodiments of the present invention, port 121 and ADC detections port can be detected by GP configuring IO in controller 120
122。
GPIO (General Purpose Input Output, universal input/output) is also referred to as bus extender, when
Microcontroller or chipset do not have enough I/O (input/output, input/output) ports or when system is needed using remote
When holding serial communication or control, GPIO products are capable of providing additional control and function for monitoring.
ADC (Analog-to-Digital Converter, A-D converter) is a kind of by continuously varying analog signal
The device of discrete digital signal is converted to, the detection port made according to ADC principles can be used for the circuit of detection connection
Voltage value.
In embodiments of the present invention, by the way that GP configuring IO detects port 121 in controller 120 and ADC detects port
122, connection ground CC pins Shangdi voltage condition can be detected in real time.
In embodiments of the present invention, there is situation about corroding due to charging always to mitigate CC pins, in usual feelings
Under condition, CC1 pins 111 and CC2 pins 112 in Type-C interfaces 110 are defaulted as not charged.
When there is external equipment to be inserted into mobile terminal Type-C interfaces 110, the CC pins of external equipment can be with inserting
CC1 pins 111 or CC2 pins 112 in the Type-C interfaces 110 entered contact, so as to fulfill the connection with mobile terminal.
If the CC pins contacts of external equipment is CC1 pins 111, the GPIO being connect with the CC1 pins 111 is examined
Survey the first voltage value that port 121 is able to detect that on CC1 pins 111;If the CC pins contacts of external equipment is CC2 pipes
Foot 112, then the ADC detections port 122 being connect with the CC2 pins 112 are able to detect that the second voltage on CC2 pins 112
Value.
In general, external equipment, after Type-C interfaces 110 are inserted into, Type-C interfaces 110 are needed using CC pins to inserting
The external equipment entered is detected or function switch, but CC pins could realize above-mentioned detection or work(only in the case of electrification
It can switching.
Therefore, after the voltage value on a certain detection port is detected, controller 120 can be directed to the voltage value and generate
Instruction is powered on, and indicates that CC logic processors 130 power on corresponding CC pins.
It in embodiments of the present invention, can be by the voltage value after voltage value of the controller 120 on some CC pin is obtained
It is compared with the voltage threshold of corresponding detection port, instruction is powered on to determine the need for generation.Specifically, it is if external
It is equipment CC pins contacts the CC1 pins 111 on mobile terminal Type-C interfaces 110, then controller 120 can be by described
One voltage value is compared with GPIO detections 121 corresponding first voltage threshold value of port, if the first voltage value is not
More than the first voltage threshold value, then generate CC1 pins 111 first powers on instruction;If external equipment CC pins contacts
Ground is the CC2 pins 112 on mobile terminal Type-C interfaces 110, then controller 120 can by the second voltage value with it is described
ADC detections 122 corresponding second voltage threshold value of port is compared, if the second voltage value is less than the second voltage
Threshold value, then generate CC2 pins 112 second power on instruction.
On the basis of Figure 1A, optionally, with reference to Figure 1B, the guarantor of the Type-C interfaces of first embodiment of the invention is shown
The two of the structure diagram of protection circuit, the circuit further include the first power supply 141, second source 142, the 151, second electricity of first resistor
Resistance 152,153 and the 4th resistance 154 of 3rd resistor.
In fig. ib, one end of the CC1 pins 111 is connect with one end of first resistor 151, the first resistor 151
The other end and one end of the 4th resistance 154 and GPIO detections port 121 connect, the other end of the 4th resistance 154 and the
One power supply 141 connects;One end of the CC2 pins 112 is connect with one end of second resistance 152, the second resistance 152 it is another
One end is connect with one end of 3rd resistor 153 and ADC detections port 122, the other end and second source of the 3rd resistor 153
142 connections.
In embodiments of the present invention, the first voltage threshold value can be determined by equation below:
The second voltage threshold value can be determined by equation below:
Wherein, R1For the resistance value of first resistor 151, R2For the resistance value of second resistance 152, R3For 3rd resistor 153
Resistance value, R4For the resistance value of the 4th resistance 154, RdFor the preset resistance value to ground resistance, VILFor first voltage threshold value,
V0For second voltage threshold value.
In the concrete realization, the resistance value of first resistor 151, the resistance value of second resistance 152, the electricity of 3rd resistor 153
Resistance value and the resistance value of the 4th resistance 154 can as possible select greatly a bit in the scope of design of permission;And for VILWith
V0, it is the insertion threshold value for CC1 pins 111 and CC2 pins 112, it therefore, can be by VILAnd V0Set as possible small by one
A bit.Certainly, those skilled in the art can according to actual needs specifically set above-mentioned each resistance and threshold value,
The embodiment of the present invention is not construed as limiting this.
In embodiments of the present invention, when the voltage value in Type-C interfaces 110 on some CC pin is less than or equal to the pipe
During the corresponding voltage threshold in detection port of foot connection, it is believed that have external equipment access, so as to which controller 120 can refer to
Show that CC logic processors power on the CC pins, CC pins after the power-up can be inserted into external equipment is subsequently examined
Survey or function switch.
In embodiments of the present invention, by setting the protection circuit of a Type-C interfaces in the terminal, and will detection
CC pins on voltage value be compared with the predeterminated voltage threshold value of corresponding port, so as to being less than or equal in the voltage value
During preset voltage threshold, the CC pins is controlled to power on so that only when meeting specified conditions, mobile terminal Type-C connects
The CC pins of mouth just power on, and without being always maintained at electriferous state, reduce the time of CC pins electrification, avoid due to CC pins
Charge always and caused by interface corrode, so as to the situation of testing result inaccuracy occur, enhance the guarantor to Type-C interfaces
Shield.
Second embodiment
With reference to Fig. 2, the flow chart of the guard method of the Type-C interfaces of second embodiment of the invention is shown, it specifically can be with
Include the following steps:
Step 201, it when the CC1 pins for detecting external equipment and mobile terminal connect, obtains and connects with the CC1 pins
The first voltage value on GPIO detections port connect;
In embodiments of the present invention, the mobile terminal can be the electronic equipment for having Type-C interfaces, for example, intelligence
Mobile phone, tablet computer etc., the embodiment of the present invention are not construed as limiting the concrete type of mobile terminal.
Type-C is a kind of connecting interface of USB interface, regardless of tow sides can be inserted into, size be about 8.3mm ×
2.5mm supports the functions such as charging, data transmission, the display output of USB standard as other interfaces.
In general, Type-C interfaces can include Type-C female seats and Type-C male connectors, wherein, Type C female seats include 24
Pin (PIN), wherein 2 CC pins;And Type C male connectors are then to include 22 pins, reduce one compared with Type C female seats
To D+/D- pins, Type C male connectors also include 2 CC pins.
In USB Type-C interface specifications, CC pins can be used for having detected whether equipment (including CC1/CC2 pins)
It is inserted into;On the mobile terminal using Type-C interfaces, mobile terminal can be pulled up real by current source/voltage source of CC pins
Now the insertion of external equipment is detected.
In embodiments of the present invention, GPIO detections port can be configured in the terminal, GPIO detections port can
To be connect with CC1 pins in Type-C interfaces, when there is external equipment to be inserted into mobile terminal, and during with CC1 pins contacts, the GPIO
Detection port is able to detect that the voltage value on CC1 pins.
Step 202, it when the CC2 pins for detecting external equipment and mobile terminal connect, obtains and connects with the CC2 pins
The second voltage value on ADC detections port connect;
On the other hand, ADC detections port can also be configured in the terminal to connect with CC2 pins, set when there is outside
It is standby to be inserted into mobile terminal, and during with CC2 pins contacts, ADC detections port is able to detect that the voltage value on CC2 pins.
Step 203, according to the first voltage value or second voltage value, generation powers on instruction;
In embodiments of the present invention, there is situation about corroding due to charging always to mitigate CC pins, in usual feelings
Under condition, CC1 pins and CC2 pins in Type-C interfaces are defaulted as not charged.
Therefore, when external equipment and CC1 pins contacts, GPIO detections port detects the first voltage value on CC1 pins
Afterwards, the controller of mobile terminal can be by the first voltage value first voltage threshold value corresponding with GPIO detections port
It is compared, if the first voltage value is less than the first voltage threshold value, generate CC1 pins first powers on finger
It enables, and the instruction is sent to CC logic processors.
If the when CC2 pins of external equipment contact, ADC detections port can detect the second electricity on CC2 pins
Pressure value, so as to which the controller can be by second voltage value second voltage threshold value corresponding with ADC detections port
It is compared, if the second voltage value is less than the second voltage threshold value, generate CC2 pins second powers on finger
It enables, and the instruction is sent to CC logic processors.
Step 204, instruction is powered on according to described, power on operation is performed to the CC1 pins or CC2 pins.
Specifically, instruction is powered on for first, it is believed that it is that CC1 pins are contacted with external equipment, it therefore, can basis
Described first powers on instruction, and the CC1 pins are powered on;And power on instruction for second, it is believed that be CC2 pins and outside
Equipment contacts, and therefore, can power on instruction according to described second, the CC2 pins are powered on.
CC1 pins or CC2 pins after the power is turned on can to contiguously external equipment carry out other kinds of detection or work(
It can switching.
In embodiments of the present invention, when detect external equipment and mobile terminal CC1 pins connect when, can obtain with
The first voltage value on the GPIO detections port of the CC1 pins connection;If detect the CC2 of external equipment and mobile terminal
When pin connects, then the second voltage value on the ADC detections port being connect with the CC2 pins can be obtained, so as to root
According to the first voltage value or second voltage value, generation powers on instruction, and power on instruction according to described, to the CC1 pins or
CC2 pins perform power on operation so that only when meeting specified conditions, in the CC pin ability of mobile terminal Type-C interfaces
Electricity without being always maintained at electriferous state, reduces the time of CC pins electrification, avoids since CC pins charge always and cause
Interface corrosion, so as to the situation of testing result inaccuracy occur, enhance the protection to Type-C interfaces.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it is all expressed as to a series of action group
It closes, but those skilled in the art should know, the embodiment of the present invention is not limited by described sequence of movement, because according to
According to the embodiment of the present invention, certain steps may be used other sequences or be carried out at the same time.Secondly, those skilled in the art also should
Know, embodiment described in this description belongs to preferred embodiment, and the involved action not necessarily present invention is implemented
Necessary to example.
3rd embodiment
With reference to Fig. 3, the block diagram of the mobile terminal of third embodiment of the invention is shown, the mobile terminal 300 specifically may be used
To include a Type-C interface 310, the Type-C interfaces 310 have CC1 pins 311 and CC2 pins 312, the movement
Terminal 300 can also include controller 320 and CC logic processors 330, and the controller 320 can include GPIO and detect port
321 and ADC detects port 322.
In embodiments of the present invention, the GPIO detections port 321 can be connect with CC1 pins 311, described for detecting
The first voltage value on CC1 pins 311;
The ADC detections port 322 can be connect with CC2 pins 312, for detecting second on the CC2 pins 312
Voltage value;
The controller 320, for according to the first voltage value or second voltage value, generation to power on instruction;
The CC logic processors 330, for powering on instruction according to, to the CC1 pins 311 or CC2 pins 312
Perform power on operation.
In embodiments of the present invention, the controller 320 is additionally operable to the first voltage value and the GPIO test sides
321 corresponding first voltage threshold values of mouth are compared, if the first voltage value is less than the first voltage threshold value,
The first of generation CC1 pins 311 power on instruction and, it is corresponding that the second voltage value and the ADC are detected into port 322
Second voltage threshold value is compared, if the second voltage value is less than the second voltage threshold value, generates CC2 pins
The second of 312 powers on instruction.
In embodiments of the present invention, the mobile terminal further includes the first power supply 341, second source 342, first resistor
351st, second resistance 352,353 and the 4th resistance 354 of 3rd resistor.
In embodiments of the present invention, one end of the CC1 pins 311 is connect with one end of first resistor 351, and described first
The other end of resistance 351 and one end of the 4th resistance 354 and GPIO detections port 321 are connect, the 4th resistance 354 it is another
End is connect with the first power supply 341.
One end of the CC2 pins 312 is connect with one end of second resistance 352, the other end of the second resistance 352 with
One end of 3rd resistor 353 and ADC detections port 322 connect, and the other end and the second source 342 of the 3rd resistor 353 connect
It connects.
Mobile terminal 300 can realize each process that mobile terminal is realized in the embodiment of the method for Fig. 2, to avoid weight
Multiple, which is not described herein again.It, can be with when the CC1 pins for detecting external equipment and mobile terminal connect in the embodiment of the present invention
Obtain the first voltage value on the GPIO detections port being connect with the CC1 pins;If detect external equipment with movement eventually
During the CC2 pins connection at end, then the second voltage value on the ADC detections port being connect with the CC2 pins can be obtained, so as to
It can generate according to the first voltage value or second voltage value and power on instruction, and instruction is powered on according to described, to the CC1
Pin or CC2 pins perform power on operation so that only when meeting specified conditions, the CC pins of mobile terminal Type-C interfaces
Just power on, without being always maintained at electriferous state, reduce the time of CC pins electrification, avoid since CC pins charge always and
Caused by interface corrode, so as to the situation of testing result inaccuracy occur, enhance the protection to Type-C interfaces.
Fourth embodiment
Fig. 4 is a kind of block diagram of mobile terminal of fourth embodiment of the invention.Mobile terminal 400 shown in Fig. 4 includes:Extremely
A few processor 401, memory 401, at least one network interface 404 and user interface 403.It is each in mobile terminal 400
A component is coupled by bus system 405.It is understood that bus system 405 is used to implement the connection between these components
Communication.Bus system 405 further includes power bus, controlling bus and status signal bus in addition in addition to including data/address bus.But
For the sake of clear explanation, various buses are all designated as bus system 405 in Fig. 4.
Wherein, user interface 403 can include display, keyboard or pointing device (for example, mouse, trace ball
(trackball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 401 in the embodiment of the present invention can be volatile memory or nonvolatile memory,
Or it may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory (Read-
OnlyMemory, ROM), programmable read only memory (ProgrammableROM, PROM), Erasable Programmable Read Only Memory EPROM
(ErasablePROM, EPROM), electrically erasable programmable read-only memory (ElectricallyEPROM, EEPROM) dodge
It deposits.Volatile memory can be random access memory (RandomAccessMemory, RAM), be used as external slow at a high speed
It deposits.By exemplary but be not restricted explanation, the RAM of many forms can be used, such as static RAM
(StaticRAM, SRAM), dynamic random access memory (DynamicRAM, DRAM), Synchronous Dynamic Random Access Memory
(SynchronousDRAM, SDRAM), double data speed synchronous dynamic RAM (DoubleDataRate
SDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronized links
Dynamic random access memory (SynchlinkDRAM, SLDRAM) and direct rambus random access memory
(DirectRambusRAM, DRRAM).The memory 401 of the system and method for description of the embodiment of the present invention is intended to include but unlimited
In the memory of these and any other suitable type.
In some embodiments, memory 401 stores following element, executable modules or data structures or
Their subset of person or their superset:Operating system 4011 and application program 4012.
Wherein, operating system 4011 comprising various system programs, such as ccf layer, core library layer, driving layer etc., are used for
Realize various basic businesses and the hardware based task of processing.Application program 4012 includes various application programs, such as media
Player (MediaPlayer), browser (Browser) etc., are used to implement various applied business.Realize embodiment of the present invention side
The program of method may be embodied in application program 4012.
In embodiments of the present invention, by calling program or the instruction of the storage of memory 401, specifically, can be application
The program stored in program 4012 or instruction, processor 401 are used to connect when the CC1 pins for detecting external equipment and mobile terminal
When connecing, the first voltage value on the GPIO detections port being connect with the CC1 pins is obtained;When detecting external equipment and movement
During the CC2 pins connection of terminal, the second voltage value on the ADC detections port being connect with the CC2 pins is obtained;According to described
The first voltage value or second voltage value, generation power on instruction;Instruction is powered on according to described, the CC1 pins or CC2 pins are held
Row power on operation.
The method that the embodiments of the present invention disclose can be applied to realize in processor 401 or by processor 401.
Processor 401 may be a kind of IC chip, have the processing capacity of signal.During realization, the above method it is each
Step can be completed by the integrated logic circuit of the hardware in processor 401 or the instruction of software form.Above-mentioned processing
Device 401 can be general processor, digital signal processor (DigitalSignalProcessor, DSP), application-specific integrated circuit
(ApplicationSpecific IntegratedCircuit, ASIC), ready-made programmable gate array
(FieldProgrammableGateArray, FPGA) either other programmable logic device, discrete gate or transistor logic
Device, discrete hardware components.It can realize or perform disclosed each method, step and the box in the embodiment of the present invention
Figure.General processor can be microprocessor or the processor can also be any conventional processor etc..With reference to the present invention
The step of method disclosed in embodiment, can be embodied directly in hardware decoding processor and perform completion or use decoding processor
In hardware and software module combination perform completion.Software module can be located at random access memory, and flash memory, read-only memory can
In the storage medium of this fields such as program read-only memory or electrically erasable programmable memory, register maturation.The storage
Medium is located at memory 401, and processor 401 reads the information in memory 401, and the step of the above method is completed with reference to its hardware
Suddenly.
It is understood that the embodiment of the present invention description these embodiments can use hardware, software, firmware, middleware,
Microcode or combination is realized.For hardware realization, processing unit can be realized in one or more application-specific integrated circuits
(ApplicationSpecificIntegratedCircuits, ASIC), digital signal processor
(DigitalSignalProcessing, DSP), digital signal processing appts (DSPDevice, DSPD), programmable logic device
(ProgrammableLogicDevice, PLD), field programmable gate array (Field-ProgrammableGateArray,
FPGA), general processor, controller, microcontroller, microprocessor, other electronics lists for performing function of the present invention
In first or combination.
For software implementations, can by perform the module (such as process, function etc.) of function described in the embodiment of the present invention come
Realize the technology described in the embodiment of the present invention.Software code is storable in memory and is performed by processor.Memory can
With portion realizes in the processor or outside the processor.
Optionally, the processor 401 is additionally operable to:By the first voltage value and the GPIO detection port corresponding the
One voltage threshold is compared, if the first voltage value is less than the first voltage threshold value, generates CC1 pins
First powers on instruction;Second voltage value second voltage threshold value corresponding with ADC detections port is compared, if
The second voltage value is less than the second voltage threshold value, then generate CC2 pins second powers on instruction.
Optionally, the processor 401 is additionally operable to:Instruction is powered on according to described first, the CC1 pins are powered on;Root
Instruction is powered on according to described second, the CC2 pins are powered on.
Mobile terminal 400 can realize each process that mobile terminal is realized in previous embodiment, be repeated to avoid, here
It repeats no more.The embodiment of the present invention when detect external equipment and mobile terminal CC1 pins connect when, can obtain with it is described
The first voltage value on the GPIO detections port of CC1 pins connection;If detect the CC2 pins of external equipment and mobile terminal
During connection, then the second voltage value on the ADC detections port being connect with the CC2 pins can be obtained, so as to according to institute
The first voltage value or second voltage value are stated, generation powers on instruction, and power on instruction according to described, and the CC1 pins or CC2 are managed
Foot performs power on operation so that and only when meeting specified conditions, the CC pins of mobile terminal Type-C interfaces just power on, without
Be always maintained at electriferous state, reduce CC pins electrification time, avoid due to CC pins charge always and caused by interface
Corrosion, so as to the situation of testing result inaccuracy occur, enhances the protection to Type-C interfaces.
5th embodiment
Fig. 5 is the structure diagram of the mobile terminal of fifth embodiment of the invention.Specifically, the mobile terminal 500 in Fig. 5
Can be mobile phone, tablet computer, personal digital assistant (PersonalDigital Assistant, PDA) or vehicle-mounted computer etc..
Mobile terminal 500 in Fig. 5 includes radio frequency (RadioFrequency, RF) circuit 510, memory 520, input list
Member 530, display unit 540, processor 560, voicefrequency circuit 570, WiFi (WirelessFidelity) module 580 and power supply
590。
Wherein, input unit 530 can be used for receiving number input by user or character information and generation and mobile terminal
The related signal input of 500 user setting and function control.Specifically, in the embodiment of the present invention, which can
To include touch panel 531.Touch panel 531, also referred to as touch screen collect user on it or neighbouring touch operation
(for example user uses the operations of any suitable object or attachment on touch panel 531 such as finger, stylus), and according to advance
The formula of setting drives corresponding attachment device.Optionally, touch panel 531 may include touch detecting apparatus and touch controller
Two parts.Wherein, the touch orientation of touch detecting apparatus detection user, and the signal that touch operation is brought is detected, by signal
Send touch controller to;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate,
The processor 560 is given again, and can be received the order that processor 560 is sent and be performed.Furthermore, it is possible to using resistance-type,
The multiple types such as condenser type, infrared ray and surface acoustic wave realize touch panel 531.In addition to touch panel 531, input unit
530 can also include other input equipments 532, other input equipments 532 can include but is not limited to physical keyboard, function key
It is one or more in (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc..
Wherein, display unit 540 can be used for display by information input by user or be supplied to information and the movement of user
The various menu interfaces of terminal 500.Display unit 540 may include display panel 541, optionally, LCD or organic hairs may be used
Display panel 541 is configured in the forms such as optical diode (OrganicLight-EmittingDiode, OLED).
It should be noted that touch panel 531 can cover display panel 541, touch display screen is formed, when the touch display screen is examined
It measures and on it or after neighbouring touch operation, sends processor 560 to determine the type of touch event, be followed by subsequent processing device
560 provide corresponding visual output according to the type of touch event in touch display screen.
Touch display screen includes Application Program Interface viewing area and common control viewing area.The Application Program Interface viewing area
And arrangement mode of the common control viewing area does not limit, can be arranged above and below, left-right situs etc. can distinguish two it is aobvious
Show the arrangement mode in area.The Application Program Interface viewing area is displayed for the interface of application program.Each interface can be with
The interface elements such as the icon comprising at least one application program and/or widget desktop controls.The Application Program Interface viewing area
Or the empty interface not comprising any content.The common control viewing area is used to show the higher control of utilization rate, for example,
Application icons such as button, interface number, scroll bar, phone directory icon etc. are set.
Wherein processor 560 is the control centre of mobile terminal 500, utilizes various interfaces and connection whole mobile phone
Various pieces are stored by running or performing the software program being stored in first memory 521 and/or module and call
Data in second memory 522 perform the various functions of mobile terminal 500 and processing data, so as to mobile terminal 500
Carry out integral monitoring.Optionally, processor 560 may include one or more processing units.
In embodiments of the present invention, by calling store the first memory 521 in software program and/or module and/
Or the data in the second memory 522, processor 560 are used to connect when the CC1 pins for detecting external equipment and mobile terminal
When connecing, the first voltage value on the GPIO detections port being connect with the CC1 pins is obtained;When detecting external equipment and movement
During the CC2 pins connection of terminal, the second voltage value on the ADC detections port being connect with the CC2 pins is obtained;According to described
The first voltage value or second voltage value, generation power on instruction;Instruction is powered on according to described, the CC1 pins or CC2 pins are held
Row power on operation.
Optionally, the processor 560 is additionally operable to:By the first voltage value and the GPIO detection port corresponding the
One voltage threshold is compared, if the first voltage value is less than the first voltage threshold value, generates CC1 pins
First powers on instruction;Second voltage value second voltage threshold value corresponding with ADC detections port is compared, if
The second voltage value is less than the second voltage threshold value, then generate CC2 pins second powers on instruction.
Optionally, the processor 560 is additionally operable to:Instruction is powered on according to described first, the CC1 pins are powered on;Root
Instruction is powered on according to described second, the CC2 pins are powered on.
As it can be seen that the embodiment of the present invention when detect external equipment and mobile terminal CC1 pins connect when, can obtain with
The first voltage value on the GPIO detections port of the CC1 pins connection;If detect the CC2 of external equipment and mobile terminal
When pin connects, then the second voltage value on the ADC detections port being connect with the CC2 pins can be obtained, so as to root
According to the first voltage value or second voltage value, generation powers on instruction, and power on instruction according to described, to the CC1 pins or
CC2 pins perform power on operation so that only when meeting specified conditions, in the CC pin ability of mobile terminal Type-C interfaces
Electricity without being always maintained at electriferous state, reduces the time of CC pins electrification, avoids since CC pins charge always and cause
Interface corrosion, so as to the situation of testing result inaccuracy occur, enhance the protection to Type-C interfaces.
Those of ordinary skill in the art may realize that the embodiment with reference to disclosed in the embodiment of the present invention describes each
Exemplary unit and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These
Function is performed actually with hardware or software mode, specific application and design constraint depending on technical solution.Profession
Technical staff can realize described function to each specific application using distinct methods, but this realization should not
Think beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit can refer to the corresponding process in preceding method embodiment, and details are not described herein.
In embodiment provided by the present invention, it should be understood that disclosed device and method can pass through others
Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
A kind of division of logic function, can there is an other dividing mode in actual implementation, for example, multiple units or component can combine or
Person is desirably integrated into another system or some features can be ignored or does not perform.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, device or unit
It connects, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
That each unit is individually physically present, can also two or more units integrate in a unit.
If the function is realized in the form of SFU software functional unit and is independent product sale or in use, can be with
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially in other words
The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be
People's computer, server or network equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention.
And aforementioned storage medium includes:USB flash disk, mobile hard disk, ROM, RAM, magnetic disc or CD etc. are various can to store program code
Medium.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.
Claims (10)
1. a kind of protection circuit of Type-C interfaces, the Type-C interfaces have CC1 pins and CC2 pins, which is characterized in that
The circuit includes:
The GPIO detections port being connect with CC1 pins, for detecting the first voltage value on the CC1 pins;
The ADC detections port being connect with CC2 pins, for detecting the second voltage value on the CC2 pins;
The controller of port and ADC detections port is detected including the GPIO, for according to the first voltage value or the
Two voltage values, generation power on instruction;
The CC logic processors being connect with the CC1 pins, CC2 pins and controller, for powering on instruction according to, to institute
It states CC1 pins or CC2 pins performs power on operation.
2. circuit according to claim 1, which is characterized in that
The controller, be additionally operable to by the corresponding first voltage threshold value in the first voltage value and the GPIO detection port into
Row compares, if the first voltage value is less than the first voltage threshold value, generate CC1 pins first powers on instruction,
And be compared second voltage value second voltage threshold value corresponding with ADC detections port, if described second
Voltage value is less than the second voltage threshold value, then generate CC2 pins second powers on instruction.
3. circuit according to claim 2, which is characterized in that the circuit further includes the first power supply, second source, first
Resistance, second resistance, 3rd resistor and the 4th resistance;
The one of one end of the CC1 pins and one end connection of first resistor, the other end of the first resistor and the 4th resistance
End and GPIO detections port connection, the other end of the 4th resistance are connect with the first power supply;
One end of the CC2 pins and one end of second resistance connect, the other end of the second resistance and the one of 3rd resistor
End and ADC detections port connection, the other end of the 3rd resistor are connect with second source.
4. circuit according to claim 3, which is characterized in that the first voltage threshold value is determined by equation below:
The second voltage threshold value is determined by equation below:
Wherein, R1For the resistance value of first resistor, R2For the resistance value of second resistance, R3For the resistance value of 3rd resistor, R4It is
The resistance value of four resistance, RdFor the preset resistance value to ground resistance, VILFor first voltage threshold value, V0For second voltage thresholding
Value.
5. a kind of guard method of Type-C interfaces, the Type-C interfaces have CC1 pins and CC2 pins, which is characterized in that
The method includes:
When the CC1 pins for detecting external equipment and mobile terminal connect, the GPIO detections being connect with the CC1 pins are obtained
The first voltage value on port;
When the CC2 pins for detecting external equipment and mobile terminal connect, the ADC detections being connect with the CC2 pins are obtained
Second voltage value on port;
According to the first voltage value or second voltage value, generation powers on instruction;
Instruction is powered on according to described, power on operation is performed to the CC1 pins or CC2 pins.
6. according to the method described in claim 5, it is characterized in that, described according to the first voltage value or second voltage value,
The step of generation powers on instruction includes:
The first voltage value first voltage threshold value corresponding with GPIO detections port is compared, if described first
Voltage value is less than the first voltage threshold value, then generate CC1 pins first powers on instruction;
Second voltage value second voltage threshold value corresponding with ADC detections port is compared, if described second
Voltage value is less than the second voltage threshold value, then generate CC2 pins second powers on instruction.
7. according to the method described in claim 6, it is characterized in that, power on instruction described in the basis, to the CC1 pins or
The step of CC2 pins execution power on operation, includes:
Instruction is powered on according to described first, the CC1 pins are powered on;
Instruction is powered on according to described second, the CC2 pins are powered on.
8. a kind of mobile terminal, the mobile terminal has at least one Type-C interfaces, and the Type-C interfaces are managed with CC1
Foot and CC2 pins, which is characterized in that the mobile terminal includes controller and CC logic processors, and the controller includes
GPIO detects port and ADC detections port;
The GPIO detections port is connect with CC1 pins, for detecting the first voltage value on the CC1 pins;
The ADC detections port is connect with CC2 pins, for detecting the second voltage value on the CC2 pins;
The controller, for according to the first voltage value or second voltage value, generation to power on instruction;
For powering on instruction according to, power on operation is performed to the CC1 pins or CC2 pins for the CC logic processors.
9. mobile terminal according to claim 8, which is characterized in that
The controller, be additionally operable to by the corresponding first voltage threshold value in the first voltage value and the GPIO detection port into
Row compares, if the first voltage value is less than the first voltage threshold value, generate CC1 pins first powers on instruction,
And be compared second voltage value second voltage threshold value corresponding with ADC detections port, if described second
Voltage value is less than the second voltage threshold value, then generate CC2 pins second powers on instruction.
10. mobile terminal according to claim 9, which is characterized in that the mobile terminal further includes the first power supply, second
Power supply, first resistor, second resistance, 3rd resistor and the 4th resistance;
The one of one end of the CC1 pins and one end connection of first resistor, the other end of the first resistor and the 4th resistance
End and GPIO detections port connection, the other end of the 4th resistance are connect with the first power supply;
One end of the CC2 pins and one end of second resistance connect, the other end of the second resistance and the one of 3rd resistor
End and ADC detections port connection, the other end of the 3rd resistor are connect with second source.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611263871.8A CN108268402A (en) | 2016-12-30 | 2016-12-30 | Protection circuit, guard method and the mobile terminal of Type-C interfaces |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611263871.8A CN108268402A (en) | 2016-12-30 | 2016-12-30 | Protection circuit, guard method and the mobile terminal of Type-C interfaces |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108268402A true CN108268402A (en) | 2018-07-10 |
Family
ID=62755235
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611263871.8A Pending CN108268402A (en) | 2016-12-30 | 2016-12-30 | Protection circuit, guard method and the mobile terminal of Type-C interfaces |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108268402A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109768593A (en) * | 2019-01-04 | 2019-05-17 | 维沃移动通信有限公司 | A kind of charge protection method and terminal device |
CN111443625A (en) * | 2019-01-17 | 2020-07-24 | 恩智浦有限公司 | Corrosion protection circuit for serial bus connector |
CN114236240A (en) * | 2022-02-25 | 2022-03-25 | 荣耀终端有限公司 | Liquid inlet detection circuit and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080189465A1 (en) * | 2007-02-05 | 2008-08-07 | Chih-Chin Yang | Storage device with automatic interface-switching function |
CN102393837A (en) * | 2011-11-08 | 2012-03-28 | 深圳市海思半导体有限公司 | USB charger recognition device and method |
CN102684270A (en) * | 2012-05-31 | 2012-09-19 | 华为技术有限公司 | Method for identifying type of universal serial bus (USB) chargers and USB device |
CN104951034A (en) * | 2015-07-16 | 2015-09-30 | 广东欧珀移动通信有限公司 | Mobile terminal and USB interface mode control method and device thereof |
CN205721762U (en) * | 2016-03-31 | 2016-11-23 | 维沃移动通信有限公司 | The interface circuit of general-purpose serial bus USB interface and portable terminal |
-
2016
- 2016-12-30 CN CN201611263871.8A patent/CN108268402A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080189465A1 (en) * | 2007-02-05 | 2008-08-07 | Chih-Chin Yang | Storage device with automatic interface-switching function |
CN102393837A (en) * | 2011-11-08 | 2012-03-28 | 深圳市海思半导体有限公司 | USB charger recognition device and method |
CN102684270A (en) * | 2012-05-31 | 2012-09-19 | 华为技术有限公司 | Method for identifying type of universal serial bus (USB) chargers and USB device |
CN104951034A (en) * | 2015-07-16 | 2015-09-30 | 广东欧珀移动通信有限公司 | Mobile terminal and USB interface mode control method and device thereof |
CN205721762U (en) * | 2016-03-31 | 2016-11-23 | 维沃移动通信有限公司 | The interface circuit of general-purpose serial bus USB interface and portable terminal |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109768593A (en) * | 2019-01-04 | 2019-05-17 | 维沃移动通信有限公司 | A kind of charge protection method and terminal device |
CN111443625A (en) * | 2019-01-17 | 2020-07-24 | 恩智浦有限公司 | Corrosion protection circuit for serial bus connector |
CN114236240A (en) * | 2022-02-25 | 2022-03-25 | 荣耀终端有限公司 | Liquid inlet detection circuit and electronic equipment |
CN114236240B (en) * | 2022-02-25 | 2023-10-20 | 荣耀终端有限公司 | Liquid inlet detection circuit and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108268389A (en) | The insertion detection method and mobile terminal of a kind of equipment | |
CN106844265B (en) | A kind of control method and mobile terminal of general-purpose serial bus USB interface | |
CN108268388B (en) | A kind of Type-C interface protective circuit and method, mobile terminal | |
CN106648857B (en) | A kind of open method and mobile terminal of the OTG function of mobile terminal | |
CN108268403A (en) | A kind of Type-C interface protective circuits and method, mobile terminal | |
CN108536055B (en) | A kind of mobile terminal and detection method | |
CN108268402A (en) | Protection circuit, guard method and the mobile terminal of Type-C interfaces | |
CN106527802A (en) | Detection method and mobile terminal | |
CN108268405A (en) | Protection circuit, guard method and the mobile terminal of Type-C interfaces | |
CN106557240A (en) | A kind of detection method and mobile terminal | |
CN108270253A (en) | A kind of charging method and mobile terminal | |
CN108268411A (en) | The method and mobile terminal of a kind of data transmission | |
CN108268089A (en) | A kind of interface protector, mobile terminal and method | |
CN108268397A (en) | The processing method and mobile terminal of a kind of access device | |
CN108268090A (en) | A kind of interface protector, mobile terminal and method | |
CN106684967B (en) | A kind of charging method and mobile terminal of mobile terminal | |
CN108271093A (en) | The processing method and mobile terminal of a kind of access device | |
CN108268091B (en) | A kind of interface protector, mobile terminal and method | |
CN108268408A (en) | Protection circuit, guard method and the mobile terminal of Type-C interfaces | |
CN108268410B (en) | A kind of method and mobile terminal of data communication | |
CN107482736B (en) | A kind of method for preventing USB interface short circuit from burning and electronic equipment | |
CN108268393A (en) | The processing method and mobile terminal of a kind of access device | |
CN108270255B (en) | A kind of charging method and mobile terminal | |
CN108271092A (en) | The processing method and mobile terminal of a kind of access device | |
CN106786969A (en) | A kind of charge protection method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180710 |
|
RJ01 | Rejection of invention patent application after publication |