NEC 78K0S/KA1+ User Manual page 139

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KA1+:
Table of Contents

Advertisement

<4> When 8-bit timer counter H1 and the CMP11 register match, TOH1 output becomes inactive and the
compare register to be compared with 8-bit timer counter H1 is changed from the CMP11 register to the
CMP01 register.
generated.
<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
, the PWM pulse output cycle and duty are as follows.
CNT
PWM pulse output cycle = (N+1)/f
Duty = Active width : Total width of PWM = (M + 1) : (N + 1)
Cautions 1. In PWM output mode, the setting value for the CMP11 register can be changed during timer
count operation. However, three operation clocks (signal selected using the CKS12 to
CKS10 bits of the TMHMD1 register) or more are required to transfer the register value after
rewriting the CMP11 register value.
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).
CHAPTER 8 8-BIT TIMER H1
At this time, 8-bit timer counter H1 is not cleared and the INTTMH1 signal is not
CNT
User's Manual U16898EJ3V0UD
139

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents