Datasheet
RL78/L12 CHAPTER 23 SAFETY FUNCTIONS
R01UH0330EJ0200 Rev.2.00 794
Dec 13, 2013
23.3.8.2 Analog input channel specification register (ADS)
This register specifies the input channel of the analog voltage to be A/D converted.
Set A/D test register (ADTES) to 00H when measuring the ANIxx/temperature sensor output
/internal reference
voltage (1.45 V).
The ADS register can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation clears this register to 00H.
Figure 23-17. Format of Analog Input Channel Specification Register (ADS)
Address: FFF31H After reset: 00H R/W
Symbol 7 6 5 4 3 2 1 0
ADS ADISS 0 0 ADS4 ADS3 ADS2 ADS1 ADS0
ADISS ADS4 ADS3 ADS2 ADS1 ADS0
Analog input
channel
Input source
0 0 0 0 0 0 ANI0 P20/ANI0/AVREFP pin
0 0 0 0 0 1 ANI1 P21/ANI1/AVREFM pin
0 1 0 0 0 0 ANI16 P41/ANI16 pin
0 1 0 0 0 1 ANI17 P120/ANI17 pin
0 1 0 0 1 0 ANI18 P13/ANI18 pin
0 1 0 0 1 1 ANI19 P14/ANI19 pin
0 1 0 1 0 0 ANI20 P142/ANI20 pin
0 1 0 1 0 1 ANI21 P143/ANI21 pin
0 1 0 1 1 0 ANI22 P144/ANI22 pin
0 1 0 1 1 1 ANI23 P145/ANI23 pin
1 0 0 0 0 0
−
Temperature sensor output
Note
1 0 0 0 0 1
−
Internal reference voltage
output (1.45 V)
Note
Other than the above Setting prohibited
Note Can only be used in HS (high-speed main) mode.
Cautions 1. Be sure to clear bits 5 and 6 to 0.
2. Select input mode for the ports which are set to analog input with the ADPC and PMC
registers, using the port mode registers 1, 2, 12, and 14 (PM1, PM2, PM, PM12, and PM14).
3. Do not use the ADS register to set the pins which should be set as digital I/O with the A/D
port configuration register (ADPC).
4. Do not use the ADS register to set the pins which should be set as digital I/O with the port
mode control registers 1, 4, 12, and 14 (PMC1, PMC4, PMC12, and PMC14).
5. Only rewrite the value of the ADISS bit while conversion operation is stopped (ADCS = 0,
ADCE = 0).
6. If using AV
REFP as the + side reference voltage source of the A/D converter, do not select
ANI0 as an A/D conversion channel.
7. If using AV
REFM as the − side reference voltage source of the A/D converter, do not select
ANI1 as an A/D conversion channel.
8. When ADISS is 1, the internal reference voltage (1.45 V) cannot be used for the positive
reference voltage. In addition, the first conversion result obtained after setting ADISS to 1
is not available. For detailed setting flow, see 11.7.4 Setup when temperature sensor
<R>