Port Mode Register 2 (Pm2) - Renesas RL78/G1P Hardware User Manual

16-bit single-chip microcontroller
Hide thumbs Also See for RL78/G1P:
Table of Contents

Advertisement

RL78/G1P

10.3.5 Port mode register 2 (PM2)

When using ANO0/ANI2/P22 and ANO1/ANI3/P23 pins as analog input ports, set bits PM22 and PM23 to 1.
If bits PM22 and PM23 are set to 0, these pins cannot be used as analog input ports.
The PM2 register can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation sets this register to FFH.
Caution If a pin is set as an analog input port, not the pin level but 0 is always read.
Address: FFF22H
After reset: FFH
Symbol
7
PM2
PM27
PM2n
0
1
Note These are not provided in 24-pin products.
The function of the ANO0/ANI2/P22 to ANO1/ANI3/P23 pins can be selected by using the A/D port configuration
register (ADPC), the D/A converter mode register (DAM), the analog input channel specification register (ADS), and the
PM2 register.
Table 10-2. Setting Functions of ANO0/ANI2/P22 to ANO1/ANI3/P23 Pins
ADPC
PM2
Digital I/O selection
Input mode
Output mode
Analog I/O selection Input mode
Output mode Enables D/A
R01UH0895EJ0100 Rev.1.00
Nov 29, 2019
Figure 10-6. Format of Port Mode Register 2 (PM2)
R/W
6
5
Note
Note
PM26
PM25
Output mode (output buffer on)
Input mode (output buffer off)
DAM
Enables D/A
conversion operation
Stops D/A conversion
operation
conversion operation
Stops D/A conversion
operation
4
3
Note
PM24
PM23
P2n pin I/O mode selection (n = 0 to 7)
ADS
Functions of ANO0/ANI2/P22 to ANO1/ANI3/P23
Digital input
Digital output
Selects ANI.
Setting prohibited
Does not
Analog output
select ANI.
Selects ANI.
Analog input (to be converted)
Does not
Analog input (not to be converted)
select ANI.
Selects ANI.
Setting prohibited
Does not
select ANI.
Selects ANI.
Does not
select ANI.
CHAPTER 10 D/A CONVERTER
2
1
PM22
PM21
Pins
0
PM20
304

Advertisement

Table of Contents
loading

Table of Contents