55
CHAPTER 4 PORT FUNCTIONS
4.2 Port Configuration
A port consists of the following hardware:
Table 4-2. Port Configuration
Item Configuration
Control register Port mode register (PMm: m = 0, 1, 3, 5, 7, 10)
Pull-up resistor option register (PUOH, PUOL)
Port Total: 33 ports (1 input, 32 inputs/outputs)
Pull-up resistor
Total: 32 (software specifiable)
4.2.1 Port 0
Port 0 is an 4-bit input/output port with output latch. P01 to P03 pins can specify the input mode/output mode in
1-bit units with the port mode register 0 (PM0). P00 pin is input-only port. When P01 to P03 pins are used as input
ports, an on-chip pull-up resistor can be used to them in 3-bit units with a pull-up resistor option register L (PUOL).
Dual-functions include external interrupt request input.
RESET input sets port 0 to input mode.
Figures 4-2 and 4-3 show block diagrams of port0.
Caution Because port 0 also serves for external interrupt request input, when the port function output
mode is specified and the output level is changed, the interrupt request flag is set. Thus, when
the output mode is used, set the interrupt mask flag to 1.