English
Language : 

MC68HC908AT32 Datasheet, PDF (322/378 Pages) Freescale Semiconductor, Inc – Microcontrollers
MC68HC08AS20 Emulator Input/Output Ports
Table 27-3. Port C Pin Functions
DDRC
Bit
PTC
Bit
I/O Pin
Mode
Accesses to
DDRC
Read/Write
0
2
Input, Hi-Z
DDRC[7]
1
2
Output
DDRC[7]
0
X
Input, Hi-Z DDRC[4:0]
1
X
Output
DDRC[4:0]
X = don’t care
Hi-Z = high impedance
1. Writing affects data register, but does not affect input.
Accesses to PTC
Read
Pin
0
Pin
PTC[4:0]
Write
PTC2
—
PTC[4:0](1)
PTC[4:0]
27.5 Port D
Port D is an 8-bit, general-purpose I/O port.
27.5.1 Port D Data Register
Port D is a 7-bit special function port that shares all of its pins with the analog-to-digital converter.
Address: $0003
Bit 7
Read: 0
Write: R
Reset:
Alternate Functions: R
6
PTD6
ATD14/
TACLK
5
PTD5
ATD13
4
3
PTD4
PTD3
Unaffected by reset
ATD12 ATD11
2
PTD2
ATD10
1
PTD1
ATD9
Bit 0
PTD0
ATD8
R
= Reserved
Figure 27-11. Port D Data Register (PTD)
PTD[6:0] — Port D Data Bits
PTD[6:0] are read/write, software programmable bits. Data direction of PTD[6: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 analog-to-digital converter channels. The ADC
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. See Chapter 26 Analog-to-Digital
Converter (ADC-15).
NOTE
Data direction register D (DDRD) does not affect the data direction of port
D pins that are being used by the ADC. However, the DDRD bits always
determine whether reading port D returns the states of the latches or
logic 0.
MC68HC908AT32 Data Sheet, Rev. 3.1
322
Freescale Semiconductor