Datasheet
Section 11 16-Bit Timer Pulse Unit (TPU)
Rev. 6.00 Mar. 18, 2010 Page 417 of 982
REJ09B0054-0600
Example of Phase Counting Mode Setting Procedure: Figure 11.25 shows an example of the
phase counting mode setting procedure.
Phase counting mode
Select phase counting mode
Start count
<Phase counting mode>
Select phase counting mode with bits MD3 to
MD0 in TMDR.
Set the CST bit in TSTR to 1 to start the count
operation.
[1]
[2]
[1]
[2]
Figure 11.25 Example of Phase Counting Mode Setting Procedure
Examples of Phase Counting Mode Operation: In phase counting mode, TCNT counts up or
down according to the phase difference between two external clocks. There are four modes,
according to the count conditions.
1. Phase counting mode 1
Figure 11.26 shows an example of phase counting mode 1 operation, and table 11.32
summarizes the TCNT up/down-count conditions.
TCNT value
Time
Down-count
Up-count
TCLKA (channels 1 and 5
*
)
TCLKC (channels 2 and 4
*
)
TCLKB (channels 1 and 5
*
)
TCLKD (channels 2 and 4
*
)
Note: * Not available in the H8S/2227 Group.
Figure 11.26 Example of Phase Counting Mode 1 Operation