English
Language : 

MC68HC08AZ32A Datasheet, PDF (161/312 Pages) Motorola, Inc – HCMOS Microcontroller Unit
Port D
13.5 Port D
Port D is an 8 -bit special function port that shares seven of it’s pins with the ADC module and two with
the TIMA and TIMB modules
13.5.1 Port D Data Register (PTD)
The port D data register contains a data latch for each of the eight port D pins.
Address: $0003
Bit 7
Read:
PTD7
Write:
Reset:
Alternative Functions:
6
PTD6
ATD14
TACLK
5
PTD5
ATD13
4
3
PTD4
PTD3
Unaffected by reset
ATD12 ATD11
TBCLK
2
PTD2
ATD10
1
PTD1
ATD9
Bit 0
PTD0
ATD8
Figure 13-11. Port D Data Register (PTD)
PTD[7:0] — Port D Data Bits
PTD[7:0] are read/write, software programmable bits. Data direction of PTD[7:0] pins are under the
control of the corresponding bit in data direction register D.
ATD[14:8] — ADC Channel Status Bits
PTD6/ATD14/TACLK–PTD0/ATD8 are seven of the 15 ADC channels. The ATD channel select bits,
CH[4:0], determine whether the PTD6/ATD14/ TACLK–PTD0/ATD8 pins are ADC channels or
general-purpose I/O pins. If an ADC channel is selected and a read of this corresponding bit in the port
B data register occurs, the data will be 0 if the data direction for this bit is programmed as an input.
Otherwise the data will reflect the value in the data latch.
NOTE
Data direction register D (DDRD) does not affect the data direction of port
D pins that are being used by the TIMA or TIMB. However, the DDRD bits
always determine whether reading port D returns the states of the latches
to a 0.
TACLK/TBCLK — Timer Clock Input
The PTD6/ATD14/TACLK pin is the external clock input for the TIMA. The PTD4/TBCLK pin is the
external clock input for the TIMB.The prescaler select bits, PS[2:0], select PTD6/ATD14/TACLK or
PTD4/TBCLK as the TIM clock input (see 17.8.1 TIMA Status and Control Register and 18.8.1 TIMB
Status and Control Register). When not selected as the TIM clock, PTD6/TACLK and PTD4/TBCLK
are available for general-purpose I/O. While TACLK/TBCLK are selected, corresponding DDRD bits
have no effect.
MC68HC08AZ32A Data Sheet, Rev. 2
Freescale Semiconductor
161