SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 104
Version 1.5
9
ANALOG COMPARATOR
9.1
OVERVIEW
The analog comparator function includes two channel analog comparators and internal reference voltage. The main
purpose of the comparator is to compare DC power voltage for low power indicator. The analog comparator negative
input pin, positive input pin and output pin are shared with GPIO and controlled by registers. The 2-channel analog
comparator structure is as following.
CM0OEN
CM0IRQ
CM0EN
CM0EN
CM0REF
CM0IEN
Comparator 0
Interrupt
CM0N
CM0O
CMS1, CMS0
1.2V
CM0P
1.1V
1.0V
0.9V
+
-
CM1OEN
CM1EN
CM1EN
CM1REF
CM1N
CM1O
CM1P
+
-
Comparator 0
Comparator 1
Comparator
Reference
Voltage
CM0OUT Flag
CM1IRQ
CM1IEN
Comparator 1
Interrupt
CM1OUT Flag
Comparator 0 Pin assignment:
CM0P: Comparator 0 positive input pin shared with P2.3. CM0P enables when CM0EN=1 and CM0REF=0.
CM0N: Comparator 0 negative input pin shared with P2.2. CM0N enables when CM0EN=1.
CM0O: Comparator 0 output pin shared with P2.4. CM0O enables when CM0EN=1 and CM0OEN = 1.
Comparator 1 Pin assignment:
CM1P: Comparator 1 positive input pin shared with P2.6. CM1P enables when CM1EN=1 and CM1REF=0.
CM1N: Comparator 1 negative input pin shared with P2.5. CM1N enables when CM1EN=1.
CM1O: Comparator 1 output pin shared with P2.7. CM1O enables when CM1EN=1 and CM1OEN = 1.
The comparator pins are GPIO mode except above conditions.