Section 12
16-Bit Duty Period Measurement Timer (TDP)
Rev. 1.00 Apr. 28, 2008 Page 349 of 994
REJ09B0452-0100
(4) Setting Example of Setting Cycle Measurement Mode
Figure 12.12 shows an example of a flowchart for using cycle measurement mode.
Start
Initial setting
Set TDPMDS = 0
Set CST = 0
Set TDPWDMX
Set OVIE = 1
and TWDMXIE = 1
Set TDPMDS = 1
Yes
No
Yes
No
Interrupt occurs
Processing for external
event stopped state
Processing for exceeded
upper limit of pulse width
End of exception handling
Set TDPMDS = 0
End of measurement
OVF = 1
or
TWDMXOVF = 1?
TWDMXOVF = 1?
[1]
[2]
[3]
Set TDPIPE = 1
[4]
[5]
[6]
[1]
[2]
[3]
[4]
[9]
[7]
[8]
Set timer mode.
Stop TDPCNT and initialize it to H'0000.
Set pulse width upper limit value.
Pin input enabled.
[5]
[6]
[9]
[7]
[8]
Enable interrupt requests.
Set to cycle measurement mode.
Start cycle measurement.
End of cycle measurement
Processing for external event-stopped state
Processing for exceeded pulse width upper limit
Figure 12.12 Example of Cycle Measurement Mode Settings
(for Pulse Width Upper-Limit Value)
Summary of Contents for H8S/2100 Series
Page 2: ...Rev 1 00 Apr 28 2008 Page ii of xxvi...
Page 54: ...Section 1 Overview Rev 1 00 Apr 28 2008 Page 28 of 994 REJ09B0452 0100...
Page 92: ...Section 2 CPU Rev 1 00 Apr 28 2008 Page 66 of 994 REJ09B0452 0100...
Page 158: ...Section 5 Interrupt Controller Rev 1 00 Apr 28 2008 Page 132 of 994 REJ09B0452 0100...
Page 244: ...Section 8 8 Bit PWM Timer PWMU Rev 1 00 Apr 28 2008 Page 218 of 994 REJ09B0452 0100...
Page 330: ...Section 10 16 Bit Timer Pulse Unit TPU Rev 1 00 Apr 28 2008 Page 304 of 994 REJ09B0452 0100...
Page 416: ...Section 13 8 Bit Timer TMR Rev 1 00 Apr 28 2008 Page 390 of 994 REJ09B0452 0100...
Page 612: ...Section 18 I 2 C Bus Interface IIC Rev 1 00 Apr 28 2008 Page 586 of 994 REJ09B0452 0100...
Page 706: ...Section 20 LPC Interface LPC Rev 1 00 Apr 28 2008 Page 680 of 994 REJ09B0452 0100...
Page 752: ...Section 21 FSI Interface Rev 1 00 Apr 28 2008 Page 726 of 994 REJ09B0452 0100...
Page 774: ...Section 23 RAM Rev 1 00 Apr 28 2008 Page 748 of 994 REJ09B0452 0100...
Page 1008: ...Section 28 Electrical Characteristics Rev 1 00 Apr 28 2008 Page 982 of 994 REJ09B0452 0100...
Page 1020: ...Rev 1 00 Apr 28 2008 Page 994 of 994 REJ09B0452 0100...
Page 1023: ......
Page 1024: ...H8S 2117R Group Hardware Manual...