ELAN Home Systems EM78P458AM Network Card User Manual


 
EM78P458/459
OTP ROM
This specification is subject to change without prior notice. 07.01.2003 (V1.3)
42
• 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.
Q
Q
ENEN
D
D
To C0
To CPIF
To CMPOUT
CMRD
CMRD
From other
comparator
RESET
From OP I/O
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