RX610 Group
15. 16-Bit Timer Pulse Unit (TPU)
R01UH0032EJ0120 Rev.1.20
Page 508 of 1006
Feb 20, 2013
15.3.6.1
Phase Counting Mode Application Example
Figure 15.30 shows an example in which phase counting mode is set for TPU1, and TPU1 is coupled with TPU0 to input
servo motor 2-phase encoder pulses in order to detect the position or speed.
TPU1 is set to phase counting mode 1, and the encoder pulse A-phase and B-phase are input to the TCLKA and TCLKB
pins.
TPU0 operates with TPU0.TCNT counter clearing by TPU0.TGRC compare match; TPU0.TGRA and TPU0.TGRC are
used for the compare match function and are set with the speed control cycle and position control cycle. TPU0.TGRB is
used for input capture, with TPU0.TGRB and TPU0.TGRD operating in buffer mode. The TPU1 counter input clock is
specified as the TPU0.TGRB input capture source, and the pulse width of 2-phase encoder 4-multiplication pulses is
detected.
TPU1.TGRA and TPU1.TGRB for TPU1 are specified for input capture, TPU0.TGRA and TPU0.TGRC compare
matches are selected as the input capture source, and the up-/down-counter values for the control cycles are stored.
This procedure enables accurate position/speed detection to be achieved.
Edge
detection
circuit
TPU1.TCNT
TPU0.TCNT
TPU1.TGRA
(speed cycle capture)
TPU1.TGRB
(position cycle capture)
TPU0.TGRC
(position control cycle)
TPU0.TGRB
(pulse width capture)
TPU0.TGRD
(buffer operation)
TPU0.TGRA
(speed control cycle)
TCLKA
TCLKB
TPU1
TPU0
Figure 15.30 Phase Counting Mode Application Example
Summary of Contents for RX600 Series
Page 1006: ...RX610 Group R01UH0032EJ0120 ...