EM78P417N/418N/419N
8-Bit Microprocessor with OTP ROM
6.10.3 Using Comparator 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 Bit 1, Bit 0<COS1, COS0> of the IOCA0
register to <1,1>. See Section 6.2.6, IOCA0 (CMPCON: Comparator Control Register)
for Comparator/OP select bits function description.
6.10.4 Comparator Interrupt
ꢀ CMPIE (IOCF0.7) must be enabled for the “ENI” instruction to take effect
ꢀ Interrupt is triggered whenever a change occurs on the comparator output pin
ꢀ The actual change on the pin can be determined by reading the Bit CMPOUT,
IOCA0<2>
ꢀ CMPIF (RF.7), the comparator interrupt flag, can only be cleared by software
6.10.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.
6.11 Oscillator
6.11.1 Oscillator Modes
The EM78P417/8/9N can be operated in four different oscillator modes, such as High
XTAL oscillator mode (HXT), Low XTAL oscillator mode (LXT), External RC oscillator
mode (ERC), and RC oscillator mode with Internal RC oscillator mode (IRC). You can
select one of them by programming the OSC2, OCS1, and OSC0 in the CODE Option
register.
56 •
Product Specification (V1.0) 06.23.2005
(This specification is subject to change without further notice)