Renesas H8S/2100 Series Hardware Manual page 335

6-bit single-chip microcomputer
Hide thumbs Also See for H8S/2100 Series:
Table of Contents

Advertisement

(4)
Example of Settings for Cycle Measurement Mode
Figure 11.12 shows an example of the flow when cycle measurement mode is to be used.
Start
Initialization
Set TCMMDS to 0
Set CST (TCMCR) to 0
Set TCMMLCM
Set TCMPIPE = 1
Set OVIE and MAXOVIE to 1
Set TCMMDS to 1
OVF = 1? or
MAXOVF = 1?
No
Set TCMMDS = 0
End of measurement
Figure 11.12 Example of Cycle Measurement Mode Settings
[1]
[2]
[3]
[4]
[5]
[6]
Yes
Interrupt is generated
[9]
MAXOVF = 1?
No
Processing for
external event stopped state
End of exception handling
Section 11 16-Bit Cycle Measurement Timer (TCM)
[1]
Set timer mode.
[2]
Stop TCMCNT and initialize to H'0000.
[3]
Set an upper limit on the measurement period.
[4]
Pin input enabled.
[5]
Enable interrupts.
[6]
Set speed measurement mode
to start speed measurement.
[7]
Processing for the external event stopped state.
[8]
Processing for cycle upper limit over.
[9]
Speed measurement is completed.
Yes
Processing for cycle
[7]
upper limit over
Rev. 1.00 May 09, 2008 Page 309 of 954
[8]
REJ09B0462-0100

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2112r

Table of Contents