EM78P350N
8-Bit Microprocessor with OTP ROM
6.12.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.12.4 Comparator Interrupt
CMPIE (IOCE.0) 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 (RE.0), the comparator interrupt flag, can only be cleared by software.
6.12.5 Wake-up from Sleep Mode
If enabled, the comparator remains active and the interrupt remains functional, even
in 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 the comparator before
entering into Sleep mode.
6.13 Oscillator
6.13.1 Oscillator Modes
The EM78P350N can be operated in four different oscillator modes namely, High Crystal
oscillator mode (HXT), Low Crystal oscillator mode (LXT), External RC oscillator mode
(ERC), and RC oscillator mode with Internal RC oscillator mode (IRC). One of such
modes can be selected by programming the OSC2, OCS1, and OSC0 in the Code
Option register.
The Oscillator modes defined by OSC2, OCS1, and OSC0 are described below.
Oscillator Modes
OSC2
OSC1
OSC0
ERC1 (External RC oscillator mode); P50/OSCO acts as P50
ERC1 (External RC oscillator mode); P50/OSCO acts as OSCO
IRC2 (Internal RC oscillator mode); P50/OSCO acts as P50
IRC2 (Internal RC oscillator mode); P50/OSCO acts as OSCO
LXT3 (Low Crystal oscillator mode)
0
0
0
0
1
1
0
0
1
1
1
1
0
1
0
1
0
1
HXT3 High Crystal oscillator mode) (default)
1 In ERC mode, OSCI is used as oscillator pin. OSCO/P50 is defined by code option Word 0 Bit 6 ~ Bit 4.
2 In IRC mode, P55 is normal I/O pin. OSCO/P50 is defined by code option Word 0 Bit 6 ~ Bit 4.
3 In LXT and HXT modes; OSCI and OSCO are used as oscillator pins. These pins cannot and should not be
defined as normal I/O pins.
78 •
Product Specification (V1.0) 09.14.2006
(This specification is subject to change without further notice)