EasyManuals Logo
Home>Renesas>Microcontrollers>RL78/G15

Renesas RL78/G15 User Manual

Renesas RL78/G15
765 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #337 background imageLoading...
Page #337 background image
RL78/G15 CHAPTER 10 A/D CONVERTER
R01UH0959EJ0110 Rev.1.10 Page 337 of 765
Mar 7, 2023
10.7.2 Setting up the internal reference voltage for A/D conversion
Figure 10-15. Setting up Internal Reference Voltage for A/D Conversion
Start of setup
End
Set the PER0 register
Set the ADTES register
Count the A/D voltage stabilization wait time
Set the ADCS bit
Start of discharging
Set the ADCS bit
Start of A/D conversion
End of A/D conversion
The conversion results are stored in
the ADCR and ADCRH registers
The ADCEN bit of the PER0 register is set (1), and a clock is supplied
to the A/D converter.
Set the ADCE bit
Count the stabilization wait time (0.125 μs) by software.
After counting of the stabilization wait time ends, the ADCS bit of the
ADM0 register is set (1) and discharging the sampling capacitor starts.
At the same time, the A/D conversion end interrupt request signal
(INTAD) is generated, and the ADCS bit of the ADM0 register is
automatically cleared (0) (conversion standby state).
End of A/D
conversion
Set the ADTES register
The ADCS bit of the ADM0 register is set (1) and A/D conversion starts.
A/D conversion ends and the conversion results are stored in the
ADCR and ADCRH registers.
At the same time, the A/D conversion end interrupt request signal
(INTAD) is generated, and the ADCS bit of the ADM0 register is
automatically cleared (0) (conversion standby state).
Set the ADM0 register
Set the ADM2 register
Set the ADS register
(The order of setting is irrelevant.)
The conversion time and each mode of the A/D converter are set.
A/D converter mode register 0 (ADM0)
The LV0 bit is set to 0. FR1 and FR0 bits: Select the A/D conversion time.
A/D converter mode register 2 (ADM2)
ADTYP bit: Select 10-bit or 8-bit resolution.
Analog input channel specification register (ADS)
Set the ADS3, ADS2, ADS1, and ADS0 bits = 1101B. Select the internal
reference voltage (0.815 V (typ.)) as the target of A/D conversion.
Select V
SS
as the target of A/D conversion to perform conversion with
discharge of the sampling capacitor.
The ADTES1 bit of the ADTES register is set (1).
The operation of the A/D voltage comparator is started.
The ADCE bit of the ADM0 register is set (1), and the system enters
the conversion standby state.
After discharging ends, the target of A/D conversion is changed to the
internal reference voltage (0.815 V (typ.)).
The ADTES1 bit of the ADTES register is cleared (0).
First A/D
conversion
Second
and
subsequent
rounds
of A/D
conversion

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas RL78/G15 and is the answer not in the manual?

Renesas RL78/G15 Specifications

General IconGeneral
BrandRenesas
ModelRL78/G15
CategoryMicrocontrollers
LanguageEnglish

Related product manuals