This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How is DSR toggled programmatically?

I am new to this, so excuse me if I sound ignorant ...

How can DSR signal be asserted/deasserted on serial port programmatically using Win32 API's? I know that EscapeCommFunction() can be used to assert/deassert DTR... Does asserting DTR implicitly deassert DSR? Is this how DSR state is toggled?

Thanks,
Ruchika

  • From the COMM port end that is controlled by the Win32 API the DTR and the RTS are outputs that software commands can be given to cause them to be asserted or de-asserted. However, the DSR and likewise the CTS signals are inputs. As such the levels on these signals can only be monitored and not asserted or de-asserted by the Win32 API or any other software in the PC. In order to be able to get the DSR and/or the CTS signals to change levels such that the PC software can note the current levels and see the changes it is necessary to get the external connections to the RTS and CTS inputs to change state. For that state change to occur you are going to have to follow the wire from your DSR input and trace to where it is connected. Then maybe you can bribe or force the device connected to the wire to do something about swinging these signals up and down.
    Michael Karas

  • "I am new to this, so excuse me if I sound ignorant ..."

    Ignorance can easily be cured by learning!

    Unfortunately, there is an awful lot of misinformation about RS232 on the web; eg, see http://www.8052.com/forum/read.phtml?id=46426

    If you are serious about understanding RS-232, then you must obtain a copy of the official standard - and read it!
    See http://www.8052.com/forum/read.phtml?id=24916
    Then you will be able to sort the wheat from the chaff!