Serial port programming one: Virtual serial port VSPM solves serial port programming problems

The serial port debugging software UartAssist.exe and the virtual serial port software VSPM can solve the problem of no hardware debugging during serial port programming. Virtually export the serial port device through VSPM, allowing the program to send information to the VSPM device and directly echo the information through UartAssist.exe. Conveniently debug serial communication programs.


UartAssist download: http://download.csdn.net/detail/zh405123507/4198012

VSPM virtual serial port download:  http://download.csdn.net/detail/zh405123507/4198013


Virtual serial port software VSPM can use software to virtualize multiple serial ports on a computer, which appear to the machine as hardware. And can be set as upper computer or lower computer. However, virtualizing a single serial port cannot achieve the debugging effect. We need to connect the two virtual serial ports, one as the sending end of the program written by ourselves, and the other as the receiving end of the serial port debugging software, so that the program is sent from the sending end. The message can be displayed from the receiving end, and the effect is clear at a glance. As shown below:




After installing VSPM, click VSPM -> Virtual Serial Port Interconnect Plug-in in the start menu, and then overwrite the vspm.ini file in the directory to the program root directory. Remember to back up the original file. At this time, if you start VSPM again, COM3-COM4 will be connected and COM5-COM6 will be connected.




Run two UartAssists, set them to COM5 and COM6 respectively, uncheck "Hex Display", and then send messages to each other to test.




At this time, write a program to send messages to and from COM5, and then you can monitor on COM6. 


===================================

This article comes from: http://blog.csdn.net/zh405123507

tags: serial port serial port programming virtual serial port COM VSPM



Guess you like

Origin blog.csdn.net/zh405123507/article/details/7424877