CHAPTER 9 8-BIT TIMER/EVENT COUNTER
User’s Manual U13045EJ2V0UM00
125
9.4.4 Operation as PWM output
PWM output enables interrupt generation repeatedly at intervals specified by the count value set to 8-bit compare
register 80 (CR80) in advance.
To use 8-bit timer/counter 80 for PWM output, the following settings are required.
<1>
Set P24 to output mode (PM24 = 0) and the P24 output latch to 0.
<2>
Set 8-bit timer register 80 (TM80) to operation disable (TCE80 = 0).
<3>
Set the count clock of the 8-bit timer/event counter (see Tables 9-4 and 9-5), TO80 to output enable (TOE80
= 1), and PWM output to enable (PWME80 = 1).
<4>
Set the count value to CR80
<5>
Set TM80 to operation enable (TCE80 = 1)
When the count value of 8-bit timer register 80 (TM80) matches the value set to CR80, TM80 continues counting,
and an interrupt request signal (INTTM80) is generated.
Cautions 1. When CR80 is rewritten during timer operation, incorrect pulses may occur. Therefore, be
sure to stop the timer operation beforehand.
2. If the count clock setting and TM80 operation-enabled are set in TMC80 simultaneously using
an 8-bit memory manipulation instruction, an error of more than one clock in one cycle may
occur after the timer starts. Therefore, always follow the above procedure when operating
8-bit compare register 80 as a PWM output.
Содержание mPD789101
Страница 2: ...2 User s Manual U13045EJ2V0UM00 MEMO...
Страница 10: ...10 User s Manual U13045EJ2V0UM00 MEMO...
Страница 16: ...User s Manual U13045EJ2V0UM00 16 MEMO...
Страница 46: ...User s Manual U13045EJ2V0UM00 46 MEMO...
Страница 72: ...72 User s Manual U13045EJ2V0UM00 MEMO...
Страница 86: ...User s Manual U13045EJ2V0UM00 86 MEMO...
Страница 94: ...User s Manual U13045EJ2V0UM00 94 MEMO...
Страница 102: ...User s Manual U13045EJ2V0UM00 102 MEMO...
Страница 128: ...User s Manual U13045EJ2V0UM00 128 MEMO...
Страница 148: ...User s Manual U13045EJ2V0UM00 148 MEMO...
Страница 162: ...User s Manual U13045EJ2V0UM00 162 MEMO...
Страница 218: ...User s Manual U13045EJ2V0UM00 218 MEMO...
Страница 238: ...User s Manual U13045EJ2V0UM00 238 MEMO...
Страница 240: ...User s Manual U13045EJ2V0UM00 240 MEMO...
Страница 256: ...User s Manual U13045EJ2V0UM00 256 MEMO...
Страница 258: ...258 User s Manual U13045EJ2V0UM00 MEMO...
Страница 264: ...User s Manual U13045EJ2V0UM00 264 MEMO...