Summary of the invention
The invention provides a kind of method that tool is measured the portable mobile termianl of function of current and measured the electric current of external device.
A kind of portable mobile termianl, is connected with an external device, for measuring the electric current of external device, comprises earphone interface and an audio frequency processing circuit of a connection external device, and this audio frequency processing circuit comprises an audio frequency processing path and signal reduction path.This portable mobile termianl also comprises: a circuit for detecting, for obtain the type of external device in the time that external device is connected to earphone interface; One control circuit; One on-off circuit, comprises a control end and two changeable ports, and this control end is connected with control circuit, and a changeable port connects audio frequency and processes path, and another changeable port connects signal reduction path; One applying unit, comprises some current measurement application software; Wherein, this control circuit is according to the type of external device, gauge tap circuit switches between two changeable ports, thereby processes between path and signal reduction path and switch at audio frequency, controls applying unit and carry out current measurement application software in the time that on-off circuit switches to signal reduction path.
A kind of portable mobile termianl is measured the method for the electric current of external device, this portable mobile termianl comprises that the earphone interface, of a connection external device comprises the audio frequency processing circuit of an audio frequency processing path and signal reduction path, an and on-off circuit, this on-off circuit comprises a control end and two changeable ports, a changeable port connects audio frequency and processes path, and another changeable port connects signal reduction path.The method comprising the steps of: the type of obtaining external device in the time that external device is connected to earphone interface; In the time that external device is not earphone, gauge tap circuit is processed path from audio frequency and is switched to signal reduction path; And control applying unit and carry out current measurement application software.
The method of the electric current of portable mobile termianl of the present invention and measurement external device, utilize the earphone interface of mobile terminal and inner audio frequency processing circuit and in conjunction with current measurement application software, the function that realizes the electric current of measuring external device, is easy to carry and convenience is provided.
Embodiment
Referring to Fig. 1, is the circuit diagram that under preferred embodiments of the present invention, tool is measured the portable mobile termianl of function of current.This mobile terminal 10 connects an external device 20, for carrying out and measure function of current in the time that external device 20 being not earphone, measures the electric current of external device.This mobile terminal 10 can be a smart mobile phone.This portable mobile termianl 10 comprises earphone interface 110, one circuit for detecting 120, a control circuit 130, an on-off circuit 140, an audio frequency processing circuit 150 and an applying unit 160.
This earphone interface 110, for connecting external device 20.
Whether this circuit for detecting 120 is connected to earphone interface 110 for detecting external device 20, and in the time that external device 20 is connected to earphone interface 110, obtains the type of external device 20.Concrete, when circuit for detecting 120 is connected with external device 20 according to earphone interface 110, the magnitude of voltage difference of generation is obtained the type of external device 20.As, when external device 20 is earphone, produce the magnitude of voltage of 1V, when external device 20 is other types electronic installation, produce the magnitude of voltage of 1.5V.
This control circuit 130 is a fundamental frequency chip.
Audio frequency processing circuit 150 comprises an audio frequency processing path 1501 and signal reduction path 1502, and these signal reduction path 1502 fingers are by the path of the undistorted transmission of input signal.
This on-off circuit 140 comprises a control port and two changeable ports, and this control end is connected with control circuit, and two changeable ports connect respectively audio frequency and process path 1501 and signal reduction path 1502.Control circuit 130 is according to the type of external device, and gauge tap circuit 140 switches between two changeable ports, thereby processes between path 1501 and signal reduction path 1502 and switch at audio frequency.
This applying unit 160 comprises some current measurement application software, as current measurement software, is specially according to input current and draws current waveform and show; Audio frequency oscillograph software, is specially according to input current and does time and frequency analysis etc. and show.
Concrete, described on-off circuit is one first single-pole double-throw switch (SPDT), described control circuit 130, in the time that external device 20 is not earphone, is controlled the first single-pole double-throw switch (SPDT) and is switched to signal reduction path 1502 from audio frequency processing path 1501, and control applying unit 160 and carry out current measurement application software.
Under other embodiments of the present invention, described portable mobile termianl 10 also comprises a second switch circuit 170 and a power-supply circuit 180, in the time that the first single-pole double-throw switch (SPDT) switches to signal reduction path, described control circuit 130 is controlled second switch circuit 170 and is connected power-supply circuit 180 and power to described external device 20.Concrete, this second switch circuit 170 is one second single-pole double-throw switch (SPDT).
Fig. 2 is the method flow diagram of the electric current of the measurement external device of portable mobile termianl under preferred embodiments of the present invention.
In step S21, circuit for detecting 120 is detected external device 20 and whether is connected to earphone interface 110, and if so, flow process is to step S22, if not, and repeating step S21;
In step S22, circuit for detecting 120 obtains the type of external device, as is earphone or other electronic installations, is specially: the different types of obtaining external device of magnitude of voltage that produce while connection from external device according to earphone interface;
In step S23, control circuit 130, in the time that external device 20 is not earphone, is controlled the first single-pole double-throw switch (SPDT) and is switched to signal reduction path 1502 from audio frequency processing path 1501;
In step S24, control circuit 130 is controlled applying unit 160 and is carried out current measurement application software.
Under other embodiments of the present invention, said method also comprises step: in the time that the first single-pole double-throw switch (SPDT) switches to signal reduction path, described control circuit 130 is controlled second switch circuit 170 and connected power-supply circuit 180 and power to described external device 20.
This programme utilizes the earphone interface of mobile terminal 10 and inner audio frequency processing circuit 150 and in conjunction with the application software in applying unit 160, realizes the function of the electric current of measuring external device 20, is easy to carry and convenience is provided.