![](http://datasheet.mmic.net.cn/370000/UPD70F3214HGC-8EU_datasheet_16743828/UPD70F3214HGC-8EU_370.png)
CHAPTER 10 8-BIT TIMER H
User’s Manual U16890EJ1V0UD
370
<3> After the count operation is enabled, the first compare register to be compared is the CMPn0 register.
When the count value of 8-bit timer counter Hn and the set value of the CMPn0 register match, 8-bit
timer counter Hn is cleared, an interrupt request signal (INTTMHn) is generated, and the TOHn output
becomes active. At the same time, the register that is compared with 8-bit timer counter Hn changes
from the CMPn0 register to the CMPn1 register.
<4> When the count value of 8-bit timer counter Hn and the set value of the CMPn1 register match, the
TOHn output becomes inactive, and at the same time the register that is compared with 8-bit timer
counter Hn changes from the CMPn1 register to the CMPn0 register. At this time, 8-bit timer counter Hn
is not cleared and the INTTMHn signal is not generated.
<5> A pulse of any duty can be obtained through the repetition of steps <3> and <4> above.
<6> To stop the count operation, clear the TMHEn bit to 0.
Designating the set value of the CMPn0 register as (N), the set value of the CMPn1 register as (M), and the
count clock frequency as f
CNT
, the PWM pulse output cycle and duty are as follows.
PWM pulse output cycle = (N + 1)/f
CNT
Duty = inactive width: Active width = (M + 1) : (N + 1)
Cautions 1. In the PWM output mode, three operating clocks (signal selected by CKSHn0 to CKSHn2
bits) are required for actual transfer of the new value to the register after the CMPn1
register has been rewritten.
2. Be sure to set the CMPn1 register when starting the timer count operation (TMHEn bit =
1) after the timer count operation was stopped (TMHEn bit = 0) (be sure to set again
even if setting the same value to the CMPn1 register).