Datasheet

Section 12 8-Bit Timers
Rev. 4.00 Sep 27, 2006 page 370 of 1130
REJ09B0327-0400
Table 12.6 TMRY 8-Bit Timer Interrupt Sources
Interrupt source Description DTC Activation Interrupt Priority
CMIA Requested by CMFA Possible High
CMIB Requested by CMFB Possible
OVI Requested by OVF Not possible Low
12.5 8-Bit Timer Application Example
In the example below, the 8-bit timer is used to generate a pulse output with a selected duty cycle,
as shown in figure 12.12. The control bits are set as follows:
In TCR, CCLR1 is cleared to 0 and CCLR0 is set to 1 so that the timer counter is cleared by a
TCORA compare-match.
In TCSR, bits OS3 to OS0 are set to B'0110, causing 1 output at a TCORA compare-match and
0 output at a TCORB compare-match.
With these settings, the 8-bit timer provides output of pulses at a rate determined by TCORA with
a pulse width determined by TCORB. No software intervention is required.
TCNT
H'FF
Counter clear
TCORA
TCORB
H'00
TMO
Figure 12.12 Pulse Output (Example)