![NEC mPD70F3116GJ(A)-UEN Скачать руководство пользователя страница 280](http://html.mh-extra.com/html/nec/mpd70f3116gj-a-uen/mpd70f3116gj-a-uen_user-manual_249263280.webp)
CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
280
User’s Manual U14492EJ3V0UD
(4) PWM mode 2: Sawtooth wave modulation
[Setting procedure]
(a) Set PWM mode 2 (sawtooth wave) with bits MOD01 and MOD00 of the TMC0n register. Also set the
active level of pins TO0n0 to TO0n5 with the ALVTO bit of the TOMRn register.
(b) Set the count clock of TM0n with bits PRM02 to PRM00 of the TMC0n register. The transfer operation
from BFCMn3 to CM0n3 is set with bit BFTE3, and the transfer operation from BFCMn0 to BFCMn2 to
CM0n0 to CM0n2 is set with bit BFTEN.
(c) Set the initial values.
(i)
Specify the interrupt culling ratio with bits CUL02 to CUL00 of the TMC0n register.
(ii) Set the cycle width of the PWM cycle in BFCMn3.
•
PWM cycle = (BFCMn3 value + 1)
×
TM0n count clock
(The TM0n count clock is set with the TMC0n register.)
(iii) Set the dead-time width in DTRRn.
•
Dead-time width = (DTRRn + 1)/f
CLK
f
CLK
: Base clock
(iv) Set the set/reset timing of the F/F used in the PWM cycle in BFCM0n0 to BFCM0n2.
(d) Clear (0) the TM0CEDn bit of the TMC0n register to enable dead-time timer operation. Set TM0CEDn = 1
when not using dead time.
(e) Setting (1) the TM0CEn bit of the TMC0n register starts TM0n counting, and a 6-channel PWM signal is
output from pins TO0n0 to TO0n5.
Caution
Setting CM0n3 to 0000H is prohibited.
Содержание mPD70F3116GJ(A)-UEN
Страница 2: ...2 User s Manual U14492EJ3V0UD MEMO ...