GENERAL-PURPOSE I/O (PORT C)
MOTOROLA
PORT C
6 - 5
If a pin is configured as a GPIO
output
and the processor reads the PCD, the processor
sees the contents of the PCD rather the logic level on the pin, which allows the PCD to be
used as a general purpose 15-bit register. If the processor writes to the PCD, the data is
latched there and appears on the pin during the following instruction cycle (see
).
If a pin is configured as a
serial interface
(SCI or SSI) pin, the Port C GPIO registers can
be used to help in debugging the serial interface. If the PCDDR bit for a given pin is
cleared (configured as an input), the PCD will show the logic level on the pin, regardless
of whether the serial interface function is using the pin as an input or an output. If the PCD-
DR is set (configured as an output) for a given serial interface pin, when the processor
reads the PCD, it sees the contents of the PCD rather than the logic level on the pin —
another case which allows the PCD to act as a general purpose register.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
CC
0
23
0
X:$FFE1
PORT C CONTROL
REGISTER (PCC)
CCx
Function
0
GPIO
1
Serial Interface
CD
0
23
0
X:$FFE3
PORT C DATA
DIRECTION
REGISTER (PCDDR)
CDx
Data Direction
0
Input
1
Output
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
CD
1
CD
2
CD
3
CD
4
CD
5
CD
6
CD
7
CD
8
PD
0
23
0
X:$FFE5
PORT C DATA
REGISTER (PCD)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
PD
1
PD
2
PD
3
PD
4
PD
5
PD
6
PD
7
PD
8
CC
1
CC
2
CC
3
CC
4
CC
5
CC
6
CC
7
CC
8
STD
SRD
SCK
SC2
SC1
SC0
SCLK
TXD
RXD
SSI
SCI
NOTE: Hardware and software reset clears PCC and PCDDR.
Figure 6-3 Port C GPIO Registers
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..