English
Language : 

MC68HC908GZ8 Datasheet, PDF (210/344 Pages) Motorola, Inc – Microcontrollers
Input/Output (I/O) Ports
17.5 Port D
Port D is an 8-bit special-function port that shares four of its pins with the serial
peripheral interface (SPI) module and four of its pins with two timer interface (TIM1
and TIM2) modules. Port D also has software configurable pullup devices if
configured as an input port.
17.5.1 Port D Data Register
The port D data register (PTD) contains a data latch for each of the eight port D
pins.
Address:
Read:
Write:
Reset:
Alternate
Function:
$0003
Bit 7
PTD7
T2CH1
6
PTD6
5
PTD5
T2CH0 T1CH1
4
3
PTD4
PTD3
Unaffected by reset
T1CH0 SPSCK
2
PTD2
MOSI
Figure 17-13. Port D Data Register (PTD)
1
PTD1
MISO
Bit 0
PTD0
SS
PTD7–PTD0 — Port D Data Bits
These read/write bits are software-programmable. Data direction of each port D
pin is under the control of the corresponding bit in data direction register D.
Reset has no effect on port D data.
T2CH1 and T2CH0 — Timer 2 Channel I/O Bits
The PTD7/T2CH1–PTD6/T2CH0 pins are the TIM2 input capture/output
compare pins. The edge/level select bits, ELSxB:ELSxA, determine whether the
PTD7/T2CH1–PTD6/T2CH0 pins are timer channel I/O pins or general-purpose
I/O pins. See Section 23. Timer Interface Module (TIM).
T1CH1 and T1CH0 — Timer 1 Channel I/O Bits
The PTD7/T1CH1–PTD6/T1CH0 pins are the TIM1 input capture/output
compare pins. The edge/level select bits, ELSxB and ELSxA, determine
whether the PTD7/T1CH1–PTD6/T1CH0 pins are timer channel I/O pins or
general-purpose I/O pins. See
Section 23. Timer Interface Module (TIM).
SPSCK — SPI Serial Clock
The PTD3/SPSCK pin is the serial clock input of the SPI module. When the SPE
bit is clear, the PTD3/SPSCK pin is available for general-purpose I/O.
MOSI — Master Out/Slave In
The PTD2/MOSI pin is the master out/slave in terminal of the SPI module. When
the SPE bit is clear, the PTD2/MOSI pin is available for general-purpose I/O.
Data Sheet
210
Input/Output (I/O) Ports
MC68HC908GZ8
Freescale Semiconductor