CN104156295A - Multi-channel serial port testing system and establishing method - Google Patents
Multi-channel serial port testing system and establishing method Download PDFInfo
- Publication number
- CN104156295A CN104156295A CN201410405064.XA CN201410405064A CN104156295A CN 104156295 A CN104156295 A CN 104156295A CN 201410405064 A CN201410405064 A CN 201410405064A CN 104156295 A CN104156295 A CN 104156295A
- Authority
- CN
- China
- Prior art keywords
- serial
- serial port
- single chip
- test
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 130
- 238000000034 method Methods 0.000 title claims abstract description 16
- 238000004088 simulation Methods 0.000 claims abstract description 8
- 238000004891 communication Methods 0.000 description 9
- 230000008676 import Effects 0.000 description 8
- 238000004458 analytical method Methods 0.000 description 6
- 238000010998 test method Methods 0.000 description 5
- 230000018109 developmental process Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000007794 visualization technique Methods 0.000 description 2
- 241000588769 Proteus <enterobacteria> Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Provided are a multi-channel serial port testing system and an establishing method. A serial port bridge and a multi-channel serial port testing module are added between a serial port debugger and a PC in a conventional serial port testing system, and the system comprises a master control single chip microcomputer circuit, a data bus and a channel single chip microcomputer circuit. The serial port debugger is connected with one serial port of the serial port bridge, the other serial port of the serial port bridge is connected with a serial port of the master control single chip microcomputer circuit, the master control single chip microcomputer circuit is connected with the channel single chip microcomputer circuit through a data bus, and a serial port of the channel single chip microcomputer circuit is connected with a serial port of the PC. The establishing method comprises the steps of establishing the multi-channel serial port testing module in a single chip microcomputer simulation platform, establishing program of the multi-channel serial port testing module in a single chip microcomputer software development platform and establishing the serial port bridge in the PC. By means of the system and the establishing method, a multi-channel serial port testing function, a testing instruction and testing result generation function and a testing result direct displaying function can be achieved, and the testing demands of embedded engineers based on serial ports can be met.
Description
Technical field
The present invention relates to a kind of multichannel serial test macro and building method, based on single chip circuit emulation technology, belong to embedded system development technical field, be specially adapted to embedded slip-stick artist and build and operate the multiple channel test based on serial ports, comprise multichannel serial test macro and building method.
Background technology
Serial ports test macro based on PC as shown in Figure 1, comprises AccessPort device, PC serial ports and tested object at present, and wherein AccessPort device comprises data transmit operation district and display field.Method of testing is as follows: data transmit operation district input test order in AccessPort device, directly send test command to tested object by PC serial ports, tested object directly sends test response to AccessPort device by PC serial ports, and in AccessPort device, display field shows test response.
If the test command kind sending is many, order data is long, or when the test response receiving is many, the transmit operation of test command is just cumbersome and easily make mistakes, the manual analysis of test response is just more difficult and expend time in, and all needs manual intervention in whole process.If multichannel serial test is carried out simultaneously, need to open multiple AccessPort devices simultaneously, the transmission of test command and the demonstration of test response, just analyze problem especially.
Address this problem, current solution is for concrete test, adopt the visualization techniques such as VisualBasic, VisualC or LabVIEW to write test interface and multichannel serial test procedure, realize test interface and send easily-testing order, directly show test results, and analyze easily-testing order by multichannel serial test procedure, generate complicated actual test command and send, receive test response and resolve, generating test result.But for embedded design slip-stick artist, write test interface and multichannel serial test procedure has certain difficulty with visualization techniques such as VisualBasic, VisualC or LabVIEW.
As shown in Figure 2, multichannel serial test macro is on the basis of Fig. 1, to have increased serial port bridging device and multichannel serial test module, the test command that in AccessPort device, data transmit operation district sends is like this no longer directly to export by PC serial ports, but import to multichannel serial test module by serial port bridging device, then export by PC serial ports; Same, the test response of inputting by PC serial ports is also first by after multichannel serial test module, then imports to AccessPort device by serial port bridging device and show.Multichannel serial test module has not only been realized the function of multichannel serial test procedure, and serial ports is output as hyperchannel.
If the technology that multichannel serial test module adopts embedded slip-stick artist to grasp realizes, also soluble multichannel serial test problem.
A kind of multichannel serial test macro building method, basic thought is as follows: (1) builds multichannel serial test module in one-chip machine simulation platform.This multichannel serial test module energy Realization analysis easily-testing order, generates complicated actual test command and sends by PC serial ports, can be received test response and be resolved by PC serial ports simultaneously, generates test result; Inside modules adopts data bus, realizes multichannel serial interface; (2) in scm software development platform, build the multichannel serial test module program of surveying.Adopt the familiar Single Chip Microcomputer (SCM) program of embedded slip-stick artist to realize, according to different tests, only need to revise Single Chip Microcomputer (SCM) program; (3) in PC, build serial port bridging device.Can pass through a pair of serial ports of virtual serial port virtual technology, or a pair of serial data transmitting-receiving pin cross connection of PC, realize serial port bridging function.By serial port bridging device, the easily-testing order that AccessPort device is sent imports in multichannel serial test, and the test result simultaneously single chip circuit being generated imports to AccessPort device, is directly shown test results by AccessPort device.
Wherein, tested to as if there is the embedded system of serial communication function.
Summary of the invention
The object of this invention is to provide a kind of multichannel serial test macro and building method, be convenient to embedded slip-stick artist and build and use.
According to an aspect of the present invention, provide a kind of multichannel serial test macro, system comprises AccessPort device, serial port bridging device, main control singlechip circuit, passage single chip circuit, data bus and PC serial ports;
Described multichannel serial test macro circuit model is as shown in 3; In described system, AccessPort device is connected with a serial ports of serial port bridging device, another serial ports of serial port bridging device is connected with the serial ports of main control singlechip circuit, main control singlechip circuit is connected by data bus with passage single chip circuit, and the serial ports of passage single chip circuit is connected with PC serial ports;
Described AccessPort device is used for sending test command and shows test results; Described serial port bridging device imports to main control singlechip circuit for the test command that AccessPort device is sent, and test result is imported in AccessPort device from main control singlechip circuit simultaneously; Test command analysis that described main control singlechip circuit imports for receiving serial port bridging device, by data bus, test command is sent to corresponding passage single chip circuit, the test result that receiving cable single chip circuit sends by data bus simultaneously, sends to serial port bridging device test result; Test command analysis that described passage single chip circuit sends by data bus for receiving main control singlechip circuit, generate actual test command and send by PC serial ports, receive test response by PC serial ports simultaneously, after analyzing, generate test result, send to main control singlechip circuit by data bus; Described data bus is for realizing the communication connection between main control singlechip circuit and multiple passage single chip circuit, two-way communication; Described PC serial ports is used for the communication connection with tested object.
Wherein, AccessPort device refers to have all kinds of AccessPort softwares that sent data and received data and show by PC serial ports, comprises general COM Debug Assistant etc.
According to second of the present invention, a kind of multichannel serial test macro building method is also provided, described building method comprises:
(1) in one-chip machine simulation platform, build multichannel serial test module;
In one-chip machine simulation platform, build multichannel serial test module, module is connected to form by data bus by main control singlechip circuit and multiple passage single chip circuit; The single-chip microcomputer that in module, single chip circuit adopts has at least one serial ports, the microcontroller serial port of single chip circuit is for communicating by letter with serial port bridging device, the microcontroller serial port of passage single chip circuit is for being connected with PC serial ports, and the single-chip microcomputer that main control singlechip circuit and passage single chip circuit adopt can adopt identical single-chip microcomputer; Data bus can adopt UART, IIC and SPI etc., increases and decreases passage single-chip microcomputer single channel according to the needs of test channel, and multiple passage single chip circuits are identical;
(2) in scm software development platform, build the program of multichannel serial test module;
In scm software development platform, build the program of multichannel serial test module, program comprises the primary control program of main control singlechip circuit and the channel program of passage single chip circuit; Primary control program comprises serial data transmitting-receiving, passes through data bus data transmit-receive and test command routine analyzer, realize main control singlechip circuit and receive test command by serial ports, send test result, analytical test order, by data bus, test command is sent to respective channel single chip circuit, the test result that receiving cable single chip circuit sends simultaneously; Channel program can be identical, can be not identical according to the test request of respective channel yet, all comprise by data bus data transmit-receive, test command generation, test result and generating and serial data transmitting/receiving program, realize passage single chip circuit and receive test command by data bus, send test result, generate test command and test result, send test command and receive test response by serial ports simultaneously;
(3) in PC, build serial port bridging device;
In PC, can pass through a pair of serial ports of virtual serial port virtual technology, or a pair of serial data transmitting-receiving pin cross connection of PC, realize serial port bridging function.By serial port bridging device, the easily-testing order that AccessPort device is sent imports in multichannel serial test module, and the test result simultaneously multichannel serial test module being generated imports to AccessPort device, is directly shown test results by AccessPort device.
The invention has the beneficial effects as follows, build multichannel serial test macro to embedded slip-stick artist new method is provided, the circuit model of being convenient to build is also provided.
Brief description of the drawings
Below in conjunction with drawings and Examples, the present invention is further described.
Fig. 1 is the schematic diagram of serial ports test macro.
Fig. 2 is the schematic diagram of multichannel serial test macro.
Fig. 3 is circuit model figure of the present invention.
Fig. 4 is the circuit model figure of the embodiment of the present invention.
Embodiment
Build the circuit model of an embodiment of the present invention according to multichannel serial test macro building method, as shown in Figure 4, specific as follows in the embodiment of the present invention:
AccessPort device is COM Debug Assistant 10, serial port bridging device is virtual serial port 20, one-chip machine simulation platform adopts Proteus, the main control singlechip circuit 40 of setting up adopts AVR single-chip microcomputer 42 and serial ports element 41, and data bus adopts iic bus 50, and passage single chip circuit 60 is to 6N, each passage single chip circuit is identical, passage single chip circuit 6i adopts AVR single-chip microcomputer 6i1 and serial ports element 6i2, and PC serial ports 70, to 7N, directly adopts the serial ports carrying in PC;
COM Debug Assistant 10 can send test command and show test results;
Virtual serial port 20 comprises a pair of virtual serial port A 21 and virtual serial port B 22, the virtual serial port with bridging functionality of setting up at PC by virtual serial port software, COM Debug Assistant 10 communicates to connect with virtual serial port A 21, virtual serial port A 21 and virtual serial port B 22 communicate to connect, and virtual serial port B 22 communicates to connect with the serial ports element 41 in main control singlechip circuit 40.Pass through like this virtual serial port 20, the communication connection of serial ports element 41 in COM Debug Assistant 10 foundation and main control singlechip circuit 40;
The serial ports of AVR single-chip microcomputer 42 communication connection with virtual serial port 20 by 41 foundation of serial ports element in main control singlechip circuit 40, COM Debug Assistant 10 is set up and is connected with the serial communication of main control singlechip circuit 40 like this, and AVR single-chip microcomputer 42 establishes a communications link with passage single chip circuit 6i by iic bus 50;
The serial ports of AVR single-chip microcomputer 6i1 communication connection with PC serial ports by serial ports element 6i2 foundation in passage single chip circuit 6i.
The present embodiment job step is as follows:
(1) send multiple channel test order
COM Debug Assistant 10 sends by virtual serial port 20 test command that comprises channel number, by virtual serial port 20, test command is imported in serial ports element 41, main control singlechip circuit 40 receives test command by serial ports element 41, analyze and obtain channel number i, by iic bus 50, test command is sent to AVR single-chip microcomputer 6i1 in passage single chip circuit 6i, the order of AVR single-chip microcomputer 6i1 analytical test, generate actual test command, through respective channel serial ports element, 6i2 sends to tested object actual test command by PC serial ports 7i;
(2) show multiple channel test result
Receive test response by PC serial ports 7i, imported in AVR single-chip microcomputer 6i1 by serial ports element 6i2 in passage single chip circuit 6i, AVR single-chip microcomputer 6i1 analyzes the test response receiving, generate test result, send to the AVR single-chip microcomputer 42 in main control single chip circuit 40 by iic bus 50, AVR single-chip microcomputer 42 adds channel number to test result, send to virtual serial port 20 by serial ports element 41, by virtual serial port, the test result with channel number is imported to COM Debug Assistant, serial ports assistant shows with the good test result of channel number.
Claims (3)
1. a multichannel serial test macro, is characterized in that, system comprises AccessPort device, serial port bridging device, main control singlechip circuit, passage single chip circuit, data bus and PC serial ports;
Described system AccessPort device is connected with a serial ports of serial port bridging device, another serial ports of serial port bridging device is connected with the serial ports of main control singlechip circuit, main control singlechip circuit is connected by data bus with passage single chip circuit, and the serial ports of passage single chip circuit is connected with PC serial ports.
Wherein, AccessPort device refers to have all kinds of AccessPort softwares that sent data and received data and show by PC serial ports, comprises general COM Debug Assistant etc.
2. a kind of multichannel serial test macro according to claim 1, is characterized in that, described main control singlechip circuit, passage single chip circuit and data bus are based on one-chip machine simulation platform building.
3. a multichannel serial test macro building method, is characterized in that, described building method comprises:
(1) in one-chip machine simulation platform, build multichannel serial test module;
In one-chip machine simulation platform, build multichannel serial test module, module is connected to form by data bus by main control singlechip circuit and multiple passage single chip circuit, and multiple passage single chip circuits are identical; The single-chip microcomputer that in module, single chip circuit adopts has at least one serial ports, in main control singlechip circuit and passage single chip circuit, can adopt identical single-chip microcomputer;
(2) in scm software development platform, build the program of multichannel serial test module;
In scm software development platform, build the program of multichannel serial test module, program comprises the primary control program of main control singlechip circuit and the channel program of passage single chip circuit; Primary control program comprises serial data transmitting-receiving, passes through data bus data transmit-receive and test command routine analyzer; Channel program can be identical, can be not identical according to the test request of respective channel yet, and all comprise by data bus data transmit-receive, test command generation, test result and generating and serial data transmitting/receiving program;
(3) in PC, build serial port bridging device;
In PC, build serial port bridging device, serial port bridging utensil has a pair of serial ports, the data transmit-receive pin cross connection of a pair of serial ports.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410405064.XA CN104156295A (en) | 2014-08-18 | 2014-08-18 | Multi-channel serial port testing system and establishing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410405064.XA CN104156295A (en) | 2014-08-18 | 2014-08-18 | Multi-channel serial port testing system and establishing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104156295A true CN104156295A (en) | 2014-11-19 |
Family
ID=51881800
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410405064.XA Pending CN104156295A (en) | 2014-08-18 | 2014-08-18 | Multi-channel serial port testing system and establishing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104156295A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104765573A (en) * | 2015-04-10 | 2015-07-08 | 中国船舶重工集团公司第七一0研究所 | Serial communication data processing analysis method |
CN105450301A (en) * | 2015-12-23 | 2016-03-30 | 安阳工学院 | Short-distance LED (Light-Emitting Diode) visible light transmission device |
CN113868063A (en) * | 2021-09-30 | 2021-12-31 | 中国电子科技集团公司第五十八研究所 | Multi-board card multi-channel serial port card verification method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5875293A (en) * | 1995-08-08 | 1999-02-23 | Dell Usa, L.P. | System level functional testing through one or more I/O ports of an assembled computer system |
CN201177812Y (en) * | 2008-01-03 | 2009-01-07 | 广州视源电子科技有限公司 | Serial port debugging tool |
-
2014
- 2014-08-18 CN CN201410405064.XA patent/CN104156295A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5875293A (en) * | 1995-08-08 | 1999-02-23 | Dell Usa, L.P. | System level functional testing through one or more I/O ports of an assembled computer system |
CN201177812Y (en) * | 2008-01-03 | 2009-01-07 | 广州视源电子科技有限公司 | Serial port debugging tool |
Non-Patent Citations (2)
Title |
---|
李全利: "《单片机原理及应用(第2版)》", 31 March 2014, 清华大学出版社 * |
陈海霞等: "基于PROTEUS的单片机串口通信的实例设计与仿真", 《科技信息》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104765573A (en) * | 2015-04-10 | 2015-07-08 | 中国船舶重工集团公司第七一0研究所 | Serial communication data processing analysis method |
CN105450301A (en) * | 2015-12-23 | 2016-03-30 | 安阳工学院 | Short-distance LED (Light-Emitting Diode) visible light transmission device |
CN113868063A (en) * | 2021-09-30 | 2021-12-31 | 中国电子科技集团公司第五十八研究所 | Multi-board card multi-channel serial port card verification method and system |
CN113868063B (en) * | 2021-09-30 | 2024-05-14 | 中国电子科技集团公司第五十八研究所 | Verification method and verification system for multi-board multi-channel serial port card |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN206400286U (en) | A kind of test system based on hardware in loop equipment | |
CN104503424A (en) | New energy automobile overall controller and battery controller joint test system | |
CN103925853B (en) | A kind of carrier rocket ground testing system device | |
CN104699068A (en) | Universal simulator for aircraft engines | |
CN104076814A (en) | Automobile ECU measurement system based on hardware-in-loop simulation | |
CN107272663A (en) | A kind of quick checking device of 1553B bus types servo-drive system test equipment | |
CN107819647B (en) | Intelligent substation station control layer network tester | |
CN108958225A (en) | Npp safety grade DCS platform intergration test device | |
CN104156295A (en) | Multi-channel serial port testing system and establishing method | |
CN208421628U (en) | Multiplexing automatic testing stand based on virtual instrument | |
CN104009882A (en) | Equivalent satellite power supply system testing method and system based on distributed architecture | |
CN206411509U (en) | Vehicle multi-controller emulation test system | |
CN108519936B (en) | Verification system and method for data transmission bus of effective load subsystem | |
CN112052593A (en) | Battery operation characteristic and fault simulation operation platform and operation method thereof | |
CN106324555A (en) | General virtual electric energy meter for electric energy meter data acquisition terminal test system | |
CN107632910A (en) | A kind of method of testing and device | |
CN203689146U (en) | New energy vehicle battery management system master and slave control board hardware-in-the-loop test system | |
CN204347152U (en) | A kind of Multi-bus circuit board test diagnosis system | |
CN104375422A (en) | Emulation system based on STATCOM controller | |
CN204515525U (en) | A kind of controller of new energy automobile and battery controller combined test system | |
CN207022047U (en) | One kind supports the wireless emulation debugging system of high in the clouds multiuser to remotely | |
CN110008630A (en) | Underwater unmanned vehicle cluster emulation platform | |
CN104022933A (en) | Vehicle bus debugging system based on multi-mode signal conversion | |
CN103246607B (en) | The emulation test method of aerial camera address bit pattern communication interface | |
CN204013555U (en) | A kind of interchangeability testing apparatus of power information acquisition terminal telecommunication unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20141119 |