Rev. 1.0, 03/01, page 134 of 280
11.4
Operation
•
Normal Operation
•
PWM Operation
11.4.1
Normal Operation
TCNT performs free-running or periodic counting operations. After a reset, TCNT is set as a free-
running counter. When the CST bit in TMRW is set to 1, TCNT starts incrementing the count.
When the count overflows from H'FFFF to H'0000, the OVF flag in TSRW is set to 1. If the OVIE
in TIERW is set to 1, an interrupt request is generated. Figure 11-2 shows free-running counting.
TCNT value
H'FFFF
H'0000
CST bit
OVF
Time
Flag cleared
by software
Figure 11-2 Free-Running Counter Operation
Periodic counting operation can be performed when GRA is set as an output compare register and
bit CCLR in TCRW is set to 1.
When the count matches GRA, TCNT is cleared to H'0000, the IMFA flag in TSRW is set to 1. If
the corresponding IMIEA bit in TIERW is set to 1, an interrupt request is generated. TCNT
continues counting from H'0000. Figure 11-3 shows periodic counting.
Содержание H8/3670F-ZTAT HD64F3670
Страница 2: ...Rev 2 0 03 01 page ii of xxiv ...
Страница 4: ...Rev 2 0 03 01 page iv of xxiv ...
Страница 14: ...Rev 2 0 03 01 page xiv of xxiv ...
Страница 20: ...Rev 1 0 03 01 page xx of xxiv ...
Страница 24: ...Rev 1 0 03 01 page xxiv of xxiv ...
Страница 78: ...Rev 1 0 03 01 page 54 of 280 ...
Страница 112: ...Rev 1 0 03 01 page 88 of 280 ...
Страница 248: ...Rev 1 0 03 01 page 224 of 280 ...