CN114579372A - Serial port testing method and system - Google Patents

Serial port testing method and system Download PDF

Info

Publication number
CN114579372A
CN114579372A CN202111631876.2A CN202111631876A CN114579372A CN 114579372 A CN114579372 A CN 114579372A CN 202111631876 A CN202111631876 A CN 202111631876A CN 114579372 A CN114579372 A CN 114579372A
Authority
CN
China
Prior art keywords
serial port
touch chip
port
test
judging
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.)
Pending
Application number
CN202111631876.2A
Other languages
Chinese (zh)
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.)
Zhuhai Hongpeihan Electronic Technology Co ltd
Original Assignee
Shenzhen Demingli Electronics 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 Shenzhen Demingli Electronics Co Ltd filed Critical Shenzhen Demingli Electronics Co Ltd
Priority to CN202111631876.2A priority Critical patent/CN114579372A/en
Publication of CN114579372A publication Critical patent/CN114579372A/en
Pending legal-status Critical Current

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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Testing Of Short-Circuits, Discontinuities, Leakage, Or Incorrect Line Connections (AREA)

Abstract

The invention discloses a serial port test method and a serial port test system, which relate to the field of serial port tests, and because the cost of the test is increased and the efficiency is lower when a scribing test is carried out, the serial port test method comprises the following steps: s1, connecting the TX signal line to the serial port; s2, applying for a timer in the main program of the touch chip, and periodically sending a section of recognition character from the TX signal line to the outside in the time controlled by the timer; s3, designing a serial port tool, judging whether to receive and analyze the identification character in a certain period when the serial port is plugged, if so, judging that the slave touch chip, the TX signal line and the process component work normally, and if not, judging that the slave touch chip, the TX signal line and the process component are abnormal. This application is through regularly sending the discernment character towards the computer end, guarantees whether real-time supervision serial ports can normally work, and this application adopts original connected mode to detect, saves the test cost.

Description

Serial port testing method and system
Technical Field
The invention relates to the field of serial port testing, in particular to a serial port testing method and a serial port testing system.
Background
The common touch control panel has two interfaces, one of which is a USB interface, and the other is a UART serial port, wherein the UART serial port is mainly used for a touch screen of KTV. The industrial standard of the UART serial port is three effective lines, namely a 5V vdd line, a GND ground line and a TX signal line, wherein the TX signal line is used for transmitting a signal line of a touch coordinate from a touch control board to a KTV system mainboard.
The test method for the UART serial port comprises the steps that one test method is to connect the UART serial port to a serial port for testing, and the other test method is to connect the UART serial port to a KTV displayer for scribing test; when carrying out the marking off test, at first will insert the sensor on touch control panel, look for a KTV mainboard and display, the reuse hand is marked off, see whether the display has signal output, thereby judge whether the UART serial ports normally works, this kind of test method needs the supporting mainboard of KTV, and touch sensor is in coordination, the winding displacement of sensor has 60 many pins or many winding displacements simultaneously, the speed is very slow during the plug, and the winding displacement has the life-span influence, can increase the cost of test simultaneously, the efficiency is lower, and because will connect the bayonet socket and mark off this action with the hand, lead to the productivity lower.
Disclosure of Invention
The invention aims to provide a serial port testing method to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
a serial port testing method comprises the following steps:
s1, connecting a TX signal wire on the serial port interface;
s2, applying for a timer I in a main program of the touch chip, wherein the timer I sends a section of recognition characters outwards from the TX signal line periodically according to preset time;
s3, designing a serial port tool, judging whether the identification character is received and analyzed in a preset period when a serial port is plugged, if so, judging that the three lines from the touch chip to the TX port and the components in the transmission process work normally, and if not, judging that the three lines from the touch chip to the TX port and the components in the transmission process are abnormal.
As a further scheme of the invention: the step S3 further includes the steps of: when the three lines from the touch chip to the TX port and the components in the transmission process are judged to work normally and the touch screen is not touched really, the steps S2-S3 are circulated, whether the recognition characters are received and analyzed is judged in a preset period, if yes, the three lines from the touch chip to the TX port and the components in the transmission process are judged to work normally, and if not, the three lines from the touch chip to the TX port and the components in the transmission process are judged to be abnormal.
As a further scheme of the invention: step S2 includes the steps of:
the main program of the touch chip sends head recognition characters as test interface signals at fixed time according to preset time, and the head recognition characters are transmitted on a link line in a touch data mode; the head recognition character is an invalid character.
As a still further scheme of the invention: the time of the preset period is two times or more than two times of the preset time.
A serial port test system comprising:
the TX port is used for connecting a TX signal line on a serial port interface;
the identification character sending module is used for sending a section of identification characters outwards from the TX signal wire periodically according to preset time by using a timer I;
and the judging module is used for judging whether the identification characters are received and analyzed in a preset period, and judging whether the components from the touch chip to the TX three lines and in the transmission process are abnormal when the identification characters are not received or analyzed in the preset period.
As a still further scheme of the invention: the judging module further comprises a circulating judging unit which is used for judging whether the components in the three lines from the touch chip to the TX port and the transmission process are normal and judging whether the components in the three lines from the touch chip to the TX port and the transmission process are abnormal when the touch screen is judged to be idle without real touch and the judging module judges whether the identification characters are not received or analyzed in a preset period.
As a still further scheme of the invention: the identification character sending module comprises a specific identification character sending unit, and is used for sending the head identification character as a test interface signal at regular time according to preset time and transmitting the head identification character on a link line in a touch data mode.
Compared with the prior art, the invention has the beneficial effects that: this application is through regularly sending the discernment character towards the computer end, and the discernment character can set up according to service condition, guarantees whether real-time supervision serial ports can normally work, and this application adopts original connected mode to detect for the process is simple, does not need all the other test matching devices, saves the test cost.
Drawings
Fig. 1 is a diagram of a serial port testing method.
Fig. 2 is a schematic connection diagram of a serial port testing method.
Fig. 3 is a schematic diagram of test control in the serial port test method.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 to 3, in an embodiment of the present invention, a serial port testing method and system includes the steps of:
s1, connecting a TX signal wire which sends out on the serial port interface, because there is basically only one TX signal wire which sends out signals on the serial port interface, only touch data is sent out at ordinary times, the coordinate of the touch position of the touch sensor can be inducted and transmitted, when the coordinate of the touch position is transmitted, in order to realize the test of the serial port, a string of invalid characters can be sent to identify when the coordinate is sent, so the method comprises the step S2;
s2, in order to realize the test of the serial port, a first timer is applied in the main program of the touch chip, a section of recognition characters are sent out from a TX signal line periodically in T0 within the time controlled by the first timer, wherein the T0 period can be set to be about 50ms, in the step, the coordinate signals normally reported and the efficiency problem during the test can be adjusted through the adjustment of the time T0, T0 is too short, the transmission frequency is too high, the operation of part of the computer is slow, T0 is too long, the waiting time of the test end is too long, and the T0 is recommended to select any value between 10ms and 200ms under the condition of low efficiency. The set time T0 adopts a cyclic sending mode, so that the test can be ensured without a related starting signal when the control board is powered on, and the test can be carried out because only a TX signal line is arranged in the scene, and the signal can be sent out and cannot be received;
s3, designing a serial port tool, and when a serial port is plugged, determining whether to receive and analyze the identification character in a certain period, that is, in this embodiment, the time of 2T0 or 2T0 is taken as the period, if the identification character is received and analyzed, determining that the slave touch chip, the TX signal line, and the process component are working normally, and if not, determining that the slave touch chip, the TX signal line, and the process component are abnormal, and displaying the test result on the test tool as OK.
As a further embodiment of the present application, referring to fig. 1 and fig. 2, step S3 further includes the steps of: when the three lines from the touch chip to the TX port and the components in the transmission process are judged to work normally and the touch screen is not touched really, the steps S2-S3 are circulated, whether the recognition characters are received and analyzed is judged in a preset period, if yes, the three lines from the touch chip to the TX port and the components in the transmission process are judged to work normally, and if not, the three lines from the touch chip to the TX port and the components in the transmission process are judged to be abnormal.
As a further embodiment of the present application, referring to fig. 1 and 2, the recognition character in step S2 is a head recognition character, which is "TWSC", and the character "TWSC" is an invalid null character with respect to the KTV host, because the content is very small, and therefore, the normal communication is not affected. And sending a section of 'invalid character' which does not influence the work of the KTV host machine as a test tool interface signal at regular time through an mcu program of the touch chip, and transmitting the 'invalid character' on a link line in a mode similar to normal touch data.
A serial port test system comprises a TX port, a serial port interface and a signal processing module, wherein the TX port is used for connecting a TX signal line on the serial port interface so as to realize the transmission of information; the identification character sending module is used for sending a section of identification characters outwards from the TX signal wire periodically according to preset time by using a timer I; and the judging module is used for judging whether the identification characters are received and analyzed in a preset period, and judging whether the components from the touch chip to the TX three lines and in the transmission process are abnormal when the identification characters are not received or analyzed in the preset period.
As a further embodiment of the present application, the determining module further includes a cycle determining unit, configured to determine that there is an abnormality in the components in the transmission process and the three lines from the touch chip to the TX port when it is determined that the components in the transmission process and the three lines from the touch chip to the TX port are working normally and the touch screen is not touched really, and determine that there is an abnormality in the components in the transmission process and the three lines from the touch chip to the TX port when it is determined that the recognition character is not received or is not resolved in a preset period.
As a further embodiment of the present application, in the recognition character transmitting module, a specific recognition character transmitting unit is further included, which is configured to transmit the head recognition character as a test interface signal at a preset time timing, and transmit the test interface signal on the link line in a touch data manner, so that transmission of specific data can be achieved.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (7)

1. A serial port testing method is characterized by comprising the following steps:
s1, connecting a TX signal wire on the serial port interface;
s2, applying for a timer I in a main program of the touch chip, wherein the timer I sends a section of recognition characters outwards from the TX signal line periodically according to preset time;
s3, designing a serial port tool, judging whether the identification character is received and analyzed in a preset period when a serial port is plugged, if so, judging that the three lines from the touch chip to the TX port and the components in the transmission process work normally, and if not, judging that the three lines from the touch chip to the TX port and the components in the transmission process are abnormal.
2. The serial port testing method according to claim 1, wherein the step S3 further comprises the steps of: when the three lines from the touch chip to the TX port and the components in the transmission process are judged to work normally and the touch screen is not touched really, the steps S2-S3 are circulated, whether the recognition characters are received and analyzed is judged in a preset period, if yes, the three lines from the touch chip to the TX port and the components in the transmission process are judged to work normally, and if not, the three lines from the touch chip to the TX port and the components in the transmission process are judged to be abnormal.
3. The serial port test method according to claim 1, wherein the step S2 includes the steps of:
the main program of the touch chip sends head recognition characters as test interface signals at fixed time according to preset time, and the head recognition characters are transmitted on a link line in a touch data mode; the head recognition character is an invalid character.
4. The serial port testing method according to claim 1, wherein the time of the preset period is two times or more than two times of the preset time.
5. A serial port test system, comprising:
the TX port is used for connecting a TX signal line on a serial port interface;
the identification character sending module is used for sending a section of identification characters outwards from the TX signal wire periodically according to preset time by using a timer I;
and the judging module is used for judging whether the identification characters are received and analyzed in a preset period, and judging whether the components from the touch chip to the TX three lines and in the transmission process are abnormal when the identification characters are not received or analyzed in the preset period.
6. The serial port testing method according to claim 5, wherein the judging module further comprises a circulating judging unit, when it is judged that the three lines from the touch chip to the TX port and the components in the transmission process are working normally and the touch screen is not in an idle time of real touch, the circulating judging module judges that the components in the transmission process are abnormal when it is judged that the identification character is not received or analyzed in a preset period.
7. The serial port test method according to claim 5, wherein the identification character sending module comprises a specific identification character sending unit, which is used for sending the head identification character as a test interface signal according to a preset time timing, and transmitting the test interface signal on the link line in a touch data manner.
CN202111631876.2A 2021-12-29 2021-12-29 Serial port testing method and system Pending CN114579372A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111631876.2A CN114579372A (en) 2021-12-29 2021-12-29 Serial port testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111631876.2A CN114579372A (en) 2021-12-29 2021-12-29 Serial port testing method and system

Publications (1)

Publication Number Publication Date
CN114579372A true CN114579372A (en) 2022-06-03

Family

ID=81769789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111631876.2A Pending CN114579372A (en) 2021-12-29 2021-12-29 Serial port testing method and system

Country Status (1)

Country Link
CN (1) CN114579372A (en)

Similar Documents

Publication Publication Date Title
CN102759676B (en) Capacitive screen comprehensive testing circuit, testing method and output data switching algorithm of testing method
TW200707201A (en) Computer system and control method of the same
CN101110051A (en) Test approach for debugging serial port function with single board and system thereof
CN113285735A (en) Transponder transmission module capability test device
CN108563595B (en) System and method for long-distance transmission of USB data
CN101114249A (en) I2C bus testing apparatus of mainboard and method thereof
CN104112413A (en) LED display screen dead pixel point inspection system
CN101692105B (en) Device for real-time detecting product of production line of remote control
CN105095041A (en) Chip debugging method
CN1885272B (en) PS/2 interface detection apparatus and method
CN114579372A (en) Serial port testing method and system
CN102981675A (en) Multi-point touch data processing method and multi-point touch data processing system thereof
CN101661419A (en) Testing equipment with multiple testing ports and testing method thereof
CN1797488A (en) System and method for testing LCD unit
CN100346271C (en) Method and device for two-way communication between virtual PS/2 apparatus and host machine
CN101727421B (en) USB storage equipment and interface circuit thereof
CN103092358A (en) System and method for achieving full key non-conflict for keyboard
CN103207850B (en) The transmission system of heterogeneous device
CN102591739B (en) Method and device for aligning serial synchronous communication data
CN214333820U (en) Navigation equipment structure convenient to maintenance is replaced
CN105487948A (en) RS232 port test apparatus and test method
CN202710685U (en) Capacitive screen integration testing circuit
CN110943888B (en) Convenient full-function serial port detection method and device
CN113949654A (en) Test fixture for M.2 interface and use method thereof
CN114113977A (en) RTC circuit automatic detection method and system of circuit board

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240122

Address after: Room 409, 4th Floor, Building 1, No. 199 Weikang Road, Xiangzhou District, Zhuhai City, Guangdong Province, 519000

Applicant after: Zhuhai Hongpeihan Electronic Technology Co.,Ltd.

Country or region after: China

Address before: 2501, 2401, block a, building 1, Shenzhen new generation industrial park, 136 Zhongkang Road, Meidu community, Meilin street, Futian District, Shenzhen, Guangdong 518000

Applicant before: Shenzhen deminli Technology Co.,Ltd.

Country or region before: China