English
Language : 

MC68HC11KW1 Datasheet, PDF (117/238 Pages) Motorola, Inc – High-density complementary metal oxide semiconductor HCMOS) microcontroller unit
6.4
Port D
Port D is an 8-bit bidirectional port, with both data and data direction registers. In addition to their
I/O capability, six of port D’s pins are shared with SCI and SPI functions, as shown in the following
table.
Pin
Alternative
function
PD0
RXD
 See Section 7 for
PD1
TXD
 more information.
PD2
MISO

PD3
MOSI


See Section 8 for
PD4
SCK
 more information.
PD5
SS

6
On reset the pins are configured as general purpose high-impedance inputs.
6.4.1 PORTD — Port D data register
Port D data (PORTD)
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0008 PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0 undefined
This is a read/write register and is not affected by reset. The bits may be read and written at any
time, but, when a pin is allocated to an alternate function, a write to the corresponding register bit
has no effect on the pin state.
6.4.2 DDRD — Data direction register for port D
Data direction D (DDRD)
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0009 DDD7 DDD6 DDD5 DDD4 DDD3 DDD2 DDD1 DDD0 0000 0000
DDD[7:0] — Data direction for port D
1 (set) – The corresponding pin is configured as an output.
0 (clear) – The corresponding pin is configured as an input.
MC68HC11KW1
PARALLEL INPUT/OUTPUT
6-5