EM78P417N/418N/419N
8-Bit Microprocessor with OTP ROM
PRDX (PRD1, PRD2 and PRD3):
PWM time period register.
ComparatorX (Comparator 1 and Comparator 2):
Reset TMRX while a match occurs. The TMRXIF flag is set at the same time.
6.9.3 Programming the Related Registers
When defining TMRX, refer to the related registers of its operation as shown in the
table below. It must be noted that the PWMX bits must be disabled if their related
TMRXs are employed. That is, Bit 7 ~ Bit 5 of the PWMCON register must be set to ‘0’.
6.9.3.1 Related Control Registers of TMR1, TMR2, and TMR3
Address
IOC80
Name
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
PWMCON/IOC80 PWM3E PWM2E PWM1E
TMRCON/IOC90 T3EN T2EN T3P2
“0”
T1EN T1P2
T3P0 T2P2
T1P1
T2P1
T1P0
T2P0
IOC90
T3P1
6.9.4 Timer Programming Process/Steps
1. Load PRDX with the TIMER duration
2. Enable interrupt function by writing IOCF0, if required
3. Load a desired a TMRX prescaler value to PWMCON and TMRCON and enable
TMRX and disable PWMX
6.10 Comparator
EM78P418/9N has one comparator comprising of two analog inputs and one output.
The comparator can be utilized to wake up EM78P418/9N from sleep mode. The
comparator circuit diagram is depicted in the figure below.
-
Cin
-
CO
CMP
Cin+
+
Cin-
Cin+
Output
30mV
Fig. 6-13 Comparator Circuit Diagram & Operating Mode
54 •
Product Specification (V1.0) 06.23.2005
(This specification is subject to change without further notice)