English
Language : 

MC9S12NE64_06 Datasheet, PDF (415/554 Pages) Freescale Semiconductor, Inc – Microcontrollers
15.3.2.15 Port K Data Register (PORTK)
Memory Map and Register Definition
R
W
Reset
Alternate
Pin Function
7
Bit 7
0
ECS
6
5
4
3
2
6
5
4
3
2
0
0
0
0
0
XCS
XAB19
XAB18
XAB17
XAB16
Figure 15-19. Port K Data Register (PORTK)
1
1
0
XAB15
0
Bit 0
0
XAB14
Read: Anytime
Write: Anytime
This port is associated with the internal memory expansion emulation pins. When the port is not enabled
to emulate the internal memory expansion, the port pins are used as general-purpose I/O. When port K is
operating as a general-purpose I/O port, DDRK determines the primary direction for each port K pin. A 1
causes the associated port pin to be an output and a 0 causes the associated pin to be a high-impedance
input. The value in a DDR bit also affects the source of data for reads of the corresponding PORTK register.
If the DDR bit is 0 (input) the buffered pin input is read. If the DDR bit is 1 (output) the output of the port
data register is read.
This register is not in the map in peripheral or expanded modes while the EMK control bit in MODE
register is set. Therefore, these accesses will be echoed externally.
When inputs, these pins can be selected to be high impedance or pulled up, based upon the state of the
PUPKE bit in the PUCR register.
Table 15-13. PORTK Field Descriptions
Field
Description
7
Port K, Bit 7
Port K, Bit 7 — This bit is used as an emulation chip select signal for the emulation of the internal memory
expansion, or as general-purpose I/O, depending upon the state of the EMK bit in the MODE register. While
this bit is used as a chip select, the external bit will return to its de-asserted state (VDD) for approximately 1/4
cycle just after the negative edge of ECLK, unless the external access is stretched and ECLK is free-running
(ESTR bit in EBICTL = 0). See the MMC block description chapter for additional details on when this signal
will be active.
6
Port K, Bit 6
Port K, Bit 6 — This bit is used as an external chip select signal for most external accesses that are not
selected by ECS (see the MMC block description chapter for more details), depending upon the state the of
the EMK bit in the MODE register. While this bit is used as a chip select, the external pin will return to its de-
asserted state (VDD) for approximately 1/4 cycle just after the negative edge of ECLK, unless the external
access is stretched and ECLK is free-running (ESTR bit in EBICTL = 0).
5:0
Port K, Bits 5:0 — These six bits are used to determine which FLASH/ROM or external memory array page
Port K, Bits 5:0 is being accessed. They can be viewed as expanded addresses XAB19–XAB14 of the 20-bit address used to
access up to1M byte internal FLASH/ROM or external memory array. Alternatively, these bits can be used for
general-purpose I/O depending upon the state of the EMK bit in the MODE register.
MC9S12NE64 Data Sheet, Rev. 1.1
Freescale Semiconductor
415