English
Language : 

EM78458 Datasheet, PDF (44/62 Pages) ELAN Microelectronics Corp – 8-Bit Microcontroller with MASK ROM
EM78458/459
8-Bit Microcontroller with MASK ROM
4.10.2 Comparator Outputs
The compared result is stored in the CMPOUT of R3.
The comparator outputs is output to P57 by programming bit5<COE> of the
AD-CMPCON register to 1.
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
To CMPOUT
Q
D
RESET
CMRD
Q
D
To CPIF
From other
comparator
Fig. 17 The Output Configuration of a Comparator
4.10.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.10.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.
38 •
Product Specification (V1.4) 05.27.2005
(This specification is subject to change without further notice)