I am planning a forms based windows console application (C#) to communicate via serial coms with the UART on an ATMega. I have attached a TTL to USB interface module to the uC. When the interface module (4Dsystems) is plugged into the USB, the windows machine creates a COM port which is visible in the device manager and can be opened with serial.open() command. However, which COM port is opened is up to windows and what's available.
The problem is that the serial.open() commend expects the programmer to designate which COM port to open. Since the interface module is on the USB, I don't understand how the windows app knows which COM port has been opened.
So, the questions is: how does a windows application know which serial port to open to communicate with a new USB device?
The whole .NET C# thing is a new area for me, so please forgive my ignorance. I have googled the snot out of this without success.