Patent ID: 8787589

Claim:
An electronic device connectable with an electronic accessory, the electronic accessory including a microphone and a plug, the plug including a first contact and a second contact, the electronic device comprising: a jack configured to receive an insertion of the plug of the electronic accessory, and including a first contact terminal configured to be in contact with the first contact of the plug and a second contact terminal configured to be in contact with the second contact of the plug; an audio receiving unit configured to receive from the microphone of the electronic accessory a voice data signal through the first contact terminal of the jack when the plug is inserted into the jack; an audio output unit configured to output an audio data signal; a measuring unit configured to measure a parameter through the first contact terminal when the plug is inserted into the jack; a switching unit configured to selectively connect the first contact terminal of the jack electrically to the audio receiving unit or the measuring unit; a processing unit electrically connected to the measuring unit; and an insertion detecting unit electrically connected to the processing unit and configured to detect whether the plug of the electronic accessory is inserted into the jack, wherein the insertion detecting unit is further configured to generate a control signal to the processing unit when the insertion detecting unit detects the insertion of the plug into the jack, wherein the processing unit is configured to control the switching unit according to the control signal so as to electrically connect the first contact terminal of the jack to the measuring unit, wherein when the parameter measured by the measuring unit through the first contact terminal has a first predetermined value, the audio output unit outputs the audio data signal to the electronic accessory through the second contact terminal of the jack, wherein when the parameter measured by the measuring unit through the first contact terminal has a second predetermined value, the processing unit executes a corresponding function, and wherein when the parameter measured by the measuring unit through the first contact terminal has a third predetermined value, the processing unit controls the switching unit to electrically disconnect the first contact terminal of the jack from the measuring unit and to switch a connection of the first contact terminal of the jack to the audio receiving unit so that the audio receiving unit receives the voice data signal through the first contact terminal of the jack from the microphone of the electronic accessory.