Chapter6 UsingYour Serial Hardware
SerialHardware and Software for Windows 6-2 ni.com
Note Signaln ameswith an overscore, such as DTR, indicate that the signal is active low.
Four-Wire Mode
Use the four-wire mode for most full-duplex systems. In this mode, the
transmitterand receiver are always enabled. This mode is the default.
Two-WireMode: DTR with Echo
Use this mode in half-duplex systems where the DTR (Data Terminal
Ready)line mustcontrol thetransmi tter. In the DTR-with-echo mode, the
transmitter is tri-stated when the DTR signal of the UART (Universal
Asynchronous Receiver/Transmitter) is asserted. To transmit, your
applicationmust first clear the DTR bit to enable the t ransmitter. After the
data is fully transmitted, your application once again sets the DTR bit to
disablethe transmitter. Because the receiver is always enabled in this
mode,you not only receive packets from other devices, you also receive the
packets sent from your transmitter.
Two-WireMode: DTR Controlled
Thismode is similar to the two-wire, DTR-wit h-echo mode. Use this mode
in half-duplex systems where the DTR line must control the transmitter.
Although this mode uses the same method as the DTR-with-echo mode to
controlt he transmitter, the hardware automatically disables the receiver
wheneverthe t ransmitter is enabled. Thus, you do not receive the packets
sent from your transmitter.
Table6-1. Transceiver Control Modes
Mode Transmitter Receiver
Four-wiremode Alwaysenabled Always enabled
Two-wiremode:
DTR with echo
Enabled with
DTRunasserted
Alwaysenabled
Two-wiremode:
DTR controlled
Enabled with
DTRunasserted
Enabled with
DTRasserted
Two-wiremode:
TXRDYauto control
Enabled with
TXRDYasserted
Enabled with
TXRDYunasserted