Data Carrier Detect

Last updated

Data Carrier Detect (DCD) or Carrier Detect (CD) is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem. This signal is a simple "high/low" status bit that is sent from a data communications equipment (DCE) to a data terminal equipment (DTE), i.e., from the modem or other peripheral to a computer in a typical scenario. It is present on virtually all PC serial ports - pin 1 of a nine-pin (DE9) serial port, or pin eight over a 25-pin (DB25) port. Its purpose varies depending on the device connected, but the most specific meaning is to indicate when a modem is connected to another remote modem via telephone lines.

Contents

The word "carrier" is a reference to the analog carrier signal generated by a modem, which is modulated to carry the data. On a data modem, the carrier's loss equates to the connection's termination.

Much like the Ring Indicator signal, on a PC's serial port, changes to the DCD signal state can generate a hardware interrupt that can be captured by the processor any time the DCD signal changes state, preventing the PC from needing to constantly poll the pin.

As used on modems

DCD is very important on modems, as it is the computer's primary way to find out that the modem has lost its connection to the remote host. Aside from intentional disconnects, modems can lose their connection for a variety of reasons unexpectedly - such as the phone line being disconnected. It is possible to use a modem without the DCD signal, however the only way for the computer to know that a connection is disconnected is by the modem transmitting the words "NO CARRIER" over the data lines. Because the words "NO CARRIER" are also a message that could appear in the context of a normal data session (for example, if typed by a person on the remote end), there is no positive way for a computer program to differentiate the words being sent over the connection versus from the modem.

External modems with LED status lights usually have a light labeled "CD" (carrier detect). This status light is directly coupled with what the modem is sending the DCD line.

By default, when a modem is powered up, the DCD signal is deasserted. It is not asserted until the modem either makes an outgoing call, or answers an incoming call, and then connects with a data modem on the other end. The signal is asserted at the same time the modem reports its CONNECT message, and stays asserted until the call is disconnected (either intentionally or because of a fault in the line). DCD is deasserted once the local modem is no longer receiving carrier from the remote modem, regardless of which side initiated the disconnect. So long as the DCD signal is high, the computer can assume that any data coming from the modem was sent from the remote side.

Virtually all newer modems allowing the behavior of the DCD signal to be configured. Typical options available include "always assert DCD", "assert DCD only when connected", and "always assert DCD except immediately after sensing a disconnect".

The meaning of DCD differs when the modem is in fax or voice modes. In these modes, its importance is diminished.[ how? ]

As used with null modems

Frequent use of a serial port is for a direct computer-to-computer connection. This requires an adapter called a null modem, which isn't actually a modem in the traditional sense, but rather a connector plug that simply crosses the complementary pins on two serial ports so the two sides can communicate. A null modem typically connects the DTR output of each computer to both the DCD and DSR inputs of the other.

When used in this scenario, DCD is used to simply detect the presence and/or readiness of the other side to start a session. For example, on Windows PCs, the DTR output is kept low until some program is run to access the serial port and raise the DTR signal high. The remote side will sense this as the DCD input going high. Some equipment will recognize the transition alone as the beginning of a session. Other equipment (such as the console port of a router) may expect characters to be transmitted,[ clarification needed ] but the DCD signal high is still a prerequisite for every communication.[ clarification needed ]

PPS (Pulse per second) timing use

The serial DCD pin can be used to accurately detect a PPS signal, as described in RFC 2783: [1]

One convenient means to provide a PPS signal to a computer system is to connect that signal to a modem-control pin on a serial-line interface to the computer. The Data Carrier Detect (DCD) pin is frequently used for this purpose. Typically, the time-code output of the time source is transmitted to the computer over the same serial line. The computer detects a signal transition on the DCD pin, usually by receiving an interrupt and records a timestamp as soon as possible.

As used with other hardware

In Linux, each serial port is referenced by two device names - one being (for the first serial port) /dev/ttyS0 versus /dev/cua0. Although these both refer to the same physical port, one important distinction between the way Linux treats these two device names has to do with the DCD line. When ttyS0 is waited on in a system call, Linux assumes that since this device is for receiving telephone calls, it will put a process to sleep figuring that so long as DCD is low, there is nothing to do. When cua0 is used - as it is when placing telephone calls - Linux assumes that the software needs to access the port while DCD is low for the purpose of dialing the number, so this blocking behavior doesn't exist. Nevertheless, there is a control mode flag called CLOCAL which is what actually activates or deactivates this behavior, and by default, the flag is set for cua0 but not for ttyS0. An application that insists on using a "tty" port versus a "cua" port is an example of one that might require a jumper wire to force DCD high in order to work properly. [2]

Related Research Articles

<span class="mw-page-title-main">Peripheral Component Interconnect</span> Local computer bus for attaching hardware devices

Peripheral Component Interconnect (PCI) is a local computer bus for attaching hardware devices in a computer and is part of the PCI Local Bus standard. The PCI bus supports the functions found on a processor bus but in a standardized format that is independent of any given processor's native bus. Devices connected to the PCI bus appear to a bus master to be connected directly to its own bus and are assigned addresses in the processor's address space. It is a parallel bus, synchronous to a single bus clock. Attached devices can take either the form of an integrated circuit fitted onto the motherboard or an expansion card that fits into a slot. The PCI Local Bus was first implemented in IBM PC compatibles, where it displaced the combination of several slow Industry Standard Architecture (ISA) slots and one fast VESA Local Bus (VLB) slot as the bus configuration. It has subsequently been adopted for other computer types. Typical PCI cards used in PCs include: network cards, sound cards, modems, extra ports such as Universal Serial Bus (USB) or serial, TV tuner cards and hard disk drive host adapters. PCI video cards replaced ISA and VLB cards until rising bandwidth needs outgrew the abilities of PCI. The preferred interface for video cards then became Accelerated Graphics Port (AGP), a superset of PCI, before giving way to PCI Express.

<span class="mw-page-title-main">RS-232</span> Standard for serial communication

In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a DTE such as a computer terminal, and a DCE, such as a modem. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors. The current version of the standard is TIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997. The RS-232 standard had been commonly used in computer serial ports and is still widely used in industrial communication devices.

<span class="mw-page-title-main">Data terminal equipment</span> Communications system equipment

Data terminal equipment (DTE) is an end instrument that converts user information into signals or reconverts received signals. It is also called data processing terminal equipment. These can also be called tail circuits. A DTE device communicates with the data circuit-terminating equipment (DCE). The DTE/DCE classification was introduced by IBM.

<span class="mw-page-title-main">Serial port</span> Communication interface transmitting information sequentially

In computing, a serial port is a serial communication interface through which information transfers in or out sequentially one bit at a time. This is in contrast to a parallel port, which communicates multiple bits simultaneously in parallel. Throughout most of the history of personal computers, data has been transferred through serial ports to devices such as modems, terminals, various peripherals, and directly between computers.

<span class="mw-page-title-main">Parallel port</span> Computer interface

In computing, a parallel port is a type of interface found on early computers for connecting peripherals. The name refers to the way the data is sent; parallel ports send multiple bits of data at once, as opposed to serial communication, in which bits are sent one at a time. To do this, parallel ports require multiple data lines in their cables and port connectors and tend to be larger than contemporary serial ports, which only require one data line.

Loopback is the routing of electronic signals or digital data streams back to their source without intentional processing or modification. It is primarily a means of testing the communications infrastructure.

The Hayes command set is a specific command language originally developed by Dennis Hayes for the Hayes Smartmodem 300 baud modem in 1981.

GeoPort is a serial data system used on some models of the Apple Macintosh that could be externally clocked to run at a 2 Mbit/s data rate. GeoPort slightly modified the existing Mac serial port pins to allow the computer's internal DSP hardware or software to send data that, when passed to a digital-to-analog converter, emulated various devices such as modems and fax machines. GeoPort could be found on late-model 68K-based machines as well as many pre-USB Power Macintosh models and PiPPiN. Some later Macintosh models also included an internal GeoPort via an internal connector on the Communications Slot. Apple GeoPort technology is now obsolete, and modem support is typically offered through USB.

<span class="mw-page-title-main">Null modem</span> Serial cable connecting two computers

Null modem is a communication method to directly connect two DTEs using an RS-232 serial cable. The name stems from the historical use of RS-232 cables to connect two teleprinter devices or two modems in order to communicate with one another; null modem communication refers to using a crossed-over RS-232 cable to connect the teleprinters directly to one another without the modems. It is also used to serially connect a computer to a printer, since both are DTE, and is known as a Printer Cable.

The Parallel Line Internet Protocol (PLIP) is a computer networking protocol for direct computer-to-computer communications using the parallel port normally used for connections to a printer.

On POSIX-compliant platforms, SIGHUP is a signal sent to a process when its controlling terminal is closed. It was originally designed to notify the process of a serial line drop. SIGHUP is a symbolic constant defined in the header file signal.h.

In data communications, flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver. Flow control should be distinguished from congestion control, which is used for controlling the flow of data when congestion has actually occurred. Flow control mechanisms can be classified by whether or not the receiving node sends feedback to the sending node.

A terminal server connects devices with a serial port to a local area network (LAN). Products marketed as terminal servers can be very simple devices that do not offer any security functionality, such as data encryption and user authentication. The primary application scenario is to enable serial devices to access network server applications, or vice versa, where security of the data on the LAN is not generally an issue. There are also many terminal servers on the market that have highly advanced security functionality to ensure that only qualified personnel can access various servers and that any data that is transmitted across the LAN, or over the Internet, is encrypted. Usually, companies that need a terminal server with these advanced functions want to remotely control, monitor, diagnose and troubleshoot equipment over a telecommunications network.

In digital electronics, a tri-state or three-state buffer is a type of digital buffer that has three stable states: a high output state, a low output state, and a high-impedance state. In the high-impedance state, the output of the buffer is disconnected from the output bus, allowing other devices to drive the bus without interference from the tri-state buffer. This can be useful in situations where multiple devices are connected to the same bus and need to take turns accessing it. Systems implementing three-state logic on their bus are known as a three-state bus or tri-state bus.

In computer networking, DECserver initially referred to a highly successful family of asynchronous console server / terminal server / print server products introduced by Digital Equipment Corporation (DEC) and later referred to a class of UNIX-variant application and file server products based upon the MIPS processor. In February 1998, DEC sold its Network Products Business to Cabletron, which then spun out as its own company, Digital Networks, in September 2000.

<span class="mw-page-title-main">Novation CAT</span> Series of computer modems

Novation is an early modem manufacturer whose CAT series were popular in the early home computer market in the late 1970s and early 1980s, notably on the Apple II. The Hayes Smartmodem 300, introduced in 1981, helped kill off Novation and many other early modem companies over the next few years.

Command mode and Data mode refers to the two modes in which a computer modem may operate. These modes are defined in the Hayes command set, which is the de facto standard for all modems. These modes exist because there is only one channel of communication between the modem and the computer, which must carry both the computer's commands to the modem, as well as the data that the modem is enlisted to transmit to the remote party over the telephone line.

<span class="mw-page-title-main">NO CARRIER</span> Text message transmitted from a modem

NO CARRIER (capitalized) is a text message transmitted from a modem to its attached device, indicating the modem is not connected to a remote system.

Data Terminal Ready (DTR) is a control signal in RS-232 serial communications, transmitted from data terminal equipment (DTE), such as a computer, to data communications equipment (DCE), for example a modem, to indicate that the terminal is ready for communications and the modem may initiate a communications channel.

In telecommunications, RS-366, later known as EIA-366, defines a standard for serial communications between computers and an auto dialer, which is used to dial telephones. It was intended to be used to automate the operation of modems. The standard uses the same DB25 connectors and electrical signalling standards of the well-known RS-232 standard, which RS-366 was designed to support. The CCITT had a matching standard, V.25.

References

  1. Mogul, J.; Mills, D.; Brittenson, J.; Stone, J.; Windl, U. (March 2000). "Introduction". Pulse-Per-Second API for UNIX-like Operating Systems. IETF. p. 3. doi: 10.17487/RFC2783 . RFC 2783.
  2. Coldwell, Charles Terminal concepts in GNU/Linux Archived 2008-04-29 at the Wayback Machine

See also