-
June 9th, 2009, 08:07 AM
#1
C/C++ RS232 programming
Does anyone know how to set DSR and DCD high or low in windows? It seems windows only provides the facility to retrieve like GetCommModemStatus but not setting these two flags.
Thanks very much!
-
June 9th, 2009, 08:11 AM
#2
Re: C/C++ RS232 programming
2 seconds of Google. Windows has more than 1 RS232 function. Communications Functions.
-
June 9th, 2009, 08:14 AM
#3
Re: C/C++ RS232 programming
Check out the EscapeCommFunction() function in the platform SDK.
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/devio/base/escapecommfunction.htm
-
June 9th, 2009, 09:57 AM
#4
Re: C/C++ RS232 programming
Thanks for quick response. Escape function only does RTS and DTR but not DCD or DSR. Also, I cant find any function in Communications Functions will do.
-
June 9th, 2009, 10:52 AM
#5
Re: C/C++ RS232 programming
See pinout chart here: http://en.wikipedia.org/wiki/RS-232#Pinouts
In the "Origin" column, the "DTE" is the PC and "DCE" is whatever your PC is connected to. If there isn't a dot under the "DTE" column, then that pin is read-only.
gg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|