Electronic – Virtual port for serial communication

serial

This s a newbie question.

When receiving serial data from a microcontroller by a PC program I need the microcontroller to be nearby and it needs to be connected to a USB port and send the data via this USB port to the PC program.

But I want to send and test a PC program by a virtual port program which sends data to a specified port without a microcontroller is around. So one can test the received data by a PC program without an actual device sending data to the PC.

How is it done? Is there such emulator program electrical engineers use?

I know how to use hyperTerminal but it is used for sending or receiving data from a real device like a microcontroller.

Best Answer

I have used Com0COM

But, there is nothing wrong with getting two USB serial adaptors and connecting them with a null-modem plug. (from the same place that sells the usb-serial). The Com0COM / Virtual serial port can take 10x longer to actually get working sometimes, and you just wish you had used wires (which are also a cross-platform solution)

If you are using binary data, Realterm may be more useful than hyperterm. It is good for sending your test data, and displaying binary data.

If your task is along the data collection lines, then you might consider making your program capture serial data to file, and process data from the file. This makes development very easy, and when there are problems, it is very easy to debug as the serial comms has always been captured in a file.

Related Topic