R01UH0823EJ0100 Rev.1.00 Page 1567 of 1823
Jul 31, 2019
RX23W Group 44. 12-Bit A/D Converter (S12ADE)
44.2.25 A/D Compare Function Window A Lower-Side Level Setting Register
(ADCMPDR0)
ADCMPDR0 is a readable/writable register that sets the reference data when the compare window A function is used.
ADCMPDR0 sets the lower-side level of window A.
The ADCMPDR0 register is writable even during A/D conversion. The reference data can be dynamically modified by
rewriting register values during A/D conversion.
Set the registers so that the upper-side level is not less than the lower-side level (ADCMPDR1 setting value ≥
ADCMPDR0 setting value).
The ADCMPDR0 register uses different formats depending on the following conditions.
Settings of the A/D data register format select bit (flush-right or flush-left)
Settings of the A/D-converted value addition/average function select register (A/D-converted value average mode
selected or not selected)
Settings of the A/D-converted value addition/average count select register (addition/average mode selected,
addition count selected)
Note: If a format different from the format setting of A/D data register y is used to set the compare value, a correct
comparison result will not be obtained.
(1) When A/D-Converted Value Addition/Average Mode is Not Selected
Flush-right format
Set bits 11 to 0 to the lower-side comparison level. Write 0 to bits 15 to 12.
Flush-left format
Set bits 15 to 4 to the lower-side comparison level. Write 0 to bits 3 to 0.
(2) When A/D-Converted Value Average Mode is Selected
Flush-right format
Set bits 11 to 0 to the lower-side comparison level for comparison with the A/D-converted value of the same
channel. Write 0 to bits 15 to 12.
Flush-left format
Set bits 15 to 4 to the lower-side comparison level for comparison with the A/D-converted value of the same
channel. Write 0 to bits 3 to 0.
A/D-converted value average mode can be set only when two or four times is selected in A/D-converted value addition
mode.
(3) When A/D-Converted Value Addition Mode is Selected
Flush-right format (A/D-converted value addition mode and 1-time to 4-time conversion selected)
Set bits 13 to 0 to the lower-side comparison level for comparison with the A/D-converted value of the same
channel. Write 0 to bits 15 and 14.
Flush-right format (A/D-converted value addition mode and 16-time conversion selected)
Set bits 15 to 0 to the lower-side comparison level for comparison with the A/D-converted value of the same
channel.
Flush-left format (A/D-converted value addition mode and 1-time to 4-time conversion selected)
Address(es): S12AD.ADCMPDR0 0008 909Ch
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Value after reset:
0000000000000000