
M68HC11
REFERENCE MANUAL
PARALLEL INPUT/OUTPUT
MOTOROLA
7-35
one and MSTRON is zero. This configuration causes NAND gate [12] to output a zero,
which disables output driver [9], regardless of the state of the DDRD bit at HFF [1].
When the SPI system is enabled as a master, SPE is one and MSTRON is one. This
configuration causes NAND gate [12] to output a one, which enables NAND gate [3]
to control the direction of output buffer [9] based on the state of the DDRD bit from HFF
[1].
Output driver [9] can be placed in a wired-OR configuration by the DWOM control bit.
This control bit simultaneously affects all six port D pins. When DWOM is one, the P-
channel device in the output driver is disabled so the pin cannot be actively driven
high. When the pin attempts to output a logic one, the N-channel device is off; thus,
the pin appears as a high-impedance input. An external pull-up is used to passively
pull the pin high.
The data for output driver [9] comes from transmission gate [10] or [11]. When the SPI
system is enabled, the SPE bit is one; thus, transmission gate [10] is enabled, and
data for the output driver comes from the SPI master clock output signal (SPISCK).
When the SPI system is disabled, the SPE control bit is zero; transmission gate [10]
is disabled and transmission gate [11] is enabled. In this case, port D data is coupled
from the output of HFF [8] to the input of output driver [9]. During a write to port D, the
WPORTD signal is asserted, which causes data to be latched into HFF [8] from the
internal data bus.
During a read of port D, transmission gate [6] is enabled by the RPORTD signal to cou-
ple data to the internal data bus. The source of data for port D reads depends on the
direction control for the output driver. If the output of NAND gate [3] is zero, output driv-
er [9] is enabled and transmission gate [4] is enabled. In this case, port D reads return
the data from a point inside the output driver. If the output of NAND gate [3] is one,
transmission gate [5] is enabled. In this case, reads of port D return the buffered state
from the pin through inverters [7].
The output of inverters [7] drives the SPI slave clock input to the SPI system logic. Be-
cause the source of this clock is always from the SCK pin, it is not affected by the data
direction logic. When the SPI system is operating in master mode, the SPI clock is
generated by the SPI system logic, and the slave clock input from inverters [7] is ig-
nored.
7.3.6.6 PD5 (SS) Pin Logic
This pin alternately functions as the (SS) pin when the synchronous SPI system is en-
abled. Refer to
Figure 7-21
for the following discussion. The data direction specifica-
tion for this pin is held in HFF [1]. During a write to the DDRD register, the WDDRD
signal is asserted, causing data to be transferred into HFF [1] from the internal data
bus. A read of DDRD causes the RDDRD signal to be asserted, which enables trans-
mission gate [2] to couple the output of HFF [1] onto the internal data bus. When HFF
[1] is cleared to zero during reset, this pin is configured as a high-impedance input. Un-
like the other three pins associated with the SPI system, the direction of this pin is not
affected by mode faults.