CN102855202B - Method for detecting type of electronic equipment and data interface - Google Patents

Method for detecting type of electronic equipment and data interface Download PDF

Info

Publication number
CN102855202B
CN102855202B CN201210300066.3A CN201210300066A CN102855202B CN 102855202 B CN102855202 B CN 102855202B CN 201210300066 A CN201210300066 A CN 201210300066A CN 102855202 B CN102855202 B CN 102855202B
Authority
CN
China
Prior art keywords
interface
pin
electronic equipment
module
interface type
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
CN201210300066.3A
Other languages
Chinese (zh)
Other versions
CN102855202A (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.)
Tendyron Corp
Tendyron Technology Co Ltd
Original Assignee
Tendyron Technology Co Ltd
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 Tendyron Technology Co Ltd filed Critical Tendyron Technology Co Ltd
Priority to CN201210300066.3A priority Critical patent/CN102855202B/en
Publication of CN102855202A publication Critical patent/CN102855202A/en
Application granted granted Critical
Publication of CN102855202B publication Critical patent/CN102855202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Power Sources (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention provides a method for detecting types of electronic equipment and a data interface. The electronic equipment comprises an interface slot and at least two interface modules which are connected with the interface slots and are in different interface types. The interface modules are respectively connected with a pin D+ and a pin D- in the interface slot. Two input pins of a comparator are respectively connected with the pin D+ and the pin D-. The output pin of the comparator is connected with an interface type judgment unit. The interface type judgment unit is used for detecting level waveform output by the output pin of the comparator after electrification, judging the interface type used by peripheral equipment which is connected with the electronic equipment through the interface slot according to the detected level waveform, and outputting an interface type judgment result, so as to enable the electronic equipment to conduct data communication with the peripheral equipment through the interface module corresponding to the interface type judgment result. By adopting the method for detecting the types of the electronic equipment and the data interface, the all-in-one interface slot can be arranged in the electronic equipment; and when the interface slot is matched with the corresponding data line during use, the electronic equipment can communicate with any one peripheral equipment of USB (universal serial bus) interface equipment, IC (integrated circuit) card interface equipment and audio interface equipment.

Description

The detection method of a kind of electronic equipment, data interface type
Technical field
The present invention relates to electronic technology field, particularly relate to the detection method of a kind of electronic equipment, data interface type.
Background technology
Along with non-cash transaction, Web bank, online payment prevailing gradually, IC-card, for the generation that signs electronically and checking, encryption, deciphering electric signing tools (as, USBKEY), also popularize for generating the safety information products such as the dynamic password generating device (e.g., OTP token) of dynamic password thereupon.
The different safety information products such as IC-card, USBKEY, OTP token possess different functions, are applicable to different application scenarios, carry for the ease of user, occurred the safety information product of integrated several functions in the market.In order to make safety information product can with the transaction terminal such as PC, mobile communication terminal with the use of, safety information product needs usually arrange various different interface slot/socket, such as, for with PC with the use of USB interface slot, for mobile communication terminal with the use of audio sockets etc.
Electronic product (such as, the safety information product) cost being provided with multiple interfaces slot/socket in prior art is higher, and volume is comparatively large, is not easy to user and uses and carry.
Summary of the invention
Technical matters to be solved by this invention overcomes the deficiencies in the prior art, provides a kind of and realize the electronic product of polytype interface communication and the detection method of data interface type by an interface slot.
The object of the invention is to be achieved through the following technical solutions:
One aspect of the present invention provides a kind of electronic equipment, comprises: interface slot, the interface module of at least two different interface types be connected with described interface slot, and described each interface module is connected with D-pin with the D+ pin in described interface slot respectively; Also comprise in described electronic equipment: comparer and interface type judgement unit; Two input pins of described comparer are connected with D-pin with described D+ pin respectively, and output pin is connected with described interface type judgement unit; Described interface type judgement unit, for detecting the level waveforms that described comparer output pin exports after the power-up, the interface type that the external unit be connected with described electronic equipment by described interface slot is used is judged according to the level waveforms detected, and output interface type identification result, to make described electronic equipment by differentiating that the interface module that result is corresponding and external unit carry out data communication with described interface type.
In addition, described interface type at least comprises: USB interface, IC-card interface, audio interface.
In addition, Audio interface block is comprised in described interface module; IC-card interface module or usb interface module is also comprised in described interface module; Described Audio interface block using a pin in described D+ pin and D-pin as sound signal pin, using another pin as with reference to signal pins; When described interface type judgement unit detects that after powering on and stablize the level that described comparer output pin exports is periodically variable level, judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface.
In addition, usb interface module is comprised in described interface module; Also Audio interface block is comprised in described interface module; Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface; Or the positive pole in two of described comparer input pins is connected with described D-pin, negative pole is connected with described D+ pin; When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface.
In addition, usb interface module is comprised in described interface module; IC-card interface module or Audio interface block is also comprised in described interface module; Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface.
In addition, in described interface module, comprise IC-card interface module, in described interface module, also comprise Audio interface block; Described IC-card interface module using described D+ pin as I/O pin, described D-pin is carried out data communication as RST pin and external unit; Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface; Or the positive pole in two of described comparer input pins is connected with described D-pin, negative pole is connected with described D+ pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface.
In addition, in described interface module, comprise IC-card interface module, in described interface module, also comprise usb interface module or Audio interface block; Described IC-card interface module using described D+ pin as I/O pin, described D-pin is carried out data communication as RST pin and external unit; Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface.
In addition, described Audio interface block comprises: audio frequency receiver module and signal transmitting module; Described audio frequency receiver module is connected with D-pin with described D+ pin, using a pin in described D+ pin and D-pin as sound signal pin, using another pin as reference signal pins; Described signal transmitting module is connected with described reference signal pin, sends signal by described reference signal pin external device.
In addition, described IC-card interface module using described D+ pin as I/O pin, described D-pin is carried out data communication as RST pin and external unit.
In addition, described IC-card interface module using described D-pin as I/O pin, described D+ pin is carried out data communication as RST pin and external unit.
In addition, the span of described T is: 40≤T≤120.
The present invention also provides on the other hand a kind of detection method of data interface type, for detecting the interface type that the external unit that is connected with D-pin with the D+ pin of the interface slot of electronic equipment uses; The method comprises: the interface type judgement unit in described electronic equipment is thereon after electricity, the level waveforms that the output pin of the comparer in described electronic equipment exports is detected, judges according to the level waveforms detected the interface type that the external unit be connected with described electronic equipment by described interface slot is used; Wherein, two input pins of described comparer are connected with D-pin with described D+ pin respectively.
In addition, described interface type at least comprises: USB interface, IC-card interface, audio interface.
In addition, when described interface type judgement unit detects that after powering on and stablize the level that described comparer output pin exports is periodically variable level, judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface; Otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface or IC-card interface.
In addition, if the positive pole in two of described comparer input pins is connected with described D+ pin, negative pole is connected with described D-pin, then when detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface; If or the positive pole in two of described comparer input pins is connected with described D-pin, negative pole is connected with described D+ pin, then when detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface.
In addition, the positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface or IC-card interface.
In addition, when detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface.
In addition, when detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface or USB interface; Wherein, the positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When the interface type that external unit uses is for IC-card interface, using described D+ pin as I/O pin, using described D-pin as RST pin.
In addition, the span of described T is: 40≤T≤120.
Adopt the detection method of data interface type of the present invention, the interface slot of an All-in-One can be set in the electronic device, this interface slot and corresponding data line with the use of time, can communicate with any one external unit in audio interface device with the USB interface equipment of outside, IC-card interfacing equipment, and electronic equipment of the present invention can identify the interface type that the current external unit communicated with uses automatically.
Adopt technical scheme of the present invention, the quantity of interface slot can be reduced, reduce the production cost of electronic equipment, and reduce the volume of electronic equipment.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the structural representation of electronic equipment first embodiment of the present invention;
Fig. 2 is the structural representation of the Audio interface block in electronic equipment first embodiment of the present invention;
Fig. 3 is the structural representation of interface type detection module first embodiment of the present invention;
Fig. 4 is in first embodiment of the invention, the waveform schematic diagram of comparer output level when adopting different interface types;
Fig. 5 is the structural representation of electronic equipment second embodiment of the present invention;
Fig. 6 is the structural representation of the Audio interface block in electronic equipment second embodiment of the present invention;
Fig. 7 is the structural representation of electronic equipment of the present invention 3rd embodiment;
Fig. 8 is in third embodiment of the invention, the waveform schematic diagram of comparer output level when adopting different interface types.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on embodiments of the invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to protection scope of the present invention.
In describing the invention, it will be appreciated that, term " " center ", " longitudinal direction ", " transverse direction ", " on ", D score, " front ", " afterwards ", " left side ", " right side ", " vertically ", " level ", " top ", " end ", " interior ", orientation or the position relationship of the instruction such as " outward " are based on orientation shown in the drawings or position relationship, only the present invention for convenience of description and simplified characterization, instead of indicate or imply that the device of indication or element must have specific orientation, with specific azimuth configuration and operation, therefore limitation of the present invention can not be interpreted as.In addition, term " first ", " second " only for describing object, and can not be interpreted as instruction or hint relative importance or quantity or position.
In describing the invention, it should be noted that, unless otherwise clearly defined and limited, term " installation ", " being connected ", " connection " should be interpreted broadly, and such as, can be fixedly connected with, also can be removably connect, or connect integratedly; Can be mechanical connection, also can be electrical connection; Can be directly be connected, also indirectly can be connected by intermediary, can be the connection of two element internals.For the ordinary skill in the art, concrete condition above-mentioned term concrete meaning in the present invention can be understood.
Core of the present invention is, be connected with two input pins (positive pole/negative pole) of comparer respectively by D+ with the D-pin of the USB slot in electronic equipment of the present invention, the level exported by the output pin of detection comparator judges that current external equipment carries out with electronic equipment of the present invention the adopted interface type that communicates.
Below in conjunction with accompanying drawing, the embodiment of the present invention is described in further detail.
Embodiment 1
Fig. 1 is the structural representation of electronic equipment first embodiment of the present invention; As shown in Figure 1, comprise in this electronic equipment: interface slot, interface type detection module, interface module (such as, IC-card interface module, usb interface module, Audio interface block), one or more safety function module (such as, IC-card security module, electronic module for signing mane, dynamic password generation module).
Comprise in interface slot: VBUS, D-, D+, GND, the pins such as shell wiring (S1 ~ S4).
Interface type detection module, be connected with D+ with D-pin, and be connected with interface modules such as IC-card interface module, usb interface module and Audio interface block, the data interface type judging that the external unit be connected with electronic equipment of the present invention uses is detected by the level (electric signal) to D+ with D-pin, and output interface type decision result.The concrete structure of interface type detection module is described in more detail below.
IC-card interface module, be connected with D+ with D-pin, and with interface type detection module and one or more functional module (such as, IC-card security module) be connected, for the interface type result of determination that receiving interface type detection module or functional module export, when the interface type result of determination received is current external unit use IC-card interface and electronic equipment carries out data communication, IC-card interface module enters duty, between functional module and external unit, carry out the data communication meeting IC-card interface specification by D+ and D-pin.
In the present embodiment, IC-card interface module and external unit can using the I/O pin of D+ pin as IC-card interface specification, and D-pin is carried out data communication as the RST pin of IC-card interface specification.
Usb interface module, be connected with D+ with D-pin, and with interface type detection module and one or more functional module (such as, electronic module for signing mane) be connected, for the interface type result of determination that receiving interface type detection module or functional module export, when the interface type result of determination received is current external unit use USB interface and electronic equipment carries out data communication, usb interface module enters duty, between functional module and external unit, carry out the data communication meeting USB interface specification by D+ and D-pin.
Audio interface block, be connected with D+ with D-pin, and with interface type detection module and one or more functional module (such as, dynamic password generation module) be connected, for the interface type result of determination that receiving interface type detection module or functional module export, when the interface type result of determination received is current external unit use audio interface and electronic equipment carries out data communication, Audio interface block enters duty, between functional module and external unit, carry out the data communication meeting audio interface specification by D+ and D-pin.
In the present embodiment, Audio interface block and external unit can using D+ pin as sound signal pin (pins corresponding to L channel, R channel, monophony or mixed layer sound channel sound signal), using D-pin as grounding pin (or being called reference signal pin).
In addition, as shown in Figure 2, in the present embodiment, Audio interface block can also be further divided into: audio frequency receiver module and signal transmitting module.
Wherein, audio frequency receiver module is connected with D+ with D-pin, and be connected with functional module, using D+ pin as sound signal pin, D-pin is received the sound signal of external unit transmission as grounding pin (or being called reference signal pin), and sound signal is sent to coupled functional module.
Signal transmitting module is connected with D-pin, and is connected with functional module, for the command signal that receiving module sends, and it is sent to external unit by D-pin.
Safety function module, be connected with the one or more interface modules in IC-card interface module, usb interface module, Audio interface block, for carrying out data communication by interface module and external unit, and complete corresponding security function (such as, encryption and decryption functions, signature function, generation dynamic password function).
Safety function module can be: one or more in IC-card security module, electronic module for signing mane, dynamic password generation module.
Fig. 3 is the structural representation of interface type detection module first embodiment of the present invention, as shown in Figure 3, comprises: comparer in this module, interface type judgement unit.
Comparer, its positive pole and negative pole are connected with D+ with D-pin respectively, and its ground wire pin ground connection, its power pins is connected with power supply, and its output pin is connected with interface type judgement unit.
Fig. 4 is the waveform schematic diagram of comparer output level when adopting different interface types; As shown in Figure 4:
When using USB interface to carry out data communication with external unit, in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, detect that the output pin of comparer exports the high level continued;
When using IC-card interface to carry out data communication with external unit, in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, detect that the output pin of comparer exports the low level continued;
The value of above-mentioned T also can according to the demand self-defining of manufacturer.Usually can make: 40 milliseconds≤T≤120 millisecond.Usual T≤100 millisecond.
According to the difference of concrete adopted chip/circuit, the stable required time that powers on is different, those skilled in the art, after each components/circuits of selected equipment, can adopt arbitrary detection mode of the prior art to determine to power on the stable required concrete time (be generally 10 milliseconds ~ 100 milliseconds not etc.).
When using audio interface to carry out data communication with external unit, interface type detection module is powering on and after stablizing, detect that the level that the output pin of comparer exports is in cyclical variation state (such as, export the square wave continued), the change frequency of output level is relevant with the baud rate that data are transmitted.
If the change frequency of above-mentioned periodically variable level is f, then the period of change 1/f of level is less than above-mentioned T.Such as, when baud rate is 9600,1/f=0.104 millisecond.
Interface type judgement unit, is connected with the output pin of comparer, and the waveform for the level exported comparer detects, and judges interface type according to testing result, and output interface type decision result.
In the present embodiment, interface type judgement unit is adopted and is judged interface type with the following method:
When in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, when detecting that the level that comparer exports is lasting high level, determining interface type is USB interface;
When in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, when detecting that the level that comparer exports is lasting low level, determining interface type is IC-card interface;
When interface type detection module is powering on and after stablizing (such as, power on and in T millisecond after stablizing), when detecting that the level that comparer exports is periodically variable level, determining interface type is audio interface.
Interface type judgement unit can one of in the following way output interface type decision result:
Mode one: simultaneously export result of determination to interface modules such as IC-card interface module, usb interface module, Audio interface block, by IC-card interface module, usb interface module, Audio interface block according to the particular content of the result of determination received (such as, " 0 " represents IC-card interface, " 1 " represents USB interface, " 2 " represent audio interface) judge the interface type of current use, and and then judge whether to enter duty.
Mode two: only export result of determination to the interface module corresponding to result of determination, the interface module receiving this result of determination enters duty.Such as, using the enabling signal preset as the result of determination exported, the interface module receiving this enabling signal enters duty.
Mode three: export result of determination to functional modules such as IC-card security module, electronic module for signing mane, dynamic password generation modules, by functional module according to the particular content of the result of determination received (such as, " 1 " represents IC-card interface, " 2 " represent USB interface, " 3 " represent audio interface) judge the interface type of current use, and and then send result of determination (such as, sending an enabling signal), to start the transmission of the corresponding interface data to corresponding interface module.
According to ultimate principle of the present invention, above-described embodiment can also have multiple mapping mode, such as:
D+ pin using D-pin as sound signal pin (pin corresponding to L channel, R channel, monophony or mixed layer sound channel sound signal), can use as grounding pin (or being called reference signal pin) by Audio interface block and external unit.
Embodiment 2
Fig. 5 is the structural representation of electronic equipment second embodiment of the present invention; As shown in Figure 5, comprise in this electronic equipment: interface slot, interface type detection module, interface module (such as, usb interface module, Audio interface block), one or more safety function module (such as, electronic module for signing mane, dynamic password generation module).
The key distinction of the present embodiment and the first embodiment is: do not comprise IC-card interface module and IC-card security module in electronic equipment; Audio interface block and external unit using D-pin as sound signal pin, using D+ pin as grounding pin.
In addition, as shown in Figure 6, in the present embodiment, Audio interface block can also be further divided into: audio frequency receiver module and signal transmitting module.
Wherein, audio frequency receiver module is connected with D+ with D-pin, and is connected with functional module, using D-pin as sound signal pin, D+ pin is received the sound signal of external unit transmission as grounding pin, and sound signal is sent to coupled functional module.
Signal transmitting module is connected with D+ pin, and is connected with functional module, for the command signal that receiving module sends, and it is sent to external unit by D+ pin.
In the present embodiment, interface type judgement unit is adopted and is judged interface type with the following method:
When in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, when detecting that the level that comparer exports is lasting high level, determining interface type is USB interface;
When interface type detection module is powering on and after stablizing (such as, power on and in T millisecond after stablizing), when detecting that the level that comparer exports is cyclical variation level, determining interface type is audio interface.
In the present embodiment, other function of each module is identical with the first embodiment.
Equally, if in other embodiments of the invention, the positive pole of comparer is connected with D-with D+ pin respectively with negative pole, the waveform of level that comparer exports, and the method that interface type detection module carries out the judgement of interface type is:
When in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, when detecting that the level that comparer exports is lasting low level, determining interface type is USB interface;
When interface type detection module is powering on and after stablizing (such as, power on and in T millisecond after stablizing), when detecting that the level that comparer exports is cyclical variation level, determining interface type is audio interface.
Embodiment 3
Fig. 7 is the structural representation of electronic equipment of the present invention 3rd embodiment; As shown in Figure 7, comprise in this electronic equipment: interface slot, interface type detection module, interface module (such as, IC-card interface module, Audio interface block), one or more safety function module (such as, IC-card security module, dynamic password generation module).
The key distinction of the present embodiment and the first embodiment is: do not comprise usb interface module and electronic module for signing mane in electronic equipment; D+ pin, using the I/O pin of D-pin as IC-card interface specification, is carried out data communication as the RST pin of IC-card interface specification by IC-card interface module and external unit.
In the present embodiment, when the positive pole of comparer is connected with D+ with D-pin respectively with negative pole, its output pin export level waveforms as shown in Figure 8:
When using IC-card interface to carry out data communication with external unit, in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, detect that the output pin of comparer exports the low level continued;
When using audio interface to carry out data communication with external unit, interface type detection module is powering on and after stablizing, detect that the level that the output pin of comparer exports is in cyclical variation state (such as, export the square wave continued), the change frequency of output level is relevant with the baud rate that data are transmitted.
Therefore, in the present embodiment, interface type judgement unit is adopted and is judged interface type with the following method:
When in the T millisecond of electronic equipment/interface type detection module after powering on and stablize, when detecting that the level that comparer exports is lasting low level, determining interface type is IC-card interface;
When interface type detection module is powering on and after stablizing (such as, power on and in T millisecond after stablizing), when detecting that the level that comparer exports is cyclical variation level, determining interface type is audio interface.
Equally, if in other embodiments of the invention, the positive pole of comparer is connected with D-with D+ pin respectively with negative pole, the waveform of level that comparer exports, and the method that interface type detection module carries out the judgement of interface type is:
When electronic equipment/interface type detection module is after powering on and stablize in T millisecond, when detecting that the level that comparer exports is lasting low level, determining interface type is IC-card interface;
When interface type detection module is powering on and after stablizing (such as, power on and in T millisecond after stablizing), when detecting that the level that comparer exports is cyclical variation level, determining interface type is audio interface.
In the description of this instructions, specific features, structure, material or feature that the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with this embodiment or example are contained at least one embodiment of the present invention or example.In this manual, identical embodiment or example are not necessarily referred to the schematic representation of above-mentioned term.And the specific features of description, structure, material or feature can combine in an appropriate manner in any one or more embodiment or example.
Although illustrate and describe embodiments of the invention, those having ordinary skill in the art will appreciate that: can carry out multiple change, amendment, replacement and modification to these embodiments when not departing from principle of the present invention and aim, scope of the present invention is by claim and equivalency thereof.

Claims (15)

1. an electronic equipment, comprise: interface slot, the interface module of at least two different interface types be connected with described interface slot, described interface type at least comprises USB interface, IC-card interface and audio interface, one or more functional modules be connected with described interface module, is characterized in that:
Described each interface module is connected with D-pin with the D+ pin in described interface slot respectively;
Also comprise in described electronic equipment: comparer and interface type judgement unit;
Two input pins of described comparer are connected with D-pin with described D+ pin respectively, and output pin is connected with described interface type judgement unit;
Described interface type judgement unit, for detecting the level waveforms that described comparer output pin exports after the power-up, the interface type that the external unit be connected with described electronic equipment by described interface slot is used is judged according to the level waveforms detected, and output interface type identification result is to each interface module, corresponding interface module or export corresponding interface module to by described functional module, to make described electronic equipment by differentiating that the interface module that result is corresponding and external unit carry out data communication with described interface type;
When comprising Audio interface block in described interface module, described Audio interface block using a pin in described D+ pin and D-pin as sound signal pin, using another pin as with reference to signal pins;
When described interface type judgement unit detects that after powering on and stablize the level that described comparer output pin exports is periodically variable level, judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface.
2. electronic equipment as claimed in claim 1, is characterized in that,
Usb interface module is comprised in described interface module; Also Audio interface block is comprised in described interface module;
Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface; Or
Positive pole in two input pins of described comparer is connected with described D-pin, and negative pole is connected with described D+ pin; When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface.
3. electronic equipment as claimed in claim 1, is characterized in that,
Usb interface module is comprised in described interface module; IC-card interface module or Audio interface block is also comprised in described interface module;
Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface.
4. electronic equipment as claimed in claim 1, is characterized in that,
Comprise IC-card interface module in described interface module, in described interface module, also comprise Audio interface block;
Described IC-card interface module using described D+ pin as I/O pin, described D-pin is carried out data communication as RST pin and external unit;
Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface; Or
Positive pole in two input pins of described comparer is connected with described D-pin, and negative pole is connected with described D+ pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface.
5. electronic equipment as claimed in claim 1, is characterized in that,
Comprise IC-card interface module in described interface module, in described interface module, also comprise usb interface module or Audio interface block;
Described IC-card interface module using described D+ pin as I/O pin, described D-pin is carried out data communication as RST pin and external unit;
Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface.
6. the electronic equipment as described in claim arbitrary in claim 1 to 5, is characterized in that,
Described Audio interface block comprises: audio frequency receiver module and signal transmitting module;
Described audio frequency receiver module is connected with D-pin with described D+ pin, using a pin in described D+ pin and D-pin as sound signal pin, using another pin as reference signal pins;
Described signal transmitting module is connected with described reference signal pin, sends signal by described reference signal pin external device.
7. the electronic equipment as described in claim arbitrary in claim 1 or 3, is characterized in that,
Described IC-card interface module using described D+ pin as I/O pin, described D-pin is carried out data communication as RST pin and external unit.
8. the electronic equipment as described in claim arbitrary in claim 1 or 3, is characterized in that,
Described IC-card interface module using described D-pin as I/O pin, described D+ pin is carried out data communication as RST pin and external unit.
9. the electronic equipment as described in claim arbitrary in claim 2 to 5, is characterized in that,
The span of described T is: 50≤T≤140.
10. the detection method of a data interface type, for detecting the interface type that the external unit that is connected with D-pin with the D+ pin of the interface slot of electronic equipment uses, it is characterized in that, described interface type at least comprises USB interface, IC-card interface and audio interface, and the method comprises:
Interface type judgement unit in described electronic equipment is thereon after electricity, the level waveforms that the output pin of the comparer in described electronic equipment exports is detected, judge according to the level waveforms detected the interface type that the external unit be connected with described electronic equipment by described interface slot is used, and output interface type identification result to each interface module in described electronic equipment or correspondence interface module or export corresponding interface module to by functional module;
Wherein, two input pins of described comparer are connected with D-pin with described D+ pin respectively, and described each interface module is connected with D-pin with the D+ pin in described interface slot respectively, and described functional module is connected with the one or more of described interface module;
Wherein, when described interface type judgement unit detects that after powering on and stablize the level that described comparer output pin exports is periodically variable level, judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface; Otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface or IC-card interface.
11. detection methods as claimed in claim 10, is characterized in that,
If the positive pole in two of described comparer input pins is connected with described D+ pin, negative pole is connected with described D-pin, then when detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface; Or
If the positive pole in two of described comparer input pins is connected with described D-pin, negative pole is connected with described D+ pin, then when detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface.
12. detection methods as claimed in claim 10, is characterized in that,
Positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When detecting that the level that described comparer output pin exports is lasting high level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as USB interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface or IC-card interface.
13. detection methods as claimed in claim 10, is characterized in that,
When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface.
14. detection methods as claimed in claim 10, is characterized in that,
When detecting that the level that described comparer output pin exports is lasting low level in the T millisecond that described interface type judgement unit presets after powering on and stablize, judge that interface type that the external unit be connected with described electronic equipment uses is as IC-card interface, otherwise judge that interface type that the external unit be connected with described electronic equipment uses is as audio interface or USB interface;
Wherein, the positive pole in two input pins of described comparer is connected with described D+ pin, and negative pole is connected with described D-pin; When the interface type that external unit uses is for IC-card interface, using described D+ pin as I/O pin, using described D-pin as RST pin.
15. detection methods as described in claim arbitrary in claim 11 to 14, is characterized in that,
The span of described T is: 50≤T≤140.
CN201210300066.3A 2012-08-21 2012-08-21 Method for detecting type of electronic equipment and data interface Active CN102855202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210300066.3A CN102855202B (en) 2012-08-21 2012-08-21 Method for detecting type of electronic equipment and data interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210300066.3A CN102855202B (en) 2012-08-21 2012-08-21 Method for detecting type of electronic equipment and data interface

Publications (2)

Publication Number Publication Date
CN102855202A CN102855202A (en) 2013-01-02
CN102855202B true CN102855202B (en) 2015-06-17

Family

ID=47401802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210300066.3A Active CN102855202B (en) 2012-08-21 2012-08-21 Method for detecting type of electronic equipment and data interface

Country Status (1)

Country Link
CN (1) CN102855202B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927281A (en) * 2013-01-15 2014-07-16 华硕电脑股份有限公司 Transmission interface detection system and transmission interface detection method
CN104660407A (en) * 2013-11-25 2015-05-27 国民技术股份有限公司 Security authentication method and device
CN103760451B (en) * 2014-01-28 2016-08-17 天地融科技股份有限公司 The interface access module detection method of a kind of intelligent cipher key equipment and equipment
CN105630124A (en) * 2014-12-01 2016-06-01 鸿富锦精密工业(武汉)有限公司 Electronic equipment interface switching device
CN104572560A (en) * 2015-01-26 2015-04-29 复旦大学无锡研究院 USB (universal serial bus) and ADC (analog to digital converter) interface multiplex circuit and multiplex method
CN104820387A (en) * 2015-04-27 2015-08-05 江苏紫米电子技术有限公司 USB power supply interface-based intelligent power source
CN105740188B (en) * 2016-04-13 2018-08-28 深圳警翼智能科技股份有限公司 A kind of device and method that single USB interface is extended to two-way interface
CN106231495B (en) * 2016-08-31 2019-05-21 浙江大华技术股份有限公司 A kind of audio identification methods and device
CN111694780A (en) * 2019-03-13 2020-09-22 杰克缝纫机股份有限公司 Time-sharing processing device and method
CN110286729A (en) * 2019-05-21 2019-09-27 晶晨半导体(上海)股份有限公司 A method of the power supply Vtune parameter for grafting reactants processor
CN111698630B (en) * 2019-12-02 2022-04-05 芯讯通无线科技(上海)有限公司 Test system of audio interface of wireless communication module

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840387A (en) * 2010-04-07 2010-09-22 北京天地融科技有限公司 USB (Universal Serial Bus) Key device and method for realizing smart card communications using USB interface
CN102546869A (en) * 2012-01-06 2012-07-04 海能达通信股份有限公司 USB (Universal Serial Bus) interface multiplexing interphone and control method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931674B (en) * 2010-09-01 2014-04-16 惠州Tcl移动通信有限公司 Method and device for sharing Micro-USB interface
CN102393837B (en) * 2011-11-08 2014-07-30 深圳市海思半导体有限公司 USB charger recognition device and method
CN102572352B (en) * 2011-12-26 2014-12-10 中兴通讯股份有限公司 HDMI multiplexing method, HDMI, and equipped provided with HDMI

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840387A (en) * 2010-04-07 2010-09-22 北京天地融科技有限公司 USB (Universal Serial Bus) Key device and method for realizing smart card communications using USB interface
CN102546869A (en) * 2012-01-06 2012-07-04 海能达通信股份有限公司 USB (Universal Serial Bus) interface multiplexing interphone and control method thereof

Also Published As

Publication number Publication date
CN102855202A (en) 2013-01-02

Similar Documents

Publication Publication Date Title
CN102855202B (en) Method for detecting type of electronic equipment and data interface
CN102819501B (en) Electronic equipment and data interface type detection method
CN103138133B (en) Adapter for electronic devices
CN203260854U (en) Adapter
CN102393837B (en) USB charger recognition device and method
CN103376870B (en) For judging whether annex comprises the method for particular electrical circuit, system and equipment
CN102521186B (en) USB (Universal Serial Bus) key and method for communicating with terminal thereof
CN104063348B (en) Realize the device and method of compatible USB communications and voice communication
CN103425224A (en) Methods, systems and apparatus for enabling an accessory for use with a host device
WO2017118441A1 (en) Method and apparatus for configuring interface pin
TW201520754A (en) System for detecting universal serial bus (USB) device and method thereof
CN102929824A (en) System for multiplexing USB (Universal Serial Bus) interface transmission data
CN103198033A (en) Apparatus and method of identifying a USB or an MHL device
CN103760451A (en) Method and device for detecting interface access modes of intelligent secret key device
US20110320837A1 (en) Power supply circuit, power supply method, and signal processing apparatus
CN203014451U (en) USB charger
CN201015047Y (en) Split type RF CPU card meter controller
CN109709471A (en) A kind of test fixture, the test method and device of fingerprint mould group
CN106797414B (en) A kind of leakage current detection circuit and terminal of terminal
CN103036276B (en) Charger, terminal, controller, system and charger recognition method
CN104573468A (en) Single-kernel security authentication device with multiple USB (universal serial bus) interfaces
CN104345859A (en) Power supply method and device and charging method and electronic device
CN101131666B (en) Contact smart card simulation card
CN105700983B (en) A kind of judgment method of USBKey and USBKey operating mode
CN202916872U (en) Adapter and transmission system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100083 Beijing, Haidian District Road, No. 38, B block, 1810

Applicant after: Tendyron Technology Co., Ltd.

Address before: 100083, B, block 17, golden building, No. 1810 Qinghua East Road, Beijing, Haidian District

Applicant before: Tendyron Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant