RL78/F13, F14 CHAPTER 4 PORT FUNCTIONS
R01UH0368EJ0210 Rev.2.10 220
Dec 10, 2015
4.2.3 Port 3
Port 3 is an I/O port with an output latch. Port 3 can be set to the input mode or output mode in 1-bit units using port
mode register 3 (PM3). When the P30 to P32 pins are used as an input port, use of an on-chip pull-up resistor can be
specified in 1-bit units by pull-up resistor option register 3 (PU3).
Input to the P30 pin can be specified through a normal input buffer or a TTL input buffer in 1-bit units using port input
mode register 3 (PIM3). For the P30 pin input, the threshold of the input buffer can be specified in 1-bit units using the
port input threshold control register 3 (PITHL3).
This port can also be used for external interrupt request input, timer I/O, serial interface slave select input, SNOOZE
status output, and STOP status output.
P33 and P34 can also be used for A/D converter analog input and reference voltage input (+side and – side).
To use P33/ANI0 and P34/ANI1 as digital input pins, set them in the digital I/O mode by using the A/D port
configuration register (ADPC) and in the input mode by using the PM3 register. Use these pins starting from the upper bit.
To use P33/ANI0 and P34/ANI1 as digital output pins, set them in the digital I/O mode by using the A/D port
configuration register (ADPC) and in the output mode by using the PM3 register. Use these pins starting from the upper
bit.
To use P33/ANI0 and P34/ANI1 as analog I/O pins, set them in the analog I/O mode by using the A/D port
configuration register (ADPC) and in the input mode by using the PM3 register. Use these pins starting from the lower bit.
Reset signal generation sets P30 to P32 to input mode and P33/ANI0 and P34/ANI1 to analog input mode.
Table 4-5. Settings of Registers When Using Port 3 (P30 to P32) (1)
Pin name PM3x PIM3x PITHL3x Alternate Function Setting
Note 5
Remark
Name I/O
P30 Input 1 0 0 × CMOS input
(Schmitt1 input)
1 CMOS input
(Schmitt3 input)
1 × × TTL input
Output 0 × × TRDIOD1 output = 0
Note 1
TO01 output = 0
Note 2
SNZOUT0 output = 0
Note 3
P31 Input 1 – – ×
Output 0 – – TO14 output = 0
Note 2
STOPST output = 0
Note 4
P32 Input 1 – – ×
Output 0 – – TO16 output = 0
Note 2
Notes 1. When a pin sharing a timer RD function is to be used as a general-purpose port pin, the target bit for
TRDIOij pin output control in the timer RD output master enable register 1 (TRDOER1) must have the
same setting as its initial value (i = A, B, C, D, j = 0, 1)
2. When a pin sharing a timer output function of the timer array unit is to be used as a general-purpose port
pin, the TOmn bit of the timer output register m (TOm) and the TOEmn bit of the timer output enable
register m (TOEm) corresponding to the target unit and channel must have the same setting as in the initial
state (m = 0, 1, n = 0 to 7).
3. When a pin sharing the SNOOZE status output function is to be used as a general-purpose port pin, the
OUTEN0 to OUTEN7 bits of the SNOOZE status output control registers 0, 1, 2, 3 (PSNZCNT0, 1, 2, 3)
must have the same setting as its initial value.
4. When a pin sharing the STOP status output function is to be used as a general-purpose port pin, the
STPOEN bit of the STOP status output control register (STPSTC) must have the same setting as its initial
value.
5. Functions in parentheses can be assigned via settings in the peripheral I/O redirection registers 0 to 8
(PIOR0 to PIOR8).