EM78P257
OTP ROM
When defining Comparators, refer to the related registers of its operation as shown in Table 13 and Table 14 below.
Table 13 Related Control Registers of the Comparators
Address
0x09 CMPCR/IOC90 COIE4/0 COIE3/0 COIE2/0 COIE1/0
0x0A COICS/IOCA0
0x0F
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
CE3/0 CE2/0 CE1/0
CI2/0 CI1/0 CI0/0
Bit 1
Bit 0
CE4/0
CI3/0
0
0
0
0
IMR/IOCF0 CMP4IE/0 CMP3IE/0 CMP2IE/0 CMP1IE/0 PPC/CMP EXIE/0 ICIE/0 TCIE/0
Table 14 Related Status/Data Registers of Comparators
Address Name Bit 7 Bit 6 Bit 5
0x09 CMPOUT/R9 CMPOUT4/0 CMPOUT3/0 CMPOUT2/0 CMPOUT1/0
0x0F ISR/RF CMP4IF/0 CMP3IF/0 CMP2IF/0 CMP1IF/0
Bit 4
Bit 3
Bit 2
TCCCIF/0 TCCBIF/0 TCCAIF/0
EXIF/0 ICIF/0 TCIF/0
Bit 1
Bit 0
0
0
4. Interrupt
• INT, and CMPXIE must be enable
• Interrupt occurs whenever a change takes place on the output pin of the comparators
• The actual changes on the pins can be determined by reading the bits CMPOUTX and R9<P7~P4>
• CMPXIF, the comparator interrupt flag, can only be cleared by software
5. Wake-Up from SLEEP mode
• If enabled, the comparators remains active and the interrupt stays functional during 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 sake of power saving.
• If the function is unemployed during the SLEEP mode, turn off comparators before entering into sleep
mode.
4.9 Oscillator
1. Oscillator Modes
The EM78P257A/B can be operated in the five different oscillator modes, such as Internal RC oscillator mode
(IRC), RC oscillator with Internal capacitor mode(IC),External RC oscillator mode(ERC), High XTAL oscillator
mode(HXT), and Low XTAL oscillator mode(LXT). User can select oneof them by programming OSC2,OCS1 and
OSC0 in the CODE Option register. Table15 depicts how these five modes are defined.
The up-limited operation frequency of crystal/resonator on the different VDDs is listed in Table 16
Table 15 Oscillator Modes defined by OSC2,OSC1 and OSC0
Mode
OSC2
OSC1
OSC0
IRC(Internal RC oscillator mode)
IC(Internal C oscillator mode)
1
1
1
1
1
0
This specification is subject to change without prior notice.
46
07.27.2004 (V1.4)