RL78/G1P
CHAPTER 4 PORT FUNCTIONS
R01UH0895EJ0100 Rev.1.00
89
Nov 29, 2019
4.3.5 A/D port configuration register (ADPC)
This register switches the ANI0/P20to ANI7/P27 pins to digital I/O of port or analog input of A/D converter.
The ADPC register can be set by an 8-bit memory manipulation instruction.
Reset signal generation clears this register to 00H.
Figure 4-20. Format of A/D Port Configuration Register (ADPC)
Address: F0076H After reset: 00H R/W
Symbol
7 6 5 4 3 2 1 0
ADPC ADPC7 ADPC6
Note
ADPC5
Note
ADPC4
Note
ADPC3 ADPC2 ADPC1 ADPC0
ADPCn
Analog input (A)/digital I/O (D) selection of P2n/ANIn
0
Analog input (A) (default)
1
Digital I/O (D)
Note
These are not provided in 24-pin products.
Cautions 1. Set the port to analog input by ADPC register to the input mode by using port mode register 2
(PM2).
2. Do not set the pin set by the ADPC register as digital I/O by the analog input channel
specification register (ADS).
3. When using AV
REFP
and AV
REFM
, set ANI0 and ANI1 to analog input and set the port mode register
to the input mode.