407
16-bit Timer/Event Counter P (TMP)
Chapter 11
Preliminary User’s Manual U17566EE1V2UM00
(d) TMPn I/O control register 1 (TPnIOC1)
(e) TMPn I/O control register 2 (TPnIOC2)
(f) TMPn option register 0 (TPnOPT0)
(g) TMPn counter read buffer register (TPnCNT)
The value of the 16-bit counter can be read by reading the TPnCNT
register.
(h) TMPn capture/compare registers 0 and 1 (TPnCCR0 and TPnCCR1)
These registers function as capture registers or compare registers
depending on the setting of the TPnOPT0.TPnCCSm bit.
When the registers function as capture registers, they store the count value
of the 16-bit counter when the valid edge input to the TIPnm pin is
detected.
When the registers function as compare registers and when D
m
is set to
the TPnCCRm register, the INTTPnCCm signal is generated when the
counter reaches (D
m
+ 1), and the output signal of the TOPnm pin is
inverted.
0
0
0
0
0/1
TPnIOC1
S
elect v
a
lid edge
of TIPn0 pin inp
u
t
S
elect v
a
lid edge
of TIPn1 pin inp
u
t
0/1
0/1
0/1
TPnI
S
2
TPnI
S
1
TPnI
S
0
TPnI
S3
0
0
0
0
0/1
TPnIOC2
S
elect v
a
lid edge of
extern
a
l event co
u
nt inp
u
t
0/1
0
0
TPnEE
S
0 TPnET
S
1 TPnET
S
0
TPnEE
S
1
0
0
0/1
0/1
0
TPnOPT0
Overflow fl
a
g
S
pecifie
s
if TPnCCR0
regi
s
ter f
u
nction
s
as
c
a
pt
u
re or comp
a
re regi
s
ter
S
pecifie
s
if TPnCCR1
regi
s
ter f
u
nction
s
as
c
a
pt
u
re or comp
a
re regi
s
ter
0
0
0/1
TPnCC
S
0
TPnOVF
TPnCC
S
1
electronic components distributor