User`s manual
B.2 DATA AND
CONTROL
CODES
The
purpose
of
a
data
channel
is
to transfer data,
unaltered, from a transmitter station (master)
to
a
receiver station (slave).
The
data
to
be transferred
is
embedded
in control codes, which serve
to
identify
the type
of
data
being transferred,
and
to provide for
synchronization
and
error
detection. (Thus, the chan-
nel
is
considered to consist
of
the physical facility
plus
control
codes.
For
this reason, the control codes
may
be referred to as
Data
Channel
or
Data
Link
control
codes.) Since
both
stations are operated in
accordance with the same protocol, the receiver sta-
tion
is
able
to
differentiate between the several types
of
control codes
and
data
codes sent by the trans-
mitter,
and
can therefore act accordingly.
B.2.1 Types
of
Data
In
the
protocols
to
be described, all
data
are classed
into
two types
or
categories:
Transparent
Data,
or
Character-Encoded
Data.
B.2.1.1 Transparent
Data
-
It
is often necessary
to
transmit
binary
data,
floating-point
numbers,
packed-decimal
data,
unique specialized codes,
or
machine-language
computer
programs. In
order
to
do
this, all
data,
including the normally restricted
Data-Link
Control
characters,
are
treated only as
specific bit patterns. Protocols differ in the methods
used
to
permit the use
of
all possible bit patterns as
data
while still controlling the
data
channel. Tech-
niques for achieving transparency are discussed sepa-
rately for each protocol described herein.
B.2.1.2 Character Codes - Several character encod-
ing schemes are available.
The
codes differ primarily
in the
number
of
bits used to represent characters
and
the
bit
patterns
which correspond
to
the characters.
Characters
are divided into graphic characters, repre-
senting a symbol,
and
control characters, which are
used to control a terminal
or
computer
function.
Although
many codes
are
in use, the trend
is
toward
the
universal 7-bit-plus-parity ASCII (American
Standard
Code
for Information Interchange) code.
ASCII was introduced by the U.S.A.
Standards
Institute
and
has been accepted as the U.S. Federal
Standard.
Techniques for transmitting
transparent
or
binary
data
also exist within the structure
of
the
ASCII
code. Special characters are set aside for
Data
Channel
control.
A variation
of
the ASCII code
is
the 8-bit
Data
Inter-
change Code. Primarily, this code differs from ASCII
B-2
in
that
some printing characters are replaced by non-
printing control characters and the parity
is
specified
to be odd. This code
is
readily adaptable
to
com-
puter-to-computer communications.
Of
the
other
existing codes, the most widely used are
the
Extended
Binary
Coded
Decimal
Interchange
Code
(EBCDIC), the 5-bit Baudot code, found in old
teleprinter equipment, the
Four
of
Eight Code, the
I
BM
punched-card Hollerith code, the Binary Coded
Decimal (BCD) code, and the 6-bit Transcode.
EBCDIC
is
an eight-level code similar to ASCII,
except
that
while ASCII uses its eighth level for parity
bits,
EBCDIC
uses it for information bits, thereby
extending the range
of
characters
to
256.
B.2.2 Synchronization Codes
Preceding the
data
and
control character
is
a
sequence
of
one
or
more synchronizing (SYN
or
SYNC)
characters, which have a protocol-defined bit
pattern.
The
synchronization characters
are
used by
the receiver to synchronize,
or
get in phase with, the
characters in the continuous stream
of
bits,
to
deter-
mine where each character begins and ends. (This
is
the character-framing process described in Appendix
C.)
B.2.3 Error-Detecting Codes
The
protocols to be described use error-detecting
codes provided for by the
DVll:
LRC,
CRC-16, and
CRC-CCITT.
LRC
is
a Longitudinal Redundancy Check
on
the
total
data
bits by message block (see Figure B-1). An
LRC
character
is
accumulated in both the sending
and
receiving terminals during the transmission
of
a
block. This accumulation
is
called the Block Check
Character
(BCC). The transmitted BCC
is
compared
with the accumulated BCC
at
the receiving station for
an equal condition. An equal comparison indicates a
good transmission
of
the previous block.
Cyclic Redundancy Checking
(CRC)
is
a more pow-
erful method
of
block checking than LRC. A
CRC
is
a division performed by both the transmitting and
receiving stations, using the numeric binary value
of
the message as a dividend, which
is
divided by a con-
stant.
In
performing the division, borrows are
ignored. The quotient
is
discarded and the remainder
serves as the check character, which
is
then trans-
mitted as the BCC. The receiving station compares
the transmitted remainder with its own computed
remainder. and finds no
error
if they are equal.