CHAPTER 14 PORT FUNCTIONS
User’s Manual U14359EJ4V0UM
484
14.3.8 Port AL
Port AL (PAL) is a 16-bit I/O port that can be set to the input or output mode in 1-bit units.
When the higher 8 bits of port AL are used as port ALH (PALH) and the lower 8 bits as port ALL (PALL), port AL
becomes two 8-bit ports that can be set in the input or output mode in 1-bit units.
15
14
13
12
11
10
9
8
Address
After reset
PAL
PAL15
PAL14
PAL13
PAL12
PAL11
PAL10
PAL9
PAL8
FFFFF001H
Undefined
7
6
5
4
3
2
1
0
Address
PAL7
PAL6
PAL5
PAL4
PAL3
PAL2
PAL1
PAL0
FFFFF000H
Bit position
Bit name
Function
15 to 0
PALn
(n = 15 to 0)
Port AL
I/O port
In addition to their functions as port pins, in the control mode, the port AL pins operate as an address bus for when
the memory is externally expanded.
(1) Operation in control mode
Port
Alternate Function
Remark
Block Type
Port AL
PAL15 to
PAL0
A15 to A0
Address bus when memory
expanded
J
(2) I/O mode/control mode setting
The port AL I/O mode setting is performed by the port AL mode register (PMAL), and control mode setting is
performed by the port AL mode control register (PMCAL).
(a) Port AL mode register (PMAL)
The port AL mode register (PMAL) can be read/written in 16-bit units.
If the higher 8 bits of PMAL are used as port AL mode register H (PMALH), and the lower 8 bits as port
AL mode register L (PMALL), these two 8-bit port mode registers can be read/written in 8-bit or 1-bit
units.
15
14
13
12
11
10
9
8
Address
After reset
PMAL
PMAL15
PMAL14 PMAL13
PMAL12
PMAL11
PMAL10
PMAL9
PMAL8
FFFFF021H
FFFFH
7
6
5
4
3
2
1
0
Address
PMAL7
PMAL6
PMAL5
PMAL4
PMAL3
PMAL2
PMAL1
PMAL0
FFFFF020H
Bit position
Bit name
Function
15 to 0
PMALn
(n = 15 to 0)
Port Mode
Specifies input/output mode for PALn pin.
0: Output mode (output buffer on)
1: Input mode (output buffer off)