M68HC11
REFERENCE MANUAL
PARALLEL INPUT/OUTPUT
MOTOROLA
7-43
7.4.1.2 Port C Simple Latching Input
Data at port C is required to be valid for a short setup time before and a short hold time
after the selected edge on the strobe A pin. Since the edge on strobe A is asynchro-
nous, it need not have any special relationship with the E clock. The internal STAF bit,
which indicates that port C data has been latched, must be synchronized with the in-
ternal clocks to avoid setting the flag in the portion of a cycle where it could be read.
This factor implies there may be a delay between when the actual port C data is
latched and when the MCU becomes aware of it. Not counting internal propagation de-
lays, the MC68HC11A8 would have a delay between zero nanoseconds and one E-
clock period. If the relationship between the strobe A edges and the E clock is known,
the user can predict the delay between port C data latching and setting STAF by a
careful study of the strobe A pin description.
7.4.2 Full-input Handshake Mode
Full-input handshake mode is selected when HNDS is one and OIN is zero. In this
mode, the strobe B output acts as a ready signal to an external system. The external
system should not attempt to strobe data into port C until the strobe B signal has been
asserted, indicating a ready condition. The strobe A input is an edge-sensitive latch
command, allowing the external system to asynchronously latch information into port
C.
When a ready condition is recognized, the external device places data on the port D
inputs, then pulses the strobe A input. The active edge on strobe A latches data into
the PORTCL register, sets STAF (optionally causing an interrupt), and negates strobe
B. Negation of strobe B automatically inhibits the external system from strobing any
new data into port C. Reading the latched data from PORTCL (independent of clearing
STAF) causes strobe B to be asserted, indicating new data may now be strobed into
port C.
Control bits allow flexibility to adapt to the requirements of a particular application. The
INVB control bit selects the polarity of the strobe B signals. The EGA determines
whether rising or failing edges will be the active edges for the strobe A input. The PLS
bit determines whether strobe B will operate in pulsed mode or interlocked mode. In
the interlocked mode, strobe B is asserted when the PORTCL register is read and is
negated when an active edge is detected at the strobe A input. In the pulsed mode,
strobe B is asserted when the PORTCL register is read but only remains asserted for
two E-clock cycles.
Figure 7-26
illustrates the full-input handshake protocol. Separate wave forms are in-
cluded to clarify the pulsed versus interlocked modes of strobe B. Although the polarity
of strobe B and the active edge for strobe A can be selected, the figure only shows the
case where INVB and EGA are ones. This configuration specifies strobe A to be sen-
sitive to rising edges and the active level on strobe B to be high. The timing shown in
Figure 7-26
is the idealized timing for the MC68HC11A8. The idealized timing for the
MC68HC24 port replacement unit has small differences, which do not concern most
users.