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 #336 background imageLoading...
Page #336 background image
RL78/G15 CHAPTER 10 A/D CONVERTER
R01UH0959EJ0110 Rev.1.10 Page 336 of 765
Mar 7, 2023
10.7 A/D Converter Setup Flowchart
The A/D converter setup flowchart is described below.
10.7.1 Setting up ANI0 to ANI10 for A/D conversion
Figure 10-14. Setting up ANI0 to ANI10 for A/D Conversion
Start of setup
End
Set the PMCx and PMx registers
Set the PER0 register
Set the ADM0 register
Set the ADM2 register
Set the ADS register
(The order of setting is irrelevant.)
Set the ADCE bit
Count the A/D voltage stabilization wait time
Set the ADCS bit
A/D conversion operation
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.
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 counting of the stabilization wait time ends, the ADCS bit of
the ADM0 register is set (1) and A/D conversion starts.
The ports (ANI0 to ANI10) to be A/D converted are set to analog input.
Set the bits in the PMCx and PMx registers to 1.
The conversion time and each mode of the A/D converter are set.
A/D converter mode register 0 (ADM0)
FR1, FR0 and LV0 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)
ADS3, ADS2, ADS1, and ADS0 bits: Select ANI0 to ANI10
Note 1
as
the target of A/D conversion.
Count the stabilization wait time (0.125 μs) by software.
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).
Note 1. ANI0, ANI2, ANI3 for 8-pin products,
ANI0 to ANI3 for 10-pin products,
ANI0 to ANI6 for 16-pin products

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