SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 106
Version 1.5
9.2
CMP0M REGISTER
09CH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
CMP0M
CM0EN
CM0IEN
CM0IRQ
CM0OEN
CM0REF
CM0OUT
CMS1
CMS0
Read/Write
R/W
R/W
R/W
R/W
R/W
R
R/W
R/W
After reset
0
0
0
0
0
0
0
0
Bit 7
CM0EN:
Comparator 0 control bit.
0 = Disable. All comparator pins are GPIO.
1 = Enable. CM0N pin is analog input pin.
Bit 6
CM0IEN:
Comparator 0 interrupt control bit.
0 = Disable.
1 = Enable.
Bit 5
CM0IRQ:
Comparator 0 interrupt request flag. CM0IRQ 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 CM0P voltage or comparator 0 reference voltage is larger
than CM0N voltage.
Bit 4
CM0OEN:
Comparator 0 output pin control bit.
0 = Disable. CM0O pin is GPIO.
1 = Enable. CM0O pin is comparator output pin.
Bit 3
CM0REF:
Comparator 0 internal reference voltage control bit.
0 = Disable. CM0P pin is analog input pin.
1 = Enable. CM0P pin is GPIO.
Bit 2
CM0OUT:
Comparator 0 raw output flag.
0 = CM0P voltage or comparator 0 reference voltage is less than CM0N voltage.
1 = CM0P voltage or comparator 0 reference voltage is larger than CM0N voltage.
Bit[1:0]
CMS[1:0]:
Comparator internal reference voltage select bit.
00 = 0.9V, 01 = 1.0V, 10 = 1.1V, 11 = 1.2V