96
CHAPTER 4 PORT FUNCTIONS
User
’
s Manual U14701EJ3V0UD
4.2 Port Configuration
A port consists of the following hardware.
Table 4-3. Port Configuration
Item
Configuration
Control registers
Port mode register (PMm: m = 0, 2 to 7, 8
Note
, 9
Note
, 12)
Pull-up resistor option register (PUm: m = 0, 2 to 7, 12)
Memory expansion register (MEM)
Key return switching register (KRSEL)
Pin function switching registers 8 and 9 (PF8 and PF9)
Note
Ports
μ
PD780316, 780318, 78F0338
Total: 70 (input: 8, output: 16, I/O: 46)
μ
PD780326, 780328
Total: 62 (input: 8, output: 8, I/O: 46)
μ
PD780336, 780338
Total: 54 (input: 8, I/O: 46)
Pull-up resistor
Mask ROM version
Total: 46 (software control: 42, mask option: 4)
Flash memory version
Total: 42 (software control: 42)
Note
μ
PD78F0338 only
4.2.1 Port 0
Port 0 is a 6-bit I/O port with output latch. Input/output mode can be specified for pins P00 to P05 in 1-bit units
using port mode register 0 (PM0). An on-chip pull-up resistor can be used for the P00 to P05 pins in 1-bit units using
pull-up resistor option register 0 (PU0).
This port can also be used as an external interrupt request input, A/D converter external trigger input, clock output,
and buzzer output.
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.