MG87FE/L2051/4051/6051
Preliminary, v 1.03
MAKE YOU WIN
12.2. Analog Comparator Register
ACSR: Analog Comparator Control & Status Register
Address=97H, read/write, Power On + RESET=0xx0-0000
7
6
-
5
-
4
ACF
3
2
1
0
ACIDX
ACEN
ACM2
ACM1
ACM0
Bit 7: ACIDX, Analog Comparator IDLE control.
0: Program the Analog Comparator to be gated off during IDLE mode.
1: Program the Analog Comparator to continue functioning during IDLE mode.
Bit 6~5: Reserved.
Bit 4: ACF. Analog Comparator Interrupt Flag.
0: The flag must be cleared by software.
1: Set when the comparator output meets the conditions specified by the ACM [2:0] bits and ACEN is set. The
interrupt may be enabled/disabled by setting/clearing bit 6 of IE.
Bit 3: ACEN. Analog Comparator Enable.
0: Clearing this bit will force the comparator output low and prevent further events from setting ACF.
1: Set this bit to enable the comparator.
Bit 2~0: ACM2 ~ ACM1, Analog Comparator Interrupt Mode.
ACM[2:0]
Interrupt Mode
Negative (Low) level
Positive edge
Toggle with de-bounce
Positive edge with de-bounce
Negative edge
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Toggle
Negative edge with de-bounce
Positive (High) level
This document information is the intellectual property of Megawin Technology.
© Megawin Technology Co., Ltd. 2009 All rights reserved.
QP-7300-03D
34/56