SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 107
Version 1.5
9.3
CMP1M REGISTER
09DH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
CMP1M
CM1EN
CM1IEN
CM1IRQ
CM1OEN
CM1REF
CM1OUT
-
-
Read/Write
R/W
R/W
R/W
R/W
R/W
R
-
-
After reset
0
0
0
0
0
0
-
-
Bit 7
CM1EN:
Comparator 1 control bit.
0 = Disable. All comparator pins are GPIO.
1 = Enable. CM1N pin is analog input pin.
Bit 6
CM1IEN:
Comparator 1 interrupt control bit.
0 = Disable.
1 = Enable.
Bit 5
CM1IRQ:
Comparator 1 interrupt request flag. CM1IRQ is latched to
“1” as occurring comparator interrupt
request, and it is cleared by program.
0 = No comparator interrupt request.
1 = Comparator interrupt request occurs when CM1P voltage or comparator 1 reference voltage is larger
than CM1N voltage.
Bit 4
CM1OEN:
Comparator 1 output pin control bit.
0 = Disable. CM1O pin is GPIO.
1 = Enable. CM1O pin is comparator output pin.
Bit 3
CM1REF:
Comparator 1 internal reference voltage control bit.
0 = Disable. CM1P pin is analog input pin.
1 = Enable. CM1P pin is GPIO.
Bit 2
CM1OUT:
Comparator 1 raw output flag.
0 = CM1P voltage or comparator 1 reference voltage is less than CM1N voltage.
1 = CM1P voltage or comparator 1 reference voltage is larger than CM1N voltage.
Note:
CMnOUT is comparator raw output without latch. It varies depend on the comparator process
result. But the CMnIRQ is latch comparator output result. It must be cleared by program.