![NEC V850/SA1 mPD703015 Скачать руководство пользователя страница 189](http://html.mh-extra.com/html/nec/v850-sa1-mpd703015/v850-sa1-mpd703015_preliminary-users-manual_249279189.webp)
CHAPTER 7 TIMER/COUNTER FUNCTION
189
7.4.4 Operating as 8-bit PWM output
By setting bit 6 (TMCn6) of the 8-bit timer mode control register n (TMCn) to 1, the timer operates as a PWM
output.
Pulses with the duty cycle determined by the value set in the 8-bit compare register n (CRn0) is output from TOn.
Set the width of the active level of the PWM pulse in CRn0. The active level can be selected by bit 1 (TMCn1) in
TMCn.
The count clock can be selected by bits 0 to 2 (TCLn0 to TCLn2) of the timer clock selection register n (TCLn).
The PWM output can be enabled and disabled by bit 0 (TOEn) of TMCn.
Caution
CRn0 can be rewritten only once in one cycle while in the PWM mode.
(1) Basic operation of the PWM output
Setting method
(1) Set the port latch and port mode register n to “0.”
(2) Set the active level width in the 8-bit compare register n (CRn0).
(3) Select the count clock in the timer clock selection register n (TCLn).
(4) Set the active level in bit 1 (TMCn1) of TMCn.
(5) If bit 7 (TCEn) of TMCn is set to “1,” counting starts. When counting stops, set TCEn to “0.”
PWM output operation
(1) When counting starts, the PWM output (output from TOn) outputs the inactive level until an overflow
occurs.
(2) When the overflow occurs, the active level specified in step (1) in the setting method is output. The active
level is output until CRn0 and the count of the 8-bit counter n (TMn) match.
(3) The PWM output after CRn0 and the count match is the inactive level until an overflow occurs again.
(4) Steps (2) and (3) repeat until counting stops.
(5) If counting is stopped by TCEn = 0, the PWM output goes to the inactive level.
Содержание V850/SA1 mPD703015
Страница 2: ...2 MEMO ...
Страница 100: ...100 MEMO ...
Страница 144: ...144 MEMO ...
Страница 200: ...200 MEMO ...
Страница 328: ...328 MEMO ...
Страница 356: ...356 MEMO ...
Страница 358: ...358 MEMO ...
Страница 368: ...368 MEMO ...
Страница 374: ...374 MEMO ...
Страница 382: ...382 MEMO ...