
97
CHAPTER 6 PORT FUNCTIONS
User
’
s Manual U14260EJ3V1UD
6.2 Port Configuration
A port consists of the following hardware.
Table 6-3. Port Configuration
Item
Configuration
Control registers
Port mode register (PMm: m = 0, 2 to 8)
Port register (Pm: m = 0 to 8)
Pull-up resistor option register (PUm: m = 0, 2 to 8)
Ports
Total: 52 ports (8 inputs, 44 I/O)
Pull-up resistor
Mask ROM version
Total: 44 (software control: 40, mask option: 4
Note
)
Flash memory version Total: 40
Note
Two for the
μ
PD780078Y Subseries.
6.2.1 Port 0
Port 0 is a 4-bit I/O port with an output latch. Port 0 can be set to the input or output mode in 1-bit units using
port mode register 0 (PM0). An on-chip pull-up resistor can be connected to P00 to P03 in 1-bit units using pull-up
resistor option register 0 (PU0).
This port can also be used for external interrupt request input and A/D converter external trigger input.
RESET input sets port 0 to input mode.
Figure 6-2 shows a block diagram of port 0.
Cautions 1. Port 0 functions alternately as an external interrupt request input pin. If the output mode of
the port function is specified and the output level of the port is changed while interrupts are
not disabled by the external interrupt rising edge enable register (EGP) and external interrupt
falling edge enable register (EGN), the interrupt request flag is set. Thus, when the output
mode is used, set the interrupt mask flag to 1.
2. When the external interrupt request function is switched to the port function, edge detection
may be performed. Therefore, set bit n (EGPn) of EGP and bit n (EGNn) of EGN to 0 before
selecting the port mode.
3. When using P03/INTP3/ADTRG as an A/D converter external trigger input, specify valid edges
by setting bits 1 and 2 (EGA00 and EGA01) of A/D converter mode register 0 (ADM0) and set
the interrupt mask flag (PMK3) to 1.
Remark
n = 0 to 3