beautypg.com

Zilog Z16C30 User Manual

Page 80

background image

5-13

Z16C30 USC

®

U

SER

'

S

M

ANUAL

Z

ILOG

UM97USC0100

After the CRC, or immediately if CMR15 or TMR8 is 0, in
Monosync mode the Transmitter sends the Sync character
in the LSByte of the Transmit Sync Register (TSR7-0). In
Bisync mode it sends the “SYN1” character in TSR15-8 if
CMR14 is 0, while if CMR14 is 1 it sends one or more
character pairs. The Transmitter takes the first character of
each such pair from TSR7-0; by convention it’s called
“SYN0”. The second character of each pair comes from
TSR15-8 and is called “SYN1”.

After sending this closing Sync character or pair, if/while
software doesn’t present another message, the Transmit-
ter maintains the TxD signal in the “idle line state” defined
by the TxIdle field of the Transmit Command/Status Reg-
ister (TCSR10-8). If this field is 000, it continues to send
more of the same Sync character or pair that it sent to
terminate the message. Other TxIdle values select con-
stant or alternating-bit patterns, as described later in
'Between Frames, Messages, or Characters'.

If the CMR13 bit in the TxSubMode field is 1, the Transmit-
ter sends a “Preamble” before the “opening” sync charac-
ter that precedes each message. Software can select the
length and content of the Preamble in the Channel Control
Register (CCR11-8). A typical use of the Preamble is to
send a square-wave pattern for bit rate determination by a
phase locked loop.

The Transmitter always sends at least one “opening” Sync
pattern before the first data character of a message (after
the Preamble if any). In Monosync mode it sends one
character from TSR15-8, while in Bisync mode it sends the
“SYN0” character from TSR7-0 followed by “SYN1” from
TSR15-8. (In Bisync mode an opening Sync sequence is
always a character pair, regardless of CMR14.)

The LSBits of the TxSubMode and RxSubMode fields
(CMR12 and CMR4 respectively) specify the length of the
Sync characters that the Transmitter sends before and
after each message and between messages, and for
which the Receiver hunts. If CMR12 or CMR4 is 1, sync
characters have the same length as data characters,
namely the length specified by the TxLength field in the
Transmit Mode Register (TMR4-2) or the RxLength field of
the Receive Mode Register (RMR4-2). If sync characters
are less than 8 bits long, they must be programmed in the
least significant bits of TSR15-8, RSR7-0 and, for Bisync,
TSR7-0 and RSR15-8. Furthermore, to guarantee that the
Receiver matches such Sync characters, the “unused”
MSBits among RSR7-0 (and for Bisync RSR15-8) must be
programmed equal to the MS active bit.

If CMR12 or CMR4 is 0, Sync characters are 8 bits long
regardless of the length of data characters.

On the receive side

, the CMR5 bit of the RxSubMode field

determines what the Receiver does with Sync characters.
In CMR5 is 1, the Receiver strips characters that match the
character in RSR15-8, and neither places them in the
RxFIFO nor includes them in its CRC calculation. (In Bisync
mode, aside from the initial sync match the Receiver treats
characters that match “SYN0” in RSR7-0, but don’t match
“SYN1” in RSR15-8, as normal data.) If CMR5 is 0, the
Receiver places all Sync characters inside a message in
the RxFIFO and includes them in the CRC calculation.

The USC doesn’t use the two MSBits of the RxSubMode
field (CMR7-5) in Monosync and Bisync modes, nor CMR14
in the TxSubMode field in Monosync mode. Zilog reserves
these bits for future enhancements, and software should
always program these bits with zeroes in these modes.

UM009402-0201