
Input/Output (I/O) Ports
MC68HC908JL3E Family Data Sheet, Rev. 4
110
Freescale Semiconductor
10.4 Port D
Port D is an 8-bit special function port that shares two of its pins with timer interface module,
(see
Chapter 8 Timer Interface Module (TIM)
) and shares four of its pins with analog-to-digital converter
module (see
Chapter 9 Analog-to-Digital Converter (ADC)
). PTD6 and PTD7 each has high current drive
(25mA sink) and programmable pull-up. PTD2, PTD3, PTD6 and PTD7 each has LED driving (sink)
capability.
NOTE
PTD0–PTD1 are available on MC68H(R)C908JL3E only.
10.4.1 Port D Data Register (PTD)
The port D data register contains a data latch for each of the eight port D pins.
PTD[7:0] — 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.
ADC[11:8] — ADC channels 11 to 8
ADC[11:8] are pins used for the input channels to the analog-to-digital converter module. The channel
select bits, ADCH[4:0], in the ADC status and control register define which port pin will be used as an
ADC input and overrides any control from the port I/O logic. See
Chapter 9 Analog-to-Digital Converter
(ADC)
.
TCH[1:0] — Timer Channel I/O
The TCH1 and TCH0 pins are the TIM input capture/output compare pins. The edge/level select bits,
ELSxB:ELSxA, determine whether the PTD4/TCH0 and PTD5/TCH1 pins are timer channel I/O pins
or general-purpose I/O pins. See
Chapter 8 Timer Interface Module (TIM)
.
Address:
$0003
Bit 7
6
5
4
3
2
1
Bit 0
Read:
PTD7
PTD6
PTD5
PTD4
PTD3
PTD2
PTD1
PTD0
Write:
Reset:
Unaffected by reset
Additional Functions:
LED
(Sink)
LED
(Sink)
LED
(Sink)
LED
(Sink)
ADC8
ADC9
ADC10
ADC11
TCH1
TCH0
25mA sink
(Slow Edge)
5k pull-up
25mA sink
(Slow Edge)
5k pull-up
= Unimplemented
Figure 10-9. Port D Data Register (PTD)