CHAPTER 13 A/D CONVERTER
Page 312 of 920
13.7
A/D Converter Setup Flowchart
The A/D converter setup flowchart in each operation mode is described below.
13.7.1
Setting up software trigger mode
Figure 13 - 24 Setting up Software Trigger Mode
Note
Depending on the settings of the ADRCK bit and ADUL/ADLL register, there is a possibility of no interrupt signal being
generated. In this case, the results are not stored in the ADCR, ADCRH register.
Start of setup
PER0 register setting
ADPC and PMCx register
settings
The ADCEN bit of the PER0 register is set (1), and supplying the clock starts.
The ports are set to analog input.
ANI0 to ANI2, ANI13, and ANI14 pins: Set using the ADPC register
ANI19 pin: Set using the PMCx register
The ports are set to the input mode.
• ADM0 register
FR2 to FR0, LV1, and LV0 bits:
These are used to specify the A/D conversion time.
• ADM1 register
ADTMD1 and ADTMD0 bits:
These are used to specify the software trigger mode .
ADSCM bit: Sequential conversion mode/one-shot conversion mode
• ADM2 register
ADREFP0 and ADREFM bits:
These are used to select the reference voltage .
ADRCK bit: This is used to select the range for the A/D conversion result
comparison value generated by the interrupt signal from
AREA1, AREA3, and AREA2.
ADTYP bit: 8-bit/10-bit resolution
• ADUL/ADLL register
These are used to specify the upper limit and lower limit A /D conversion
result comparison values.
• ADS register
ADS4 to ADS0 bits: These are used to select the analog input channels .
PM register setting
• ADM0 register setting
• ADM1 register setting
• ADM2 register setting
• ADUL/ADLL register setting
• ADS register setting
(The order of the settings is
irrelevant.)
ADCE bit setting
Reference voltage stabilization
wait time count
ADCS bit setting
Start of A/D conversion
The A/D conversion operations are performed.
End of A/D conversion
Storage of conversion results in
the ADCR and ADCRH registers
The ADCE bit of the ADM0 register is set (1), and the system enters the A/D
conversion standby status.
The reference voltage stabilization wait time (1 µs) is counted by the software.
After counting up to the reference voltage stabilization wait time B ends , the
ADCS bit of the ADM0 register is set (1), and A/D conversion starts.
The A/D conversion end interrupt (INTAD) is generated.
Note
The conversion results are stored in the ADCR and ADCRH registers.
Summary of Contents for RL78/G1H
Page 941: ...R01UH0575EJ0120 RL78 G1H...