8-37
MSM66573 Family User's Manual
Chapter 8 General-Purpose 8/16 Bit Timers
8
8.9.2 Description of Timer 9 Registers
(1)
General-purpose 8-bit timer 9 counter (TM9C)
The general-purpose 8-bit timer 9 counter (TM9C) 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 9 register (TM9R). This counter can also be used as a clock for PWM.
TM9C can be read from and written to by the program.
When reset (
RES signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), the contents of TM9C are undefined.
[Note]
Writing a timer value to TM9C causes the same value to also be written to the general-
purpose 8-bit timer 9 register (TM9R).
(2)
General-purpose 8-bit timer 9 register (TM9R)
The general-purpose 8-bit timer 9 register (TM9R) consists of 8 bits. This register stores
the value to be reloaded into the general-purpose 8-bit timer 9 counter (TM9C).
TM9R can be read from and written to by the program.
When reset (
RES signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), the contents of TM9R are undefined.
(3)
General-purpose 8-bit timer 9 control register (TM9CON)
The general-purpose 8-bit timer 9 control register (TM9CON) consists of 5 bits. Bits 0 to
2 (TM9C0 to TM9C2) of TM9CON select the timer 9 count clock, bit 3 (TM9RUN) starts or
halts the counting, and bit 7 (TM9OUT) specifies the initial timer output level (High or Low)
at start-up. And each time TM0C overflows, the content of bit 7 (TM9OUT) is reversed.
TM9CON 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 (
RES signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), TM9CON becomes 70H.
Figure 8-16 shows the TM9CON configuration.
[Note]
Just before TM9C overflows, if an SB, RB, XORB or other read-modify-write instruction
is performed on TM9CON, then TM9OUT may not operate correctly.