CHAPTER 7 8-BIT TIMER
168
User’s Manual U15075EJ1V0UM00
7.4.5 Operation as PWM output (timer 60)
In the PWM pulse generator mode, a pulse of any duty ratio can be output by setting a low-level width using
CR60 and a high-level width using CRH60.
To operate timer 60 in PWM output mode, settings must be made in the following sequence.
<1> Disable operation of TM60 (TCE60 = 0).
<2> Disable timer output of TO60 (TOE60 = 0).
<3> Set count values in CR60 and CRH60.
<4> Set the operation mode of timer 60 to the PWM pulse generator mode (see Figure 7-5).
<5> Set the count clock for timer 60.
<6> Set P32 to the output mode (PM32 = 0) and the P32 output latch to 0 and enable timer output of TO60
(TOE60 = 1).
<7> Enable the operation of TM60 (TCE60 = 1).
The operation in the PWM output mode is as follows.
<1> When the count value of TM60 matches the value set in CR60, an interrupt request signal (INTTM60) is
generated and output of timer 60 is inverted, which makes the compare register switch from CR60 to
CRH60.
<2> A match between TM60 and CR60 clears the TM60 value to 00H and then counting starts again.
<3> After that, when the count value of TM60 matches the value set in CRH60, an interrupt request signal
(INTTM60) is generated and output of timer 60 is inverted again, which makes the compare register switch
from CRH60 to CR60.
<4> A match between TM60 and CRH60 clears the TM60 value to 00H and then counting starts again.
A pulse of any duty ratio is output by repeating <1> to <4> above. Figures 7-26 and 7-27 show the operation
timing in the PWM output mode.
Содержание mPD789425
Страница 2: ...2 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 6: ...6 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 10: ...10 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 24: ...24 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 36: ...36 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 46: ...46 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 176: ...User s Manual U15075EJ1V0UM00 176 MEMO ...
Страница 196: ...User s Manual U15075EJ1V0UM00 196 MEMO ...
Страница 210: ...User s Manual U15075EJ1V0UM00 210 MEMO ...
Страница 262: ...262 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 278: ...278 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 296: ...296 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 298: ...User s Manual U15075EJ1V0UM00 298 MEMO ...
Страница 316: ...User s Manual U15075EJ1V0UM00 316 MEMO ...