A method, system, apparatus, and readable storage medium for detecting computer parallel port cards.
By directly accessing the memory-allocated register address, parallel port register information is obtained and multi-mode testing is performed, solving the compatibility problem of parallel port cards in OEM testing and achieving efficient and accurate testing results.
Patent Information
- Application Number
- CN202310395320.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-04-13
AI Technical Summary
In the existing technology, parallel port cards lack convenient and effective quality testing methods during system assembly plant testing. Reliance on the system's built-in Parport series drivers leads to compatibility issues and affects the accuracy of test results.
By directly accessing the memory-allocated register address, the location and quantity information of the parallel port registers are obtained. Through multi-mode parallel port register connectivity testing and chip control mode testing, the male head of the LPT connector is used as a test fixture to cover all operating systems.
It improves the versatility and accuracy of testing, reduces testing costs, and enables automatic detection of multi-mode parallel port cards.
Smart Images

Figure CN116501558B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to a method, system, apparatus, and readable storage medium for detecting computer parallel port cards. Background Technology
[0002] With the development of computer technology, computers are supporting an increasing number of business scenarios. Because parallel port cards support the operation of external devices such as printers and plotters, the demand for computers equipped with parallel port cards is also increasing.
[0003] Currently, after parallel port cards are purchased from the board manufacturer, there is no convenient and effective way to conduct quality testing at the computer assembly plant, except for product function testing at the supplier's factory. However, when testing parallel port cards at the assembly plant, printers and plotters are mainly used as external tooling. The testing process is highly dependent on the system, especially on the system's built-in Parport series drivers and system ioctl interface. However, the Parport series drivers are not compatible with all operating systems. If the Parport series drivers are not compatible, it will lead to inaccurate test data and seriously interfere with the test results. Summary of the Invention
[0004] To address the above problems, the present invention aims to provide a computer parallel port card testing method, system, device, and readable storage medium, which can support automatic testing of parallel port cards in multiple modes and effectively improve the versatility of testing.
[0005] To achieve the above objectives, the present invention employs the following technical solution:
[0006] In a first aspect, the present invention discloses a method for detecting a computer parallel port card, comprising:
[0007] Start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals;
[0008] The number and location information of all parallel port registers of the parallel port card under test are obtained by accessing multiple preset addresses in turn, and recorded in the parallel port list;
[0009] Based on the location information of each parallel port register, query the parallel port compatibility mode of each parallel port register and record it in the mode list;
[0010] By traversing the parallel port list and mode list, the location information and parallel port compatibility mode of each parallel port register are determined, and the connectivity test of the parallel port register and the chip control mode test are performed in each compatibility mode.
[0011] Furthermore, the step of starting the operating system of the current device specifically involves:
[0012] Start the UOS operating system on the current device.
[0013] Furthermore, the step of obtaining the number and location information of all parallel port registers by sequentially accessing multiple preset addresses includes:
[0014] The number and location information of all parallel port registers are obtained by sequentially accessing addresses 0x378, 0x278, and 0x3bc.
[0015] Furthermore, the step of obtaining the number and location information of all parallel port registers by sequentially accessing multiple preset addresses also includes:
[0016] The address of the parallel port register is determined based on its location information.
[0017] The addresses of the parallel port registers are incremented by one sequentially to determine the addresses of the corresponding data register, control register, and status register.
[0018] Furthermore, the connection test of the parallel port register and the chip control mode test in each compatibility mode include:
[0019] Using the address of the data register, write random numbers into the data register according to the serial port mode standard;
[0020] Read the data information in the status register according to the address of the status register, and perform an XOR operation on the read data information;
[0021] The result of the calculation is compared with the random number; if the values are the same, the connectivity test passes; otherwise, the connectivity test fails.
[0022] Furthermore, the process of performing connectivity tests on the parallel port registers and chip control mode tests in each compatibility mode also includes:
[0023] Modify the status information in the control register according to the address of the control register;
[0024] Read the status information in the status register based on the address of the status register;
[0025] Determine whether the status information in the status register meets the preset control standard; if it does, the chip control mode test passes; otherwise, the chip control mode test fails.
[0026] Furthermore, the parallel port card under test is used to send data signals and return corresponding status signals, including: sending a data signal through the sixth pin of the parallel port card under test and obtaining the BUSY signal returned by the eleventh pin; sending a data signal through the fifth pin of the parallel port card under test and obtaining the ACK signal returned by the tenth pin;
[0027] The data signal is sent through the fourth pin of the parallel port card under test, and the Paper Out signal returned by the twelfth pin is obtained.
[0028] The data signal is sent through the third pin of the parallel port card under test, and the Select signal returned by the thirteenth pin is obtained.
[0029] The data signal is sent through the second pin of the parallel port card under test, and the ERROR signal returned by the fifteenth pin is obtained.
[0030] Secondly, the present invention also discloses a computer parallel port card detection system, comprising:
[0031] The signal acquisition module is used to start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals.
[0032] The register information recording module is used to obtain the number and location information of all parallel port registers of the parallel port card under test by accessing multiple preset addresses in turn, and record them in the parallel port list;
[0033] The compatibility mode recording module is used to query the parallel port compatibility mode of each parallel port register based on the location information of each parallel port register, and record it in the mode list;
[0034] The traversal test module is used to determine the location information and parallel port compatibility mode of each parallel port register by traversing the parallel port list and mode list, and to perform connectivity tests of the parallel port register and chip control mode tests in each compatibility mode.
[0035] Furthermore, the signal acquisition module is specifically used for:
[0036] Data signals are sent through the sixth pin of the parallel port card under test, and the BUSY signal returned by the eleventh pin is obtained; data signals are sent through the fifth pin of the parallel port card under test, and the ACK signal returned by the tenth pin is obtained.
[0037] The data signal is sent through the fourth pin of the parallel port card under test, and the Paper Out signal returned by the twelfth pin is obtained.
[0038] The data signal is sent through the third pin of the parallel port card under test, and the Select signal returned by the thirteenth pin is obtained.
[0039] The data signal is sent through the second pin of the parallel port card under test, and the ERROR signal returned by the fifteenth pin is obtained.
[0040] Furthermore, the register information recording module is specifically used to: obtain the quantity and location information of all parallel port registers by sequentially accessing addresses 0x378, 0x278, and 0x3bc; determine the address of the parallel port register based on the location information of the parallel port register; increment the address of the parallel port register by one in sequence to determine the corresponding data register address, control register address, and status register address of the parallel port register; and record the obtained quantity of parallel port registers and the location information of the parallel port registers, as well as the corresponding data register address, control register address, and status register, in the parallel port list.
[0041] Furthermore, the parallel port compatibility mode of each parallel port register includes any one or any combination of the following: standard mode, enhanced mode, and extended function mode.
[0042] Furthermore, the traversal test module is specifically used for:
[0043] When performing a connectivity test on the parallel port register, firstly, a random number is written into the data register according to the serial port mode standard using the address of the data register; then, the data information in the status register is read according to the address of the status register, and an XOR operation is performed on the read data information; finally, the result of the operation is compared with the random number; if the values are the same, the connectivity test passes; otherwise, the connectivity test fails.
[0044] When performing chip control mode testing, the status information in the control register is first modified according to the address of the control register; then the status information in the status register is read according to the address of the status register; at this time, it is determined whether the status information in the status register meets the preset control standard; if it does, the chip control mode test passes; otherwise, the chip control mode test fails.
[0045] Accordingly, the present invention discloses a computer parallel port card detection device, comprising:
[0046] The memory is used to store the computer's parallel port card detection program;
[0047] A processor is configured to implement the steps of the RBD computer parallel port card detection method as described above when executing the computer parallel port card detection program.
[0048] Accordingly, the present invention discloses a readable storage medium storing a computer parallel port card detection program, wherein when the computer parallel port card detection program is executed by a processor, it implements the steps of the computer parallel port card detection method described in any of the above descriptions.
[0049] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides a computer parallel port card testing method, system, device and readable storage medium, which obtains the location information and quantity information of the parallel port register by directly accessing the register address allocated in memory, and performs connectivity testing of the parallel port register and chip control mode testing of the parallel port card in multiple modes, effectively improving the versatility of the test.
[0050] This invention eliminates the need for system-provided Parport series drivers, and its testing method covers all operating systems. Utilizing the male head of the LPT connector as a test fixture effectively reduces testing costs. Before testing, the number and location information of parallel port registers, as well as the parallel port compatibility mode of each register, are first obtained and recorded in the parallel port list and mode list. During testing, by traversing the parallel port list and mode list, connectivity tests and chip control mode tests are performed on each parallel port register in each of its supported compatibility modes. This achieves parallel port card testing covering all compatibility modes, effectively improving testing speed.
[0051] Therefore, it is evident that the present invention has outstanding substantive features and significant progress compared with the prior art, and the beneficial effects of its implementation are also obvious. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0053] Figure 1 This is a flowchart illustrating a specific embodiment of the present invention.
[0054] Figure 2 This is a flowchart of the connectivity test of the parallel port register according to a specific embodiment of the present invention.
[0055] Figure 3 This is a flowchart of the chip control mode test according to a specific embodiment of the present invention.
[0056] Figure 4 This is a system structure diagram of a specific embodiment of the present invention.
[0057] Figure 5 This is a schematic diagram of the male connector connection structure of the LPT connector according to a specific embodiment of the present invention.
[0058] In the diagram, 1 is the signal acquisition module; 2 is the register information recording module; 3 is the compatibility mode recording module; and 4 is the traversal test module. Detailed Implementation
[0059] The core of this invention is to provide a method for testing computer parallel port cards. In related technologies, commonly used testing methods do not have dedicated testing fixtures and can only test the function from the host computer to the board chip register. They cannot test the connectivity of parallel port pins or the function of parallel port cards that support multiple modes. Moreover, they are highly dependent on the system, and the adapted drivers are not compatible with all operating systems, which will lead to inaccurate test data.
[0060] The computer parallel port card testing method provided by this invention first starts the operating system of the current device and performs signal interaction with the parallel port card under test according to a preset signal path. At this time, the number and location information of all parallel port registers are obtained by sequentially accessing multiple preset addresses and recorded in a parallel port list. Then, based on the location information of each parallel port register, the parallel port compatibility mode of each register is queried and recorded in a mode list. Finally, by traversing the parallel port list and the mode list, the location information and parallel port compatibility mode of each parallel port register are determined, and connectivity tests and chip control mode tests are performed in each compatibility mode. Therefore, this invention achieves automatic testing of parallel port cards supporting multiple modes, effectively improving the versatility of the testing.
[0061] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] See Figure 1 As shown, this invention discloses a method for detecting a computer parallel port card, comprising the following steps:
[0063] S1: Start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals.
[0064] Specifically, first, the UOS operating system of the current device is started. Then, a data signal is sent through the sixth pin of the parallel port card under test, and the BUSY signal returned by the eleventh pin is obtained; a data signal is sent through the fifth pin of the parallel port card under test, and the ACK signal returned by the tenth pin is obtained; a data signal is sent through the fourth pin of the parallel port card under test, and the Paper Out signal returned by the twelfth pin is obtained; a data signal is sent through the third pin of the parallel port card under test, and the Select signal returned by the thirteenth pin is obtained; a data signal is sent through the second pin of the parallel port card under test, and the ERROR signal returned by the fifteenth pin is obtained.
[0065] It should be noted that the signal interaction method of the parallel port card under test can be achieved by setting the signal connection rules of the parallel port card, or the male head of the commonly used LPT connector in this field can be used as a test fixture to connect to the parallel port card under test, and the signal interaction line can be constructed after the connection settings of the male head of the LPT connector are configured.
[0066] like Figure 5 As shown, the data connections are made between pins 2 and 15 of the male LPT connector, pins 3 and 13 of the male LPT connector, pins 4 and 12 of the male LPT connector, pins 5 and 10 of the male LPT connector, and pins 6 and 11 of the male LPT connector.
[0067] In a specific implementation, the signal connectivity rules can be determined based on the signal connection relationships provided in the table below.
[0068] Signal connection table
[0069]
[0070] As shown in the table above, connect pin 2 of Data bit 0 to pin 15 of ERROR signal, connect pin 3 of Data bit 1 to pin 13 of Select signal, connect pin 4 of Data bit 2 to pin 12 of Paper Out signal, connect pin 5 of Data bit 3 to pin 10 of ACK signal, and connect pin 6 of Data bit 4 to pin 11 of BUSY signal. This completes the connection setup for the male connector of the LPT connector.
[0071] S2: Start the operating system of the current device, and obtain the number and location information of all parallel port registers of the parallel port card under test by accessing multiple preset addresses in turn, and record them in the parallel port list.
[0072] In a specific implementation, the number and location information of all parallel port registers are first obtained by sequentially accessing addresses 0x378, 0x278, and 0x3bc. Since each parallel port register includes a data register, a control register, and a status register, the addresses of the parallel port registers are incremented by one sequentially to determine the corresponding data register address, control register address, and status register address. After the sequential access is completed, the obtained number of parallel port registers and the location information of the parallel port registers, along with their corresponding data register addresses, control register addresses, and status register addresses, are recorded in the parallel port list.
[0073] S3: Based on the location information of each parallel port register, query the parallel port compatibility mode of each parallel port register and record it in the mode list.
[0074] It should be noted that there are many commonly used parallel port card protocols, specifically SPP (Standard Parallel Port), EPP (Enhanced Parallel Port), and ECP (Extended Capabilities Port). The testing method needs to cover the circuit connections and control instructions of various protocols as much as possible. Therefore, it is necessary to determine and record the parallel port compatibility mode of each parallel port register so that the computer parallel port card testing method can cover all modes.
[0075] Based on this, in a specific implementation, the parallel port compatibility mode of each parallel port register is queried by reading the setting parameters of the parallel port register according to the address of each parallel port register, and recorded in the mode list.
[0076] The parallel port compatibility modes include any one or any combination of the following: standard mode, enhanced mode, and extended function mode.
[0077] S4: By traversing the parallel port list and mode list, determine the location information and parallel port compatibility mode of each parallel port register, and perform connectivity tests of the parallel port register and chip control mode tests in each compatibility mode.
[0078] In a specific implementation, this step uses a parallel port list and a mode list to perform the test through a double-level traversal. The purpose is to ensure that each parallel port register is tested for connectivity and chip control mode in each of its parallel port compatible modes.
[0079] Specifically, the process begins by traversing the parallel port list to obtain the location information of the first parallel port register. Then, iterates through the mode list to obtain the parallel port compatibility mode of the first parallel port register. Based on the location information of the first parallel port register, connectivity tests and chip control mode tests are performed in each parallel port compatibility mode of the first parallel port register. After the tests are completed, the process continues to obtain the location information and parallel port compatibility mode of the second parallel port register, and performs connectivity tests and chip control mode tests in each parallel port compatibility mode of the second parallel port register. This iterative process is used to perform connectivity tests and chip control mode tests on each parallel port register in each of its parallel port compatibility modes. The loop continues until the number of parallel port registers tested reaches the number of parallel port registers recorded in the parallel port list, at which point the loop exits.
[0080] As an example, such as Figure 2 As shown, the parallel port register connectivity test process in this step specifically includes the following steps:
[0081] S401: Using the address of the data register, write random numbers into the data register according to the serial port mode standard.
[0082] S402: Read the data information in the status register according to the address of the status register, and perform an XOR operation on the read data information.
[0083] S403: Compare the calculation result with the random number; if the values are the same, the connectivity test passes; otherwise, the connectivity test fails.
[0084] As an example, such as Figure 3 As shown, the chip control mode test process in this step specifically includes the following steps:
[0085] S411: Modify the status information in the control register according to the address of the control register.
[0086] S412: Read the status information in the status register according to the address of the status register.
[0087] S413: Determine whether the status information in the status register meets the preset control standard; if it does, the chip control mode test passes; otherwise, the chip control mode test fails.
[0088] Therefore, this invention provides a computer parallel port card testing method. It uses the male head of the LPT connector after connection settings as a test fixture, and obtains the location and quantity information of the parallel port register by directly accessing the register address allocated in memory. It performs connectivity tests of the parallel port registers and chip control mode tests of the parallel port card in multiple modes, effectively improving the versatility of the test.
[0089] See Figure 4 As shown, the present invention also discloses a computer parallel port card testing system, including: a signal acquisition module 1, a register information recording module 2, a compatibility mode recording module 3, and a traversal test module 4.
[0090] Signal acquisition module 1 is used to start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals.
[0091] In a specific implementation, the signal acquisition module 1 is specifically used to: start the UOS operating system of the current device, send a data signal through the sixth pin of the parallel port card under test, and acquire the BUSY signal returned by the eleventh pin; send a data signal through the fifth pin of the parallel port card under test, and acquire the ACK signal returned by the tenth pin; send a data signal through the fourth pin of the parallel port card under test, and acquire the Paper Out signal returned by the twelfth pin; send a data signal through the third pin of the parallel port card under test, and acquire the Select signal returned by the thirteenth pin; send a data signal through the second pin of the parallel port card under test, and acquire the ERROR signal returned by the fifteenth pin.
[0092] Register information recording module 2 is used to obtain the number and location information of all parallel port registers of the parallel port card under test by accessing multiple preset addresses in turn, and record them in the parallel port list.
[0093] In a specific implementation, the register information recording module 3 is specifically used to: obtain the quantity and location information of all parallel port registers by sequentially accessing addresses 0x378, 0x278, and 0x3bc; determine the address of the parallel port register based on the location information of the parallel port register; increment the address of the parallel port register by one in sequence to determine the corresponding data register address, control register address, and status register address of the parallel port register; and record the obtained quantity of parallel port registers and the location information of the parallel port registers, as well as the corresponding data register address, control register address, and status register, in the parallel port list.
[0094] The compatibility mode recording module 3 is used to query the parallel port compatibility mode of each parallel port register based on the location information of each parallel port register, and record it in the mode list.
[0095] Each parallel port register has a parallel port compatibility mode including any one or any combination of standard mode, enhanced mode, and extended function mode.
[0096] The traversal test module 4 is used to determine the location information and parallel port compatibility mode of each parallel port register by traversing the parallel port list and mode list, and to perform connectivity tests of the parallel port register and chip control mode tests in each compatibility mode.
[0097] In a specific implementation, the traversal test module 5 is specifically used for:
[0098] When performing a connectivity test on the parallel port register, firstly, a random number is written into the data register according to the serial port mode standard using the address of the data register; then, the data information in the status register is read according to the address of the status register, and an XOR operation is performed on the read data information; finally, the result of the operation is compared with the random number; if the values are the same, the connectivity test passes; otherwise, the connectivity test fails.
[0099] When performing chip control mode testing, the status information in the control register is first modified according to the address of the control register; then the status information in the status register is read according to the address of the status register; at this time, it is determined whether the status information in the status register meets the preset control standard; if it does, the chip control mode test passes; otherwise, the chip control mode test fails.
[0100] Therefore, the present invention provides a computer parallel port card testing system that obtains the location and quantity information of the parallel port registers by directly accessing the register addresses allocated in memory, and performs connectivity tests and chip control mode tests on the parallel port registers of the parallel port card in multiple modes, effectively improving the versatility of the test.
[0101] The present invention also discloses a computer parallel port card detection device, comprising a processor and a memory; wherein, when the processor executes a computer parallel port card detection program stored in the memory, it performs the following steps:
[0102] 1. Start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals;
[0103] 2. Obtain the number and location information of all parallel port registers of the parallel port card under test by accessing multiple preset addresses in turn, and record them in the parallel port list.
[0104] 3. Based on the location information of each parallel port register, query the parallel port compatibility mode of each parallel port register and record it in the mode list.
[0105] 4. By traversing the parallel port list and mode list, determine the location information and parallel port compatibility mode of each parallel port register, and perform connectivity tests of the parallel port register and chip control mode tests in each compatibility mode.
[0106] The computer parallel port card detection device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.
[0107] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor can be implemented using at least one hardware form of Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor may also include a main processor and coprocessors. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0108] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory is used to store at least the following computer program, which, after being loaded and executed by the processor, is capable of implementing the relevant steps of the computer parallel port card detection method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory may also include an operating system and data, and the storage method may be temporary or permanent storage. The operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, the data involved in the above-described computer parallel port card detection method.
[0109] In a specific implementation, when the processor executes the computer program stored in the memory, it can specifically implement the following steps: sending a data signal through the sixth pin of the parallel port card under test and obtaining the BUSY signal returned by the eleventh pin; sending a data signal through the fifth pin of the parallel port card under test and obtaining the ACK signal returned by the tenth pin; sending a data signal through the fourth pin of the parallel port card under test and obtaining the Paper Out signal returned by the twelfth pin; sending a data signal through the third pin of the parallel port card under test and obtaining the Select signal returned by the thirteenth pin; sending a data signal through the second pin of the parallel port card under test and obtaining the ERROR signal returned by the fifteenth pin.
[0110] In a specific implementation, when the processor executes the computer program stored in the memory, it can specifically implement the following steps: start the UOS operating system of the current device, and obtain the quantity and location information of all parallel port registers by accessing addresses 0x378, 0x278 and 0x3bc in turn; determine the address of the parallel port register according to the location information of the parallel port register; increment the address of the parallel port register by one in sequence to determine the corresponding data register address, control register address and status register address of the parallel port register; and record the obtained quantity of parallel port registers and the location information of the parallel port registers and their corresponding data register addresses, control register addresses and status registers in the parallel port list.
[0111] In a specific implementation, when the processor executes the computer program stored in the memory, it can specifically implement the following steps: using the address of the data register, write a random number into the data register according to the serial port mode standard; read the data information in the status register according to the address of the status register, and perform an XOR operation on the read data information; compare the operation result with the random number; if the values are the same, the connectivity test passes; otherwise, the connectivity test fails.
[0112] In a specific implementation, when the processor executes the computer program stored in the memory, it can specifically implement the following steps: modify the status information in the control register according to the address of the control register; read the status information in the status register according to the address of the status register; determine whether the status information in the status register meets the preset control standard; if it does, the chip control mode test passes; otherwise, the chip control mode test fails.
[0113] Furthermore, the computer parallel port card detection device in this embodiment may also include:
[0114] The input interface is used to acquire computer parallel port card detection programs imported from external sources and save the acquired programs to the memory. It can also be used to acquire various instructions and parameters transmitted from external terminal devices and transmit them to the processor, so that the processor can perform corresponding processing using these instructions and parameters. In this embodiment, the input interface may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, and a hard disk read interface.
[0115] An output interface is used to output various data generated by the processor to connected terminal devices, so that other terminal devices connected to the output interface can obtain the various data generated by the processor. In this embodiment, the output interface may include, but is not limited to, a USB interface, a serial interface, etc.
[0116] The communication unit is used to establish a remote communication connection between the computer parallel port card testing device and an external server, so that the computer parallel port card testing device can mount the image file to the external server. In this embodiment, the communication unit may specifically include, but is not limited to, a remote communication unit based on wireless communication technology or wired communication technology.
[0117] The keyboard is used to acquire various parameter data or commands input by the user through real-time keystrokes.
[0118] The monitor is used to display relevant information in real time regarding the process of locating a short circuit in the server's power supply line.
[0119] A mouse can be used to assist users in inputting data and simplifying user operations.
[0120] This invention also discloses a readable storage medium, which includes random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium known in the art. The readable storage medium stores a computer parallel port card detection program, which, when executed by a processor, performs the following steps:
[0121] 1. Start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals;
[0122] 2. Obtain the number and location information of all parallel port registers of the parallel port card under test by accessing multiple preset addresses in turn, and record them in the parallel port list.
[0123] 3. Based on the location information of each parallel port register, query the parallel port compatibility mode of each parallel port register and record it in the mode list.
[0124] 4. By traversing the parallel port list and mode list, determine the location information and parallel port compatibility mode of each parallel port register, and perform connectivity tests of the parallel port register and chip control mode tests in each compatibility mode.
[0125] In summary, this invention can support automatic detection of parallel port cards in multiple modes, effectively improving the versatility of testing.
[0126] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The methods disclosed in the embodiments are described simply because they correspond to the systems disclosed in the embodiments; relevant details can be found in the method section.
[0127] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0128] In the embodiments provided by this invention, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0129] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0130] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit.
[0131] Similarly, in the various embodiments of the present invention, each processing unit can be integrated into a functional module, or each processing unit can exist physically, or two or more processing units can be integrated into a functional module.
[0132] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0133] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0134] The computer parallel port card detection method, system, device, and readable storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for detecting a computer parallel port card, characterized in that, include: Start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals; The number and location information of all parallel port registers of the parallel port card under test are obtained by accessing multiple preset addresses in turn, and recorded in the parallel port list; Based on the location information of each parallel port register, query the parallel port compatibility mode of each parallel port register and record it in the mode list; among which, the parallel port compatibility mode includes any one or any combination of standard mode, enhanced mode and extended function mode; By traversing the parallel port list and mode list, the location information and parallel port compatibility mode of each parallel port register are determined, and the connectivity test of the parallel port register and the chip control mode test are performed in each compatibility mode. The connectivity test of the parallel port register includes: using the address of the data register, writing a random number into the data register according to the serial port mode standard; reading the data information in the status register according to the address of the status register, and performing an XOR operation on the read data information; comparing the operation result with the random number; if the values are the same, the connectivity of the parallel port register is successful; otherwise, the connectivity of the parallel port register fails. The chip control mode test includes: modifying the status information in the control register according to the address of the control register; reading the status information in the status register according to the address of the status register; determining whether the status information in the status register meets the preset control standard; if it meets the standard, the chip control mode test passes; otherwise, the chip control mode test fails.
2. The computer parallel port card detection method according to claim 1, characterized in that, The process of obtaining the number and location information of all parallel port registers of the parallel port card under test by sequentially accessing multiple preset addresses includes: The number and location information of all parallel port registers are obtained by sequentially accessing addresses 0x378, 0x278, and 0x3bc.
3. The computer parallel port card detection method according to claim 2, characterized in that, The method of obtaining the number and location information of all parallel port registers by sequentially accessing multiple preset addresses also includes: The address of the parallel port register is determined based on its location information. The addresses of the parallel port registers are incremented by one sequentially to determine the addresses of the corresponding data register, control register, and status register.
4. The computer parallel port card detection method according to claim 1, characterized in that, The process of starting the operating system of the current device specifically involves: Start the UOS operating system on the current device.
5. The computer parallel port card detection method according to claim 1, characterized in that, The process of sending data signals using the parallel port card under test and returning corresponding status signals includes: The data signal is sent through the sixth pin of the parallel port card under test, and the BUSY signal returned by the eleventh pin is obtained. The data signal is sent through the fifth pin of the parallel port card under test, and the ACK signal returned by the tenth pin is obtained. The data signal is sent through the fourth pin of the parallel port card under test, and the Paper Out signal returned by the twelfth pin is obtained. The data signal is sent through the third pin of the parallel port card under test, and the Select signal returned by the thirteenth pin is obtained. The data signal is sent through the second pin of the parallel port card under test, and the ERROR signal returned by the fifteenth pin is obtained.
6. A computer parallel port card detection system, characterized in that, The system employs the computer parallel port card detection method as described in any one of claims 1 to 5; The system includes: The signal acquisition module is used to start the operating system of the current device, send data signals using the parallel port card under test, and return the corresponding status signals. The register information recording module is used to obtain the number and location information of all parallel port registers of the parallel port card under test by accessing multiple preset addresses in turn, and record them in the parallel port list; The compatibility mode recording module is used to query the parallel port compatibility mode of each parallel port register based on the location information of each parallel port register, and record it in the mode list; The traversal test module is used to determine the location information and parallel port compatibility mode of each parallel port register by traversing the parallel port list and mode list, and to perform connectivity tests of the parallel port register and chip control mode tests in each compatibility mode.
7. A computer parallel port card detection device, characterized in that, include: The memory is used to store the computer's parallel port card detection program; A processor, configured to implement the steps of the computer parallel port card detection method as claimed in any one of claims 1 to 5 when executing the computer parallel port card detection program.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer parallel port card detection program, which, when executed by a processor, implements the steps of the computer parallel port card detection method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Detecting method for computer parallel port and detecting method for parallel port dataline
CN1987807A
