CN106301342B - Interface circuit and terminal device - Google Patents

Interface circuit and terminal device Download PDF

Info

Publication number
CN106301342B
CN106301342B CN201610648360.1A CN201610648360A CN106301342B CN 106301342 B CN106301342 B CN 106301342B CN 201610648360 A CN201610648360 A CN 201610648360A CN 106301342 B CN106301342 B CN 106301342B
Authority
CN
China
Prior art keywords
module
connection
pin
data
switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610648360.1A
Other languages
Chinese (zh)
Other versions
CN106301342A (en
Inventor
裴健学
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610648360.1A priority Critical patent/CN106301342B/en
Publication of CN106301342A publication Critical patent/CN106301342A/en
Application granted granted Critical
Publication of CN106301342B publication Critical patent/CN106301342B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K19/00Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits
    • H03K19/0175Coupling arrangements; Interface arrangements
    • H03K19/017509Interface arrangements
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/002Switching arrangements with several input- or output terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Power Sources (AREA)
  • Information Transfer Systems (AREA)

Abstract

A kind of interface circuit, one for the connecting interface selection of a terminal device to be connected in the first, second and third functional module of terminal device.Interface circuit includes: the first, second selection switch, the first, second trigger circuit and controller.First choice switch is connected between the connecting interface and the second selection switch, the first functional module.Second selection switch is connected between the first choice switch and second, third functional module.The controller is at least controlling the first trigger circuit and the corresponding trigger signal of the second trigger circuit generation from the received level signal of connecting interface based on first trigger circuit, to trigger the selection connection of first and second selection switch respectively, to select the communication connection established one of them in the first, second and third functional module with connecting interface.A kind of terminal device is also provided, the present invention can pass through the connecting interface of simple structure multiplex terminal equipment.

Description

Interface circuit and terminal device
Technical field
The present invention relates to electrical connection field, in particular to a kind of interface circuit and terminal device.
Background technique
Currently, data connection and charging interface of the USB interface as standard, have been widely used for mobile phone, tablet computer On equal terminal devices.In general, USB interface tends to the interface as multiple functional modules and can in order to avoid the redundancy of interface It is multiplexed by multiple functional modules, for example, as generic USB charging and the interface of data connection or connecing as quick charge Mouthful.Correspondingly, can be the interface of a certain functional module according to the object that USB interface accesses and by USB interface quick definition Interface circuit is necessary, for example, be generic USB interface or fast charger according to access, and using USB interface as The interface of generic USB module or interface as fast charge module.However, the existing interface circuit for realizing multiplexing is all relatively more multiple It is miscellaneous.
Summary of the invention
It, can be by simple structure by one the embodiment of the invention provides a kind of Multifunctional interface circuit and terminal device A connecting interface is multiplexed with multiple functional interfaces.
On the one hand, a kind of interface circuit is provided, for the connecting interface selection of a terminal device to be connected to terminal device The first functional module, one in the second functional module and third functional module, which is characterized in that the interface circuit packet It includes: first choice switch, the second selection switch, the first trigger circuit, the second trigger circuit and controller.The first choice is opened Connection is connected between the connecting interface and the second selection switch, the first functional module, for selecting the connection Interface is connected to the second selection switch or first functional module.The second selection switch is connected to first choosing It selects between switch and second functional module, third functional module, first choice switch is connected to for selecting Two functional modules or third functional module.First trigger circuit is connected to the connecting interface, first choice switch And between controller, second trigger circuit is connected between the second selection switch and controller.The controller is used The first trigger circuit and the second touching are controlled from the received level signal of connecting interface in being at least based on first trigger circuit Power Generation Road generates corresponding trigger signal, to trigger the selection connection of first choice switch and the second selection switch respectively, thus The communication of one of them in the first functional module, the second functional module and third functional module with connecting interface is established in selection Connection.
Wherein, the connecting interface includes power pins, data pin, first trigger circuit and the connecting interface Power pins connection, first choice switch is connected to the data pin of the connecting interface and second selection is opened Close, between the first functional module, for select the data pin by the connecting interface be connected to second selection switch or First functional module.
Wherein, the controller generates the first module and connects trigger signal when power pins are high level, and triggers the Connection between one selection switching gate connecting interface and the first functional module;The controller simultaneously controls the first triggering electricity Road switching generate switch connection trigger signal, and trigger first choice switch by connecting interface switch to it is described second selection open Pass is attached, while controller controls the second trigger circuit and generates the second module connection trigger signal, and the second selection of triggering is opened The connection between gating first choice switch and the second module is closed, to establish the data pin and the second function of connecting interface Connection between energy module.
Wherein, when the controller communicates successfully between external equipment and the second functional module, first choosing is kept The connection status for selecting switch and the second selection switch, to keep the company of the data pin of the second functional module and connecting interface It connects, at this point, the second functional module starts and is attached and communicates with external equipment.
Wherein, the controller and between external equipment and the second functional module when communication failure, the first triggering of control Circuit switching generates the first module and connects trigger signal, triggering first choice switching gate connecting interface and the first functional module 3 Between connection, at this point, the first functional module starting and be attached and communicate with external equipment.
Wherein, the controller and power pins be low level when, control the first trigger circuit generate switch connection touching It signals, and triggers the connection between first choice switching gate connecting interface and the second selection switch, while controller It controls the second trigger circuit and generates third module connection trigger signal, triggering the second selection switching gate first choice switch and the Connection between three functional modules, so that the connection between connecting interface and third functional module is established, at this point, third function mould Block starts and is attached and communicates with external equipment.
Wherein, first functional module is USB module, and second functional module is fast charge module, the third function Energy module is UART module.
Wherein, the data pin of the connecting interface includes correction data pin and negative data pin, and the first choice is opened Close includes that the first, second data-out pin, the first, second, third, fourth data output pins and the input of the first signal are drawn Foot, the second selection switch includes third, the 4th data-out pin, the five, the six, the seven, the 8th data output pins And second signal input pin;Respond the input signal of the first signal input pin, first, the of the first choice switch Two data-out pins are selected to connect with the first, second data output pins respectively or defeated with third, the 4th data respectively Pin connects out, responds the input signal of second signal input pin, the third of the second selection switch, the input of the 4th data Pin is selected to connect with the five, the 6th data output pins or connect with the seven, the 8th data output pins respectively respectively.
Wherein, the first, second data-out pin of first choice switch positive number with the connecting interface respectively It is connected according to pin, negative data pin, the first, second data output pins of the first choice switch connect with USB module respectively It connects, the third of the first choice switch, the 4th data output pins are defeated with third, the 4th data of the second selection switch respectively Enter pin connection;Five, the 6th data output pins of the second selection switch are connect with fast charge module, second selection Seven, the 8th data output pins of switch are connect with UART module.
Wherein, first trigger circuit includes being parallel between the signal input pin and ground of first choice switch First resistor and switching tube, wherein the first resistor is connected to the signal input pin and ground of the first choice switch Between, the drain electrode of the switching tube is connect with signal input pin, source electrode ground connection, the drain electrode of the switching tube also with the connection The power pins of interface connect.
Wherein, second trigger circuit includes being series between the signal input pin and ground of the second selection switch Second resistance and 3rd resistor.
Wherein, the controller includes the first control terminal and the second control terminal, and first control terminal and described first touch The grid of the switching tube of Power Generation Road connects, the second resistance and 3rd resistor of second control terminal and second trigger circuit Between connecting node connection.
Wherein, the first module connection trigger signal that first trigger circuit generates is high level signal, switch connection Trigger signal is low level signal, and the switching tube is high level conducting switch, when connecting interface is not connected with external equipment, institute It states controller to control the first control terminal output low level signal and control the switching tube cut-off, when connecting interface power pins are When high level, then the signal input pin of first choice switch receives the first module connection trigger signal of high level, and gates The connection of first, second data-out pin and the first, second data output pins, at this point, drawing with the output of the first, second data The USB module of foot connection and the correction data pin and negative data pin of connecting interface connect.
Wherein, the second module connection trigger signal that second trigger circuit generates is high level signal, the control Device and after external equipment is identified as equipment controls first control terminal and exports high level signal, controls the switching tube Conducting, thus, the signal input pin of the first choice switch receives low electricity by the switching tube of the conducting Flat switch connects trigger signal, and the first choice switch is after receiving switch connection trigger signal, gating first, second The connection of data-out pin and third, the 4th data output pins, thus, by the correction data pin and negative data of connecting interface Pin is respectively connected to the third of the second selection switch, the 4th data-out pin;The controller is simultaneously controlled by described second End processed exports high level signal to the second resistance and the connecting node of 3rd resistor, thus the of the second selection switch Binary signal input terminal receive high level the second module connection trigger signal, and gate it is described second selection switch third, Connection between 4th data-out pin and the five, the 6th data output pins, at this point, drawing with the output of the five, the 6th data The fast charge module of foot connection and the correction data pin and negative data pin of connecting interface connect, and external equipment is identified as fast charge and fills Electric equipment.
Wherein, the controller further includes receiving end, and the receiving end is connect with the fast charge module, for receiving fast charge The result of communication of module and external equipment, if fast charge module and external device communication success, controller maintain described first Control terminal and the second control terminal export high level signal;If fast charge module and external device communication fail, the control Low level signal or non-output signal are exported by the first control terminal, so that the switching tube ends, thus, first triggering Circuit restores the first module trigger signal of output high level, then the signal input pin of first choice switch receives high level First module connects trigger signal, and gates the company of the first, second data-out pin and the first, second data output pins It connects, at this point, the correction data pin and negative data of the USB module and connecting interface that connect with the first, second data output pins draw Foot connection, formally enters usb communication mode.
Wherein, when the power pins of the connecting interface are low level, the controller controls the first control terminal and remains defeated Low level signal or non-output signal out, switching tube cut-off, the signal input pin of first choice switch is from the power pins Low level switch connection trigger signal is received, and gates the first, second data-out pin and draws with third, the output of the 4th data The connection of foot, the controller simultaneously export low level signal to the second resistance and 3rd resistor by second control terminal Connecting node, so that the second signal input terminal of the second selection switch receives the connection triggering of low level third module Signal, and gate between third, the 4th data-out pin and the seven, the 8th data output pins of the second selection switch Connection, at this point, the correction data pin and negative of the UART module and connecting interface being connect with the seven, the 8th data output pins It is connected according to pin, into UART communication pattern.
Wherein, the switching tube is NPN triode or NMOS field-effect tube.
On the other hand, a kind of terminal device, including connecting interface, the first functional module, the second functional module, third are provided Functional module and interface circuit above-mentioned.
Wherein, the connecting interface is USB interface, including power pins, correction data pin and negative data pin.
Wherein, first functional module is USB module, and second functional module is fast charge module, the third function Energy module is UART module.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that through simple interface circuit, can Select connecting interface being connected to USB module as generic USB interface, or select using connecting interface be connected to fast charge module as Fast charge interface, or select connecting interface being connected to UART module as UART interface and use, it realizes and is connect by one Mouth is multiplexed the purpose of multiple functions.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is the functional block diagram of the terminal device in one embodiment of the invention.
Fig. 2 is the physical circuit figure of the terminal device in one embodiment of the invention.
Fig. 3 is the internal junction of the first choice switch and the second selection switch in the terminal device in one embodiment of the invention Structure schematic diagram.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts All other embodiment, shall fall within the protection scope of the present invention.
Referring to Fig. 1, for the functional block diagram of the terminal device 100 in one embodiment of the invention.The terminal is set Standby 100 include connecting interface 1, interface circuit 2, the first functional module 3, the second functional module 4 and third functional module 5.
The connecting interface 1 is for accessing an external equipment 200.
As shown in Figure 1, the interface circuit 2 includes that first choice switch 21, second selects switch 22, the first trigger circuit 23, the second trigger circuit 24 and controller 25.
The first choice switch 21 is connected to the connecting interface 1 and the second selection switch 22, the first function Between module 3, the connecting interface 1 is connected to the second selection switch 22 or first functional module 3 for selecting.
The second selection switch 22 is connected to the first choice switch 21 and second functional module 4, third function Between energy module 5, the first choice switch 21 is connected to the second functional module 4 or third functional module 5 for selecting.
First trigger circuit 23 be connected to the connecting interface 1, the first choice switch 21 and controller 25 it Between, second trigger circuit 24 is connected between the second selection switch 22 and controller 25.
The controller 25 at least based on first trigger circuit 23 from the received level signal of connecting interface 1 and It controls the first trigger circuit 23 and the second trigger circuit 24 generates corresponding trigger signal, to trigger first choice switch 21 respectively And second selection switch 22 selection connection, thus select establish the first functional module 3, the second functional module 4 and third function It can the communication connection of one of them in module 5 with connecting interface 1.Correspondingly, the outside connecting with connecting interface 1 is established in selection The communication connection of one of them in equipment 200 and the first functional module 3, the second functional module 4 and third functional module 5.
Specifically, the connecting interface 1 includes power pins P and data pin D.In the present embodiment, the connection Interface 1 is USB (Universal Serial Bus, universal serial bus) interface.The first choice switch 21 is connected to institute It states between the data pin D and the second selection switch 22, the first functional module 3 of connecting interface 1, it will be described for selection The data pin D of connecting interface 1 is connected to the second selection switch 22 or first functional module 3.
First trigger circuit 23 is connect with the power pins Vbus of the connecting interface 1, is accessed in connecting interface 1 outer It when power pins Vbus when portion's equipment 200 is high level, generates the first module and connects trigger signal, and trigger first choice and open Close the connection between the data pin D and the first functional module 3 of 21 gating connecting interfaces 1.
The controller 25 is used for after the first trigger circuit 23 generates the first module connection trigger signal, controls described the One trigger circuit 23 generates switch connection trigger signal, and triggers the data pin D that first choice switch 21 gates connecting interface 1 With it is described second selection switch 22 between connection, while controller 25 control the second trigger circuit 24 generate the second module connect Trigger signal, triggering the second selection switch 22 gates the connection between first choice switch 21 and the second module 4, to build Connection between the data pin D and the second functional module 4 of vertical connecting interface 1.Second functional module 4 and connecting interface 1 Data pin D connection after be attached and communicate with external equipment 200 by the data pin D of connecting interface 1.
When the controller 25 communicates successfully between external equipment 200 and the second functional module 4, first choosing is kept The connection status of switch 21 and the second selection switch 22 is selected, to keep the data pin of the second functional module 4 and connecting interface 1 The connection of D.At this point, the second functional module 4 starts and is attached and communicates with external equipment 200.
The controller 25 simultaneously when communication failure, controls the first triggering between external equipment 200 and the second functional module 4 The switching of circuit 23 generates the first module and connects trigger signal, and triggering first choice switch 21 gates connecting interface 1 and the first function Connection between module 3, at this point, the first functional module 3 starts and is attached and communicates with external equipment 200.
When power pins P1 of first trigger circuit 23 when connecting interface 1 accesses external equipment 200 is low level, Generate switch connection trigger signal, and trigger first choice switch 21 gate connecting interface 1 and it is described second select switch 22 it Between connection, while controller 25 control the second trigger circuit 24 generate third module connect trigger signal, triggering second selection Switch 22 gates the connection between first choice switch 21 and third functional module 5, to establish connecting interface 1 and third function Connection between module 5.At this point, third functional module 5 starts and is attached and communicates with external equipment 200.
In one embodiment, first functional module 3 include USB module 31, the USB module 31 be for realizing Functional chip/circuit of usb data communication etc..Second functional module 4 includes fast charge module 41, and the fast charge module 41 is Realize functional chip/circuit of quick-charge function.The third functional module 5 includes UART module 51, the UART module 51 be the functional chip/circuit for realizing UART data communication.The external equipment 200 can be USB device, such as connect with USB The apparatus such as computer of mouth, or can be fast charger, it can also be with UART equipment, i.e., with the terminal device of UART interface.
Wherein, the second functional module 4 starts and is attached and communicates with external equipment 200 are as follows: when external equipment is fast charge When charger, the fast charge module 41 starts and is attached and communicates with external equipment 200, into fast charge mode, at this time Connecting interface 1 is used as fast charge interface.First functional module 3 starts and is attached and communicates with external equipment 200 are as follows: when outer When portion's equipment 200 is the USB interface of other terminal devices, the USB module 31 starts and is attached with external equipment 200 logical Letter, into generic USB connection mode, connecting interface 1 is used as generic USB interface at this time.Third functional module 5 starting and with External equipment 200 is attached communication are as follows: when external equipment is the UART interface of other terminal devices, the UART module 51 Start and be attached and communicate with external equipment 200, into UART connection mode, connecting interface 1 connects as UART connection at this time Mouth uses.
Referring to Fig. 2, for the physical circuit schematic diagram of the terminal device 100 in one embodiment of the invention.It is described to connect Mouth 1 includes power pins Vbus, data pin D and grounding pin G, and data pin D includes correction data pin D+ and negative data Pin D-.
The first choice switch 21 includes two data-out pin D11, D12, four data output pins O11-O14 And signal input pin S1.The second selection switch 22 includes two data-out pin D21, D22, four data outputs Pin O21-O24 and signal input pin S2.
It is the schematic diagram of internal structure of first choice switch 21 and the second selection switch 22 also referring to Fig. 3.Wherein, The first choice switch 21 and second to select switch 22 can be digital-control type double-point double-throw switch, the signal input pin S1 and S2 is respectively the controlled end of first choice switch 21 and the second selection switch 22.The input signal of response signal input pin S1, Two data-out pins D11, D12 of the first choice switch 21 can connect respectively with data output pins O11, O12 or Person connect with data output pins O13, O14 respectively.The input signal of response signal input pin S2, the second selection switch 22 two data-out pins D21, D22 can connect respectively with data output pins O21, O22 or export respectively with data Pin O23, O24 connection.
Two data-out pins D11, D12 of the first choice switch 21 positive number with the connecting interface 1 respectively According to pin D+, the D- connection of negative data pin.Two of them data output pins O11, O12 of the first choice switch 21 with USB module 31 connects, other two data output pins O13, O14 of the first choice switch 21 are opened with the second selection respectively Close 22 two data-out pins D21, D22 connection.The two of them data output pins of the second selection switch 22 O21, O22 and fast charge module 41 connect, other two data output pins O23, O24 and UART of the second selection switch 22 Module 51 connects.
First trigger circuit 23 includes being parallel between the signal input pin S1 and ground of first choice switch 21 First resistor R1 and switching tube Q1.Wherein, the first resistor R1 is connected to the signal input of the first choice switch 21 Between pin S1 and ground, the drain electrode of the switching tube Q1 is connect with signal input pin S1, source electrode ground connection.The switching tube Q1 Drain electrode also connect with the power pins Vbus of the connecting interface 1.
Second trigger circuit 24 include be series at it is described second selection switch 22 signal input pin S2 and ground it Between second resistance R2 and 3rd resistor R3.
The controller 25 includes the first control terminal C1 and the second control terminal C2, the first control terminal C1 and described first The grid of the switching tube Q1 of trigger circuit 23 connects, the second resistance of the second control terminal C2 and second trigger circuit 24 Connecting node N1 connection between R2 and 3rd resistor R3.
Wherein, the first module connection trigger signal that first trigger circuit 23 generates is high level signal, described the The switch connection trigger signal that one trigger circuit 23 generates is low level signal.The switching tube Q1 is high level conducting switch, For example, NPN triode pipe.When connecting interface 1 is not connected with external equipment 200, the controller 25 controls the first control terminal C1 It exports low level signal and controls the switching tube Q1 cut-off.When connecting interface 1 connects external equipment 200, if the connection The power pins Vbus of interface 1 is high level, then the signal input pin S1 of first choice switch 21 receives the first of high level Module connection trigger signal, and the connection of gated data input pin D11, D12 and data output pins O11, O12.At this point, with The USB module 31 of data output pins O11, O12 connection and the correction data pin D+ and negative data pin D- of connecting interface 1 connect It connects, external equipment 200 is identified as USB device.
The controller 25 and after external equipment 200 is identified as USB device controls the first control terminal C1 output High level signal controls the switching tube Q1 conducting, thus, the signal input pin S1 of the first choice switch 21 passes through institute It states the switching tube Q1 ground connection of conducting and receives low level switch connection trigger signal.The first choice switch 21 is receiving After connecting trigger signal to switch, the connection of gated data input pin D11, D12 and data output pins O13, O14, thus, The correction data pin D+ of connecting interface 1 and negative data pin D- are respectively connected to the data-out pin of the second selection switch 22 D21、D22。
Wherein, the second module connection trigger signal that second trigger circuit 24 generates is high level signal, described the The third module connection trigger signal that two trigger circuits 24 generate is low level signal.The controller 25 simultaneously passes through described second Control terminal C2 exports the connecting node N1 of high level signal to the second resistance R2 and 3rd resistor R3, thus second choosing The signal input part S2 for selecting switch 22 receives the second module connection trigger signal of high level, and gates second selection and open Close the connection between 22 two data-out pins D21, D22 and two data output pins O21, O22.At this point, and data The fast charge module 41 of output pin O21, O22 connection is connect with the correction data pin D+ of connecting interface 1 and negative data pin D-, outside Portion's equipment 200 is identified as fast charge charging equipment.
The controller 25 further includes receiving end P1, and the receiving end P1 is connect with the fast charge module 41, for receiving The result of communication of fast charge module 41 and external equipment 200.If fast charge module 41 communicates successfully with external equipment 200, maintain The first control terminal C1 and the second control terminal C2 export high level signal.At this point, fast charge module 41 passes through first choice Switch 21 and the second selection switch 22 are connect with the correction data pin D+ of connecting interface 1 and negative data pin D-, and pass through connection The correction data pin D+ and negative data pin D- of interface 1 are connect with external equipment 200, and start quick-charge function, into fast Fast charge mode.
If fast charge module 41 and 200 communication failure of external equipment, the controller 25 is exported by the first control terminal C1 Low level signal or non-output signal (high-impedance state), so that the switching tube Q1 ends.To first trigger circuit 23 Restore the first module trigger signal of output high level, then the signal input pin S1 of first choice switch 21 receives high level First module connection trigger signal, and the connection of gated data input pin D11, D12 and data output pins O11, O12.This When, the correction data pin D+ and negative data pin of the USB module 31 and connecting interface 1 that are connect with data output pins O11, O12 D- connection, external equipment 200 are identified as USB device and formally enter usb communication mode.
If the power pins Vbus of the connecting interface 1 is low level, the controller 25 controls the first control terminal C1 dimension Hold output low level signal or non-output signal, switching tube Q1 cut-off, the signal input pin S1 of first choice switch 21 is from institute It states power pins Vbus and receives low level switch connection trigger signal, and gated data input pin D11, D12 and data are defeated The connection of pin O13, O14 out.At this point, the correction data pin D+ and negative data pin D- of connecting interface 1 are respectively connected to second Select data-out pin D21, D22 of switch 22.
The controller 25 simultaneously exports low level signal to the second resistance R2 and the by the second control terminal C2 The connecting node N1 of three resistance R3, so that the signal input part S2 of the second selection switch 22 receives low level third mould Block connects trigger signal, and gates described second and select two data-out pins D21, D22 of switch 22 and two data defeated Connection between pin O23, O24 out.At this point, the UART module 41 being connect with data output pins O23, O24 and connecting interface 1 Correction data pin D+ and the D- connection of negative data pin, external equipment 200 be identified as UART equipment and enter UART and communicate mould Formula.
Wherein, the controller 25 further includes sense terminal T1, the power pins of the sense terminal T1 and the connecting interface 1 Vbus connection, the control terminal 25 judge that connecting interface 1 has outside to set when the sense terminal T1 sense terminal detects high level Standby 200 access.And when the power pins Vbus is low level, no matter then whether connecting interface 1 accesses external equipment 200, institute It states controller 25 and controls the first control terminal C1 maintenance output low level signal or non-output signal, and the second control terminal C1 of control Low level is exported, so that the UART module 51 is connect with the positive electricity source pin D+ of the connecting interface 1, negative electricity source pin D-. That is, being defaulted as UART communication pattern.
To by the relatively simple interface circuit 2, may be selected connecting interface 1 being connected to USB in the present invention Module 31 is used as generic USB interface, or selects for connecting interface 1 to be connected to fast charge module 41 as fast charge interface, or selecting will Connecting interface 1 is connected to UART module 51 and uses as UART interface 51, realizes and is multiplexed multiple function by a connecting interface 1 The purpose of energy.
Wherein, in other embodiments, the switching tube Q1 can also be NMOS field-effect tube etc..
It is worth noting that, included each unit/module is only patrolled according to function in above-mentioned terminal device embodiment It volume is divided, but is not limited to the above division, as long as corresponding functions can be realized;In addition, each function list Member/module specific name is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
The above is only the preferable specific embodiments of the present invention, but scope of protection of the present invention is not limited thereto, any Those familiar with the art the variation that can readily occur in or replaces in the technical scope that the embodiment of the present invention discloses It changes, should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the protection model of claim Subject to enclosing.

Claims (20)

1. a kind of interface circuit is connected to the first function mould of terminal device for the connecting interface selection by a terminal device One in block, the second functional module and third functional module, which is characterized in that the interface circuit includes: that first choice is opened It closes, second selects switch, the first trigger circuit, the second trigger circuit and controller;
The first choice switch is connected between the connecting interface and the second selection switch, the first functional module, For selecting for the connecting interface to be connected to the second selection switch or first functional module;
The second selection switch be connected to first choice switch and second functional module, third functional module it Between, first choice switch is connected to the second functional module or third functional module for selecting;
First trigger circuit is connected between the connecting interface, first choice switch and controller, and described second Trigger circuit is connected between the second selection switch and controller;
The controller is at least controlling first from the received level signal of connecting interface based on first trigger circuit Trigger circuit and the second trigger circuit generate corresponding trigger signal, to trigger first choice switch and the second selection switch respectively Selection connection, so that one of them in the first functional module, the second functional module and third functional module is established in selection With the communication connection of connecting interface.
2. interface circuit according to claim 1, which is characterized in that the connecting interface includes that power pins, data are drawn Foot, first trigger circuit are connect with the power pins of the connecting interface, and the first choice switch is connected to the company Between the data pin of connection interface and the second selection switch, the first functional module, for selecting the connecting interface Data pin be connected to it is described second selection switch or first functional module.
3. interface circuit according to claim 2, which is characterized in that the controller power pins be high level when, The first module connection trigger signal is generated, and triggers the company between first choice switching gate connecting interface and the first functional module It connects;The controller simultaneously controls the first trigger circuit switching generation switch connection trigger signal, and triggers first choice and open It closes to switch to connecting interface and be attached with the second selection switch, while controller controls the second trigger circuit and generates the Two modules connect trigger signal, and triggering the second selection switching gate first choice switchs the connection between the second functional module, To establish the connection between the data pin of connecting interface and the second functional module.
4. interface circuit according to claim 3, which is characterized in that the controller is in external equipment and the second function mould When communicating successfully between block, the connection status that the first choice switchs and the second selection switchs is kept, to keep the second function The connection of the data pin of energy module and connecting interface, at this point, the second functional module starts and is attached with external equipment logical Letter.
5. interface circuit according to claim 4, which is characterized in that the controller and in external equipment and the second function Between module when communication failure, control the first trigger circuit switching generates the first module and connects trigger signal, triggers first choice Connection between switching gate connecting interface and the first functional module, at this point, the first functional module starting and and external equipment into Row connection communication.
6. interface circuit according to claim 2, which is characterized in that the controller and power pins be low level When, control the first trigger circuit generate switch connection trigger signal, and trigger first choice switching gate connecting interface with it is described Connection between second selection switch, while controller controls the second trigger circuit and generates third module connection trigger signal, touching Connection between hair the second selection switching gate first choice switch and third functional module, to establish connecting interface and third Connection between functional module, at this point, third functional module starts and is attached and communicates with external equipment.
7. according to the described in any item interface circuits of claim 2-6, which is characterized in that first functional module is USB mould Block, second functional module are fast charge module, and the third functional module is UART module.
8. interface circuit according to claim 7, which is characterized in that the data pin of the connecting interface includes correction data Pin and negative data pin, first choice switch include the first, second data-out pin, first, second, third, the Four data output pins and the first signal input pin, it is described second selection switch include third, the 4th data-out pin, Five, the six, the seven, the 8th data output pins and second signal input pin;Respond the defeated of the first signal input pin Enter signal, the first, second data-out pin of the first choice switch is selected to draw with the output of the first, second data respectively Foot is connected or is connect respectively with third, the 4th data output pins, responds the input signal of second signal input pin, described The third of second selection switch, the 4th data-out pin selected to connect with the five, the 6th data output pins respectively or It is connect respectively with the seven, the 8th data output pins.
9. interface circuit according to claim 8, which is characterized in that the first, second data of the first choice switch Input pin is connect with the correction data pin of the connecting interface, negative data pin respectively, first choice switch first, Second data output pins are connect with USB module respectively, third, the 4th data output pins difference of the first choice switch It is connect with the third of the second selection switch, the 4th data-out pin;The five, the 6th data output of the second selection switch Pin is connect with fast charge module, and the seven, the 8th data output pins of the second selection switch are connect with UART module.
10. interface circuit according to claim 9, which is characterized in that first trigger circuit includes being parallel to first Select the first resistor and switching tube between the signal input pin and ground of switch, wherein the first resistor is connected to institute Between the signal input pin and ground for stating first choice switch, the drain electrode of the switching tube is connect with signal input pin, source Pole ground connection, the drain electrode of the switching tube are also connect with the power pins of the connecting interface.
11. interface circuit according to claim 10, which is characterized in that second trigger circuit is described including being series at Second resistance and 3rd resistor between the signal input pin and ground of second selection switch.
12. interface circuit according to claim 11, which is characterized in that the controller includes the first control terminal and the Two control terminals, first control terminal are connect with the grid of the switching tube of first trigger circuit, second control terminal with Connecting node connection between the second resistance and 3rd resistor of second trigger circuit.
13. interface circuit according to claim 12, which is characterized in that the first module that first trigger circuit generates Connection trigger signal is high level signal, and switch connection trigger signal is low level signal, and the switching tube is high level conducting Switch, when connecting interface is not connected with external equipment, the controller controls the first control terminal output low level signal and controls The switching tube cut-off, when connecting interface power pins are high level, then the signal input pin of first choice switch receives First module of high level connects trigger signal, and gates the first, second data-out pin and draw with the output of the first, second data The connection of foot, at this point, the correction data pin of the USB module and connecting interface that are connect with the first, second data output pins and negative Data pin connection.
14. interface circuit according to claim 13, which is characterized in that the second module that second trigger circuit generates Connection trigger signal is high level signal, and the controller and after external equipment is identified as equipment controls first control End processed exports high level signal, controls the switching tube conducting, thus, the signal input pin of the first choice switch passes through The switching tube of the conducting is grounded and receives low level switch connection trigger signal, and the first choice switch is receiving After switch connection trigger signal, the connection of the first, second data-out pin and third, the 4th data output pins is gated, from And third, the 4th data that the correction data pin of connecting interface and negative data pin are respectively connected to the second selection switch are defeated Enter pin;The controller simultaneously exports high level signal to the second resistance and 3rd resistor by second control terminal Connecting node, so that the second signal input terminal of the second selection switch receives the second module connection triggering letter of high level Number, and gate between third, the 4th data-out pin and the five, the 6th data output pins of the second selection switch Connection, at this point, the correction data pin and negative data of the fast charge module and connecting interface being connect with the five, the 6th data output pins Pin connection, external equipment are identified as fast charge charging equipment.
15. interface circuit according to claim 14, which is characterized in that the controller further includes receiving end, described to connect Receiving end is connect with the fast charge module, for receiving the result of communication of fast charge module and external equipment, if fast charge module and outer Portion's equipment communicates successfully, then controller maintains first control terminal and the second control terminal to export high level signal;If Fast charge module and external device communication fail, and the control exports low level signal or non-output signal by the first control terminal, So that switching tube cut-off, thus, first trigger circuit restores the first module trigger signal of output high level, then and the The signal input pin of one selection switch receives the first module connection trigger signal of high level, and gates the first, second data The connection of input pin and the first, second data output pins, at this point, the USB mould being connect with the first, second data output pins Block and the correction data pin and negative data pin of connecting interface connect, and formally enter usb communication mode.
16. interface circuit according to claim 15, which is characterized in that when the power pins of the connecting interface are low electricity Flat, the controller controls the first control terminal and maintains output low level signal or non-output signal, switching tube cut-off, first choice The signal input pin of switch receives low level switch connection trigger signal from the power pins, and gates first, second The connection of data-out pin and third, the 4th data output pins, the controller are simultaneously exported by second control terminal Low level signal is to the second resistance and the connecting node of 3rd resistor, so that the second signal of the second selection switch is defeated Enter termination and receive low level third module connection trigger signal, and gates third, the 4th data of the second selection switch Connection between input pin and the seven, the 8th data output pins, at this point, connect with the seven, the 8th data output pins The correction data pin and negative data pin of UART module and connecting interface connection, into UART communication pattern.
17. the described in any item interface circuits of 0-16 according to claim 1, which is characterized in that the switching tube is NPN triode Or NMOS field-effect tube.
18. a kind of terminal device, which is characterized in that including connecting interface, the first functional module, the second functional module, third function It can module and such as described in any item interface circuits of claim 1-17.
19. terminal device according to claim 18, which is characterized in that the connecting interface is USB interface, including power supply Pin, correction data pin and negative data pin.
20. terminal device according to claim 19, which is characterized in that first functional module is USB module, described Second functional module is fast charge module, and the third functional module is UART module.
CN201610648360.1A 2016-08-09 2016-08-09 Interface circuit and terminal device Active CN106301342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610648360.1A CN106301342B (en) 2016-08-09 2016-08-09 Interface circuit and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610648360.1A CN106301342B (en) 2016-08-09 2016-08-09 Interface circuit and terminal device

Publications (2)

Publication Number Publication Date
CN106301342A CN106301342A (en) 2017-01-04
CN106301342B true CN106301342B (en) 2019-02-05

Family

ID=57667298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610648360.1A Active CN106301342B (en) 2016-08-09 2016-08-09 Interface circuit and terminal device

Country Status (1)

Country Link
CN (1) CN106301342B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613126B (en) * 2017-09-26 2020-03-10 Oppo广东移动通信有限公司 UART (Universal asynchronous receiver transmitter) and USB (Universal Serial bus) multiplexing circuit and mobile terminal
CN107635069B (en) * 2017-09-27 2019-08-09 Oppo广东移动通信有限公司 UART and USB multiplex circuit and mobile terminal
CN109960180A (en) * 2017-12-22 2019-07-02 泰科电子(上海)有限公司 The electronic building brick and sensor of programmable study
CN109086233B (en) * 2018-06-30 2020-12-08 惠州华阳通用电子有限公司 Communication type automatic identification and switching device and method
CN109743501A (en) * 2019-01-15 2019-05-10 上海曼恒数字技术股份有限公司 A kind of polyphaser synchronous trigger method, device, equipment and storage medium
CN110442541A (en) * 2019-09-09 2019-11-12 Oppo(重庆)智能科技有限公司 Terminal device and USB interface-based data transmission method
CN111522766B (en) * 2020-04-27 2022-03-01 浙江大华技术股份有限公司 Communication system, method, device, equipment and storage medium thereof
CN111864854B (en) * 2020-08-03 2021-04-06 珠海智融科技有限公司 Pin multiplexing circuit and working method thereof, and quick charging chip and working method thereof
CN112968695B (en) * 2021-02-18 2023-06-06 节卡机器人股份有限公司 Dual-port circuit, digital output port circuit and robot
CN114372013B (en) * 2021-12-31 2023-12-12 深圳微步信息股份有限公司 USB interface expansion circuit and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931674A (en) * 2010-09-01 2010-12-29 惠州Tcl移动通信有限公司 Method and device for sharing Micro-USB interface
CN102546869A (en) * 2012-01-06 2012-07-04 海能达通信股份有限公司 USB (Universal Serial Bus) interface multiplexing interphone and control method thereof
CN103678226A (en) * 2012-09-24 2014-03-26 炬力集成电路设计有限公司 General purpose input/output (GPIO) port reuse circuit and method of chip

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7802044B2 (en) * 2008-12-24 2010-09-21 Mediatek Inc. Pin sharing device and method thereof for a universal asynchronous receiver/transmitter module and a universal serial bus module

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931674A (en) * 2010-09-01 2010-12-29 惠州Tcl移动通信有限公司 Method and device for sharing Micro-USB interface
CN102546869A (en) * 2012-01-06 2012-07-04 海能达通信股份有限公司 USB (Universal Serial Bus) interface multiplexing interphone and control method thereof
CN103678226A (en) * 2012-09-24 2014-03-26 炬力集成电路设计有限公司 General purpose input/output (GPIO) port reuse circuit and method of chip

Also Published As

Publication number Publication date
CN106301342A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106301342B (en) Interface circuit and terminal device
CN106716389B (en) Method for fast USB charging, electronic device and charger device
CN105896655B (en) Method for charging for electronic equipment and electronic equipment
CN104881387B (en) A kind of USB connection methods and usb hub
WO2016058426A1 (en) Method, device and system for implementing quick charging
CN104505890B (en) Mobile terminal
CN101383627A (en) Device and method for terminal charger charging, USB charging and data communication
CN104272216A (en) Electronic device and control method therefor
CN106300501B (en) A kind of adapter recognition methods and intelligent mobile terminal
CN204304549U (en) Charger and charge management circuit
CN104067200B (en) The communication of battery and monitoring via single line
CN105762883B (en) Method and electronic equipment for charging for electronic equipment
CN106502939A (en) A kind of USB adapters and data transmission set
CN108206444A (en) Data line and data transmission method
CN107643998A (en) OTG and the difunctional system that charges are realized based on intelligent object
CN103151658A (en) Data link line as well as method and device for controlling data link line
CN103684407B (en) Otg
CN106706998A (en) Terminal test system and terminal test method
CN107153456A (en) OTG connections control method, OTG connection control devices and electronic equipment
CN204031208U (en) data communication path switching circuit, vehicle-mounted router and automobile
CN207625314U (en) A kind of double charging circuits compatible with DC USB
CN212965358U (en) Broken line detection circuit with load access automatic wake-up function and power bank
CN106294246B (en) Mobile equipment and method using identity information acquisition component as peripheral equipment
CN105743180B (en) Method and electronic equipment for charging for electronic equipment
CN205608716U (en) Multiunit optical module communication interface switching circuit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant