CHAPTER 7 8-BIT TIMER/EVENT COUNTER
User's Manual U11919EJ3V0UM00
109
7.4 8-Bit Timer/Event Counter Operation
7.4.1 Operation as interval timer
Interval timer repeatedly generates an interrupt at time intervals specified by the count value set to 8-bit compare
register 00 (CR00) in advance.
To operate the 8-bit timer/event counter as an interval timer, the following settings are required.
<1> Disable the operation of 8-bit timer counter 00 (TM00) (TCE00 (bit 7 of 8-bit timer mode control register 00
(TMC00)) = 0).
<2> Set the count clock of the 8-bit timer/event counter (see Table 7-4).
<3> Set a count value in CR00.
<4> Enable the operation of TM00 (TCE00 = 1).
When the count value of the 8-bit timer counter 00 (TM00) coincides with the value set to CR00, the value of
TM00 is cleared to 0 and TM00 continues counting. At the same time, an interrupt request signal (INTTM0) is
generated.
Table 7-4 shows interval time, and Figure 7-4 shows the timing of interval timer operation.
Cautions 1. Before rewriting CR00, stop the timer operation. If CR00 is rewritten while the timer
operation is enabled, the coincidence interrupt request signal may be generated
immediately.
2. If setting the count clock in TMC00 and enabling the operation of TM00 are performed at the
same time with an 8-bit memory manipulation instruction, the error one cycle after the timer
has been started may exceed one clock. To use the 8-bit timer/event counter as an interval
timer, therefore, perform the setting in the above sequence.
Table 7-4. Interval Time of 8-Bit Timer/Event Counter 00
TCL001
TCL000
Minimum Interval Time
Maximum Interval Time
Resolution
0
0
1/f
X
(200 ns)
2
8
/f
X
(51.2
µ
s)
1/f
X
(200 ns)
0
1
2
5
/f
X
(6.4
µ
s)
2
13
/f
X
(1.64 ms)
2
5
/f
X
(6.4
µ
s)
1
0
TI0 input cycle
2
8
×
TI0 input cycle
TI0 input edge cycle
1
1
TI0 input cycle
2
8
×
TI0 input cycle
TI0 input edge cycle
Remarks 1. f
X
: System clock oscillation frequency
2. The parenthesized values apply to operation at f
X
= 5.0 MHz.
www.DataSheet4U.com
Содержание UPD789026 Series
Страница 2: ...User s Manual U11919EJ3V0UM00 2 MEMO www DataSheet4U com...
Страница 8: ...User s Manual U11919EJ3V0UM00 8 MEMO www DataSheet4U com...
Страница 12: ...User s Manual U11919EJ3V0UM00 12 MEMO www DataSheet4U com...
Страница 22: ...User s Manual U11919EJ3V0UM00 22 MEMO www DataSheet4U com...
Страница 32: ...User s Manual U11919EJ3V0UM00 32 MEMO www DataSheet4U com...
Страница 84: ...User s Manual U11919EJ3V0UM00 84 MEMO www DataSheet4U com...
Страница 92: ...User s Manual U11919EJ3V0UM00 92 MEMO www DataSheet4U com...
Страница 104: ...User s Manual U11919EJ3V0UM00 104 MEMO www DataSheet4U com...
Страница 166: ...User s Manual U11919EJ3V0UM00 166 MEMO www DataSheet4U com...
Страница 178: ...User s Manual U11919EJ3V0UM00 178 MEMO www DataSheet4U com...
Страница 184: ...User s Manual U11919EJ3V0UM00 184 MEMO www DataSheet4U com...
Страница 204: ...User s Manual U11919EJ3V0UM00 204 MEMO www DataSheet4U com...
Страница 206: ...User s Manual U11919EJ3V0UM00 206 MEMO www DataSheet4U com...
Страница 212: ...User s Manual U11919EJ3V0UM00 212 MEMO www DataSheet4U com...