Programmable Four-Channel Communications Controller
—
CD2481
Datasheet
83
7.4.2
MNP4
/ARAP FCS (Frame Check Sequence) Calculation
Both versions use the (
with remainder equal to 0x1D0F. The frame body and ETX octet of the stop flag are included in the
FCS calculation for both versions. The start flag and all DLE (ARAP 1.0)/ESC (ARAP 2.0) octets
that are used for transparency are excluded from the FCS calculation.
Figure 17
and
Figure 18
illustrate the characters used in the FCS calculation. Data used in FCS calculation is in bold print.
) polynomial, preset to all
‘
1
’
s, transmitted and inverted
Note:
The DLE (ARAP 1.0) and ESC (ARAP 2.0) characters in the middle of the data stream, indicated
by the
‘
T
’
column, are inserted for transparency and thus not included in the FCS calculation.
7.5
Async Processing
Data is transmitted according to the format options defined in the Channel Option registers. These
options determine the character length, parity, and stop bit length. New data sent from the host will
be transmitted in a continuous stream, unless one of the following happens:
1. Transmitter disabled
–
transmission terminated at the end of the current character until
transmitter enabled.
2. XOFF received from line (if in-band flow control is enabled)
–
transmission terminated at end
of the current character until XON received or transmitter enabled .
3. Out of band flow control (if enabled)
–
transmission terminated at the end of the current
character until out of band flow control removed.
4. In-line command received in data stream from host
–
in-line command is executed and
transmission resumed (if embedded commands are enabled).
5. Send special character command from host
–
the current character is completed and the special
character is transmitted after which normal transmission resumes.
7.5.1
Transmitter In-Band Flow Control
For in-band flow control modes to be active, the Special Character Detect mode must be enabled.
Transmit in-band flow control is enabled when the Transmit In-Band Enable (TxIBE) bit in
COR2[6] is set to one. When TxIBE is cleared to zero, in-band flow control is disabled, and the
Implied XON Mode (IXM) COR2[7] has no meaning. The XON and XOFF characters are defined
in the Special Character registers SCHR[1:2].
x
16
x
12
x
5
1
+
+
+
Figure 17. ARAP 1.0 Frame
Start Flag
T
End Flag
SYN
DLE
STX
data
data
DLE
DLE
data
data
DLE
ETX
FCS1
FCS2
Figure 18. ARAP 2.0 Frame
Start Flag
T
End Flag
SOH
ESC
STX
data
data
DLE
DLE
data
data
ESC
ETX
FCS1
FCS2