
ML66517 Family User’s Manual
Chapter 8
General-Purpose 8/16 Bit Timers
8 – 38
(3) General-purpose 8-bit timer 6 control register (TM6CON)
The general-purpose 8-bit timer 6 control register (TM6CON) consists of 7 bits.
During the auto-reload timer mode, the program can read from and write to TM6CON. However, write
operations are invalid for bits 4 to 6. If read, a value of “1” will always be obtained for bit 4.
When reset (
RES signal input, execution of a BRK instruction, overflow of the watchdog timer, opcode
trap), TM6CON becomes 10H.
Figure 8-20 shows the TM6CON configuration.
[Description of each bit]
 WDTC0 to WDTC2 (bits 0 to 2)
WDTC0 to WDTC2 specify the count clock for timer 6.
 ATMRUN (bit 3)
During the auto-reload timer mode, ATMRUN specifies whether the count is running or halted.
During the WDT mode, the value that has been written will be read.
 WDTRUN (bit 5)
This read-only flag is read as “1” during counting in the WDT mode. With this flag, it is possible to
determine whether the count operation in the WDT mode has started.
 WDTLDE (bit 6)
During the WDT mode, WDT is initialized within a fixed period by loading the value of TM6R into
TM6C. This load operation (WDT initialization) is performed by alternately writing “n3H” and “nCH”
(where n is an arbitrary value from 0 to F) to TM6C.
WDTLDE is a read-only flag used during initialization to determine whether the next value to be written
to TM6C will be “n3H” or “nCH”.
 MODWDT (bit 7)
This bit specifies the timer 6 operating mode (auto-reload timer mode or WDT mode).
[Note]
Before setting MODWDT to “1” to enter the WDT mode, set the WDT overflow period with TM6C, TM6R
and TM6CON (WDTC0 to WDTC2). It is not possible to modify the period once MODWDT is set to “1”
and the WDT mode is entered. (Writes become invalid).
Since MODWDT is located within TM6CON, byte instructions can be used to simultaneously write to
MODWDT and WDTC0 through WDTC2.