Serial dtr pin
All trademarks and service marks are the properties of their respective owners. Skip to main content. Search form Search.
Request new password. Submitted by Rahul. Sreedharan on 25 December - am. In the previous tutorial , we learned about communicating with the serial port reading and writing using Win 32 API. Sourcecodes Please note that the source codes on the website show only the relevant sections to highlight the process of programming the serial port.
EscapeCommFunction takes two arguments, first one is the handle of the opened serial port and the other one is DWORD representing the Extended function to be performed. Win32 API. Serial Programming. Log in to post comments. There are good reasons why it works this way. One reason is that the signals are unidirectional.
If pin 2 sends a signal out of it but is unable to receive any signal then obviously you can't connect it to pin 2 of the same type of device. If you did, they would both send out signals on the same wire to each other but neither would be able to receive any signal. There are two ways to deal with this situation. One way is to have a two different types of equipment where pin 2 of the first type sends the signal to pin 2 of the second type which receives the signal.
There's a second way to do this without having two different types of equipment: Connect pin sending pin 2 to a receiving pin 3 on same type of equipment. The cable used for this is called a null-modem cable since it connects two PCs without use of a modem. A null-modem cable may also be called a cross-over cable since the wires between pins 2 and 3 cross over each other if you draw them on a sheet of paper.
The above example is for a 25 pin connector but for a 9-pin connector the pin numbers 2 and 3 are just the opposite. The serial pin designations were originally intended for connecting a dumb terminal to a modem.
Today the PC is usually used as DTE instead of a terminal but real terminals may still be used this way. The transmit pin from the PC transmits to the "transmit" pin of the modem but actually the modem is receiving the data from this pin so from the point of view of the modem it would be a receive pin. The serial port was originally intended to be used for connecting DTE to DCE which makes cabling simple: just use a straight-thru cable.
Thus when one connects a modem one seldom needs to worry about which pin is which. But people wanted to connect DTE to DTE for example a computer to a terminal and various ways were found to do this by fabricating various types of special null-modem cables.
In this case what pin connects to what pin becomes significant. This is "hardware" flow control. Flow control was previously explained in the Flow Control subsection but the pins and voltage signals were not. Flow control signals are always sent in a direction opposite to the flow of bytes that is being controlled.
On what pins is this stop signal received? For DCE-DTE it's a straight-thru connection so obviously the signal is received on a pin with the same name as the pin it's sent out from. Such a cable with other signals crossed over as well is called a "null modem" cable. See Cabling Between Serial Ports.
0コメント