188
User’s Manual U11969EJ3V0UM00
CHAPTER 7 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
7.6 Timer 2 Operation
7.6.1 Count operation
Timer 2 functions as a 16-bit interval timer. The operation is specified by the timer control registers 20 to 24 (TMC20
to TMC24).
The operation of timer 2 counts the internal count clocks (
φ
/2
to
φ
/256 or the external count clock (TI2n)) specified
by the PRM2n0 to PRM2n3 bits of the TMC2n register.
If the count value of TM2n coincides with the value of CM2n, the value TM2n is cleared while simultaneously a
coincidence interrupt (INTCM2n) is generated and the TO2n signal is output in toggle.
Remark
n = 0 to 4
Figure 7-16. Basic Operation of Timer 2
7.6.2 Count clock selection
An internal or external count clock frequency can be input to timer 2. Which count clock frequency is used is selected
by the PRM2n0 to PRM2n3 bits of the TMC2n register (n = 0 to 4).
Caution
Do not change the count clock frequency while the timer operates.
(1) Internal count clock
An internal count clock frequency is selected by the PRM bits of the TMC2n register, from
φ
/2,
φ
/4,
φ
/8,
φ
/16,
φ
/32,
φ
/64,
φ
/128, and
φ
/256.
PRM2n3
PRM2n2
PRM2n1
PRM2n0
Internal Count Clock Frequency
0
0
0
1
φ
/2
0
0
1
0
φ
/4
0
0
1
1
φ
/8
0
1
0
0
φ
/16
0
1
0
1
φ
/32
0
1
1
0
φ
/64
0
1
1
1
φ
/128
1
0
0
0
φ
/256
0000H
0001H 0002H 0003H
FBFEH FBFFH
0000H
0001H 0002H
0003H
Count clock
TM2n
Count starts
CE2n
←
1
Count disabled
CE2n
←
0
Count starts
CE2n
←
1
Содержание V854 UPD703006
Страница 2: ...2 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 22: ...22 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 80: ...80 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 134: ...134 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 156: ...156 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 294: ...294 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 320: ...320 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 324: ...324 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 336: ...336 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 376: ...376 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 382: ...382 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 394: ...394 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 396: ...396 User s Manual U11969EJ3V0UM00 MEMO ...