C/C++ RS232 programming
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: C/C++ RS232 programming

  1. #1
    Join Date
    Dec 2008
    Posts
    8

    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!

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: C/C++ RS232 programming

    2 seconds of Google. Windows has more than 1 RS232 function. Communications Functions.

  3. #3
    Join Date
    Feb 2005
    Posts
    2,160

    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

  4. #4
    Join Date
    Dec 2008
    Posts
    8

    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.

  5. #5
    Join Date
    Nov 2003
    Posts
    1,797

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center