Movatterモバイル変換


[0]ホーム

URL:


CN106603755B - Mobile terminal and data processing method based on mobile terminal - Google Patents

Mobile terminal and data processing method based on mobile terminal
Download PDF

Info

Publication number
CN106603755B
CN106603755BCN201610951941.2ACN201610951941ACN106603755BCN 106603755 BCN106603755 BCN 106603755BCN 201610951941 ACN201610951941 ACN 201610951941ACN 106603755 BCN106603755 BCN 106603755B
Authority
CN
China
Prior art keywords
pin
external
external interface
voltage value
mobile terminal
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
CN201610951941.2A
Other languages
Chinese (zh)
Other versions
CN106603755A (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of ZhuhaifiledCriticalGree Electric Appliances Inc of Zhuhai
Priority to CN201610951941.2ApriorityCriticalpatent/CN106603755B/en
Publication of CN106603755ApublicationCriticalpatent/CN106603755A/en
Application grantedgrantedCritical
Publication of CN106603755BpublicationCriticalpatent/CN106603755B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a mobile terminal and a data processing method based on the mobile terminal, which are used for solving the problem that the existing mobile terminal comprises two interfaces and occupies the space of the mobile terminal. The mobile terminal comprises an external interface connected with external equipment; the central processing unit determines the type of the external equipment according to the state information of each pin acquired by the switch unit and sends a corresponding control signal to the switch unit; the switch unit controls the central processing unit to be connected with the external interface or the audio unit to be connected with the external interface according to the control signal, so that the corresponding unit processes data transmitted by the external equipment. In the embodiment of the invention, the external device is connected with the external device through the external interface, the type of the external device is determined through the state information of each pin of the external interface, and the data transmitted by the external device is correspondingly processed according to the type of the external device, so that the number of the external interfaces on the mobile terminal is reduced, and the space of the mobile terminal is saved.

Description

Mobile terminal and data processing method based on mobile terminal
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a mobile terminal and a data processing method based on the mobile terminal.
Background
With the rapid development of national economy, mobile terminals have entered thousands of households, become a kind of electronic products essential to the life of people, and bring convenience to the people while enjoying the mobile terminals, the mobile terminals also have higher requirements on the use experience.
However, the external interface on the existing mobile terminal usually includes a USB interface and an earphone interface, and is used to establish connection with the external device data line and the earphone through a corresponding communication protocol, so as to implement read-write processing and audio processing on data transmitted by the external device connected to the external device. Therefore, when the mobile terminal is designed, a designer needs to reserve two external interfaces, namely a USB interface and an earphone interface, on the mobile terminal at the same time, but each reserved external interface needs to occupy valuable space on the mobile terminal, and the design of the two external interfaces brings much inconvenience to the design work of the designer.
Disclosure of Invention
The embodiment of the invention provides a mobile terminal and a data processing method based on the mobile terminal, which are used for solving the problems that the mobile terminal in the prior art comprises a USB interface and an earphone interface, occupies the space of the mobile terminal, and influences the design, the appearance and the user experience.
In order to achieve the above object, an embodiment of the present invention discloses a mobile terminal, which includes a switch unit, a central processing unit, an audio unit, and an external interface, wherein:
the external interface is used for being connected with external equipment;
the switch unit is used for acquiring the state information of each pin of the external interface and sending the state information of each pin to the central processing unit;
the central processing unit is used for determining the type of the external equipment according to the state information of each pin, sending a first control signal to the switch unit if the external equipment is a data line, and sending a second control signal to the switch unit if the external equipment is an earphone; and read-write processing is carried out on the data transmitted by the external equipment;
the switch unit is also used for controlling the central processing unit to be connected with the external interface if receiving a first control signal sent by the central processing unit; if a second control signal sent by the central processing unit is received, controlling the audio unit to be connected with an external interface;
and the audio unit is used for carrying out audio processing on the data transmitted by the external equipment.
Further, the external interface includes: a first pin, a second pin, a third pin, a fourth pin and a fifth pin; wherein,
each pin of the external interface is connected with the switch unit, and the second pin and the third pin are used for transmitting data with external equipment; and the first pin is connected with a battery of the mobile terminal, the fourth pin is connected with an audio unit, and the fifth pin is grounded.
Further, the switch unit is specifically configured to acquire and transmit a voltage value of the first pin of the external interface;
the central processing unit is specifically configured to determine whether the acquired voltage value of the first pin of the external interface is greater than a preset first voltage value; if so, determining that the external equipment is the data line.
Further, the switch unit is specifically configured to obtain and send a resistance value between the second pin and the third pin of the external interface and a voltage value of the first pin;
the central processing unit is specifically configured to determine whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external device; if not, judging whether the acquired voltage value of the first pin of the external interface is larger than a preset first voltage value or not; if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
Further, the external interface further includes: a sixth pin;
the sixth pin is connected with the switch unit, and the sixth pin is an Identification (ID) pin of the external device.
Further, the switch unit is specifically configured to obtain identification information of the external device through a sixth pin;
the central processing unit is specifically configured to determine the type of the external device according to the identification information of the external device.
Further, the switch unit is specifically configured to obtain and send a resistance value between a second pin and a third pin of the external interface, and a voltage value of the sixth pin;
the central processing unit is specifically configured to determine whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external device; if not, judging whether the voltage value of the sixth pin is larger than a preset second voltage value, if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
Further, the switch unit comprises a normally closed switch, a normally closed end of the normally closed switch is connected with the audio unit, and a normally open end of the normally closed switch is connected with the central processing unit;
the central processing unit is specifically configured to send a control signal to the switch unit to control the normally closed end of the normally closed switch to be open and the normally open end to be closed if it is determined that the external device is a data line, and send a control signal to the switch unit to keep the normally closed end of the normally closed switch to be closed and the normally open end to be open if it is determined that the external device is an earphone.
Further, the external interface is a 3.5mm interface.
The embodiment of the invention discloses a data processing method based on a mobile terminal, which comprises the following steps:
if the external equipment is connected with the external interface, acquiring the state information of each pin of the external interface;
determining the type of the external equipment according to the state information of each pin;
if the external equipment is a data line, performing read-write processing on data transmitted by the external equipment;
and if the external equipment is an earphone, carrying out audio processing on the data transmitted by the external equipment.
Furthermore, the external interface comprises a first pin, a second pin, a third pin and a fifth pin, wherein the second pin and the third pin are used for transmitting data with external equipment; and the first pin is connected with a battery of the mobile terminal, and the fifth pin is grounded.
Further, the acquiring the state information of each pin of the external interface includes:
acquiring a voltage value of the first pin;
the determining the type of the external device according to the state information of each pin includes:
judging whether the acquired voltage value of the first pin of the external interface is larger than a preset first voltage value or not;
if so, determining that the external equipment is the data line.
Further, the acquiring the state information of each pin of the external interface includes:
acquiring a voltage value of the first pin, and acquiring a resistance value between the second pin and the third pin;
the determining the type of the external device according to the state information of each pin includes:
judging whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external equipment or not;
if not, judging whether the acquired voltage value of the first pin of the external interface is larger than a preset first voltage value or not;
if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
Further, the external interface further includes a sixth pin, where the sixth pin is an identification ID pin of the external device.
Further, the acquiring the state information of each pin of the external interface further includes:
acquiring a voltage value of the sixth pin;
judging whether the acquired voltage value of the sixth pin of the external interface is larger than a preset second voltage value or not; if so, determining that the external equipment is the data line.
Further, the acquiring the state information of each pin of the external interface further includes:
acquiring a voltage value of the sixth pin, and acquiring a resistance value between the second pin and the third pin;
the determining the type of the external device according to the state information of each pin includes:
judging whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external equipment or not;
if not, judging whether the voltage value of the sixth pin is larger than a preset second voltage value or not;
if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
Further, the external interface is a 3.5mm interface.
The embodiment of the invention provides a mobile terminal and a data processing method based on the mobile terminal, wherein the mobile terminal comprises a switch unit, a central processing unit, an audio unit and an external interface, wherein: the external interface is used for being connected with external equipment; the switch unit is used for acquiring the state information of each pin of the external interface and sending the state information of each pin to the central processing unit; the central processing unit is used for determining the type of the external equipment according to the state information of each pin, sending a first control signal to the switch unit if the external equipment is a data line, and sending a second control signal to the switch unit if the external equipment is an earphone; and read-write processing is carried out on the data transmitted by the external equipment; the switch unit is also used for controlling the central processing unit to be connected with the external interface if receiving a first control signal sent by the central processing unit; if a second control signal sent by the central processing unit is received, controlling the audio unit to be connected with an external interface; and the audio unit is used for carrying out audio processing on the data transmitted by the external equipment. In the embodiment of the invention, the external device is connected with the external device through an external interface, the type of the external device is determined through the state information of each pin of the external interface, if the external device is a data line, the data transmitted by the external device is read and written, and if the external device is an earphone, the data transmitted by the external device is subjected to audio processing, so that the number of the external interfaces on the mobile terminal is reduced, the space of the mobile terminal is saved, the design of the mobile terminal is facilitated, and the attractiveness of the mobile terminal and the user experience are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a mobile terminal according to embodiment 1 of the present invention;
fig. 2 is a schematic diagram of an external interface structure according to embodiment 2 of the present invention;
fig. 3 is a schematic structural diagram of a mobile terminal according to embodiment 2 of the present invention;
fig. 4 is a schematic structural diagram of an external interface according to embodiment 4 of the present invention;
fig. 5 is a schematic diagram of a data processing process according to embodiment 7 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
fig. 1 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention, where the mobile terminal includes a switch unit 12, a central processing unit 13, an audio unit 14, and an external interface 11, where:
the external interface 11 is used for connecting with external equipment;
the switch unit 12 is configured to obtain status information of each pin of the external interface, and send the status information of each pin to the central processing unit;
the central processing unit 13 is configured to determine the type of the external device according to the state information of each pin, send a first control signal to the switch unit if the external device is a data line, and send a second control signal to the switch unit if the external device is an earphone; and read-write processing is carried out on the data transmitted by the external equipment;
the switch unit 12 is further configured to control the central processing unit to connect to the external interface if receiving the first control signal sent by the central processing unit; if a second control signal sent by the central processing unit is received, controlling the audio unit to be connected with an external interface;
the audio unit 14 is configured to perform audio processing on data transmitted by the external device.
In the embodiment of the present invention, the external device is an earphone or a data line, the external interface 11 includes a plurality of pins, when the mobile terminal is connected to the external device through the external interface 11, states of the pins of the external interface may also change, and the pins are connected to different external devices, and states of the pins of the external interface 11 may also differ. Therefore, the type of the external device connected to the external interface 11 can be determined according to the state information of each pin, so as to process data transmitted by different types of external devices. The state information of each pin may be information such as a voltage value of the pin, a resistance value between the pins, a current value passing through the pin, and the like.
The mobile terminal obtains the state of each pin of the external interface 11 of the mobile terminal in the prior art, and the process is not described in detail in the embodiment of the present invention.
Specifically, if the external device is connected to the external interface 11, the switch unit 12 obtains status information of each pin of the external interface 11, and sends the status information of each pin to the central processing unit 13, and the central processing unit 13 determines the type of the external device according to the status information of each pin; if the external device is a data line, sending a first control signal to the switch unit 12, and the switch unit 12 receiving the first control signal, controlling the central processing unit 13 to be connected with the external interface 11, and the central processing unit 13 performing read-write processing on data transmitted by the external device; if the central processing unit 13 determines that the external device is an earphone, a second control signal is sent to the switch unit 12, the switch unit 12 receives the second control signal, the audio unit 14 is controlled to be connected with the external interface 11, and the audio unit 14 performs audio processing on data transmitted by the external device.
In the embodiment of the invention, the external device is connected with the external device through an external interface, the type of the external device is determined through the state information of each pin of the external interface, if the external device is a data line, the data transmitted by the external device is read and written, and if the external device is an earphone, the data transmitted by the external device is subjected to audio processing, so that the number of the external interfaces on the mobile terminal is reduced, the space of the mobile terminal is saved, the design of the mobile terminal is facilitated, and the attractiveness of the mobile terminal and the user experience are improved.
Example 2:
fig. 2 is a schematic structural diagram of an external interface 11 according to an embodiment of the present invention, where the external interface 11 includes: a first pin 21, a second pin 22, a third pin 23, a fourth pin 24, and a fifth pin 25; wherein,
each pin of the external interface 11 is connected with the switch unit, and the second pin 22 and the third pin 23 are used for transmitting data with an external device; the first pin 21 is connected to a battery of the mobile terminal for charging the battery, the fourth pin 24 is connected to an audio unit, and the fifth pin 25 is grounded.
Specifically, the switch unit 12 is connected to each pin of the external interface 11, and the switch unit 12 may obtain status information of each pin, send the obtained status information of each pin to the central processing unit, and control the central processing unit or the audio unit to be connected to the external interface according to control information of the central processing unit. Fig. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention, in order to highlight how to determine the type of an external device according to the state of each pin when the mobile terminal is connected to the external device, so as to perform a function of correspondingly processing data transmitted by the external device, a structure in which a switch unit is connected to pins of an external interface portion is omitted in the diagram, but each pin is actually connected to the switch unit.
As shown in fig. 3, a first pin of the external interface is connected to a battery (Vcc) of the mobile terminal, and is configured to charge the battery, a second pin and a third pin are connected to the switch unit, and are configured to transmit data to the external device, a fourth pin is connected to the audio unit, and is configured to receive Microphone (MIC) data transmitted by the headset when the external device is the headset, and a fifth pin is connected to ground; the audio unit is connected with the switch unit and is used for transmitting data with the external equipment when the external equipment is an earphone; the central processing unit is connected with the switch unit and used for receiving the state information of each pin of the external interface acquired by the switch unit and determining the type of the external equipment according to the state information of each pin of the external interface, when the external equipment is an earphone, the switch unit is controlled to be connected with the audio unit to perform audio processing on data transmitted by the external equipment, and when the external equipment is a data line, the switch unit is controlled to be connected with the central processing unit to perform read-write processing on the data transmitted by the external equipment.
When the external interface is connected with the data line, the voltage value of the first pin of the external interface is greater than the preset first voltage value, and if the external interface is connected with the earphone, the voltage value of the first pin of the external interface cannot be changed, or even if the voltage value is changed, the change quantity of the voltage value cannot reach the preset first voltage value. In the embodiment of the present invention, the type of the external device may be determined by a voltage value of the first pin of the external interface, and the switch unit is specifically configured to acquire and transmit the voltage value of the first pin of the external interface;
the central processing unit is specifically configured to determine whether the acquired voltage value of the first pin of the external interface is greater than a preset first voltage value; if so, determining that the external equipment is the data line.
When data is read and written for the mobile terminal, the mobile terminal is connected with an active device, such as a PC, through a data line, and after the active device is connected with the external interface through the data line, a voltage value of a first pin of the external interface changes. Therefore, if the external device is connected with the external interface, the type of the external device can be determined by judging whether the voltage value of the first pin of the external interface is greater than a preset first voltage value. The preset first voltage value may be determined according to a battery allowable voltage of the mobile terminal, for example, if the battery allowable voltage of the mobile terminal is 5V, the first voltage value may be 4.5V, 4.6V, or the like, as long as the voltage of the data line connected to the external interface can be detected.
When the external device is a data line, the external device is generally connected with the active device through the data line, so that whether the external interface is connected with the data line or not can be judged by detecting the voltage value of the first pin of the external interface, and the purpose of accurately judging the type of the connected external device is achieved.
Example 3:
in the above embodiment, when the external interface is connected to the data line, the voltage value of the first pin of the external interface is greater than the preset first voltage value, if the external interface is connected to the earphone, the voltage value of the first pin of the external interface is not changed, or even if the voltage value is changed, the change amount of the voltage value does not reach the preset first voltage value, and when the external interface is connected to the external device, the resistance value between the second pin and the third pin of the external interface is different. Therefore, in the embodiment of the present invention, in order to more accurately determine the type of the external device connected to the external interface, the switch unit is specifically configured to obtain and send the resistance value between the second pin and the third pin of the external interface and the voltage value of the first pin;
the central processing unit is specifically configured to determine whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external device; if not, judging whether the acquired voltage value of the first pin of the external interface is larger than a preset first voltage value or not; if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
If the external interface of the mobile terminal is connected with the external device, the external device can be an earphone or a data line in the embodiment of the invention, so that the second pin and the third pin in the external interface are connected with the left and right sound channels or the data transmission line in the external device, and the resistance value between the second pin and the third pin of the external interface is changed. Therefore, if the central processing unit judges that the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the external device which is not connected, the external interface is currently connected with the external device.
If the external interface is connected with the data line, the voltage value of the first pin of the external interface is larger than the preset first voltage value, and if the external interface is connected with the earphone, the voltage value of the first pin of the external interface is not changed, or even if the voltage value is changed, the change quantity of the voltage value does not reach the preset first voltage value, so that if the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the unconnected external equipment, whether the acquired voltage value of the first pin of the external interface is larger than the preset first voltage value or not can be judged, and the type of the external equipment can be determined more accurately.
Example 4:
on the basis of the foregoing embodiments, fig. 4 is a schematic structural diagram of an external interface 11 according to an embodiment of the present invention, where the external interface 11 further includes: a sixth pin 26;
the sixth pin 26 is connected to the switch unit, and the sixth pin is an identification ID pin of the external device.
The switch unit is specifically configured to obtain identification information of the external device through a sixth pin;
the central processing unit is specifically configured to determine the type of the external device according to the identification information of the external device.
The sixth pin is an identification ID pin of the external device, and if the external device is connected to the external interface, the mobile terminal may obtain identification information of the external device through the sixth pin, where the identification information is information that uniquely identifies the external device and may be a device number of the external device.
Specifically, after the external device is connected to the external interface, the switch unit may communicate with the external device through the sixth pin to obtain the identification information of the external device, and send the obtained identification information of the external device to the central processing unit, and the central processing unit determines the type of the external device according to the identification information of the external device.
The mobile terminal communicates with the external device, and acquiring the identification information of the external device is the prior art, and the process is not described in detail in the embodiment of the invention.
In addition, the switch unit may also obtain a voltage value of the sixth pin, where if the external device is a data line, the voltage value is greater than a set second voltage value, and if the external device is an earphone, the voltage value is not changed, and the second voltage value may be 1V, or may be a voltage value that can identify that the external interface is connected to the data line, such as 1.5V. Therefore, the embodiment of the invention also comprises:
the switch unit is specifically used for acquiring a voltage value of a sixth pin;
the central processing unit is specifically configured to determine whether a voltage value of the sixth pin is greater than a set second voltage value, and if so, determine that the external device is a data line.
Example 5:
when the external device connected to the external interface is different, the resistance value between the second pin and the third pin of the external interface will be different, and on the basis of the above embodiments, in an embodiment of the present invention, the switch unit is specifically configured to obtain and send the resistance value between the second pin and the third pin of the external interface and the voltage value of the sixth pin, in order to further improve the accuracy of determining the type of the external device;
the central processing unit is specifically configured to determine whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external device; if not, judging whether the voltage value of the sixth pin is larger than a preset second voltage value, if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
If the external interface of the mobile terminal is connected with the external device, the external device can be an earphone or a data line in the embodiment of the invention, so that the second pin and the third pin in the external interface are connected with the left and right sound channels or the data transmission line in the external device, and the resistance value between the second pin and the third pin of the external interface is changed. Therefore, if the central processing unit judges that the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the external device which is not connected, the external interface is currently connected with the external device.
If the external interface is connected with the data line, the voltage value of the sixth pin of the external interface is larger than the preset second voltage value, and if the external interface is connected with the earphone, the voltage value of the sixth pin of the external interface is not changed, so that if the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the external equipment which is not connected, the type of the external equipment can be more accurately determined by judging whether the acquired voltage value of the sixth pin of the external interface is larger than the preset second voltage value.
Example 6:
in order to simplify the control flow, on the basis of the above embodiments, the switch unit may also adopt a normally closed switch, and when a unit that needs to process data transmitted by the external device does not coincide with a unit connected to a normally closed end, the switch unit controls the normally closed section to open and close with a normally open end;
the central processing unit is specifically configured to send a control signal to the switch unit to control the normally closed end of the normally closed switch to be open and the normally open end to be closed if it is determined that the external device is a data line, and send a control signal to the switch unit to keep the normally closed end of the normally closed switch to be closed and the normally open end to be open if it is determined that the external device is an earphone.
Specifically, a normally closed end of the normally closed switch is connected to the audio unit, and a normally open end of the normally closed switch is connected to the central processing unit, when the central processing unit determines that the external device is a data line, the central processing unit sends a control signal to the switch unit to control the normally closed end of the normally closed switch to be opened and the normally open end to be closed, and performs read-write processing on data transmitted by the external device, and when the external device is determined to be an earphone, the central processing unit sends a control signal to the switch unit to keep the normally closed end of the normally closed switch closed and the normally open end to be opened, and performs audio processing on the data transmitted by the external device.
Because the central processing unit in the embodiment of the present invention may determine whether the currently connected external device is a data line according to the voltage value of the first pin and the voltage value of the sixth pin, if it is determined that the currently connected external device is a data line, the central processing unit may send a control signal to the switch unit to control the normally-closed end of the normally-closed switch to be opened and the normally-open end of the normally-closed switch to be closed, so that the central processing unit and the external device are connected to implement a read-write operation on data transmitted by the external device. If the earphone is connected or not at present can not be judged only according to the voltage value of the first pin and the voltage value of the sixth pin, but because the switch unit is a normally closed switch, the normally closed end is connected with the audio unit, and the normally open end is connected with the central processing unit, even if the external equipment connected with the external interface is the earphone at the moment, the external equipment can be directly connected with the audio unit, so that the audio processing of data transmitted by the external equipment is realized.
Certainly, the switch unit may also be a bidirectional switch, the bidirectional switch has two closed ends, the first closed end is connected to the central processing unit, the second closed end is connected to the audio unit, and when the bidirectional switch does not receive a control instruction of the central processing unit, the bidirectional switch is in an off state with both the first closed end and the second closed end, when the central processing unit determines that the external device is a data line, the bidirectional switch sends a control signal for controlling the first closed end to be closed to the switch unit, so that the central processing unit is connected to the external device, and performs read-write processing on data transmitted by the external device.
For the convenience of the user to use and the improvement of the user experience, on the basis of the above embodiments, the external interface is a 3.5mm interface.
Specifically, the external interface provided by the embodiment of the invention is a 3.5mm interface, the interface end is circular, when the USB interface is used by a user, the direction of the interface is not required to be considered before connection as the existing USB interface, and the interface can be inserted for connection only by aligning the direction, but the 3.5mm interface provided by the embodiment of the invention can realize 360-degree insertion under the condition that the direction is not considered, thereby greatly facilitating the use of the user and improving the experience of the user.
Example 7:
fig. 5 is a schematic diagram of a data processing process based on the mobile terminal according to an embodiment of the present invention, where the process includes:
s501: and if the external equipment is connected with the external interface, acquiring the state information of each pin of the external interface.
The data processing method provided by the embodiment of the invention is applied to the mobile terminal, the mobile terminal comprises an external interface, and the mobile terminal can be a mobile phone, a tablet personal computer and other equipment. The external equipment is an earphone or a data line connected with the mobile terminal.
Specifically, the external interface includes a plurality of pins, and when the mobile terminal is connected to an external device through the external interface, states of the pins of the external interface may also change and be connected to different external devices, and states of the pins of the external interface may also differ. The state information of each pin may be information such as a voltage value of the pin, a resistance value between the pins, a current value passing through the pin, and the like.
The mobile terminal obtains the state of each pin of the external interface of the mobile terminal in the prior art, and the process is not described in detail in the embodiment of the invention.
S502: and determining the type of the external equipment according to the state information of each pin, and judging whether the external equipment is a data line.
Different from the external equipment connected with the external interface of the mobile terminal, the state of each pin of the external interface can also change, and the type of the external equipment connected with the external interface of the mobile terminal can be determined according to the state information of each pin, so that the data transmitted by the external equipment of different types can be processed.
S503: and if the external equipment is a data line, performing read-write processing on the data transmitted by the external equipment.
Specifically, if it is determined that the external device connected to the external interface is a data line, it indicates that read-write processing is required, and the mobile terminal performs read-write processing on data transmitted by the external device.
S504: and if the external equipment is an earphone, carrying out audio processing on the data transmitted by the external equipment.
Specifically, if it is determined that the external device connected to the external interface is an earphone, it indicates that audio processing is required, and the mobile terminal performs audio processing on data transmitted by the external device.
In the embodiment of the invention, the external device is connected with the external device through an external interface, the type of the external device is determined through the state information of each pin of the external interface, if the external device is a data line, the data transmitted by the external device is read and written, and if the external device is an earphone, the data transmitted by the external device is subjected to audio processing, so that the number of the external interfaces on the mobile terminal is reduced, the space of the mobile terminal is saved, the design of the mobile terminal is facilitated, and the attractiveness of the mobile terminal and the user experience are improved.
In the embodiment of the invention, the mobile terminal comprises an external interface, wherein the external interface comprises a first pin, a second pin, a third pin, a fourth pin and a fifth pin, and the second pin and the third pin are used for transmitting data with external equipment; the first pin is connected with a battery of the mobile terminal and used for charging the battery, the fourth pin is connected with an audio unit, and the fifth pin is grounded.
If the external interface of the mobile terminal is connected with external equipment, the state of each pin of the external interface can be changed, and the state of each pin of the external interface can be different when the external interface is connected with different external equipment. The state information of each pin may be information such as a voltage value of the pin, a resistance value between the pins, a current value passing through the pin, and the like.
In the embodiment of the present invention, the obtaining of the state information of each pin of the external interface by the mobile terminal belongs to the prior art, and the process is not described in detail in the embodiment of the present invention.
Example 8:
on the basis of the above embodiments, in the embodiments of the present invention, when the external interface is connected to the data line, the voltage value of the first pin of the external interface is greater than the preset first voltage value, and if the external interface is connected to the earphone, the voltage value of the first pin of the external interface is not changed, or even if the external interface is connected to the earphone, the change amount of the voltage value of the first pin of the external interface does not reach the preset first voltage value. The acquiring the state information of each pin of the external interface comprises:
acquiring a voltage value of the first pin;
the determining the type of the external device according to the state information of each pin includes:
judging whether the acquired voltage value of the first pin of the external interface is larger than a preset first voltage value or not; if so, determining that the external equipment is the data line.
When data is read and written for the mobile terminal, the mobile terminal is connected with an active device, such as a PC, through a data line, and after the active device is connected with the external interface through the data line, a voltage value of a first pin of the external interface changes. Therefore, if the external device is connected with the external interface, the type of the external device can be determined by judging whether the voltage value of the first pin of the external interface is greater than a preset first voltage value. The preset first voltage value may be determined according to a battery allowable voltage of the mobile terminal, for example, if the battery allowable voltage of the mobile terminal is 5V, the first voltage value may be 4.5V, 4.6V, or the like, as long as the voltage of the data line connected to the external interface can be detected.
When the external device is a data line, the external device is generally connected with the active device through the data line, so that whether the external interface is connected with the data line or not can be judged by detecting the voltage value of the first pin of the external interface, and the purpose of accurately judging the type of the connected external device is achieved.
Example 9:
in the above embodiment, when the external interface is connected to the data line, the voltage value of the first pin of the external interface is greater than the preset first voltage value, if the external interface is connected to the earphone, the voltage value of the first pin of the external interface is not changed, or even if the voltage value is changed, the change amount of the voltage value does not reach the preset first voltage value, and when the external interface is connected to the external device, the resistance value between the second pin and the third pin of the external interface is different. Therefore, in the embodiment of the present invention, in order to more accurately determine the type of the external device connected to the external interface, the acquiring the state information of each pin of the external interface includes:
acquiring a voltage value of the first pin, and acquiring a resistance value between the second pin and the third pin;
the determining the type of the external device according to the state information of each pin includes:
judging whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external equipment or not;
if not, judging whether the acquired voltage value of the first pin of the external interface is larger than a preset first voltage value or not;
if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
If the external interface of the mobile terminal is connected with the external device, the external device can be an earphone or a data line in the embodiment of the invention, so that the second pin and the third pin in the external interface are connected with the left and right sound channels or the data transmission line in the external device, and the resistance value between the second pin and the third pin of the external interface is changed. Therefore, if the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the external device which is not connected, the external interface is currently connected with the external device.
If the external interface is connected with the data line, the voltage value of the first pin of the external interface is larger than the preset first voltage value, and if the external interface is connected with the earphone, the voltage value of the first pin of the external interface is not changed, or even if the voltage value is changed, the change quantity of the voltage value does not reach the preset first voltage value, so that if the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the unconnected external equipment, whether the acquired voltage value of the first pin of the external interface is larger than the preset first voltage value or not can be judged, and the type of the external equipment can be determined more accurately.
Example 10:
on the basis of the above embodiments, the external interface further includes a sixth pin, where the sixth pin is an identification ID pin of the external device.
The sixth pin is an identification ID pin of the external device, and if the external device is connected to the external interface, the mobile terminal may obtain identification information of the external device through the sixth pin, where the identification information is information that uniquely identifies the external device and may be a device number of the external device.
Specifically, after the external device is connected to the external interface, the mobile terminal may communicate with the external device through the sixth pin, obtain identification information of the external device, and determine the type of the external device according to the identification information of the external device.
The mobile terminal communicates with the external device, and acquiring the identification information of the external device is the prior art, and the process is not described in detail in the embodiment of the invention.
In addition, the mobile terminal may also obtain a voltage value of the sixth pin, where if the external device is a data line, the voltage value is greater than a set second voltage value, and if the external device is an earphone, the voltage value is not changed, and the second voltage value may be 1V, or may be a voltage value that can identify that the external interface is connected to the data line, such as 1.5V. Therefore, in the embodiment of the present invention, the acquiring the status information of each pin of the external interface further includes:
acquiring a voltage value of the sixth pin;
judging whether the acquired voltage value of the sixth pin of the external interface is larger than a preset second voltage value or not; if so, determining that the external equipment is the data line.
Example 11:
when the external device connected to the external interface is different, the resistance value between the second pin and the third pin of the external interface will be different, and in order to further improve the accuracy of determining the type of the external device, on the basis of the above embodiments, in an embodiment of the present invention, the acquiring the state information of each pin of the external interface further includes:
acquiring a voltage value of the sixth pin, and acquiring a resistance value between the second pin and the third pin;
the determining the type of the external device according to the state information of each pin includes:
judging whether the obtained resistance value between the second pin and the third pin of the external interface is the same as the stored resistance value of the unconnected external equipment or not;
if not, judging whether the voltage value of the sixth pin is larger than a preset second voltage value or not;
if so, determining that the external equipment is a data line, otherwise, determining that the external equipment is an earphone.
If the external interface of the mobile terminal is connected with the external device, the external device can be an earphone or a data line in the embodiment of the invention, so that the second pin and the third pin in the external interface are connected with the left and right sound channels or the data transmission line in the external device, and the resistance value between the second pin and the third pin of the external interface is changed. Therefore, if the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the external device which is not connected, the external interface is currently connected with the external device.
If the external interface is connected with the data line, the voltage value of the sixth pin of the external interface is larger than the preset second voltage value, and if the external interface is connected with the earphone, the voltage value of the sixth pin of the external interface is not changed, so that if the resistance value between the second pin and the third pin of the external interface is different from the stored resistance value of the external equipment which is not connected, the type of the external equipment can be more accurately determined by judging whether the acquired voltage value of the sixth pin of the external interface is larger than the preset second voltage value.
For the convenience of the user to use and the improvement of the user experience, on the basis of the above embodiments, the external interface is a 3.5mm interface.
Specifically, the external interface provided by the embodiment of the invention is a 3.5mm interface, the interface end is circular, when the USB interface is used by a user, the direction of the interface is not required to be considered before connection as the existing USB interface, and the interface can be inserted for connection only by aligning the direction, but the 3.5mm interface provided by the embodiment of the invention can realize 360-degree insertion under the condition that the direction is not considered, thereby greatly facilitating the use of the user and improving the experience of the user.
The embodiment of the invention discloses a mobile terminal and a data processing method based on the mobile terminal, wherein the mobile terminal comprises a switch unit, a central processing unit, an audio unit and an external interface, wherein: the external interface is used for being connected with external equipment; the switch unit is used for acquiring the state information of each pin of the external interface and sending the state information of each pin to the central processing unit; the central processing unit is used for determining the type of the external equipment according to the state information of each pin, sending a first control signal to the switch unit if the external equipment is a data line, and sending a second control signal to the switch unit if the external equipment is an earphone; and read-write processing is carried out on the data transmitted by the external equipment; the switch unit is also used for controlling the central processing unit to be connected with the external interface if receiving a first control signal sent by the central processing unit; if a second control signal sent by the central processing unit is received, controlling the audio unit to be connected with an external interface; and the audio unit is used for carrying out audio processing on the data transmitted by the external equipment. In the embodiment of the invention, the external device is connected with the external device through an external interface, the type of the external device is determined through the state information of each pin of the external interface, if the external device is a data line, the data transmitted by the external device is read and written, and if the external device is an earphone, the data transmitted by the external device is subjected to audio processing, so that the number of the external interfaces on the mobile terminal is reduced, the space of the mobile terminal is saved, the design of the mobile terminal is facilitated, and the attractiveness of the mobile terminal and the user experience are improved.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (13)

CN201610951941.2A2016-10-262016-10-26Mobile terminal and data processing method based on mobile terminalActiveCN106603755B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610951941.2ACN106603755B (en)2016-10-262016-10-26Mobile terminal and data processing method based on mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610951941.2ACN106603755B (en)2016-10-262016-10-26Mobile terminal and data processing method based on mobile terminal

Publications (2)

Publication NumberPublication Date
CN106603755A CN106603755A (en)2017-04-26
CN106603755Btrue CN106603755B (en)2019-06-14

Family

ID=58591383

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610951941.2AActiveCN106603755B (en)2016-10-262016-10-26Mobile terminal and data processing method based on mobile terminal

Country Status (1)

CountryLink
CN (1)CN106603755B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108054541B (en)2017-12-052020-09-29捷开通讯(深圳)有限公司Switching device, multi-equipment detection system and detection method thereof
CN112068886A (en)2019-06-102020-12-11中兴通讯股份有限公司Method and device for acquiring application program

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101917497A (en)*2010-07-232010-12-15惠州Tcl移动通信有限公司 Method and device for sharing Micro-USB interface with earphone and USB
CN101924808A (en)*2010-08-182010-12-22萨基姆移动电话研发(宁波)有限公司 a mobile terminal
CN201945991U (en)*2011-01-282011-08-24联想(北京)有限公司Electronic device and interface detection device
CN102880238A (en)*2012-08-302013-01-16中兴通讯股份有限公司Interface expanding method and device for tablet personal computer
CN103561369A (en)*2013-10-312014-02-05惠州Tcl移动通信有限公司Usb interface circuit and electronic equipment
CN104702265A (en)*2013-12-052015-06-10上海果壳电子有限公司Multifunctional interface in wearable device
CN105635885A (en)*2016-03-212016-06-01青岛海信移动通信技术股份有限公司USB interface multiplex circuit, mobile terminal and earphone

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101917497A (en)*2010-07-232010-12-15惠州Tcl移动通信有限公司 Method and device for sharing Micro-USB interface with earphone and USB
CN101924808A (en)*2010-08-182010-12-22萨基姆移动电话研发(宁波)有限公司 a mobile terminal
CN201945991U (en)*2011-01-282011-08-24联想(北京)有限公司Electronic device and interface detection device
CN102880238A (en)*2012-08-302013-01-16中兴通讯股份有限公司Interface expanding method and device for tablet personal computer
CN103561369A (en)*2013-10-312014-02-05惠州Tcl移动通信有限公司Usb interface circuit and electronic equipment
CN104702265A (en)*2013-12-052015-06-10上海果壳电子有限公司Multifunctional interface in wearable device
CN105635885A (en)*2016-03-212016-06-01青岛海信移动通信技术股份有限公司USB interface multiplex circuit, mobile terminal and earphone

Also Published As

Publication numberPublication date
CN106603755A (en)2017-04-26

Similar Documents

PublicationPublication DateTitle
CN110166871B (en)Earphone charging box, TWS earphone, working state switching method and storage medium
EP2597844B1 (en)Method and device for sharing micro-usb interface between earphone and usb
CN103064489B (en)A kind of method and terminal of carrying out internal circuit selection according to USB interface state
CN109788461B (en) Bluetooth dual-mode data communication method and device
US20160191358A1 (en)Testing method for a smart wristband and testing system thereof
CN105137356B (en)Detect the method and device of charged state
CN107172515A (en)Test earphone plug is inserted in mobile terminal detection circuit and mobile terminal
CN109254210B (en)Electronic equipment port type detection method and device, detection circuit and electronic equipment
CN105224494A (en)Method for handover control and device
CN105048018B (en)The charging method and device of a kind of terminal with data exchanging function
CN105071473A (en) USB charging method and device
CN106603755B (en)Mobile terminal and data processing method based on mobile terminal
CN112491102A (en)Single-wire communication method and related product
CN116193413A (en)Bluetooth connection method, system, storage medium and device
CN107885688B (en)Signal switching method and device
CN105183309A (en)Switching control method and device
CN104577235A (en)Method for charging portable device and charging control method, device and system
CN113365257B (en)Master-slave earphone switching method and device, earphone and readable storage medium
CN104459376B (en)A kind of interface circuit and peripherals detecting method, outer sensor based on the circuit
CN213399565U (en)Charging circuit and electronic device
CN104581527A (en)Interface circuit, as well as external detection method and external sensor based on circuit
CN107608923A (en) Test processing methods and related products
EP3690633B1 (en)Signal transmission circuit, signal transmission method and intelligent terminal
CN105450843A (en)Method and device of arranging operation mode of mobile terminal
US10439416B2 (en)Method for outputting charging current according to displayed media and power amplifier

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp