Using two serial ports simultaneously

I want to use two serial ports simultaneously.
A few weeks ago, I wrote a program using single com port.
It it same ?
gripperAsked:
Who is Participating?
 
stefanrConnect With a Mentor Commented:
Yes, it is the same. Use a thread for each of the ports for reading. You can, but you don't have to, have another thread for writing as well (on each port). The simplest is to create a class that handles a single port, and let that class start the thread(s) that reads the port it handles. Then you only have to create an instance for each of the ports you want to use. I assume you are using the WIN32 CreateFile, ReadFile, WriteFile, etc. functions.
0
 
gripperAuthor Commented:
Thanks for your concern.
I'll try it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.