89
CHAPTER 4 PORT FUNCTIONS
User’s Manual U15798EJ2V0UD
4.2 Port Configuration
A port consists of the following hardware.
Table 4-2. Port Configuration
Item
Configuration
Control registers
Port mode register (PMm: m = 0, 2 to 4, 8 to 11)
Pull-up resistor option register (PUm: m = 0, 2 to 4)
Memory expansion register (MEM)
Pin function switching registers (PF8 to PF11)
Port
Total: 66 (input: 8, I/O: 58)
Pull-up resistors
•
µ
PD780343, 780344, 780353, 780354
Total: 30 (software control: 24, mask option: 6)
•
µ
PD780343Y, 780344Y, 780353Y, 780354Y
Total: 28 (software control: 24, mask option: 4)
•
µ
PD78F0354, 78F0354Y
Total: 24 (software control: 24)
4.2.1 Port 0
Port 0 is an 8-bit I/O port with an output latch. The P00 to P07 pins can be set to input mode/output mode in 1-
bit units using port mode register 0 (PM0). An on-chip pull-up resistor can be used for the P00 to P07 pins in 1-bit
units using pull-up resistor option register 0 (PU0).
This port can also be used for external interrupt request input, A/D converter external trigger input, clock output,
and timer I/O.
RESET input sets port 0 to input mode.
Figures 4-2 and 4-3 show block diagrams of port 0.
Caution Because port 0 also serves as an 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.