CHAPTER 7 8-BIT TIMERS 50, 60, AND 61
User’s Manual U15331EJ4V1UD
134
7.4 Operation of 8-Bit Timers 50, 60, and 61
7.4.1 Operation as 8-bit timer counter
Timer 50, timer 60, and timer 61 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 and timer 61 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 nm (CRnm).
To operate 8-bit timer nm as an interval timer, settings must be made in the following sequence.
<1> Disable operation of 8-bit timer counter nm (TMnm) (TCEnm = 0).
<2> For timer 50, disable timer output of TO50 (TOE50 = 0).
For timer 60, disable timer output of TO60 (TOE600 = 0).
For timer 61, disable timer output of TO61 (TOE610 = 0).
<3> Set a count value in CRnm.
<4> Set the operation mode of timer nm to 8-bit timer counter mode
(see Figures 7-6, 7-7, and 7-9).
<5> Set the count clock for timer nm (see Figures 7-6, 7-7, and 7-9).
<6> Enable the operation of TMnm (TCEnm = 1).
When the count value of 8-bit timer counter nm (TMnm) matches the value set in CRnm, TMnm is cleared to
00H and continues counting. At the same time, an interrupt request signal (INTTMnm) is generated.
Tables 7-3 to 7-5 show the interval time, and Figures 7-11 to 7-16 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 nm = 50, 60, 61