6.5 Interrupts
The free-running timer can request seven types of interrupts: input capture A to D (ICIA, ICIB,
ICIC, ICID), output compare A and B (OCIA and OCIB), and overflow (FOVI). Each interrupt is
requested when the corresponding enable and flag bits are set. Independent signals are sent to the
interrupt controller for each type of interrupt. Table 6-4 lists information about these interrupts.
Table 6-4. Free-Running Timer Interrupts
6.6 Sample Application
In the example below, the free-running timer is used to generate two square-wave outputs with a
50% duty cycle and arbitrary phase relationship. The programming is as follows:
(1) The CCLRA bit in the TCSR is set to “1.”
(2) Each time a compare-match interrupt occurs, software inverts the corresponding output level
bit in TOCR (OLVLA or OLVLB).
Figure 6-17. Square-Wave Output (Example)
Interrupt
Description
Priority
ICIA
Requested when ICFA and ICIAE are set
High
ICIB
Requested when ICFB and ICIBE are set
ICIC
Requested when ICFC and ICICE are set
ICID
Requested when ICFD and ICIDE are set
OCIA
Requested when OCFA and OCIAE are set
OCIB
Requested when OCFB and OCIBE are set
FOVI
Requested when OVF and OVIE are set
Low
FRC
H'FFFF
OCRA
OCRB
H'0000
FTOA
FTOB
Clear counter
137
Summary of Contents for H8/326 Series
Page 67: ...58 ...
Page 121: ...112 ...
Page 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Page 279: ...270 ...