M68HC11
REFERENCE MANUAL
PARALLEL INPUT/OUTPUT
MOTOROLA
7-27
AND gate [3] will also disable the output driver when the SCI receiver is enabled by
the receiver-on signal (RCVON). The state of the DDRD bit still influences the source
of read data when the RCVON signal is forcing the pin to a high-impedance state.
This pin alternately serves as the receive data (RxD) input pin for the asynchronous
SCI system. The SCI receiver is enabled by the receive enable (RE) control bit in an
SCI control register, which forces the RCVON signal to one, disabling pin output driver
[9], regardless of the state of the DDRD bit from HFF [1]. The state of the DDRD bit
allows the programmer to read the RxD pin (DDRD = 0) or the value in port D latch [8]
(when DDRD = 1). Data from the pin is buffered by inverters [7] and driven to the SCI
receive logic. The data path from the pin to the SCI receive logic is not affected by the
state of DDRD.
7.3.6.2 PD1 (TxD) Pin Logic
Refer to
Figure 7-17
for the following discussion. The data direction specification 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 transmission gate
[2] to couple the output of HFF [1] onto the internal data bus. During reset, HFF [1] is
cleared to zero, which configures this pin as a high-impedance input.
The state of DDRD controls the pin output buffer via OR gate [3], and DDRD affects
the source of data for port D reads via transmission gates [4] and [5]. When the DDRD
bit from HFF [1] is one, OR gate [3] outputs a one, which enables output driver [9]. Al-
so, when the DDRD bit from HFF [1] is one, transmission gate [4] is enabled. In this
case, reads of port D enable transmission gate [6], which couples the level from the
output of HFF [8] to the internal data bus. The value returned on such a read corre-
sponds to the last value written to the corresponding bit of port D. Since output driver
[9] can be configured for wired-OR operation, some external source can force the pin
low even if the pin logic for this pin is attempting to output a one. If the DDRD bit did
not affect the source of the read data, an erroneous zero could be read when the pin
logic is actually trying to output a one. When the DDRD bit from HFF [1] is zero, OR
gate [3] outputs a zero, which disables output driver [9]. Also, when the DDRD bit is
zero, transmission gate [5] is enabled. In this case, reads of port D enable transmis-
sion gate [6], which couples the buffered pin state from inverters [7] to the internal data
bus.