Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have one application and that communicates with device on COM port.
Now this application required one RS485 to RS232 converter and one brainbox (connect to PC's USB port).

My question is do I write a c++ program to remove convertor dependency and directly connect to PC.

Please guide me on this.
I am very new in this concept don't know much about this.
Posted
Comments
Sergey Alexandrovich Kryukov 3-Mar-15 0:44am    
Do you mean the program controlling 3D printer, to just print out a converter? :-)
—SA
Member 11379036 3-Mar-15 0:50am    
No.
I have one hardware device which communicated with one C++ application.
But for communication setup required one RS485 to RS232 converter and one brainbox.
But these hardware needs a maintenance cost so my question is do I write a c++ program to remove these hardware dependency.

1 solution

This is not a software problem. EIA-485, EIA-232, and USB are all serial interfaces. At the software side you usually have a COM port. Accessing the port will not differ for a specific device. There are two options to reduce the amount of external hardware:

  • Use an EIA-485 interface card
  • Use an EIA-485 to USB converter

Both should come with drivers that install a new COM port (like the one of your 'brain box' which is an EIA-232 to USB converter). There should be no software changings necessary when opening the new COM port.
 
Share this answer
 
Comments
Albert Holguin 3-Mar-15 10:50am    
How do I convert serial to serial using completely different voltage levels and pin outs in C++? ...yeah, good luck... +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900