Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to Fig. 1, it illustrates the circuit diagram of the interface circuit that one embodiment of the invention provides.This interface circuit comprises: earphone interface 110, audio frequency processing circuit 120, USB treatment circuit 130, selector switch 140 and power supply circuits 150.
Earphone interface 110 generally includes four terminals, is respectively L channel terminal 111, R channel terminal 112, ground wire terminal 113 and microphone terminal 114.The difference of the industry standard referenced by earphone socket 110, putting in order of these four terminals may be slightly different.
Audio frequency processing circuit 120 and earphone interface 110 are electrical connected.
Audio frequency processing circuit 120 comprises four terminals, is respectively L channel terminal 121, R channel terminal 122, ground wire terminal 123 and microphone terminal 124.Wherein, the L channel terminal 121 in audio frequency processing circuit 120 is electrical connected with the L channel terminal 111 in earphone interface 110; R channel terminal 122 in audio frequency processing circuit 120 is electrical connected with the R channel terminal 112 in earphone interface 110; Ground wire terminal 123 in audio frequency processing circuit 120 is electrical connected with the ground wire terminal 113 in earphone interface 110; Microphone terminal 124 in audio frequency processing circuit 120 is electrical connected with the microphone terminal 114 in earphone interface 110.
USB treatment circuit 130 and earphone interface 110 are electrical connected.
USB treatment circuit 130 comprises four terminals, is respectively data plus end DATA+, data minus terminal DATA-, ground wire terminal GND and power supply terminal VCC.Wherein, the data plus end DATA+ in USB treatment circuit 130 and the L channel terminal 111 in earphone interface 110 are electrical connected; Data minus terminal DATA-in USB treatment circuit 130 and the R channel terminal 112 in earphone interface 110 are electrical connected; Ground wire terminal GND in USB treatment circuit 130 and the ground wire terminal 113 in earphone interface 110 are electrical connected; Power supply terminal VCC in USB treatment circuit 130 and the microphone terminal 114 in earphone interface 110 are electrical connected.
Power supply circuits 150 are electrical connected with audio frequency processing circuit 130 and USB treatment circuit 150 respectively by selector switch 140.
Selector switch 140 is the SPDT switches including two moved ends, not moved end 143 and a control end 144;
Power supply circuits 150 are electrical connected with the not moved end 143 of SPDT switch;
A moved end 141 and the audio frequency processing circuit 120 of SPDT switch are electrical connected;
Another moved end 142 of SPDT switch is electrical connected with USB treatment circuit 130.
In sum, the interface circuit that the present embodiment provides, by utilizing earphone interface simultaneously as audio interface and USB interface, controlling power supply circuits according to the Interface status of earphone interface simultaneously and being optionally connected with audio frequency processing circuit or USB treatment circuit; Solve the insufficient space of mobile terminal to arrange more physical interface, the comparatively loaded down with trivial details and problem not easily of the use procedure of each physical interface; Reach the effect of audio interface and USB interface sharing earphone interface, achieve the switching of audio frequency connection status and USB connection status.
It should be noted that, in each embodiment of the present invention, for the standard of earphone interface for international standard, four terminals of this earphone interface set gradually as L channel terminal, R channel terminal, ground wire terminal and microphone terminal.
It should be added that, data plus end DATA+ in USB treatment circuit 130 can be electrical connected with the L channel terminal 111 in earphone interface 110, and now the data minus terminal DATA-in USB treatment circuit 130 and the R channel terminal 112 in earphone interface 110 are electrical connected; Data plus end DATA+ in USB treatment circuit 130 can be electrical connected with the R channel terminal 112 in earphone interface 110, and now the data minus terminal DATA-in USB treatment circuit 130 and the L channel terminal 111 in earphone interface 110 are electrical connected.In each embodiment of the present invention, be electrical connected with the data plus end DATA+ in USB treatment circuit 130 and the L channel terminal 111 in earphone interface 110; Data minus terminal DATA-in USB treatment circuit 130 and the R channel terminal 112 in earphone interface 110 are electrical connected as example is illustrated.
Please refer to Fig. 2, it illustrates the circuit diagram of the interface circuit that another embodiment of the present invention provides.This interface circuit comprises: earphone interface 210, audio frequency processing circuit 220, USB treatment circuit 230, selector switch 240, power supply circuits 250 and processor 260.
Earphone interface 210 generally includes four terminals, is respectively ground wire terminal 211, microphone terminal 212, R channel terminal 213 and L channel terminal 214.
Audio frequency processing circuit 220 and earphone interface 210 are electrical connected.
Audio frequency processing circuit 220 comprises four terminals, is respectively L channel terminal 221, R channel terminal 222, ground wire terminal 223 and microphone terminal 224.Wherein, the L channel terminal 221 in audio frequency processing circuit 220 is electrical connected with the L channel terminal 211 in earphone interface 210; R channel terminal 222 in audio frequency processing circuit 220 is electrical connected with the R channel terminal 212 in earphone interface 210; Ground wire terminal 223 in audio frequency processing circuit 220 is electrical connected with the ground wire terminal 213 in earphone interface 210; Microphone terminal 224 in audio frequency processing circuit 220 is electrical connected with the microphone terminal 214 in earphone interface 210.
USB treatment circuit 230 and earphone interface 210 are electrical connected.
USB treatment circuit 230 comprises four terminals, is respectively data minus (DATA-) terminal 231, data just (DATA+) terminal 232, ground wire (GND) terminal 233 and power supply (VCC) terminal 234.Wherein, the DATA-terminal 231 in USB treatment circuit 230 is electrical connected with the L channel terminal 211 in earphone interface 210; DATA+ terminal 232 in USB treatment circuit 230 is electrical connected with the R channel terminal 212 in earphone interface 210; GND terminal 233 in USB treatment circuit 230 is electrical connected with the ground wire terminal 213 in earphone interface 210; VCC terminal 234 in USB treatment circuit 230 is electrical connected with the microphone terminal 214 in earphone interface 210.
Power supply circuits 250 are electrical connected with audio frequency processing circuit 230 and USB treatment circuit 250 respectively by selector switch 240.
Selector switch 240 is the SPDT switches including two moved ends, not moved end 243 and a control end 244;
Power supply circuits 250 are electrical connected with the not moved end 243 of SPDT switch;
A moved end 241 and the audio frequency processing circuit 220 of SPDT switch are electrical connected;
Another moved end 242 of SPDT switch is electrical connected with USB treatment circuit 230;
Control end 244 and the processor 260 of SPDT switch are electrical connected.
Earphone interface 210 and processor 260 are electrical connected.
Microphone terminal 212 and the earth terminal 211 of processor 260 and earphone interface 210 are electrical connected respectively.
In sum, the interface circuit that the present embodiment provides, by utilizing earphone interface simultaneously as audio interface and USB interface, controlling power supply circuits according to the Interface status of earphone interface simultaneously and being optionally connected with audio frequency processing circuit or USB treatment circuit; Solve the insufficient space of mobile terminal to arrange more physical interface, the comparatively loaded down with trivial details and problem not easily of the use procedure of each physical interface; Reach the effect of audio interface and USB interface sharing earphone interface, achieve the switching of audio frequency connection status and USB connection status.
Please refer to Fig. 3, it illustrates the method flow diagram of the interface switching method that one embodiment of the invention provides.Be used for this interface switching method being illustrated in the processor in the circuit diagram shown in Fig. 1.This interface switching method, comprising:
Step 302, the Interface status of Test earphone interface, this Interface status comprises the one in audio frequency connection status and USB connection status;
Step 304, if this Interface status is audio frequency connection status, then sends the first control signal to selector switch, and power supply circuits are connected with audio frequency processing circuit for controlling selector switch by this first control signal;
Step 306, if this Interface status is USB connection status, then sends the second control signal to selector switch, and power supply circuits are connected with USB treatment circuit for controlling selector switch by this second control signal.
In sum, the interface switching method that the present embodiment provides, by utilizing earphone interface simultaneously as audio interface and USB interface, controlling power supply circuits according to the Interface status of earphone interface simultaneously and being optionally connected with audio frequency processing circuit or USB treatment circuit; Solve the insufficient space of mobile terminal to arrange more physical interface, the comparatively loaded down with trivial details and problem not easily of the use procedure of each physical interface; Reach the effect of audio interface and USB interface sharing earphone interface, achieve the switching of audio frequency connection status and USB connection status.
Please refer to Fig. 4, it illustrates the method flow diagram of the interface switching method that one embodiment of the invention provides.Be used for this interface switching method being illustrated in the processor in the circuit diagram shown in Fig. 1.This interface switching method, comprising:
Step 402, the Interface status of Test earphone interface, this Interface status comprises the one in audio frequency connection status and USB connection status;
The Interface status of processor Test earphone interface, this Interface status comprises the one in audio frequency connection status and USB connection status.
This step 402 can comprise following sub-step:
One, whether the microphone terminal of Test earphone interface is low level;
Whether the microphone terminal of processor Test earphone interface is low level.
If the microphone terminal of two earphone interfaces is low level, then determine that Interface status is audio frequency connection status.
Due under audio frequency connection status, be provided with pull-up resistor, therefore, if detect, the microphone terminal of earphone interface is low level, then processor determines that this Interface status is audio frequency connection status.
This step 402 can also comprise following sub-step:
If the microphone terminal of three earphone interfaces is high level, then whether measurement processor receives the charging index signal that charging chip sends, and charging chip is arranged in USB treatment circuit;
Due to only under audio frequency connection status, be provided with pull-up resistor, therefore, under non-audio connection status, the microphone terminal of processor Test earphone interface is high level.Due under USB connection status, there are two kinds of patterns, are respectively only charge mode and charging and data-transmission mode.In embodiments of the present invention, do not differentiate this two kinds of patterns, because two kinds of patterns all produce charging effect, therefore, whether measurement processor receives the charging index signal that charging chip sends, and this charging chip is arranged in USB treatment circuit.
If four processors receive charging index signal, then determine that Interface status is USB connection status.
If processor receives charging index signal, then the voltage difference creating 5V between VCC terminal in USB treatment circuit and GND terminal is described, therefore, processor determines that this Interface status is USB connection status.
If the microphone terminal in processor Test earphone interface is high level, and does not receive charging index signal, then processor determines that this Interface status is without connection status.
Step 404, if this Interface status is audio frequency connection status, then sends the first control signal to selector switch, and power supply circuits are connected with audio frequency processing circuit for controlling selector switch by this first control signal;
If this Interface status is audio frequency connection status, then processor sends the first control signal to selector switch, and power supply circuits are connected with audio frequency processing circuit for controlling selector switch by this first control signal.
Step 406, if this Interface status is USB connection status, then sends the second control signal to selector switch, and power supply circuits are connected with USB treatment circuit for controlling selector switch by this second control signal.
If this Interface status is USB connection status, then processor sends the second control signal to selector switch, and power supply circuits are connected with USB treatment circuit for controlling selector switch by this second control signal.
In sum, the interface switching method that the present embodiment provides, by utilizing earphone interface simultaneously as audio interface and USB interface, controlling power supply circuits according to the Interface status of earphone interface simultaneously and being optionally connected with audio frequency processing circuit or USB treatment circuit; Solve the insufficient space of mobile terminal to arrange more physical interface, the comparatively loaded down with trivial details and problem not easily of the use procedure of each physical interface; Reach the effect of audio interface and USB interface sharing earphone interface, achieve the switching of audio frequency connection status and USB connection status.
Please refer to Fig. 5, it illustrates the block diagram of the interface change-over device that one embodiment of the invention provides.Be used for this interface change-over device being illustrated in the processor in the circuit diagram shown in Fig. 1.This interface change-over device, comprising:
Interface detection module 520, for the Interface status of Test earphone interface, this Interface status comprises the one in audio frequency connection status and USB connection status;
First control module 540, if be audio frequency connection status for this Interface status, then send the first control signal to selector switch, power supply circuits are connected with audio frequency processing circuit for controlling selector switch by this first control signal;
Second control module 560, if be USB connection status for this Interface status, then sends the second control signal to selector switch, and power supply circuits are connected with USB treatment circuit for controlling selector switch by this second control signal.
In sum, the interface change-over device that the present embodiment provides, by utilizing earphone interface simultaneously as audio interface and USB interface, controlling power supply circuits according to the Interface status of earphone interface simultaneously and being optionally connected with audio frequency processing circuit or USB treatment circuit; Solve the insufficient space of mobile terminal to arrange more physical interface, the comparatively loaded down with trivial details and problem not easily of the use procedure of each physical interface; Reach the effect of audio interface and USB interface sharing earphone interface, achieve the switching of audio frequency connection status and USB connection status.
Please refer to Fig. 6, it illustrates the block diagram of the interface change-over device that one embodiment of the invention provides.Be used for this interface change-over device being illustrated in the processor in the circuit diagram shown in Fig. 1.This interface change-over device, comprising:
Interface detection module 620, for the Interface status of Test earphone interface, this Interface status comprises the one in audio frequency connection status and USB connection status;
First control module 640, if be audio frequency connection status for this Interface status, then send the first control signal to selector switch, power supply circuits are connected with audio frequency processing circuit for controlling selector switch by this first control signal;
Second control module 660, if be USB connection status for this Interface status, then sends the second control signal to selector switch, and power supply circuits are connected with USB treatment circuit for controlling selector switch by this second control signal.
Alternatively, this interface detection module 620, comprising:
First detecting unit 621, whether the microphone terminal for Test earphone interface is low level;
First determining unit 622, for when the microphone terminal of earphone interface is low level, determines that Interface status is audio frequency connection status.
Alternatively, this interface detection module 620, also comprises:
Second detecting unit 623, for when the microphone terminal of earphone interface is high level, whether measurement processor receives the charging index signal that charging chip sends, and charging chip is arranged in USB treatment circuit;
Second determining unit 624, during for receiving charging index signal when processor, determines that Interface status is USB connection status.
In sum, the interface change-over device that the present embodiment provides, by utilizing earphone interface simultaneously as audio interface and USB interface, controlling power supply circuits according to the Interface status of earphone interface simultaneously and being optionally connected with audio frequency processing circuit or USB treatment circuit; Solve the insufficient space of mobile terminal to arrange more physical interface, the comparatively loaded down with trivial details and problem not easily of the use procedure of each physical interface; Reach the effect of audio interface and USB interface sharing earphone interface, achieve the switching of audio frequency connection status and USB connection status.
It should be noted that: the device that the interface that above-described embodiment provides switches is when switching interface, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by equipment is divided into different functional modules, to complete all or part of function described above.In addition, the interface change-over device that above-described embodiment provides and interface switching method embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.