8-15
MSM66577 Family User's Manual
Chapter 8 General-Purpose 8/16 Bit Timers
8
PWM mode
(1)
Port 6 mode register (P6IO)
If TM1OUT (timer 1 output) and TM2OUT (timer 2 output) are to be used, set bits 5 and 7
(P6IO5, P6IO7) to "1" to configure the ports as outputs. If TM1EVT and TM2EVT (event
inputs) are to be used, reset bit 4 and 6 (P6IO4, P6IO6) to "0" to configure the ports inputs.
(2)
Port 6 secondary function control register (P6SF)
If TM1OUT (timer 1 output) and TM2OUT (timer 2 output) are to be used, set bits 5 and 7
(P6SF5, P6SF7) to "1" to configure the ports as secondary function outputs. If TM1EVT and
TM2EVT (event input) are to be used, disable or enable the pull-up resistor with bits 4 and
6 (P6SF4, P6SF6).
(3)
General-purpose 16-bit timer 12 counter (TM12C)
Set the timer value that will be valid at the start of counting. When writing to TM12C, the
same value will also be simultaneously and automatically written to the general-purpose 8-
bit timer 12 register (TM12R).
(4)
General-purpose 16-bit timer 12 register (TM12R)
This register sets the value to be loaded after general-purpose 16-bit timer 12 counter
(TM12C) overflows. If the timer value (TM12C) and the reload value (TM12R) are identical,
this register will automatically be set just by setting TM12C. If the values are different or
are to be modified, this register must be set explicitly.
(5)
General-purpose 8-bit timer 1 control register (TM1CON)
Bits 0 to 2 (TM1C0 to TM1C2) of this register specify the count clock for timer 1. If TM1OUT
(timer 1 output) is to be used, specify the initial value with bit 7 (TM1OUT). If bit 3 (TM1RUN)
is set to "1", timer 1 will begin counting. If reset to "0", timer 1 will halt counting.
(6)
General-purpose 8-bit timer 2 control register (TM2CON)
Setting bit 5 (MODPWM) to "1" sets the PWM mode. While this bit is set, bit 3 (TM2RUN)
settings are invalid; setting bit 3 (TM1RUN) of the timer 1 control register (TM1CON) to "1",
starts simultaneous counting of timers 1 and 2. If TM2OUT (timer 2 output) is to be used,
specify the initial value with bit 7 (TM2OUT).