beautypg.com

Zilog Z16C30 User Manual

Page 70

background image

5-3

Z16C30 USC

®

U

SER

'

S

M

ANUAL

Z

ILOG

UM97USC0100

Synchronous applications vary considerably in terms of
the line state between messages. In half-duplex operation,
each station typically stops driving the line after the end of
a message. The other side then starts driving it to “turn the
line around”. In full-duplex point-to-point environments, a
transmitter may send a stream of repeated Sync or Idle
characters between messages. This maintains synchroni-
zation between itself and the remote receiver as to charac-
ter boundaries. This avoids the need to send several sync
characters before the start of the next message, when it
becomes available for transmission. In other full-duplex
environments, the line may be maintained at a constant
Mark or Space between messages.

While many modes have several variants, the top level of
a USC channel’s control hierarchy includes the following
character-oriented synchronous modes. In Monosync
mode, the hardware transmits or matches a sync charac-
ter of eight bits or less. Software must handle further
receive-sync validation. In Bisync mode the hardware
transmits or matches a minimum of two sync characters.
The two can be the same or different codes, each of eight
bits or less. Transparent Bisync mode is similar to Bisync
mode except that the prefix character Data Link Escape
(DLE) precedes control characters. This allows the trans-
mission of arbitrary “binary” data without conflict with the
various control characters. Slaved Monosync mode ap-
plies only to the Transmitter, making it operate in conform-
ance with the X.21 standard, such that it sends characters
in byte-synchronism with those received. External Sync
mode applies only to the Receiver, and leaves all sync-
detection and framing control to external circuitry. An input
signal simply enables the Receiver to assemble charac-
ters from the RxD line.

The final character-oriented synchronous mode of the
USC channels provides basic facilities for IEEE 802.3
(Ethernet) operation. At the start of a frame, the Transmitter
generates, and the Receiver detects, a preamble consist-
ing of alternating 0 and 1 bits ending with two 1’s in
succession. Bi-phase-level data encoding must be se-
lected in the Transmit and Receiver Mode Registers (TMR
and RMR), as described in Chapter 4. External hardware
must be provided to detect collisions and to signal the
Transmitter when they occur. External hardware also must
signal the Receiver when a frame ends based on loss of
carrier. Upon collision detection, “back-off” timing must be
determined by external hardware or host processor soft-
ware.

5.3 CHARACTER ORIENTED SYNCHRONOUS MODES

These protocols came into use after async, in an effort to
get better line utilization by eliminating start and stop bits.
In sync modes, characters follow one another directly on
the serial link, each consisting of an agreed-upon number
of bits and each bit having the same nominal length. Since
bits and characters occur at regular intervals, the datacom
hardware can typically handle higher bit rates because it
doesn’t have to oversample as in typical async applica-
tions. This effect combines with having fewer bits per
character, to make synchronous operation substantially
faster than async.

In character oriented sync modes, “special” characters
divide the data into “messages”. Figure 5-2 shows how the
transmitter sends some minimum number of agreed-upon
“sync characters” between messages. When a synchro-
nous receiver begins to receive a message, it typically
starts in a “search mode” in which it samples successive
bits into its serial-to-parallel shift register. It does this until
the last N bits match a defined sync pattern. Then the
Receiver enters a mode in which it simply captures each
succeeding group of bits as a character.

Most sync protocols require the receiving station to vali-
date the sync pattern match. It can do this by checking
whether the next character is another sync, an agreed-
upon “start of message” character, or perhaps one of a
small set of such characters. This validation can be done
by software or by hardware.

Almost all character-oriented synchronous protocols also
define one or more characters, or sequences of charac-
ters, to mark the end of a message. Instead of (or some-
times besides) parity checking on each character, syn-
chronous protocols will typically include a checking code
covering most or all the characters in each message. The
transmitter accumulates and sends this code before or
after the end-of-message character or sequence. Early
sync protocols used a Longitudinal Redundancy Charac-
ter (LRC) that was simply the parallel Exclusive Or of the
characters in the message. Newer protocols use various
kinds of Cyclic Redundancy Checking (CRC) which offer
greater reliability in exchange for a somewhat more in-
volved method of computation. Either kind of message
checking can be computed by either hardware or software
at the Transmitter and Receiver. The USC channels can
automatically generate and check various kinds of CRCs
in synchronous modes.

UM009402-0201