CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 00 AND 01
Preliminary User’s Manual U17260EJ3V1UD
215
Figure 7-40. Timing Example of Free-Running Timer Mode
(CR00n: Compare Register, CR01n: Capture Register)
•
TOC0n = 13H, PRM0n = 10H, CRC0n = 04H, TMC0n = 04H
FFFFH
TM0n register
0000H
Operable bits
(TMC0n3, TMC0n2)
Capture trigger input
(TI00n)
Compare register
(CR00n)
Compare match interrupt
(INTTM00n)
Compare register
(CR01n)
Capture interrupt
(INTTM01n)
TO0n pin output
Overflow flag
(OVF0n)
01
M
N
S
P
Q
00
0 write clear
0 write clear
0 write clear
0 write clear
0000H
0001H
M
N
S
P
Q
This is an application example where a compare register and a capture register are used at the same time in the
free-running timer mode.
In this example, the INTTM00n signal is generated and the output level of the TO0n pin is reversed each time the
count value of TM0n matches the set value of CR00n (compare register). In addition, the INTTM01n signal is
generated and the count value of TM0n is captured to CR01n each time the valid edge of the TI00n pin is
detected.
Remark
n = 0:
µ
PD78F0531, 78F0532, 78F0533
n = 0, 1:
µ
PD78F0534, 78F0535, 78F0536, 78F0537, 78F0537D