SComm32 Communications OCX



. Break
. CDHolding
. Commevent
. CommName
. CommPort
. CTSHolding
. DSRHolding
. DTREnable
. EOFChar
. EOFEnable
. EvtChar
. EvtCharEnable
. Handshaking
. InBufferCount
. InBufferSize
. Input
. InputLen
. InputMode
. NullDiscard
. OutBufferCount
. OutBufferSize
. Output
. OverlappedIO
. ParityReplace
. PortOpen
. Read
. RThreshold
. RTSEnable
. Settings
. SThreshold

OnComm Event
Hardware/Cables etc
Loopback Test Plug

RS232 Cables

There are primarily two types of device. (1) Data Terminal Equipment (DTE) and (2) Data Communications Equipment (DCE)

DTE - Computers, printers, barcode readers, measuring, manufacturing machinery, robotics etc. These are 'Terminal' or 'End' devices doing the sending or receiving as well as processing of data.

DCE - Modems, repeaters, routers, line drivers etc. These devices are in the middle of a link and are responsible for carrying the data from one DTE to the other.

The cable diagrams on this page will assume that you're connecting DTE devices directly to each other without using a modem. This would be referred to as a 'Null Modem' cable or 'Crossover' cable. The wires are crossed alowing two DTE devices to connect to each other without a modem or other communications device.

9pin to 9pin
See also [ 9-to-25pin ] - [ 25-to-25pin ]

The simplest cable only requires 3 wires. It carries the 2 data lines and the common/signal ground. You'll see that the Transmit (TxD) pin on one port is connected to the Receive (RxD) pin on the other. This cable is fine for situations where no flow control is required or where you intend to use only XOnXOff flow control. With this simplest of cables the Com port properties RTSEnable, DTREnable, CTSHolding etc will, of course, have no effect.

If you do wish to use RTS/CTS flow control or when you need the ability to change or detect changes in the RTS/CTS control lines then you will also need to connect the RTS and CTS pins as shown below.

If you wish to change the state of DTR or detect changes in the DSR control line then you will also need to make the connections shown below.


When DTR/DSR is connected like this then when one RS232 device sets its DTR line ON (DTREnable = True) then the other device would instantly detect that as a change in the state of its DSRHolding property. Many RS232 devices use this method to detect when the other device is connected and switched on ready to communicate.