![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_206.png)
ML66525 Family User’s Manual
Chapter 8
General-Purpose 8/16-Bit Timers
8 - 43
8.10.2 Description of Timer 7 Registers
(1)
General-purpose 16-bit timer 7 counter (TM7C)
The general-purpose 16-bit timer 7 counter (TM7C) is a 16-bit up-counter.
When this counter
overflows, an interrupt request is generated and it is loaded with the contents of
general-purpose 16-bit timer 7 register (TM7R).
TM7C can be read from and written to by the program.
When reset (RESn signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), the contents of TM7C are undefined.
[Note]
Writing a timer value to TM7C causes the same value to also be written to the
general-purpose 16-bit timer 7 register (TM7R).
(2)
General-purpose 16-bit timer 7 register (TM7R)
The general-purpose 16-bit timer 7 register (TM7R) consists of 16 bits.
This register stores
the value to be reloaded into the general-purpose 16-bit timer 7 counter (TM7C).
TM7R can be read from and written to by the program.
When reset (RESn signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), the contents of TM7R are undefined.
(3)
General-purpose 16-bit timer 7 control register (TM7CON)
The general-purpose 16-bit timer 7 control register (TM7CON) consists of 5 bits.
Bits 0 to 2
(TM7C0 to TM7C2) of TM7CON select the timer 0 count clock, bit 3 (TM7RUN) starts or
halts the counting, and bit 7 (TM7OUT) specifies the initial timer output level (High or Low)
at start-up.
And each time TM7C overflows, the content of bit 7 (TM7OUT) is reversed.
TM7CON can be read from and written to by the program.
However, write operations are
invalid for bits 4 to 6.
If read, a value of “1” will always be obtained for bits 4 to 6.
When reset (RESn signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), TM7CON becomes 70H.
Figure 8-2 shows the TM7CON configuration.
[Note]
Just before TM7C overflows, if an SB, RB, XORB or other read-modify-write instruction is
performed on TM7CON, then TM7OUT may not operate correctly.