English
Language : 

MC9S12P128_10 Datasheet, PDF (87/566 Pages) Freescale Semiconductor, Inc – S12 Microcontrollers
2.3.40 Port P Data Register (PTP)
Port Integration Module (S12PPIMV1)
Address 0x0258
7
6
5
4
3
2
R
0
PTP7
PTP5
PTP4
PTP3
PTP2
W
Altern.
Function
—
—
PWM5
PWM4
PWM3
PWM2
Reset
0
0
0
0
0
0
Figure 2-38. Port P Data Register (PTP)
1. Read: Anytime. The data source is depending on the data direction value.
Write: Anytime
Access: User read/write(1)
1
0
PTP1
PTP0
PWM1
0
PWM0
0
Field
7
PTP
5
PTP
4-0
PTP
Table 2-35. PTP Register Field Descriptions
Description
Port P general purpose input/output data—Data Register, pin interrupt input/output
The associated pin can be used as general purpose I/O. In general purpose output mode the register bit value is
driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• Pin interrupts can be generated if enabled in input or output mode.
Port P general purpose input/output data—Data Register, PWM input/output, pin interrupt input/output
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The PWM function takes precedence over the general purpose I/O function if the related channel or the
emergency shut-down feature is enabled.
• Pin interrupts can be generated if enabled in input or output mode.
Port P general purpose input/output data—Data Register, PWM output, pin interrupt input/output
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The PWM function takes precedence over the general purpose I/O function if the related channel is enabled.
• Pin interrupts can be generated if enabled in input or output mode.
S12P-Family Reference Manual, Rev. 1.13
Freescale Semiconductor
87