English
Language : 

S912XHZ512F1VAG Datasheet, PDF (71/978 Pages) Freescale Semiconductor, Inc – Covers MC9S12XHZ384, MC9S12XHZ256
Chapter 2 Port Integration Module (S12XHZPIMV1)
2.3.2 Port C and Port D
Port C and port D pins can be used for either general-purpose I/O or the external data bus input/outputs
DATA15-DATA0. Refer to the S12X_EBI block description chapter for information on external bus.
2.3.2.1 Port C I/O Register (PTC)
Module Base + 0x0051
R
W
XEBI:
Reset
7
PTC7
DATA15
0
6
PTC6
DATA14
0
5
PTC5
4
PTC4
3
PTC3
2
PTC2
DATA13
DATA12
DATA11
DATA10
0
0
0
0
Figure 2-6. Port C I/O Register (PTC)
1
PTC1
DATA9
0
0
PTC0
DATA8
0
Read: Anytime. Write: Anytime.
If the data direction bit of the associated I/O pin (DDRCx) is set to 1 (output), a write to the corresponding
I/O Register bit sets the value to be driven to the Port C pin. If the data direction bit of the associated I/O
pin (DDRCx) is set to 0 (input), a write to the corresponding I/O Register bit takes place but has no effect
on the Port C pin.
If the associated data direction bit (DDRCx) is set to 1 (output), a read returns the value of the I/O register
bit. If the associated data direction bit (DDRCx) is set to 0 (input), a read returns the value of the pin.
2.3.2.2 Port D I/O Register (PTD)
Module Base + 0x0051
R
W
XEBI:
Reset
7
PTD7
DATA7
0
6
PTD6
DATA6
0
5
PTD5
4
PTD4
3
PTD3
2
PTD2
DATA5
DATA4
DATA3
DATA2
0
0
0
0
Figure 2-7. Port D I/O Register (PTD)
1
PTD1
DATA1
0
0
PTD0
DATA0
0
Read: Anytime. Write: Anytime.
If the data direction bit of the associated I/O pin (DDRDx) is set to 1 (output), a write to the corresponding
I/O Register bit sets the value to be driven to the Port D pin. If the data direction bit of the associated I/O
pin (DDRDx) is set to 0 (input), a write to the corresponding I/O Register bit takes place but has no effect
on the Port D pin.
If the associated data direction bit (DDRDx) is set to 1 (output), a read returns the value of the I/O register
bit. If the associated data direction bit (DDRDx) is set to 0 (input), a read returns the value of the pin.
MC9S12XHZ512 Data Sheet, Rev. 1.06
Freescale Semiconductor
71