
Intelligent Eight-Channel Communications Controller
—
CD1865
Datasheet
77
received is a flow-control character and set its internal flag to stop transmission. Transmission
actually stops as soon as the characters in the Transmit Shift register and Transmit Holding register
are shifted out.
To enable In-Band Flow Control, two bits must be set. First, the Special Character Detection
(SCDE) must be enabled by bit 4 of Channel Option register 3 (COR3). This causes all error-free
received data to be compared for a match with the Special Character registers (SCHR1
–
4). Second,
flow control is enabled by Transmit In-Band Enable (TxIBE, bit 6) of COR2, the special characters
are interpreted as flow-control characters.
Different flow-control protocols use either single- or two-character sequences for the Xon and Xoff
functions. For single-character flow-control sequences SCHR1 is used as Xon, SCHR2 as Xoff,
and SCHR3-4 as normal special detect characters. If two-character sequences are enabled, by
XoffCH and XonCH (bits 6 and 7) of COR3, SCHR1 and SCHR3 form the Xon sequence and
SCHR2 and SCHR4 form the Xoff sequence.
Many operating systems allow users to define their own terminal
’
s flow-control settings
independently. The CD1865 allows flow-control characters to be programmed on a per-channel
basis.
The FCT bit controls whether flow-control characters are passed on to the host. When the CD1865
receives a flow-control character or character sequence and FCT is a
‘
0
’
, it starts or stops the
transmitter as required, and passes the character on to the host as a Receive Exception Service
Request. Since there is a one-to-one correspondence between the Status FIFO and the Receive Data
FIFO, the flow-control character detected is stored in the Receive Data FIFO, and a status byte,
indicating special character detect, is stored in the Status FIFO.
If the FCT bit is a
‘
1
’
, the CD1865 still starts or stops the transmitter as required, but the character
is discarded, and no exception is posted. In either case, the flow-control status of the transmitter (on
or off) is maintained by the CD1865 in the Channel Control Status register (CCSR).
If flow-control characters are passed to the host, they are marked as special characters 1 or 2 in the
Receive Channel Status register (RCSR). If a two-character sequence is detected, it is compressed
to the second character and a status indicating a match of the first character is set. A valid two-
character sequence requires that both characters be received without error. If an error occurs on the
second character, the first character is treated as a normal character, and the second character is
reported as an error by a Receive Exception Service Request.
Bits affecting flow control are summarized in the table below:
Bit Name
Register
Function
SCDE
COR3
Enables Special Character Recognition.
TxIBE
COR2
Enables Automatic-transmitter Flow Control.
FCT
COR3
Sets Transparency mode of flow control.
IXM
COR2
Sets implied Xon mode
XonCH
0
0
1
1
XoffCH
0
1
0
1
Xon
SCHR1
SCHR1
Xoff
SCHR2
(SCHR2 and SCHR4)
SCHR2
(SCHR2 and SCHR4)
(SCHR1 and SCHR3)
(SCHR1 and SCHR3)