Справочник Пользователя для Motorola MC68HC908MR16
Advance Information
MC68HC908MR16/MC68HC908MR32 — Rev. 4.0
314
Input/Output (I/O) Ports
MOTOROLA
Input/Output (I/O) Ports
15.5 Port C
Port C is a 7-bit, general-purpose, bidirectional I/O port that shares two
of its pins with the analog-to-digital convertor module (ADC).
of its pins with the analog-to-digital convertor module (ADC).
15.5.1 Port C Data Register
The port C data register (PTC) contains a data latch for each of the
seven port C pins.
seven port C pins.
PTC[6:0] — Port C Data Bits
These read/write bits are software-programmable. Data direction of
each port C pin is under the control of the corresponding bit in data
direction register C. Reset has no effect on port C data.
each port C pin is under the control of the corresponding bit in data
direction register C. Reset has no effect on port C data.
15.5.2 Data Direction Register C
Data direction register C (DDRC) determines whether each port C pin is
an input or an output. Writing a logic 1 to a DDRC bit enables the output
buffer for the corresponding port C pin; a logic 0 disables the output
buffer.
an input or an output. Writing a logic 1 to a DDRC bit enables the output
buffer for the corresponding port C pin; a logic 0 disables the output
buffer.
Address:
$0002
Bit 7
6
5
4
3
2
1
Bit 0
Read:
0
PTC6
PTC5
PTC4
PTC3
PTC2
PTC1
PTC0
Write:
R
Reset:
Unaffected by reset
R
= Reserved
Figure 15-8. Port C Data Register (PTC)
Address:
$0006
Bit 7
6
5
4
3
2
1
Bit 0
Read:
0
DDRC6
DDRC5
DDRC4
DDRC3
DDRC2
DDRC1
DDRC0
Write:
R
Reset:
0
0
0
0
0
0
0
0
R
= Reserved
Figure 15-9. Data Direction Register C (DDRC)