Datasheet

Table Of Contents
Section 14 16-Bit Timer Pulse Unit (TPU)
Rev. 2.00 Jul. 04, 2007 Page 292 of 692
REJ09B0309-0200
Figure 14.7 illustrates periodic counter operation.
TCNT value
TGR
H'0000
CST bit
TGF
Time
Counter cleared by TGR
compare match
Flag cleared by software
Figure 14.7 Periodic Counter Operation
(2) Waveform Output by Compare Match
The TPU can perform 0, 1, or toggle output from the corresponding output pin using compare
match.
(a) Example of Setting Procedure for Waveform Output by Compare Match
Figure 14.8 shows an example of the setting procedure for waveform output by compare match.
Input selection
Select waveform output mode
Start count operation
< Waveform output >
Select 0 output or 1 output for initial value, and
0 output, 1 output, or toggle output, by for compare
match output value means of TIOR. The set
initial value is output at the TIOC pin until the
first compare match occurs.
Set the timing for compare match generation in
TGR.
Set the CST bit in TSTR to 1 to start the count
operation.
[1]
[2]
[1]
[2]
Set output timing
[3]
[3]
Figure 14.8 Example of Setting Procedure for Waveform Output by Compare Match