Datasheet

Section 11 16-Bit Timer Pulse Unit (TPU)
R01UH0309EJ0500 Rev. 5.00 Page 765 of 1408
Sep 24, 2012
H8S/2456, H8S/2456R, H8S/2454 Group
(1) 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
(2) 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.
a. Phase counting mode 1
Figure 11.26 shows an example of phase counting mode 1 operation, and table 11.33
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)
Figure 11.26 Example of Phase Counting Mode 1 Operation