Laser Pointer User Manual

Chapter 4 Using Your Serial Hardware
© National Instruments Corporation 4-3 PCMCIA Serial for Windows Me/9x
Two-Wire Mode: TXRDY Auto Control
In this mode, the serial hardware transparently enables the transmitter and
receiver in a two-wire system. Use this mode to remove the burden of flow
control from your application. By connecting the transmitter to the
TXRDY
(Transmit Ready) line, the hardware enables the transmitter for
each byte to be transmitted. Also, the hardware disables the receiver
whenever the transmitter is enabled, so you do not receive the packets sent
from your transmitter.
Note
When you are communicating with a two-wire device, National Instruments
recommends that you use the two-wire TXRDY
auto control mode. Because this mode
handles the transmitter/receiver enabling for a two-wire connection in your hardware,
it reduces the software overhead required to perform this operation in your application
program.
For more information about serial communication in two- or four-wire modes, refer to the
Serial Communication Issues section in Appendix A, Serial Port Information.
Setting the Transceiver Control Mode
The recommended method for setting the transceiver control mode is
with the serial configuration utility located in the Windows Me/9x
Device Manager. For more information, refer to the View or Change
Communication Port Settings section in Chapter 3, Configuration.
The mode you select in the Device Manager is automatically configured
when you open a port on a serial interface. You can also set the hardware
transceiver control mode from within a DOS application. For each port you
want to control, write the control byte for the mode you want to select to
the scratch register of the UART. Table 4-2 shows the control bytes for
each mode.
Table 4-2.
Transceiver Mode Control Bytes
Transceiver Mode Control Byte
Four-wire mode 0x00
Two-wire mode: DTR with echo 0x01
Two-wire mode: DTR controlled 0x02
Two-wire mode: TXRDY auto control 0x03