Parallel Port Interface
MOTOROLA
MC68322 USER’S MANUAL
9-9
9.2.2 ECP Handshaking
The PPI supports two ECP hardware handshaking modes for forward data transfers—one
with run-length encoding and one without. ECP hardware handshaking is enabled by setting
the MODE field in the PPCR to 102, while ECP hardware handshaking with RLE is enabled
by setting MODE = 112. The basic operation of these two handshake modes is identical.
When either mode is enabled, the PPI automatically responds to STROBE by latching the
logic levels on PD7–PD0 and AUTOFD in the PPIR’s DATA field. When the PPIR’s DATA
field is read, the PPI drives BUSY high, waits for STROBE to go high, and then drives BUSY
low to conclude the cycle. Since no ACK pulse is generated, the pulse width duration
specified in the PPIR’s ACKW field is not used. Like compatibility handshake mode, data is
latched at the leading edge of STROBE, thus causing a PDMA request and the posting of a
data received interrupt event (setting the DRD bit in the PIER). DMA and interrupt operation
is the same as described for compatibility handshaking mode.
Two additional interrupts events can be posted by the PPI when an ECP handshake mode
is programmed—command received and invalid termination (setting the CRD and/or IVD
bits in the PIER). A CRD is posted when a command byte is received from the host and an
IVD is posted when SELECTIN transitions illegally in the middle of a handshake sequence;
that is, an invalid termination interrupt is posted if SELECTIN is low when STROBE is low
or BUSY is high. Such an event can be caused by the user changing a switch box or a
parallel cable coming loose. An invalid termination interrupt event should be treated as an
immediate termination and the PPI should be returned to compatibility mode operation.
Figure 9-6 illustrates the ECP mode timing.
Figure 9-6. ECP Mode Timing Diagram
9.2.2.1 COMMAND BYTE DETECTION. When ECP is enabled (MODE = 102 or 112), the
PPI monitors the AUTOFD level that is latched into the PPIR’s CMD bit, to detect and
intercept command bytes. If CMD is clear, the PPI interprets the data as a command byte
and examines the most-significant bit to interpret the byte. If PD7 = 0, the command byte is
a run-length count and if it is 1 the command byte is a channel address. The action taken
with a channel address or run-length count depends on which ECP handshaking mode is
selected.
DATA
STROBE
BUSY
LATCH DATA
REQUEST INTERRUPT
READ DATA
MAKE BUSY PULSE
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.