![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_185.png)
ML66525 Family User’s Manual
Chapter 8
General-Purpose 8/16-Bit Timers
8 - 22
8.7.2 Description of Timer 5 Registers
(1)
General-purpose 8-bit timer 5 counter (TM5C)
The general-purpose 8-bit timer 5 counter (TM5C) is an 8-bit up-counter.
When this counter
overflows, an interrupt request is generated and it is loaded with the contents of
general-purpose 8-bit timer 5 register (TM5R).
TM5C can also be used as a baud rate
generator for SIO3 and SIO4.
TM5C 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), contents of TM5C are undefined.
[Note]
Writing a timer value to TM5C causes the same value to also be written to the
general-purpose 8-bit timer 5 register (TM5R).
(2)
General-purpose 8-bit timer 5 register (TM5R)
The general-purpose 8-bit timer 5 register (TM5R) consists of 8 bits.
This register stores the
value to be reloaded into the general-purpose 8-bit timer 5 counter (TM5C).
TM5R 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 TM5R are undefined.
(3)
General-purpose 8-bit timer 5 control register (TM5CON)
The general-purpose 8-bit timer 5 control register (TM5CON) consists of 5 bits.
Bits 0 to 2
(TM5C0 to TM5C2) of TM5CON select the timer 5 count clock, bit 3 (TM5RUN) starts or
halts the counting, and bit 7 (TM5OUT) specifies the initial (when activated) timer output
level (“H” or “L” level).
The contents of bit 7 (TM5OUT) are inverted each time TM5C
overflows.
TM5CON can be read from and written to by the program.
However, write operations are
invalid for the upper 4 bits.
If read, a value of “1” will always be obtained for bits 4 to 6.
The value read from bit 7 is undefined.
When reset (RESn signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), the contents of TM5CON are 70H.
Figure 8-11 shows the TM5CON configuration.