Zilog Z16C30 User Manual
Page 116

5-49
Z16C30 USC
®
U
SER
'
S
M
ANUAL
Z
ILOG
UM97USC0100
5.24 BETWEEN FRAMES, MESSAGES, OR CHARACTERS
5.24.1 Synchronous Transmission
When software issues a “Set EOF/EOM” command and
then writes data to a channel’s TDR, or when the TCC is
enabled and software or an external Transmit DMA con-
troller fetches enough data so that the TCC counts down to
zero, the channel flags the last character of the message
or frame in the TxFIFO. After this last character passes
through the TxFIFO and out onto the serial link, the Trans-
mitter terminates the frame or message. The Transmitter
also terminates a frame or message if it needs a character
from the TxFIFO but it’s empty (an “underrun” condition).
The Transmitter’s exact actions at these points depend on
the serial mode/protocol and perhaps on certain pro-
grammed options.
If the TxCRCatEnd bit in the Transmit Mode Register
(TMR8) is 1, the Transmitter sends the CRC code it has
accumulated during the frame, after a character marked
as the end of a frame or message. If the TxSubMode field
says to do so, the Transmitter sends its accumulated CRC
in an underrun situation. The CRC can be 16 or 32 bits long.
After sending a CRC for either reason, or right after the last
character from the TxFIFO if it doesn’t send the CRC,
except in 802.3 (Ethernet) mode the Transmitter sends a
closing Sync or Flag sequence as determined by the
TxMode and sometimes the TxSubMode, as follows:
TxMode
Closing sequence:
Monosync
(TSR15-8)
Slaved Monosync
(TSR15-8)
Bisync
(TSR15-8) if CMR14=0
(TSR7-0)(TSR15-8) if CMR14=1
Transparent Bisync
SYN if CMR14=0
DLE-SYN if CMR14=1
(ASCII or EBCDIC per CMR12)
802.3 (Ethernet)
None
HDLC/SDLC
Flag (01111110)
HDLC/SDLC Loop
Flag (01111110)
1a.
The UnderWait bit (CCSR11) is 0 and/or the TxCtrlBlk
field (CCR15-14) is 0x, and there is at least 1 character
in the TxFIFO, or
1b.
UnderWait is 1 and TxCtrlBlk is 10, and the TxFIFO is
full or a complete frame has been placed in the
TxFIFO, and
2a.
Either the Wait2Send bit in the Transmit Interrupt
Control Register (TICR2) is 0, or
2b.
Software has written the “Send Frame/Message” com-
mand to the TCmd field of the Transmit Command/
Status Register (TCSR15-12) since the end of the last
frame.
If these conditions aren’t met, the Transmitter sends the
“Idle line condition” specified by the
TxIdle
field of the
Transmit Command/Status Register (TCSR10-8). This field
also determines what the Transmitter sends between char-
acters in async modes. The Transmitter interprets TxIdle
as follows:
TxIdle Idle Line Condition
000
The idle line condition is the default for the
mode/protocol defined by TxMode:
* All ones in 802.3 and all async modes.
* Flags in HDLC/SDLC and HDLC/SDLC Loop.
* Sync sequences in Monosync, Slaved Monosync,
Bisync, and Transparent Bisync. (In the Bisync
modes these are like closing Syncs: they may be
single characters or pairs based on CMR14.)
001
Alternating zeroes and ones
010
Continuous zeroes
011
Continuous ones
100
Reserved; do not program
101
Alternating Mark and Space
110
Continuous Space (TxD low)
111
Continuous Mark (TxD high)
With choices 000-011, the Transmitter encodes the Idle
condition as specified by the TxEncode field of the Trans-
mit Mode Register (TMR15-13), while for choices 101-111
it doesn’t encode the condition. Software can use these
idle-condition options to keep Phase Locked Loop and
decoding circuits at the remote receiver “in sync” between
messages, frames, or async characters. Consider the
sections of Chapter 4 that deal with data encoding and the
DPLL, and whatever standards or specifications apply to
your application, in selecting how to program TxIdle.
Then, or right after sending the CRC in 802.3 (Ethernet)
mode, the Transmitter decides whether to send another
frame or message immediately or not. In
HDLC/SDLC Loop mode only, when it sends a closing or
idle Flag the Transmitter checks whether software has
cleared the CMR13 bit to signal the end of sending activity.
If so, it returns to repeating data from RxD onto TxD. In any
other mode, and in Loop mode if CMR13 is 1, the Transmit-
ter commits to sending a new message or frame when:
UM009402-0201