Hitachi H8/3664 Hardware Manual page 226

Table of Contents

Advertisement

TCNT value
H'FFFF
H'0000
CST bit
OVF
When compare match is selected as the TCNT clear source, TCNT operates as a periodic counter.
Select the output compare function for GRA, set bit CCLR in TCRW to 1, and set the count period
in GRA. When the count matches GRA, the IMFA flag in TSRW is set to 1 and TCNT is cleared
to H'0000. If the IMIEA bit in TSRW is set to 1 at this time, an interrupt request is sent to the
CPU. After the compare match, TCNT continues counting from H'0000. Figure 12.6 illustrates
periodic counting.
TCNT value
GRA
H'0000
CST bit
IMFA
210
Figure 12.5 Free-Running Counter Operation
Figure 12.6 Periodic Counter Operation
Flag cleared
by software
Flag cleared
by software
Time
Time

Advertisement

Table of Contents
loading

Table of Contents