English
Language : 

Z85233 Datasheet, PDF (267/317 Pages) Zilog, Inc. – The Zilog SCC Serial Communication Controller
Application Note
Technical Considerations When Implementing LocalTalk Link Access Protocol
GENERAL DESCRIPTION (Continued)
leaves room for possible collisions with other data packets.
LLAP attempts to minimize this probability (collision
avoidance).
Two techniques are used by LLAP in its implementations
of CSMA/CA. LLAP outlines this procedure but falls short
in endorsing which hardware to use. (The SCC is, of
course, used by Apple.) The first technique takes
advantage of the distinctive 01111110 flag bytes that
encapsulate the data packet (note that this implies that
SDLC is used). LLAP stipulates that a minimum of two
flags precede each of these data packets. The leading flag
characters provide byte synchronization and give a clue to
any listener that some other node is using the link at a
particular time (use the Hunt bit in RR0 if the SCC is used).
In SDLC mode, the receiver automatically synchronizes on
the flag byte and resets the Hunt bit to zero. The SCC has
some latency in detecting these flag bytes due to the
shifter, etc. This is not ideal because the node needing to
transmit may determine that the link is free, when in fact
the flag bytes are still being shifted into its receiver (i.e., the
link is not idle at all).
A closing flag is also needed to fully encapsulate the data
packet. LLAP requires that 12 to 18 ones be sent after this
closing flag. The LocalTalk hardware (i.e., the SCC)
interprets this as an abort sequence and causes the
node’s hardware to lose byte sync; this then confirms that
the current sender’s transmission is over. In SDLC mode,
seven or more contiguous 1’s in the receive data stream
forces the receiver into Hunt (Hunt bit set) and an
External/Status interrupt can be generated. This is
important because the node wishing to use the bus can
simply wait for this interrupt before preparing to transmit
it’s packet.
LLAP uses a second technique in its carrier sensing. LLAP
requires that a synchronization pulse for an idle period of
at least two bit times be transmitted prior to sending the
RTS handshaking frame (Figure 1). This synchronization
is obtained by first enabling the hardware line so that an
edge is detected by all the receivers on the network. This
initial edge is perceived as the beginning of the clocking
period. It is soon followed by an idle period (a period with
no carrier) of at least two bit times. All the receivers on the
network see this idle period and assume that the clock has
been lost (missing clock bit set on RR10 ). This method is
much more immediate than the byte flag synchronization
method and provides a quicker way of determining
whether the link is in use. Unfortunately, an interrupt is not
generated by this missing clock and, therefore, polling
must be implemented.
The Z80181 code used for polling the missing clock bit is
approximately fifty clock cycles which at 10 MHz is about
5 µsec or about one bit time. This is still relatively quicker
than the time required for the SCC to reset the Hunt bit (the
flag character takes at least eight bit times for it to be
shifted through the buffer before the Hunt bit is reset to
zero). Synchronization pulses can be sent before every
frame but because of the time constraints associated with
the interframe gaps it makes sense to send such pulses
only before the lapENQ and lapRTS frames.
RTS
2 Bit Times (Min)
1 Bit Time (Min)
TxD
Partial Flag
Flag
Flag LLAP Packet CRC
CRC
Flag 12-18 1's
Possible Partial Flag
TxUnderrun Int.
Figure 1. CSMA/CA Synchronization Pulse Timing Diagram
6-132
UM010901-0601