W741C240
Divider 0
Divider 0 is organized as a 14-bit binary up-counter designed to generate periodic interrupts, as
shown in Figure 4. When the system starts, the divider is incremented by each system clock (FOSC).
When an overflow occurs, the divider event flag is set to 1 (EVF.0 = 1). Then, if the divider interrupt
enable flag has been set (IEF.0 = 1), the interrupt is executed, while if the hold release enable flag
has been set (HEF.0 = 1), the hold state is terminated. In addition, the 4 MSB of the divider can be
reset by executing the CLR DIVR0 instruction.
Watchdog Timer (WDT)
The watchdog timer (WDT) is organized as a 4-bit up counter and is designed to protect the program
from unknown errors. The WDT is enable when the corresponding option code bit of the WDT is set
to 1. If the WDT overflows, the chip will be reset. At initial reset, the input clock of the WDT is
FOSC/1024. The input clock of the WDT can be switched to FOSC/16384 (or FOSC/1024) by executing
the SET PMF, #08H (or CLR PMF, #08H) instruction. The contents of the WDT can be reset by the
instruction CLR WDT. In normal operation, the application program must reset WDT before it
overflows. A WDT overflow indicates that the operation is not under control and the chip will be reset.
The WDT minimun overflow period is 468.75 mS when the system clock (FOSC) is 32 KHz and WDT
clock input is FOSC/1024. When the corresponding option code bit of the WDT is set to 0, the WDT
function is disabled. The organization of the Divider0 and watchdog timer is shown in Figure 4.
Divider0
HEF.0
Fosc
Hold mode release (HCF.0)
Divider0 interrupt (INT0)
EVF.0
S
R
. . .
Q14
R
Q1 Q2
Q9 Q10 Q11 Q12 Q13
IEF.0
Q
R
R
R
1. Reset
2. CLR EVF, #01H
3. CLR DIVR0
WDT
PMF.3
Fosc/16384
Fosc/1024
Overflow signal
Qw1 Qw2 Qw3 Qw4
System Reset
R
R
R
R
Enable
1. Reset
2. CLR WDT
/Disable
Mask Option
Figure 4. Organization of Divider 0 and Watchdog Timer
Timer/Counter
Timer 1 (TM1)
Timer 1 (TM1) is also a programmable 8-bit binary down counter, as shown in Figure 5. Timer 1 can
be used as a counter to output an arbitrary frequency to the MFP pin. The input clock of Timer 1 can
be one of two sources: FOSC/64, or FOSC. The source can be selected by setting bit 0 of mode
register 1 (MR1). At initial reset, the Timer 1 clock input is FOSC. When the MOV TM1L, R or MOV
TM1H, R instruction is executed, the specified data are loaded into the auto-reload buffer and the
TM1 down-counting will be disabled (i.e. MR1.3 is reset to 0). If the bit 3 of MR1 is set (MR1.3 = 1),
- 8 -