CN109189620B - Serial port inspection device - Google Patents

Serial port inspection device Download PDF

Info

Publication number
CN109189620B
CN109189620B CN201810938354.9A CN201810938354A CN109189620B CN 109189620 B CN109189620 B CN 109189620B CN 201810938354 A CN201810938354 A CN 201810938354A CN 109189620 B CN109189620 B CN 109189620B
Authority
CN
China
Prior art keywords
serial port
level
tested
controller
detection circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810938354.9A
Other languages
Chinese (zh)
Other versions
CN109189620A (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.)
Fujian Start Computer Equipment Co ltd
Original Assignee
Fujian Start Computer Equipment Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Start Computer Equipment Co ltd filed Critical Fujian Start Computer Equipment Co ltd
Priority to CN201810938354.9A priority Critical patent/CN109189620B/en
Publication of CN109189620A publication Critical patent/CN109189620A/en
Application granted granted Critical
Publication of CN109189620B publication Critical patent/CN109189620B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/267Reconfiguring circuits for testing, e.g. LSSD, partitioning

Abstract

The invention provides a serial port inspection device, which comprises a controller, a serial port power supply detection circuit and a serial port level detection circuit, wherein the serial port power supply detection circuit and the serial port level detection circuit are respectively connected with the controller; the controller is used for controlling and acquiring serial port level information and power supply information of the serial port of the tested device after receiving a state query command sent by the serial port of the tested device, and feeding the serial port level information and the power supply information back to the tested device; the serial port LEVEL detection circuit is controlled by the controller and is used for detecting the LEVEL state of the UART _ LEVEL _ DEV terminal of the serial port of the tested equipment; if the level state is high level, the serial port of the tested equipment is at TTL level; if the level state is low level, the serial port of the tested equipment is at RS232 level; the serial port power supply detection circuit is controlled by the controller to detect the voltage of a power supply pin of the serial port of the tested device and acquire the power supply information of the serial port of the tested device. The invention can be used for the production inspection of serial devices and improves the production efficiency.

Description

Serial port inspection device
Technical Field
The invention relates to the field of serial port inspection, in particular to a serial port inspection device.
Background
At present, the PC in the financial industry or the industrial control industry has the characteristic of multiple serial ports, whether the serial ports are electrified or not is judged, and the level is RS232 or TTL difference. This brings about a lot of inconvenience to the production inspection of the apparatus.
The existing serial communication is detected by simply short-circuiting TX and RX signals of a serial port of a tested device and controlling a program to finish self-sending and self-receiving verification; the electrification inspection is performed by visually inspecting the indicator lamp; the level inspection needs to find the equipment corresponding to the level for communication test or does not need to perform inspection for improving the production efficiency.
The above-described inspection method has the following problems: disadvantage 1: the serial port test relates to many times and pulls out and inserts the inspection, if use the pilot lamp, still needs artifical extra discernment, inefficiency. And (2) disadvantage: the detection of the serial port level is relatively troublesome, and the production line is required to be provided with serial port equipment with different levels.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the serial port inspection device can be used for production inspection of serial port equipment, and improves production efficiency.
In order to solve the technical problems, the invention adopts the technical scheme that:
a serial port inspection device is connected with a serial port of a device to be tested through a wire; the device comprises a controller, and a serial port power supply detection circuit and a serial port level detection circuit which are respectively connected with the controller;
the controller is used for acquiring serial port level information and power supply information of the serial port of the tested device after receiving a state query command sent by the serial port of the tested device, and feeding the serial port level information and the power supply information back to the tested device;
the serial port LEVEL detection circuit is controlled by the controller to detect the LEVEL state of the UART _ LEVEL _ DEV terminal of the serial port of the tested equipment; if the level state is high level, the serial port of the tested equipment is at TTL level; if the level state is low level, the serial port of the tested equipment is at RS232 level;
the serial port power supply detection circuit is controlled by the controller to detect the voltage of a power supply pin of the serial port of the tested device and acquire the power supply information of the serial port of the tested device.
The invention has the beneficial effects that: the serial port inspection device has the function of serial port state information feedback, and can realize the report of the serial port power supply condition and the level condition of the tested equipment. When the serial port of the tested equipment sends a state query command to the serial port checking device, the serial port checking device uploads the acquired power supply condition and serial port level information of the tested serial port to the tested equipment. The invention can well solve the particularity that the serial port of the industrial thin client has different levels (RS232 or TTL) and different power supply conditions, and has the advantages of automatically and accurately detecting and acquiring the level and the power supply state of the serial port.
Drawings
FIG. 1 is a schematic diagram of the connection between the serial port test device and the serial port of the device under test according to the present invention;
FIG. 2 is a schematic diagram of the components and connections of the serial port testing device of the present invention;
FIG. 3 is a schematic diagram of a checking process according to a first embodiment of the present invention;
fig. 4 is a circuit schematic diagram of a serial port level detection circuit according to the first embodiment and the second embodiment;
fig. 5 is a schematic circuit diagram of a serial port plugging detection circuit according to the first embodiment and the second embodiment;
fig. 6 is a circuit schematic diagram of a serial port level switching circuit according to the first embodiment and the second embodiment.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: the serial port level and the power supply state can be automatically and accurately detected and obtained.
Referring to fig. 1 and fig. 2, the present invention provides a serial port testing device, wherein the device is connected to a serial port of a device under test through a wire; the device comprises a controller, and a serial port power supply detection circuit and a serial port level detection circuit which are respectively connected with the controller;
the controller is used for controlling and acquiring serial port level information and power supply information of the serial port of the tested device after receiving a state query command sent by the serial port of the tested device, and feeding the serial port level information and the power supply information back to the tested device;
the serial port LEVEL detection circuit is controlled by the controller to detect the LEVEL state of the UART _ LEVEL _ DEV terminal of the serial port of the tested equipment; if the level state is high level, the serial port of the tested equipment is at TTL level; if the level state is low level, the serial port of the tested equipment is at RS232 level;
the serial port power supply detection circuit is controlled by the controller to detect the voltage of a power supply pin of the serial port of the tested device and acquire the power supply information of the serial port of the tested device.
From the above description, the beneficial effects of the present invention are: the particularity that different levels (RS232 or TTL) and different power supply conditions exist in an industrial thin client serial port is solved. The device can automatically acquire the level and the power supply state of the serial port. The tested device can inquire the state by sending the characteristic inquiry command of the agreement, and the device returns the state information after receiving the inquiry command.
The device is further used for controlling to return other data except the state query command sent by the serial port of the tested device when receiving the other data except the state query command;
the tested device is used for comparing the received other data with the sent data; if the serial port communication is consistent with the serial port communication standard, judging that the serial port communication of the tested device is normal, and if the serial port communication is inconsistent with the serial port communication standard, judging that the serial port communication of the tested device fails.
As can be seen from the above description, the device of the present invention also has a data return function, and realizes serial port communication inspection of the device under test. When the serial port of the tested device sends data except the state query command, the serial port inspection device returns the original data; and the tested equipment compares the sent data with the received data returned by the serial port inspection device, the data is the same and indicates that the serial port communication is normal, and the data is different and the serial port communication fails.
Further, the device also comprises a serial port plugging detection circuit connected with the controller, and the serial port plugging detection circuit is used for detecting the level states of the UART _ PULLIN _ OUT _ DEV1 end and the UART _ PULLIN _ OUT _ DEV2 end of the serial port of the tested device;
if the UART _ PULLIN _ OUT _ DEV1 end is at low level and the UART _ PULLIN _ OUT _ DEV2 end is at high level, or the UART _ PULLIN _ OUT _ DEV1 end is at high level and the UART _ PULLIN _ OUT _ DEV2 end is at low level, the serial port of the tested device is in an access state;
if the UART _ PULLIN _ OUT _ DEV1 terminal is high level and the UART _ PULLIN _ OUT _ DEV2 terminal is high level, the serial port of the tested device is in a pull-OUT state.
As can be seen from the above description, when the device is in a power-on state and the serial port is in an idle state, and the serial port is in a normal operation state, the voltage of the DUT _ TX signal is only two states of-3V to-15V or +2.4V to + 5V. According to the characteristic, the serial port can be judged to be in the connected or pulled-out state quickly and accurately.
Further, the device also comprises a serial port level switching circuit, wherein the serial port level switching circuit is respectively connected with the controller and the serial port level detection circuit;
the serial port level switching circuit is used for converting the level states of serial ports DUT _ TX and DUT _ RX of the tested equipment into TTL levels and communicating the TTL levels with the serial port of the controller if the detection result of the serial port level detecting circuit indicates that the serial port of the tested equipment is at the RS232 level; and
and the serial port level detection circuit is used for directly switching the serial port signals DUT _ TX and DUT _ RX of the tested equipment to communicate with the serial port of the controller if the detection result of the serial port level detection circuit indicates that the serial port of the tested equipment is at TTL level.
According to the above description, after the level of the serial port of the device to be tested is confirmed, if the level is the RS232 level, the level switching is performed by controlling the level switching control signal, so that the communication between the inspection device and the serial port of the device to be tested is ensured.
Further, the serial port level switching circuit executes the conversion and the switching by receiving a level switching control instruction output by a controller or the serial port level detection circuit.
As can be seen from the above description, two control modes of sending out a level switching control instruction by a controller or a serial port level detection circuit are supported.
Furthermore, the serial port LEVEL detection circuit is also used for enabling the negative pressure circuit through the CTRL signal when detecting that the serial port of the tested device is at the RS232 LEVEL, so that the LEVEL state of the UART _ LEVEL _ DEV end keeps low LEVEL output, and self-locking is formed.
It can be known from the above description that in order to satisfy the requirement that the serial port maintains the RS232 level state in the communication process, self-locking is required. Because the DUT _ TX state jumps between a high level and a low level in the communication process of the serial port to be tested, the device can reliably communicate with the serial port to be tested at the RS232 level only by self-locking formed by negative pressure.
Further, the controller is further configured to control the LEVEL state of the UART _ LEVEL _ DEV terminal to reset after determining that the serial port of the device under test is in the unplugged state.
As can be seen from the above description, since the level detection needs self-locking when detecting the RS232 level, in order to satisfy the next level detection, the level detection state needs to be reset after the determination interface is pulled out.
Example one
Referring to fig. 1 to fig. 6, the present embodiment provides a serial port testing apparatus, which can be used for production testing of serial devices to improve production efficiency.
This serial ports verifying attachment mainly realizes two functions:
1. the particularity that different levels (RS232 or TTL) and different power supply conditions exist in an industrial thin client serial port is solved. The device can automatically acquire the level and the power supply state of the serial port. The tested device can inquire the state by sending the characteristic inquiry command of the agreement, and the device returns the state information after receiving the inquiry command. The tested device is compared with the state information returned by the device according to the expected state of the tested device, if the comparison is consistent, the tested device is judged to pass, and if the comparison is inconsistent, an error is reported.
2. The device supports non-inquiry commands and data return. The device to be tested can send the agreed characteristic self-detection data (any data except the query command) to the device, the device returns the original data to the device to be tested, the device to be tested automatically compares the data with the sent characteristic self-detection data after receiving the data, if the comparison is consistent, the judgment is passed, and if the comparison is inconsistent, an error is reported.
As shown in fig. 1, which is a schematic diagram of the connection between the serial port test apparatus and the device under test in the test process of this embodiment, the serial port of the DUT is directly connected to the serial port test apparatus through a common wire.
As shown in fig. 2, the serial port testing apparatus of this embodiment mainly includes a controller (MCU), a serial port power supply detection circuit, a serial port level detection circuit, a serial port plug detection circuit, and a serial port level switching circuit. The serial port power supply detection circuit, the serial port level detection circuit, the serial port plugging detection circuit and the serial port level switching circuit are respectively connected with the controller, and the serial port level detection circuit is further connected with the serial port level switching circuit.
The principle of detection of each circuit will be described based on the structural composition and connection relationship of the apparatus of fig. 2.
(1) Serial port power supply detection principle
The controller directly detects the voltage of the power supply pin of the serial port to be detected through an ADC (analog-to-digital converter).
The accessible serial ports power supply detection circuit realizes, and concrete implementation process does: the device is controlled by the controller to detect the voltage of the power supply pin of the serial port of the tested device and obtain the power supply information of the serial port of the tested device.
(2) Serial port level detection principle
The level detection of the serial port is obtained by detecting the DUT _ TX signal level state of the serial port of the tested device when the device is accessed to the serial port of the tested device.
Specifically, please participate in the serial port LEVEL detection circuit diagram of fig. 4, when the DUT _ TX is at the RS232 LEVEL, the initial state voltage of the DUT _ TX is-3V to-15V, D1 is turned on, Q1 and Q2 are turned on, the UART _ LEVEL _ DEV terminal is changed from the high LEVEL to the low LEVEL, the negative voltage circuit is enabled by the CTRL signal to form self-locking, and the UART _ LEVEL _ DEV keeps outputting at the low LEVEL when the DUT _ TX signal jumps during the serial port communication process; when DUT _ TX is at TTL LEVEL, the initial state voltage of DUT _ TX + 2.4V- +5V, D1 is turned off, Q1, Q2 are not conductive, and UART _ LEVEL _ DEV terminal is in high state. The controller judges the LEVEL condition of the tested serial port by detecting the UART _ LEVEL _ DEV signal, the tested serial port is RS232 LEVEL if the UART _ LEVEL _ DEV signal is low, and the tested serial port is TTL LEVEL if the UART _ LEVEL _ DEV signal is high.
Based on the detection principle, the controller of the serial port detection device detects the UART _ LEVEL _ DEV by controlling the serial port LEVEL detection circuit to acquire the LEVEL state of the serial port of the tested device.
The negative voltage circuit module in the figure is used for maintaining the RS232 level state of the serial port in the communication process. This is because the DUT _ TX state is toggled between high and low during the communication process of the serial port under test. Only if negative pressure forms self-locking, the device can reliably communicate with the serial port to be tested under the RS232 level.
(3) Serial port plugging and unplugging detection principle
Referring to the detection circuit diagram 5, no matter whether the tested device is RS232 level or TTL level, when the device is in the power-on state and the serial port is in the idle state, the voltage of the DUT _ TX signal is only two states, i.e., -3V to-15V or +2.4V to +5V under normal serial port operation. And judging whether the serial port is in an access state or a pull-out state according to the characteristic.
Specifically, when the serial port is accessed, if the DUT _ TX voltage is-3V to-15V, the signal UART _ PULLIN _ OUT _ DEV1 is low, and the signal UART _ PULLIN _ OUT _ DEV2 is high. If the DUT _ TX voltage is + 2.4V- +5V, the signal UART _ PULLIN _ OUT _ DEV1 is high and the signal UART _ PULLIN _ OUT _ DEV2 is low. If the DUT _ TX signal is floating with the serial port unplugged, then signal UART _ PULLIN _ OUT _ DEV1 is high and signal UART _ PULLIN _ OUT _ DEV2 is high.
Based on the detection principle, the controller of the serial port detection device acquires the plugging and unplugging state of the serial port by controlling the serial port plugging and unplugging detection circuit to detect the UART _ PULLIN _ OUT _ DEV1 and the UART _ PULLIN _ OUT _ DEV 2. The judgment is according to the following table one:
Figure BDA0001768429010000061
Figure BDA0001768429010000071
watch 1
(4) Serial port level switching principle
Referring to fig. 6, the principle is that after the Level detection circuit confirms the Level of the serial port to be tested, a Level _ shift control signal is sent out to control the switch channel, and the Level shift control signal can be sent out by the controller or directly controlled and output by the Level detection circuit. If the serial port of the tested equipment is RS232 level, serial port signals DUT _ TX and DUT _ RX are communicated with the serial port of the access controller after level conversion into TTL level; if the serial port of the tested device is TTL level, the serial port signals DUT _ TX and DUT _ RX are directly switched to be directly communicated with the controller without level conversion.
Based on the detection principle, the controller or the serial port level detection circuit of the serial port detection device is switched and converted by controlling the serial port level switching circuit.
Optionally, the level shift circuit uses a MAX3221 chip to perform level shift, but is not limited to this scheme.
Please refer to fig. 3, a detection process of the serial port detection apparatus based on the above detection principle is as follows:
1. equipment initialization: the main controller initializes the system clock, the serial port, the ADC and the GPIO.
2. Acquiring state information: the controller detects the power supply condition of the serial port, the LEVEL condition of the UART _ LEVEL _ DEV signal, and the serial port plugging and unplugging state condition of the UART _ PULLIN _ OUT _ DEV1 and the UART _ PULLIN _ OUT _ DEV2 signal.
3. Level detection reset: since the level detection needs self-locking when detecting the RS232 level, in order to satisfy the next level detection, the level detection state needs to be reset after the determination interface is pulled out.
4. Response status information: when the serial port of the device receives a state query information command sent by the tested device, the device transmits the acquired state information to the uploading machine through the serial port.
5. Data returning: and if the data information of the tested device received by the detection device is not the state query command, returning the original data of the detection device.
Example two
Referring to fig. 4 to fig. 6, the present embodiment provides a serial port testing device, where the device is connected to a serial port of a device under test through a wire; the device comprises a controller, and a serial port power supply detection circuit, a serial port level detection circuit and a serial port plugging detection circuit which are respectively connected with the controller;
the tested device is used for comparing the received other data with the sent data; if the serial port communication is consistent with the serial port communication standard, judging that the serial port communication of the tested device is normal, and if the serial port communication is inconsistent with the serial port communication standard, judging that the serial port communication of the tested device fails.
The controller is used for controlling and acquiring serial port level information and power supply information of the serial port of the tested device after receiving a state query command sent by the serial port of the tested device, and feeding the serial port level information and the power supply information back to the tested device; and the data processing device is used for controlling to return other data when receiving the other data except the state query command sent by the serial port of the tested device;
further, the controller is further configured to control the LEVEL state of the UART _ LEVEL _ DEV terminal to reset after determining that the serial port of the device under test is in the unplugged state.
The serial port LEVEL detection circuit is controlled by the controller to detect the LEVEL state of the UART _ LEVEL _ DEV terminal of the serial port of the tested equipment; if the level state is high level, the serial port of the tested equipment is at TTL level; if the level state is low level, the serial port of the tested equipment is at RS232 level; and when the serial port of the tested device is detected to be at the RS232 LEVEL, the negative pressure circuit is enabled through the CTRL signal, so that the LEVEL state of the UART _ LEVEL _ DEV end keeps low LEVEL output, and self-locking is formed.
The serial port power supply detection circuit is controlled by the controller to detect the voltage of a power supply pin of the serial port of the tested device and acquire the power supply information of the serial port of the tested device.
The serial port plugging and unplugging detection circuit is used for detecting the level states of a UART _ PULLIN _ OUT _ DEV1 end and a UART _ PULLIN _ OUT _ DEV2 end of a serial port of a tested device; if the UART _ PULLIN _ OUT _ DEV1 terminal is at low level and the UART _ PULLIN _ OUT _ DEV2 terminal is at high level, and the UART _ PULLIN _ OUT _ DEV1 terminal is at high level and the UART _ PULLIN _ OUT _ DEV2 terminal is at low level, the serial port of the tested device is in an access state; if the UART _ PULLIN _ OUT _ DEV1 terminal is high level and the UART _ PULLIN _ OUT _ DEV2 terminal is high level, the serial port of the tested device is in a pull-OUT state.
Further, the device also comprises a serial port level switching circuit, wherein the serial port level switching circuit is respectively connected with the controller and the serial port level detection circuit;
the serial port level switching circuit is used for converting the level states of serial ports DUT _ TX and DUT _ RX of the tested equipment into TTL levels and communicating the TTL levels with the serial port of the controller if the detection result of the serial port level detecting circuit indicates that the serial port of the tested equipment is at the RS232 level; and
and the serial port level detection circuit is used for directly switching the serial port signals DUT _ TX and DUT _ RX of the tested equipment to communicate with the serial port of the controller if the detection result of the serial port level detection circuit indicates that the serial port of the tested equipment is at TTL level.
The serial port level switching circuit can execute the conversion and the switching by receiving a level switching control instruction output by a controller or the serial port level detection circuit.
As shown in fig. 4, in particular, the serial port LEVEL detection circuit with self-locking function includes an input terminal DUT _ TX, an output terminal CTRL, a UART _ LEVEL _ DEV terminal, a negative voltage module circuit, an NMOS transistor (Q1), a PMOS transistor (Q2), a first diode D1, a second diode D2, a first capacitor C1, a first resistor R1, a second resistor R2, a third resistor R3, and a fourth resistor R4; the input end of the serial port level detection circuit is connected with a DUT _ TX signal of a communication end interface of a checking device, the input end is connected with the cathode of a first diode D1, the anode of the first diode D1 is connected with the source electrode of the NMOS tube, one end of a first capacitor C1, one end of a first resistor R1 and the output end of the negative voltage module circuit, the other end of the first capacitor and the other end of the first resistor R1 are grounded, the grid electrode of the NMOS tube is grounded, the drain electrode of the NMOS tube is connected with one end of a fourth resistor R4 and the grid electrode of the PMOS tube, the other end of the fourth resistor R4 is connected with a +5V power supply, the drain electrode of the PMOS tube is grounded, the source electrode of the PMOS tube is connected with the enabling input end of the negative voltage module circuit and one end of a third resistor R3, the other end of the third resistor R3 is connected with a +5V power supply, and the source electrode of the PMOS tube is connected with the anode of a second diode D2, one end of the cathode is connected with the second resistor R2 to be grounded, and the other end is connected with the output end.
The serial port unplugging and plugging detection circuit is shown in fig. 5, and is used for detecting the level states of the UART _ pull _ OUT _ DEV1 terminal and the UART _ pull _ OUT _ DEV2 terminal of the serial port.
FIG. 6 is a schematic diagram of a serial port level switching circuit, which includes an input terminal DUT _ TX/DUT _ RX, a level switching control signal input terminal, a level shift chip and a control module; the input end DUT _ TX/DUT _ RX is connected to a DUT _ TX/DUT _ RX end of the communication end interface and used for receiving a level signal transmitted by the communication end interface; the level switching control signal input end is connected to the serial port level detection circuit module with the self-locking function; the controller is respectively connected with the switch and the level conversion chip.
In conclusion, the serial port inspection device provided by the invention can automatically and accurately detect and acquire the level and the power supply state of the serial port; and the data return function of a non-inquiry command is also supported so as to detect whether the serial port communication is normal.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (6)

1. A serial port inspection device is characterized in that the device is connected with a serial port of a device to be tested through a wire; the device comprises a controller, and a serial port power supply detection circuit and a serial port level detection circuit which are respectively connected with the controller;
the controller is used for controlling and acquiring serial port level information and power supply information of the serial port of the tested device after receiving a state query command sent by the serial port of the tested device, and feeding the serial port level information and the power supply information back to the tested device;
the serial port LEVEL detection circuit is controlled by the controller to detect the LEVEL state of the UART _ LEVEL _ DEV terminal of the serial port of the tested equipment; if the level state is high level, the serial port of the tested equipment is at TTL level; if the level state is low level, the serial port of the tested equipment is at RS232 level;
the serial port power supply detection circuit is controlled by the controller to detect the voltage of a power supply pin of the serial port of the tested device and acquire power supply information of the serial port of the tested device;
the device also comprises a serial port plugging detection circuit connected with the controller and used for detecting the level states of the UART _ PULLIN _ OUT _ DEV1 end and the UART _ PULLIN _ OUT _ DEV2 end of the serial port of the tested device;
if the UART _ PULLIN _ OUT _ DEV1 end is at low level and the UART _ PULLIN _ OUT _ DEV2 end is at high level, or the UART _ PULLIN _ OUT _ DEV1 end is at high level and the UART _ PULLIN _ OUT _ DEV2 end is at low level, the serial port of the tested device is in an access state;
if the UART _ PULLIN _ OUT _ DEV1 terminal is high level and the UART _ PULLIN _ OUT _ DEV2 terminal is high level, the serial port of the tested device is in a pull-OUT state.
2. The serial port test device according to claim 1, wherein the controller is further configured to control to return other data except the status query command when receiving the other data sent by the serial port of the device under test;
the tested device is used for comparing the received other data with the sent data; if the serial port communication is consistent with the serial port communication standard, judging that the serial port communication of the tested device is normal, and if the serial port communication is inconsistent with the serial port communication standard, judging that the serial port communication of the tested device fails.
3. The serial port test device according to claim 1, further comprising a serial port level switching circuit, wherein the serial port level switching circuit is connected to the controller and the serial port level detection circuit respectively;
the serial port level switching circuit is used for converting the level states of serial ports DUT _ TX and DUT _ RX of the tested equipment into TTL levels and communicating the TTL levels with the serial port of the controller if the detection result of the serial port level detecting circuit indicates that the serial port of the tested equipment is at the RS232 level; and
and the serial port level detection circuit is used for directly switching the serial port signals DUT _ TX and DUT _ RX of the tested equipment to communicate with the serial port of the controller if the detection result of the serial port level detection circuit indicates that the serial port of the tested equipment is at TTL level.
4. The serial port test device according to claim 3, wherein said serial port level switching circuit performs said switching and said switching by receiving a level switching control command output from a controller or said serial port level detection circuit.
5. The serial port test device as claimed in claim 1, wherein the serial port LEVEL detection circuit is further configured to enable the negative voltage circuit through the CTRL signal when detecting that the serial port of the device under test is at an RS232 LEVEL, so that the LEVEL state of the UART _ LEVEL _ DEV terminal is kept at a low LEVEL for output, thereby forming self-locking.
6. The serial port test device as claimed in claim 5, wherein the controller is further configured to control the LEVEL state of the UART _ LEVEL _ DEV terminal to reset after determining that the serial port of the device under test is in the unplugged state.
CN201810938354.9A 2018-08-17 2018-08-17 Serial port inspection device Active CN109189620B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810938354.9A CN109189620B (en) 2018-08-17 2018-08-17 Serial port inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810938354.9A CN109189620B (en) 2018-08-17 2018-08-17 Serial port inspection device

Publications (2)

Publication Number Publication Date
CN109189620A CN109189620A (en) 2019-01-11
CN109189620B true CN109189620B (en) 2022-02-11

Family

ID=64918163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810938354.9A Active CN109189620B (en) 2018-08-17 2018-08-17 Serial port inspection device

Country Status (1)

Country Link
CN (1) CN109189620B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143140B (en) * 2019-12-09 2020-12-11 江苏云涌电子科技股份有限公司 Data maintenance port detection system and method
TWI772189B (en) * 2021-09-24 2022-07-21 英業達股份有限公司 Hard disk device simulator and testing system using the simulator and testing method thereof
CN114003455B (en) * 2021-12-31 2022-04-08 广州鲁邦通物联网科技股份有限公司 Serial port automatic test system, interface automatic test method and test platelet

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320968A (en) * 2008-07-18 2008-12-10 上海哈诚电子科技有限公司 Self-adapting circuit and its processing method
CN104219104A (en) * 2013-05-30 2014-12-17 研祥智能科技股份有限公司 Serial port test device
CN105045751A (en) * 2015-06-29 2015-11-11 福建实达电脑设备有限公司 Serial TTL/RS232 electrical level adaptive apparatus
CN204945293U (en) * 2015-08-31 2016-01-06 深圳市创维电器科技有限公司 A kind of serial port detection circuit of access device and test fixture

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100726594B1 (en) * 2005-11-11 2007-06-11 엘지이노텍 주식회사 Interface device and interfacing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320968A (en) * 2008-07-18 2008-12-10 上海哈诚电子科技有限公司 Self-adapting circuit and its processing method
CN104219104A (en) * 2013-05-30 2014-12-17 研祥智能科技股份有限公司 Serial port test device
CN105045751A (en) * 2015-06-29 2015-11-11 福建实达电脑设备有限公司 Serial TTL/RS232 electrical level adaptive apparatus
CN204945293U (en) * 2015-08-31 2016-01-06 深圳市创维电器科技有限公司 A kind of serial port detection circuit of access device and test fixture

Also Published As

Publication number Publication date
CN109189620A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN109189620B (en) Serial port inspection device
US9128691B2 (en) Method and terminal for selecting internal circuit according to USB interface status
CN109031091B (en) Interface test method, test system and test fixture
RU2676866C2 (en) Method and device for controlling a device mode
CN115210589A (en) Chip testing device and testing method
US10184976B2 (en) Testing circuit board with self-detection function and self-detection method thereof
WO2018036067A1 (en) Test device for usb 3.0 apparatus
TWI623836B (en) Control chip, method and connection device utilizing the same
US20160217052A1 (en) Debug circuit, debug request circuit and debug system
CN108732462B (en) Detection device and method
CN211062033U (en) Test adapter and test equipment
US20170184670A1 (en) Test circuit board adapted to be used on serial advanced technology attachment connector
US20170192916A1 (en) Automatic usb identification and communication system with star architecture and method thereof
TW201327126A (en) Auto-detection control device and method thereof
CN113960443A (en) IO static parameter testing method and system
US6886052B2 (en) Apparatus and method for automatically identifying between USB and PS/2 interface
US7216241B2 (en) Self-testing power supply which indicates when an output voltage is within tolerance while not coupled to an external load
TWI702546B (en) Image test system and its image capture card
CN109765480B (en) Testing device and testing equipment
US20200341683A1 (en) Integrated interface and electronic device
CN208188289U (en) A kind of test macro of circuit power consumption
CN112860606A (en) Interface conversion device and equipment
TW201506608A (en) Signal test device
CN108062268B (en) Method, test fixture and device for automatically testing equipment with RS232RS485 universal interface
KR102392278B1 (en) Power supply apparatus, device, system and method of controlling output of adapter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant