RL78/G13 CHAPTER 4 PORT FUNCTIONS
R01UH0146EJ0100 Rev.1.00 249
Sep 22, 2011
4.2.16 Port 15
Port 15 is an I/O port with an output latch. Port 15 can be set to the input mode or output mode in 1-bit units using port
mode register 15 (PM15).
This port can also be used for A/D converter analog input.
To use P150/ANI8 to P156/ANI4 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 PM15 register. Use these pins starting from the upper
bit.
To use 150/ANI8 to P156/ANI4 as digital output pins, set them in the digital I/O mode by using the ADPC register and
in the output mode by using the PM15 register.
To use 150/ANI8 to P156/ANI4 as analog input pins, set them in the analog input mode by using the A/D port
configuration register (ADPC) and in the input mode by using the PM15 register. Use these pins starting from the lower bit.
Table 4-19. Settings of Registers When Using Port 15
Pin Name
Name I/O
PM15× ADPC Alternate Function Setting Remark
Input 1
−
P15n
Output 0
01H to
n+9H
To use P15n as a port, use these
pins from a higher bit.
Remarks 1. ×: don’t care
PM15×: Port mode register 15
ADPC: A/D port configuration register
2. n = 0 to 6
Table 4-20. Setting Functions of P150/ANI8 to P156/ANI14 Pins
ADPC Register PM15 Register ADS Register P150/ANI8 to P156/ANI14 Pins
Input mode
−
Digital input Digital I/O selection
Output mode
−
Digital output
Selects ANI. Analog input (to be converted) Input mode
Does not select ANI. Analog input (not to be converted)
Selects ANI.
Analog input selection
Output mode
Does not select ANI.
Setting prohibited
All P150/ANI8 to P156/ANI14 are set in the analog input mode when the reset signal is generated.
Figure 4-64 shows a block diagram of port 15.
<R>