CN1949201A - Connecting judging method and device of computer external device interface shape - Google Patents

Connecting judging method and device of computer external device interface shape Download PDF

Info

Publication number
CN1949201A
CN1949201A CN 200510108573 CN200510108573A CN1949201A CN 1949201 A CN1949201 A CN 1949201A CN 200510108573 CN200510108573 CN 200510108573 CN 200510108573 A CN200510108573 A CN 200510108573A CN 1949201 A CN1949201 A CN 1949201A
Authority
CN
China
Prior art keywords
draw high
interface
switch resistance
high switch
peripheral device
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.)
Granted
Application number
CN 200510108573
Other languages
Chinese (zh)
Other versions
CN100397379C (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.)
Holtek Semiconductor Inc
Original Assignee
Holtek Semiconductor Inc
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 Holtek Semiconductor Inc filed Critical Holtek Semiconductor Inc
Priority to CNB2005101085737A priority Critical patent/CN100397379C/en
Publication of CN1949201A publication Critical patent/CN1949201A/en
Application granted granted Critical
Publication of CN100397379C publication Critical patent/CN100397379C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention supplies computer peripheral equipment interface form connecting judging method and device. The device includes voltage adjuster, USB entity layer and switch controller, lest four climb switch resistance, and output analog switch. The invention uses microcontroller to judge whether it is connected with USB or PS2 according to the signal of the computer interface two kinds of which uses four signal lines together to transmit signal corresponding with transmission protocol and supply electric power. It can solve the unavailable problem caused by input device cannot judge computer interface.

Description

The connection judgment method and the device of computer peripheral device interface shape
Technical field
The present invention relates to a kind of connection judgment method and device of computer peripheral device interface shape, be particularly related to a kind of connection judgment method and device of having used at the computer peripheral device interface shape of the inner microcontroller (MCU) that is provided with of computer peripheral device, wherein, this microcontroller can judge that connecting is USB interface or PS2 interface according to the signal that the connection computer interface produces, and carries out the signal transmission with its corresponding host-host protocol.
Background technology
The external Peripheral Interface of traditional computing machine, adopt the interface of RS232, PS2 to couple mostly, but increase along with the main frame processing speed, when being equipped with aforesaid computer peripheral equipment, the usefulness of Chang Yinwei computer peripheral equipment does not catch up with the speed of main frame and has influenced whole processing speed, therefore the just new transmission interface of active development of the research staff of this area is to meet the demand that improves the computing machine overall efficiency.So computer transmission interface more of new generation occurred, in the wire transmission interface, having comprised: USB (universal serial bus) (Universal Serial Bus, USB) and interface such as IEEE 1394.
For general user or enterprise, along with computer technology rapid development, the interface that is connected with computing machine is constantly derived, when newly buying the input peripheral device (as: keyboard, mouse) of computing machine, except considering whether connecting interface coincide, also need consider the process chip of new input media can be with old type computing machine compatible and coupling, for still for the people who uses old type computing machine, have these puzzlements really.
Common old type computer peripheral device only can be supported single computing machine connecting interface, even connect newer connecting interface by adapter, often also can't normally move use, its reason is that this old type computer peripheral device lacks the function of judging connecting interface and conversion connection signal.
Still nearly all can support at present one of them of PS2 interface and USB interface simultaneously at the computing machine that uses, and these two kinds of computing machine connecting interfaces have common characteristic, all be to come transmission signals and electric power is provided by four signal line, therefore topmost purpose of the present invention is to design a kind of judgment means, and it can be shared one group of signal and support PS2 interface or USB interface host-host protocol.
Summary of the invention
In order to solve the defective of above-described known technology, fundamental purpose of the present invention provides a kind of the application at the inner microcontroller (MCU) that is provided with of computer peripheral device, also can be the connection judgment method and the device of the computer peripheral device interface shape of microprocessor (MPU), wherein this microcontroller can judge that connecting is USB interface or PS2 interface according to the signal that the connection computer interface produces, and carries out the signal transmission with its corresponding host-host protocol.
For achieving the above object, the invention provides a kind of connection judgment means of computer peripheral device interface shape, it comprises: voltage adjuster, in order to adjust the circuit voltage of this connection judgment means; Whether USB physical layer and on-off controller have connected the USB interface device in order to detect, and startup USB specification is transmitted; At least four are drawn high switch resistance, when this USB physical layer and on-off controller do not detect the USB interface device, start the PS2 Interface status, and make these four to draw high switch resistance and draw high operation; And the output analog switch, when USB physical layer and on-off controller startup, in order to the output simulating signal.
The connection judgment means of above-mentioned computer peripheral device interface shape, wherein this voltage adjuster also is connected with voltage-output element, in order to adjust the operating voltage of output.
The connection judgment means of above-mentioned computer peripheral device interface shape, wherein when this connection judgment means was connected to USB interface, this voltage adjuster control voltage-output element was adjusted to 3.3V with operating voltage.
The connection judgment means of above-mentioned computer peripheral device interface shape, wherein when this connection judgment means was connected to the PS2 interface, this voltage adjuster control voltage-output element was adjusted to 5V with operating voltage.
The present invention also provides a kind of connection judgment method of computer peripheral device interface shape, it comprises that voltage adjuster, USB physical layer and on-off controller, output analog switch, first draw high switch resistance, second and draw high switch resistance, the 3rd and draw high switch resistance and the 4th and draw high switch resistance, after this computer peripheral device is connected to computing machine, the firmware that is arranged at computer peripheral device inside begins operation, it comprises the following steps: that (a) opens third and fourth and draw high switch resistance, guarantees that two differential signal lines of USB interface can not produce the suspension joint phenomenon; (b) open the output analog switch, and preset running mode is a USB interface; (c) remove the timing of timer in a period of time; (d) enter idle mode after, set the internal data of firmware, judge whether that complete USB marking signal is received; (e) determine that the firmware operational mode is a USB interface, continue to open the output analog switch, and close first and draw high switch resistance, second and draw high switch resistance, the 3rd and draw high switch resistance and the 4th and draw high switch resistance; (f) judge whether that by firmware complete PS2 marking signal is received; (g) determine that the firmware operational mode is the PS2 interface, close this output analog switch, the 3rd and draw high switch resistance and the 4th and draw high switch resistance, and open first and draw high switch resistance, second and draw high switch resistance; (h) judge by firmware whether timer has surpassed the time of removing of setting; (i) the firmware running mode switching is the PS2 interface, and sends PS2 and set sign indicating number, removes the counting of a period of time inside counting device again; And (j) whether computing machine is set sign indicating number at PS2 and is made correct response, skips to step (g) if yes; If otherwise skip to step (d).
The connection judgment method of above-mentioned computer peripheral device interface shape wherein when if the execution result of this step (d) is "Yes", continues execution in step (e); When if the execution result of this step (d) is "No", execution in step (f) then.
The connection judgment method of above-mentioned computer peripheral device interface shape wherein when if the execution result of this step (f) is "Yes", continues execution in step (g); When if the execution result of this step (f) is "No", execution in step (h) then.
The connection judgment method of above-mentioned computer peripheral device interface shape wherein when if the execution result of this step (h) is "Yes", continues execution in step (i); When if the execution result of this step (h) is "No", execution in step (d) then.
The present invention is connection judgment method and the device of having used at the computer peripheral device interface shape of the inner microcontroller (MCU) that is provided with of computer peripheral device, wherein, this microcontroller can judge that connecting is USB interface or PS2 interface according to the signal that the connection computer interface produces, two kinds of interfaces all come transmission signals and electric power are provided by common use four signal line, and carry out the transmission of signal with its corresponding host-host protocol.The present invention can be effectively applied to input medias such as keyboard, mouse, to solve owing to old type input media can't be judged the problem that can't use that computer interface produces.
Description of drawings
Fig. 1 is the structural drawing of the connection judgment means of computer peripheral device interface shape of the present invention;
Fig. 2 is the process flow diagram of the connection judgment method of computer peripheral device interface shape of the present invention;
Fig. 3 is connected to the structural drawing of computing machine USB interface for the connection judgment means of computer peripheral device interface shape of the present invention;
Fig. 4 is connected to the structural drawing of computing machine PS2 interface for the connection judgment means of computer peripheral device interface shape of the present invention.
The drawing reference numeral explanation:
11 voltage adjusters
12USB physical layer and on-off controller
13 output analog switches
14 first draw high switch resistance
15 second draw high switch resistance
16 the 3rd draw high switch resistance
17 the 4th draw high switch resistance
18 voltage-output elements
19 main frames
20 after this computer peripheral device is connected to computing machine, and the firmware that is arranged at computer peripheral device inside begins operation
21 open third and fourth draws high switch resistance so that two differential signal lines of USB interface can not produce the suspension joint phenomenon
22 open the output analog switch, and preset running mode is a USB interface
23 remove the timing of timer in a period of time
24 enter idle mode after, set the internal data of firmware, judge whether that complete USB marking signal is received
25 determine that the firmware operational modes are USB interface, continue to open the output analog switch, and close first and draw high switch resistance, second and draw high switch resistance, the 3rd and draw high switch resistance and the 4th and draw high switch resistance
26 judge whether that by firmware complete PS2 marking signal is received
27 determine that the firmware operational modes are the PS2 interface, close this output analog switch, the 3rd and draw high switch resistance and the 4th and draw high switch resistance, and open first and draw high switch resistance, second and draw high switch resistance
28 judge that by firmware whether timer has surpassed the time of removing of setting
29 firmware running mode switchings are the PS2 interface, and send PS2 and set sign indicating number, remove the counting of the counter in a period of time again
Whether 30 computing machines are set sign indicating number at PS2 and are made correct response
4 computing machine USB interface
5 computing machine PS2 interfaces
Embodiment
Below, accompanying drawings detailed structure of the present invention and annexation thereof.
Wherein PS2 respectively comprises different hardware and software with USB interface, and the inner set microcontroller (MCU) of the computer peripheral device demand that must meet two kinds of specifications just can provide the connection of described two kinds of interfaces simultaneously.
The PS2 interface structure mainly comprises two signal line, described two signal line are respectively timing signal line and data signal line, two signal line all must draw high formula (Pull-High) resistance by two and be connected with transistor in the microcontroller, with realize to side signal transmission to control (main frame to computer peripheral device, computer peripheral device to main frame), wherein the operating voltage of PS2 interface is 5V.
The USB interface structure mainly comprises two differential data signal lines, described two differential data signal lines are respectively D+ and D-, and two bar the differential data signal line also must draw high formula (Pull-High) resistance by two and is connected with transistor in the microcontroller, with realize to side signal transmission to control, and be when the differential signal line of D+ is drawn high that with the difference of PS2 maximum the expression transmission interface is USB interface operation at full speed; Otherwise, when the differential signal line of D-is drawn high, represent that then transmission interface is the operation of low speed USB interface, wherein the operating voltage of USB interface is 3.3V.
See also Fig. 1, it is the structural drawing of the connection judgment means of computer peripheral device interface shape of the present invention, and it comprises:
Voltage adjuster 11, in order to adjust the circuit voltage of this connection judgment means, voltage adjuster 11 also is connected with voltage-output element 18, in order to adjust the operating voltage of output; When this connection judgment means was connected in USB interface, this voltage adjuster 11 control voltage-output elements 18 were adjusted to 3.3V with operating voltage; When this connection judgment means was connected in the PS2 interface, this voltage adjuster 11 control voltage-output elements 18 were adjusted to 5V with operating voltage;
Whether USB physical layer and on-off controller 12 have connected the USB interface device in order to detect, and startup USB specification is transmitted;
At least four are drawn high switch resistance (13,14,15,16), when this USB physical layer and on-off controller 12 do not detect the USB interface device, start the PS2 Interface status, and make described four to draw high switch resistance (13,14,15,16) and draw high operation; And
Output analog switch 13 is when USB physical layer and on-off controller 12 startups, in order to the output simulating signal.
See also Fig. 2, it is the process flow diagram of the connection judgment method of a kind of computer peripheral device interface shape of the present invention, its structure comprises that voltage adjuster 11, USB physical layer and on-off controller 12, output analog switch 13, first draw high switch resistance 14, second and draw high switch resistance the 15, the 3rd and draw high switch resistance 16 and the 4th and draw high switch resistance 17, after this computer peripheral device is connected to computing machine, the firmware that is arranged at computer peripheral device inside begins operation (20), and its method of operating comprises the following steps:
(21) open third and fourth and draw high switch resistance, guarantee that two differential signal lines of USB interface can not produce the suspension joint phenomenon;
(22) open the output analog switch, and preset running mode is a USB interface;
(23) remove the timing of timer in a period of time;
(24) enter idle mode after, set the internal data of firmware, judge whether that complete USB marking signal is received, if when the execution result of this step (24) is "Yes", continue execution in step (25); When if the execution result of this step (24) is "No", execution in step (26) then;
(25) determine that the firmware operational mode is a USB interface, continue to open the output analog switch, and close first and draw high switch resistance, second and draw high switch resistance, the 3rd and draw high switch resistance and the 4th and draw high switch resistance;
(26) judge whether that by firmware complete PS2 marking signal is received,, continue execution in step (27) if when the execution result of this step (26) is "Yes"; When if the execution result of this step (26) is "No", execution in step (28) then;
(27) determine that the firmware operational mode is the PS2 interface, close this output analog switch, the 3rd and draw high switch resistance and the 4th and draw high switch resistance, and open first and draw high switch resistance, second and draw high switch resistance;
(28) judge by firmware whether timer has surpassed the time of removing of setting;
Judge by firmware whether timer has surpassed and set the time of removing,, continue execution in step (29) if when the execution result of this step (28) is "Yes"; When if the execution result of this step (28) is "No", execution in step (24) then;
(29) the firmware running mode switching is the PS2 interface, and sends PS2 and set sign indicating number, removes the counting of a period of time inside counting device again; And
(30) whether computing machine is set sign indicating number at PS2 and is made correct response, skips to step (27) if yes; If otherwise skip to step (24).
See also Fig. 3, it is connected to the structural drawing of computing machine USB interface for the connection judgment means of computer peripheral device interface shape of the present invention, when this connection judgment means is connected to USB interface, to judge according to the disclosed step of above-mentioned process flow diagram in advance, after being judged as USB interface, can open the output analog switch, voltage adjuster control voltage-output element is adjusted to 3.3V with operating voltage.
See also Fig. 4, it is connected to the structural drawing of computing machine PS2 interface for the connection judgment means of computer peripheral device interface shape of the present invention, when this connection judgment means is connected to the PS2 interface, to judge according to the disclosed step of above-mentioned process flow diagram in advance, after being judged as the PS2 interface, can close this output analog switch, the 3rd draws high switch resistance and the 4th and draws high switch resistance, and open first and draw high switch resistance, second and draw high switch resistance, voltage adjuster is without adjusting the operating voltage of directly exporting 5V.
By the disclosed content of above-mentioned Fig. 1 to Fig. 4, can understand the present invention is connection judgment method and the device of having used at the computer peripheral device interface shape of the inner microcontroller (MCU) that is provided with of computer peripheral device, wherein, this microcontroller can judge that connecting is USB interface or PS2 interface according to the signal that the connection computer interface produces, two kinds of interfaces all come transmission signals and electric power are provided by common use four signal line, and carry out the transmission of signal with its corresponding host-host protocol.The present invention can be effectively applied to input medias such as keyboard, mouse, to solve owing to old type input media can't be judged the problem that can't use that computer interface produces.
In sum, architectural feature of the present invention and each embodiment are described in detail.But the above only is preferred embodiment of the present invention, and the scope that can not limit the present invention thus and implemented so long as the equalization of doing according to claim of the present invention changes and modifies, all should be contained in the invention which is intended to be protected.

Claims (8)

1. the connection judgment means of a computer peripheral device interface shape, it comprises:
Voltage adjuster is in order to adjust the circuit voltage of this connection judgment means;
Whether USB physical layer and on-off controller have connected the USB interface device in order to detect, and startup USB specification is transmitted;
At least four are drawn high switch resistance, when this USB physical layer and on-off controller do not detect the USB interface device, start the PS2 Interface status, and make these four to draw high switch resistance and draw high operation; And
The output analog switch is when USB physical layer and on-off controller startup, in order to the output simulating signal.
2. the connection judgment means of computer peripheral device interface shape as claimed in claim 1, wherein this voltage adjuster also is connected with voltage-output element, in order to adjust the operating voltage of output.
3. the connection judgment means of computer peripheral device interface shape as claimed in claim 2, wherein when this connection judgment means was connected to USB interface, this voltage adjuster control voltage-output element was adjusted to 3.3V with operating voltage.
4. the connection judgment means of computer peripheral device interface shape as claimed in claim 2, wherein when this connection judgment means was connected to the PS2 interface, this voltage adjuster control voltage-output element was adjusted to 5V with operating voltage.
5. the connection judgment method of a computer peripheral device interface shape, it comprises that voltage adjuster, USB physical layer and on-off controller, output analog switch, first draw high switch resistance, second and draw high switch resistance, the 3rd and draw high switch resistance and the 4th and draw high switch resistance, after this computer peripheral device is connected to computing machine, the firmware that is arranged at computer peripheral device inside begins operation, and it comprises the following steps:
(a) open third and fourth and draw high switch resistance, guarantee that two differential signal lines of USB interface can not produce the suspension joint phenomenon;
(b) open the output analog switch, and preset running mode is a USB interface;
(c) remove the timing of timer in a period of time;
(d) enter idle mode after, set the internal data of firmware, judge whether that complete USB marking signal is received;
(e) determine that the firmware operational mode is a USB interface, continue to open the output analog switch, and close first and draw high switch resistance, second and draw high switch resistance, the 3rd and draw high switch resistance and the 4th and draw high switch resistance;
(f) judge whether that by firmware complete PS2 marking signal is received;
(g) determine that the firmware operational mode is the PS2 interface, close this output analog switch, the 3rd and draw high switch resistance and the 4th and draw high switch resistance, and open first and draw high switch resistance, second and draw high switch resistance;
(h) judge by firmware whether timer has surpassed the time of removing of setting;
(i) the firmware running mode switching is the PS2 interface, and sends PS2 and set sign indicating number, removes the counting of a period of time inside counting device again; And
(j) whether computing machine is set sign indicating number at PS2 and is made correct response, skips to step (g) if yes; If otherwise skip to step (d).
6. the connection judgment method of computer peripheral device interface shape as claimed in claim 5 wherein when if the execution result of this step (d) is "Yes", continues execution in step (e); When if the execution result of this step (d) is "No", execution in step (f) then.
7. the connection judgment method of computer peripheral device interface shape as claimed in claim 5 wherein when if the execution result of this step (f) is "Yes", continues execution in step (g); When if the execution result of this step (f) is "No", execution in step (h) then.
8. the connection judgment method of computer peripheral device interface shape as claimed in claim 5 wherein when if the execution result of this step (h) is "Yes", continues execution in step (i); When if the execution result of this step (h) is "No", execution in step (d) then.
CNB2005101085737A 2005-10-12 2005-10-12 Connecting judging method and device of computer external device interface shape Active CN100397379C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101085737A CN100397379C (en) 2005-10-12 2005-10-12 Connecting judging method and device of computer external device interface shape

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101085737A CN100397379C (en) 2005-10-12 2005-10-12 Connecting judging method and device of computer external device interface shape

Publications (2)

Publication Number Publication Date
CN1949201A true CN1949201A (en) 2007-04-18
CN100397379C CN100397379C (en) 2008-06-25

Family

ID=38018721

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101085737A Active CN100397379C (en) 2005-10-12 2005-10-12 Connecting judging method and device of computer external device interface shape

Country Status (1)

Country Link
CN (1) CN100397379C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092793A (en) * 2011-11-01 2013-05-08 联想(北京)有限公司 Switching method and electronic terminal
TWI670577B (en) * 2017-07-19 2019-09-01 円星科技股份有限公司 Physical layer circuitry for multi-wire interface
US10574431B2 (en) 2017-02-21 2020-02-25 M31 Technology Corporation Physical layer circuitry for multi-wire interface

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240020243A1 (en) * 2020-04-29 2024-01-18 Hewlett-Packard Development Company, L.P. Modification of audio signals based on ambient noise collected by speakers

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6442734B1 (en) * 1998-07-08 2002-08-27 Microsoft Corporation Method and apparatus for detecting the type of interface to which a peripheral device is connected
CN1225693C (en) * 2002-05-13 2005-11-02 义隆电子股份有限公司 USB/PS2 interface automatic identification device and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092793A (en) * 2011-11-01 2013-05-08 联想(北京)有限公司 Switching method and electronic terminal
CN103092793B (en) * 2011-11-01 2016-03-02 联想(北京)有限公司 A kind of changing method and electric terminal
US10574431B2 (en) 2017-02-21 2020-02-25 M31 Technology Corporation Physical layer circuitry for multi-wire interface
TWI670577B (en) * 2017-07-19 2019-09-01 円星科技股份有限公司 Physical layer circuitry for multi-wire interface

Also Published As

Publication number Publication date
CN100397379C (en) 2008-06-25

Similar Documents

Publication Publication Date Title
CN1230724C (en) Power saving method and device for display
CN1053281C (en) Bus-to-bus bridge for a multiple bus information handling system that optimizes data transfers between a system bus and a peripheral bus
CN1168022C (en) Method and apparatus for detecting type of interface to which peripheral device is connected
CN1773425A (en) Computer for decreasing noise and a control method and medium for decreasing noise thereof
CN101030097A (en) Method and chip set for reducing computer system power consumption under working condition
CN1881174A (en) Computer switch and a computer switching method
CN1975633A (en) Host apparatus and information processing system using the same
CN101059770A (en) System for automatic testing USB compatibility
CN1949201A (en) Connecting judging method and device of computer external device interface shape
CN1828574A (en) Computer system using serial connect bus, and method for interconnecting a plurality of CPU using serial connect bus
CN1821914A (en) Controller soft realizing method from I2C bus
CN1955890A (en) Method for raising communication speed of HID equipment
CN1278203C (en) Method for PCI express power management using a PCI PM mechanism in a computer system
CN1885272A (en) PS/2 interface detection apparatus and method
CN1438582A (en) USB control circuit suitable to computer-to-computer transmission and its operation method
CN2638140Y (en) Computer external equipment capable of supply expanded USB interface
CN1517871A (en) Multi computer switchover device
CN1147774C (en) Computer device and its change method from power economizing mode into operation mode
CN1848103A (en) Method and system for realizing central control of central control unit to single board
CN1278204C (en) Power source management state control method
CN1624673A (en) Data transfer apparatus
CN2704880Y (en) Distributor of contacting screen
CN1302358C (en) Resettnig method of bridging chip and apparatus thereof
CN1212556C (en) Computer device, expansion card, mini PCI card, automatic power-on circuit, automatic starting method and signal activiting method
CN101051435A (en) Copying and detecting system for flat panel display product EDID

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