CN101727374A - Method for testing PS/2 interface - Google Patents
Method for testing PS/2 interface Download PDFInfo
- Publication number
- CN101727374A CN101727374A CN200810171115A CN200810171115A CN101727374A CN 101727374 A CN101727374 A CN 101727374A CN 200810171115 A CN200810171115 A CN 200810171115A CN 200810171115 A CN200810171115 A CN 200810171115A CN 101727374 A CN101727374 A CN 101727374A
- Authority
- CN
- China
- Prior art keywords
- interface
- principal computer
- test module
- tested
- testing
- 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
Links
Images
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method for testing a PS/2 interface, which comprises the following steps: connecting a test module with the PS/2 interface and a USB interface of a tested host computer; starting the test module and the tested host computer and initializing the USB interface equipment and PS/2 interface equipment of the tested host computer; allowing the tested host computer to send a command to the test module through the USB interface to require the test module to simulate the action of the PS/2 interface equipment; making the test module simulate a PS/2 protocol according to the command sent by the tested host computer and send a corresponding PS/2 signal to the PS/2 interface of the tested host computer; and allowing the tested host computer to receive the corresponding PS/2 signal through the PS/2 interface to judge if the communication of the PS/2 interface is normal. The method can replace the traditional manual test method and improve test efficiency and precision.
Description
Technical field
The invention relates to a kind of method of testing of PS/2 interface,, use the method for testing of the PS/2 interface testing of finishing tested principal computer especially about a kind of action that sees through test module simulation PS/2 interfacing equipment.
Background technology
At present, existing P S/2 interface test method is to rely on manually to finish, for example, test procedure sees through the screen prompt tester according to the external appointment PS/2 interfacing equipment of screen display operation, as click the mouse or the keyboard input, whether test procedure reads corresponding test input then, move normally with the interface of determining PS/2 interfacing equipments such as keyboard or mouse.
Yet the PS/2 interface test method of prior art still has defective, and particularly the easy tested person personnel's of test result people is the influence of operation, so test accuracy is difficult to guarantee.
In addition, the testing efficiency of operation manually is not high, is difficult to satisfy the testing requirement in producing in batches.Therefore, need a kind of method of testing that can improve the PS/2 interface of testing efficiency and accuracy, use the method for testing that substitutes existing operation manually.
Summary of the invention
In order to solve above-mentioned the problems of the prior art and defective, the object of the present invention is to provide a kind of method of testing of PS/2 interface, be to see through test module to simulate the test that the PS/2 interface of finishing tested principal computer is used in the action of PS/2 interfacing equipment.
The method of testing of a kind of PS/2 interface provided by the present invention is to comprise following steps:
Test module is connected with the PS/2 interface and the USB interface of tested principal computer; Start test module and tested principal computer, and the USB interface equipment of the tested principal computer of initialization and PS/2 interfacing equipment; Tested principal computer sees through USB interface and sends order to test module, uses the action that requires test module simulation PS/2 interfacing equipment; Test module is simulated the PS/2 agreement according to the order that tested principal computer sends, and sends corresponding PS/2 signal to the PS/2 of tested principal computer interface; And tested principal computer sees through the PS/2 interface and receives corresponding PS/2 signal, and whether use the communication of judging the PS/2 interface normal.
In sum, the invention has the advantages that:
The method of testing of a kind of PS/2 interface provided by the present invention, wherein, test module sees through USB interface and tested main computer communication, and receive the control command of tested principal computer, send corresponding PS/2 signal according to control command simulation PS/2 agreement and to the PS/2 of tested principal computer interface then, the input signal of keyboard or mouse for example, and then can the virtual PS/2 of becoming interfacing equipment and the Simulation execution relevant action realize automatic test to the PS/2 interface of tested principal computer, therefore, replaced manual testing's operating type of the prior art fully, improve testing efficiency and accuracy, more realized the robotization and the intellectuality of PS/2 interface testing.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is the calcspar for the testing process of the PS/2 interface of the embodiment of the invention;
Fig. 2 is the process flow diagram for the method for testing of the PS/2 interface of the embodiment of the invention;
Fig. 3 is the connection diagram for the PS/2 interface of MCU Microprocessor Control Unit among the present invention and tested principal computer:
Fig. 4 is the method for attachment process flow diagram for MCU Microprocessor Control Unit among the present invention and tested principal computer;
Fig. 5 is the initialization flowchart for the PS/2 interfacing equipment of tested principal computer among the present invention;
Fig. 6 is the test flow chart of the PS/2 interface of tested principal computer being tested for MCU Microprocessor Control Unit simulation PS/2 interfacing equipment among the present invention.
Wherein, Reference numeral
10 test modules
20 tested principal computers
30 MCU Microprocessor Control Unit
Embodiment
Below, will elaborate to better embodiment of the present invention in conjunction with graphic part.
Shown in Figure 1 is calcspar for the testing process of the PS/2 interface of the embodiment of the invention.Shown in Figure 2 is process flow diagram for the method for testing of the PS/2 interface of the embodiment of the invention.
Please refer to Fig. 1 and Fig. 2, the method for testing of PS/2 interface of the present invention comprises following steps:
The PS/2 interface and the USB interface (step 100) that connect test module 10 and tested principal computer 20 respectively:
Then, start test module 10 and tested principal computer 20 respectively, and the USB interface equipment of the tested principal computer 20 of initialization and PS/2 interfacing equipment (step 200);
Tested principal computer 20 sees through USB interface to test module 10 transmitting control commands, uses the required movement (step 300) that requires test module 10 simulation PS/2 interfacing equipments;
Whether normally tested principal computer 20 sees through the PS/2 interface and receives corresponding PS/2 signal, and the communication (step 500) of judging the PS/2 interface of calling related application programs interface (API) function.
Test module among the present invention can be MCU Microprocessor Control Unit (Microprocessor ControlUnit, be called for short MCU), adopt USB interface to realize communication between wherein tested principal computer and the MCU Microprocessor Control Unit, the clock line of MCU Microprocessor Control Unit simulation PS/2 interface and the pin of data line are connected to the PS/2 interface of tested principal computer.Described in detail below in conjunction with Fig. 3.
Shown in Figure 3 is connection diagram for the PS/2 interface of MCU Microprocessor Control Unit among the present invention and tested principal computer.
Please refer to Fig. 3, the PA0 of MCU Microprocessor Control Unit 30, PA1, PA2 and PA3 pin respectively with the GND of the PS/2 interface of tested principal computer ,+5V, CLK and DAT port be connected, wherein the CLK port is the signal clock line of PS/2 interface, and the DAT port is a data line.
Shown in Figure 4 is method of attachment process flow diagram for MCU Microprocessor Control Unit among the present invention and tested principal computer.
Please refer to Fig. 4, the interface pin of MCU Microprocessor Control Unit analog mouse is inserted the PS/2 mouse interface (step 101) of tested principal computer through the PS/2 interface line.Then, the interface pin with the MCU Microprocessor Control Unit simulating keyboard sees through the PS/2 keyboard interface (step 102) that the PS/2 interface line inserts tested principal computer.At last, the USB interface with MCU Microprocessor Control Unit sees through the USB interface (step 103) that the USB line is connected to tested principal computer.
Shown in Figure 5 is initialization flowchart for the PS/2 interfacing equipment of tested principal computer among the present invention.
Please refer to Fig. 5, start tested principal computer and MCU Microprocessor Control Unit respectively, the initialization of using the virtual PS/2 interfacing equipment of finishing tested principal computer is to comprise following steps: start tested principal computer (step 201); Start MCU Microprocessor Control Unit (step 202); The Basic Input or Output System (BIOS) of tested principal computer (BIOS) is enumerated PS/2 interfacing equipment (step 203); Basic Input or Output System (BIOS) is communicated by letter with MCU Microprocessor Control Unit, and finishes the PS/2 interfacing equipment, as the initialization (step 204) of mouse and keyboard; Operating system is communicated by letter with MCU Microprocessor Control Unit, and further finishes enumerate (step 205) of PS/2 interfacing equipment; And operating system identifies normal PS/2 interfacing equipment (coming down to the PS/2 interfacing equipment by the MCU Microprocessor Control Unit simulation), inserts (step 206) as mouse and keyboard.
Shown in Figure 6 is the test flow chart of the PS/2 interface of tested principal computer being tested for MCU Microprocessor Control Unit simulation PS/2 interfacing equipment among the present invention.
Please refer to Fig. 6, the program of tested principal computer sees through USB interface and sends a command to MCU Microprocessor Control Unit, requires to finish specific keyboard and/or mouse action (step 301); MCU Microprocessor Control Unit sees through USB interface and receives the order of tested principal computer, and is resolved (step 302); MCU Microprocessor Control Unit sees through pin transmission corresponding clock and the data-signal PS/2 interface (step 303) to tested principal computer according to order simulation PS/2 agreement; The operating system of tested principal computer sees through the PS/2 interface and receives corresponding keyboard and/or mouse action information (step 304); And normally whether the communication of the api function judgement PS/2 interface that the program use of tested principal computer is relevant (step 305).If communication is normal, illustrate that then the PS/2 interface can normally use; Undesired if communicate by letter, illustrate that then the PS/2 interface can't normally use.At last, finish the test (step 306) of the PS/2 interface of tested principal computer.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.
Claims (9)
1. the method for testing of a PS/2 interface is the action that sees through test module simulation PS/2 interfacing equipment, uses the PS/2 interface testing of finishing a tested principal computer, it is characterized in that the method includes the steps of:
This test module is connected with the PS/2 interface and the USB interface of this tested principal computer;
Start this test module and this tested principal computer, and the USB interface equipment of this tested principal computer of initialization and PS/2 interfacing equipment;
This tested principal computer sees through USB interface and sends order to this test module, uses the action that requires this test module simulation PS/2 interfacing equipment;
This test module is simulated the PS/2 agreement according to the order that this tested principal computer sends, and sends corresponding PS/2 signal to the PS/2 of this tested principal computer interface;
This tested principal computer sees through the PS/2 interface and receives corresponding PS/2 signal, and whether use the communication of judging this PS/2 interface normal.
2. the method for testing of PS/2 interface according to claim 1 is characterized in that, wherein this test module is further comprised following steps with the step that the PS/2 interface and the USB interface of this tested principal computer are connected:
See through the PS/2 interface that simulation PS/2 that the PS/2 interface line connects this test module is interfaced to this tested principal computer;
See through the USB line and connect the USB interface of the USB interface of this test module to this tested principal computer.
3. the method for testing of PS/2 interface according to claim 1 is characterized in that, wherein the PS/2 interfacing equipment of this tested principal computer of initialization further comprises following steps:
The BIOS that sees through this tested principal computer enumerates various PS/2 interfacing equipments;
The BIOS that sees through this tested principal computer communicates by letter with this test module, and the simulation PS/2 interfacing equipment of this test module of initialization;
The operating system that sees through this tested principal computer is communicated by letter with this test module, and finishes enumerating of PS/2 interfacing equipment;
The simulation PS/2 interfacing equipment that the operating system that sees through this tested principal computer recognizes this test module inserts.
4. the method for testing of PS/2 interface according to claim 1 is characterized in that, wherein this PS/2 interfacing equipment is to be keyboard and/or mouse.
5. the method for testing of PS/2 interface according to claim 1 is characterized in that, wherein more comprises this test module and sees through the order that USB interface receives this tested principal computer transmission, and the step of being resolved.
6. the method for testing of PS/2 interface according to claim 1 is characterized in that, wherein more comprises this tested principal computer and sees through and to call whether normal step of communication that a function judges this PS/2 interface.
7. the method for testing at PS/2 according to claim 6 interface is characterized in that, wherein this function is to be application program interface function.
8. the method for testing of PS/2 interface according to claim 1 is characterized in that, wherein said PS/2 signal is to be clock and data-signal.
9. the method for testing of PS/2 interface according to claim 1 is characterized in that, wherein this test module is to be a MCU Microprocessor Control Unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101711151A CN101727374B (en) | 2008-10-15 | 2008-10-15 | Method for testing PS/2 interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101711151A CN101727374B (en) | 2008-10-15 | 2008-10-15 | Method for testing PS/2 interface |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101727374A true CN101727374A (en) | 2010-06-09 |
CN101727374B CN101727374B (en) | 2012-07-04 |
Family
ID=42448294
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008101711151A Expired - Fee Related CN101727374B (en) | 2008-10-15 | 2008-10-15 | Method for testing PS/2 interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101727374B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309787A (en) * | 2013-06-28 | 2013-09-18 | 飞天诚信科技股份有限公司 | Detection method of nonstandard USB protocol compatibility |
CN104144084A (en) * | 2013-05-10 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Terminal state monitoring method and device |
CN106406585A (en) * | 2016-08-26 | 2017-02-15 | 天津市英贝特航天科技有限公司 | Implementation method of special mouse for PS/2 interfaces |
CN113037580A (en) * | 2019-12-09 | 2021-06-25 | 中国电信股份有限公司 | Signal test method and signal test system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6792378B2 (en) * | 2002-11-21 | 2004-09-14 | Via Technologies, Inc. | Method for testing I/O ports of a computer motherboard |
CN1315051C (en) * | 2004-01-15 | 2007-05-09 | 英业达股份有限公司 | Computer interface measuring tool and its measuring method |
CN201004221Y (en) * | 2006-11-14 | 2008-01-09 | 中国船舶重工集团公司第七○九研究所 | PS/2 interface keyboard and mouse batch detection device |
-
2008
- 2008-10-15 CN CN2008101711151A patent/CN101727374B/en not_active Expired - Fee Related
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104144084A (en) * | 2013-05-10 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Terminal state monitoring method and device |
CN103309787A (en) * | 2013-06-28 | 2013-09-18 | 飞天诚信科技股份有限公司 | Detection method of nonstandard USB protocol compatibility |
CN103309787B (en) * | 2013-06-28 | 2014-12-10 | 飞天诚信科技股份有限公司 | Detection method of nonstandard USB protocol compatibility |
CN106406585A (en) * | 2016-08-26 | 2017-02-15 | 天津市英贝特航天科技有限公司 | Implementation method of special mouse for PS/2 interfaces |
CN113037580A (en) * | 2019-12-09 | 2021-06-25 | 中国电信股份有限公司 | Signal test method and signal test system |
Also Published As
Publication number | Publication date |
---|---|
CN101727374B (en) | 2012-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6498999B1 (en) | Method and apparatus for design verification of an integrated circuit using a simulation test bench environment | |
US8195442B2 (en) | Use of hardware peripheral devices with software simulations | |
US20110307739A1 (en) | Multimedia hardware emulation for application testing | |
US11624788B2 (en) | Display module test platform | |
US20210056010A1 (en) | Splicing Screen Debugging Method, Splicing Screen And Splicing Wall | |
CN101727374B (en) | Method for testing PS/2 interface | |
CN101515243A (en) | Graphic display card test system and method | |
US7840948B2 (en) | Automation of keyboard accessibility testing | |
CN103970545A (en) | LTE Modem method adopting JNI invoking mode and used in Android system | |
CN102929688B (en) | The simulator of a kind of simulated touch screen realizes method and this simulator | |
CN101604275A (en) | BIOS test macro and method of testing thereof | |
CN101498752A (en) | Display equipment and test method for the same | |
US11354214B2 (en) | Judgment method for hardware compatibility | |
CN102455965A (en) | Electronic device test system and method | |
US7788557B2 (en) | Baseboard testing interface and testing method thereof | |
CN101937709A (en) | Display equipment software updating method | |
CN103246620A (en) | Data exchange method based on USB (universal serial bus) equipment | |
CN113849267A (en) | Virtual display method, system, terminal and storage medium for display card | |
CN210667263U (en) | Communication system for simulation training device | |
CN102595188A (en) | Method for testing intelligent television | |
CN110851313A (en) | Sensor debugging method, intelligent terminal, storage medium and electronic equipment | |
CN101441594A (en) | Test method of computer hardware device | |
CN117436405B (en) | Simulation verification method and device and electronic equipment | |
CN103677969B (en) | The display lighting method of many video card systems | |
CN105740109A (en) | Interface signal consistency test method and 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 | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20191224 Address after: No. 99, University Road, high tech Zone, Xuzhou City, Jiangsu Province Patentee after: XUZHOU LIFANG ELECTROMECHANICAL EQUIPMENT MANUFACTURING CO., LTD. Address before: Taipei City, Taiwan, China Patentee before: Yingda Co., Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120704 Termination date: 20191015 |