CHAPTER 4 SETTING METHODS
[Example 1]
Watchdog timer stop (same as in the sample program setting)
WDTM
MOV WDTM, #01110111B
WDTM = 0b01110111;
Note
To stop watchdog timer operation, the option byte must be used to set to “Oscillation is stopped by
software setting (LSRSTOP bit is set to 1)”. For details, refer to
The WDTM register setting value is “011
1xxxx
(x: don’t care, bits 7, 6, and 5 must be set to 0, 1, and 1,
respectively)”. (In the example below, “x” of bit 3 is set to 0, and “x” of bits 2 to 0 is set to 1.)
•
Assembly language
•
C language
[Example 2]
The low-speed internal oscillation clock (f
RL
) is used as the watchdog timer operation clock and the
overflow time is set to the maximum period (2
18
/f
RL
) (same as the WDTM value after reset release).
WDTM
To use the WDTM register as described above, its setting value is the same as its value after reset release, so
setting by a program is not required.
0 1 1
1 x x x x
Operation clock selection
1
x Watchdog timer operation stop
Note
* In this sample program, the watchdog timer is not used for
program loop detection, so it is set to operation stop.
Overflow time setting
x x x
(Setting is invalid, because watchdog timer
operation is stopped.)
0 1 1
0 0 1 1 1
Overflow time setting
Operation clock selection
0 Low-speed internal oscillation clock (f
RL
)
0
1 1 1
2
18
/f
RL
[Column]
Binary-value description
To describe a binary value, append “B” or “Y” after the binary value in assembly language, or append “0b”
or “0B” before the binary value in C language.
Application Note U18752EJ2V0AN
15