CN102053932B - Electronic device and method for identifying electronic accessory therein - Google Patents

Electronic device and method for identifying electronic accessory therein Download PDF

Info

Publication number
CN102053932B
CN102053932B CN200910209912A CN200910209912A CN102053932B CN 102053932 B CN102053932 B CN 102053932B CN 200910209912 A CN200910209912 A CN 200910209912A CN 200910209912 A CN200910209912 A CN 200910209912A CN 102053932 B CN102053932 B CN 102053932B
Authority
CN
China
Prior art keywords
socket
contact jaw
unit
plug
measuring unit
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
CN200910209912A
Other languages
Chinese (zh)
Other versions
CN102053932A (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.)
HTC Corp
Original Assignee
High Tech Computer Corp
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 High Tech Computer Corp filed Critical High Tech Computer Corp
Priority to CN200910209912A priority Critical patent/CN102053932B/en
Publication of CN102053932A publication Critical patent/CN102053932A/en
Application granted granted Critical
Publication of CN102053932B publication Critical patent/CN102053932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Details Of Connecting Devices For Male And Female Coupling (AREA)

Abstract

The invention discloses an electronic device and a method for identifying an electronic accessory therein. The electronic device comprises a jack, a voltage processing unit, a measuring unit, a data transmission unit and a switching element, wherein the jack of the electronic device is used for receiving plugging of a plug of the electronic accessory and is at least provided with a first contact end and a second contact end; the voltage processing unit is used for detecting whether voltage exists when the second contact end of the jack is contacted with a second contact of the plug; the measuring unit is used for measuring a parameter value which is generated when the first contact end of the jack is contacted with a first contact of the plug; the data transmission unit is used for receiving a data signal from the electronic accessory or transmitting the data signal to the electronic accessory through the first contact end of the jack; and the switching element is used for selectively electrically connecting the first contact end of the jack to the data transmission unit or the measuring unit in spite of the existence of the voltage. In the invention, the type of the electronic accessory which is plugged into an audio jack is identified by measuring the parameter value at the contact end of the audio jack, so the aims of using various functions of the electronic accessory can be fulfilled by using only one audio jack.

Description

The method of electronic installation and identification electronic components thereof
Technical field
The present invention relates to a kind of electronic installation, and relate in particular to a kind of method of electronic installation identification electronic components and electronic installation that uses this method of being used for.
Background technology
Many now portable electric devices, for example mobile phone, personal digital assistant etc. all dispose the audio sockets (audio jack) of the 2.5mm or the 3.5mm of standard, voiceband data signal is exported to earphone or loudspeaker.And for can with the computer swap data, also often dispose for example USB socket on the portable electric device, be connected with computer can utilize the USB transmission line.In addition, the electronic installation of some also disposes outlet, to let the user can utilize power supply adaptor (AC adapter) that electronic installation is charged.
Yet numerous socket arrangement is not only not attractive in appearance on electronic installation, and is inconvenient concerning the user yet.
Summary of the invention
But the present invention provides a kind of electronic installation of identification different electric subassembly.
In one embodiment, but electronic installation external connected electronic accessory of the present invention, and said electronic installation comprises socket, voltage processing unit, measuring unit, first data transmission unit and switching device.The socket of electronic installation is used to receive the insertion of the plug of electronic components, and it has at least the first contact jaw and second contact jaw, is respectively applied at least the first contact and second contact of contact plug; Whether second contact jaw that the voltage processing unit is used to detect socket exists voltage when contacting with second contact of plug; First parameter value that first contact jaw that measuring unit is used to measure socket is produced when contacting with first contact of plug; First data transmission unit is used for when the insertion of the plug of socket reception electronic components, through first contact jaw of socket, receiving first data-signal or transmitting first data-signal to electronic components from electronic components; According to the existence of said voltage whether switching device then is used for, and optionally first contact jaw with socket is electrically connected to first data transmission unit or measuring unit.
According to electronic installation of the present invention; This electronic installation also comprises the insertion pick-up unit; Whether the plug that is used for the detected electrons accessory inserts socket, and wherein when the insertion pick-up unit detected the plug insertion socket of electronic components, the voltage processing unit detected whether there is said voltage.
According to electronic installation of the present invention; This electronic installation also comprises second data transmission unit; Be used for when socket receives the insertion of plug of electronic components,, receiving second data-signal or transmitting second data-signal to electronic components from electronic components through second contact jaw of socket.
According to electronic installation of the present invention, wherein, when the voltage processing unit did not detect said voltage and exists, switching device was electrically connected to measuring unit with first contact jaw of socket.
In an embodiment of the present invention; First data transmission unit is the USB transmission unit; When first parameter value that measures when measuring unit was first predetermined value, switching device electrically connected first contact jaw of socket by electrically connecting to switch to the USB transmission unit with measuring unit.
In an embodiment of the present invention, first data transmission unit is an audio output unit, is used for the outputting audio data signal to electronic components.When first parameter value that measures when measuring unit was second predetermined value, switching device electrically connected first contact jaw of socket by electrically connecting to switch to audio output unit with measuring unit.
In an embodiment of the present invention; When the first measured parameter value of measuring unit is second predetermined value; Switching device with second contact jaw of socket by electrically connecting with the voltage processing unit; Switch to measuring unit and electrically connect second parameter value that second contact jaw that makes measuring unit measure socket is produced when contacting with second contact of plug.
According to electronic installation of the present invention, wherein, second data transmission unit is the audio frequency receiving element, is used for receiving voiceband data signal through second contact jaw of socket.When second parameter value that measures when measuring unit was the 3rd predetermined value, switching device electrically connected second contact jaw of socket by electrically connecting with measuring unit, switching to the audio frequency receiving element.
According to electronic installation of the present invention, wherein, second data transmission unit is a video output unit, is used for the second contact jaw output video data-signal through socket.When second parameter value that measures when measuring unit was the 4th predetermined value, switching device electrically connected second contact jaw of socket by electrically connecting with measuring unit, switching to video output unit.
The present invention also provides a kind of method that is used at electronic installation identification electronic components, and wherein, electronic installation has voltage processing unit, measuring unit, battery and socket, and this socket has at least the first contact jaw and second contact jaw.Method of the present invention comprises the following steps: whether there is voltage on second contact jaw by voltage processing unit detection socket; And when the voltage processing unit does not detect said voltage and exists, first contact jaw of socket is electrically connected to measuring unit, and measures the parameter value that is produced when first contact jaw contacts with the plug of electronic components by measuring unit.
According to the method for the invention; By the parameter values of measuring on the contact jaw of audio sockets such as voltage, electric current or impedance; Which kind of electronic components what come identification insertion audio sockets is, therefore only need utilize an audio sockets, can reach the purpose of using multiple electronic components function.In addition, before audio sockets is not inserted any plug, switching device is switched to the contact that makes audio sockets be connected with the voltage processing unit earlier, can avoid when power supply adaptor that is connected to power supply or USB connecting line insertion audio sockets, damaging other elements.
For let above-mentioned and other purposes of the present invention, feature and advantage can be more obvious, hereinafter will cooperate appended diagram, elaborate as follows.
Description of drawings
Fig. 1 a is the synoptic diagram of three contact audio jack of standard;
Fig. 1 b is the synoptic diagram of four contact audio jack of standard;
Fig. 2 is the structural representation according to electronic installation of the present invention;
Fig. 3 a to Fig. 3 d is the synoptic diagram that can be used in the accessory of electronic installation of the present invention; And
Fig. 4 a and Fig. 4 b are identification electronic components of the present invention and the process flow diagram of carrying out the method for electronic components corresponding function.
The main element symbol description
110 audio jack, 112 contacts
114 contacts, 116 contacts
118 contacts, 120 audio jack
200 electronic installations, 210 audio sockets
212 contact jaws, 214 contact jaws
216 contact jaws, 218 contact jaws
221 insert pick-up unit 222UART unit
223 audio output unit 224USB transmission units
225 video output units, 226 audio frequency receiving elements
227 measuring units, 228 voltage processing units
229 batteries, 240 CPU
252 switching devices, 254 switching devices
260 control module 260-1 select signal
260-2 selects signal 260-3 to select signal
260-4 selects signal 312 plugs
314 connecting lines, 322 power supply adaptors
324 connecting lines, 326 plugs
332 earphones, 336 control knobs
340 transmission lines, 342 audio jack
344 video plug 414-472 steps
Embodiment
The external connected electronic accessory of electronic installation, for example earphone or microphone generally include the standard plug (plug) of a 2.5mm or 3.5mm diameter, are used to be plugged in the audio sockets (audio jack) on the electronic installation.With reference to figure 1a and Fig. 1 b, the audio jack 110,120 of standard comprises three or four contacts (contact), and each contact insulate each other.After the audio sockets that plug 110,120 inserts on the electronic installation, these contacts can contact with corresponding contact jaw in the socket.With common earphone, its plug 110 comprises three contacts, by beginning foremost of plug, is contact 112,114 and 116 in regular turn, and wherein contact 112 is the output terminal of L channel, and contact 114 is the output terminal of R channel, and contact 116 then is used for ground connection.In addition, with regard to the earphone with microphone function, its plug 120 comprises four contacts 112,114,116 and 118, and the contact 118 that has more is the input end of sound.
With reference to figure 2; Electronic installation 200 of the present invention comprises audio sockets 210; When three contacts 110 shown in Fig. 1 a or Fig. 1 b or four contact plug, 120 insertion sockets 210; The contact 112,114,116,118 of four contact plug 120 can contact with the contact jaw 212,214,216,218 of socket 210 respectively, reaches the purpose of electric connection.In addition, when the plug 110 of three contacts inserted in the socket 210, its contact 112,114 can electrically contact with the contact jaw 212,214 of socket 210 respectively, and contact 116 then can electrically contact with contact jaw 216 and 218.
For the accessory of difference in functionality all can be inserted in the audio sockets 210, an end of accessory need dispose the standard plug 110,120 shown in Fig. 1 a or Fig. 1 b.For instance, with reference to figure 3a, the USB plug 312 of standard is square structure, has four pin positions such as USB_VBUS, USB_D+, USB_D-and GND.In the present invention, USB plug 312 utilizes connecting line 314 to be connected with four contact plug 120 of Fig. 1 b, and wherein USB_D-, USB_D+, GND and USB_VBUS pin position electrically connect with contact 112,114,116 and 118 respectively.With reference to figure 3b, power supply adaptor (ACadapter) the 322nd, a kind of outlet that inserts on the wall is to be output as AC power direct supply and to offer the device that electronic installation charges.In the present invention, power supply adaptor 322 can meet CNS regulation (China ' s national standard definition), and it is connected with the plug 326 of one three contact by connecting line 324.The plug 326 of this three contact is similar to four contact plug 120 of Fig. 1 b, but contact 112 wherein and 114 electric connections, that is plug 326 only comprises contact 112,116 and 118.When plug 326 inserted in the audio sockets 210 of electronic installations 200, the contact 112 of plug 326 can electrically contact with 214 with the interior contact jaw of socket 210 212.Just (+) utmost point of power supply adaptor 322 outputs and the contact of plug 326 118 electrically connect, and negative (-) utmost point then electrically connects with contact 116.
In addition, with reference to figure 3c, a kind of earphone that can be used for receiving calls 332 comprises four contact plug 120 of control knob 336 and Fig. 1 b.When using on mobile phone; Can see interruption (interrupt) signal off by the contact 118 of plug 120 after control knob 336 is pressed and give mobile phone; The user can receive calls and start the microphone (not shown) that is hidden in the control knob 336 at this moment, and sound also can be seen off by earphone 332.When pressing control knob 336 once more, the contact 118 of plug 120 can be seen look-at-me again off and give mobile phone, to hang up the telephone.
With reference to figure 3d, it shows the transmission line 340 of a kind of output sound simultaneously and image.One end of transmission line 340 disposes four contact plug 120 shown in Fig. 1 b; The other end then has two audio jack 342 and a video (video) plug 344; Wherein video plug 344 electrically connects with the contact 118 of plug 120, and two audio jack 342 then electrically connect with contact 112 and 114 respectively.In addition, three contact plug 110 shown in Fig. 1 a also can be applicable to universal asynchronous receiver-transmitter (Universal AsynchronousReceiver/Transmitter; UART) in, this moment, the contact 112 of plug 110 electrically connected with transmitter, and contact 114 then electrically connects with receiver.
Please refer to Fig. 2 again; Electronic installation 200 also comprises and inserts pick-up unit 221, five data transmission units 222,223,224,225,226, measuring unit 227, voltage processing unit 228, battery 229, CPU 240, two switching devices 252,254 (for example, multiplexer) and control modules 260.In the present invention; When data transmission unit 222,223,224,225,226 receives the insertion of plug of electronic components when socket 210; Through the contact jaw 212,214,218 of socket 210, receive data-signal or data signal to electronic components by electronic components.Above-mentioned data transmission unit 222,223,224,225,226 all electrically connects with CPU 240, can be respectively UART unit 222, audio output unit 223, USB transmission unit 224, video output unit 225 and audio frequency receiving element 226.
Switching device 252 has an input end IN and four output terminal Q0, Q1, Q2 and Q3; Wherein the contact jaw 218 of input end IN and audio sockets 210 electrically connects, and output terminal Q0 and 228 electric connections of voltage processing unit, output terminal Q1 and measuring unit 227 electric connections, output terminal Q2 and 226 electric connections of audio frequency receiving element, output terminal Q3 and video output unit 225 electrically connect.In addition; Selection signal 260-1 and 260-2 that switching device 252 can be exported according to control module 260, and the contact jaw 218 that optionally input end IN is connected switches and be electrically connected to voltage processing unit 228, measuring unit 227, audio frequency receiving element 226 or the video output unit 225 that four output terminal Q0, Q1, Q2 and Q3 are connected.
Switching device 254 has two input end IN and eight output terminals; For example be two Q0, two Q1, two Q2 and two Q3; Wherein two input end IN electrically connect with the contact jaw of audio sockets 210 212,214 respectively, and two output terminal Q0 electrically connect with USB transmission unit 224, two output terminal Q1 electrically connect with measuring unit 227, two output terminal Q2 and audio output unit 223 electric connections, two output terminal Q3 and 222 electric connections of UART unit.In addition; Selection signal 260-3 and 260-4 that switching device 254 can be exported according to control module 260, and two contact jaws 212,214 that optionally two input end IN connected switch and be electrically connected to USB transmission unit 224, measuring unit 227, audio output unit 223 or the UART unit 222 that four groups of output terminals Q0, Q1, Q2 and Q3 are connected.
After three contacts 110 shown in Fig. 1 a or Fig. 1 b or four contact plug, 120 insertion audio sockets 210, because contact jaw 216 ground connection of audio sockets 210, contact 116 also can form ground connection.In addition, contact 118 can be electrically connected to the input end IN of switching device 252 by contact jaw 218, and contact 112 and 114 also can be electrically connected to the input end IN of switching device 254 respectively by contact jaw 212 and 214.Therefore; If seeing off, control module 260 select signal 260-1,260-2 to make its output terminal switch to Q0 for switching device 252; Then input end IN and output terminal Q0 can form conducting, and the contact 118 of plug 120 or the contact 116 of plug 110 just can electrically connect with voltage processing unit 228 through contact jaw 218.In like manner; If the input end IN of switching device 252 forms conducting according to selecting signal 260-1,260-2 with Q1, Q2 or Q3, then the contact 116 of the contact 118 of plug 120 or plug 110 can be through contact jaw 218 and is electrically connected with measuring unit 227, audio frequency receiving element 226 or video output unit 225 respectively.If seeing off, control module 260 select signal 260-3,260-4 to make its output terminal switch to Q0 for switching device 254; Then two input end IN and two output terminal Q0 can form conducting, and plug 110 or 120 contact 112,114 just can electrically connect through contact jaw 212,214 and with USB transmission unit 224.In like manner; If two input end IN form conducting with two output terminal Q1, Q2 or Q3 respectively according to selecting signal 260-3,260-4, then plug 110 or 120 contact 112,114 just can electrically connect with measuring unit 227, audio output unit 223 or UART unit 222 respectively.
Please refer to Fig. 2 again, is that which kind of electronic components inserts audio sockets 210 in order to judge, the contact jaw 212,214 and 218 of socket 210 is connected with resistance R respectively 1, R 2And R 3, and the contact 112,114 and 118 of the plug of different electronic components has different resistance values, for example R C, R BAnd R AWhen the plug 112 or 114 of electronic components inserts socket 210, the contact jaw 212,214 and 218 of socket 210, i.e. resistance R 1, R 2And R 3End points C, B, A can distinguish the contact 112,114 and 118 of electrical contact plug 110 or 120, and produce different voltage-to-grounds respectively, for example V according to the dividing potential drop theorem 1, V 2And V 3, V wherein 1Equal V DD* (R C/ (R C+ R 1)), V 2Equal V DD* (R B/ (R B+ R 2)), and V 3Equal V DD* (R A/ (R A+ R 3)).In the present invention, measuring unit 227 uses analog digital converting unit (analog-to-digital converter; ADC) measure and be applied to resistance R 1, R 2And R 3Upper extreme point C, B, the last voltage-to-ground V of A 1, V 2And V 3And convert voltage signal into digital signal; This digital signal again with the storer that is stored in electronic installation 200 in the default value (not shown) that compares, which kind of accessory what promptly decidable inserted audio sockets 210 is, therefore electronic installation 200 carries out corresponding application program or function again.In another embodiment, be applied to resistance R when measurement 1, R 2And R 3The voltage-to-ground of upper extreme point C, B, A is respectively V 1, V 2And V 3The time (voltage on the contact jaw 212,214 and 218 of socket 210), also can further calculate the resistance value R between plug connector 112,114,118 to contact 116 (being earth point) C, R BAnd R ABe respectively R CEqual (R 1* V 1)/(V DD-V 1), R BEqual (R 2* V 2)/(V DD-V 2) and R AEqual (R 3* V 3)/(V DD-V 3), then again with the resistance value R that calculates C, R BAnd R AWith default value in the storer that is stored in electronic installation 200 (not shown) that compares, which kind of accessory what also decidable inserted audio sockets 210 is.Measuring unit 227 used in the present invention can be one 12 a analog digital converting unit, and promptly its output area is 0x000 to 0xFFF.Hereinafter will specify identification electronic components of the present invention and carry out the method for electronic components corresponding function.
The insertion pick-up unit 221 of electronic installation 200 electrically connects CPU 240.It is every at a distance from the schedule time to insert pick-up unit 221, and for example 100ms just can detect the plug whether any electronic components are arranged and insert in the audio sockets 210.When insertion pick-up unit 221 does not detect the plug insertion audio sockets 210 of any electronic components; The control module 260 of electronic installation 200 can produce selects signal 260-1,260-2,260-3,260-4; For example digital signal " 0000 " sends CPU 240 to; CPU 240 can be gone control switching element 252,254 according to this selection signal and through control module 260, and its input end IN can be electrically conducted with output terminal Q0 end.That is; When insertion pick-up unit 221 does not detect the plug insertion audio sockets 210 of any electronic components; Switching device 252 can be electrically connected to voltage processing unit 228 with the contact jaw 218 of audio sockets 210, and switching device 254 can be electrically connected to USB transmission unit 224 with the contact jaw 212,214 of audio sockets 210.
In other embodiments; Said insertion pick-up unit 221 also can be the interruption reaction unit; Promptly need not whenever detect once, in the time of in any plug inserts audio sockets 210, interrupt reaction unit and can produce and transmit signal to CPU 240 at a distance from the schedule time.In one embodiment, when inserting plug that pick-up unit 221 detects electronic components and insert audio sockets 210, voltage processing unit 228 can begin to detect on the contact jaw 218 of audio sockets 210 whether the voltage of existence is arranged.At this moment, if voltage processing unit 228 detects when on the contact jaw 218 of audio sockets 210 voltage of existence being arranged, the electronic components that decidable is connected on the audio sockets 210 are power supply adaptor 322 shown in Fig. 3 a and Fig. 3 b or USB plug 312, and connect with the mains.Then; Again by the voltage on the contact jaw 212,214 of USB transmission unit 224 detection audio sockets 210; If the voltage on the contact jaw 212,214 equates; The decidable power supply is to be provided by 322 of power supply adaptors, and this power supply can begin the battery 229 of electronic installation 200 is charged via voltage processing unit 228.If the voltage on the contact jaw 214 is during greater than the voltage on the contact jaw 212; Then the decidable power supply is to be provided via 312 of USB plugs by computer; This moment, this power supply can charge via 228 pairs of batteries 229 of voltage processing unit; USB transmission unit 224 is also seen signal off and is given CPU 240, and CPU 240 is carried out synchronization program according to this signal, so that electronic installation 200 can carry out synchronously and swap data with the computer (not shown) simultaneously.
In addition; When insertion pick-up unit 221 detects the plug insertion audio sockets 210 of electronic components; If having detected voltage on the contact jaw 218 of audio sockets 210, voltage processing unit 228 do not exist; Then the input end IN of switching device 252 and output terminal Q0 keep electrically connecting; And two input end IN of switching device 254 can switch and electrically conduct with two output terminal Q1, so that the contact jaw of audio sockets 210 212,214 by electrically connecting with USB transmission unit 224, switches to and measuring unit 227 electrically connects.If measuring unit 227 measured parameter value on the contact jaw 212,214 of audio sockets 210 be first numerical value (for example: in the time of 0xFFF); That is when measuring open circuit (open) state, the decidable electronic components are the power supply adaptor 322 or the USB plugs 312 of not supplying power.At this moment; The input end IN of switching device 252 and output terminal Q0 still keep electrically conducting; Two input end IN of switching device 254 are then by electrically conducting with two output terminal Q1; Switch back with two output terminal Q0 and electrically conduct, the contact jaw 212,214 that also is about to audio sockets 210 switches back and 224 electric connections of USB transmission unit by electrically connecting with measuring unit 227.Wait for that power supply can charge through 228 pairs of batteries 229 of voltage processing unit when the user connects with the mains power supply adaptor 322 or USB plug 312.
If measuring unit 227 is when parameter value measured on the contact jaw 212,214 of audio sockets 210 is in the second value scope; Then the input end IN of switching device 252 will electrically conduct with output terminal Q1; Two input end IN of switching device 254 then electrically conduct with two output terminal Q2; So that switching device 252 can be with the contact jaw 218 of audio sockets 210 by electrically connecting with voltage processing unit 228, switch to and measuring unit 227 electrically connects; And switching device 254 can switch to and audio output unit 223 electric connections with contact jaw 212,214 by electrically connecting with measuring unit 227.Then; The parameter value that the contact jaw 218 of measuring unit 227 measurement of audio sockets 210 is produced when contacting with plug connector; Which kind of accessory with what judge insertion audio sockets 210 is; That is electronic installation 200 can be carried out relevant function according to measuring unit 227 at the measured numerical value of the contact jaw of socket 210 218.
Situation one: the parameter value that measuring unit 227 measures is 0xFFF
Measured parameter value is 0xFFF on the contact jaw 218 of measuring unit 227 in audio sockets 210; That is measuring open circuit (open) state, the electronic components that decidable is connected on the audio sockets 210 are the earphones 332 that have four contact plug and control knob 336 shown in Fig. 3 c.Subsequently, if the measurement numerical value of measuring unit 227 is changed into 0x000, that is measure short circuit (short) state, promptly the control knob 336 of decidable earphone 332 is pressed.Then, the input end IN of switching device 252,254 is all switched to output terminal Q2, so that the contact jaw of audio sockets 210 218 electrically connects with audio frequency receiving element 226, contact jaw 212,214 then electrically connects with audio output unit 223.At this moment; Audio output unit 223 and audio frequency receiving element 226 are activated; And audio output unit 223 by contact jaw 212,214 with voiceband data signal; For example speech data signal or music data signal export earphone 332 to, and user's microphone that is hidden in the control knob 336 also capable of using inputs to audio frequency receiving element 226 through contact jaw 218 with speech data signal or music data signal.Therefore, when electronic installation 200 is mobile phones, the user can borrow and press control knob 336 to start microphone and to receive calls.Then; When if the user presses control knob 336 once more; Look-at-me will be seen off to CPU 240 from contact jaw 218; CPU 240 sends a signal to audio frequency receiving element 226 and audio output unit 223 according to this look-at-me more in addition, orders it and decommissions, and the while also hangs up the telephone.At this moment the input end of switching device 252 will switch to output terminal Q1, and two input end IN of switching device 254 will keep electrically conducting with output terminal Q2.
Situation two: the parameter value that measuring unit 227 measures is in the third value scope
When parameter value measured on the contact jaw 218 of measuring unit 227 in audio sockets 210 was in the third value scope, the electronic components that CPU 240 decidables are connected on the audio sockets 210 were the earphones that shown in Fig. 3 c, have four contact plug and microphone (but not having control knob 336).Then; The input end IN of switching device 252 is switched to output terminal Q2; So that the contact jaw 218 of audio sockets 210 by electrically connecting with measuring unit 227, switches to audio frequency receiving element 226 electrically connect, and two input end IN of switching device 254 keep electrically conducting with two output terminal Q2.At this moment; Audio output unit 223 and audio frequency receiving element 226 are activated; And audio output unit 223 exports voiceband data signal to earphone by contact jaw 212,214, and user's microphone also capable of using inputs to audio frequency receiving element 226 through contact jaw 218 with voiceband data signal.
Situation three: the parameter value that measuring unit 227 measures is in the 4th numerical range
When parameter value measured on the contact jaw 218 of measuring unit 227 in audio sockets 210 was in the 4th numerical range, the electronic components that CPU 240 decidables are connected on the audio sockets 210 were to have four contact plug shown in Fig. 3 d and can be used for output sound and the transmission line of image 340.Then; The input end IN of switching device 252 is switched to output terminal Q3; So that the contact jaw 218 of audio sockets 210 by electrically connecting with measuring unit 227, switches to video output unit 225 electrically connect, and two input end IN of switching device 254 keep electrically conducting with two output terminal Q2.At this moment, video output unit 225 and audio output unit 223 are activated, and respectively video and voiceband data signal are exported to through contact jaw 218,212,214 on the electronic installation that is connected with plug 342,344, for example televisor.
Situation four: the parameter value that measuring unit 227 measures is 0x000
When measured parameter value is 0x000 on the contact jaw 218 of measuring unit 227 in audio sockets 210; That is measuring short circuit (short) state, it is to have three contact plug (shown in Fig. 1 a) but do not have the earphone of microphone that decidable is connected in electronic components on the audio sockets 210.Then, audio output unit 223 is activated, and exports voiceband data signal to earphone by contact jaw 212,214.
Fig. 4 a and Fig. 4 b show the process flow diagram of the method for identification electronic components of the present invention.Please refer to Fig. 2, Fig. 4 a and Fig. 4 b; At first; Before audio sockets 210 is inserted the plug of any electronic components, the input end IN of switching device 252,254 all switched be connected to output terminal Q0 (step 412), whether there is plug to insert audio sockets 210 (step 416) to detect.When not detected plug when inserting audio sockets 210, then detect again again after at the fixed time.When having detected plug when inserting audio sockets 210, then utilize voltage processing unit 228 to detect on the contact jaw 218 of audio sockets 210 whether have voltage, offer electronic installation 200 (step 418) to have judged whether power supply.When on detecting contact jaw 218, having voltage to exist, whether the voltage that detects again on the contact jaw 212,214 equates (step 420).When the voltage on the contact jaw 212,214 equated, promptly the electronic components that connected of decidable socket 210 were that the power supply adaptor 322 (shown in Fig. 3 b) of connecting with the mains is arranged, and then trigger voltage processing unit 228 is with battery 229 is charged (step 422).When the voltage on the contact jaw 214 during greater than the voltage on the contact jaw 212; Be that the electronic components that connected of decidable socket 210 are for to have the USB plug 312 (shown in Fig. 3 a) that is connected with computer; Then trigger voltage processing unit 228 to be charging to battery, and carries out data synchronization programs (step 424) by CPU 240.
When not detected voltage on the contact jaw 218 and existed; The input end IN of switching device 252,254 switched respectively be connected to output terminal Q0 and Q1 (step 432), and judge whether measuring unit 227 measured parameter values are first numerical value: 0xFFF (step 434).If measuring unit 227 measured parameter values are 0xFFF; Be power supply adaptor 322 or the USB plug 312 of electronic components that decidable socket 210 connects for not supplying power; And the input end IN of switching device 252,254 all switched to output terminal Q0 (step 436), to wait for that the user connects with the mains power supply adaptor 322 or USB plug 312.If the non-0xFFF of parameter value that measuring unit 227 is measured, then judge the measured parameter value of measuring unit 227 whether in the second value scope (step 438), if not, then the input end IN with switching device 252,254 all switches to output terminal Q0; If then the input end IN with switching device 252,254 switches to output terminal Q1 and Q2 (step 440) respectively.It should be noted; Insert pick-up unit 221 after plug inserts audio sockets 210; Still can test plug whether extract audio sockets 210 (step 442), if detecting plug extracts audio sockets 210, then the input end IN with switching device 252,254 all switches back output terminal Q0 (step 444).If insertion pick-up unit 221 does not detect plug and extracts audio sockets 210, then skip to tie point A, come back to step 418, whether to have voltage to exist on the contact jaw 218 that detects audio sockets 210 by voltage processing unit 228.
With reference to figure 4b; Then; The parameter value (step 452) that the contact jaw 218 of measuring unit 227 measurement of audio sockets 210 is produced when contacting with plug connector; 1) when measuring unit 227 measured parameter values be 0xFFF, the electronic components that decidable is connected on the audio sockets 210 are the earphones 332 that have four contact plug and control knob 336 shown in Fig. 3 c.Then; Judge whether measuring unit 227 measured numerical value change into 0x000 (step 454); If then the control knob 336 of decidable earphone 332 is pressed, this moment, the input end IN of switching device 252,254 all switched to output terminal Q2 (step 456); The audio frequency receiving element 226 of electronic installation 200 is activated with audio output unit 223, user's can receive calls (step 458).If then the user presses control knob 336 once more to see look-at-me (step 460) off, then can hang up the telephone, and the input end IN of switching device 252,254 switches to output terminal Q1 and Q2 (step 462) respectively.
2) when the measured parameter value of measuring unit 227 was in the third value scope, the electronic components that decidable is connected in audio sockets 210 were the earphones that shown in Fig. 3 c, have four contact plug and microphone (but not having control knob 336).Then; The input end IN of switching device 252,254 is all switched to output terminal Q2 (step 464); And the audio output unit 223 and audio frequency receiving element 226 of startup electronic installation 200, to see voiceband data signal to earphone off and to receive voiceband data signal (step 466) from microphone was produced.
3) when the measured parameter value of measuring unit 227 in the 4th numerical range, the electronic components that decidable is connected on the audio sockets 210 are to have four contact plug shown in Fig. 3 d and can be used for output sound and the transmission line of image 340.Then, the input end IN of switching device 252,254 is switched to output terminal Q3 and Q2 (step 468) respectively, and start the video output unit 225 and audio output unit 223 of electronic installation 200, to see video and voiceband data signal (step 470) respectively off.
4) when the numerical value of measuring unit 227 output is 0x000, it is to have three contact plug (shown in Fig. 1 a) but do not have the earphone of microphone that decidable is connected in electronic components on the audio sockets 210.Then start the audio output unit 223 of electronic installation 200, to export voiceband data signal to earphone (step 472) by contact jaw 212,214.It should be noted that equally; Insert pick-up unit 221 after plug inserts audio sockets 210; Still can whether extract audio sockets 210 (step 484) by the detection at any time plug; If detecting plug extracts audio sockets 210, then the input end IN with switching device 252,254 all switches back output terminal Q0 (step 486).If insertion pick-up unit 221 does not detect plug and extracts audio sockets 210, then skip to tie point B.
It should be noted; In other embodiment of the present invention; Except with the measured standard of parameter value of measuring unit as judgement, also the electronic components menu can be provided by application program performed on the electronic installation, directly select the electronic components of institute's desire connection for the user.For example; When the electronic components that connected are UART transmission accessory; The user can select UART transmission accessory on the electronic components menu; Make the input end IN of switching device 254 switched to output terminal Q3, use electrically connecting UART unit 222 and UART transmission accessory, transmit asynchronous reception and the work of transmission between the accessory to carry out electronic installation and UART.
Electronic installation of the present invention can be mobile phone, smart mobile phone, personal digital assistant, MP3 player and other any electronic installation with standard 2.5mm or 3.5mm audio sockets (audio jack).
Moreover, though the present invention with the magnitude of voltage on the contact jaw 212,214,218 of measurement of audio socket 210 as the foundation of carrying out corresponding function, can also measure other parameters, for example resistance value or current value are with the foundation as the corresponding function of execution.No matter measured parameter value is voltage, electric current or resistance value on the contact jaw 212,214,218 of audio sockets 210, it is all relevant with the resistance value of the plug of electronic components.Be prone to it, in the plug insertion audio sockets 210 of different electronic components, parameter values such as voltage, electric current or impedance measured on the contact jaw 212,214,218 are also inequality, are used as carrying out the foundation of corresponding function by this.
In addition, though the present invention does example with two switching devices 252,254, the operator of technical field should be appreciated that and also can use only switching device under the present invention.
According to the method for the invention; By the parameter values of measuring on the contact jaw of audio sockets such as voltage, electric current or impedance; Which kind of electronic components what come identification insertion audio sockets is, therefore only need utilize an audio sockets, can reach the purpose of using multiple electronic components function.In addition; Before audio sockets is not inserted any plug; Switching device is switched to the contact that makes audio sockets be connected, can avoid when power supply adaptor that is connected to power supply or USB connecting line insertion audio sockets, damaging other elements with voltage processing unit and USB transmission unit.
Though the present invention is disclosed by the foregoing description, yet the foregoing description is not to be used to limit the present invention, and those skilled in the art under any the present invention are not breaking away from the spirit and scope of the present invention, should do various variations and modification.Therefore protection scope of the present invention should be as the criterion with the scope that appended claims was defined.

Claims (16)

1. electronic installation, this electronic installation can external connected electronic accessories, and these electronic components have plug, and said electronic installation comprises:
Socket is used to receive the insertion of the plug of said electronic components, and this socket has at least the first contact jaw and second contact jaw, is respectively applied at least the first contact and second contact of the said plug of contact;
Whether voltage processing unit, second contact jaw that is used to detect said socket exist voltage when contacting with second contact of said plug;
Measuring unit, first parameter value that first contact jaw that is used to measure said socket is produced when contacting with first contact of said plug, wherein this first parameter value is magnitude of voltage, current value or resistance value;
First data transmission unit is used for when said socket receives the insertion of plug of said electronic components, through first contact jaw of said socket, receives first data-signal or transmits this first data-signal to said electronic components from said electronic components; And
Switching device; Whether to be used for according to the existence of said voltage; First contact jaw of said socket is electrically connected to said first data transmission unit or measuring unit; Wherein do not detect said voltage when existing when said voltage processing unit, said switching device is electrically connected to said measuring unit with first contact jaw of said socket.
2. electronic installation according to claim 1, this electronic installation also comprises:
Insert pick-up unit, whether the plug that is used to detect said electronic components inserts said socket, and wherein when inserting plug that pick-up unit detects said electronic components and insert said socket, whether said voltage processing unit detection exists said voltage.
3. electronic installation according to claim 2; This electronic installation also comprises second data transmission unit; Be used for when said socket receives the insertion of plug of said electronic components; Through second contact jaw of said socket, receive second data-signal or transmit this second data-signal to said electronic components from said electronic components.
4. electronic installation according to claim 3, wherein, said switching device also is used for second contact jaw of said socket is electrically connected to said second data transmission unit or voltage processing unit; And the plug that does not detect said electronic components when said insertion pick-up unit is when inserting said socket, and said switching device is electrically connected to said voltage processing unit with second contact jaw of said socket.
5. electronic installation according to claim 2, this electronic installation also comprises battery, wherein when said voltage processing unit detected voltage and exists, said voltage processing unit charged to this battery.
6. electronic installation according to claim 2; Wherein, Said first data transmission unit is the USB transmission unit; When first parameter value that measures when said measuring unit was first predetermined value, said switching device by electrically connecting with said measuring unit, switched to first contact jaw of said socket and said USB transmission unit electrically connects.
7. electronic installation according to claim 2; Wherein, said first data-signal is a voiceband data signal, and said first data transmission unit is an audio output unit; Be used to export said voiceband data signal to said electronic components; When first parameter value that measures when said measuring unit was second predetermined value, said switching device by electrically connecting with said measuring unit, switched to first contact jaw of said socket and said audio output unit electrically connects.
8. electronic installation according to claim 7; Wherein, When the first measured parameter value of said measuring unit is said second predetermined value; Said switching device by electrically connecting with said voltage processing unit, switches to second contact jaw of said socket and said measuring unit electrically connects second parameter value that second contact jaw that makes this measuring unit measure said socket is produced when contacting with second contact of said plug.
9. electronic installation according to claim 8; This electronic installation also comprises the audio frequency receiving element; Be used for receiving voiceband data signal through second contact jaw of said socket; When second parameter value that measures when said measuring unit was the 3rd predetermined value, said switching device by electrically connecting with said measuring unit, switched to second contact jaw of said socket and said audio frequency receiving element electrically connects.
10. electronic installation according to claim 8; This electronic installation also comprises video output unit; Be used for the second contact jaw output video data-signal through said socket; When second parameter value that measures when said measuring unit was the 4th predetermined value, said switching device by electrically connecting with said measuring unit, switched to second contact jaw of said socket and said video output unit electrically connects.
11. method that is used at electronic installation identification electronic components; Said electronic installation has voltage processing unit, measuring unit, battery and socket; This socket is used to receive the insertion of the plug of said electronic components; This socket has at least the first contact jaw and second contact jaw, and this method comprises:
Detect by said voltage processing unit on second contact jaw of said socket and whether have voltage;
When said voltage processing unit does not detect said voltage and exists; First contact jaw of said socket is electrically connected to said measuring unit; And measure first parameter value that is produced when said first contact jaw contacts with the plug of said electronic components by this measuring unit, wherein this first parameter value is magnitude of voltage, current value or resistance value; And
Said first parameter value and default value are compared, and the type of the electronic components of said socket is inserted in identification according to comparing result.
12. method according to claim 11, this method also comprises:
Whether the plug that detects said electronic components inserts said socket; And
When the plug that detects said electronic components inserted said socket, said voltage processing unit detected whether there is said voltage.
13. method according to claim 12, this method also comprises:
When the plug that does not detect said electronic components inserts said socket, second contact jaw of said socket is electrically connected to said voltage processing unit.
14. method according to claim 11, this method also comprises:
When said voltage processing unit detects said voltage and exists, battery is charged.
15. method according to claim 11; Wherein, Said electronic installation also has first data transmission unit and second data transmission unit; When the first measured parameter value of said measuring unit is first predetermined value, first contact jaw of said socket by electrically connecting with said measuring unit, is switched to and said first data transmission unit electrically connects; And when the first measured parameter value of said measuring unit is second predetermined value, first contact jaw of said socket by electrically connecting with said measuring unit, is switched to and said second data transmission unit electrically connects.
16. method according to claim 15, this method also comprises:
When the first measured parameter value of said measuring unit is said second predetermined value, second contact jaw of said socket by electrically connecting with said voltage processing unit, is switched to and said measuring unit electrically connects;
Measure second parameter value that is produced when said second contact jaw contacts with said plug by said measuring unit; And
When the second measured parameter value of said measuring unit is the 3rd predetermined value, second contact jaw of said socket by electrically connecting with said measuring unit, is switched to and said second data transmission unit electrically connects.
CN200910209912A 2009-10-29 2009-10-29 Electronic device and method for identifying electronic accessory therein Active CN102053932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910209912A CN102053932B (en) 2009-10-29 2009-10-29 Electronic device and method for identifying electronic accessory therein

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910209912A CN102053932B (en) 2009-10-29 2009-10-29 Electronic device and method for identifying electronic accessory therein

Publications (2)

Publication Number Publication Date
CN102053932A CN102053932A (en) 2011-05-11
CN102053932B true CN102053932B (en) 2012-09-05

Family

ID=43958274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910209912A Active CN102053932B (en) 2009-10-29 2009-10-29 Electronic device and method for identifying electronic accessory therein

Country Status (1)

Country Link
CN (1) CN102053932B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279432A (en) * 2013-04-27 2013-09-04 深圳市文鼎创数据科技有限公司 Method for switching working modes of intelligent secrete key device and intelligent secrete key device
EP2961196B1 (en) * 2014-06-26 2016-09-21 ams AG Host interface, accessory interface and method for managing a connection between a host interface and an accessory device
US10693458B2 (en) * 2018-07-16 2020-06-23 Super Micro Computer, Inc. Switch circuit and method of operating the same
CN109104659A (en) * 2018-08-01 2018-12-28 刘洋 A kind of mobile terminal charging assembly and its charging method
CN110430509A (en) * 2019-08-02 2019-11-08 上海诺为科技有限公司 A kind of microphone and audio input interface adaptive approach
CN110351632A (en) * 2019-08-02 2019-10-18 上海诺为科技有限公司 A kind of microphone and audio input interface adaptive circuit
CN113016192A (en) * 2020-09-24 2021-06-22 深圳市大疆创新科技有限公司 Plug detection device, audio processing equipment, audio processing system and plug detection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1279554A (en) * 1999-06-29 2001-01-10 索尼公司 Signal input/output device
CN1430838A (en) * 2000-05-12 2003-07-16 汤姆森特许公司 Apparatus and method for improved device interoperability
TW200700995A (en) * 2005-06-29 2007-01-01 High Tech Comp Corp Cradle for connecting to portable electronic apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1279554A (en) * 1999-06-29 2001-01-10 索尼公司 Signal input/output device
CN1430838A (en) * 2000-05-12 2003-07-16 汤姆森特许公司 Apparatus and method for improved device interoperability
TW200700995A (en) * 2005-06-29 2007-01-01 High Tech Comp Corp Cradle for connecting to portable electronic apparatus

Also Published As

Publication number Publication date
CN102053932A (en) 2011-05-11

Similar Documents

Publication Publication Date Title
TWI405990B (en) Electronic device and method thereof for identifying electronic accessory
CN102053932B (en) Electronic device and method for identifying electronic accessory therein
CN101316454B (en) Audio interface device and method
CN101951421B (en) Expansion use method for cell phone earphone interface
CN202997644U (en) Bluetooth earphone charging case
US20130101132A1 (en) Method and Device for Earphone and USB to Share Micro-USB Interface
CN101102119A (en) A charging detection circuit of appliance device and charging detection method
CN101951446A (en) Be connected to detection, identification and the operation of the ancillary equipment of electronic equipment via the audio/video plug
CN101426038A (en) Portable electronic device and accessory identification method
CN210042141U (en) Wireless earphone, wireless earphone charging box and charging control system
CN102769810B (en) A kind of mobile terminal preventing call misoperation
CN101841586A (en) Method for expanding earphone interface of mobile phone into serial communication interface
CN102480563A (en) Control method and device in process of inserting earphone into earphone socket
CN207396620U (en) Have both the tester of fast charge test and voltage conversion
CN201075704Y (en) Detection circuit of electrical equipment and mobile phone having the circuit
CN104066028A (en) Communication method based on headset jack and terminal device
CN207083202U (en) A kind of TYPE C chargings earphone
CN102710821A (en) Hand microphone for interphone and interphone
CN105048018A (en) Charging method and device for terminal having on-the-go (OTG) function
CN106856289B (en) Electronic equipment and circuit thereof, switching equipment and circuit thereof and signal processing system
CN102026419B (en) Electronic device and system, as well as method for identifying electronic components and controlling electronic device thereof
CN107706977B (en) Charging current detection method and charging device
CN205211382U (en) Show auto -change over device with quick charge function
CN209658936U (en) The charging unit of power-off can completely be filled
CN101854427A (en) Method for reminding operation start and mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant