Datasheet

78K0/Ix2 CHAPTER 9 8-BIT TIMER H1
R01UH0010EJ0500 Rev.5.00 345
Feb 28, 2012
<5> By performing procedures <3> and <4> repeatedly, a pulse with an arbitrary duty can be obtained.
<6> To stop the count operation, set TMHE1 = 0.
If the setting value of the CMP01 register is N, the setting value of the CMP11 register is M, and the count clock
frequency is f
CNT, the PWM pulse output cycle and duty are as follows.
PWM pulse output cycle = (N + 1)/f
CNT
Duty = (M + 1)/(N + 1)
Cautions 1. The set value of the CMP11 register can be changed while the timer counter is operating.
However, this takes a duration of three operating clocks (signal selected by the CKS12 to CKS10
bits of the TMHMD1 register) from when the value of the CMP11 register is changed until the
value is transferred to the register.
2. Be sure to set the CMP11 register when starting the timer count operation (TMHE1 = 1) after the
timer count operation was stopped (TMHE1 = 0) (be sure to set again even if setting the same
value to the CMP11 register).
3. Make sure that the CMP11 register setting value (M) and CMP01 register setting value (N) are
within the following range.
00H CMP11 (M) < CMP01 (N) FFH
Remarks 1. For the setting of the output pin, refer to 9.3 (4) Port mode registers 0 and 3 (PM0, PM3).
2. For details on how to enable the INTTMH1 signal interrupt, refer to CHAPTER 18 INTERRUPT
FUNCTIONS.