75
CHAPTER 4 PORT FUNCTIONS
Preliminary User’s Manual U16035EJ1V0UM
4.2 Configuration of Ports
A port consists of the following hardware.
Table 4-2. Configuration of Ports
Item
Configuration
Control register
Port mode register (PMm: m = 0, 2 to 5, 7)
Pull-up resistor option register (PUm,: m = 0, 2 to 5, 7)
Port
Total: 39 ports (4 inputs, 35 inputs/outputs)
Pull-up resistor
Total: 39 (software control)
4.2.1 Port 0
Port 0 is a 4-bit I/O port with output latch. P00 to P03 pins can specify the input mode/output mode in 1-bit units
with the port mode register 0 (PM0). An on-chip pull-up resistor of P00 to P03 pins can be used for them in 1-bit
units with a pull-up resistor option register 0 (PU0).
This port can also be used as an external interrupt request input, and A/D converter external trigger input.
RESET input sets port 0 to input mode.
Figure 4-2 shows a block diagram of port 0.
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.