![](http://datasheet.mmic.net.cn/370000/P3S12XEP100J1CAGR_datasheet_16728231/P3S12XEP100J1CAGR_114.png)
Chapter 2 Port Integration Module (S12XEPIMV1)
MC9S12XE-Family Reference Manual , Rev. 1.07
114
Freescale Semiconductor
2.3.20
Port K Data Direction Register (DDRK)
1
Read: Anytime. In emulation modes, read operations will return the data from the external bus, in all other modes the data
source is depending on the data direction value.
Write: Anytime. In emulation modes, write operations will also be directed to the external bus.
Table 2-17. PORTK Register Field Descriptions
Field
Description
7-0
PK
Port K general purpose input/output data
—Data Register
Port K pins 7 through 0 are associated with external bus control signals and internal memory expansion emulation
pins. These include ADDR[22:16], No-Access (NOACC), External Wait (EWAIT) and instruction pipe signals
IQSTAT[3:0]. Bits 6-0 carry the external addresses in all expanded modes. In emulation modes the address is
multiplexed with the alternate functions NOACC and IQSTAT on the respective pins.
When not used with the alternative function, these pins can be used as general purpose I/O.
If the associated data direction bits of these pins are set to 1, a read returns the value of the port register, otherwise
the buffered pin input state is read.
Address 0x0033 (PRR)
Access: User read/write
1
1
Read: Anytime. In emulation modes, read operations will return the data from the external bus, in all other modes the data
source is depending on the data direction value.
Write: Anytime. In emulation modes, write operations will also be directed to the external bus.
7
6
5
4
3
2
1
0
R
DDRK7
DDRK6
DDRK5
DDRK4
DDRK3
DDRK2
DDRK1
DDRK0
W
Reset
0
0
0
0
0
0
0
0
Figure 2-18. Port K Data Direction Register (DDRK)
Table 2-18. DDRK Register Field Descriptions
Field
Description
7-0
DDRK
Port K Data Direction
—
This register controls the data direction of pins 7 through 0.
The external bus function controls the data direction for the associated pins. In this case the data direction bits will
not change.
When operating a pin as a general purpose I/O, the associated data direction bit determines whether it is an input
or output.
1 Associated pin is configured as output.
0 Associated pin is configured as high-impedance input.