EM78P458/459
OTP ROM
• P57 must be defined as an output if implemented as the comparator output.
• Fig. 17 shows the comparator output block diagram.
To C0
From OP I/O
CMRD
EN
EN
Q
D
Q
D
To CMPOUT
RESET
To CPIF
CMRD
From other
comparator
Fig. 17 The Output Configuration of a Comparator
3. Using as An Operation Amplifier
The comparator can be used as an operation amplifier if a feedback resistor is connected from the
input to the output externally. In this case, the Schmitt trigger can be disabled for power saving by
setting CE to 1 and COE to 0.
4. Interrupt
• CMPIE (IOCF0.6) must be enabled.
• Interrupt occurs at the rising edge of the comparator output pin.
• The actual change on the pin can be determined by reading the Bit CMPOUT, R3<7>.
• CMPIF (RF.6), the comparator interrupt flag, can only be cleared by software.
5. Wake-up from SLEEP Mode
• If enabled, the comparator remains active and the interrupt remains functional, even under SLEEP
mode.
• If a mismatch occurs, the interrupt will wake up the device from SLEEP mode.
• The power consumption should be taken into consideration for the benefit of energy conservation.
• If the function is unemployed during SLEEP mode, turn off comparator before entering into sleep
mode.
This specification is subject to change without prior notice.
42
06.25.2004 (V1.4)