Comparator Setting Flowchart - Renesas RX100 Series User Manual

32-bit mcu
Hide thumbs Also See for RX100 Series:
Table of Contents

Advertisement

RX13T Group
28.3.5

Comparator Setting Flowchart

Figure 28.5 shows the flowchart for setting the comparator-related registers.
Start
Set D/A converter for
generating reference voltage
Set CMPSEL0.CMPSEL[3:0]
Set CMPSEL1.CVRS[1:0] bits
Set CMPCTL register
HCMPON bit = 1
COE bit = 1
Set COMPn pin
CPOE bit = 1
Set interrupts
Operation started
n = 0 to 2
Note 1. This is not required when the external reference voltage is used.
Note 2. This is not required when the comparison result is not output to the external pin.
Figure 28.5
Comparator Operation Setting Flowchart
Operation termination start
CEG[1:0] bits = 00b
CPOE bit = 0
COE bit = 0
HCMPON bit = 0
Figure 28.6
Comparator Operation Termination Flowchart
R01UH0822EJ0100 Rev.1.00
Jul 31, 2019
 Set D/A converter for generating reference voltage.*
(Refer to section 27, D/A Converter for Generating Comparator C
Reference Voltage (DA).)
 Set comparator input.
bits
 Set comparator reference voltage.
 Set comparator control (set bits CDFS[1:0], CINV, and CEG[1:0]).
 Enable comparator operation.
(after enabling, comparator operation stabilization wait time is required. As
for the value, refer to section 32, Electrical Characteristics.)
 Enable comparator output.
 Set COMPn pin for comparator output.*
(Refer to section 28.3.4, Comparator Pin Output)
 Enable comparator external pin output.*
 Set interrupts.
 Disable generating an interrupt request.
 Disable comparator external pin output.
 Disable comparator output.
 Disable comparator operation.
End
28. Comparator C (CMPC)
1
2
2
Page 898 of 1041

Advertisement

Table of Contents
loading

Table of Contents