User’s Manual U11969EJ3V0UM00
183
CHAPTER 7 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
7.5 Timer 1 Operation
7.5.1 Count operation
Timer 1 functions as a 24-bit free-running timer or event counter, as specified by timer control register 1 (TMC1).
Timer 1 performs counting up by count clock. Start/stop of counting is controlled by the CE1 bit of timer control
register 1 (TMC1).
(1) Start counting
Timer 1 starts counting by setting the CE1 bit to 1.
Writing 1 to TM1 during counting operations (CE1 = 1) does not clear the TM1 register, and timer 1 continues
counting.
(2) Stop counting
Timer 1 stops counting by setting the CE1 bit to 0. If the OST bit of the TMC1 register is set to 1, timer 1 stops
operation after occurrence of overflow. However, the value of the timer register can immediately be cleared
by setting CE1 = 0.
Figure 7-11. Basic Operation of Timer 1
7.5.2 Count clock selection
An internal or external count clock frequency can be input to timer 1. Which count clock frequency is used is selected
by the PRM10 to PRM13 bits of the TMC1 register.
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 TMC1 register, from
φ
,
φ
/2,
φ
/4,
φ
/8,
φ
/16,
φ
/32,
φ
/64,
φ
/128, and
φ
/256.
PRM13
PRM12
PRM11
PRM10
Internal Count Clock Frequency
0
0
0
0
φ
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
000001H 000002H 000003H
FFFBFEH FFFBFFH
0000H
000001H 000002H 000003H
000000H
TM1
Count starts
CE1
←
1
Count disabled
CE1
←
0
Count starts
CE1
←
1
Count clock
Содержание 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 ...