16
9.3
9.4
Timer 1 Control Register............................................................................................... 206
Operation of Timer Register 1 (TM1) ........................................................................... 209
9.4.1
Basic operation ..................................................................................................................
9.4.2
Clear Operation ..................................................................................................................
Operation of Compare Register ................................................................................... 213
Basic Operation of Output Control Circuit................................................................. 216
9.6.1
Basic operation ..................................................................................................................
9.6.2
Toggle output......................................................................................................................
9.6.3
Set/reset output..................................................................................................................
Examples of Use ............................................................................................................ 219
9.7.1
Operation as interval timer (1)...........................................................................................
9.7.2
Operation as interval timer (2)...........................................................................................
Cautions .......................................................................................................................... 224
209
211
9.5
9.6
217
217
218
9.7
219
222
9.8
CHAPTER 10 TIMERS/COUNTERS 2 AND 3.................................................................................. 227
10.1
10.2
10.3
10.4
Function .......................................................................................................................... 228
Configuration.................................................................................................................. 229
Timer/Counter 2 Control Register................................................................................ 232
Operation of Timer Register 2 (TM2) ........................................................................... 236
10.4.1
Basic operation ..................................................................................................................
10.4.2
Clear operation...................................................................................................................
External Event Counter Function................................................................................. 240
Operation of Compare Register ................................................................................... 242
Basic Operation of Output Control Circuit................................................................. 245
10.7.1
Basic operation ..................................................................................................................
10.7.2
Toggle output......................................................................................................................
10.7.3
PWM output........................................................................................................................
10.7.4
PPG output .........................................................................................................................
Examples of Use ............................................................................................................ 258
10.8.1
Operation as interval timer (1)...........................................................................................
10.8.2
Operation as Interval Timer (2) .........................................................................................
10.8.3
Operation as PWM output .................................................................................................
10.8.4
Operation as PPG output ..................................................................................................
10.8.5
Operation as external event counter.................................................................................
Cautions .......................................................................................................................... 275
236
238
10.5
10.6
10.7
245
245
247
252
10.8
258
261
264
268
273
10.9
CHAPTER 11 TIMER 4...................................................................................................................... 277
11.1
11.2
11.3
11.4
Function .......................................................................................................................... 277
Configuration.................................................................................................................. 277
Timer 4 Control Register............................................................................................... 280
Operation of Timer Register 4 (TM4) ........................................................................... 282
11.4.1
Basic operation ..................................................................................................................
11.4.2
Clear operation...................................................................................................................
Operation of Compare Register ................................................................................... 286
Example of Use .............................................................................................................. 288
11.6.1
Operation as interval timer (1)...........................................................................................
282
284
11.5
11.6
288