SN32F100 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 156
Version 1.9
14.2 COMPARATOR OPERATION
The comparator operation is to compare the voltage between comparator positive input and negative input terminals.
When the positive input voltage is greater than the negative input voltage, the comparator output is high status. When
the positive input voltage is smaller than the negative input voltage, the comparator output is low status.
Comparator
Positive Signal (Vp)
Comparator
Negative Signal (Vn)
Comparator
Output Signal
Vp > Vn
Vp < Vn
Vp < Vn
Vp > Vn
Vp > Vn
The comparator builds in interrupt function. The interrupt function trigger edge is selected by CMPG. The trigger edge
supports rising edge (CMPG=0), falling edge (CMPG=1). If the trigger edge condition is found, the CMPIRQ is set as
“1”. If the comparator interrupt function enables, the system will execute interrupt routine. The CMPIRQ must be
cleared by program.
The comparator builds in sleep mode wake-up function. The comparator sleep mode wake-up trigger edge is
bi-
direction. The comparator’s wake-up function only supports sleep mode, not deep-sleep mode and deep-power
down mode. If the trigger edge condition (comparator output status exchanging) is found, the system will be wake-up
from sleep mode. If the trigger edge direction is interrupt trigger condition, the CMP
IRQ is set as “1”. Of course the
interrupt routine is executed if the interrupt function enabled. When the wake-up trigger edge direction is equal to
interrupt trigger condition, the system will execute interrupt operation after sleep mode wake-up immediately.
The critical condition is comparator positive voltage equal to comparator negative voltage, and the voltage range is
decided comparator offset parameter of input common mode. In the voltage range, the comparator output signal is
unstable and keeps oscillating until the differential voltage exits the range. In the condition, the comparator flag
(CMPIRQ) latches the first exchanging and issue the status, but the status is a transient, not a stable condition. So the
comparator builds in a filter to de-bounce the transient condition. The comparator output signal is through a de-bounce
circuit to filter comparator transient status. The de-bounce time is controlled by CMDB[1:0] bits that means the
comparator minimum response time is zero, 1*CMP_PCLK, 2*CMP_PCLK or 3*CMP_PCLK. The de-bounce time
depends on the signal slew rate and selected by program.
Trigger to De-bounce
De-bounce End
De-bounce Time
Comparator Output Signal
(CMPOUT)
Comparator Output Signal
After De-bounce
Comparator
Negative Signal (Vn)
Comparator
Positive Signal (Vp)
Trigger to De-bounce
De-bounce End
De-bounce Time
Содержание SN32F107
Страница 34: ...SN32F100 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 34 Version 1 9 0 Reserved R 0...
Страница 180: ...SN32F100 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 180 Version 1 9 20 2 LQFP 64 PIN...
Страница 181: ...SN32F100 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 181 Version 1 9 20 3 LQFP 80 PIN...