CHAPTER 7 8-BIT TIMER
User’s Manual U15075EJ1V0UM00
143
7.4 8-Bit Timer Operation
7.4.1 Operation as 8-bit timer counter
Timer 50 and timer 60 can be independently used as 8-bit timer counters.
The following modes can be used for the 8-bit timer counter.
•
Interval timer with 8-bit resolution
•
External event counter with 8-bit resolution (timer 60 only)
•
Square wave output with 8-bit resolution
(1)
Operation as interval timer with 8-bit resolution
The interval timer with 8-bit resolution repeatedly generates an interrupt at a time interval specified by the
count value preset in 8-bit compare register n0 (CRn0).
To operate 8-bit timer n0 as an interval timer, settings must be made in the following sequence.
<1> Disable operation of 8-bit timer counter n0 (TMn0) (TCEn0 = 0).
<2> Disable timer output of TOn0 (TOEn0 = 0).
<3> Set a count value in CRn0.
<4> Set the operation mode of timer n0 to 8-bit timer counter mode (see Figures 7-4 and 7-5).
<5> Set the count clock for timer n0 (see Tables 7-3 to 7-6).
<6> Enable the operation of TMn0 (TCEn0 = 1).
When the count value of 8-bit timer counter n0 (TMn0) matches the value set in CRn0, TMn0 is cleared to
00H and continues counting. At the same time, an interrupt request signal (INTTMn0) is generated.
Tables 7-3 to 7-6 show interval time, and Figures 7-8 to 7-13 show the timing of the interval timer operation.
Caution
Be sure to stop the timer operation before overwriting the count clock with different data.
Remark
n = 5, 6
Summary of Contents for mPD789425
Page 2: ...2 User s Manual U15075EJ1V0UM00 MEMO ...
Page 6: ...6 User s Manual U15075EJ1V0UM00 MEMO ...
Page 10: ...10 User s Manual U15075EJ1V0UM00 MEMO ...
Page 24: ...24 User s Manual U15075EJ1V0UM00 MEMO ...
Page 36: ...36 User s Manual U15075EJ1V0UM00 MEMO ...
Page 46: ...46 User s Manual U15075EJ1V0UM00 MEMO ...
Page 176: ...User s Manual U15075EJ1V0UM00 176 MEMO ...
Page 196: ...User s Manual U15075EJ1V0UM00 196 MEMO ...
Page 210: ...User s Manual U15075EJ1V0UM00 210 MEMO ...
Page 262: ...262 User s Manual U15075EJ1V0UM00 MEMO ...
Page 278: ...278 User s Manual U15075EJ1V0UM00 MEMO ...
Page 296: ...296 User s Manual U15075EJ1V0UM00 MEMO ...
Page 298: ...User s Manual U15075EJ1V0UM00 298 MEMO ...