Parallel Port Interface
9-8
MC68322 USER’S MANUAL
MOTOROLA
9.2 HARDWARE HANDSHAKING
The PPI supports three hardware handshaking modes for forward data transfers that are
enabled and disabled by the software. One mode supports forward data transfers during
compatibility mode and the other two modes support forward data transfers during ECP
mode. Only one of the three modes can be enabled at a time or all modes can be disabled.
When disabled, the software must assume full responsibility for handshaking and use the
PIER and PPIR to read and control the logic levels on all parallel port pins.
9.2.1 Compatibility Handshaking
Compatibility mode hardware handshaking is enabled by setting the PPCR’s MODE = 01
2
.
When this mode of handshaking is enabled, the PPI automatically generates BUSY when
the leading edge of STROBE from the host is received and latches the logic levels on
PD7–PD0 and AUTOFD into the PPIR. The PPI then waits for STROBE to negate and the
PPIR’s DATA field to be read. After both of these events occur, the PPI asserts ACK for the
duration specified in the PPIR’s ACKW field and then negates ACK and BUSY to conclude
the data transfer.
When data is latched into the PPIR’s DATA field, the PPI generates two interrupt
events—a parallel port DMA (PDMA) request and a core interrupt request. The software can
alternate between PDMA and interrupt-based data transfers. The PDMA request remains
active until the data is read by either the PDMA channel or core in response to the interrupt
event. If the PDMA has been enabled, it responds to the request by reading the PPIR’s
DATA field and writing the data to DRAM. When the PDMA channel reads the DATA field,
ACK is pulsed, BUSY is negated, and the PDMA request is cleared.
The PIER’s ENABLE field can be programmed to interrupt the core when parallel port data
is received. If enabled, the PIER’s DRD bit, when set, will generate a data received interrupt
event. When the core reads the PPIR’s DATA field, ACK is pulsed, BUSY is negated, and
the PDMA request is cleared. The PPI functions without using the PDMA, but the system
throughput will be dramatically impacted. Therefore, using the PDMA is strongly
recommended. Figure 9-5 illustrates the compatibility mode timing.
Figure 9-5. Compatibility Mode Timing Diagram
DATA
STROBE
BUSY
ACK
LATCH DATA
REQUEST INTERRUPT
READ DATA
MAKE ACK 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
..
.