318
CHAPTER 13 COMPARATOR
Note:
To clear each bit, first read data from the bit then write "0" in it.
Table 13.4-5 Comparator Status Register 2 (COSR2) Bit Functions
Bit name
Function
Bit 7
Bit 6
Unused bits
The read value is undefined.
Writing has no efect on operation.
Bit 5
SWR3:
Comparator 4 interrupt
request bit
This bit is set to "1" when an edge change is detected in
comparator 4 output (the results of P87/SW3 pin input
comparison by comparator 4). When this bit and the SW3
interrupt enable bit (CICR2:SEN3) are "1" an interrupt
request is output.
This bit is cleared by writing "0" in it. Writing "1" in this bit
has no effect and does not change the bit.
Bit 4
SWR2:
Comparator 3 interrupt
request bit
This bit is set to "1" when an edge change is detected in
comparator 3 output (the results of P86/SW2 pin input
comparison by comparator 4). When this bit and the SW2
interrupt enable bit (CICR2:SEN2) are "1" an interrupt
request is output.
This bit is cleared by writing "0" in it. Writing "1" in this bit
has no effect and does not change the bit.
Bit 3
SWR1:
Comparator 2 interrupt
request bit
This bit is set to "1" when an edge change is detected in
comparator 2 output (the results of P85/SW1 pin input
comparison by comparator 4). When this bit and the SW1
interrupt enable bit (CICR2:SEN1) are "1," an interrupt
request is output.
This bit is cleared by writing "0" in it. Writing "1" in this bit
has no effect and does not change the bit.
Bit 2
VAR3:
Battery monitoring circuit 3
VALID interrupt request bit
This bit is set to "1" when a change is detected in battery
monitoring circuit 3 VALID output. When this bit and the
battery monitoring circuit 3 VALID interrupt enable bit
(CICR2:VEN3) are "1," an interrupt request is output.
This bit is cleared by writing "0" in it. Writing "1" in this bit
has no effect and does not change this bit.
Bit 1
VAR2:
Battery monitoring circuit 2
VALID interrupt request bit
This bit is set to "1" when a change is detected in battery
monitoring circuit 2 VALID output. When this bit and the
battery monitoring circuit 2 VALID interrupt enable bit
(CICR2:VEN2) are "1," an interrupt request is output.
This bit is cleared by writing "0" in it. Writing "1" in this bit
has no effect and does not change the bit.
Bit 0
VAR1:
Battery monitoring circuit 1
VALID interrupt request bit
This bit is set to "1" when a change is detected in battery
monitoring circuit 1 VALID output. When this bit and the
battery monitoring circuit 1 VALID interrupt enable bit
(CICR2:VEN1) are "1," an interrupt request is output.
This bit is cleared by writing "0" in it. Writing "1" in this bit
has no effect and does not change the bit.