RL78/G10 CHAPTER 4 PORT FUNCTIONS
R01UH0384EJ0311 Rev. 3.11 59
Dec 22, 2016
4.2.1 Port 0
Port 0 is an I/O port with output latches. Port 0 can be set to the input mode or output mode in 1-bit units using port
mode register 0 (PM0). When the P00 to P07
Note
pins are used as input pins, use of the on-chip pull-up resistors can be
specified in 1-bit units by pull-up resistor option register 0 (PU0).
Output from the P01, P02, P06, and P07 pins can be specified as N-ch open-drain (VDD tolerant) in 1-bit units using
port output mode register 0 (POM0).
This port can also be used for serial interface data I/O, clock I/O, analog input, key return input, clock/buzzer output,
timer I/O, and external interrupt request input.
Reset signal generation sets P00 to input mode, and sets P01 to P07 to analog input mode.
Note For 10-pin products, P00 to P04; for 16-pin products, P00 to P07.
4.2.2 Port 4
Port 4 is an I/O port with an output latch. Port 4 can be set to the input mode or output mode in 1-bit units using port
mode register 4 (PM4). When the P40 and P41 pins
Note
are used as an input pin, use of the on-chip pull-up resistor can
be specified in 1-bit units by pull-up resistor option register 4 (PU4).
This port can also be used for data I/O for a flash memory programmer/debugger, key return input, clock/buzzer output,
timer I/O, and external interrupt request input.
Note For 10-pin products, P40; for 16-pin products, P40 and P41.
4.2.3 Port 12
Port 12 is an input-only port. Use of an on-chip pull-up resistor can be specified for P125 using pull-up resistor option
register 12 (PU12) (the on-chip pull-up resistor is always valid when RESET input is selected (PORTSELB = 1)).
This port can also be used for key return input, external interrupt request input, connecting resonator for main system
clock, external clock input for main system clock, and reset input.
Note Once the power is turned on, P125 functions as the RESET input. The PORTSELB bit of the option byte
(000C1H) defines whether this port operates as P125/KR1 or RESET. When this pin is set to P125/KR1, do not
input the low level to this pin during a reset by the selectable power-on-reset (SPOR) circuit and during the
period from release from the reset by the SPOR circuit to the start of normal operation. If input of the low level
continues during this period, the chip will remain in the reset state in response to the external reset. Accordingly,
the pull-up resistor is enabled after power is turned on.
4.2.4 Port 13
Port 13 is an input-only port.
This port can also be used for timer input and external interrupt request input.