52
CHAPTER 2 PIN FUNCTIONS
User’s Manual U14701EJ3V0UD
2.2.5 P40 to P47 (Port 4)
These are 8-bit I/O ports. They can be specified as input or output ports in 1-bit units with port mode register 4
(PM4). On-chip pull-up resistors can be used by setting pull-up resistor option register 4 (PU4).
Interrupt request flag (KRIF) can be set to 1 by detecting the falling edge. The number of ports to detect the falling
edge can be selected at either four (P40 to P43) or eight (P40 to P47) by setting bit 0 (KRSEL0) of the key return
switching register (KRSEL).
Cautions 1. Be sure to set memory expansion mode register (MEM) to 01H when using falling edge
detection interrupt (INTKR).
2. If the number of key returns is set to four, the key return function cannot be evaluated with
in-circuit emulator.
2.2.6 P50 to P57 (Port 5)
These are 8-bit I/O ports. They can be specified as input or output ports in 1-bit units with port mode register 5
(PM5). On-chip pull-up resistors can be used by setting pull-up resistor option register 5 (PU5).
2.2.7 P60 to P67 (Port 6)
These are 8-bit I/O ports. They can be specified as input or output ports in 1-bit units with port mode register 6
(PM6). Port 6 can drive LEDs directly.
P60 to P63 are medium-voltage N-ch open-drain. On-chip pull-up resistors can be used by a mask option with
the mask ROM versions.
P64 to P67 can use on-chip pull-up resistors by setting pull-up resistor option register 6 (PU6).
2.2.8 P70 to P73 (Port 7)
These are 4-bit I/O ports. Besides serving as I/O ports, they function as timer I/O.
(1) Port mode
These ports function as 4-bit I/O ports. They can be specified as input or output ports in 1-bit units with port
mode register 7 (PM7). On-chip pull-up resistors can be used by setting pull-up resistor option register 7 (PU7).
(2) Control mode
These ports function as timer I/O.
(a) TI4
External count clock input pin to 16-bit timer/event counter 4.
(b) TI52
External count clock input pin to 8-bit timer/event counter 52.
(c) TO4 and TO52
Timer output pins.