CHAPTER 4 PORT FUNCTIONS
User’s Manual U15075EJ2V1UD
95
4.3 Registers Controlling Port Function
The ports are controlled by the following two types of registers.
•
Port mode registers (PM0 to PM3, PM5, PM7 to PM9)
•
Pull-up resistor option registers (PU0, PUB2, PUB3, PUB7 to PUB9)
(1) Port mode registers (PM0 to PM3, PM5, PM7 to PM9)
These registers are used to set port input/output in 1-bit units.
The port mode registers are independently set with a 1-bit or 8-bit memory manipulation instruction.
RESET input sets the registers to FFH.
When port pins are used as alternate-function pins, set the port mode register and output latch according to
Table 4-3.
Caution As port 3 has an alternate function as external interrupt input, when the port function
output mode is specified and the output level is changed, the interrupt request flag is set.
When the output mode is used, therefore, the interrupt mask flag should be preset to 1.