R01UH0822EJ0100 Rev.1.00
Page 896 of 1041
Jul 31, 2019
RX13T Group
28. Comparator C (CMPC)
28.3.2
Noise Filter
Comparator C contains a noise filter. The sampling clock can be selected by the CMPCTL.CDFS[1:0] bits.
The comparator output signal is sampled every sampling clock, and if the same value is sampled three times, that value is
determined as the noise filter output at the next sampling clock.
shows the configuration of the noise filter and edge detector and
shows an example of the
comparator noise filter and interrupt operation.
Figure 28.3
Noise Filter and Edge Detector Configuration
Figure 28.4
Noise Filter and Interrupt Operation Example
CEG[1:0]
Edge
detector
COMPn
CINV
CPOE
CMPMON0
Comparator output
Sampling clock
Noise filter
(same value
sampled 3 times)
CDFS[1:0]
0
1
n = 0 to 2
COMPn level detection signal
CMPCn interrupt request
Noise filter input
Sampling timing
Interrupt status flag
(IR)
Unless the same value is sampled 3
consecutive times, it is assumed to be
noise and IR flag does not become 1
Set to 0 by program
Since the same value is sampled
3 times, it is recognized as a signal
change and IR flag becomes to 1
Note:
The above operation example applies when the CMPCTL.CDFS[1:0] bits are 01b, 10b, or 11b (noise filter used).
The noise canceling width can be changed by setting the value of the CMPCTL.CDFS[1:0] bits to select the sampling
timing.