
3
–
2
of the receiver and parallel-to-serial conversion of the transmitter remain the same in all modes. Some features are
available in all modes, but are only applicable in certain modes. For instance, software flow control via Xoff/Xon
characters can be used in all modes, but would usually only be used in RS-232 or IrDA mode because the RS-485
mode is half-duplex communication. Similarly, hardware flow control via RTS/CTS (or DTR/DSR) handshaking is
available in RS-232 or IrDA mode. However, this would probably be used only in RS-232 mode, since in IrDA mode
only the SIN and SOUT paths are optically coupled.
3.5.1
RS-232 Data Mode
The default mode is called the RS-232 mode, and is usually used for full duplex communication on SOUT and SIN.
In this mode, the modem control outputs (RTS and DTR) are used to communicate to a modem or as general outputs.
The modem control inputs (CTS, DSR, DCD, and RI) are used for modem communication or as general inputs.
Alternatively, RTS and CTS (or DTR and DSR) can be used to throttle the data flow on SOUT and SIN to prevent
receive fifo overruns. Finally, software flow control via Xoff/Xon characters can be used for the same purpose.
This mode represents the most general-purpose applications, and the other modes are subsets of this mode.
3.5.2
RS-485 Data Mode
The RS-485 mode is very similar to the RS-232 mode in that the SOUT and SIN formats remain the same. Since
RS-485 is a bus architecture, it is inherently a single duplex communication system. The TUSB3410 in RS-485 mode
controls the RTS and DTR signals such that either can be used to enable an RS-485 driver or RS-485 receiver. When
in RS-485 mode, the enable signals for transmitting are automatically asserted whenever the DMA is set up for
outbound data. The receiver can be left enabled while the driver is enabled to allow an echo if desired, but when
receive data is expected, the driver must be disabled. Note that this precludes use of hardware flow control, since
this is a half duplex operation, it would not be effective anyhow. Software flow control is supported, but may be of
limited value.
The RS-485 mode is enabled by setting the 485E bit in the FCRL register, and a receiver enable (RCVE) bit in the
MCR allows the receiver to eavesdrop while in 485 mode.
3.5.3
IrDA Data Mode
The IrDA mode encodes SOUT and decodes SIN in the manner prescribed by the IrDA standard, up to 115.2 kbps.
Connection to an external IrDA transceiver is required. Communications is usually full duplex. Generally in an IrDA
system only the SOUT and SIN paths are connected, so hardware flow control is usually not an option. Software flow
control is supported.
The IrDA mode is enabled by setting the IREN bit in the USB control register.
The IR encoder and decoder circuitry work with the UART to change the serial bit stream into a series of pulses and
back again. For every zero bit in the outbound serial stream, the encoder sends a low-to-high-to-low pulse with the
duration of 3/16 of a bit frame at the middle of the bit time. For every one bit in the serial stream, the output remains
low for the entire bit time.
The decoding process consists of receiving the signal from the IrDA receiver and converting it to a series of zeroes
and ones. As the converse to the encoder, the decoder converts a pulse to a zero bit and the lack of a pulse to a one
bit.